diff mbox

[2/2] ath10k: send (re)assoc peer command when NSS changed

Message ID 1418719980-19753-2-git-send-email-janusz.dziedzic@tieto.com (mailing list archive)
State Accepted
Headers show

Commit Message

Janusz.Dziedzic@tieto.com Dec. 16, 2014, 8:53 a.m. UTC
Assoc peer command contain information about NSS.
When we will get IEEE80211_RC_NSS_CHANGED we should
also send (re) assoc peer command to be sure firmware
will know about it and RC will work correctly.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
---
 drivers/net/wireless/ath/ath10k/mac.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Kalle Valo Dec. 17, 2014, 10:32 a.m. UTC | #1
Janusz Dziedzic <janusz.dziedzic@tieto.com> writes:

> Assoc peer command contain information about NSS.
> When we will get IEEE80211_RC_NSS_CHANGED we should
> also send (re) assoc peer command to be sure firmware
> will know about it and RC will work correctly.
>
> Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>

Does this fix a user visible bug or is this something you just found
from doing code review?
Janusz.Dziedzic@tieto.com Dec. 18, 2014, 5:28 a.m. UTC | #2
On 17 December 2014 at 11:32, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
> Janusz Dziedzic <janusz.dziedzic@tieto.com> writes:
>
>> Assoc peer command contain information about NSS.
>> When we will get IEEE80211_RC_NSS_CHANGED we should
>> also send (re) assoc peer command to be sure firmware
>> will know about it and RC will work correctly.
>>
>> Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
>
> Does this fix a user visible bug or is this something you just found
> from doing code review?
>
In case we will get only IEEE80211_RC_NSS_CHANGED we will not update
FW configuration correctly. This is not the problem when IBSS, while
we update two flags in one step IEEE80211_RC_SUPP_RATES_CHANGED |
IEEE80211_RC_NSS_CHANGED.
We could have problems when mac80211 will send only NSS_CHANGED flag.
This seems could happen when we will get  WLAN_EID_OPMODE_NOTIF. I
didn't test such case, but I believe some AP could send such
notification. So, this fix potential TP issue.

BR
Janusz
Kalle Valo Dec. 18, 2014, 6:02 a.m. UTC | #3
Janusz Dziedzic <janusz.dziedzic@tieto.com> writes:

> On 17 December 2014 at 11:32, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
>> Janusz Dziedzic <janusz.dziedzic@tieto.com> writes:
>>
>>> Assoc peer command contain information about NSS.
>>> When we will get IEEE80211_RC_NSS_CHANGED we should
>>> also send (re) assoc peer command to be sure firmware
>>> will know about it and RC will work correctly.
>>>
>>> Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
>>
>> Does this fix a user visible bug or is this something you just found
>> from doing code review?
>
> In case we will get only IEEE80211_RC_NSS_CHANGED we will not update
> FW configuration correctly. This is not the problem when IBSS, while
> we update two flags in one step IEEE80211_RC_SUPP_RATES_CHANGED |
> IEEE80211_RC_NSS_CHANGED.
>
> We could have problems when mac80211 will send only NSS_CHANGED flag.
> This seems could happen when we will get WLAN_EID_OPMODE_NOTIF. I
> didn't test such case, but I believe some AP could send such
> notification. So, this fix potential TP issue.

Ok, I'll add to the commit log that this was found during code review
(and doesn't fix a reported bug).
diff mbox

Patch

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index c9e7995..05fd620 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -3592,8 +3592,9 @@  static void ath10k_sta_rc_update_wk(struct work_struct *wk)
 				    sta->addr, smps, err);
 	}
 
-	if (changed & IEEE80211_RC_SUPP_RATES_CHANGED) {
-		ath10k_dbg(ar, ATH10K_DBG_MAC, "mac update sta %pM supp rates\n",
+	if (changed & IEEE80211_RC_SUPP_RATES_CHANGED ||
+	    changed & IEEE80211_RC_NSS_CHANGED) {
+		ath10k_dbg(ar, ATH10K_DBG_MAC, "mac update sta %pM supp rates/nss\n",
 			   sta->addr);
 
 		err = ath10k_station_assoc(ar, arvif->vif, sta, true);