qcacmn: Do not create a DFS object for a 6G only radio

Do not create a DFS object for a radio if the channel frequency range
advertised by the target is a 6G only range.

Change-Id: Ib672902ec3945d00b53ab6d4460584ca889ae387
CRs-Fixed: 2755652
This commit is contained in:
Hariharan Basuthkar
2020-07-28 10:55:44 +05:30
committed by snandini
vanhempi 4438848428
commit 9fed3d69fb
2 muutettua tiedostoa jossa 24 lisäystä ja 4 poistoa

Näytä tiedosto

@@ -397,6 +397,8 @@ QDF_STATUS wlan_dfs_pdev_obj_create_notification(struct wlan_objmgr_pdev *pdev,
uint8_t pdev_id;
QDF_STATUS status;
bool is_5ghz = false;
bool is_6ghz_only_pdev;
qdf_freq_t low_5g, high_5g;
if (!pdev) {
dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS, "null pdev");
@@ -409,6 +411,17 @@ QDF_STATUS wlan_dfs_pdev_obj_create_notification(struct wlan_objmgr_pdev *pdev,
return QDF_STATUS_E_FAILURE;
}
wlan_reg_get_freq_range(pdev, NULL, NULL, &low_5g, &high_5g);
is_6ghz_only_pdev = wlan_reg_is_range_only6g(low_5g, high_5g);
if (is_6ghz_only_pdev) {
pdev_id = wlan_objmgr_pdev_get_pdev_id(pdev);
dfs_info(dfs, WLAN_DEBUG_DFS_ALWAYS,
"Do not allocate DFS object for 6G, pdev_id = %d",
pdev_id);
return QDF_STATUS_SUCCESS;
}
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");