qcacmn: Allow SAP to come up on DFS channel in SCC mode

Allow SAP to come up on DFS channel in STA+SAP concurrency mode
only when g_sta_sap_scc_on_dfs_chan enabled in ini file and also
disable chan_switch_hostapd_rate_enabled when force SCC is enabled.

CRs-Fixed: 2147032
Change-Id: Id1333a49d0538eb4ccfaf3c8498e9ca06671de02
This commit is contained in:
Ganesh Kondabattini
2017-11-21 15:01:31 +05:30
committed by snandini
parent bdc1d8e3b1
commit 2f8cae3455
5 changed files with 36 additions and 2 deletions

View File

@@ -2187,4 +2187,15 @@ void policy_mgr_check_and_stop_opportunistic_timer(
void policy_mgr_set_weight_of_dfs_passive_channels_to_zero( void policy_mgr_set_weight_of_dfs_passive_channels_to_zero(
struct wlan_objmgr_psoc *psoc, uint8_t *pcl_channels, struct wlan_objmgr_psoc *psoc, uint8_t *pcl_channels,
uint32_t *len, uint8_t *weight_list, uint32_t weight_len); uint32_t *len, uint8_t *weight_list, uint32_t weight_len);
/**
* policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan() - check if sta+sap scc
* allowed on dfs chan
* @psoc: pointer to soc
* This function is used to check if sta+sap scc allowed on dfs channel
*
* Return: true if sta+sap scc is allowed on dfs channel, otherwise false
*/
bool policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan(
struct wlan_objmgr_psoc *psoc);
#endif /* __WLAN_POLICY_MGR_API_H */ #endif /* __WLAN_POLICY_MGR_API_H */

View File

@@ -1017,6 +1017,7 @@ struct policy_mgr_user_cfg {
bool enable2x2; bool enable2x2;
uint32_t mcc_to_scc_switch_mode; uint32_t mcc_to_scc_switch_mode;
bool sub_20_mhz_enabled; bool sub_20_mhz_enabled;
bool is_sta_sap_scc_allowed_on_dfs_chan;
}; };
/** /**

View File

@@ -747,13 +747,15 @@ static bool policy_mgr_valid_sta_channel_check(struct wlan_objmgr_psoc *psoc,
return false; return false;
} }
if (wlan_reg_is_dfs_ch(pm_ctx->pdev, sta_channel) || if ((wlan_reg_is_dfs_ch(pm_ctx->pdev, sta_channel) &&
(!policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan(psoc))) ||
wlan_reg_is_passive_or_disable_ch(pm_ctx->pdev, sta_channel) || wlan_reg_is_passive_or_disable_ch(pm_ctx->pdev, sta_channel) ||
!policy_mgr_is_safe_channel(psoc, sta_channel)) !policy_mgr_is_safe_channel(psoc, sta_channel)) {
if (policy_mgr_is_hw_dbs_capable(psoc)) if (policy_mgr_is_hw_dbs_capable(psoc))
return true; return true;
else else
return false; return false;
}
else else
return true; return true;
} }

View File

@@ -2721,3 +2721,22 @@ bool policy_mgr_is_force_scc(struct wlan_objmgr_psoc *psoc)
(pm_ctx->user_cfg.mcc_to_scc_switch_mode == (pm_ctx->user_cfg.mcc_to_scc_switch_mode ==
QDF_MCC_TO_SCC_SWITCH_FORCE_PREFERRED_WITHOUT_DISCONNECTION)); QDF_MCC_TO_SCC_SWITCH_FORCE_PREFERRED_WITHOUT_DISCONNECTION));
} }
bool policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan(
struct wlan_objmgr_psoc *psoc)
{
struct policy_mgr_psoc_priv_obj *pm_ctx;
bool status = false;
pm_ctx = policy_mgr_get_context(psoc);
if (!pm_ctx) {
policy_mgr_err("Invalid Context");
return status;
}
if (policy_mgr_is_force_scc(psoc) &&
pm_ctx->user_cfg.is_sta_sap_scc_allowed_on_dfs_chan)
status = true;
return status;
}

View File

@@ -271,6 +271,7 @@ struct policy_mgr_psoc_priv_obj {
uint16_t unsafe_channel_count; uint16_t unsafe_channel_count;
struct sta_ap_intf_check_work_ctx *sta_ap_intf_check_work_info; struct sta_ap_intf_check_work_ctx *sta_ap_intf_check_work_info;
uint8_t cur_conc_system_pref; uint8_t cur_conc_system_pref;
uint8_t sta_sap_scc_on_dfs_chan_allowed;
}; };
/** /**