|
@@ -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.
|
|
|
*/
|