qcacld-3.0: Support P2P GO on indoor channels

Add a new ini "p2p_go_in_indoor_chan" to enable support
for p2p go operation on indoor channels.

Do not allow standalone SAP on indoor channels if the
SAP indoor channel support is not enabled.

Change-Id: I2e6220ebcefe09b4ad5de496c36879ef048cb5b8
CRs-Fixed: 3405597
This commit is contained in:
Surya Prakash Sivaraj
2023-02-20 21:58:38 +05:30
committed by Madan Koyyalamudi
parent 6588df93b1
commit 534c627cea
11 changed files with 172 additions and 72 deletions

View File

@@ -3731,22 +3731,6 @@ QDF_STATUS policy_mgr_valid_sap_conc_channel_check(
uint32_t sap_ch_freq, uint8_t sap_vdev_id, uint32_t sap_ch_freq, uint8_t sap_vdev_id,
struct ch_params *ch_params); struct ch_params *ch_params);
/**
* policy_mgr_sap_allowed_on_indoor_freq() - Check whether STA+SAP concurrency
* allowed on indoor channel or not
* @psoc: pointer to PSOC object information
* @pdev: pointer to PDEV object information
* @sap_ch_freq: initial channel frequency for SAP
*
* This function checks whether SAP is allowed to turn on in case of STA+SAP
* concurrency if STA is on indoor channel.
*
* Return: false if SAP not allowed to come up on a indoor channel
*/
bool policy_mgr_sap_allowed_on_indoor_freq(struct wlan_objmgr_psoc *psoc,
struct wlan_objmgr_pdev *pdev,
uint32_t sap_ch_freq);
/** /**
* policy_mgr_get_alternate_channel_for_sap() - Get an alternate * policy_mgr_get_alternate_channel_for_sap() - Get an alternate
* channel to move the SAP to * channel to move the SAP to
@@ -4865,4 +4849,18 @@ policy_mgr_is_conc_sap_present_on_sta_freq(struct wlan_objmgr_psoc *psoc,
* Return: number of active connection on the specific frequency * Return: number of active connection on the specific frequency
*/ */
uint32_t policy_mgr_get_connection_count_with_ch_freq(uint32_t ch_freq); uint32_t policy_mgr_get_connection_count_with_ch_freq(uint32_t ch_freq);
/**
* policy_mgr_is_sap_allowed_on_indoor() - Check if the SAP operation
* is allowed in the indoor channel
*
* @pdev: pointer to pdev
* @vdev_id: vdev id
* @ch_freq: SAP frequency
*
* Return: is SAP allowed
*/
bool policy_mgr_is_sap_allowed_on_indoor(struct wlan_objmgr_pdev *pdev,
uint8_t vdev_id, qdf_freq_t ch_freq);
#endif /* __WLAN_POLICY_MGR_API_H */ #endif /* __WLAN_POLICY_MGR_API_H */

View File

@@ -1632,8 +1632,6 @@ bool policy_mgr_is_sap_restart_required_after_sta_disconnect(
policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan(psoc); policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan(psoc);
bool sta_sap_scc_on_lte_coex_chan = bool sta_sap_scc_on_lte_coex_chan =
policy_mgr_sta_sap_scc_on_lte_coex_chan(psoc); policy_mgr_sta_sap_scc_on_lte_coex_chan(psoc);
bool sta_sap_scc_on_indoor_channel =
policy_mgr_get_sta_sap_scc_allowed_on_indoor_chnl(psoc);
uint8_t sta_sap_scc_on_dfs_chnl_config_value = 0; uint8_t sta_sap_scc_on_dfs_chnl_config_value = 0;
uint32_t cc_count, i, go_index_start, pcl_len = 0; uint32_t cc_count, i, go_index_start, pcl_len = 0;
uint32_t op_ch_freq_list[MAX_NUMBER_OF_CONC_CONNECTIONS * 2]; uint32_t op_ch_freq_list[MAX_NUMBER_OF_CONC_CONNECTIONS * 2];
@@ -1725,11 +1723,10 @@ bool policy_mgr_is_sap_restart_required_after_sta_disconnect(
* 2. The frequency is not allowed in the indoor * 2. The frequency is not allowed in the indoor
* channel. * channel.
*/ */
if (!policy_mgr_sap_allowed_on_indoor_freq( if (pm_ctx->last_disconn_sta_freq == op_ch_freq_list[i] &&
pm_ctx->psoc, pm_ctx->pdev, op_ch_freq_list[i]) && !policy_mgr_is_sap_allowed_on_indoor(pm_ctx->pdev,
sta_sap_scc_on_indoor_channel && sap_vdev_id,
wlan_reg_is_freq_indoor(pm_ctx->pdev, op_ch_freq_list[i]) && op_ch_freq_list[i])) {
pm_ctx->last_disconn_sta_freq == op_ch_freq_list[i]) {
curr_sap_freq = op_ch_freq_list[i]; curr_sap_freq = op_ch_freq_list[i];
policy_mgr_debug("indoor sap_ch_freq %u", policy_mgr_debug("indoor sap_ch_freq %u",
curr_sap_freq); curr_sap_freq);
@@ -1776,17 +1773,17 @@ bool policy_mgr_is_sap_restart_required_after_sta_disconnect(
wlan_reg_is_dfs_for_freq(pm_ctx->pdev, pcl_channels[i])) wlan_reg_is_dfs_for_freq(pm_ctx->pdev, pcl_channels[i]))
continue; continue;
/* SAP moved to 2G, due to STA on DFS or Indoor where /* SAP moved to 2.4 GHz, due to STA on DFS or Indoor where
* concurrency is not allowed, now that there is no * concurrency is not allowed, now that there is no
* STA/GC in 5G band, move 2.g SAP to 5G band if SAP * STA/GC in 5 GHz band, move 2.4 GHz SAP to 5 GHz band if SAP
* was initially started on 5G band. * was initially started on 5 GHz band.
* Checking again here as pcl_channels[0] could be * Checking again here as pcl_channels[0] could be
* on indoor which is not removed in policy_mgr_get_pcl * on indoor which is not removed in policy_mgr_get_pcl
*/ */
if (!sta_gc_present && if (!sta_gc_present &&
!policy_mgr_sap_allowed_on_indoor_freq(pm_ctx->psoc, !policy_mgr_is_sap_allowed_on_indoor(pm_ctx->pdev,
pm_ctx->pdev, sap_vdev_id,
pcl_channels[i])) { pcl_channels[i])) {
policy_mgr_debug("Do not allow SAP on indoor frequency, STA is absent"); policy_mgr_debug("Do not allow SAP on indoor frequency, STA is absent");
continue; continue;
} }
@@ -2521,23 +2518,6 @@ static bool policy_mgr_get_srd_enable_for_vdev(
return enable_srd_channel; return enable_srd_channel;
} }
bool policy_mgr_sap_allowed_on_indoor_freq(struct wlan_objmgr_psoc *psoc,
struct wlan_objmgr_pdev *pdev,
uint32_t sap_ch_freq)
{
bool include_indoor_channel = 0;
ucfg_mlme_get_indoor_channel_support(psoc, &include_indoor_channel);
if (!include_indoor_channel &&
wlan_reg_is_freq_indoor(pdev, sap_ch_freq)) {
policy_mgr_debug("No more operation on indoor channel");
return false;
}
return true;
}
QDF_STATUS QDF_STATUS
policy_mgr_valid_sap_conc_channel_check(struct wlan_objmgr_psoc *psoc, policy_mgr_valid_sap_conc_channel_check(struct wlan_objmgr_psoc *psoc,
uint32_t *con_ch_freq, uint32_t *con_ch_freq,
@@ -2642,10 +2622,9 @@ policy_mgr_valid_sap_conc_channel_check(struct wlan_objmgr_psoc *psoc,
find_alternate = true; find_alternate = true;
policymgr_nofl_debug("sap not capable on SRD con ch_freq %d", policymgr_nofl_debug("sap not capable on SRD con ch_freq %d",
ch_freq); ch_freq);
} else if (!policy_mgr_sap_allowed_on_indoor_freq(psoc, pm_ctx->pdev, } else if (!policy_mgr_is_sap_allowed_on_indoor(pm_ctx->pdev,
ch_freq) && sap_vdev_id,
!(is_sta_sap_scc && sta_sap_scc_on_indoor_channel && ch_freq)) {
wlan_reg_is_freq_indoor(pm_ctx->pdev, ch_freq))) {
policymgr_nofl_debug("sap not capable on indoor con ch_freq %d is_sta_sap_scc:%d", policymgr_nofl_debug("sap not capable on indoor con ch_freq %d is_sta_sap_scc:%d",
ch_freq, is_sta_sap_scc); ch_freq, is_sta_sap_scc);
find_alternate = true; find_alternate = true;

View File

@@ -44,6 +44,7 @@
#include "wlan_cm_ucfg_api.h" #include "wlan_cm_ucfg_api.h"
#include "wlan_cm_roam_api.h" #include "wlan_cm_roam_api.h"
#include "wlan_mlme_ucfg_api.h" #include "wlan_mlme_ucfg_api.h"
#include "wlan_p2p_ucfg_api.h"
/* invalid channel id. */ /* invalid channel id. */
#define INVALID_CHANNEL_ID 0 #define INVALID_CHANNEL_ID 0
@@ -8822,6 +8823,57 @@ bool policy_mgr_is_sap_allowed_on_dfs_freq(struct wlan_objmgr_pdev *pdev,
return true; return true;
} }
bool policy_mgr_is_sap_allowed_on_indoor(struct wlan_objmgr_pdev *pdev,
uint8_t vdev_id, qdf_freq_t ch_freq)
{
struct wlan_objmgr_psoc *psoc;
bool is_scc = false, indoor_support = false;
enum QDF_OPMODE mode;
psoc = wlan_pdev_get_psoc(pdev);
if (!psoc)
return true;
if (!wlan_reg_is_freq_indoor(pdev, ch_freq))
return true;
is_scc = policy_mgr_is_sta_sap_scc(psoc, ch_freq);
mode = wlan_get_opmode_from_vdev_id(pdev, vdev_id);
ucfg_mlme_get_indoor_channel_support(psoc, &indoor_support);
/*
* Rules for indoor operation:
* If gindoor_channel_support is enabled - Allow SAP/GO
* If gindoor_channel_support is disabled
* a) Restrict 6 GHz SAP
* b) Restrict standalone 5 GHz SAP
*
* If p2p_go_on_indoor_chan is enabled - Allow GO
* with or without concurrency
*
* If sta_sap_scc_on_indoor_chan is enabled - Allow
* SAP/GO with concurrent STA in indoor SCC
*
* Restrict all other operations on indoor
*/
if (indoor_support) {
return true;
} else if (WLAN_REG_IS_6GHZ_CHAN_FREQ(ch_freq) ||
(!is_scc && mode == QDF_SAP_MODE)) {
policy_mgr_rl_debug("SAP operation is not allowed on indoor channel");
return false;
} else if (mode == QDF_P2P_GO_MODE &&
ucfg_p2p_get_indoor_ch_support(psoc)) {
return true;
} else if (is_scc &&
policy_mgr_get_sta_sap_scc_allowed_on_indoor_chnl(psoc)) {
return true;
}
policy_mgr_rl_debug("SAP operation is not allowed on indoor channel");
return false;
}
bool policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan( bool policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan(
struct wlan_objmgr_psoc *psoc) struct wlan_objmgr_psoc *psoc)
{ {
@@ -9584,10 +9636,9 @@ bool policy_mgr_is_restart_sap_required(struct wlan_objmgr_psoc *psoc,
if (connection[i].freq != freq && if (connection[i].freq != freq &&
WLAN_REG_IS_24GHZ_CH_FREQ(connection[i].freq) && WLAN_REG_IS_24GHZ_CH_FREQ(connection[i].freq) &&
WLAN_REG_IS_5GHZ_CH_FREQ(freq) && WLAN_REG_IS_5GHZ_CH_FREQ(freq) &&
wlan_reg_is_freq_indoor(pm_ctx->pdev, freq) && !policy_mgr_is_sap_allowed_on_indoor(pm_ctx->pdev,
!policy_mgr_sap_allowed_on_indoor_freq(pm_ctx->psoc, vdev_id,
pm_ctx->pdev, freq)) {
freq)) {
policy_mgr_debug("SAP in indoor freq: sta:%d sap:%d", policy_mgr_debug("SAP in indoor freq: sta:%d sap:%d",
connection[i].freq, freq); connection[i].freq, freq);
restart_required = true; restart_required = true;

View File

@@ -1,6 +1,6 @@
/* /*
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved. * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -553,6 +553,8 @@ static QDF_STATUS p2p_object_init_params(
cfg_get(psoc, CFG_P2P_DEVICE_ADDRESS_ADMINISTRATED); cfg_get(psoc, CFG_P2P_DEVICE_ADDRESS_ADMINISTRATED);
p2p_soc_obj->param.is_random_seq_num_enabled = p2p_soc_obj->param.is_random_seq_num_enabled =
cfg_get(psoc, CFG_ACTION_FRAME_RANDOM_SEQ_NUM_ENABLED); cfg_get(psoc, CFG_ACTION_FRAME_RANDOM_SEQ_NUM_ENABLED);
p2p_soc_obj->param.indoor_channel_support =
cfg_get(psoc, CFG_P2P_GO_ON_INDOOR_CHANNEL);
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }

View File

@@ -1,6 +1,6 @@
/* /*
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved. * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -212,12 +212,14 @@ void p2p_status_update(struct p2p_soc_priv_obj *p2p_soc_obj,
* MAC address from the primary MAC address * MAC address from the primary MAC address
* @skip_dfs_channel_p2p_search: skip DFS Channel in case of P2P Search * @skip_dfs_channel_p2p_search: skip DFS Channel in case of P2P Search
* @is_random_seq_num_enabled: Flag to generate random sequence numbers * @is_random_seq_num_enabled: Flag to generate random sequence numbers
* @indoor_channel_support: support to allow GO in indoor channels
*/ */
struct p2p_param { struct p2p_param {
uint32_t go_keepalive_period; uint32_t go_keepalive_period;
uint32_t go_link_monitor_period; uint32_t go_link_monitor_period;
bool p2p_device_addr_admin; bool p2p_device_addr_admin;
bool is_random_seq_num_enabled; bool is_random_seq_num_enabled;
bool indoor_channel_support;
}; };
/** /**

View File

@@ -1,6 +1,6 @@
/* /*
* Copyright (c) 2018-2020 The Linux Foundation. All rights reserved. * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -123,10 +123,34 @@
1, \ 1, \
"Enable random seq nums for action frames") "Enable random seq nums for action frames")
/*
* <ini>
* p2p_go_on_indoor_chan - Allow P2P GO to operate on 5 GHz indoor channels
*
* @Min: 0
* @Max: 1
* @Default: 0
*
* This ini is used to enable/disable P2P-GO operation on 5 GHz
* indoor channels.
*
* Related: sta_sap_scc_on_indoor_channel, gindoor_channel_support
*
* Supported Feature: P2P GO
*
* Usage: external
*
* </ini>
*/
#define CFG_P2P_GO_ON_INDOOR_CHANNEL CFG_INI_BOOL("p2p_go_on_indoor_chan", \
"0", \
"Allow P2P GO on 5 GHz indoor channels")
#define CFG_P2P_ALL \ #define CFG_P2P_ALL \
CFG(CFG_ACTION_FRAME_RANDOM_SEQ_NUM_ENABLED) \ CFG(CFG_ACTION_FRAME_RANDOM_SEQ_NUM_ENABLED) \
CFG(CFG_GO_KEEP_ALIVE_PERIOD) \ CFG(CFG_GO_KEEP_ALIVE_PERIOD) \
CFG(CFG_GO_LINK_MONITOR_PERIOD) \ CFG(CFG_GO_LINK_MONITOR_PERIOD) \
CFG(CFG_P2P_DEVICE_ADDRESS_ADMINISTRATED) CFG(CFG_P2P_DEVICE_ADDRESS_ADMINISTRATED) \
CFG(CFG_P2P_GO_ON_INDOOR_CHANNEL)
#endif #endif

View File

@@ -1,6 +1,6 @@
/* /*
* Copyright (c) 2017-2018, 2020-2021 The Linux Foundation. All rights reserved. * Copyright (c) 2017-2018, 2020-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -464,4 +464,16 @@ bool ucfg_p2p_is_roam_config_disabled(struct wlan_objmgr_psoc *psoc)
{ {
return cfg_p2p_is_roam_config_disabled(psoc); return cfg_p2p_is_roam_config_disabled(psoc);
} }
/**
* ucfg_p2p_get_indoor_ch_support() - Get indoor channel support
* for P2P GO
*
* @psoc: pointer to psoc obj
*
* Get the indoor channel support for P2P GO
*
* Return: p2p go supported on indoor channel
*/
bool ucfg_p2p_get_indoor_ch_support(struct wlan_objmgr_psoc *psoc);
#endif /* _WLAN_P2P_UCFG_API_H_ */ #endif /* _WLAN_P2P_UCFG_API_H_ */

View File

@@ -1,6 +1,6 @@
/* /*
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved. * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -641,3 +641,22 @@ QDF_STATUS ucfg_p2p_status_stop_bss(struct wlan_objmgr_vdev *vdev)
return p2p_status_stop_bss(vdev); return p2p_status_stop_bss(vdev);
} }
bool ucfg_p2p_get_indoor_ch_support(struct wlan_objmgr_psoc *psoc)
{
struct p2p_soc_priv_obj *p2p_soc_obj;
if (!psoc) {
p2p_err("invalid psoc");
return false;
}
p2p_soc_obj = wlan_objmgr_psoc_get_comp_private_obj(psoc,
WLAN_UMAC_COMP_P2P);
if (!p2p_soc_obj) {
p2p_err("p2p soc private object is NULL");
return false;
}
return p2p_soc_obj->param.indoor_channel_support;
}

View File

@@ -3274,6 +3274,14 @@ int hdd_softap_set_channel_change(struct net_device *dev, int target_chan_freq,
return status; return status;
} }
if (!policy_mgr_is_sap_allowed_on_indoor(hdd_ctx->pdev,
adapter->vdev_id,
target_chan_freq)) {
hdd_debug("Channel switch is not allowed to indoor frequency %d",
target_chan_freq);
return -EINVAL;
}
if (!sta_cnt && !policy_mgr_is_hw_dbs_capable(hdd_ctx->psoc) && if (!sta_cnt && !policy_mgr_is_hw_dbs_capable(hdd_ctx->psoc) &&
(sta_sap_scc_on_dfs_chnl == (sta_sap_scc_on_dfs_chnl ==
PM_STA_SAP_ON_DFS_MASTER_MODE_DISABLED) && PM_STA_SAP_ON_DFS_MASTER_MODE_DISABLED) &&
@@ -7534,6 +7542,16 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
if (!status) if (!status)
return -EINVAL; return -EINVAL;
status = policy_mgr_is_sap_allowed_on_indoor(
hdd_ctx->pdev,
adapter->vdev_id,
chandef->chan->center_freq);
if (!status) {
hdd_debug("SAP start not allowed on indoor channel %d",
chandef->chan->center_freq);
return -EINVAL;
}
intf_pm_mode = policy_mgr_convert_device_mode_to_qdf_type( intf_pm_mode = policy_mgr_convert_device_mode_to_qdf_type(
adapter->device_mode); adapter->device_mode);
status = policy_mgr_is_multi_sap_allowed_on_same_band( status = policy_mgr_is_multi_sap_allowed_on_same_band(

View File

@@ -1,6 +1,6 @@
/* /*
* Copyright (c) 2014-2021 The Linux Foundation. All rights reserved. * Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -38,6 +38,7 @@
#include "wlan_hdd_hostapd.h" #include "wlan_hdd_hostapd.h"
#include "osif_psoc_sync.h" #include "osif_psoc_sync.h"
#include "wlan_osif_features.h" #include "wlan_osif_features.h"
#include "wlan_p2p_ucfg_api.h"
#define REG_RULE_2412_2462 REG_RULE(2412-10, 2462+10, 40, 0, 20, 0) #define REG_RULE_2412_2462 REG_RULE(2412-10, 2462+10, 40, 0, 20, 0)
@@ -357,6 +358,8 @@ static void reg_program_config_vars(struct hdd_context *hdd_ctx,
hdd_update_afc_config(hdd_ctx, config_vars); hdd_update_afc_config(hdd_ctx, config_vars);
config_vars->sta_sap_scc_on_indoor_channel = config_vars->sta_sap_scc_on_indoor_channel =
ucfg_policy_mgr_get_sta_sap_scc_on_indoor_chnl(hdd_ctx->psoc); ucfg_policy_mgr_get_sta_sap_scc_on_indoor_chnl(hdd_ctx->psoc);
config_vars->p2p_indoor_ch_support =
ucfg_p2p_get_indoor_ch_support(hdd_ctx->psoc);
} }
/** /**

View File

@@ -424,8 +424,6 @@ static bool sap_chan_sel_init(mac_handle_t mac_handle,
bool include_dfs_ch = true; bool include_dfs_ch = true;
uint8_t sta_sap_scc_on_dfs_chnl_config_value; uint8_t sta_sap_scc_on_dfs_chnl_config_value;
bool ch_support_puncture; bool ch_support_puncture;
bool is_sta_sap_scc;
bool sta_sap_scc_on_indoor_channel;
pSpectInfoParams->numSpectChans = pSpectInfoParams->numSpectChans =
mac->scan.base_channels.numChannels; mac->scan.base_channels.numChannels;
@@ -451,9 +449,6 @@ static bool sap_chan_sel_init(mac_handle_t mac_handle,
ACS_DFS_MODE_DISABLE == sap_ctx->dfs_mode) ACS_DFS_MODE_DISABLE == sap_ctx->dfs_mode)
include_dfs_ch = false; include_dfs_ch = false;
sta_sap_scc_on_indoor_channel =
policy_mgr_get_sta_sap_scc_allowed_on_indoor_chnl(mac->psoc);
/* Fill the channel number in the spectrum in the operating freq band */ /* Fill the channel number in the spectrum in the operating freq band */
for (channelnum = 0; for (channelnum = 0;
channelnum < pSpectInfoParams->numSpectChans; channelnum < pSpectInfoParams->numSpectChans;
@@ -514,12 +509,9 @@ static bool sap_chan_sel_init(mac_handle_t mac_handle,
continue; continue;
/* Skip indoor channels for non-scc indoor scenario*/ /* Skip indoor channels for non-scc indoor scenario*/
is_sta_sap_scc = policy_mgr_is_sta_sap_scc(mac->psoc, if (!policy_mgr_is_sap_allowed_on_indoor(mac->pdev,
*pChans); sap_ctx->sessionId,
if (!(is_sta_sap_scc && sta_sap_scc_on_indoor_channel) && *pChans)) {
!policy_mgr_sap_allowed_on_indoor_freq(mac->psoc,
mac->pdev,
*pChans)) {
sap_debug("Do not allow SAP on indoor frequency %u", sap_debug("Do not allow SAP on indoor frequency %u",
*pChans); *pChans);
continue; continue;