qcacmn: Refine DFS object allocation for MCL
Currently DFS object can only be allocated if radio supports 5G. Rome supports 5G and saves its wireless_mode in hal_reg_cap of psoc->service_param because Rome FW does not support wmi event wmi_service_ready_ext_event_id. Check wireless_modes based on different DFS_SUPPORT. Change-Id: I0120dde4fcf47bd71f6da512fae64dd62f5f46c8 CRs-Fixed: 2179925
This commit is contained in:
@@ -361,21 +361,18 @@ static QDF_STATUS target_process_bang_radar_cmd(
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef QCA_MCL_DFS_SUPPORT
|
||||||
static QDF_STATUS target_if_dfs_is_pdev_5ghz(struct wlan_objmgr_pdev *pdev,
|
static QDF_STATUS target_if_dfs_is_pdev_5ghz(struct wlan_objmgr_pdev *pdev,
|
||||||
bool *is_5ghz)
|
bool *is_5ghz)
|
||||||
{
|
{
|
||||||
struct wlan_objmgr_psoc *psoc;
|
struct wlan_objmgr_psoc *psoc;
|
||||||
uint8_t pdev_id;
|
|
||||||
|
|
||||||
psoc = wlan_pdev_get_psoc(pdev);
|
psoc = wlan_pdev_get_psoc(pdev);
|
||||||
if (!psoc) {
|
if (!psoc) {
|
||||||
target_if_err("dfs: null psoc");
|
target_if_err("dfs: null psoc");
|
||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
if (psoc->service_param.hal_reg_cap.wireless_modes &
|
||||||
pdev_id = wlan_objmgr_pdev_get_pdev_id(pdev);
|
|
||||||
|
|
||||||
if (psoc->ext_service_param.reg_cap[pdev_id].wireless_modes &
|
|
||||||
WMI_HOST_REGDMN_MODE_11A)
|
WMI_HOST_REGDMN_MODE_11A)
|
||||||
*is_5ghz = true;
|
*is_5ghz = true;
|
||||||
else
|
else
|
||||||
@@ -384,7 +381,6 @@ static QDF_STATUS target_if_dfs_is_pdev_5ghz(struct wlan_objmgr_pdev *pdev,
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef QCA_MCL_DFS_SUPPORT
|
|
||||||
/**
|
/**
|
||||||
* target_if_dfs_set_phyerr_filter_offload() - config phyerr filter offload.
|
* target_if_dfs_set_phyerr_filter_offload() - config phyerr filter offload.
|
||||||
* @pdev: Pointer to DFS pdev object.
|
* @pdev: Pointer to DFS pdev object.
|
||||||
@@ -420,6 +416,29 @@ static QDF_STATUS target_if_dfs_set_phyerr_filter_offload(
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
static QDF_STATUS target_if_dfs_is_pdev_5ghz(struct wlan_objmgr_pdev *pdev,
|
||||||
|
bool *is_5ghz)
|
||||||
|
{
|
||||||
|
struct wlan_objmgr_psoc *psoc;
|
||||||
|
uint8_t pdev_id;
|
||||||
|
|
||||||
|
psoc = wlan_pdev_get_psoc(pdev);
|
||||||
|
if (!psoc) {
|
||||||
|
target_if_err("dfs: null psoc");
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
pdev_id = wlan_objmgr_pdev_get_pdev_id(pdev);
|
||||||
|
|
||||||
|
if (psoc->ext_service_param.reg_cap[pdev_id].wireless_modes &
|
||||||
|
WMI_HOST_REGDMN_MODE_11A)
|
||||||
|
*is_5ghz = true;
|
||||||
|
else
|
||||||
|
*is_5ghz = false;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
static QDF_STATUS target_if_dfs_set_phyerr_filter_offload(
|
static QDF_STATUS target_if_dfs_set_phyerr_filter_offload(
|
||||||
struct wlan_objmgr_pdev *pdev,
|
struct wlan_objmgr_pdev *pdev,
|
||||||
bool dfs_phyerr_filter_offload)
|
bool dfs_phyerr_filter_offload)
|
||||||
|
Reference in New Issue
Block a user