From patchwork Fri Sep 2 19:06:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Greear X-Patchwork-Id: 9311525 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4C1D160772 for ; Fri, 2 Sep 2016 19:08:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 25CFB2984D for ; Fri, 2 Sep 2016 19:08:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0444F2984F; Fri, 2 Sep 2016 19:08:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EFC9E2984D for ; Fri, 2 Sep 2016 19:08:01 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bftob-0004bH-H5; Fri, 02 Sep 2016 19:07:49 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bftoa-0004aX-6w for ath10k@bombadil.infradead.org; Fri, 02 Sep 2016 19:07:48 +0000 Received: from mail2.candelatech.com ([208.74.158.173]) by merlin.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bftoY-0006WZ-Bl for ath10k@lists.infradead.org; Fri, 02 Sep 2016 19:07:47 +0000 Received: from ben-dt3.candelatech.com (firewall.candelatech.com [50.251.239.81]) by mail2.candelatech.com (Postfix) with ESMTP id DC77740A626; Fri, 2 Sep 2016 12:07:03 -0700 (PDT) From: greearb@candelatech.com To: ath10k@lists.infradead.org Subject: [PATCH] ath10k: ensure pdev sta kickout threshold is set. Date: Fri, 2 Sep 2016 12:06:42 -0700 Message-Id: <1472843202-12428-1-git-send-email-greearb@candelatech.com> X-Mailer: git-send-email 2.4.11 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160902_150746_562889_C5F59BC9 X-CRM114-Status: GOOD ( 11.01 ) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ben Greear , linux-wireless@vger.kernel.org MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ben Greear The station kickout threshold is a pdev value, not per vdev, so it should be set all the time, not just when vdev is an AP. This should fix setting the station kickout threshold when using ibss interfaces. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/mac.c | 27 ++++++++++++++++++--------- drivers/net/wireless/ath/ath10k/mac.h | 2 ++ 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 39fcdad..4aa0736 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -744,21 +744,26 @@ static int ath10k_peer_create(struct ath10k *ar, return 0; } +int ath10k_mac_set_pdev_kickout(struct ath10k *ar) +{ + u32 param = ar->wmi.pdev_param->sta_kickout_th; + int rv; + + rv = ath10k_wmi_pdev_set_param(ar, param, + ar->sta_xretry_kickout_thresh); + if (rv) { + ath10k_warn(ar, "failed to set sta kickout threshold to %d: %d\n", + ar->sta_xretry_kickout_thresh, rv); + } + return rv; +} + static int ath10k_mac_set_kickout(struct ath10k_vif *arvif) { struct ath10k *ar = arvif->ar; u32 param; int ret; - param = ar->wmi.pdev_param->sta_kickout_th; - ret = ath10k_wmi_pdev_set_param(ar, param, - ar->sta_xretry_kickout_thresh); - if (ret) { - ath10k_warn(ar, "failed to set kickout threshold on vdev %i: %d\n", - arvif->vdev_id, ret); - return ret; - } - param = ar->wmi.vdev_param->ap_keepalive_min_idle_inactive_time_secs; ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, param, ATH10K_KEEPALIVE_MIN_IDLE); @@ -5427,6 +5432,10 @@ static int ath10k_add_interface(struct ieee80211_hw *hw, arvif->peer_id = HTT_INVALID_PEERID; } + ret = ath10k_mac_set_pdev_kickout(ar); + if (ret) + return ret; + if (arvif->vdev_type == WMI_VDEV_TYPE_AP) { ret = ath10k_mac_set_kickout(arvif); if (ret) { diff --git a/drivers/net/wireless/ath/ath10k/mac.h b/drivers/net/wireless/ath/ath10k/mac.h index 5f027ec..1a34cab 100644 --- a/drivers/net/wireless/ath/ath10k/mac.h +++ b/drivers/net/wireless/ath/ath10k/mac.h @@ -113,4 +113,6 @@ static inline void ath10k_tx_h_seq_no(struct ieee80211_vif *vif, } } +int ath10k_mac_set_pdev_kickout(struct ath10k *ar); + #endif /* _MAC_H_ */