Browse Source

qcacld-3.0: Revert "Fix channel width mismatch in ROAM SYNC"

This reverts commit I784e4b1735f4f217713f65c30092bac2ad6cb698.
Some AP reports HT20 in beacon frame but HT40 in assoc response
frame. FW roaming will decide BW HT40 based on assoc response.
In previous change host will decide BW based on assoc response
as FW does. But the issue is after roaming, the host will check
beacon for AP BW changing and then do vdev restart. But the vdev
restart may be rejected by FW if the FW roaming is still in
progress. To avoid the complication, revert the change.
The original issue will be fixed by validation the channel
segment by Ia41c51feca855cab54e908438c51a8d12075f864 to avoid
the kernel check channel failure and disconnect.

Change-Id: Ib170acb3588cf07bf666d446f5dde73de2d4705b
CRs-Fixed: 3061233
Liangwei Dong 3 năm trước cách đây
mục cha
commit
196f2b9062

+ 4 - 9
core/mac/src/pe/include/lim_ft.h

@@ -140,15 +140,13 @@ void lim_fill_ft_session(struct mac_context *mac,
 		struct bss_description *pbssDescription,
 		struct bss_description *pbssDescription,
 		struct pe_session *ft_session,
 		struct pe_session *ft_session,
 		struct pe_session *pe_session,
 		struct pe_session *pe_session,
-		enum wlan_phymode bss_phymode,
-		tpSirAssocRsp assoc_rsp);
+		enum wlan_phymode bss_phymode);
 
 
 /**
 /**
  * lim_ft_prepare_add_bss_req() - Create Add Bss Req to the new AP
  * lim_ft_prepare_add_bss_req() - Create Add Bss Req to the new AP
  * @mac: Global MAC context
  * @mac: Global MAC context
  * @add_bss_params: Bss params including rsp data
  * @add_bss_params: Bss params including rsp data
  * @pe_session: PE Session
  * @pe_session: PE Session
- * @assoc_rsp: assoc response from ap
  *
  *
  * This will be used when we are ready to FT to the new AP.
  * This will be used when we are ready to FT to the new AP.
  * The newly created ft Session entry is passed to this function
  * The newly created ft Session entry is passed to this function
@@ -157,8 +155,7 @@ void lim_fill_ft_session(struct mac_context *mac,
  */
  */
 void lim_ft_prepare_add_bss_req(struct mac_context *mac,
 void lim_ft_prepare_add_bss_req(struct mac_context *mac,
 				struct pe_session *ft_session,
 				struct pe_session *ft_session,
-				struct bss_description *bssDescription,
-				tpSirAssocRsp assoc_rsp);
+				struct bss_description *bssDescription);
 
 
 QDF_STATUS lim_send_preauth_scan_offload(struct mac_context *mac_ctx,
 QDF_STATUS lim_send_preauth_scan_offload(struct mac_context *mac_ctx,
 		struct pe_session *session_entry, tSirFTPreAuthReq *ft_preauth_req);
 		struct pe_session *session_entry, tSirFTPreAuthReq *ft_preauth_req);
@@ -167,13 +164,11 @@ static inline void lim_fill_ft_session(struct mac_context *mac,
 		struct bss_description *pbssDescription,
 		struct bss_description *pbssDescription,
 		struct pe_session *ft_session,
 		struct pe_session *ft_session,
 		struct pe_session *pe_session,
 		struct pe_session *pe_session,
-		enum wlan_phymode bss_phymode,
-		tpSirAssocRsp assoc_rsp)
+		enum wlan_phymode bss_phymode)
 {}
 {}
 static inline void lim_ft_prepare_add_bss_req(struct mac_context *mac,
 static inline void lim_ft_prepare_add_bss_req(struct mac_context *mac,
 		struct pe_session *ft_session,
 		struct pe_session *ft_session,
-		struct bss_description *bssDescription,
-		tpSirAssocRsp assoc_rsp)
+		struct bss_description *bssDescription)
 {}
 {}
 #endif
 #endif
 
 

+ 2 - 69
core/mac/src/pe/lim/lim_api.c

@@ -2459,64 +2459,6 @@ lim_check_ft_initial_im_association(struct roam_offload_synch_ind *roam_synch,
 	}
 	}
 }
 }
 
 
-/**
- * lim_get_assoc_resp_from_roam_sync() - get assoc response from
- * roam sync event
- * @mac_ctx: mac context
- * @session: pe session
- * @roam_sync_ind_ptr: roam sync indication
- *
- * This function is to get parsed assoc response data
- *
- * Return: assoc response data struct
- */
-static tpSirAssocRsp
-lim_get_assoc_resp_from_roam_sync(
-		struct mac_context *mac_ctx,
-		struct pe_session *session,
-		struct roam_offload_synch_ind *roam_sync_ind_ptr)
-{
-	uint8_t *reassoc_resp;
-	tpSirAssocRsp assoc_rsp;
-	uint32_t frame_len;
-	uint8_t *frm_body;
-
-	if (roam_sync_ind_ptr->reassocRespLength <= SIR_MAC_HDR_LEN_3A) {
-		pe_warn("invalid roam sync assoc rsp");
-		return NULL;
-	}
-	reassoc_resp = (uint8_t *)roam_sync_ind_ptr +
-			roam_sync_ind_ptr->reassocRespOffset +
-			SIR_MAC_HDR_LEN_3A;
-	frame_len = roam_sync_ind_ptr->reassocRespLength - SIR_MAC_HDR_LEN_3A;
-
-	assoc_rsp = qdf_mem_malloc(sizeof(*assoc_rsp));
-	if (!assoc_rsp) {
-		pe_warn("err to malloc assoc rsp");
-		return NULL;
-	}
-
-	frm_body = qdf_mem_malloc(frame_len);
-	if (!frm_body) {
-		pe_warn("err to malloc assoc rsp body");
-		qdf_mem_free(assoc_rsp);
-		return NULL;
-	}
-	qdf_mem_copy(frm_body, reassoc_resp, frame_len);
-	/* parse Re/Association Response frame. */
-	if (sir_convert_assoc_resp_frame2_struct(
-		mac_ctx, session, frm_body,
-		frame_len, assoc_rsp) == QDF_STATUS_E_FAILURE) {
-		pe_err("Parse error Assoc resp length: %d", frame_len);
-		qdf_mem_free(frm_body);
-		qdf_mem_free(assoc_rsp);
-		return NULL;
-	}
-	qdf_mem_free(frm_body);
-
-	return assoc_rsp;
-}
-
 QDF_STATUS
 QDF_STATUS
 pe_roam_synch_callback(struct mac_context *mac_ctx,
 pe_roam_synch_callback(struct mac_context *mac_ctx,
 		       struct roam_offload_synch_ind *roam_sync_ind_ptr,
 		       struct roam_offload_synch_ind *roam_sync_ind_ptr,
@@ -2533,7 +2475,6 @@ pe_roam_synch_callback(struct mac_context *mac_ctx,
 	QDF_STATUS status = QDF_STATUS_E_FAILURE;
 	QDF_STATUS status = QDF_STATUS_E_FAILURE;
 	struct bss_description *bss_desc = NULL;
 	struct bss_description *bss_desc = NULL;
 	uint16_t ric_tspec_len;
 	uint16_t ric_tspec_len;
-	tpSirAssocRsp assoc_rsp;
 
 
 	if (!roam_sync_ind_ptr) {
 	if (!roam_sync_ind_ptr) {
 		pe_err("LFR3:roam_sync_ind_ptr is NULL");
 		pe_err("LFR3:roam_sync_ind_ptr is NULL");
@@ -2632,11 +2573,8 @@ pe_roam_synch_callback(struct mac_context *mac_ctx,
 	ft_session_ptr->csaOffloadEnable = session_ptr->csaOffloadEnable;
 	ft_session_ptr->csaOffloadEnable = session_ptr->csaOffloadEnable;
 
 
 	/* Next routine will update nss and vdev_nss with AP's capabilities */
 	/* Next routine will update nss and vdev_nss with AP's capabilities */
-	assoc_rsp = lim_get_assoc_resp_from_roam_sync(
-			mac_ctx, ft_session_ptr, roam_sync_ind_ptr);
 	lim_fill_ft_session(mac_ctx, bss_desc, ft_session_ptr,
 	lim_fill_ft_session(mac_ctx, bss_desc, ft_session_ptr,
-			    session_ptr, roam_sync_ind_ptr->phy_mode,
-			    assoc_rsp);
+			    session_ptr, roam_sync_ind_ptr->phy_mode);
 	roam_sync_ind_ptr->ssid.length =
 	roam_sync_ind_ptr->ssid.length =
 		qdf_min((qdf_size_t)ft_session_ptr->ssId.length,
 		qdf_min((qdf_size_t)ft_session_ptr->ssId.length,
 			sizeof(roam_sync_ind_ptr->ssid.ssid));
 			sizeof(roam_sync_ind_ptr->ssid.ssid));
@@ -2645,8 +2583,7 @@ pe_roam_synch_callback(struct mac_context *mac_ctx,
 	pe_set_rmf_caps(mac_ctx, ft_session_ptr, roam_sync_ind_ptr);
 	pe_set_rmf_caps(mac_ctx, ft_session_ptr, roam_sync_ind_ptr);
 	/* Next routine may update nss based on dot11Mode */
 	/* Next routine may update nss based on dot11Mode */
 
 
-	lim_ft_prepare_add_bss_req(mac_ctx, ft_session_ptr, bss_desc,
-				   assoc_rsp);
+	lim_ft_prepare_add_bss_req(mac_ctx, ft_session_ptr, bss_desc);
 	qdf_mem_free(bss_desc);
 	qdf_mem_free(bss_desc);
 
 
 	if (session_ptr->is11Rconnection)
 	if (session_ptr->is11Rconnection)
@@ -2661,7 +2598,6 @@ pe_roam_synch_callback(struct mac_context *mac_ctx,
 	if (!curr_sta_ds) {
 	if (!curr_sta_ds) {
 		pe_err("LFR3:failed to lookup hash entry");
 		pe_err("LFR3:failed to lookup hash entry");
 		ft_session_ptr->bRoamSynchInProgress = false;
 		ft_session_ptr->bRoamSynchInProgress = false;
-		qdf_mem_free(assoc_rsp);
 		return status;
 		return status;
 	}
 	}
 	session_ptr->limSmeState = eLIM_SME_IDLE_STATE;
 	session_ptr->limSmeState = eLIM_SME_IDLE_STATE;
@@ -2679,7 +2615,6 @@ pe_roam_synch_callback(struct mac_context *mac_ctx,
 		pe_err("LFR3:failed to add hash entry for "QDF_MAC_ADDR_FMT,
 		pe_err("LFR3:failed to add hash entry for "QDF_MAC_ADDR_FMT,
 		       QDF_MAC_ADDR_REF(add_bss_params->staContext.staMac));
 		       QDF_MAC_ADDR_REF(add_bss_params->staContext.staMac));
 		ft_session_ptr->bRoamSynchInProgress = false;
 		ft_session_ptr->bRoamSynchInProgress = false;
-		qdf_mem_free(assoc_rsp);
 		return status;
 		return status;
 	}
 	}
 
 
@@ -2718,7 +2653,6 @@ pe_roam_synch_callback(struct mac_context *mac_ctx,
 				qdf_mem_malloc(ric_tspec_len);
 				qdf_mem_malloc(ric_tspec_len);
 		if (!roam_sync_ind_ptr->ric_tspec_data) {
 		if (!roam_sync_ind_ptr->ric_tspec_data) {
 			ft_session_ptr->bRoamSynchInProgress = false;
 			ft_session_ptr->bRoamSynchInProgress = false;
-			qdf_mem_free(assoc_rsp);
 			return QDF_STATUS_E_NOMEM;
 			return QDF_STATUS_E_NOMEM;
 		}
 		}
 
 
@@ -2751,7 +2685,6 @@ pe_roam_synch_callback(struct mac_context *mac_ctx,
 	ft_session_ptr->limSmeState = eLIM_SME_LINK_EST_STATE;
 	ft_session_ptr->limSmeState = eLIM_SME_LINK_EST_STATE;
 	ft_session_ptr->limPrevSmeState = ft_session_ptr->limSmeState;
 	ft_session_ptr->limPrevSmeState = ft_session_ptr->limSmeState;
 	ft_session_ptr->bRoamSynchInProgress = false;
 	ft_session_ptr->bRoamSynchInProgress = false;
-	qdf_mem_free(assoc_rsp);
 
 
 	return QDF_STATUS_SUCCESS;
 	return QDF_STATUS_SUCCESS;
 }
 }

+ 2 - 42
core/mac/src/pe/lim/lim_ft.c

@@ -114,8 +114,7 @@ void lim_ft_cleanup(struct mac_context *mac, struct pe_session *pe_session)
  *------------------------------------------------------------------*/
  *------------------------------------------------------------------*/
 void lim_ft_prepare_add_bss_req(struct mac_context *mac,
 void lim_ft_prepare_add_bss_req(struct mac_context *mac,
 		struct pe_session *ft_session,
 		struct pe_session *ft_session,
-		struct bss_description *bssDescription,
-		tpSirAssocRsp assoc_rsp)
+		struct bss_description *bssDescription)
 {
 {
 	struct bss_params *pAddBssParams = NULL;
 	struct bss_params *pAddBssParams = NULL;
 	tAddStaParams *sta_ctx;
 	tAddStaParams *sta_ctx;
@@ -163,25 +162,6 @@ void lim_ft_prepare_add_bss_req(struct mac_context *mac,
 	pAddBssParams->llbCoexist =
 	pAddBssParams->llbCoexist =
 		(uint8_t) ft_session->beaconParams.llbCoexist;
 		(uint8_t) ft_session->beaconParams.llbCoexist;
 	pAddBssParams->rmfEnabled = ft_session->limRmfEnabled;
 	pAddBssParams->rmfEnabled = ft_session->limRmfEnabled;
-	if (assoc_rsp &&
-	    ft_session->htCapability && pBeaconStruct->HTCaps.present &&
-	    assoc_rsp->HTCaps.present) {
-		/* Some AP have different HT ch width setting in
-		 * beacon/assoc resp. FW uses assoc response to decide
-		 * the bw of HT AP in Roaming sync.
-		 * Here overwrite beacon HT bw setting from assoc
-		 * resp frame to keep sync with FW.
-		 */
-		pBeaconStruct->HTCaps.supportedChannelWidthSet =
-			assoc_rsp->HTCaps.supportedChannelWidthSet;
-		if (pBeaconStruct->HTInfo.present &&
-		    assoc_rsp->HTInfo.present) {
-			pBeaconStruct->HTInfo.secondaryChannelOffset =
-			assoc_rsp->HTInfo.secondaryChannelOffset;
-			pBeaconStruct->HTInfo.recommendedTxWidthSet =
-			assoc_rsp->HTInfo.recommendedTxWidthSet;
-		}
-	}
 
 
 	/* Use the advertised capabilities from the received beacon/PR */
 	/* Use the advertised capabilities from the received beacon/PR */
 	if (IS_DOT11_MODE_HT(ft_session->dot11mode) &&
 	if (IS_DOT11_MODE_HT(ft_session->dot11mode) &&
@@ -534,8 +514,7 @@ void lim_fill_ft_session(struct mac_context *mac,
 			 struct bss_description *pbssDescription,
 			 struct bss_description *pbssDescription,
 			 struct pe_session *ft_session,
 			 struct pe_session *ft_session,
 			 struct pe_session *pe_session,
 			 struct pe_session *pe_session,
-			 enum wlan_phymode bss_phymode,
-			 tpSirAssocRsp assoc_rsp)
+			 enum wlan_phymode bss_phymode)
 {
 {
 	uint8_t currentBssUapsd;
 	uint8_t currentBssUapsd;
 	uint8_t bss_chan_id;
 	uint8_t bss_chan_id;
@@ -600,25 +579,6 @@ void lim_fill_ft_session(struct mac_context *mac,
 	ft_session->htCapability =
 	ft_session->htCapability =
 		(IS_DOT11_MODE_HT(ft_session->dot11mode)
 		(IS_DOT11_MODE_HT(ft_session->dot11mode)
 		 && pBeaconStruct->HTCaps.present);
 		 && pBeaconStruct->HTCaps.present);
-	if (assoc_rsp &&
-	    ft_session->htCapability && pBeaconStruct->HTCaps.present &&
-	    assoc_rsp->HTCaps.present) {
-		/* Some AP have different HT ch width setting in
-		 * beacon/assoc resp. FW uses assoc response to decide
-		 * the bw of HT AP in Roaming sync.
-		 * Here overwrite beacon HT bw setting from assoc
-		 * resp frame to keep sync with FW.
-		 */
-		pBeaconStruct->HTCaps.supportedChannelWidthSet =
-			assoc_rsp->HTCaps.supportedChannelWidthSet;
-		if (pBeaconStruct->HTInfo.present &&
-		    assoc_rsp->HTInfo.present) {
-			pBeaconStruct->HTInfo.secondaryChannelOffset =
-			assoc_rsp->HTInfo.secondaryChannelOffset;
-			pBeaconStruct->HTInfo.recommendedTxWidthSet =
-			assoc_rsp->HTInfo.recommendedTxWidthSet;
-		}
-	}
 
 
 	if (IS_DOT11_MODE_HE(ft_session->dot11mode) &&
 	if (IS_DOT11_MODE_HE(ft_session->dot11mode) &&
 	    pBeaconStruct->he_cap.present)
 	    pBeaconStruct->he_cap.present)

+ 2 - 2
core/mac/src/pe/lim/lim_ft_preauth.c

@@ -338,9 +338,9 @@ QDF_STATUS lim_ft_setup_auth_session(struct mac_context *mac,
 	if (req && req->pbssDescription) {
 	if (req && req->pbssDescription) {
 		lim_fill_ft_session(mac,
 		lim_fill_ft_session(mac,
 				    req->pbssDescription, ft_session,
 				    req->pbssDescription, ft_session,
-				    pe_session, WLAN_PHYMODE_AUTO, NULL);
+				    pe_session, WLAN_PHYMODE_AUTO);
 		lim_ft_prepare_add_bss_req(mac, ft_session,
 		lim_ft_prepare_add_bss_req(mac, ft_session,
-					   req->pbssDescription, NULL);
+					   req->pbssDescription);
 	}
 	}
 
 
 	return QDF_STATUS_SUCCESS;
 	return QDF_STATUS_SUCCESS;