qcacmn: Extract SBS Lower Band End freq
Add support for extracting SBS Lower Band End freq from rx service ready event. Change-Id: I402d7519507fbce733a000a546473aa00e8844d5 CRs-Fixed: 3065158
This commit is contained in:

zatwierdzone przez
Madan Koyyalamudi

rodzic
084e26e4d9
commit
8d1f8d1b4a
@@ -187,6 +187,7 @@ struct target_version_info {
|
|||||||
* @mem_chunks: allocated memory blocks for FW
|
* @mem_chunks: allocated memory blocks for FW
|
||||||
* @scan_radio_caps: scan radio capabilities
|
* @scan_radio_caps: scan radio capabilities
|
||||||
* @device_mode: Global Device mode
|
* @device_mode: Global Device mode
|
||||||
|
* @sbs_lower_band_end_freq: sbs lower band end frequency
|
||||||
*/
|
*/
|
||||||
struct tgt_info {
|
struct tgt_info {
|
||||||
struct host_fw_ver version;
|
struct host_fw_ver version;
|
||||||
@@ -220,6 +221,7 @@ struct tgt_info {
|
|||||||
bool is_pdevid_to_phyid_map;
|
bool is_pdevid_to_phyid_map;
|
||||||
struct wlan_psoc_host_scan_radio_caps *scan_radio_caps;
|
struct wlan_psoc_host_scan_radio_caps *scan_radio_caps;
|
||||||
uint32_t device_mode;
|
uint32_t device_mode;
|
||||||
|
uint32_t sbs_lower_band_end_freq;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2665,6 +2667,25 @@ static inline enum QDF_GLOBAL_MODE target_psoc_get_device_mode
|
|||||||
void target_if_set_reg_cc_ext_supp(struct target_psoc_info *tgt_hdl,
|
void target_if_set_reg_cc_ext_supp(struct target_psoc_info *tgt_hdl,
|
||||||
struct wlan_objmgr_psoc *psoc);
|
struct wlan_objmgr_psoc *psoc);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* target_psoc_set_sbs_lower_band_end() - Set lower band end sbs frequency
|
||||||
|
*
|
||||||
|
* @psoc_info: Pointer to struct target_psoc_info.
|
||||||
|
* @val: sbs lower band end cap value
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
static inline
|
||||||
|
void target_psoc_set_sbs_lower_band_end(struct target_psoc_info *psoc_info,
|
||||||
|
uint32_t val)
|
||||||
|
{
|
||||||
|
if (!psoc_info)
|
||||||
|
return;
|
||||||
|
|
||||||
|
psoc_info->info.sbs_lower_band_end_freq = val;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* target_psoc_set_twt_ack_cap() - Set twt ack capability
|
* target_psoc_set_twt_ack_cap() - Set twt ack capability
|
||||||
*
|
*
|
||||||
|
@@ -329,6 +329,23 @@ int init_deinit_populate_twt_cap_ext2(struct wlan_objmgr_psoc *psoc,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* init_deinit_populate_dbs_or_sbs_cap_ext2() - populate dbs or sbs capability
|
||||||
|
* from service ready ext2 event
|
||||||
|
*
|
||||||
|
* @psoc: PSOC object
|
||||||
|
* @handle: WMI handle pointer
|
||||||
|
* @event: event buffer received from FW
|
||||||
|
* @info: tgt_info object
|
||||||
|
*
|
||||||
|
* API to populate dbs or sbs capability from service ready ext2 event.
|
||||||
|
* Return: zero on successful dbs or sbs capability or failure
|
||||||
|
*/
|
||||||
|
int init_deinit_populate_dbs_or_sbs_cap_ext2(struct wlan_objmgr_psoc *psoc,
|
||||||
|
wmi_unified_t handle,
|
||||||
|
uint8_t *event,
|
||||||
|
struct tgt_info *info);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* init_deinit_validate_160_80p80_fw_caps() - validate 160 80p80 fw caps
|
* init_deinit_validate_160_80p80_fw_caps() - validate 160 80p80 fw caps
|
||||||
* @psoc: PSOC object
|
* @psoc: PSOC object
|
||||||
|
@@ -353,6 +353,11 @@ static int init_deinit_service_ext2_ready_event_handler(ol_scn_t scn_handle,
|
|||||||
if (err_code)
|
if (err_code)
|
||||||
target_if_debug("failed to populate twt cap ext2");
|
target_if_debug("failed to populate twt cap ext2");
|
||||||
|
|
||||||
|
err_code = init_deinit_populate_dbs_or_sbs_cap_ext2(psoc, wmi_handle,
|
||||||
|
event, info);
|
||||||
|
if (err_code)
|
||||||
|
target_if_debug("failed to populate dbs_or_sbs cap ext2");
|
||||||
|
|
||||||
target_if_regulatory_set_ext_tpc(psoc);
|
target_if_regulatory_set_ext_tpc(psoc);
|
||||||
|
|
||||||
target_if_reg_set_lower_6g_edge_ch_info(psoc);
|
target_if_reg_set_lower_6g_edge_ch_info(psoc);
|
||||||
|
@@ -560,6 +560,29 @@ exit:
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
int init_deinit_populate_dbs_or_sbs_cap_ext2(struct wlan_objmgr_psoc *psoc,
|
||||||
|
wmi_unified_t handle,
|
||||||
|
uint8_t *event,
|
||||||
|
struct tgt_info *info)
|
||||||
|
{
|
||||||
|
uint32_t sbs_lower_band_end_freq;
|
||||||
|
struct target_psoc_info *psoc_info;
|
||||||
|
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||||
|
|
||||||
|
status = wmi_extract_dbs_or_sbs_cap_service_ready_ext2(handle, event,
|
||||||
|
&sbs_lower_band_end_freq);
|
||||||
|
if (QDF_IS_STATUS_ERROR(status)) {
|
||||||
|
target_if_err("Extraction of twt capability failed");
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
|
psoc_info = wlan_psoc_get_tgt_if_handle(psoc);
|
||||||
|
target_psoc_set_sbs_lower_band_end(psoc_info, sbs_lower_band_end_freq);
|
||||||
|
|
||||||
|
exit:
|
||||||
|
return qdf_status_to_os_return(status);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
QDF_STATUS init_deinit_dbr_ring_cap_free(
|
QDF_STATUS init_deinit_dbr_ring_cap_free(
|
||||||
struct target_psoc_info *tgt_psoc_info)
|
struct target_psoc_info *tgt_psoc_info)
|
||||||
{
|
{
|
||||||
|
@@ -3405,6 +3405,23 @@ QDF_STATUS wmi_extract_service_ready_ext2(
|
|||||||
struct wmi_unified *wmi_handle, uint8_t *evt_buf,
|
struct wmi_unified *wmi_handle, uint8_t *evt_buf,
|
||||||
struct wlan_psoc_host_service_ext2_param *param);
|
struct wlan_psoc_host_service_ext2_param *param);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* wmi_extract_dbs_or_sbs_cap_service_ready_ext2() - extract dbs_or_sbs cap from
|
||||||
|
* service ready ext 2
|
||||||
|
*
|
||||||
|
* @wmi_handle: wmi handle
|
||||||
|
* @evt_buf: pointer to event buffer
|
||||||
|
* @sbs_lower_band_end_freq: If sbs_lower_band_end_freq is set to non-zero,
|
||||||
|
* it indicates async SBS mode is supported, and
|
||||||
|
* lower-band/higher band to MAC mapping is
|
||||||
|
* switch-able. unit: mhz. examples 5180, 5320
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
|
||||||
|
*/
|
||||||
|
QDF_STATUS wmi_extract_dbs_or_sbs_cap_service_ready_ext2(
|
||||||
|
wmi_unified_t wmi_handle,
|
||||||
|
uint8_t *evt_buf, uint32_t *sbs_lower_band_end_freq);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wmi_extract_hw_mode_cap_service_ready_ext() -
|
* wmi_extract_hw_mode_cap_service_ready_ext() -
|
||||||
* extract HW mode cap from service ready event
|
* extract HW mode cap from service ready event
|
||||||
|
@@ -2041,6 +2041,10 @@ QDF_STATUS (*extract_service_ready_ext2)(
|
|||||||
uint8_t *evt_buf,
|
uint8_t *evt_buf,
|
||||||
struct wlan_psoc_host_service_ext2_param *param);
|
struct wlan_psoc_host_service_ext2_param *param);
|
||||||
|
|
||||||
|
QDF_STATUS (*extract_dbs_or_sbs_service_ready_ext2)(
|
||||||
|
wmi_unified_t wmi_handle, uint8_t *event,
|
||||||
|
uint32_t *sbs_lower_band_end_freq);
|
||||||
|
|
||||||
QDF_STATUS (*extract_hw_mode_cap_service_ready_ext)(
|
QDF_STATUS (*extract_hw_mode_cap_service_ready_ext)(
|
||||||
wmi_unified_t wmi_handle,
|
wmi_unified_t wmi_handle,
|
||||||
uint8_t *evt_buf, uint8_t hw_mode_idx,
|
uint8_t *evt_buf, uint8_t hw_mode_idx,
|
||||||
|
@@ -2461,6 +2461,18 @@ QDF_STATUS wmi_extract_service_ready_ext2(
|
|||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QDF_STATUS wmi_extract_dbs_or_sbs_cap_service_ready_ext2(
|
||||||
|
wmi_unified_t wmi_handle,
|
||||||
|
uint8_t *evt_buf, uint32_t *sbs_lower_band_end_freq)
|
||||||
|
{
|
||||||
|
if (wmi_handle->ops->extract_dbs_or_sbs_service_ready_ext2)
|
||||||
|
return wmi_handle->ops->extract_dbs_or_sbs_service_ready_ext2(
|
||||||
|
wmi_handle,
|
||||||
|
evt_buf, sbs_lower_band_end_freq);
|
||||||
|
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_sar_cap_service_ready_ext(
|
QDF_STATUS wmi_extract_sar_cap_service_ready_ext(
|
||||||
wmi_unified_t wmi_handle,
|
wmi_unified_t wmi_handle,
|
||||||
uint8_t *evt_buf,
|
uint8_t *evt_buf,
|
||||||
|
@@ -11726,6 +11726,39 @@ extract_service_ready_ext2_tlv(wmi_unified_t wmi_handle, uint8_t *event,
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* extract_dbs_or_sbs_cap_service_ready_ext2_tlv() - extract dbs_or_sbs cap from
|
||||||
|
* service ready ext 2
|
||||||
|
*
|
||||||
|
* @wmi_handle: wmi handle
|
||||||
|
* @event: pointer to event buffer
|
||||||
|
* @sbs_lower_band_end_freq: If sbs_lower_band_end_freq is set to non-zero,
|
||||||
|
* it indicates async SBS mode is supported, and
|
||||||
|
* lower-band/higher band to MAC mapping is
|
||||||
|
* switch-able. unit: mhz. examples 5180, 5320
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
|
||||||
|
*/
|
||||||
|
static QDF_STATUS extract_dbs_or_sbs_cap_service_ready_ext2_tlv(
|
||||||
|
wmi_unified_t wmi_handle, uint8_t *event,
|
||||||
|
uint32_t *sbs_lower_band_end_freq)
|
||||||
|
{
|
||||||
|
WMI_SERVICE_READY_EXT2_EVENTID_param_tlvs *param_buf;
|
||||||
|
wmi_dbs_or_sbs_cap_ext *dbs_or_sbs_caps;
|
||||||
|
|
||||||
|
param_buf = (WMI_SERVICE_READY_EXT2_EVENTID_param_tlvs *)event;
|
||||||
|
if (!param_buf)
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
|
||||||
|
dbs_or_sbs_caps = param_buf->dbs_or_sbs_cap_ext;
|
||||||
|
if (!dbs_or_sbs_caps)
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
|
||||||
|
*sbs_lower_band_end_freq = dbs_or_sbs_caps->sbs_lower_band_end_freq;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* extract_sar_cap_service_ready_ext_tlv() -
|
* extract_sar_cap_service_ready_ext_tlv() -
|
||||||
* extract SAR cap from service ready event
|
* extract SAR cap from service ready event
|
||||||
@@ -16476,6 +16509,8 @@ struct wmi_ops tlv_ops = {
|
|||||||
.send_power_dbg_cmd = send_power_dbg_cmd_tlv,
|
.send_power_dbg_cmd = send_power_dbg_cmd_tlv,
|
||||||
.extract_service_ready_ext = extract_service_ready_ext_tlv,
|
.extract_service_ready_ext = extract_service_ready_ext_tlv,
|
||||||
.extract_service_ready_ext2 = extract_service_ready_ext2_tlv,
|
.extract_service_ready_ext2 = extract_service_ready_ext2_tlv,
|
||||||
|
.extract_dbs_or_sbs_service_ready_ext2 =
|
||||||
|
extract_dbs_or_sbs_cap_service_ready_ext2_tlv,
|
||||||
.extract_hw_mode_cap_service_ready_ext =
|
.extract_hw_mode_cap_service_ready_ext =
|
||||||
extract_hw_mode_cap_service_ready_ext_tlv,
|
extract_hw_mode_cap_service_ready_ext_tlv,
|
||||||
.extract_mac_phy_cap_service_ready_ext =
|
.extract_mac_phy_cap_service_ready_ext =
|
||||||
|
Reference in New Issue
Block a user