浏览代码

qcacld-3.0: Fix the band setting in 11ac phymode update

If user configures the phymode to 11ac then band is configured
with only 5G that disables the 2.4G channels.

Instead of setting the band to 5G, enable the 5G band during
11ac phymode update if the 5G band is not enabled.

Change-Id: I4a4fa3a0bddb345e7ea73b7b36f0581644029316
CRs-Fixed: 2210359
Kiran Kumar Lokere 7 年之前
父节点
当前提交
b04f7f89f7
共有 1 个文件被更改,包括 14 次插入4 次删除
  1. 14 4
      core/hdd/src/wlan_hdd_wext.c

+ 14 - 4
core/hdd/src/wlan_hdd_wext.c

@@ -4021,11 +4021,21 @@ int wlan_hdd_update_phymode(struct net_device *net, tHalHandle hal,
 	case IEEE80211_MODE_11AC_VHT40:
 	case IEEE80211_MODE_11AC_VHT80:
 		sme_set_phy_mode(hal, eCSR_DOT11_MODE_11ac);
-		if (hdd_reg_set_band(net, WLAN_HDD_UI_BAND_5_GHZ) == 0) {
-			phymode = eCSR_DOT11_MODE_11ac;
-			hdd_dot11mode = eHDD_DOT11_MODE_11ac;
-			chwidth = WNI_CFG_CHANNEL_BONDING_MODE_ENABLE;
+		phymode = eCSR_DOT11_MODE_11ac;
+		hdd_dot11mode = eHDD_DOT11_MODE_11ac;
+		chwidth = WNI_CFG_CHANNEL_BONDING_MODE_ENABLE;
+		if (band_5g && band_24) {
+			curr_band = BAND_ALL;
+			break;
+		} else if (band_5g) {
 			curr_band = BAND_5G;
+			break;
+		} else if (new_phymode != IEEE80211_MODE_11AC_VHT80) {
+			curr_band = BAND_2G;
+			break;
+		}
+		if (hdd_reg_set_band(net, WLAN_HDD_UI_BAND_AUTO) == 0) {
+			curr_band = BAND_ALL;
 		} else {
 			sme_set_phy_mode(hal, old_phymode);
 			return -EIO;