Skip to content

Commit 9191fc2

Browse files
Ryan HsuKalle Valo
authored andcommitted
ath10k: update the phymode along with bandwidth change request
In the case of Station connects to AP with narrower bandwidth at beginning. And later the AP changes the bandwidth to winder bandwidth, the AP will beacon with wider bandwidth IE, eg VHT20->VHT40->VHT80 or VHT40->VHT80. Since the supported BANDWIDTH will be limited by the PHYMODE, so while Station receives the bandwidth change request, it will also need to reconfigure the PHYMODE setting to firmware instead of just configuring the BANDWIDTH info, otherwise it'll trigger a firmware crash with non-support bandwidth. The issue was observed in WLAN.RM.4.4.1-00051-QCARMSWP-1, QCA6174 with below scenario: AP xxx changed bandwidth, new config is 5200 MHz, width 2 (5190/0 MHz) disconnect from AP xxx for new auth to yyy RX ReassocResp from xxx (capab=0x1111 status=0 aid=102) associated .... AP xxx changed bandwidth, new config is 5200 MHz, width 2 (5190/0 MHz) AP xxx changed bandwidth, new config is 5200 MHz, width 3 (5210/0 MHz) .... firmware register dump: [00]: 0x05030000 0x000015B3 0x00987291 0x00955B31 [04]: 0x00987291 0x00060730 0x00000004 0x00000001 [08]: 0x004089F0 0x00955A00 0x000A0B00 0x00400000 [12]: 0x00000009 0x00000000 0x00952CD0 0x00952CE6 [16]: 0x00952CC4 0x0098E25F 0x00000000 0x0091080D [20]: 0x40987291 0x0040E7A8 0x00000000 0x0041EE3C [24]: 0x809ABF05 0x0040E808 0x00000000 0xC0987291 [28]: 0x809A650C 0x0040E948 0x0041FE40 0x004345C4 [32]: 0x809A5C63 0x0040E988 0x0040E9AC 0x0042D1A8 [36]: 0x8091D252 0x0040E9A8 0x00000002 0x00000001 [40]: 0x809FDA9D 0x0040EA58 0x0043D554 0x0042D554 [44]: 0x809F8B22 0x0040EA78 0x0043D554 0x00000001 [48]: 0x80911210 0x0040EAC8 0x00000010 0x004041D0 [52]: 0x80911154 0x0040EB28 0x00400000 0x00000000 [56]: 0x8091122D 0x0040EB48 0x00000000 0x00400600 Reported-by: Rouven Czerwinski <[email protected]> Tested-by: Timur Kristóf <[email protected]> Signed-off-by: Ryan Hsu <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
1 parent 755abd2 commit 9191fc2

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

drivers/net/wireless/ath/ath10k/mac.c

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6058,8 +6058,19 @@ static void ath10k_sta_rc_update_wk(struct work_struct *wk)
60586058
ath10k_mac_max_vht_nss(vht_mcs_mask)));
60596059

60606060
if (changed & IEEE80211_RC_BW_CHANGED) {
6061-
ath10k_dbg(ar, ATH10K_DBG_MAC, "mac update sta %pM peer bw %d\n",
6062-
sta->addr, bw);
6061+
enum wmi_phy_mode mode;
6062+
6063+
mode = chan_to_phymode(&def);
6064+
ath10k_dbg(ar, ATH10K_DBG_MAC, "mac update sta %pM peer bw %d phymode %d\n",
6065+
sta->addr, bw, mode);
6066+
6067+
err = ath10k_wmi_peer_set_param(ar, arvif->vdev_id, sta->addr,
6068+
WMI_PEER_PHYMODE, mode);
6069+
if (err) {
6070+
ath10k_warn(ar, "failed to update STA %pM peer phymode %d: %d\n",
6071+
sta->addr, mode, err);
6072+
goto exit;
6073+
}
60636074

60646075
err = ath10k_wmi_peer_set_param(ar, arvif->vdev_id, sta->addr,
60656076
WMI_PEER_CHAN_WIDTH, bw);
@@ -6100,6 +6111,7 @@ static void ath10k_sta_rc_update_wk(struct work_struct *wk)
61006111
sta->addr);
61016112
}
61026113

6114+
exit:
61036115
mutex_unlock(&ar->conf_mutex);
61046116
}
61056117

drivers/net/wireless/ath/ath10k/wmi.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6144,6 +6144,7 @@ enum wmi_peer_param {
61446144
WMI_PEER_NSS = 0x5,
61456145
WMI_PEER_USE_4ADDR = 0x6,
61466146
WMI_PEER_DEBUG = 0xa,
6147+
WMI_PEER_PHYMODE = 0xd,
61476148
WMI_PEER_DUMMY_VAR = 0xff, /* dummy parameter for STA PS workaround */
61486149
};
61496150

0 commit comments

Comments
 (0)