ath10k: ensure pdev sta kickout threshold is set.
PATCH 1/1 ath10k: ensure pdev sta kickout threshold is set.
From: Ben Greear <[email protected]>
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.
--- drivers/net/wireless/ath/ath10k/mac.c | 27 ++++++++++++++++++--------- drivers/net/wireless/ath/ath10k/mac.h | 2 ++ 2 files changed, 20 insertions(+), 9 deletions(-)
drivers/net/wireless/ath/ath10k/mac.c +18 -9
@@ -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) {
drivers/net/wireless/ath/ath10k/mac.h +2 -0
@@ -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_ */
Signature · 1 line
2.4.11
[...]=0A=
=0A=
Review
Quoted 9 lines
(quoted diff) +9
-0+int ath10k_mac_set_pdev_kickout(struct ath10k *ar)=0A= +{=0A= + u32 param =3D ar->wmi.pdev_param->sta_kickout_th;=0A= + int rv;=0A= +=0A= + rv =3D ath10k_wmi_pdev_set_param(ar, param,=0A= + ar->sta_xretry_kickout_thresh);=0A= + if (rv) {=0A= + ath10k_warn(ar, "failed to set sta kickout threshold to %=
d: %d\n",=0A=
Quoted 5 lines
(quoted diff) +4
-0+ ar->sta_xretry_kickout_thresh, rv);=0A= + }=0A= + return rv;=0A= +}=0A==0A=
Ben,=0A=
=0A=
I plan to get rid of setting station kickout threshold from host. Each firm= ware revision (i.e qca988x, qca99x0, ipq4019) follows different logic base= d on hw capability for station kickout and follows different default paramt= ers. So configuring common threshold will affect firmware logic. Better to = get rid of these configuration from host driver and let firmware to work wi= th default parameters.=0A=
=0A=
Also I could not find out sta_xretry_kickout_thresh definition in upstream = driver. Have you posted any changes for the same?=0A=
=0A=
-Rajkumar=
Quoted 18 lines · Rajkumar
[...]
Quoted 4 lines
drivers/net/wireless/ath/ath10k/mac.c +3
-0+int ath10k_mac_set_pdev_kickout (struct ath10k *ar) +{ +u32 param = ar->wmi.pdev_param->sta_kickout_th;drivers/net/wireless/ath/ath10k/mac.c static int ath10k_peer_create(struct ath10k *ar, · line 759
Quoted 10 lines
drivers/net/wireless/ath/ath10k/mac.c +10
-0+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; +}Ben,
Quoted 3 lines
I plan to get rid of setting station kickout threshold from host. Each firmware revision (i.e qca988x, qca99x0, ipq4019) follows different logic based on hw capability for station kickout and follows different default paramters. So configuring common threshold will affect firmware logic. Better to get rid of these configuration from host driver and let firmware to work with default parameters.
Also I could not find out
sta_xretry_kickout_threshdefinition in upstream driver. Have you posted any changes for the same?
Hmm, maybe that last bit is something I added in another patch. Probably my patch to enable firmware config on a per radio basis (fwcfg in my tree). Those patches are larger and probably will never make it upstream.
I need a way to configure this kickout, since firmware is kicking out stations when it should not.
Instead of removing the capability, you should instead make it configurable through debugfs or something like my fwcfg patches, and/or disable the kickout entirely. Since mac80211 can deal with kicking out stations already, the stuff in the firmware just makes things less stable in poor RF environments and/or with stations with flaky power-save and off-channel roaming.
Thanks,
Ben
Signature · 7 lines
Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k
Quoted 25 lines · Ben Greear
Quoted 20 lines · Rajkumar
[...]
Quoted 12 lines
drivers/net/wireless/ath/ath10k/mac.c +7
-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);(quoted diff) +2
-0+ if (rv) { + ath10k_warn(ar, "failed to set sta kickout thresholdto %d: %d\n",
drivers/net/wireless/ath/ath10k/mac.c static int ath10k_peer_create(struct ath10k *ar, · line 759
Quoted 4 lines
drivers/net/wireless/ath/ath10k/mac.c +4
-0+ ar->sta_xretry_kickout_thresh, rv); + } +return rv; +}Ben,
Quoted 3 lines
I plan to get rid of setting station kickout threshold from host. Each firmware revision (i.e qca988x, qca99x0, ipq4019) follows different logic based on hw capability for station kickout and follows different default paramters. So configuring common threshold will affect firmware logic. Better to get rid of these configuration from host driver and let firmware to work with default parameters.
Also I could not find out
sta_xretry_kickout_threshdefinition in upstream driver. Have you posted any changes for the same?
Quoted 9 lines
Hmm, maybe that last bit is something I added in another patch. Probably my patch to enable firmware config on a per radio basis (fwcfg in my tree). Those patches are
larger and probably will never make it upstream.I need a way to configure this kickout, since firmware is kicking out stations when it should
not.
Could you please explain the scenario?
Quoted 9 lines
Instead of removing the capability, you should instead make it configurable through debugfs or something like my fwcfg patches, and/or disable the kickout entirely.
Since mac80211 can deal with kicking out stations already, the stuff in the firmware just makes
things less stable in poor RF environments and/or with stations with flaky power-save and
off-channel roaming.
I plan to get rid of hardcoded value and fix this through proper netlink interface instead of debugfs. While ago, I posted a change for configuring low ack threshold. It is still pending in my TODO list.
http://comments.gmane.org/gmane.linux.kernel.wireless.general/137645
-Rajkumar
Quoted 31 lines · Rajkumar Manoharan
Quoted 30 lines · Ben Greear
Quoted 18 lines · Rajkumar
[...]
Quoted 4 lines
drivers/net/wireless/ath/ath10k/mac.c +3
-0+int ath10k_mac_set_pdev_kickout (struct ath10k *ar) +{ +u32 param = ar->wmi.pdev_param->sta_kickout_th;drivers/net/wireless/ath/ath10k/mac.c static int ath10k_peer_create(struct ath10k *ar, · line 759
Quoted 10 lines
drivers/net/wireless/ath/ath10k/mac.c +10
-0+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; +}Ben,
Quoted 5 lines
I plan to get rid of setting station kickout threshold from host. Each firmware revision (i.e qca988x, qca99x0, ipq4019) follows different logic based on hw capability for station kickout and follows different default paramters. So configuring common threshold will affect firmware logic. Better to get rid of these configuration from host driver and let firmware to work with default parameters.
Also I could not find out
sta_xretry_kickout_threshdefinition in upstream driver. Have you posted any changes for the same?Hmm, maybe that last bit is something I added in another patch. Probably my patch to enable firmware config on a per radio basis (fwcfg in my tree). Those patches are
larger and probably will never make it upstream.
Quoted 6 lines
Quoted 4 lines
I need a way to configure this kickout, since firmware is kicking out stations when it should
not.Could you please explain the scenario?
A customer reported issues when having a bunch of android tablets connected to a QCA9880 NIC running my 10.1 CT firmware in AP mode.
It is not clear exactly why the peers suddenly cannot ack packets, but disabling the logic that kicks out stations due to low acks appears to resolve the issue.
To turn the question around: Is there any benefit to having the firmware handle this keep-alive stuff?
I can see maybe it is useful in station only mode for power-saving reasons, but not in AP mode.
Quoted 9 lines
Quoted 9 lines
Instead of removing the capability, you should instead make it configurable through debugfs or something like my fwcfg patches, and/or disable the kickout entirely.
Since mac80211 can deal with kicking out stations already, the stuff in the firmware just makes
things less stable in poor RF environments and/or with stations with flaky power-save and
off-channel roaming.
Quoted 4 lines
I plan to get rid of hardcoded value and fix this through proper netlink interface instead of debugfs. While ago, I posted a change for configuring low ack threshold. It is still pending in my TODO list.
http://comments.gmane.org/gmane.linux.kernel.wireless.general/137645
That sounds nice. I would hope that setting the value to 0 would disable as much firmware keep-alive logic as possible.
Thanks,
Ben
Signature · 2 lines
Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com