Browse Source

Revert "qcacld-3.0: Set max supported BW for STA"

Revert core/mac/src/pe/lim/lim_prop_exts_utils.c done as part of
commit - 29fa4e5ac8579f61d9d0a963a221dbf0e79b7bd7.
This change is causing roaming failure and power leaks since VDEV
channel width value is read by FW.

Change-Id: I1712522d11a1ee1262c3a6d35dea3a1238812548
CRs-Fixed: 3556513
Rachit Kankane 1 year ago
parent
commit
affd0fc86e
1 changed files with 17 additions and 17 deletions
  1. 17 17
      core/mac/src/pe/lim/lim_prop_exts_utils.c

+ 17 - 17
core/mac/src/pe/lim/lim_prop_exts_utils.c

@@ -549,9 +549,10 @@ static void lim_check_peer_ldpc_and_update(struct pe_session *session,
 {}
 #endif
 
-static void lim_upgrade_ch_width(struct mac_context *mac,
-				 struct pe_session *session,
-				 uint32_t ch_freq)
+static
+void lim_update_ch_width_for_p2p_client(struct mac_context *mac,
+					struct pe_session *session,
+					uint32_t ch_freq)
 {
 	struct ch_params ch_params = {0};
 
@@ -566,13 +567,12 @@ static void lim_upgrade_ch_width(struct mac_context *mac,
 	 * Start the vdev with max supported ch_width in order to support this.
 	 * It'll be downgraded to appropriate ch_width or the same would be
 	 * continued based on assoc resp.
-	 * For P2P-CLI, BW limited to 80MHz as 80+80 is channel specific and
-	 * 160MHz is not supported.
+	 * Restricting this check for p2p client and 5G only and this may be
+	 * extended to STA based on wider testing results with multiple AP's.
+	 * Limit it to 80MHz as 80+80 is channel specific and 160MHz is not
+	 * supported in p2p.
 	 */
-	if (session->opmode == QDF_P2P_CLIENT_MODE)
-		ch_params.ch_width = CH_WIDTH_80MHZ;
-	else
-		ch_params.ch_width = wlan_mlme_get_max_bw();
+	ch_params.ch_width = CH_WIDTH_80MHZ;
 
 	wlan_reg_set_channel_params_for_pwrmode(mac->pdev, ch_freq, 0,
 						&ch_params,
@@ -586,10 +586,9 @@ static void lim_upgrade_ch_width(struct mac_context *mac,
 	session->ch_width = ch_params.ch_width;
 	session->ch_center_freq_seg0 = ch_params.center_freq_seg0;
 	session->ch_center_freq_seg1 = ch_params.center_freq_seg1;
-	pe_debug("Start mode %d ch freq %d max supported ch_width: %u cbmode: %u seg0: %u, seg1: %u",
-		 session->opmode, ch_freq, ch_params.ch_width,
-		 ch_params.sec_ch_offset, session->ch_center_freq_seg0,
-		 session->ch_center_freq_seg1);
+	pe_debug("Start P2P_CLI in ch freq %d max supported ch_width: %u cbmode: %u seg0: %u, seg1: %u",
+		 ch_freq, ch_params.ch_width, ch_params.sec_ch_offset,
+		 session->ch_center_freq_seg0, session->ch_center_freq_seg1);
 }
 
 void lim_extract_ap_capability(struct mac_context *mac_ctx, uint8_t *p_ie,
@@ -664,9 +663,11 @@ void lim_extract_ap_capability(struct mac_context *mac_ctx, uint8_t *p_ie,
 		if (!mac_ctx->mlme_cfg->vht_caps.vht_cap_info.enable_txbf_20mhz)
 			session->vht_config.su_beam_formee = 0;
 
-		if (!wlan_reg_is_24ghz_ch_freq(beacon_struct->chan_freq))
-			lim_upgrade_ch_width(mac_ctx, session,
-					     beacon_struct->chan_freq);
+		if (session->opmode == QDF_P2P_CLIENT_MODE &&
+		    !wlan_reg_is_24ghz_ch_freq(beacon_struct->chan_freq))
+			lim_update_ch_width_for_p2p_client(
+					mac_ctx, session,
+					beacon_struct->chan_freq);
 
 	} else if (session->vhtCapabilityPresentInBeacon &&
 			vht_op->chanWidth) {
@@ -887,7 +888,6 @@ void lim_extract_ap_capability(struct mac_context *mac_ctx, uint8_t *p_ie,
  * This routing provides the translation of Airgo Enum to HT enum for determining
  * secondary channel offset.
  * Airgo Enum is required for backward compatibility purposes.
- * @aniCBMode: Phy Channel bond state
  *
  *
  ***NOTE: