qcacld-3.0: Eliminate channel validation for CSA
Currently, Host driver validates the frequency for channel switch announcement, including checks for DFS, indoor channels and SAP count. This change is to remove these checks, allowing the host driver to honor CSA requests from the AP and switch to the specified channel for STA. Once the STA moves, SAP will move to the STA channel and if not allowed due to DFS/unsafe/indoor rules it will move to 2 GHz band CRs-Fixed: 3620214 Change-Id: Ib6dfb8ffe798fefe576edc0e0db4f50912604c3c
This commit is contained in:

committed by
Rahul Choudhary

parent
e4a6ca8d3c
commit
e65ef65597
@@ -4434,19 +4434,6 @@ bool policy_mgr_dual_beacon_on_single_mac_mcc_capable(
|
|||||||
bool policy_mgr_sta_sap_scc_on_lte_coex_chan(
|
bool policy_mgr_sta_sap_scc_on_lte_coex_chan(
|
||||||
struct wlan_objmgr_psoc *psoc);
|
struct wlan_objmgr_psoc *psoc);
|
||||||
|
|
||||||
/**
|
|
||||||
* policy_mgr_is_valid_for_channel_switch() - check for valid channel for
|
|
||||||
* channel switch.
|
|
||||||
* @psoc: pointer to psoc
|
|
||||||
* @ch_freq: channel frequency 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,
|
|
||||||
uint32_t ch_freq);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* policy_mgr_get_user_config_sap_freq() - Get the user configured channel
|
* policy_mgr_get_user_config_sap_freq() - Get the user configured channel
|
||||||
*
|
*
|
||||||
|
@@ -10554,7 +10554,6 @@ QDF_STATUS policy_mgr_is_chan_ok_for_dnbs(struct wlan_objmgr_psoc *psoc,
|
|||||||
* If operating channel in different band
|
* If operating channel in different band
|
||||||
* (not DBS capable), return false.
|
* (not DBS capable), return false.
|
||||||
*/
|
*/
|
||||||
/* TODO: To be enhanced for SBS */
|
|
||||||
if (policy_mgr_is_dnsc_set(vdev)) {
|
if (policy_mgr_is_dnsc_set(vdev)) {
|
||||||
if (op_ch_freq_list[i] == ch_freq) {
|
if (op_ch_freq_list[i] == ch_freq) {
|
||||||
*ok = true;
|
*ok = true;
|
||||||
@@ -10562,12 +10561,13 @@ QDF_STATUS policy_mgr_is_chan_ok_for_dnbs(struct wlan_objmgr_psoc *psoc,
|
|||||||
vdev,
|
vdev,
|
||||||
WLAN_POLICY_MGR_ID);
|
WLAN_POLICY_MGR_ID);
|
||||||
break;
|
break;
|
||||||
} else if (WLAN_REG_IS_SAME_BAND_FREQS(
|
} else if (policy_mgr_2_freq_always_on_same_mac(
|
||||||
op_ch_freq_list[i], ch_freq)) {
|
psoc,
|
||||||
|
op_ch_freq_list[i], ch_freq)) {
|
||||||
*ok = false;
|
*ok = false;
|
||||||
wlan_objmgr_vdev_release_ref(
|
wlan_objmgr_vdev_release_ref(
|
||||||
vdev,
|
vdev,
|
||||||
WLAN_POLICY_MGR_ID);
|
WLAN_POLICY_MGR_ID);
|
||||||
break;
|
break;
|
||||||
} else if (policy_mgr_is_hw_dbs_capable(psoc)) {
|
} else if (policy_mgr_is_hw_dbs_capable(psoc)) {
|
||||||
*ok = true;
|
*ok = true;
|
||||||
@@ -11334,47 +11334,6 @@ bool policy_mgr_get_ap_6ghz_capable(struct wlan_objmgr_psoc *psoc,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool policy_mgr_is_valid_for_channel_switch(struct wlan_objmgr_psoc *psoc,
|
|
||||||
uint32_t ch_freq)
|
|
||||||
{
|
|
||||||
uint32_t sta_sap_scc_on_dfs_chan, sta_sap_scc_allowed_on_indoor_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);
|
|
||||||
sta_sap_scc_allowed_on_indoor_chan =
|
|
||||||
policy_mgr_get_sta_sap_scc_allowed_on_indoor_chnl(psoc);
|
|
||||||
|
|
||||||
sap_count = policy_mgr_mode_specific_connection_count(psoc,
|
|
||||||
PM_SAP_MODE,
|
|
||||||
NULL);
|
|
||||||
state = wlan_reg_get_channel_state_for_pwrmode(pm_ctx->pdev, ch_freq,
|
|
||||||
REG_CURRENT_PWR_MODE);
|
|
||||||
|
|
||||||
policy_mgr_debug("sta_sap_scc_on_dfs_chan %u, sap_count %u, ch freq %u, state %u",
|
|
||||||
sta_sap_scc_on_dfs_chan, sap_count, ch_freq, state);
|
|
||||||
|
|
||||||
if ((state == CHANNEL_STATE_ENABLE) || (sap_count == 0) ||
|
|
||||||
(wlan_reg_is_dfs_for_freq(pm_ctx->pdev, ch_freq) &&
|
|
||||||
sta_sap_scc_on_dfs_chan) ||
|
|
||||||
(sta_sap_scc_allowed_on_indoor_chan &&
|
|
||||||
wlan_reg_is_freq_indoor(pm_ctx->pdev, ch_freq))) {
|
|
||||||
policy_mgr_debug("Valid channel for channel switch");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
policy_mgr_debug("Invalid channel for channel switch");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool policy_mgr_is_sta_sap_scc(struct wlan_objmgr_psoc *psoc,
|
bool policy_mgr_is_sta_sap_scc(struct wlan_objmgr_psoc *psoc,
|
||||||
uint32_t sap_freq)
|
uint32_t sap_freq)
|
||||||
{
|
{
|
||||||
|
@@ -4249,7 +4249,6 @@ lim_get_b_dfrom_rx_packet(struct mac_context *mac, void *body, uint32_t **pRxPac
|
|||||||
bool lim_is_channel_valid_for_channel_switch(struct mac_context *mac,
|
bool lim_is_channel_valid_for_channel_switch(struct mac_context *mac,
|
||||||
uint32_t channel_freq)
|
uint32_t channel_freq)
|
||||||
{
|
{
|
||||||
uint8_t index;
|
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
|
|
||||||
if (policy_mgr_is_chan_ok_for_dnbs(mac->psoc, channel_freq,
|
if (policy_mgr_is_chan_ok_for_dnbs(mac->psoc, channel_freq,
|
||||||
@@ -4263,15 +4262,9 @@ bool lim_is_channel_valid_for_channel_switch(struct mac_context *mac,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (index = 0; index < mac->mlme_cfg->reg.valid_channel_list_num; index++) {
|
if (wlan_reg_is_freq_enabled(mac->pdev, channel_freq,
|
||||||
if (mac->mlme_cfg->reg.valid_channel_freq_list[index] !=
|
REG_CURRENT_PWR_MODE))
|
||||||
channel_freq)
|
return true;
|
||||||
continue;
|
|
||||||
|
|
||||||
ok = policy_mgr_is_valid_for_channel_switch(
|
|
||||||
mac->psoc, channel_freq);
|
|
||||||
return ok;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* channel does not belong to list of valid channels */
|
/* channel does not belong to list of valid channels */
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user