From: greearb@candelatech.com
To: ath10k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org, Ben Greear <greearb@candelatech.com>
Subject: [PATCH] ath10k: ensure pdev sta kickout threshold is set.
Date: Fri, 2 Sep 2016 12:06:42 -0700 [thread overview]
Message-ID: <1472843202-12428-1-git-send-email-greearb@candelatech.com> (raw)
From: Ben Greear <greearb@candelatech.com>
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 <greearb@candelatech.com>
---
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_ */
--
2.4.11
next reply other threads:[~2016-09-02 19:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-02 19:06 greearb [this message]
2016-09-06 7:39 ` [PATCH] ath10k: ensure pdev sta kickout threshold is set Manoharan, Rajkumar
2016-09-06 13:12 ` Ben Greear
2016-09-06 17:16 ` Rajkumar Manoharan
2016-09-06 17:26 ` Ben Greear
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1472843202-12428-1-git-send-email-greearb@candelatech.com \
--to=greearb@candelatech.com \
--cc=ath10k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).