Преглед изворни кода

qcacld-3.0: Reject connection if channel not ok for DNBS

Reject connection in csr_roam_connect(), if the BSS entry selected
from the driver cached scan results, has a channel which is not OK for
Do_Not_Break_Stream.

Change-Id: Icf725361382bff7dad80138cfc1b51bafa548afa
CRs-Fixed: 2064380
Ajit Pal Singh пре 7 година
родитељ
комит
64aff0c8a9
1 измењених фајлова са 19 додато и 0 уклоњено
  1. 19 0
      core/sme/src/csr/csr_api_roam.c

+ 19 - 0
core/sme/src/csr/csr_api_roam.c

@@ -8012,8 +8012,27 @@ QDF_STATUS csr_roam_connect(tpAniSirGlobal pMac, uint32_t sessionId,
 		/* check if set hw mode needs to be done */
 		if ((pScanFilter->csrPersona == QDF_STA_MODE) ||
 			 (pScanFilter->csrPersona == QDF_P2P_CLIENT_MODE)) {
+			bool ok;
+
 			csr_get_bssdescr_from_scan_handle(hBSSList,
 					first_ap_profile);
+			status = policy_mgr_is_chan_ok_for_dnbs(pMac->psoc,
+					first_ap_profile->channelId, &ok);
+			if (QDF_IS_STATUS_ERROR(status)) {
+				sme_debug("policy_mgr_is_chan_ok_for_dnbs():error:%d",
+					  status);
+				csr_scan_result_purge(pMac, hBSSList);
+				fCallCallback = true;
+				goto error;
+			}
+			if (!ok) {
+				sme_debug("chan:%d not ok for DNBS",
+						first_ap_profile->channelId);
+				csr_scan_result_purge(pMac, hBSSList);
+				fCallCallback = true;
+				status = QDF_STATUS_E_INVAL;
+				goto error;
+			}
 			status = policy_mgr_handle_conc_multiport(pMac->psoc,
 					sessionId, first_ap_profile->channelId);
 			if ((QDF_IS_STATUS_SUCCESS(status)) &&