qcacmn: Add and modify extract APIs for TBTT offset and SWBA events
Recently, FW changes were implemented to support WMI resource config for multi-radio. As part of this, the TBTT offset and SWBA events were modified to support increase in the number of vdevs per SOC. Brief description of the changes with respect to TBTT offset ------------------------------------------------------------ Converged FW will send extended TBTT offset event when the number of vdevs configured is greater than 32 and will continue to send normal TBTT offset event when the number of vdevs configured is less than 32. Legacy FW will continue to send vdev map and tbttoffset list array as part of the TBTT event. Extraction API is added to extract the number of vdevs configured for both legacy and converged FW. Number of vdevs is sent directly by the FW for extended TBTT offset event but sent as vdev map for the normal TBTT offset event. In order to handle normal TBTT offset event, extraction API for normal TBTT event adds logic to convert vdev map into the number of vdevs configured. Extraction APIs are added to extract vdev id and tbttoffset information per vdev that are configured. The vdev id information is sent as vdev map and tbttoffset list as an array for normal TBTT event and as an array of structures containing vdev id and tbttoffset in the case of extended TBTT event. In order to support normal TBTT event based on num vdevs, extraction API for normal TBTT eventadds logic to determine the vdev id from vdev map based on the index(running through 1 to total number of vdevs) passed from the driver. Brief description of the changes with respect to SWBA ----------------------------------------------------- Converged FW will send additional information num vdevs and vdev id embedded in tim info and p2p noa TLVs for SWBA event. Legacy FW will continue to send vdev map and array of tim info and p2p noa desciptors. Extraction APIs is added to extract the number of vdevs configured for both legacy and converged FW. Number of vdevs is sent directly by the FW for SWBA event in the case of converged FW and as a vdev map in the legacy FW. In order to handle legacy FW, extraction API for non-TLV adds logic to convert vdev map into number of vdevs configured. Extraction APIs are modified to extract newly embedded vdev id information in tim info and p2p noa descriptors. The vdev id information is sent as vdev map for legacy. In order to handle legacy FW, extraction API for non-TLV adds logic to determing the vdev id from vdev map based on the index (running through 1 to total number of vdevs) passed from the driver. Change-Id: Ibf84adbb1c526321ec031d5539aff66dcbd1315b CRs-Fixed: 2053628
此提交包含在:
@@ -1058,7 +1058,16 @@ QDF_STATUS (*extract_vdev_start_resp)(wmi_unified_t wmi_handle, void *evt_buf,
|
||||
wmi_host_vdev_start_resp *vdev_rsp);
|
||||
|
||||
QDF_STATUS (*extract_tbttoffset_update_params)(void *wmi_hdl, void *evt_buf,
|
||||
uint32_t *vdev_map, uint32_t **tbttoffset_list);
|
||||
uint8_t idx, struct tbttoffset_params *tbtt_param);
|
||||
|
||||
QDF_STATUS (*extract_ext_tbttoffset_update_params)(void *wmi_hdl, void *evt_buf,
|
||||
uint8_t idx, struct tbttoffset_params *tbtt_param);
|
||||
|
||||
QDF_STATUS (*extract_tbttoffset_num_vdevs)(void *wmi_hdl, void *evt_buf,
|
||||
uint32_t *num_vdevs);
|
||||
|
||||
QDF_STATUS (*extract_ext_tbttoffset_num_vdevs)(void *wmi_hdl, void *evt_buf,
|
||||
uint32_t *num_vdevs);
|
||||
|
||||
QDF_STATUS (*extract_mgmt_rx_params)(wmi_unified_t wmi_handle, void *evt_buf,
|
||||
struct mgmt_rx_event_params *hdr, uint8_t **bufp);
|
||||
@@ -1122,8 +1131,8 @@ QDF_STATUS (*extract_offchan_data_tx_compl_param)(wmi_unified_t wmi_handle,
|
||||
QDF_STATUS (*extract_pdev_csa_switch_count_status)(wmi_unified_t wmi_handle,
|
||||
void *evt_buf, struct pdev_csa_switch_count_status *param);
|
||||
|
||||
QDF_STATUS (*extract_swba_vdev_map)(wmi_unified_t wmi_handle, void *evt_buf,
|
||||
uint32_t *vdev_map);
|
||||
QDF_STATUS (*extract_swba_num_vdevs)(wmi_unified_t wmi_handle, void *evt_buf,
|
||||
uint32_t *num_vdevs);
|
||||
|
||||
QDF_STATUS (*extract_swba_tim_info)(wmi_unified_t wmi_handle, void *evt_buf,
|
||||
uint32_t idx, wmi_host_tim_info *tim_info);
|
||||
@@ -1456,4 +1465,52 @@ static inline uint32_t wmi_align(uint32_t param)
|
||||
{
|
||||
return roundup(param, sizeof(uint32_t));
|
||||
}
|
||||
|
||||
/**
|
||||
* wmi_vdev_map_to_vdev_id() - Provides vdev id corresponding to idx
|
||||
* from vdev map
|
||||
* @vdev_map: Bitmask containing information of active vdev ids
|
||||
* @idx: Index referring to the i'th bit set from LSB in vdev map
|
||||
*
|
||||
* This API returns the vdev id for the i'th bit set from LSB in vdev map.
|
||||
* Index runs through 1 from maximum number of vdevs set in the vdev map
|
||||
*
|
||||
* Return: vdev id of the vdev object
|
||||
*/
|
||||
static inline uint32_t wmi_vdev_map_to_vdev_id(uint32_t vdev_map,
|
||||
uint32_t idx)
|
||||
{
|
||||
uint32_t vdev_count = 0, vdev_set = 0, vdev_id = WLAN_INVALID_VDEV_ID;
|
||||
|
||||
while (vdev_map) {
|
||||
vdev_set += (vdev_map & 0x1);
|
||||
if (vdev_set == (idx+1)) {
|
||||
vdev_id = vdev_count;
|
||||
break;
|
||||
}
|
||||
vdev_map >>= 1;
|
||||
vdev_count++;
|
||||
}
|
||||
|
||||
return vdev_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* wmi_vdev_map_to_num_vdevs() - Provides number of vdevs active based on the
|
||||
* vdev map received from FW
|
||||
* @vdev_map: Bitmask containing information of active vdev ids
|
||||
*
|
||||
* Return: Number of vdevs set in the vdev bit mask
|
||||
*/
|
||||
static inline uint32_t wmi_vdev_map_to_num_vdevs(uint32_t vdev_map)
|
||||
{
|
||||
uint32_t num_vdevs = 0;
|
||||
|
||||
while (vdev_map) {
|
||||
num_vdevs += (vdev_map & 0x1);
|
||||
vdev_map >>= 1;
|
||||
}
|
||||
|
||||
return num_vdevs;
|
||||
}
|
||||
#endif
|
||||
|
新增問題並參考
封鎖使用者