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

qcacld-3.0: Skip STA connect on 6G or 5G indoor chan if SAP is up

Currently STA can scan and come up on 6Ghz or 5Ghz indoor channel
if hardware is non-dbs and SAP is present

As part of this change, do not allow STA to connect on 6Ghz and
5Ghz indoor channel for non-dbs hardware if SAP is present

Change-Id: I48ed8483225e35d8b898b0325eee398f74e41c97
CRs-Fixed: 3196247
Jyoti Kumari пре 2 година
родитељ
комит
eafa02c574
1 измењених фајлова са 19 додато и 0 уклоњено
  1. 19 0
      components/cmn_services/interface_mgr/src/wlan_if_mgr_roam.c

+ 19 - 0
components/cmn_services/interface_mgr/src/wlan_if_mgr_roam.c

@@ -34,6 +34,7 @@
 #include "wni_api.h"
 #include "wlan_mlme_vdev_mgr_interface.h"
 #include "wlan_cm_api.h"
+#include "wlan_scan_api.h"
 
 static void if_mgr_enable_roaming_on_vdev(struct wlan_objmgr_pdev *pdev,
 					  void *object, void *arg)
@@ -766,6 +767,24 @@ QDF_STATUS if_mgr_validate_candidate(struct wlan_objmgr_vdev *vdev,
 	if (!psoc)
 		return QDF_STATUS_E_FAILURE;
 
+	/*
+	 * Do not allow STA to connect on 6Ghz or indoor channel for non dbs
+	 * hardware if SAP and skip_6g_and_indoor_freq_scan ini are present
+	 */
+	if (wlan_scan_cfg_skip_6g_and_indoor_freq(psoc) &&
+	    !policy_mgr_is_hw_dbs_capable(psoc) &&
+	    (WLAN_REG_IS_6GHZ_CHAN_FREQ(chan_freq) ||
+	    wlan_reg_is_freq_indoor(pdev, chan_freq)) &&
+	    op_mode == QDF_STA_MODE &&
+	    policy_mgr_mode_specific_connection_count(
+				psoc, PM_SAP_MODE, NULL)) {
+		ifmgr_debug("STA connection not allowed on bssid: "QDF_MAC_ADDR_FMT" with freq: %d (6Ghz or indoor(%d)), as SAP is present",
+			    QDF_MAC_ADDR_REF(candidate_info->peer_addr.bytes),
+			    chan_freq,
+			    wlan_reg_is_freq_indoor(pdev, chan_freq));
+		return QDF_STATUS_E_INVAL;
+	}
+
 	/*
 	 * Ignore the BSS if any other vdev is already connected to it.
 	 */