mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 16:46:15 -04:00
qcacmn: Add support for SRD channels in ETSI domain
Add support for Short Range Devices 25 mW max power channels in ETSI regulatory domain. Add Short Range Devices 25 mW max power channels only if DSRC feature is disabled. Provide service apis to check SRD and DSRC channels. Change-Id: Ib2a1d7cf191d07319cb29038ad60130f5cbe7f16 CRs-Fixed: 2264790
This commit is contained in:
parent
7f6bdd3b9d
commit
aa40f60b9c
2 changed files with 22 additions and 9 deletions
|
|
@ -1800,6 +1800,7 @@ QDF_STATUS policy_mgr_get_channel_list(struct wlan_objmgr_psoc *psoc,
|
|||
uint8_t channel_list_5[QDF_MAX_NUM_CHAN] = {0};
|
||||
uint8_t sbs_channel_list[QDF_MAX_NUM_CHAN] = {0};
|
||||
bool skip_dfs_channel = false;
|
||||
bool is_etsi13_srd_chan_allowed_in_mas_mode = true;
|
||||
uint32_t i = 0, j = 0;
|
||||
struct policy_mgr_psoc_priv_obj *pm_ctx;
|
||||
bool sta_sap_scc_on_dfs_chan;
|
||||
|
|
@ -1840,12 +1841,17 @@ QDF_STATUS policy_mgr_get_channel_list(struct wlan_objmgr_psoc *psoc,
|
|||
sta_sap_scc_on_dfs_chan =
|
||||
policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan(psoc);
|
||||
policy_mgr_debug("sta_sap_scc_on_dfs_chan %u", sta_sap_scc_on_dfs_chan);
|
||||
if ((((mode == PM_SAP_MODE) || (mode == PM_P2P_GO_MODE)) &&
|
||||
(policy_mgr_mode_specific_connection_count(
|
||||
psoc, PM_STA_MODE, NULL) > 0)) ||
|
||||
!sta_sap_scc_on_dfs_chan) {
|
||||
policy_mgr_debug("STA present, skip DFS channels from pcl for SAP/Go");
|
||||
skip_dfs_channel = true;
|
||||
if ((mode == PM_SAP_MODE) || (mode == PM_P2P_GO_MODE)) {
|
||||
if ((policy_mgr_mode_specific_connection_count(psoc,
|
||||
PM_STA_MODE,
|
||||
NULL) > 0) ||
|
||||
!sta_sap_scc_on_dfs_chan) {
|
||||
policy_mgr_debug("skip DFS ch from pcl for SAP/Go");
|
||||
skip_dfs_channel = true;
|
||||
}
|
||||
is_etsi13_srd_chan_allowed_in_mas_mode =
|
||||
wlan_reg_is_etsi13_srd_chan_allowed_master_mode(pm_ctx->
|
||||
pdev);
|
||||
}
|
||||
|
||||
/* Let's divide the list in 2.4 & 5 Ghz lists */
|
||||
|
|
@ -1878,6 +1884,12 @@ QDF_STATUS policy_mgr_get_channel_list(struct wlan_objmgr_psoc *psoc,
|
|||
chan_index++;
|
||||
continue;
|
||||
}
|
||||
if (!is_etsi13_srd_chan_allowed_in_mas_mode &&
|
||||
wlan_reg_is_etsi13_srd_chan(pm_ctx->pdev,
|
||||
channel_list[chan_index])) {
|
||||
chan_index++;
|
||||
continue;
|
||||
}
|
||||
channel_list_5[chan_index_5++] = channel_list[chan_index++];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1391,13 +1391,14 @@ policy_mgr_get_nondfs_preferred_channel(struct wlan_objmgr_psoc *psoc,
|
|||
}
|
||||
|
||||
static void policy_mgr_remove_dsrc_channels(uint8_t *chan_list,
|
||||
uint32_t *num_channels)
|
||||
uint32_t *num_channels,
|
||||
struct wlan_objmgr_pdev *pdev)
|
||||
{
|
||||
uint32_t num_chan_temp = 0;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < *num_channels; i++) {
|
||||
if (!wlan_is_dsrc_channel(wlan_chan_to_freq(chan_list[i]))) {
|
||||
if (!wlan_reg_is_dsrc_chan(pdev, chan_list[i])) {
|
||||
chan_list[num_chan_temp] = chan_list[i];
|
||||
num_chan_temp++;
|
||||
}
|
||||
|
|
@ -1434,7 +1435,7 @@ QDF_STATUS policy_mgr_get_valid_chans(struct wlan_objmgr_psoc *psoc,
|
|||
return status;
|
||||
}
|
||||
|
||||
policy_mgr_remove_dsrc_channels(chan_list, list_len);
|
||||
policy_mgr_remove_dsrc_channels(chan_list, list_len, pm_ctx->pdev);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue