Parcourir la source

qcacld-3.0: Fix unnecessary logs in connect path

Fix unnecessary logs in connect path.

Change-Id: I60a5e7380eccbe0406e45da398f1f690b09ce820
CRs-Fixed: 3016952
Utkarsh Bhatnagar il y a 3 ans
Parent
commit
235135f84d

+ 1 - 1
components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h

@@ -344,7 +344,7 @@ struct rso_config {
 	struct reassoc_timer_ctx ctx;
 #endif
 	qdf_mutex_t cm_rso_lock;
-	uint8_t rsn_cap;
+	uint16_t rsn_cap;
 	uint8_t country_code[REG_ALPHA2_LEN + 1];
 	bool disable_hi_rssi;
 	bool roam_control_enable;

+ 7 - 3
components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_api.c

@@ -300,16 +300,20 @@ bool wlan_cm_roaming_in_progress(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id)
 {
 	bool roaming_in_progress = false;
 	struct wlan_objmgr_vdev *vdev;
+	enum QDF_OPMODE opmode;
 
 	vdev = wlan_objmgr_get_vdev_by_id_from_pdev(pdev, vdev_id,
 						    WLAN_MLME_CM_ID);
-	if (!vdev) {
-		mlme_err("vdev object is NULL");
+	if (!vdev)
 		return roaming_in_progress;
-	}
+
+	opmode = wlan_vdev_mlme_get_opmode(vdev);
+	if (opmode != QDF_STA_MODE && opmode != QDF_P2P_CLIENT_MODE)
+		goto exit;
 
 	roaming_in_progress = wlan_cm_is_vdev_roaming(vdev);
 
+exit:
 	wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_CM_ID);
 
 	return roaming_in_progress;

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

@@ -6359,12 +6359,17 @@ cm_update_rsn_ocv_cap(int32_t *rsn_cap,
 	uint32_t ie_len;
 	QDF_STATUS status;
 
+	/* no need to do anything if OCV is not set */
+	if (!(*rsn_cap & WLAN_CRYPTO_RSN_CAP_OCV_SUPPORTED))
+		return;
+
 	if (!rsp->connect_ies.bcn_probe_rsp.ptr ||
 	    !rsp->connect_ies.bcn_probe_rsp.len ||
 	    (rsp->connect_ies.bcn_probe_rsp.len <
 		(sizeof(struct wlan_frame_hdr) +
 		offsetof(struct wlan_bcn_frame, ie)))) {
-		sme_err("invalid beacon probe rsp");
+		sme_err("invalid beacon probe rsp len %d",
+			rsp->connect_ies.bcn_probe_rsp.len);
 		return;
 	}
 
@@ -6377,10 +6382,9 @@ cm_update_rsn_ocv_cap(int32_t *rsn_cap,
 
 	status = wlan_get_crypto_params_from_rsn_ie(&crypto_params, ie_ptr,
 						    ie_len);
-	if (QDF_IS_STATUS_ERROR(status)) {
-		sme_err("get crypto prarams from RSN IE failed");
+	if (QDF_IS_STATUS_ERROR(status))
 		return;
-	}
+
 	if (!(crypto_params.rsn_caps & WLAN_CRYPTO_RSN_CAP_OCV_SUPPORTED))
 		*rsn_cap &= ~WLAN_CRYPTO_RSN_CAP_OCV_SUPPORTED;
 }

+ 5 - 0
core/wma/src/wma_data.c

@@ -3166,9 +3166,14 @@ int wma_dp_send_delba_ind(uint8_t vdev_id, uint8_t *peer_macaddr,
 bool wma_is_roam_in_progress(uint32_t vdev_id)
 {
 	tp_wma_handle wma = cds_get_context(QDF_MODULE_ID_WMA);
+	enum QDF_OPMODE opmode;
 
 	if (!wma || !wma->interfaces[vdev_id].vdev)
 		return false;
 
+	opmode = wlan_vdev_mlme_get_opmode(wma->interfaces[vdev_id].vdev);
+	if (opmode != QDF_STA_MODE && opmode != QDF_P2P_CLIENT_MODE)
+		return false;
+
 	return wlan_cm_is_vdev_roaming(wma->interfaces[vdev_id].vdev);
 }

+ 1 - 1
core/wma/src/wma_mgmt.c

@@ -355,7 +355,7 @@ int wma_peer_sta_kickout_event_handler(void *handle, uint8_t *event,
 		      QDF_MAC_ADDR_REF(macaddr), QDF_MAC_ADDR_REF(addr),
 		      vdev_id, kickout_event->reason);
 
-	if (wlan_cm_is_vdev_roaming(vdev)) {
+	if (wma_is_roam_in_progress(vdev_id)) {
 		wma_err("vdev_id %d: Ignore STA kick out since roaming is in progress",
 			vdev_id);
 		return -EINVAL;