mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
qcacmn: Ignore CSA if the channel is DFS or disabled
If MCC to SCC switch is enabled, SAP is active and CSA received for STA interface, then ignore the CSA if channel is DFS/disabled. CRs-Fixed: 2263037 Change-Id: I98b8d957766358ea86cc9f50339725cf4bf0038b
This commit is contained in:
parent
637eba547a
commit
85b42f4930
2 changed files with 47 additions and 0 deletions
|
|
@ -2391,4 +2391,17 @@ bool policy_mgr_dual_beacon_on_single_mac_mcc_capable(
|
|||
bool policy_mgr_sta_sap_scc_on_lte_coex_chan(
|
||||
struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* policy_mgr_valid_channel_for_channel_switch() - check for valid channel for
|
||||
* channel switch.
|
||||
* @psoc: poniter to psoc
|
||||
* @channel: channel to be validated.
|
||||
* This function validates whether the given channel is valid for channel
|
||||
* switch.
|
||||
*
|
||||
* Return: true or false
|
||||
*/
|
||||
bool policy_mgr_is_valid_for_channel_switch(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t channel);
|
||||
|
||||
#endif /* __WLAN_POLICY_MGR_API_H */
|
||||
|
|
|
|||
|
|
@ -3104,3 +3104,37 @@ bool policy_mgr_sta_sap_scc_on_lte_coex_chan(
|
|||
}
|
||||
return pm_ctx->user_cfg.sta_sap_scc_on_lte_coex_chan;
|
||||
}
|
||||
|
||||
bool policy_mgr_is_valid_for_channel_switch(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t channel)
|
||||
{
|
||||
uint32_t sta_sap_scc_on_dfs_chan;
|
||||
uint32_t sap_count;
|
||||
enum channel_state state;
|
||||
struct policy_mgr_psoc_priv_obj *pm_ctx;
|
||||
|
||||
pm_ctx = policy_mgr_get_context(psoc);
|
||||
if (!pm_ctx) {
|
||||
policy_mgr_err("Invalid Context");
|
||||
return false;
|
||||
}
|
||||
|
||||
sta_sap_scc_on_dfs_chan =
|
||||
policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan(psoc);
|
||||
sap_count = policy_mgr_mode_specific_connection_count(psoc,
|
||||
PM_SAP_MODE,
|
||||
NULL);
|
||||
state = reg_get_channel_state(pm_ctx->pdev, channel);
|
||||
|
||||
policy_mgr_debug("sta_sap_scc_on_dfs_chan %u, sap_count %u, channel %u, state %u",
|
||||
sta_sap_scc_on_dfs_chan, sap_count, channel, state);
|
||||
|
||||
if ((state == CHANNEL_STATE_ENABLE) || (sap_count == 0) ||
|
||||
((state == CHANNEL_STATE_DFS) && sta_sap_scc_on_dfs_chan)) {
|
||||
policy_mgr_debug("Valid channel for channel switch");
|
||||
return true;
|
||||
}
|
||||
|
||||
policy_mgr_debug("Invalid channel for channel switch");
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue