mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
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:
parent
4438848428
commit
9fed3d69fb
2 changed files with 24 additions and 4 deletions
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -711,10 +711,17 @@ QDF_STATUS wlan_reg_get_freq_range(struct wlan_objmgr_pdev *pdev,
|
|||
return QDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
||||
*low_2g = pdev_priv_obj->range_2g_low;
|
||||
*high_2g = pdev_priv_obj->range_2g_high;
|
||||
*low_5g = pdev_priv_obj->range_5g_low;
|
||||
*high_5g = pdev_priv_obj->range_5g_high;
|
||||
if (low_2g)
|
||||
*low_2g = pdev_priv_obj->range_2g_low;
|
||||
|
||||
if (high_2g)
|
||||
*high_2g = pdev_priv_obj->range_2g_high;
|
||||
|
||||
if (low_5g)
|
||||
*low_5g = pdev_priv_obj->range_5g_low;
|
||||
|
||||
if (high_5g)
|
||||
*high_5g = pdev_priv_obj->range_5g_high;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue