mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
qcacld-3.0: Don't do CSA on DFS channel in Non-DBS HW
In case of Non-DBS HW, don't allow channel to switch to DFS channel or 160 Mhz BW in 5 Ghz, if STA is not connected. This is done because in Non-DBS HW, Monitoring mode is disabled as sta_sap_scc_on_dfs_chnl is forced to 1. Change-Id: Ie30a38a6c5155ca2b6f11f602fb51a43ca2e323e CRs-Fixed: 2916799
This commit is contained in:
parent
d8a2628709
commit
8b0ac900d2
1 changed files with 16 additions and 0 deletions
|
|
@ -2942,6 +2942,7 @@ int hdd_softap_set_channel_change(struct net_device *dev, int target_chan_freq,
|
|||
bool is_p2p_go_session = false;
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
bool strict;
|
||||
uint32_t sta_cnt = 0;
|
||||
|
||||
hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
|
|
@ -2987,6 +2988,21 @@ int hdd_softap_set_channel_change(struct net_device *dev, int target_chan_freq,
|
|||
}
|
||||
}
|
||||
|
||||
sta_cnt = policy_mgr_mode_specific_connection_count(hdd_ctx->psoc,
|
||||
PM_STA_MODE,
|
||||
NULL);
|
||||
/*
|
||||
* For non-dbs HW, don't allow Channel switch on DFS channel if STA is
|
||||
* not connected.
|
||||
*/
|
||||
if (!sta_cnt && !policy_mgr_is_hw_dbs_capable(hdd_ctx->psoc) &&
|
||||
(wlan_reg_is_dfs_for_freq(hdd_ctx->pdev, target_chan_freq) ||
|
||||
(wlan_reg_is_5ghz_ch_freq(target_chan_freq) &&
|
||||
target_bw == CH_WIDTH_160MHZ))) {
|
||||
hdd_debug("Channel switch not allowed for non-DBS HW on DFS channel %d width %d", target_chan_freq, target_bw);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the ch_switch_in_progress flag to mimic channel change
|
||||
* when a radar is found. This will enable synchronizing
|
||||
|
|
|
|||
Loading…
Reference in a new issue