Procházet zdrojové kódy

qcacld-3.0: Update the scan list with correct APs

qcacld-2.0 to qcacld-3.0 propagation

In the current implementation, DUT doesn't initialize the social
channels 1, 6 and 11 and doesn't support P2P discovery in 5GHz only
mode. So we don't see any AP's on 1, 6 and 11 channels during p2p scan.

Change-Id: I317119bbbc30d44214c11076faceba8101cf835a
CRs-Fixed: 962252
Ganesh Kondabattini před 9 roky
rodič
revize
53e873e85f

+ 17 - 8
core/mac/src/pe/lim/lim_process_beacon_frame.c

@@ -143,11 +143,16 @@ lim_process_beacon_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
 				eLIM_MLM_WT_PROBE_RESP_STATE) ||
 		(mac_ctx->lim.gLimMlmState ==
 				eLIM_MLM_PASSIVE_SCAN_STATE)) {
-		lim_check_and_add_bss_description(mac_ctx, bcn_ptr,
-			rx_pkt_info,
-			((mac_ctx->lim.gLimHalScanState ==
-			      eLIM_HAL_SCANNING_STATE) ? true : false),
-			      false);
+		/* If we are scanning for P2P, only accept probe rsp */
+		if ((mac_ctx->lim.gLimHalScanState !=
+		    eLIM_HAL_SCANNING_STATE) ||
+		    (NULL == mac_ctx->lim.gpLimMlmScanReq) ||
+		    !mac_ctx->lim.gpLimMlmScanReq->p2pSearch)
+			lim_check_and_add_bss_description(mac_ctx, bcn_ptr,
+				rx_pkt_info,
+				((mac_ctx->lim.gLimHalScanState ==
+				 eLIM_HAL_SCANNING_STATE) ? true : false),
+				false);
 		/*
 		 * Calling dfsChannelList which will convert DFS channel
 		 * to active channel for x secs if this channel is DFS
@@ -237,9 +242,13 @@ lim_process_beacon_frame_no_session(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo)
 
 		if ((pMac->lim.gLimMlmState == eLIM_MLM_WT_PROBE_RESP_STATE) ||
 		    (pMac->lim.gLimMlmState == eLIM_MLM_PASSIVE_SCAN_STATE)) {
-			lim_check_and_add_bss_description(pMac, pBeacon,
-							  pRxPacketInfo, true,
-							  false);
+			/*If we are scanning for P2P, only accept probe rsp */
+			if ((pMac->lim.gLimHalScanState !=
+			    eLIM_HAL_SCANNING_STATE) ||
+			    (NULL == pMac->lim.gpLimMlmScanReq) ||
+			    !pMac->lim.gpLimMlmScanReq->p2pSearch)
+				lim_check_and_add_bss_description(pMac, pBeacon,
+					pRxPacketInfo, true, false);
 			/* Calling dfsChannelList which will convert DFS channel
 			 * to Active channel for x secs if this channel is DFS channel */
 			lim_set_dfs_channel_list(pMac, pBeacon->channelNumber,

+ 5 - 9
core/mac/src/pe/lim/lim_scan_result_utils.c

@@ -70,7 +70,7 @@
  *
  * @return None
  */
-QDF_STATUS
+void
 lim_collect_bss_description(tpAniSirGlobal pMac,
 			    tSirBssDescription *pBssDescr,
 			    tpSirProbeRespBeacon pBPR,
@@ -88,7 +88,7 @@ lim_collect_bss_description(tpAniSirGlobal pMac,
 	if (SIR_MAC_B_PR_SSID_OFFSET > WMA_GET_RX_PAYLOAD_LEN(pRxPacketInfo)) {
 		QDF_ASSERT(WMA_GET_RX_PAYLOAD_LEN(pRxPacketInfo) >=
 			   SIR_MAC_B_PR_SSID_OFFSET);
-		return QDF_STATUS_E_FAILURE;
+		return;
 	}
 	ieLen =
 		WMA_GET_RX_PAYLOAD_LEN(pRxPacketInfo) - SIR_MAC_B_PR_SSID_OFFSET;
@@ -229,7 +229,7 @@ lim_collect_bss_description(tpAniSirGlobal pMac,
 		FL("Collected BSS Description for Channel(%1d), length(%u), IE Fields(%u)"),
 		pBssDescr->channelId, pBssDescr->length, ieLen);
 
-	return QDF_STATUS_SUCCESS;
+	return;
 } /*** end lim_collect_bss_description() ***/
 
 /**
@@ -389,10 +389,8 @@ lim_check_and_add_bss_description(tpAniSirGlobal mac_ctx,
 		return;
 	}
 	/* In scan state, store scan result. */
-	status = lim_collect_bss_description(mac_ctx, bssdescr,
-					     bpr, rx_packet_info, scanning);
-	if (QDF_STATUS_SUCCESS != status)
-		goto last;
+	lim_collect_bss_description(mac_ctx, bssdescr, bpr, rx_packet_info,
+				    scanning);
 	bssdescr->fProbeRsp = fProbeRsp;
 
 	/*
@@ -406,8 +404,6 @@ lim_check_and_add_bss_description(tpAniSirGlobal mac_ctx,
 			FL("No CSR callback routine to send beacons"));
 		status = QDF_STATUS_E_INVAL;
 	}
-last:
 	qdf_mem_free(bssdescr);
-	return;
 }
 

+ 1 - 1
core/mac/src/pe/lim/lim_scan_result_utils.h

@@ -46,7 +46,7 @@ void lim_restore_pre_scan_state(tpAniSirGlobal);
 void lim_copy_scan_result(tpAniSirGlobal, uint8_t *);
 void lim_check_and_add_bss_description(tpAniSirGlobal, tpSirProbeRespBeacon,
 				       uint8_t *, bool, uint8_t);
-QDF_STATUS lim_collect_bss_description(tpAniSirGlobal pMac,
+void lim_collect_bss_description(tpAniSirGlobal pMac,
 			    tSirBssDescription *pBssDescr,
 			    tpSirProbeRespBeacon pBPR,
 			    uint8_t *pRxPacketInfo, uint8_t fScanning);