qcacmn: Update the dfs api

To get the channel state for 5g bonded channel using the freq
use wlan_reg_get_5g_bonded_channel_state_for_freq.

Change-Id: I0b42e9c547ba70259e88137a5a26c238cd66da8d
CRs-Fixed: 2756463
This commit is contained in:
Amruta Kulkarni
2020-08-13 11:28:04 -07:00
committed by snandini
parent 284dab3965
commit f9c5c541c1
3 changed files with 14 additions and 11 deletions

View File

@@ -106,13 +106,12 @@ QDF_STATUS target_if_wake_lock_timeout_release(struct wlan_objmgr_psoc *psoc,
* target_if_vdev_start_link_handler() - check for SAP mode and DFS freq * target_if_vdev_start_link_handler() - check for SAP mode and DFS freq
to handle link up/down to handle link up/down
* @vdev: pointer to vdev * @vdev: pointer to vdev
* @cfreq1 : center freq1 * @is_dfs : is dfs freq
* @cfreq2 : center freq2
* *
* Return: None * Return: None
*/ */
void target_if_vdev_start_link_handler(struct wlan_objmgr_vdev *vdev, void target_if_vdev_start_link_handler(struct wlan_objmgr_vdev *vdev,
uint32_t cfreq1, uint32_t cfreq2); uint32_t is_dfs);
/** /**
* target_if_vdev_stop_link_handler() - check for SAP mode to handle link * target_if_vdev_stop_link_handler() - check for SAP mode to handle link
@@ -147,7 +146,7 @@ static inline QDF_STATUS target_if_wake_lock_timeout_release(
static inline void static inline void
target_if_vdev_start_link_handler(struct wlan_objmgr_vdev *vdev, target_if_vdev_start_link_handler(struct wlan_objmgr_vdev *vdev,
uint32_t cfreq1, uint32_t cfreq2) uint32_t is_dfs)
{ {
} }

View File

@@ -192,15 +192,21 @@ target_if_vote_for_link_up(struct wlan_objmgr_psoc *psoc,
} }
void target_if_vdev_start_link_handler(struct wlan_objmgr_vdev *vdev, void target_if_vdev_start_link_handler(struct wlan_objmgr_vdev *vdev,
uint32_t cfreq1, uint32_t cfreq2) uint32_t is_dfs)
{ {
struct wlan_objmgr_psoc *psoc; struct wlan_objmgr_psoc *psoc;
struct wlan_objmgr_pdev *pdev; struct wlan_objmgr_pdev *pdev;
struct psoc_mlme_wakelock *psoc_wakelock; struct psoc_mlme_wakelock *psoc_wakelock;
struct wlan_lmac_if_mlme_rx_ops *rx_ops; struct wlan_lmac_if_mlme_rx_ops *rx_ops;
struct wlan_channel *des_channel;
uint32_t ch_freq;
enum phy_ch_width ch_width;
psoc = wlan_vdev_get_psoc(vdev); psoc = wlan_vdev_get_psoc(vdev);
pdev = wlan_vdev_get_pdev(vdev); pdev = wlan_vdev_get_pdev(vdev);
des_channel = wlan_vdev_mlme_get_des_chan(vdev);
ch_freq = des_channel->ch_freq;
ch_width = des_channel->ch_width;
if (!pdev) { if (!pdev) {
mlme_err("pdev is NULL"); mlme_err("pdev is NULL");
@@ -216,10 +222,9 @@ void target_if_vdev_start_link_handler(struct wlan_objmgr_vdev *vdev,
psoc_wakelock = rx_ops->psoc_get_wakelock_info(psoc); psoc_wakelock = rx_ops->psoc_get_wakelock_info(psoc);
if (wlan_vdev_mlme_get_opmode(vdev) == QDF_SAP_MODE) { if (wlan_vdev_mlme_get_opmode(vdev) == QDF_SAP_MODE) {
if ((wlan_reg_chan_has_dfs_attribute_for_freq(pdev, if (is_dfs ||
cfreq1)) || (wlan_reg_get_5g_bonded_channel_state_for_freq(pdev,
(wlan_reg_chan_has_dfs_attribute_for_freq(pdev, ch_freq, ch_width) == CHANNEL_STATE_DFS))
cfreq2)))
target_if_vote_for_link_up(psoc, psoc_wakelock); target_if_vote_for_link_up(psoc, psoc_wakelock);
else else
target_if_vote_for_link_down(psoc, psoc_wakelock); target_if_vote_for_link_down(psoc, psoc_wakelock);

View File

@@ -481,8 +481,7 @@ static QDF_STATUS target_if_vdev_mgr_start_send(
START_RESPONSE_BIT); START_RESPONSE_BIT);
} else { } else {
target_if_vdev_start_link_handler(vdev, target_if_vdev_start_link_handler(vdev,
param->channel.cfreq1, param->channel.dfs_set);
param->channel.cfreq2);
} }
return status; return status;
} }