qcacmn: Add support to extract link removal TLVs from MGMT Rx event
To assist the Host in ML reconfiguration element construction for probe responses, FW sends MLO link removal information as part of the MGMT Rx event containing the corresponding probe request. This information is an array of TLVs, one TLV for each link that is undergoing link removal from the MLD for which this probe request is intended. The TLV carries the link removal TBTT countdown value maintained by the FW for that link. Add support to extract the same. CRs-Fixed: 3335361 Change-Id: I16c6791a443ddb166da596d404a52ff2a38da291
This commit is contained in:

committed by
Madan Koyyalamudi

parent
22be442546
commit
11fa724d8a
@@ -103,6 +103,22 @@ QDF_STATUS wmi_extract_mlo_link_removal_tbtt_update(
|
||||
struct wmi_unified *wmi_handle,
|
||||
void *buf,
|
||||
struct mlo_link_removal_tbtt_info *tbtt_info);
|
||||
|
||||
/**
|
||||
* wmi_extract_mgmt_rx_mlo_link_removal_info() - Extract MLO link removal info
|
||||
* from MGMT Rx event
|
||||
* @wmi: wmi handle
|
||||
* @buf: event buffer
|
||||
* @link_removal_info: link removal information array to be populated
|
||||
* @num_link_removal_info: Number of elements in @link_removal_info
|
||||
*
|
||||
* Return: QDF_STATUS of operation
|
||||
*/
|
||||
QDF_STATUS wmi_extract_mgmt_rx_mlo_link_removal_info(
|
||||
struct wmi_unified *wmi,
|
||||
void *buf,
|
||||
struct mgmt_rx_mlo_link_removal_info *link_removal_info,
|
||||
int num_link_removal_info);
|
||||
#endif /*WLAN_FEATURE_11BE_MLO*/
|
||||
|
||||
#ifdef WLAN_FEATURE_11BE
|
||||
|
@@ -194,6 +194,22 @@ uint8_t *peer_delete_add_mlo_params(uint8_t *buf_ptr,
|
||||
* @wmi_handle: WMI handle
|
||||
*/
|
||||
void wmi_11be_attach_tlv(wmi_unified_t wmi_handle);
|
||||
|
||||
/**
|
||||
* extract_mgmt_rx_mlo_link_removal_tlv_count() - Extract the number of link
|
||||
* removal TLVs from MGMT Rx event
|
||||
* @num_link_removal_tlvs: Number of link removal TLVs
|
||||
* @hdr: MGMT Rx event parameters to be populated
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static inline void
|
||||
extract_mgmt_rx_mlo_link_removal_tlv_count(
|
||||
int num_link_removal_tlvs,
|
||||
struct mgmt_rx_event_params *hdr)
|
||||
{
|
||||
hdr->num_link_removal_info = num_link_removal_tlvs;
|
||||
}
|
||||
#else
|
||||
static uint8_t *vdev_create_add_mlo_params(uint8_t *buf_ptr,
|
||||
struct vdev_create_params *param)
|
||||
@@ -323,5 +339,12 @@ static uint8_t *peer_delete_add_mlo_params(uint8_t *buf_ptr,
|
||||
|
||||
static void wmi_11be_attach_tlv(wmi_unified_t wmi_handle)
|
||||
{ }
|
||||
|
||||
static inline void
|
||||
extract_mgmt_rx_mlo_link_removal_tlv_count(
|
||||
int num_link_removal_tlvs,
|
||||
struct mgmt_rx_event_params *hdr)
|
||||
{
|
||||
}
|
||||
#endif /*WLAN_FEATURE_11BE_MLO*/
|
||||
#endif /*_WMI_UNIFIED_11BE_TLV_H_*/
|
||||
|
@@ -3049,6 +3049,12 @@ QDF_STATUS (*extract_mlo_link_removal_tbtt_update)(
|
||||
struct wmi_unified *wmi_handle,
|
||||
void *buf,
|
||||
struct mlo_link_removal_tbtt_info *tbtt_info);
|
||||
|
||||
QDF_STATUS (*extract_mgmt_rx_mlo_link_removal_info)(
|
||||
struct wmi_unified *wmi_handle,
|
||||
void *buf,
|
||||
struct mgmt_rx_mlo_link_removal_info *link_removal_info,
|
||||
int num_link_removal_info);
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_FEATURE_SON
|
||||
|
@@ -153,3 +153,18 @@ QDF_STATUS wmi_extract_mlo_link_removal_tbtt_update(
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
QDF_STATUS wmi_extract_mgmt_rx_mlo_link_removal_info(
|
||||
struct wmi_unified *wmi,
|
||||
void *buf,
|
||||
struct mgmt_rx_mlo_link_removal_info *link_removal_info,
|
||||
int num_link_removal_info)
|
||||
{
|
||||
if (wmi->ops->extract_mgmt_rx_mlo_link_removal_info)
|
||||
return wmi->ops->extract_mgmt_rx_mlo_link_removal_info(
|
||||
wmi, buf,
|
||||
link_removal_info,
|
||||
num_link_removal_info);
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
@@ -740,6 +740,61 @@ extract_mlo_link_removal_tbtt_update_tlv(
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* extract_mgmt_rx_mlo_link_removal_info_tlv() - Extract MLO link removal info
|
||||
* from MGMT Rx event
|
||||
* @wmi_handle: wmi handle
|
||||
* @buf: event buffer
|
||||
* @link_removal_info: link removal information array to be populated
|
||||
* @num_link_removal_info: Number of elements in @link_removal_info
|
||||
*
|
||||
* Return: QDF_STATUS of operation
|
||||
*/
|
||||
static QDF_STATUS
|
||||
extract_mgmt_rx_mlo_link_removal_info_tlv(
|
||||
struct wmi_unified *wmi_handle,
|
||||
void *buf,
|
||||
struct mgmt_rx_mlo_link_removal_info *link_removal_info,
|
||||
int num_link_removal_info)
|
||||
{
|
||||
WMI_MGMT_RX_EVENTID_param_tlvs *param_buf = buf;
|
||||
wmi_mlo_link_removal_tbtt_count *tlv_arr;
|
||||
int tlv_idx = 0;
|
||||
struct mgmt_rx_mlo_link_removal_info *info;
|
||||
|
||||
if (!param_buf) {
|
||||
wmi_err_rl("Param_buf is NULL");
|
||||
return QDF_STATUS_E_NULL_VALUE;
|
||||
}
|
||||
|
||||
if (!link_removal_info) {
|
||||
wmi_err_rl("Writable argument is NULL");
|
||||
return QDF_STATUS_E_NULL_VALUE;
|
||||
}
|
||||
|
||||
if (num_link_removal_info != param_buf->num_link_removal_tbtt_count) {
|
||||
wmi_err_rl("link_removal_info array size (%d) is not equal to"
|
||||
"number of corresponding TLVs(%d) present in event",
|
||||
num_link_removal_info,
|
||||
param_buf->num_link_removal_tbtt_count);
|
||||
return QDF_STATUS_E_RANGE;
|
||||
}
|
||||
|
||||
tlv_arr = param_buf->link_removal_tbtt_count;
|
||||
for (; tlv_idx < param_buf->num_link_removal_tbtt_count; tlv_idx++) {
|
||||
info = &link_removal_info[tlv_idx];
|
||||
|
||||
info->hw_link_id = WMI_MLO_LINK_REMOVAL_GET_LINKID(
|
||||
tlv_arr[tlv_idx].tbtt_info);
|
||||
info->vdev_id = WMI_MLO_LINK_REMOVAL_GET_VDEVID(
|
||||
tlv_arr[tlv_idx].tbtt_info);
|
||||
info->tbtt_count = WMI_MLO_LINK_REMOVAL_GET_TBTT_COUNT(
|
||||
tlv_arr[tlv_idx].tbtt_info);
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_11BE
|
||||
size_t peer_assoc_t2lm_params_size(struct peer_assoc_params *req)
|
||||
{
|
||||
@@ -1459,4 +1514,6 @@ void wmi_11be_attach_tlv(wmi_unified_t wmi_handle)
|
||||
extract_mlo_link_removal_evt_fixed_param_tlv;
|
||||
ops->extract_mlo_link_removal_tbtt_update =
|
||||
extract_mlo_link_removal_tbtt_update_tlv;
|
||||
ops->extract_mgmt_rx_mlo_link_removal_info =
|
||||
extract_mgmt_rx_mlo_link_removal_info_tlv;
|
||||
}
|
||||
|
@@ -12757,6 +12757,9 @@ static QDF_STATUS extract_mgmt_rx_params_tlv(wmi_unified_t wmi_handle,
|
||||
|
||||
*bufp = param_tlvs->bufp;
|
||||
|
||||
extract_mgmt_rx_mlo_link_removal_tlv_count(
|
||||
param_tlvs->num_link_removal_tbtt_count, hdr);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user