瀏覽代碼

qcacld-3.0: Properly update Power cap IE to FW for LFR3 roaming

Currently, driver updates FW assoc IE's to be used for LFR3 roaming
and is not checking the supported max tx power before updating the
same to FW resulting in different max tx power values in reasssoc
and assoc requests.

For Power cap IE, check and set the max tx power properly if halphy
provided max tx power exceeds the supported value, while updating
the same to FW for LFR3 roaming.

Change-Id: Idec518245963a92da8ee2ba8c509c7248a298901
CRs-Fixed: 2042674
Selvaraj, Sridhar 8 年之前
父節點
當前提交
94be8ba8a9
共有 1 個文件被更改,包括 8 次插入1 次删除
  1. 8 1
      core/sme/src/csr/csr_api_roam.c

+ 8 - 1
core/sme/src/csr/csr_api_roam.c

@@ -14585,6 +14585,10 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId,
 		 * We need the power capabilities for Assoc Req.
 		 * This macro is provided by the halPhyCfg.h. We pick our
 		 * max and min capability by the halPhy provided macros
+		 * Any change in this power cap IE should also be done
+		 * in csr_update_driver_assoc_ies() which would send
+		 * assoc IE's to FW which is used for LFR3 roaming
+		 * ie. used in reassociation requests from FW.
 		 */
 		pwrLimit = csr_get_cfg_max_tx_power(pMac,
 					pBssDescription->channelId);
@@ -17628,8 +17632,11 @@ static void csr_update_driver_assoc_ies(tpAniSirGlobal mac_ctx,
 	if (session->pConnectBssDesc)
 		max_tx_pwr_cap = csr_get_cfg_max_tx_power(mac_ctx,
 				session->pConnectBssDesc->channelId);
-	if (max_tx_pwr_cap)
+
+	if (max_tx_pwr_cap && max_tx_pwr_cap < MAX_TX_PWR_CAP)
 		power_cap_ie_data[1] = max_tx_pwr_cap;
+	else
+		power_cap_ie_data[1] = MAX_TX_PWR_CAP;
 
 	wlan_cfg_get_int(mac_ctx, WNI_CFG_11H_ENABLED, &csr_11henable);