qcacmn: Add WMI layer functionality for MGMT Rx REO filter config command
WMI_MGMT_RX_REO_FILTER_CONFIGURATION_CMD is used to the configure re-order criterion for incoming management frames. Add WMI layer support for the same command. Change-Id: If1498fd4fbccd86e7d54d9eac268868b36523d06 CRs-Fixed: 2960472
This commit is contained in:

committed by
Madan Koyyalamudi

parent
361f45dd82
commit
57543be336
@@ -78,5 +78,15 @@ struct mgmt_rx_reo_params {
|
|||||||
uint16_t mgmt_pkt_ctr;
|
uint16_t mgmt_pkt_ctr;
|
||||||
uint32_t global_timestamp;
|
uint32_t global_timestamp;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* struct mgmt_rx_reo_filter - MGMT Rx REO filter
|
||||||
|
* @filter_low: Least significant 32-bits of the filter
|
||||||
|
* @filter_high: Most significant 32-bits of the filter
|
||||||
|
*/
|
||||||
|
struct mgmt_rx_reo_filter {
|
||||||
|
uint32_t low;
|
||||||
|
uint32_t high;
|
||||||
|
};
|
||||||
#endif /* WLAN_MGMT_RX_REO_SUPPORT */
|
#endif /* WLAN_MGMT_RX_REO_SUPPORT */
|
||||||
#endif /* _WLAN_MGMT_TXRX_RX_REO_PUBLIC_STRUCTS_H */
|
#endif /* _WLAN_MGMT_TXRX_RX_REO_PUBLIC_STRUCTS_H */
|
||||||
|
@@ -2767,6 +2767,20 @@ wmi_extract_mgmt_rx_fw_consumed(wmi_unified_t wmi_handle, void *evt_buf,
|
|||||||
QDF_STATUS
|
QDF_STATUS
|
||||||
wmi_extract_mgmt_rx_reo_params(wmi_unified_t wmi_handle, void *evt_buf,
|
wmi_extract_mgmt_rx_reo_params(wmi_unified_t wmi_handle, void *evt_buf,
|
||||||
struct mgmt_rx_reo_params *params);
|
struct mgmt_rx_reo_params *params);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wmi_unified_mgmt_rx_reo_filter_config_cmd() - Send MGMT Rx REO filter
|
||||||
|
* configuration command
|
||||||
|
* @wmi_handle: wmi handle
|
||||||
|
* @pdev_id: pdev ID of the radio
|
||||||
|
* @filter: Pointer to MGMT Rx REO filter
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS for success or error code
|
||||||
|
*/
|
||||||
|
QDF_STATUS wmi_unified_mgmt_rx_reo_filter_config_cmd(
|
||||||
|
wmi_unified_t wmi_handle,
|
||||||
|
uint8_t pdev_id,
|
||||||
|
struct mgmt_rx_reo_filter *filter);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -2646,6 +2646,11 @@ QDF_STATUS (*extract_mgmt_rx_fw_consumed)(wmi_unified_t wmi_handle,
|
|||||||
QDF_STATUS (*extract_mgmt_rx_reo_params)(wmi_unified_t wmi_handle,
|
QDF_STATUS (*extract_mgmt_rx_reo_params)(wmi_unified_t wmi_handle,
|
||||||
void *evt_buf,
|
void *evt_buf,
|
||||||
struct mgmt_rx_reo_params *params);
|
struct mgmt_rx_reo_params *params);
|
||||||
|
|
||||||
|
QDF_STATUS (*send_mgmt_rx_reo_filter_config_cmd)(
|
||||||
|
wmi_unified_t wmi_handle,
|
||||||
|
uint8_t pdev_id,
|
||||||
|
struct mgmt_rx_reo_filter *filter);
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -1978,6 +1978,18 @@ wmi_extract_mgmt_rx_reo_params(wmi_unified_t wmi_handle, void *evt_buf,
|
|||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QDF_STATUS wmi_unified_mgmt_rx_reo_filter_config_cmd(
|
||||||
|
wmi_unified_t wmi_handle,
|
||||||
|
uint8_t pdev_id,
|
||||||
|
struct mgmt_rx_reo_filter *filter)
|
||||||
|
{
|
||||||
|
if (wmi_handle->ops->send_mgmt_rx_reo_filter_config_cmd)
|
||||||
|
return wmi_handle->ops->send_mgmt_rx_reo_filter_config_cmd(
|
||||||
|
wmi_handle, pdev_id, filter);
|
||||||
|
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QDF_STATUS
|
QDF_STATUS
|
||||||
|
@@ -10709,6 +10709,62 @@ static QDF_STATUS extract_mgmt_rx_reo_params_tlv(wmi_unified_t wmi_handle,
|
|||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* send_mgmt_rx_reo_filter_config_cmd_tlv() - Send MGMT Rx REO filter
|
||||||
|
* configuration command
|
||||||
|
* @wmi_handle: wmi handle
|
||||||
|
* @pdev_id: pdev ID of the radio
|
||||||
|
* @filter: Pointer to MGMT Rx REO filter
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS for success or error code
|
||||||
|
*/
|
||||||
|
static QDF_STATUS send_mgmt_rx_reo_filter_config_cmd_tlv(
|
||||||
|
wmi_unified_t wmi_handle,
|
||||||
|
uint8_t pdev_id,
|
||||||
|
struct mgmt_rx_reo_filter *filter)
|
||||||
|
{
|
||||||
|
QDF_STATUS ret;
|
||||||
|
wmi_buf_t buf;
|
||||||
|
wmi_mgmt_rx_reo_filter_configuration_cmd_fixed_param *cmd;
|
||||||
|
size_t len = sizeof(*cmd);
|
||||||
|
|
||||||
|
if (!filter) {
|
||||||
|
wmi_err("mgmt_rx_reo_filter is NULL");
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
buf = wmi_buf_alloc(wmi_handle, len);
|
||||||
|
if (!buf) {
|
||||||
|
wmi_err("wmi_buf_alloc failed");
|
||||||
|
return QDF_STATUS_E_NOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
|
cmd = (wmi_mgmt_rx_reo_filter_configuration_cmd_fixed_param *)
|
||||||
|
wmi_buf_data(buf);
|
||||||
|
|
||||||
|
WMITLV_SET_HDR(&cmd->tlv_header,
|
||||||
|
WMITLV_TAG_STRUC_wmi_mgmt_rx_reo_filter_configuration_cmd_fixed_param,
|
||||||
|
WMITLV_GET_STRUCT_TLVLEN(wmi_mgmt_rx_reo_filter_configuration_cmd_fixed_param));
|
||||||
|
|
||||||
|
cmd->pdev_id = wmi_handle->ops->convert_host_pdev_id_to_target(
|
||||||
|
wmi_handle,
|
||||||
|
pdev_id);
|
||||||
|
cmd->filter_low = filter->low;
|
||||||
|
cmd->filter_high = filter->high;
|
||||||
|
|
||||||
|
wmi_mtrace(WMI_MGMT_RX_REO_FILTER_CONFIGURATION_CMDID, NO_SESSION, 0);
|
||||||
|
ret = wmi_unified_cmd_send(
|
||||||
|
wmi_handle, buf, len,
|
||||||
|
WMI_MGMT_RX_REO_FILTER_CONFIGURATION_CMDID);
|
||||||
|
|
||||||
|
if (QDF_IS_STATUS_ERROR(ret)) {
|
||||||
|
wmi_err("Failed to send WMI command");
|
||||||
|
wmi_buf_free(buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -15865,6 +15921,8 @@ struct wmi_ops tlv_ops = {
|
|||||||
#ifdef WLAN_MGMT_RX_REO_SUPPORT
|
#ifdef WLAN_MGMT_RX_REO_SUPPORT
|
||||||
.extract_mgmt_rx_fw_consumed = extract_mgmt_rx_fw_consumed_tlv,
|
.extract_mgmt_rx_fw_consumed = extract_mgmt_rx_fw_consumed_tlv,
|
||||||
.extract_mgmt_rx_reo_params = extract_mgmt_rx_reo_params_tlv,
|
.extract_mgmt_rx_reo_params = extract_mgmt_rx_reo_params_tlv,
|
||||||
|
.send_mgmt_rx_reo_filter_config_cmd =
|
||||||
|
send_mgmt_rx_reo_filter_config_cmd_tlv,
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user