qcacmn: Disable dfs phyerr offload when no sap/go in DFS channel

As FW requires, send WMI_PDEV_DFS_PHYERR_OFFLOAD_DISABLE_CMDID when there
is no beaconing session in DFS channel for FW which supports dfs offload.

Change-Id: I73b86328be6eb132de70bd10406495fbaefcab67
CRs-Fixed: 2554083
This commit is contained in:
bings
2019-10-30 15:12:15 +08:00
committed by nshrivas
parent 05c1f9c8c3
commit 5a40049a64
3 changed files with 21 additions and 10 deletions

View File

@@ -144,7 +144,7 @@ qdf_export_symbol(tgt_dfs_set_current_channel_for_freq);
#endif
QDF_STATUS tgt_dfs_radar_enable(struct wlan_objmgr_pdev *pdev,
int no_cac, uint32_t opmode)
int no_cac, uint32_t opmode, bool enable)
{
struct wlan_dfs *dfs;
struct wlan_lmac_if_dfs_tx_ops *dfs_tx_ops;
@@ -158,8 +158,14 @@ QDF_STATUS tgt_dfs_radar_enable(struct wlan_objmgr_pdev *pdev,
}
if (!dfs->dfs_is_offload_enabled) {
dfs_radar_enable(dfs, no_cac, opmode);
return QDF_STATUS_SUCCESS;
if (enable) {
dfs_radar_enable(dfs, no_cac, opmode);
return QDF_STATUS_SUCCESS;
} else {
dfs_debug(dfs, WLAN_DEBUG_DFS_ALWAYS,
"Disabling dfs not allowed for non-offload chips");
return QDF_STATUS_E_FAILURE;
}
}
psoc = wlan_pdev_get_psoc(pdev);
@@ -174,7 +180,7 @@ QDF_STATUS tgt_dfs_radar_enable(struct wlan_objmgr_pdev *pdev,
return QDF_STATUS_E_FAILURE;
}
status = dfs_tx_ops->dfs_send_offload_enable_cmd(pdev, true);
status = dfs_tx_ops->dfs_send_offload_enable_cmd(pdev, enable);
if (QDF_IS_STATUS_ERROR(status))
dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS,
"Failed to enable dfs offload, pdev_id: %d",