qcacld-3.0: Cleanup for function wlan_reg_is_dfs_ch()

Replace wlan_reg_is_dfs_ch() with wlan_reg_is_dfs_for_freq()

Change-Id: Ifa62248169ad7b8ff1c62cab44c92d99a8db0e45
CRs-Fixed: 2609311
This commit is contained in:
Amruta Kulkarni
2020-01-23 14:19:25 -08:00
committed by nshrivas
parent db47e1d060
commit fc875ea635
8 changed files with 34 additions and 19 deletions

View File

@@ -1710,6 +1710,7 @@ static QDF_STATUS tdls_config_force_peer(
const uint8_t *macaddr;
uint32_t feature;
QDF_STATUS status;
uint32_t chan_freq;
struct tdls_peer_update_state *peer_update_param;
macaddr = req->peer_addr;
@@ -1767,9 +1768,10 @@ static QDF_STATUS tdls_config_force_peer(
}
soc_obj->tdls_external_peer_count++;
chan_freq = wlan_reg_legacy_chan_to_freq(pdev, req->chan);
/* Validate if off channel is DFS channel */
if (wlan_reg_is_dfs_ch(pdev, req->chan)) {
if (wlan_reg_is_dfs_for_freq(pdev, chan_freq)) {
tdls_err("Resetting TDLS off-channel from %d to %d",
req->chan, WLAN_TDLS_PREFERRED_OFF_CHANNEL_NUM_DEF);
req->chan = WLAN_TDLS_PREFERRED_OFF_CHANNEL_NUM_DEF;

View File

@@ -477,6 +477,7 @@ void tdls_extract_peer_state_param(struct tdls_peer_update_state *peer_param,
struct wlan_objmgr_pdev *pdev;
uint8_t chan_id;
enum band_info cur_band = BAND_ALL;
qdf_freq_t ch_freq;
vdev_obj = peer->vdev_priv;
soc_obj = wlan_vdev_get_tdls_soc_obj(vdev_obj->vdev);
@@ -516,7 +517,10 @@ void tdls_extract_peer_state_param(struct tdls_peer_update_state *peer_param,
peer_param->peer_cap.pref_off_channum = 0;
peer_param->peer_cap.opclass_for_prefoffchan = 0;
}
if (wlan_reg_is_dfs_ch(pdev, peer_param->peer_cap.pref_off_channum)) {
ch_freq = wlan_reg_legacy_chan_to_freq(pdev,
peer_param->peer_cap.pref_off_channum);
if (wlan_reg_is_dfs_for_freq(pdev, ch_freq)) {
tdls_err("Resetting TDLS off-channel from %d to %d",
peer_param->peer_cap.pref_off_channum,
WLAN_TDLS_PREFERRED_OFF_CHANNEL_NUM_DEF);