qcacmn: Do not print DFS error message for non 5 GHz pdev
In Repeater AP scenario, when STA vap starts scan, it calls the registered DFS callback function to get the AP CAC status. For a 2 GHz pdev, dfs object is NULL and hence 'dfs is NULL' print is always seen when user enables the dfs error logs. Add non 5 GHz pdev check in dfs callback function before dfs NULL check. Change-Id: Id087d0b126996406f2b6e1b5b34b90a12a18a890 CRs-Fixed: 2245034
This commit is contained in:

gecommit door
nshrivas

bovenliggende
dd58f63b13
commit
26d9f36f90
@@ -385,6 +385,10 @@ static void dfs_scan_serialization_comp_info_cb(
|
||||
{
|
||||
struct wlan_dfs *dfs = NULL;
|
||||
struct wlan_objmgr_pdev *pdev;
|
||||
struct wlan_lmac_if_dfs_tx_ops *dfs_tx_ops;
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
bool is_5ghz = false;
|
||||
QDF_STATUS status;
|
||||
|
||||
if (!comp_info) {
|
||||
dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS, "comp_info is NULL");
|
||||
@@ -404,6 +408,27 @@ static void dfs_scan_serialization_comp_info_cb(
|
||||
|
||||
comp_info->scan_info.is_cac_in_progress = false;
|
||||
|
||||
psoc = wlan_pdev_get_psoc(pdev);
|
||||
if (!psoc) {
|
||||
dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS, "null psoc");
|
||||
return;
|
||||
}
|
||||
|
||||
dfs_tx_ops = wlan_psoc_get_dfs_txops(psoc);
|
||||
if (!(dfs_tx_ops && dfs_tx_ops->dfs_is_pdev_5ghz)) {
|
||||
dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS, "dfs_tx_ops is null");
|
||||
return;
|
||||
}
|
||||
|
||||
status = dfs_tx_ops->dfs_is_pdev_5ghz(pdev, &is_5ghz);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS, "Failed to get is_5ghz value");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!is_5ghz)
|
||||
return;
|
||||
|
||||
dfs = wlan_pdev_get_dfs_obj(pdev);
|
||||
if (!dfs) {
|
||||
dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS, "dfs is NULL");
|
||||
|
Verwijs in nieuw issue
Block a user