Bläddra i källkod

qcacld-3.0: Do 11ac override only if channel list has 5Ghz channel(s)

If 11ac override is enabled, change hw moed to 11ac and channel width
to the value defined in vht channel width ini. If channel list received
from hostapd contains only 2.4 Ghz channels, mismatch happens as hw mode
is 11ac but the channel list contains only 2.4 Ghz channels and no 5Ghz
channel.

Do 11ac override only when the channel list received from hostapd contains
5Ghz channel(s).

Change-Id: I28d9af3fed4b8487b50a4442221c1c880fe14c13
CRs-Fixed: 2186710
Himanshu Agarwal 7 år sedan
förälder
incheckning
8b3d3e93b5
1 ändrade filer med 8 tillägg och 13 borttagningar
  1. 8 13
      core/hdd/src/wlan_hdd_cfg80211.c

+ 8 - 13
core/hdd/src/wlan_hdd_cfg80211.c

@@ -2668,8 +2668,16 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
 	}
 
 	sap_config->acs_cfg.band = hw_mode;
+	status = wlan_hdd_set_acs_ch_range(sap_config, hw_mode,
+					   ht_enabled, vht_enabled);
+	if (status) {
+		hdd_err("set acs channel range failed");
+		goto out;
+	}
+
 	/* ACS override for android */
 	if (hdd_ctx->config->sap_p2p_11ac_override && ht_enabled &&
+	    sap_config->acs_cfg.end_ch >= WLAN_REG_CH_NUM(CHAN_ENUM_36) &&
 	    !(((adapter->device_mode == QDF_SAP_MODE) &&
 	      (hdd_ctx->config->sap_force_11n_for_11ac)) ||
 	      ((adapter->device_mode == QDF_P2P_GO_MODE) &&
@@ -2680,25 +2688,12 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
 		sap_config->acs_cfg.hw_mode = eCSR_DOT11_MODE_11ac;
 		sap_config->acs_cfg.ch_width =
 					hdd_ctx->config->vhtChannelWidth;
-		status = wlan_hdd_set_acs_ch_range(sap_config, hw_mode,
-						   ht_enabled, vht_enabled);
-		if (status) {
-			hdd_err("set acs channel range failed");
-			goto out;
-		}
 		/* No VHT80 in 2.4G so perform ACS accordingly */
 		if (sap_config->acs_cfg.end_ch <= 14 &&
 		    sap_config->acs_cfg.ch_width == eHT_CHANNEL_WIDTH_80MHZ) {
 			sap_config->acs_cfg.ch_width = eHT_CHANNEL_WIDTH_40MHZ;
 			hdd_debug("resetting to 40Mhz in 2.4Ghz");
 		}
-	} else {
-		status = wlan_hdd_set_acs_ch_range(sap_config, hw_mode,
-						   ht_enabled, vht_enabled);
-		if (status) {
-			hdd_err("set acs channel range failed");
-			goto out;
-		}
 	}
 
 	hdd_debug("ACS Config for %s: HW_MODE: %d ACS_BW: %d HT: %d VHT: %d START_CH: %d END_CH: %d band %d",