Message ID | 1516842604-31447-1-git-send-email-ryanhsu@codeaurora.org (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Kalle Valo |
Headers | show |
ryanhsu@codeaurora.org wrote: > From: Ryan Hsu <ryanhsu@codeaurora.org> > > 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. Fails to compile: drivers/net/wireless/ath/ath10k/mac.c: In function ‘ath10k_sta_rc_update_wk’: drivers/net/wireless/ath/ath10k/mac.c:6000:3: error: ‘mode’ undeclared (first use in this function) mode = chan_to_phymode(&def); ^ drivers/net/wireless/ath/ath10k/mac.c:6000:3: note: each undeclared identifier is reported only once for each function it appears in drivers/net/wireless/ath/ath10k/mac.c:6006:7: error: ‘WMI_PEER_PHYMODE’ undeclared (first use in this function) WMI_PEER_PHYMODE, mode); ^ make[5]: *** [drivers/net/wireless/ath/ath10k/mac.o] Error 1 make[4]: *** [drivers/net/wireless/ath/ath10k] Error 2 make[3]: *** [drivers/net/wireless/ath] Error 2 make[2]: *** [drivers/net/wireless] Error 2 make[1]: *** [drivers/net] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [drivers] Error 2 Patch set to Changes Requested.
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index ebb3f1b..68a5256 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -1,6 +1,7 @@ /* * Copyright (c) 2005-2011 Atheros Communications Inc. * Copyright (c) 2011-2017 Qualcomm Atheros, Inc. + * Copyright (c) 2018, The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -5996,8 +5997,18 @@ static void ath10k_sta_rc_update_wk(struct work_struct *wk) ath10k_mac_max_vht_nss(vht_mcs_mask))); if (changed & IEEE80211_RC_BW_CHANGED) { - ath10k_dbg(ar, ATH10K_DBG_MAC, "mac update sta %pM peer bw %d\n", - sta->addr, bw); + mode = chan_to_phymode(&def); + + ath10k_dbg(ar, ATH10K_DBG_MAC, "mac update sta %pM peer bw %d phymode %d\n", + sta->addr, bw, mode); + + err = ath10k_wmi_peer_set_param(ar, arvif->vdev_id, sta->addr, + WMI_PEER_PHYMODE, mode); + if (err) { + ath10k_warn(ar, "failed to update STA %pM peer phymode %d: %d\n", + sta->addr, mode, err); + goto exit; + } err = ath10k_wmi_peer_set_param(ar, arvif->vdev_id, sta->addr, WMI_PEER_CHAN_WIDTH, bw); @@ -6039,6 +6050,7 @@ static void ath10k_sta_rc_update_wk(struct work_struct *wk) sta->addr); } +exit: mutex_unlock(&ar->conf_mutex); }