qcacmn: Skip STA scan on 6Ghz or 5ghz indoor chan if SAP is up

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

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

Change-Id: I97759f8b2c6a1c460d90fbb797a0e64d2532797c
CRs-Fixed: 3186406
This commit is contained in:
Jyoti Kumari
2022-05-04 15:22:20 +05:30
committed by Madan Koyyalamudi
parent b434bd1dc2
commit 02f2ffb93a
6 changed files with 91 additions and 0 deletions

View File

@@ -1437,6 +1437,26 @@ enum scan_mode_6ghz {
false, \
"scan allow bss with corrupted ie")
/*
* <ini>
* skip_6g_and_indoor_freq_scan - Skip scan on 6Ghz and indoor channel
* @Min: 0
* @Max: 1
* @Default: 0
*
* This ini is used to skip 6Ghz and 5Gh indoor freq for STA scan if hw is
* non-DBS and SAP is present
*
* Related: scan
*
* Usage: External
*
* <ini>
*/
#define CFG_SKIP_6GHZ_AND_INDOOR_FREQ_SCAN CFG_INI_BOOL( \
"skip_6g_and_indoor_freq_scan", \
false, \
"skip sta scan on 6Ghz and 5Ghz indoor channel")
#define CFG_SCAN_ALL \
CFG(CFG_DROP_BCN_ON_CHANNEL_MISMATCH) \
CFG(CFG_DROP_BCN_ON_INVALID_FREQ) \
@@ -1475,6 +1495,7 @@ enum scan_mode_6ghz {
CFG(CFG_6GHZ_SCAN_MODE) \
CFG(CFG_6GHZ_SCAN_MODE_DUTY_CYCLE) \
CFG(CFG_SCAN_ALLOW_BSS_WITH_CORRUPTED_IE) \
CFG(CFG_SKIP_6GHZ_AND_INDOOR_FREQ_SCAN) \
CFG_SCAN_PNO
#endif /* __CONFIG_SCAN_H */

View File

@@ -419,4 +419,13 @@ void
wlan_scan_unregister_requester(struct wlan_objmgr_psoc *psoc,
wlan_scan_requester requester);
/**
* wlan_scan_cfg_skip_6g_and_indoor_freq() - API to get 6g and indoor freq
* scan ini val
* @psoc: psoc object
*
* Return: skip 6g and indoor freq scan or not
*/
bool wlan_scan_cfg_skip_6g_and_indoor_freq(
struct wlan_objmgr_psoc *psoc);
#endif

View File

@@ -643,3 +643,13 @@ wlan_scan_unregister_requester(struct wlan_objmgr_psoc *psoc,
qdf_spin_unlock_bh(&scan->lock);
}
bool wlan_scan_cfg_skip_6g_and_indoor_freq(struct wlan_objmgr_psoc *psoc)
{
struct wlan_scan_obj *scan_obj;
scan_obj = wlan_psoc_get_scan_obj(psoc);
if (!scan_obj)
return false;
return scan_obj->scan_def.skip_6g_and_indoor_freq;
}

View File

@@ -818,6 +818,10 @@ wlan_scan_global_init(struct wlan_objmgr_psoc *psoc,
cfg_get(psoc, CFG_6GHZ_SCAN_MODE_DUTY_CYCLE);
scan_obj->allow_bss_with_incomplete_ie =
cfg_get(psoc, CFG_SCAN_ALLOW_BSS_WITH_CORRUPTED_IE);
scan_obj->scan_def.skip_6g_and_indoor_freq =
cfg_get(psoc, CFG_SKIP_6GHZ_AND_INDOOR_FREQ_SCAN);
/* init scan id seed */
qdf_atomic_init(&scan_obj->scan_ids);