Jelajahi Sumber

qcacld-3.0: Fix issue with channel bonding configuration

Set the correct channel bonding parameter with user configured
value to enable/disable the channel bonding mode.

Change-Id: I38ff74fd5a1786a1446f36ca619a929c84f9446a
CRs-Fixed: 2394522
Kiran Kumar Lokere 6 tahun lalu
induk
melakukan
9df090b79c
2 mengubah file dengan 8 tambahan dan 13 penghapusan
  1. 2 11
      core/hdd/src/wlan_hdd_wext.c
  2. 6 2
      core/sme/src/csr/csr_api_roam.c

+ 2 - 11
core/hdd/src/wlan_hdd_wext.c

@@ -4293,11 +4293,9 @@ static int hdd_we_set_ch_width(struct hdd_adapter *adapter, int ch_width)
 {
 	int errno;
 	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
-	ePhyChanBondState bonding_state;
 	uint32_t bonding_mode;
 	tSmeConfigParams *sme_config;
 	mac_handle_t mac_handle;
-	uint32_t channel_bonding_mode;
 
 	mac_handle = hdd_ctx->mac_handle;
 	if (!mac_handle)
@@ -4313,15 +4311,7 @@ static int hdd_we_set_ch_width(struct hdd_adapter *adapter, int ch_width)
 
 	case eHT_CHANNEL_WIDTH_40MHZ:
 	case eHT_CHANNEL_WIDTH_80MHZ:
-		ucfg_mlme_get_channel_bonding_5ghz(hdd_ctx->psoc,
-						   &channel_bonding_mode);
-		bonding_state = csr_convert_cb_ini_value_to_phy_cb_state(
-			channel_bonding_mode);
-
-		if (bonding_state == WNI_CFG_CHANNEL_BONDING_MODE_DISABLE)
-			return -EINVAL;
-
-		bonding_mode = channel_bonding_mode;
+		bonding_mode = 1;
 		break;
 
 	default:
@@ -4342,6 +4332,7 @@ static int hdd_we_set_ch_width(struct hdd_adapter *adapter, int ch_width)
 
 	sme_get_config_param(mac_handle, sme_config);
 	sme_config->csrConfig.channelBondingMode5GHz = bonding_mode;
+	sme_config->csrConfig.channelBondingMode24GHz = bonding_mode;
 	sme_update_config(mac_handle, sme_config);
 
 free_config:

+ 6 - 2
core/sme/src/csr/csr_api_roam.c

@@ -1341,10 +1341,14 @@ void csr_set_global_cfgs(struct mac_context *mac)
 	 * Once session is established we will use the session related params
 	 * stored in PE session for CB mode
 	 */
-	if (cfg_in_range(CFG_CHANNEL_BONDING_MODE,
+	if (cfg_in_range(CFG_CHANNEL_BONDING_MODE_5GHZ,
 			 mac->roam.configParam.channelBondingMode5GHz))
-		mac->mlme_cfg->feature_flags.channel_bonding_mode =
+		mac->mlme_cfg->feature_flags.channel_bonding_mode_5ghz =
 				mac->roam.configParam.channelBondingMode5GHz;
+	if (cfg_in_range(CFG_CHANNEL_BONDING_MODE_24GHZ,
+			 mac->roam.configParam.channelBondingMode24GHz))
+		mac->mlme_cfg->feature_flags.channel_bonding_mode_24ghz =
+				mac->roam.configParam.channelBondingMode24GHz;
 
 	if (cfg_in_range(CFG_HEART_BEAT_THRESHOLD,
 			 mac->roam.configParam.HeartbeatThresh24))