Test commit for wmi/src/
This commit is contained in:
1350
wmi_tlv_helper.c
1350
wmi_tlv_helper.c
File diff suppressed because it is too large
Load Diff
@@ -1,43 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2013-2014, 2016-2017 The Linux Foundation. All rights reserved.
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
|
||||||
* above copyright notice and this permission notice appear in all
|
|
||||||
* copies.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
|
||||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
|
||||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
||||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* LMAC offload interface functions for WMI TLV Interface
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <qdf_mem.h> /* qdf_mem_malloc,free, etc. */
|
|
||||||
#include <osdep.h>
|
|
||||||
#include "htc_api.h"
|
|
||||||
#include "wmi.h"
|
|
||||||
|
|
||||||
|
|
||||||
/* Following macro definitions use OS or platform specific functions */
|
|
||||||
#define dummy_print(fmt, ...) {}
|
|
||||||
#define wmi_tlv_print_verbose dummy_print
|
|
||||||
#define wmi_tlv_print_error qdf_print
|
|
||||||
#define wmi_tlv_OS_MEMCPY OS_MEMCPY
|
|
||||||
#define wmi_tlv_OS_MEMZERO OS_MEMZERO
|
|
||||||
#define wmi_tlv_OS_MEMMOVE OS_MEMMOVE
|
|
||||||
|
|
||||||
#ifndef NO_DYNAMIC_MEM_ALLOC
|
|
||||||
#define wmi_tlv_os_mem_alloc(scn, ptr, numBytes) \
|
|
||||||
{ \
|
|
||||||
(ptr) = qdf_mem_malloc(numBytes); \
|
|
||||||
}
|
|
||||||
#define wmi_tlv_os_mem_free qdf_mem_free
|
|
||||||
#endif
|
|
2975
wmi_unified.c
2975
wmi_unified.c
File diff suppressed because it is too large
Load Diff
@@ -1,291 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
|
||||||
* above copyright notice and this permission notice appear in all
|
|
||||||
* copies.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
|
||||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
|
||||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
||||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "wmi_unified_action_oui_tlv.h"
|
|
||||||
|
|
||||||
bool wmi_get_action_oui_id(enum action_oui_id action_id,
|
|
||||||
wmi_vendor_oui_action_id *id)
|
|
||||||
{
|
|
||||||
switch (action_id) {
|
|
||||||
|
|
||||||
case ACTION_OUI_CONNECT_1X1:
|
|
||||||
*id = WMI_VENDOR_OUI_ACTION_CONNECTION_1X1;
|
|
||||||
return true;
|
|
||||||
|
|
||||||
case ACTION_OUI_ITO_EXTENSION:
|
|
||||||
*id = WMI_VENDOR_OUI_ACTION_ITO_EXTENSION;
|
|
||||||
return true;
|
|
||||||
|
|
||||||
case ACTION_OUI_CCKM_1X1:
|
|
||||||
*id = WMI_VENDOR_OUI_ACTION_CCKM_1X1;
|
|
||||||
return true;
|
|
||||||
|
|
||||||
case ACTION_OUI_ITO_ALTERNATE:
|
|
||||||
*id = WMI_VENDOR_OUI_ACTION_ALT_ITO;
|
|
||||||
return true;
|
|
||||||
|
|
||||||
case ACTION_OUI_SWITCH_TO_11N_MODE:
|
|
||||||
*id = WMI_VENDOR_OUI_ACTION_SWITCH_TO_11N_MODE;
|
|
||||||
return true;
|
|
||||||
|
|
||||||
case ACTION_OUI_CONNECT_1X1_WITH_1_CHAIN:
|
|
||||||
*id = WMI_VENDOR_OUI_ACTION_CONNECTION_1X1_NUM_TX_RX_CHAINS_1;
|
|
||||||
return true;
|
|
||||||
|
|
||||||
case ACTION_OUI_DISABLE_AGGRESSIVE_TX:
|
|
||||||
*id = WMI_VENDOR_OUI_ACTION_DISABLE_AGGRESSIVE_TX;
|
|
||||||
return true;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t wmi_get_action_oui_info_mask(uint32_t info_mask)
|
|
||||||
{
|
|
||||||
uint32_t info_presence = 0;
|
|
||||||
|
|
||||||
if (info_mask & ACTION_OUI_INFO_OUI)
|
|
||||||
info_presence |= WMI_BEACON_INFO_PRESENCE_OUI_EXT;
|
|
||||||
|
|
||||||
if (info_mask & ACTION_OUI_INFO_MAC_ADDRESS)
|
|
||||||
info_presence |= WMI_BEACON_INFO_PRESENCE_MAC_ADDRESS;
|
|
||||||
|
|
||||||
if (info_mask & ACTION_OUI_INFO_AP_CAPABILITY_NSS)
|
|
||||||
info_presence |= WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_NSS;
|
|
||||||
|
|
||||||
if (info_mask & ACTION_OUI_INFO_AP_CAPABILITY_HT)
|
|
||||||
info_presence |= WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_HT;
|
|
||||||
|
|
||||||
if (info_mask & ACTION_OUI_INFO_AP_CAPABILITY_VHT)
|
|
||||||
info_presence |= WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_VHT;
|
|
||||||
|
|
||||||
if (info_mask & ACTION_OUI_INFO_AP_CAPABILITY_BAND)
|
|
||||||
info_presence |= WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_BAND;
|
|
||||||
|
|
||||||
return info_presence;
|
|
||||||
}
|
|
||||||
|
|
||||||
void wmi_fill_oui_extensions(struct action_oui_extension *extension,
|
|
||||||
uint32_t no_oui_extns,
|
|
||||||
wmi_vendor_oui_ext *cmd_ext)
|
|
||||||
{
|
|
||||||
uint32_t i;
|
|
||||||
uint32_t buffer_length;
|
|
||||||
|
|
||||||
for (i = 0; i < no_oui_extns; i++) {
|
|
||||||
WMITLV_SET_HDR(&cmd_ext->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_vendor_oui_ext,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN(wmi_vendor_oui_ext));
|
|
||||||
cmd_ext->info_presence_bit_mask =
|
|
||||||
wmi_get_action_oui_info_mask(extension->info_mask);
|
|
||||||
|
|
||||||
cmd_ext->oui_header_length = extension->oui_length;
|
|
||||||
cmd_ext->oui_data_length = extension->data_length;
|
|
||||||
cmd_ext->mac_address_length = extension->mac_addr_length;
|
|
||||||
cmd_ext->capability_data_length =
|
|
||||||
extension->capability_length;
|
|
||||||
|
|
||||||
buffer_length = extension->oui_length +
|
|
||||||
extension->data_length +
|
|
||||||
extension->data_mask_length +
|
|
||||||
extension->mac_addr_length +
|
|
||||||
extension->mac_mask_length +
|
|
||||||
extension->capability_length;
|
|
||||||
|
|
||||||
cmd_ext->buf_data_length = buffer_length + 1;
|
|
||||||
|
|
||||||
cmd_ext++;
|
|
||||||
extension++;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS
|
|
||||||
wmi_fill_oui_extensions_buffer(struct action_oui_extension *extension,
|
|
||||||
wmi_vendor_oui_ext *cmd_ext,
|
|
||||||
uint32_t no_oui_extns, uint32_t rem_var_buf_len,
|
|
||||||
uint8_t *var_buf)
|
|
||||||
{
|
|
||||||
uint8_t i;
|
|
||||||
|
|
||||||
for (i = 0; i < (uint8_t)no_oui_extns; i++) {
|
|
||||||
if ((rem_var_buf_len - cmd_ext->buf_data_length) < 0) {
|
|
||||||
WMI_LOGE(FL("Invalid action oui command length"));
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
var_buf[0] = i;
|
|
||||||
var_buf++;
|
|
||||||
|
|
||||||
if (extension->oui_length) {
|
|
||||||
qdf_mem_copy(var_buf, extension->oui,
|
|
||||||
extension->oui_length);
|
|
||||||
var_buf += extension->oui_length;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (extension->data_length) {
|
|
||||||
qdf_mem_copy(var_buf, extension->data,
|
|
||||||
extension->data_length);
|
|
||||||
var_buf += extension->data_length;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (extension->data_mask_length) {
|
|
||||||
qdf_mem_copy(var_buf, extension->data_mask,
|
|
||||||
extension->data_mask_length);
|
|
||||||
var_buf += extension->data_mask_length;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (extension->mac_addr_length) {
|
|
||||||
qdf_mem_copy(var_buf, extension->mac_addr,
|
|
||||||
extension->mac_addr_length);
|
|
||||||
var_buf += extension->mac_addr_length;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (extension->mac_mask_length) {
|
|
||||||
qdf_mem_copy(var_buf, extension->mac_mask,
|
|
||||||
extension->mac_mask_length);
|
|
||||||
var_buf += extension->mac_mask_length;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (extension->capability_length) {
|
|
||||||
qdf_mem_copy(var_buf, extension->capability,
|
|
||||||
extension->capability_length);
|
|
||||||
var_buf += extension->capability_length;
|
|
||||||
}
|
|
||||||
|
|
||||||
rem_var_buf_len -= cmd_ext->buf_data_length;
|
|
||||||
cmd_ext++;
|
|
||||||
extension++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS
|
|
||||||
send_action_oui_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
struct action_oui_request *req)
|
|
||||||
{
|
|
||||||
wmi_pdev_config_vendor_oui_action_fixed_param *cmd;
|
|
||||||
wmi_vendor_oui_ext *cmd_ext;
|
|
||||||
wmi_buf_t wmi_buf;
|
|
||||||
struct action_oui_extension *extension;
|
|
||||||
uint32_t len;
|
|
||||||
uint32_t i;
|
|
||||||
uint8_t *buf_ptr;
|
|
||||||
uint32_t no_oui_extns;
|
|
||||||
uint32_t total_no_oui_extns;
|
|
||||||
uint32_t var_buf_len = 0;
|
|
||||||
wmi_vendor_oui_action_id action_id;
|
|
||||||
bool valid;
|
|
||||||
uint32_t rem_var_buf_len;
|
|
||||||
QDF_STATUS status;
|
|
||||||
|
|
||||||
if (!req) {
|
|
||||||
WMI_LOGE(FL("action oui is empty"));
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
no_oui_extns = req->no_oui_extensions;
|
|
||||||
total_no_oui_extns = req->total_no_oui_extensions;
|
|
||||||
|
|
||||||
len = sizeof(*cmd);
|
|
||||||
len += WMI_TLV_HDR_SIZE; /* Array of wmi_vendor_oui_ext structures */
|
|
||||||
|
|
||||||
if (!no_oui_extns ||
|
|
||||||
no_oui_extns > WMI_MAX_VENDOR_OUI_ACTION_SUPPORTED_PER_ACTION ||
|
|
||||||
(total_no_oui_extns > WMI_VENDOR_OUI_ACTION_MAX_ACTION_ID *
|
|
||||||
WMI_MAX_VENDOR_OUI_ACTION_SUPPORTED_PER_ACTION)) {
|
|
||||||
WMI_LOGE(FL("Invalid number of action oui extensions"));
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
valid = wmi_get_action_oui_id(req->action_id, &action_id);
|
|
||||||
if (!valid) {
|
|
||||||
WMI_LOGE(FL("Invalid action id"));
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
len += no_oui_extns * sizeof(*cmd_ext);
|
|
||||||
len += WMI_TLV_HDR_SIZE; /* Variable length buffer */
|
|
||||||
|
|
||||||
extension = req->extension;
|
|
||||||
for (i = 0; i < no_oui_extns; i++) {
|
|
||||||
var_buf_len += extension->oui_length +
|
|
||||||
extension->data_length +
|
|
||||||
extension->data_mask_length +
|
|
||||||
extension->mac_addr_length +
|
|
||||||
extension->mac_mask_length +
|
|
||||||
extension->capability_length;
|
|
||||||
extension++;
|
|
||||||
}
|
|
||||||
|
|
||||||
var_buf_len += no_oui_extns; /* to store indexes */
|
|
||||||
rem_var_buf_len = var_buf_len;
|
|
||||||
var_buf_len = (var_buf_len + 3) & ~0x3;
|
|
||||||
len += var_buf_len;
|
|
||||||
|
|
||||||
wmi_buf = wmi_buf_alloc(wmi_handle, len);
|
|
||||||
if (!wmi_buf) {
|
|
||||||
WMI_LOGE(FL("Failed to allocate wmi buffer"));
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
buf_ptr = (uint8_t *)wmi_buf_data(wmi_buf);
|
|
||||||
cmd = (wmi_pdev_config_vendor_oui_action_fixed_param *)buf_ptr;
|
|
||||||
|
|
||||||
WMITLV_SET_HDR(&cmd->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_pdev_config_vendor_oui_action_fixed_param,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN(
|
|
||||||
wmi_pdev_config_vendor_oui_action_fixed_param));
|
|
||||||
|
|
||||||
cmd->action_id = action_id;
|
|
||||||
cmd->total_num_vendor_oui = total_no_oui_extns;
|
|
||||||
cmd->num_vendor_oui_ext = no_oui_extns;
|
|
||||||
|
|
||||||
buf_ptr += sizeof(*cmd);
|
|
||||||
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC,
|
|
||||||
no_oui_extns * sizeof(*cmd_ext));
|
|
||||||
buf_ptr += WMI_TLV_HDR_SIZE;
|
|
||||||
cmd_ext = (wmi_vendor_oui_ext *)buf_ptr;
|
|
||||||
wmi_fill_oui_extensions(req->extension, no_oui_extns, cmd_ext);
|
|
||||||
|
|
||||||
buf_ptr += no_oui_extns * sizeof(*cmd_ext);
|
|
||||||
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE, var_buf_len);
|
|
||||||
buf_ptr += WMI_TLV_HDR_SIZE;
|
|
||||||
status = wmi_fill_oui_extensions_buffer(req->extension,
|
|
||||||
cmd_ext, no_oui_extns,
|
|
||||||
rem_var_buf_len, buf_ptr);
|
|
||||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
|
||||||
wmi_buf_free(wmi_buf);
|
|
||||||
wmi_buf = NULL;
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
buf_ptr += var_buf_len;
|
|
||||||
|
|
||||||
if (wmi_unified_cmd_send(wmi_handle, wmi_buf, len,
|
|
||||||
WMI_PDEV_CONFIG_VENDOR_OUI_ACTION_CMDID)) {
|
|
||||||
WMI_LOGE(FL("WMI_PDEV_CONFIG_VENDOR_OUI_ACTION send fail"));
|
|
||||||
wmi_buf_free(wmi_buf);
|
|
||||||
wmi_buf = NULL;
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
@@ -1,225 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
|
||||||
* above copyright notice and this permission notice appear in all
|
|
||||||
* copies.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
|
||||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
|
||||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
||||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "wmi_unified_apf_tlv.h"
|
|
||||||
|
|
||||||
QDF_STATUS wmi_send_set_active_apf_mode_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
uint8_t vdev_id,
|
|
||||||
enum wmi_host_active_apf_mode
|
|
||||||
ucast_mode,
|
|
||||||
enum wmi_host_active_apf_mode
|
|
||||||
mcast_bcast_mode)
|
|
||||||
{
|
|
||||||
const WMITLV_TAG_ID tag_id =
|
|
||||||
WMITLV_TAG_STRUC_wmi_bpf_set_vdev_active_mode_cmd_fixed_param;
|
|
||||||
const uint32_t tlv_len = WMITLV_GET_STRUCT_TLVLEN(
|
|
||||||
wmi_bpf_set_vdev_active_mode_cmd_fixed_param);
|
|
||||||
QDF_STATUS status;
|
|
||||||
wmi_bpf_set_vdev_active_mode_cmd_fixed_param *cmd;
|
|
||||||
wmi_buf_t buf;
|
|
||||||
|
|
||||||
WMI_LOGD("Sending WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID(%u, %d, %d)",
|
|
||||||
vdev_id, ucast_mode, mcast_bcast_mode);
|
|
||||||
|
|
||||||
/* allocate command buffer */
|
|
||||||
buf = wmi_buf_alloc(wmi_handle, sizeof(*cmd));
|
|
||||||
if (!buf) {
|
|
||||||
WMI_LOGE("%s: wmi_buf_alloc failed", __func__);
|
|
||||||
return QDF_STATUS_E_NOMEM;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* set TLV header */
|
|
||||||
cmd = (wmi_bpf_set_vdev_active_mode_cmd_fixed_param *)wmi_buf_data(buf);
|
|
||||||
WMITLV_SET_HDR(&cmd->tlv_header, tag_id, tlv_len);
|
|
||||||
|
|
||||||
/* populate data */
|
|
||||||
cmd->vdev_id = vdev_id;
|
|
||||||
cmd->uc_mode = ucast_mode;
|
|
||||||
cmd->mcbc_mode = mcast_bcast_mode;
|
|
||||||
|
|
||||||
/* send to FW */
|
|
||||||
status = wmi_unified_cmd_send(wmi_handle, buf, sizeof(*cmd),
|
|
||||||
WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID);
|
|
||||||
if (QDF_IS_STATUS_ERROR(status)) {
|
|
||||||
WMI_LOGE("Failed to send WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID:%d",
|
|
||||||
status);
|
|
||||||
wmi_buf_free(buf);
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_send_apf_enable_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
uint32_t vdev_id,
|
|
||||||
bool enable)
|
|
||||||
{
|
|
||||||
wmi_bpf_set_vdev_enable_cmd_fixed_param *cmd;
|
|
||||||
wmi_buf_t buf;
|
|
||||||
|
|
||||||
buf = wmi_buf_alloc(wmi_handle, sizeof(*cmd));
|
|
||||||
if (!buf) {
|
|
||||||
WMI_LOGP("%s: wmi_buf_alloc failed", __func__);
|
|
||||||
return QDF_STATUS_E_NOMEM;
|
|
||||||
}
|
|
||||||
|
|
||||||
cmd = (wmi_bpf_set_vdev_enable_cmd_fixed_param *) wmi_buf_data(buf);
|
|
||||||
WMITLV_SET_HDR(&cmd->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_bpf_set_vdev_enable_cmd_fixed_param,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN(
|
|
||||||
wmi_bpf_set_vdev_enable_cmd_fixed_param));
|
|
||||||
cmd->vdev_id = vdev_id;
|
|
||||||
cmd->is_enabled = enable;
|
|
||||||
|
|
||||||
if (wmi_unified_cmd_send(wmi_handle, buf, sizeof(*cmd),
|
|
||||||
WMI_BPF_SET_VDEV_ENABLE_CMDID)) {
|
|
||||||
WMI_LOGE("%s: Failed to enable/disable APF interpreter",
|
|
||||||
__func__);
|
|
||||||
wmi_buf_free(buf);
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS
|
|
||||||
wmi_send_apf_write_work_memory_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
struct wmi_apf_write_memory_params
|
|
||||||
*apf_write_params)
|
|
||||||
{
|
|
||||||
wmi_bpf_set_vdev_work_memory_cmd_fixed_param *cmd;
|
|
||||||
uint32_t wmi_buf_len;
|
|
||||||
wmi_buf_t buf;
|
|
||||||
uint8_t *buf_ptr;
|
|
||||||
uint32_t aligned_len = 0;
|
|
||||||
|
|
||||||
wmi_buf_len = sizeof(*cmd);
|
|
||||||
if (apf_write_params->length) {
|
|
||||||
aligned_len = roundup(apf_write_params->length,
|
|
||||||
sizeof(A_UINT32));
|
|
||||||
|
|
||||||
wmi_buf_len += WMI_TLV_HDR_SIZE + aligned_len;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
buf = wmi_buf_alloc(wmi_handle, wmi_buf_len);
|
|
||||||
if (!buf) {
|
|
||||||
WMI_LOGP("%s: wmi_buf_alloc failed", __func__);
|
|
||||||
return QDF_STATUS_E_NOMEM;
|
|
||||||
}
|
|
||||||
|
|
||||||
buf_ptr = wmi_buf_data(buf);
|
|
||||||
cmd = (wmi_bpf_set_vdev_work_memory_cmd_fixed_param *)buf_ptr;
|
|
||||||
WMITLV_SET_HDR(&cmd->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_bpf_set_vdev_work_memory_cmd_fixed_param,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN(
|
|
||||||
wmi_bpf_set_vdev_work_memory_cmd_fixed_param));
|
|
||||||
cmd->vdev_id = apf_write_params->vdev_id;
|
|
||||||
cmd->bpf_version = apf_write_params->apf_version;
|
|
||||||
cmd->program_len = apf_write_params->program_len;
|
|
||||||
cmd->addr_offset = apf_write_params->addr_offset;
|
|
||||||
cmd->length = apf_write_params->length;
|
|
||||||
|
|
||||||
if (apf_write_params->length) {
|
|
||||||
buf_ptr += sizeof(*cmd);
|
|
||||||
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE,
|
|
||||||
aligned_len);
|
|
||||||
buf_ptr += WMI_TLV_HDR_SIZE;
|
|
||||||
qdf_mem_copy(buf_ptr, apf_write_params->buf,
|
|
||||||
apf_write_params->length);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (wmi_unified_cmd_send(wmi_handle, buf, wmi_buf_len,
|
|
||||||
WMI_BPF_SET_VDEV_WORK_MEMORY_CMDID)) {
|
|
||||||
WMI_LOGE("%s: Failed to write APF work memory", __func__);
|
|
||||||
wmi_buf_free(buf);
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS
|
|
||||||
wmi_send_apf_read_work_memory_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
struct wmi_apf_read_memory_params
|
|
||||||
*apf_read_params)
|
|
||||||
{
|
|
||||||
wmi_bpf_get_vdev_work_memory_cmd_fixed_param *cmd;
|
|
||||||
wmi_buf_t buf;
|
|
||||||
|
|
||||||
buf = wmi_buf_alloc(wmi_handle, sizeof(*cmd));
|
|
||||||
if (!buf) {
|
|
||||||
WMI_LOGP("%s: wmi_buf_alloc failed", __func__);
|
|
||||||
return QDF_STATUS_E_NOMEM;
|
|
||||||
}
|
|
||||||
|
|
||||||
cmd = (wmi_bpf_get_vdev_work_memory_cmd_fixed_param *)
|
|
||||||
wmi_buf_data(buf);
|
|
||||||
|
|
||||||
WMITLV_SET_HDR(&cmd->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_bpf_get_vdev_work_memory_cmd_fixed_param,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN(
|
|
||||||
wmi_bpf_get_vdev_work_memory_cmd_fixed_param));
|
|
||||||
cmd->vdev_id = apf_read_params->vdev_id;
|
|
||||||
cmd->addr_offset = apf_read_params->addr_offset;
|
|
||||||
cmd->length = apf_read_params->length;
|
|
||||||
|
|
||||||
if (wmi_unified_cmd_send(wmi_handle, buf, sizeof(*cmd),
|
|
||||||
WMI_BPF_GET_VDEV_WORK_MEMORY_CMDID)) {
|
|
||||||
WMI_LOGE("%s: Failed to get APF work memory", __func__);
|
|
||||||
wmi_buf_free(buf);
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS
|
|
||||||
wmi_extract_apf_read_memory_resp_event_tlv(wmi_unified_t wmi_handle,
|
|
||||||
void *evt_buf,
|
|
||||||
struct wmi_apf_read_memory_resp_event_params
|
|
||||||
*resp)
|
|
||||||
{
|
|
||||||
WMI_BPF_GET_VDEV_WORK_MEMORY_RESP_EVENTID_param_tlvs *param_buf;
|
|
||||||
wmi_bpf_get_vdev_work_memory_resp_evt_fixed_param *data_event;
|
|
||||||
|
|
||||||
param_buf = evt_buf;
|
|
||||||
if (!param_buf) {
|
|
||||||
WMI_LOGE("encrypt decrypt resp evt_buf is NULL");
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
data_event = param_buf->fixed_param;
|
|
||||||
|
|
||||||
resp->vdev_id = data_event->vdev_id;
|
|
||||||
resp->offset = data_event->offset;
|
|
||||||
resp->more_data = data_event->fragment;
|
|
||||||
|
|
||||||
if (data_event->length > param_buf->num_data) {
|
|
||||||
WMI_LOGE("FW msg data_len %d more than TLV hdr %d",
|
|
||||||
data_event->length,
|
|
||||||
param_buf->num_data);
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
resp->length = data_event->length;
|
|
||||||
|
|
||||||
if (resp->length)
|
|
||||||
resp->data = (uint8_t *)param_buf->data;
|
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
4576
wmi_unified_api.c
4576
wmi_unified_api.c
File diff suppressed because it is too large
Load Diff
@@ -1,44 +0,0 @@
|
|||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
|
||||||
* above copyright notice and this permission notice appear in all
|
|
||||||
* copies.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
|
||||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
|
||||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
||||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* DOC: Implement API's specific to concurrency component.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "wmi_unified_bcn_api.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wmi_unified_bcn_buf_ll_cmd() - prepare and send beacon buffer to fw for LL
|
|
||||||
* @wmi_hdl: wmi handle
|
|
||||||
* @param: bcn ll cmd parameter
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
|
||||||
*/
|
|
||||||
|
|
||||||
QDF_STATUS
|
|
||||||
wmi_unified_bcn_buf_ll_cmd(void *wmi_hdl,
|
|
||||||
wmi_bcn_send_from_host_cmd_fixed_param *param)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_bcn_buf_ll_cmd)
|
|
||||||
return wmi_handle->ops->send_bcn_buf_ll_cmd(wmi_handle,
|
|
||||||
param);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
@@ -1,65 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
|
||||||
* above copyright notice and this permission notice appear in all
|
|
||||||
* copies.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
|
||||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
|
||||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
||||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* DOC: Implement API's specific to concurrency component.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <wmi_unified_priv.h>
|
|
||||||
#include <wmi_unified_concurrency_api.h>
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd(
|
|
||||||
void *wmi_hdl, uint32_t mcc_adaptive_scheduler,
|
|
||||||
uint32_t pdev_id)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_set_enable_disable_mcc_adaptive_scheduler_cmd)
|
|
||||||
return wmi_handle->ops->send_set_enable_disable_mcc_adaptive_scheduler_cmd(wmi_handle,
|
|
||||||
mcc_adaptive_scheduler, pdev_id);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_set_mcc_channel_time_latency_cmd(void *wmi_hdl,
|
|
||||||
uint32_t mcc_channel_freq, uint32_t mcc_channel_time_latency)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_set_mcc_channel_time_latency_cmd)
|
|
||||||
return wmi_handle->ops->send_set_mcc_channel_time_latency_cmd(wmi_handle,
|
|
||||||
mcc_channel_freq,
|
|
||||||
mcc_channel_time_latency);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_set_mcc_channel_time_quota_cmd(void *wmi_hdl,
|
|
||||||
uint32_t adapter_1_chan_freq,
|
|
||||||
uint32_t adapter_1_quota, uint32_t adapter_2_chan_freq)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_set_mcc_channel_time_quota_cmd)
|
|
||||||
return wmi_handle->ops->send_set_mcc_channel_time_quota_cmd(wmi_handle,
|
|
||||||
adapter_1_chan_freq,
|
|
||||||
adapter_1_quota,
|
|
||||||
adapter_2_chan_freq);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
@@ -1,242 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
|
||||||
* above copyright notice and this permission notice appear in all
|
|
||||||
* copies.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
|
||||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
|
||||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
||||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <osdep.h>
|
|
||||||
#include <wmi.h>
|
|
||||||
#include <wmi_unified_priv.h>
|
|
||||||
#include <wmi_unified_concurrency_api.h>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* send_set_enable_disable_mcc_adaptive_scheduler_cmd_tlv() -enable/disable
|
|
||||||
* mcc scheduler
|
|
||||||
* @wmi_handle: wmi handle
|
|
||||||
* @mcc_adaptive_scheduler: enable/disable
|
|
||||||
*
|
|
||||||
* This function enable/disable mcc adaptive scheduler in fw.
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS for success or error code
|
|
||||||
*/
|
|
||||||
static QDF_STATUS send_set_enable_disable_mcc_adaptive_scheduler_cmd_tlv(
|
|
||||||
wmi_unified_t wmi_handle, uint32_t mcc_adaptive_scheduler,
|
|
||||||
uint32_t pdev_id)
|
|
||||||
{
|
|
||||||
QDF_STATUS ret;
|
|
||||||
wmi_buf_t buf = 0;
|
|
||||||
wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param *cmd = NULL;
|
|
||||||
uint16_t len =
|
|
||||||
sizeof(wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param);
|
|
||||||
|
|
||||||
buf = wmi_buf_alloc(wmi_handle, len);
|
|
||||||
if (!buf) {
|
|
||||||
return QDF_STATUS_E_NOMEM;
|
|
||||||
}
|
|
||||||
cmd = (wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param *)
|
|
||||||
wmi_buf_data(buf);
|
|
||||||
|
|
||||||
WMITLV_SET_HDR(&cmd->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN
|
|
||||||
(wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param));
|
|
||||||
cmd->enable = mcc_adaptive_scheduler;
|
|
||||||
cmd->pdev_id = wmi_handle->ops->convert_pdev_id_host_to_target(pdev_id);
|
|
||||||
|
|
||||||
wmi_mtrace(WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID, NO_SESSION, 0);
|
|
||||||
ret = wmi_unified_cmd_send(wmi_handle, buf, len,
|
|
||||||
WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID);
|
|
||||||
if (QDF_IS_STATUS_ERROR(ret)) {
|
|
||||||
WMI_LOGP("%s: Failed to send enable/disable MCC"
|
|
||||||
" adaptive scheduler command", __func__);
|
|
||||||
wmi_buf_free(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* send_set_mcc_channel_time_latency_cmd_tlv() -set MCC channel time latency
|
|
||||||
* @wmi: wmi handle
|
|
||||||
* @mcc_channel: mcc channel
|
|
||||||
* @mcc_channel_time_latency: MCC channel time latency.
|
|
||||||
*
|
|
||||||
* Currently used to set time latency for an MCC vdev/adapter using operating
|
|
||||||
* channel of it and channel number. The info is provided run time using
|
|
||||||
* iwpriv command: iwpriv <wlan0 | p2p0> setMccLatency <latency in ms>.
|
|
||||||
*
|
|
||||||
* Return: CDF status
|
|
||||||
*/
|
|
||||||
static QDF_STATUS send_set_mcc_channel_time_latency_cmd_tlv(
|
|
||||||
wmi_unified_t wmi_handle,
|
|
||||||
uint32_t mcc_channel_freq,
|
|
||||||
uint32_t mcc_channel_time_latency)
|
|
||||||
{
|
|
||||||
QDF_STATUS ret;
|
|
||||||
wmi_buf_t buf = 0;
|
|
||||||
wmi_resmgr_set_chan_latency_cmd_fixed_param *cmdTL = NULL;
|
|
||||||
uint16_t len = 0;
|
|
||||||
uint8_t *buf_ptr = NULL;
|
|
||||||
wmi_resmgr_chan_latency chan_latency;
|
|
||||||
/* Note: we only support MCC time latency for a single channel */
|
|
||||||
uint32_t num_channels = 1;
|
|
||||||
uint32_t chan1_freq = mcc_channel_freq;
|
|
||||||
uint32_t latency_chan1 = mcc_channel_time_latency;
|
|
||||||
|
|
||||||
/* If 0ms latency is provided, then FW will set to a default.
|
|
||||||
* Otherwise, latency must be at least 30ms.
|
|
||||||
*/
|
|
||||||
if ((latency_chan1 > 0) &&
|
|
||||||
(latency_chan1 < WMI_MCC_MIN_NON_ZERO_CHANNEL_LATENCY)) {
|
|
||||||
WMI_LOGE("%s: Invalid time latency for Channel #1 = %dms "
|
|
||||||
"Minimum is 30ms (or 0 to use default value by "
|
|
||||||
"firmware)", __func__, latency_chan1);
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set WMI CMD for channel time latency here */
|
|
||||||
len = sizeof(wmi_resmgr_set_chan_latency_cmd_fixed_param) +
|
|
||||||
WMI_TLV_HDR_SIZE + /*Place holder for chan_time_latency array */
|
|
||||||
num_channels * sizeof(wmi_resmgr_chan_latency);
|
|
||||||
buf = wmi_buf_alloc(wmi_handle, len);
|
|
||||||
if (!buf) {
|
|
||||||
return QDF_STATUS_E_NOMEM;
|
|
||||||
}
|
|
||||||
buf_ptr = (uint8_t *) wmi_buf_data(buf);
|
|
||||||
cmdTL = (wmi_resmgr_set_chan_latency_cmd_fixed_param *)
|
|
||||||
wmi_buf_data(buf);
|
|
||||||
WMITLV_SET_HDR(&cmdTL->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_resmgr_set_chan_latency_cmd_fixed_param,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN
|
|
||||||
(wmi_resmgr_set_chan_latency_cmd_fixed_param));
|
|
||||||
cmdTL->num_chans = num_channels;
|
|
||||||
/* Update channel time latency information for home channel(s) */
|
|
||||||
buf_ptr += sizeof(*cmdTL);
|
|
||||||
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE,
|
|
||||||
num_channels * sizeof(wmi_resmgr_chan_latency));
|
|
||||||
buf_ptr += WMI_TLV_HDR_SIZE;
|
|
||||||
chan_latency.chan_mhz = chan1_freq;
|
|
||||||
chan_latency.latency = latency_chan1;
|
|
||||||
qdf_mem_copy(buf_ptr, &chan_latency, sizeof(chan_latency));
|
|
||||||
wmi_mtrace(WMI_RESMGR_SET_CHAN_LATENCY_CMDID, NO_SESSION, 0);
|
|
||||||
ret = wmi_unified_cmd_send(wmi_handle, buf, len,
|
|
||||||
WMI_RESMGR_SET_CHAN_LATENCY_CMDID);
|
|
||||||
if (QDF_IS_STATUS_ERROR(ret)) {
|
|
||||||
WMI_LOGE("%s: Failed to send MCC Channel Time Latency command",
|
|
||||||
__func__);
|
|
||||||
wmi_buf_free(buf);
|
|
||||||
QDF_ASSERT(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* send_set_mcc_channel_time_quota_cmd_tlv() -set MCC channel time quota
|
|
||||||
* @wmi: wmi handle
|
|
||||||
* @adapter_1_chan_number: adapter 1 channel number
|
|
||||||
* @adapter_1_quota: adapter 1 quota
|
|
||||||
* @adapter_2_chan_number: adapter 2 channel number
|
|
||||||
*
|
|
||||||
* Return: CDF status
|
|
||||||
*/
|
|
||||||
static QDF_STATUS send_set_mcc_channel_time_quota_cmd_tlv(
|
|
||||||
wmi_unified_t wmi_handle,
|
|
||||||
uint32_t adapter_1_chan_freq,
|
|
||||||
uint32_t adapter_1_quota,
|
|
||||||
uint32_t adapter_2_chan_freq)
|
|
||||||
{
|
|
||||||
QDF_STATUS ret;
|
|
||||||
wmi_buf_t buf = 0;
|
|
||||||
uint16_t len = 0;
|
|
||||||
uint8_t *buf_ptr = NULL;
|
|
||||||
wmi_resmgr_set_chan_time_quota_cmd_fixed_param *cmdTQ = NULL;
|
|
||||||
wmi_resmgr_chan_time_quota chan_quota;
|
|
||||||
uint32_t quota_chan1 = adapter_1_quota;
|
|
||||||
/* Knowing quota of 1st chan., derive quota for 2nd chan. */
|
|
||||||
uint32_t quota_chan2 = 100 - quota_chan1;
|
|
||||||
/* Note: setting time quota for MCC requires info for 2 channels */
|
|
||||||
uint32_t num_channels = 2;
|
|
||||||
uint32_t chan1_freq = adapter_1_chan_freq;
|
|
||||||
uint32_t chan2_freq = adapter_2_chan_freq;
|
|
||||||
|
|
||||||
WMI_LOGD("%s: freq1:%dMHz, Quota1:%dms, "
|
|
||||||
"freq2:%dMHz, Quota2:%dms", __func__,
|
|
||||||
chan1_freq, quota_chan1, chan2_freq,
|
|
||||||
quota_chan2);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Perform sanity check on time quota values provided.
|
|
||||||
*/
|
|
||||||
if (quota_chan1 < WMI_MCC_MIN_CHANNEL_QUOTA ||
|
|
||||||
quota_chan1 > WMI_MCC_MAX_CHANNEL_QUOTA) {
|
|
||||||
WMI_LOGE("%s: Invalid time quota for Channel #1=%dms. Minimum "
|
|
||||||
"is 20ms & maximum is 80ms", __func__, quota_chan1);
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
/* Set WMI CMD for channel time quota here */
|
|
||||||
len = sizeof(wmi_resmgr_set_chan_time_quota_cmd_fixed_param) +
|
|
||||||
WMI_TLV_HDR_SIZE + /* Place holder for chan_time_quota array */
|
|
||||||
num_channels * sizeof(wmi_resmgr_chan_time_quota);
|
|
||||||
buf = wmi_buf_alloc(wmi_handle, len);
|
|
||||||
if (!buf) {
|
|
||||||
return QDF_STATUS_E_NOMEM;
|
|
||||||
}
|
|
||||||
buf_ptr = (uint8_t *) wmi_buf_data(buf);
|
|
||||||
cmdTQ = (wmi_resmgr_set_chan_time_quota_cmd_fixed_param *)
|
|
||||||
wmi_buf_data(buf);
|
|
||||||
WMITLV_SET_HDR(&cmdTQ->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_resmgr_set_chan_time_quota_cmd_fixed_param,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN
|
|
||||||
(wmi_resmgr_set_chan_time_quota_cmd_fixed_param));
|
|
||||||
cmdTQ->num_chans = num_channels;
|
|
||||||
|
|
||||||
/* Update channel time quota information for home channel(s) */
|
|
||||||
buf_ptr += sizeof(*cmdTQ);
|
|
||||||
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE,
|
|
||||||
num_channels * sizeof(wmi_resmgr_chan_time_quota));
|
|
||||||
buf_ptr += WMI_TLV_HDR_SIZE;
|
|
||||||
chan_quota.chan_mhz = chan1_freq;
|
|
||||||
chan_quota.channel_time_quota = quota_chan1;
|
|
||||||
qdf_mem_copy(buf_ptr, &chan_quota, sizeof(chan_quota));
|
|
||||||
/* Construct channel and quota record for the 2nd MCC mode. */
|
|
||||||
buf_ptr += sizeof(chan_quota);
|
|
||||||
chan_quota.chan_mhz = chan2_freq;
|
|
||||||
chan_quota.channel_time_quota = quota_chan2;
|
|
||||||
qdf_mem_copy(buf_ptr, &chan_quota, sizeof(chan_quota));
|
|
||||||
|
|
||||||
wmi_mtrace(WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID, NO_SESSION, 0);
|
|
||||||
ret = wmi_unified_cmd_send(wmi_handle, buf, len,
|
|
||||||
WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID);
|
|
||||||
if (QDF_IS_STATUS_ERROR(ret)) {
|
|
||||||
WMI_LOGE("Failed to send MCC Channel Time Quota command");
|
|
||||||
wmi_buf_free(buf);
|
|
||||||
QDF_ASSERT(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
void wmi_concurrency_attach_tlv(wmi_unified_t wmi_handle)
|
|
||||||
{
|
|
||||||
struct wmi_ops *ops = wmi_handle->ops;
|
|
||||||
|
|
||||||
ops->send_set_enable_disable_mcc_adaptive_scheduler_cmd =
|
|
||||||
send_set_enable_disable_mcc_adaptive_scheduler_cmd_tlv;
|
|
||||||
ops->send_set_mcc_channel_time_latency_cmd =
|
|
||||||
send_set_mcc_channel_time_latency_cmd_tlv;
|
|
||||||
ops->send_set_mcc_channel_time_quota_cmd =
|
|
||||||
send_set_mcc_channel_time_quota_cmd_tlv;
|
|
||||||
}
|
|
@@ -1,76 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
|
||||||
* above copyright notice and this permission notice appear in all
|
|
||||||
* copies.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
|
||||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
|
||||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
||||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "wmi_unified_priv.h"
|
|
||||||
#include "qdf_module.h"
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_dbr_ring_cfg(void *wmi_hdl,
|
|
||||||
struct direct_buf_rx_cfg_req *cfg)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_dbr_cfg_cmd)
|
|
||||||
return wmi_handle->ops->send_dbr_cfg_cmd(wmi_handle, cfg);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_dbr_buf_release_fixed(
|
|
||||||
void *wmi_hdl,
|
|
||||||
uint8_t *evt_buf,
|
|
||||||
struct direct_buf_rx_rsp *param)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->extract_dbr_buf_release_fixed)
|
|
||||||
return wmi_handle->ops->extract_dbr_buf_release_fixed(
|
|
||||||
wmi_handle,
|
|
||||||
evt_buf, param);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_dbr_buf_release_entry(
|
|
||||||
void *wmi_hdl,
|
|
||||||
uint8_t *evt_buf, uint8_t idx,
|
|
||||||
struct direct_buf_rx_entry *param)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->extract_dbr_buf_release_entry)
|
|
||||||
return wmi_handle->ops->extract_dbr_buf_release_entry(
|
|
||||||
wmi_handle,
|
|
||||||
evt_buf, idx, param);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_dbr_buf_metadata(
|
|
||||||
void *wmi_hdl,
|
|
||||||
uint8_t *evt_buf, uint8_t idx,
|
|
||||||
struct direct_buf_rx_metadata *param)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->extract_dbr_buf_metadata)
|
|
||||||
return wmi_handle->ops->extract_dbr_buf_metadata(
|
|
||||||
wmi_handle,
|
|
||||||
evt_buf, idx, param);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
@@ -1,172 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
|
||||||
* above copyright notice and this permission notice appear in all
|
|
||||||
* copies.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
|
||||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
|
||||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
||||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <osdep.h>
|
|
||||||
#include "wmi.h"
|
|
||||||
#include "wmi_unified_priv.h"
|
|
||||||
#include "wmi_unified_dbr_param.h"
|
|
||||||
#include "wmi_unified_dbr_api.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* send_dbr_cfg_cmd_tlv() - configure DMA rings for Direct Buf RX
|
|
||||||
* @wmi_handle: wmi handle
|
|
||||||
* @data_len: len of dma cfg req
|
|
||||||
* @data: dma cfg req
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
|
||||||
*/
|
|
||||||
static QDF_STATUS send_dbr_cfg_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
struct direct_buf_rx_cfg_req *cfg)
|
|
||||||
{
|
|
||||||
wmi_buf_t buf;
|
|
||||||
wmi_dma_ring_cfg_req_fixed_param *cmd;
|
|
||||||
QDF_STATUS ret;
|
|
||||||
int32_t len = sizeof(*cmd);
|
|
||||||
|
|
||||||
buf = wmi_buf_alloc(wmi_handle, sizeof(*cmd));
|
|
||||||
if (!buf) {
|
|
||||||
WMI_LOGE(FL("wmi_buf_alloc failed"));
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
cmd = (wmi_dma_ring_cfg_req_fixed_param *)wmi_buf_data(buf);
|
|
||||||
|
|
||||||
WMITLV_SET_HDR(&cmd->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_dma_ring_cfg_req_fixed_param,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN(wmi_dma_ring_cfg_req_fixed_param));
|
|
||||||
|
|
||||||
cmd->pdev_id = wmi_handle->ops->convert_pdev_id_host_to_target(
|
|
||||||
cfg->pdev_id);
|
|
||||||
cmd->mod_id = cfg->mod_id;
|
|
||||||
cmd->base_paddr_lo = cfg->base_paddr_lo;
|
|
||||||
cmd->base_paddr_hi = cfg->base_paddr_hi;
|
|
||||||
cmd->head_idx_paddr_lo = cfg->head_idx_paddr_lo;
|
|
||||||
cmd->head_idx_paddr_hi = cfg->head_idx_paddr_hi;
|
|
||||||
cmd->tail_idx_paddr_lo = cfg->tail_idx_paddr_lo;
|
|
||||||
cmd->tail_idx_paddr_hi = cfg->tail_idx_paddr_hi;
|
|
||||||
cmd->num_elems = cfg->num_elems;
|
|
||||||
cmd->buf_size = cfg->buf_size;
|
|
||||||
cmd->num_resp_per_event = cfg->num_resp_per_event;
|
|
||||||
cmd->event_timeout_ms = cfg->event_timeout_ms;
|
|
||||||
|
|
||||||
WMI_LOGD("%s: wmi_dma_ring_cfg_req_fixed_param pdev id %d mod id %d"
|
|
||||||
"base paddr lo %x base paddr hi %x head idx paddr lo %x"
|
|
||||||
"head idx paddr hi %x tail idx paddr lo %x"
|
|
||||||
"tail idx addr hi %x num elems %d buf size %d num resp %d"
|
|
||||||
"event timeout %d", __func__, cmd->pdev_id,
|
|
||||||
cmd->mod_id, cmd->base_paddr_lo, cmd->base_paddr_hi,
|
|
||||||
cmd->head_idx_paddr_lo, cmd->head_idx_paddr_hi,
|
|
||||||
cmd->tail_idx_paddr_lo, cmd->tail_idx_paddr_hi,
|
|
||||||
cmd->num_elems, cmd->buf_size, cmd->num_resp_per_event,
|
|
||||||
cmd->event_timeout_ms);
|
|
||||||
wmi_mtrace(WMI_PDEV_DMA_RING_CFG_REQ_CMDID, NO_SESSION, 0);
|
|
||||||
ret = wmi_unified_cmd_send(wmi_handle, buf, len,
|
|
||||||
WMI_PDEV_DMA_RING_CFG_REQ_CMDID);
|
|
||||||
if (QDF_IS_STATUS_ERROR(ret)) {
|
|
||||||
WMI_LOGE(FL(":wmi cmd send failed"));
|
|
||||||
wmi_buf_free(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static QDF_STATUS extract_dbr_buf_release_fixed_tlv(wmi_unified_t wmi_handle,
|
|
||||||
uint8_t *event, struct direct_buf_rx_rsp *param)
|
|
||||||
{
|
|
||||||
WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID_param_tlvs *param_buf;
|
|
||||||
wmi_dma_buf_release_fixed_param *ev;
|
|
||||||
|
|
||||||
param_buf = (WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID_param_tlvs *)event;
|
|
||||||
if (!param_buf)
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
|
|
||||||
ev = param_buf->fixed_param;
|
|
||||||
if (!ev)
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
|
|
||||||
param->pdev_id = wmi_handle->ops->convert_pdev_id_target_to_host(
|
|
||||||
ev->pdev_id);
|
|
||||||
param->mod_id = ev->mod_id;
|
|
||||||
param->num_buf_release_entry = ev->num_buf_release_entry;
|
|
||||||
param->num_meta_data_entry = ev->num_meta_data_entry;
|
|
||||||
WMI_LOGD("%s:pdev id %d mod id %d num buf release entry %d", __func__,
|
|
||||||
param->pdev_id, param->mod_id, param->num_buf_release_entry);
|
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
static QDF_STATUS extract_dbr_buf_release_entry_tlv(wmi_unified_t wmi_handle,
|
|
||||||
uint8_t *event, uint8_t idx, struct direct_buf_rx_entry *param)
|
|
||||||
{
|
|
||||||
WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID_param_tlvs *param_buf;
|
|
||||||
wmi_dma_buf_release_entry *entry;
|
|
||||||
|
|
||||||
param_buf = (WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID_param_tlvs *)event;
|
|
||||||
if (!param_buf)
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
|
|
||||||
entry = ¶m_buf->entries[idx];
|
|
||||||
|
|
||||||
if (!entry) {
|
|
||||||
WMI_LOGE("%s: Entry is NULL", __func__);
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
WMI_LOGD("%s: paddr_lo[%d] = %x", __func__, idx, entry->paddr_lo);
|
|
||||||
|
|
||||||
param->paddr_lo = entry->paddr_lo;
|
|
||||||
param->paddr_hi = entry->paddr_hi;
|
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
static QDF_STATUS extract_dbr_buf_metadata_tlv(
|
|
||||||
wmi_unified_t wmi_handle, uint8_t *event,
|
|
||||||
uint8_t idx, struct direct_buf_rx_metadata *param)
|
|
||||||
{
|
|
||||||
WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID_param_tlvs *param_buf;
|
|
||||||
wmi_dma_buf_release_spectral_meta_data *entry;
|
|
||||||
|
|
||||||
param_buf = (WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID_param_tlvs *)event;
|
|
||||||
if (!param_buf)
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
|
|
||||||
entry = ¶m_buf->meta_data[idx];
|
|
||||||
|
|
||||||
if (!entry) {
|
|
||||||
WMI_LOGE("%s: Entry is NULL", __func__);
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
qdf_mem_copy(param->noisefloor, entry->noise_floor,
|
|
||||||
qdf_min(sizeof(entry->noise_floor),
|
|
||||||
sizeof(param->noisefloor)));
|
|
||||||
param->reset_delay = entry->reset_delay;
|
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
void wmi_dbr_attach_tlv(wmi_unified_t wmi_handle)
|
|
||||||
{
|
|
||||||
struct wmi_ops *ops = wmi_handle->ops;
|
|
||||||
|
|
||||||
ops->send_dbr_cfg_cmd = send_dbr_cfg_cmd_tlv;
|
|
||||||
ops->extract_dbr_buf_release_entry = extract_dbr_buf_release_entry_tlv;
|
|
||||||
ops->extract_dbr_buf_metadata = extract_dbr_buf_metadata_tlv;
|
|
||||||
ops->extract_dbr_buf_release_fixed = extract_dbr_buf_release_fixed_tlv;
|
|
||||||
}
|
|
@@ -1,117 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
|
||||||
* above copyright notice and this permission notice appear in all
|
|
||||||
* copies.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
|
||||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
|
||||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
||||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* DOC: Implement API's specific to DFS component.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <qdf_status.h>
|
|
||||||
#include <qdf_module.h>
|
|
||||||
#include <wmi_unified_api.h>
|
|
||||||
#include <wmi_unified_priv.h>
|
|
||||||
#include <wlan_dfs_utils_api.h>
|
|
||||||
#include <wmi_unified_dfs_api.h>
|
|
||||||
#include <init_deinit_lmac.h>
|
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_dfs_cac_complete_event(void *wmi_hdl,
|
|
||||||
uint8_t *evt_buf,
|
|
||||||
uint32_t *vdev_id,
|
|
||||||
uint32_t len)
|
|
||||||
{
|
|
||||||
struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle && wmi_handle->ops->extract_dfs_cac_complete_event)
|
|
||||||
return wmi_handle->ops->extract_dfs_cac_complete_event(
|
|
||||||
wmi_handle, evt_buf, vdev_id, len);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
qdf_export_symbol(wmi_extract_dfs_cac_complete_event);
|
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_dfs_radar_detection_event(void *wmi_hdl,
|
|
||||||
uint8_t *evt_buf,
|
|
||||||
struct radar_found_info *radar_found,
|
|
||||||
uint32_t len)
|
|
||||||
{
|
|
||||||
struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle && wmi_handle->ops->extract_dfs_radar_detection_event)
|
|
||||||
return wmi_handle->ops->extract_dfs_radar_detection_event(
|
|
||||||
wmi_handle, evt_buf, radar_found, len);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef QCA_MCL_DFS_SUPPORT
|
|
||||||
QDF_STATUS wmi_extract_wlan_radar_event_info(void *wmi_hdl,
|
|
||||||
uint8_t *evt_buf,
|
|
||||||
struct radar_event_info *wlan_radar_event,
|
|
||||||
uint32_t len)
|
|
||||||
{
|
|
||||||
struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->extract_wlan_radar_event_info)
|
|
||||||
return wmi_handle->ops->extract_wlan_radar_event_info(
|
|
||||||
wmi_handle, evt_buf, wlan_radar_event, len);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
qdf_export_symbol(wmi_extract_dfs_radar_detection_event);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(WLAN_DFS_FULL_OFFLOAD) && defined(QCA_DFS_NOL_OFFLOAD)
|
|
||||||
QDF_STATUS wmi_send_usenol_pdev_param(void *wmi_hdl, bool usenol,
|
|
||||||
struct wlan_objmgr_pdev *pdev)
|
|
||||||
{
|
|
||||||
struct pdev_params pparam;
|
|
||||||
int pdev_idx;
|
|
||||||
struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
|
|
||||||
|
|
||||||
pdev_idx = lmac_get_pdev_idx(pdev);
|
|
||||||
if (pdev_idx < 0)
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
|
|
||||||
qdf_mem_set(&pparam, sizeof(pparam), 0);
|
|
||||||
pparam.param_id = wmi_pdev_param_use_nol;
|
|
||||||
pparam.param_value = usenol;
|
|
||||||
|
|
||||||
return wmi_unified_pdev_param_send(wmi_handle, &pparam, pdev_idx);
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS
|
|
||||||
wmi_send_subchan_marking_pdev_param(void *wmi_hdl,
|
|
||||||
bool subchanmark,
|
|
||||||
struct wlan_objmgr_pdev *pdev)
|
|
||||||
{
|
|
||||||
struct pdev_params pparam;
|
|
||||||
int pdev_idx;
|
|
||||||
struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
|
|
||||||
|
|
||||||
pdev_idx = lmac_get_pdev_idx(pdev);
|
|
||||||
if (pdev_idx < 0)
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
|
|
||||||
qdf_mem_set(&pparam, sizeof(pparam), 0);
|
|
||||||
pparam.param_id = wmi_pdev_param_sub_channel_marking;
|
|
||||||
pparam.param_value = subchanmark;
|
|
||||||
|
|
||||||
return wmi_unified_pdev_param_send(wmi_handle, &pparam, pdev_idx);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
@@ -1,247 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
|
||||||
* above copyright notice and this permission notice appear in all
|
|
||||||
* copies.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
|
||||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
|
||||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
||||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "wmi_unified_priv.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wmi_unified_reset_passpoint_network_list_cmd() - reset passpoint network list
|
|
||||||
* @wmi_hdl: wmi handle
|
|
||||||
* @req: passpoint network request structure
|
|
||||||
*
|
|
||||||
* This function sends down WMI command with network id set to wildcard id.
|
|
||||||
* firmware shall clear all the config entries
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
|
||||||
*/
|
|
||||||
QDF_STATUS wmi_unified_reset_passpoint_network_list_cmd(void *wmi_hdl,
|
|
||||||
struct wifi_passpoint_req_param *req)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_reset_passpoint_network_list_cmd)
|
|
||||||
return wmi_handle->ops->send_reset_passpoint_network_list_cmd(wmi_handle,
|
|
||||||
req);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wmi_unified_set_passpoint_network_list_cmd() - set passpoint network list
|
|
||||||
* @wmi_hdl: wmi handle
|
|
||||||
* @req: passpoint network request structure
|
|
||||||
*
|
|
||||||
* This function reads the incoming @req and fill in the destination
|
|
||||||
* WMI structure and send down the passpoint configs down to the firmware
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
|
||||||
*/
|
|
||||||
QDF_STATUS wmi_unified_set_passpoint_network_list_cmd(void *wmi_hdl,
|
|
||||||
struct wifi_passpoint_req_param *req)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_set_passpoint_network_list_cmd)
|
|
||||||
return wmi_handle->ops->send_set_passpoint_network_list_cmd(wmi_handle,
|
|
||||||
req);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** wmi_unified_set_epno_network_list_cmd() - set epno network list
|
|
||||||
* @wmi_hdl: wmi handle
|
|
||||||
* @req: epno config params request structure
|
|
||||||
*
|
|
||||||
* This function reads the incoming epno config request structure
|
|
||||||
* and constructs the WMI message to the firmware.
|
|
||||||
*
|
|
||||||
* Returns: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures,
|
|
||||||
* error number otherwise
|
|
||||||
*/
|
|
||||||
QDF_STATUS wmi_unified_set_epno_network_list_cmd(void *wmi_hdl,
|
|
||||||
struct wifi_enhanced_pno_params *req)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_set_epno_network_list_cmd)
|
|
||||||
return wmi_handle->ops->send_set_epno_network_list_cmd(wmi_handle,
|
|
||||||
req);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wmi_unified_extscan_get_capabilities_cmd() - extscan get capabilities
|
|
||||||
* @wmi_hdl: wmi handle
|
|
||||||
* @pgetcapab: get capabilities params
|
|
||||||
*
|
|
||||||
* This function send request to fw to get extscan capabilities.
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
|
||||||
*/
|
|
||||||
QDF_STATUS wmi_unified_extscan_get_capabilities_cmd(void *wmi_hdl,
|
|
||||||
struct extscan_capabilities_params *pgetcapab)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_extscan_get_capabilities_cmd)
|
|
||||||
return wmi_handle->ops->send_extscan_get_capabilities_cmd(wmi_handle,
|
|
||||||
pgetcapab);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wmi_unified_extscan_get_cached_results_cmd() - extscan get cached results
|
|
||||||
* @wmi_hdl: wmi handle
|
|
||||||
* @pcached_results: cached results parameters
|
|
||||||
*
|
|
||||||
* This function send request to fw to get cached results.
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
|
||||||
*/
|
|
||||||
QDF_STATUS wmi_unified_extscan_get_cached_results_cmd(void *wmi_hdl,
|
|
||||||
struct extscan_cached_result_params *pcached_results)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_extscan_get_cached_results_cmd)
|
|
||||||
return wmi_handle->ops->send_extscan_get_cached_results_cmd(wmi_handle,
|
|
||||||
pcached_results);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wmi_unified_extscan_stop_change_monitor_cmd() - send stop change monitor cmd
|
|
||||||
* @wmi_hdl: wmi handle
|
|
||||||
* @reset_req: Reset change request params
|
|
||||||
*
|
|
||||||
* This function sends stop change monitor request to fw.
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
|
||||||
*/
|
|
||||||
QDF_STATUS wmi_unified_extscan_stop_change_monitor_cmd(void *wmi_hdl,
|
|
||||||
struct extscan_capabilities_reset_params *reset_req)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_extscan_stop_change_monitor_cmd)
|
|
||||||
return wmi_handle->ops->send_extscan_stop_change_monitor_cmd(wmi_handle,
|
|
||||||
reset_req);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wmi_unified_extscan_start_change_monitor_cmd() - start change monitor cmd
|
|
||||||
* @wmi_hdl: wmi handle
|
|
||||||
* @psigchange: change monitor request params
|
|
||||||
*
|
|
||||||
* This function sends start change monitor request to fw.
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
|
||||||
*/
|
|
||||||
QDF_STATUS wmi_unified_extscan_start_change_monitor_cmd(void *wmi_hdl,
|
|
||||||
struct extscan_set_sig_changereq_params *
|
|
||||||
psigchange)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_extscan_start_change_monitor_cmd)
|
|
||||||
return wmi_handle->ops->send_extscan_start_change_monitor_cmd(wmi_handle,
|
|
||||||
psigchange);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wmi_unified_extscan_stop_hotlist_monitor_cmd() - stop hotlist monitor
|
|
||||||
* @wmi_hdl: wmi handle
|
|
||||||
* @photlist_reset: hotlist reset params
|
|
||||||
*
|
|
||||||
* This function configures hotlist monitor to stop in fw.
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
|
||||||
*/
|
|
||||||
QDF_STATUS wmi_unified_extscan_stop_hotlist_monitor_cmd(void *wmi_hdl,
|
|
||||||
struct extscan_bssid_hotlist_reset_params *photlist_reset)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_extscan_stop_hotlist_monitor_cmd)
|
|
||||||
return wmi_handle->ops->send_extscan_stop_hotlist_monitor_cmd(wmi_handle,
|
|
||||||
photlist_reset);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_extscan_start_hotlist_monitor_cmd(void *wmi_hdl,
|
|
||||||
struct extscan_bssid_hotlist_set_params *params)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_extscan_start_hotlist_monitor_cmd)
|
|
||||||
return wmi_handle->ops->send_extscan_start_hotlist_monitor_cmd(wmi_handle,
|
|
||||||
params);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wmi_unified_stop_extscan_cmd() - stop extscan command to fw.
|
|
||||||
* @wmi_hdl: wmi handle
|
|
||||||
* @pstopcmd: stop scan command request params
|
|
||||||
*
|
|
||||||
* This function sends stop extscan request to fw.
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
|
|
||||||
*/
|
|
||||||
QDF_STATUS wmi_unified_stop_extscan_cmd(void *wmi_hdl,
|
|
||||||
struct extscan_stop_req_params *pstopcmd)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_stop_extscan_cmd)
|
|
||||||
return wmi_handle->ops->send_stop_extscan_cmd(wmi_handle,
|
|
||||||
pstopcmd);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wmi_unified_start_extscan_cmd() - start extscan command to fw.
|
|
||||||
* @wmi_hdl: wmi handle
|
|
||||||
* @pstart: scan command request params
|
|
||||||
*
|
|
||||||
* This function sends start extscan request to fw.
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
|
|
||||||
*/
|
|
||||||
QDF_STATUS wmi_unified_start_extscan_cmd(void *wmi_hdl,
|
|
||||||
struct wifi_scan_cmd_req_params *pstart)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_start_extscan_cmd)
|
|
||||||
return wmi_handle->ops->send_start_extscan_cmd(wmi_handle,
|
|
||||||
pstart);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
@@ -1,164 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
|
||||||
* above copyright notice and this permission notice appear in all
|
|
||||||
* copies.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
|
||||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
|
||||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
||||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* DOC: Implement API's specific to NAN component.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <wmi_unified_priv.h>
|
|
||||||
#include <wmi_unified_nan_api.h>
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_nan_req_cmd(wmi_unified_t wmi_handle,
|
|
||||||
struct nan_msg_params *nan_msg)
|
|
||||||
{
|
|
||||||
if (wmi_handle->ops->send_nan_req_cmd)
|
|
||||||
return wmi_handle->ops->send_nan_req_cmd(wmi_handle,
|
|
||||||
nan_msg);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_nan_disable_req_cmd(wmi_unified_t wmi_handle,
|
|
||||||
struct nan_disable_req *nan_msg)
|
|
||||||
{
|
|
||||||
if (wmi_handle->ops->send_nan_disable_req_cmd)
|
|
||||||
return wmi_handle->ops->send_nan_disable_req_cmd(wmi_handle,
|
|
||||||
nan_msg);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_nan_event_rsp(wmi_unified_t wmi_handle, void *evt_buf,
|
|
||||||
struct nan_event_params *nan_evt_params,
|
|
||||||
uint8_t **nan_msg_buf)
|
|
||||||
{
|
|
||||||
if (wmi_handle->ops->extract_nan_event_rsp)
|
|
||||||
return wmi_handle->ops->extract_nan_event_rsp(wmi_handle,
|
|
||||||
evt_buf,
|
|
||||||
nan_evt_params,
|
|
||||||
nan_msg_buf);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_ndp_initiator_req_cmd_send(void *wmi_hdl,
|
|
||||||
struct nan_datapath_initiator_req *req)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_ndp_initiator_req_cmd)
|
|
||||||
return wmi_handle->ops->send_ndp_initiator_req_cmd(wmi_handle,
|
|
||||||
req);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_ndp_responder_req_cmd_send(void *wmi_hdl,
|
|
||||||
struct nan_datapath_responder_req *req)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_ndp_responder_req_cmd)
|
|
||||||
return wmi_handle->ops->send_ndp_responder_req_cmd(wmi_handle,
|
|
||||||
req);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_ndp_end_req_cmd_send(void *wmi_hdl,
|
|
||||||
struct nan_datapath_end_req *req)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_ndp_end_req_cmd)
|
|
||||||
return wmi_handle->ops->send_ndp_end_req_cmd(wmi_handle,
|
|
||||||
req);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_ndp_initiator_rsp(wmi_unified_t wmi_handle,
|
|
||||||
uint8_t *data, struct nan_datapath_initiator_rsp *rsp)
|
|
||||||
{
|
|
||||||
if (wmi_handle->ops->extract_ndp_initiator_rsp)
|
|
||||||
return wmi_handle->ops->extract_ndp_initiator_rsp(wmi_handle,
|
|
||||||
data, rsp);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_ndp_ind(wmi_unified_t wmi_handle, uint8_t *data,
|
|
||||||
struct nan_datapath_indication_event *ind)
|
|
||||||
{
|
|
||||||
if (wmi_handle->ops->extract_ndp_ind)
|
|
||||||
return wmi_handle->ops->extract_ndp_ind(wmi_handle,
|
|
||||||
data, ind);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_ndp_confirm(wmi_unified_t wmi_handle, uint8_t *data,
|
|
||||||
struct nan_datapath_confirm_event *ev)
|
|
||||||
{
|
|
||||||
if (wmi_handle->ops->extract_ndp_confirm)
|
|
||||||
return wmi_handle->ops->extract_ndp_confirm(wmi_handle,
|
|
||||||
data, ev);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_ndp_responder_rsp(wmi_unified_t wmi_handle,
|
|
||||||
uint8_t *data,
|
|
||||||
struct nan_datapath_responder_rsp *rsp)
|
|
||||||
{
|
|
||||||
if (wmi_handle->ops->extract_ndp_responder_rsp)
|
|
||||||
return wmi_handle->ops->extract_ndp_responder_rsp(wmi_handle,
|
|
||||||
data, rsp);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_ndp_end_rsp(wmi_unified_t wmi_handle, uint8_t *data,
|
|
||||||
struct nan_datapath_end_rsp_event *rsp)
|
|
||||||
{
|
|
||||||
if (wmi_handle->ops->extract_ndp_end_rsp)
|
|
||||||
return wmi_handle->ops->extract_ndp_end_rsp(wmi_handle,
|
|
||||||
data, rsp);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_ndp_end_ind(wmi_unified_t wmi_handle, uint8_t *data,
|
|
||||||
struct nan_datapath_end_indication_event **ind)
|
|
||||||
{
|
|
||||||
if (wmi_handle->ops->extract_ndp_end_ind)
|
|
||||||
return wmi_handle->ops->extract_ndp_end_ind(wmi_handle,
|
|
||||||
data, ind);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_ndp_sch_update(wmi_unified_t wmi_handle, uint8_t *data,
|
|
||||||
struct nan_datapath_sch_update_event *ind)
|
|
||||||
{
|
|
||||||
if (wmi_handle->ops->extract_ndp_sch_update)
|
|
||||||
return wmi_handle->ops->extract_ndp_sch_update(wmi_handle,
|
|
||||||
data, ind);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@@ -1,153 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
|
||||||
* above copyright notice and this permission notice appear in all
|
|
||||||
* copies.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
|
||||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
|
||||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
||||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* DOC: Implement API's specific to DSRC component.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <wmi_unified_priv.h>
|
|
||||||
#include <wlan_ocb_public_structs.h>
|
|
||||||
#include <wmi_unified_ocb_api.h>
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_ocb_start_timing_advert(struct wmi_unified *wmi_hdl,
|
|
||||||
struct ocb_timing_advert_param *timing_advert)
|
|
||||||
{
|
|
||||||
if (wmi_hdl->ops->send_ocb_start_timing_advert_cmd)
|
|
||||||
return wmi_hdl->ops->send_ocb_start_timing_advert_cmd(wmi_hdl,
|
|
||||||
timing_advert);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_ocb_stop_timing_advert(struct wmi_unified *wmi_hdl,
|
|
||||||
struct ocb_timing_advert_param *timing_advert)
|
|
||||||
{
|
|
||||||
if (wmi_hdl->ops->send_ocb_stop_timing_advert_cmd)
|
|
||||||
return wmi_hdl->ops->send_ocb_stop_timing_advert_cmd(wmi_hdl,
|
|
||||||
timing_advert);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_ocb_set_utc_time_cmd(struct wmi_unified *wmi_hdl,
|
|
||||||
struct ocb_utc_param *utc)
|
|
||||||
{
|
|
||||||
if (wmi_hdl->ops->send_ocb_set_utc_time_cmd)
|
|
||||||
return wmi_hdl->ops->send_ocb_set_utc_time_cmd(wmi_hdl, utc);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_ocb_get_tsf_timer(struct wmi_unified *wmi_hdl,
|
|
||||||
struct ocb_get_tsf_timer_param *req)
|
|
||||||
{
|
|
||||||
if (wmi_hdl->ops->send_ocb_get_tsf_timer_cmd)
|
|
||||||
return wmi_hdl->ops->send_ocb_get_tsf_timer_cmd(wmi_hdl,
|
|
||||||
req->vdev_id);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_dcc_get_stats_cmd(struct wmi_unified *wmi_hdl,
|
|
||||||
struct ocb_dcc_get_stats_param *get_stats_param)
|
|
||||||
{
|
|
||||||
if (wmi_hdl->ops->send_dcc_get_stats_cmd)
|
|
||||||
return wmi_hdl->ops->send_dcc_get_stats_cmd(wmi_hdl,
|
|
||||||
get_stats_param);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_dcc_clear_stats(struct wmi_unified *wmi_hdl,
|
|
||||||
struct ocb_dcc_clear_stats_param *clear_stats_param)
|
|
||||||
{
|
|
||||||
if (wmi_hdl->ops->send_dcc_clear_stats_cmd)
|
|
||||||
return wmi_hdl->ops->send_dcc_clear_stats_cmd(wmi_hdl,
|
|
||||||
clear_stats_param->vdev_id,
|
|
||||||
clear_stats_param->dcc_stats_bitmap);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_dcc_update_ndl(struct wmi_unified *wmi_hdl,
|
|
||||||
struct ocb_dcc_update_ndl_param *update_ndl_param)
|
|
||||||
{
|
|
||||||
if (wmi_hdl->ops->send_dcc_update_ndl_cmd)
|
|
||||||
return wmi_hdl->ops->send_dcc_update_ndl_cmd(wmi_hdl,
|
|
||||||
update_ndl_param);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_ocb_set_config(struct wmi_unified *wmi_hdl,
|
|
||||||
struct ocb_config *config)
|
|
||||||
{
|
|
||||||
if (wmi_hdl->ops->send_ocb_set_config_cmd)
|
|
||||||
return wmi_hdl->ops->send_ocb_set_config_cmd(wmi_hdl,
|
|
||||||
config);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS
|
|
||||||
wmi_extract_ocb_set_channel_config_resp(struct wmi_unified *wmi_hdl,
|
|
||||||
void *evt_buf,
|
|
||||||
uint32_t *status)
|
|
||||||
{
|
|
||||||
if (wmi_hdl->ops->extract_ocb_chan_config_resp)
|
|
||||||
return wmi_hdl->ops->extract_ocb_chan_config_resp(wmi_hdl,
|
|
||||||
evt_buf,
|
|
||||||
status);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_ocb_tsf_timer(struct wmi_unified *wmi_hdl,
|
|
||||||
void *evt_buf,
|
|
||||||
struct ocb_get_tsf_timer_response *resp)
|
|
||||||
{
|
|
||||||
if (wmi_hdl->ops->extract_ocb_tsf_timer)
|
|
||||||
return wmi_hdl->ops->extract_ocb_tsf_timer(wmi_hdl,
|
|
||||||
evt_buf,
|
|
||||||
resp);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_dcc_update_ndl_resp(struct wmi_unified *wmi_hdl,
|
|
||||||
void *evt_buf, struct ocb_dcc_update_ndl_response *resp)
|
|
||||||
{
|
|
||||||
if (wmi_hdl->ops->extract_dcc_update_ndl_resp)
|
|
||||||
return wmi_hdl->ops->extract_dcc_update_ndl_resp(wmi_hdl,
|
|
||||||
evt_buf,
|
|
||||||
resp);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_dcc_stats(struct wmi_unified *wmi_hdl,
|
|
||||||
void *evt_buf,
|
|
||||||
struct ocb_dcc_get_stats_response **resp)
|
|
||||||
{
|
|
||||||
if (wmi_hdl->ops->extract_dcc_stats)
|
|
||||||
return wmi_hdl->ops->extract_dcc_stats(wmi_hdl,
|
|
||||||
evt_buf,
|
|
||||||
resp);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
@@ -1,791 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
|
||||||
* above copyright notice and this permission notice appear in all
|
|
||||||
* copies.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
|
||||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
|
||||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
||||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <osdep.h>
|
|
||||||
#include <wmi.h>
|
|
||||||
#include <wmi_unified_priv.h>
|
|
||||||
#include <wlan_ocb_public_structs.h>
|
|
||||||
#include <wmi_unified_ocb_api.h>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* send_ocb_set_utc_time_cmd() - send the UTC time to the firmware
|
|
||||||
* @wmi_handle: pointer to the wmi handle
|
|
||||||
* @utc: pointer to the UTC time struct
|
|
||||||
*
|
|
||||||
* Return: 0 on succes
|
|
||||||
*/
|
|
||||||
static QDF_STATUS send_ocb_set_utc_time_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
struct ocb_utc_param *utc)
|
|
||||||
{
|
|
||||||
QDF_STATUS ret;
|
|
||||||
wmi_ocb_set_utc_time_cmd_fixed_param *cmd;
|
|
||||||
uint8_t *buf_ptr;
|
|
||||||
uint32_t len, i;
|
|
||||||
wmi_buf_t buf;
|
|
||||||
|
|
||||||
len = sizeof(*cmd);
|
|
||||||
buf = wmi_buf_alloc(wmi_handle, len);
|
|
||||||
if (!buf) {
|
|
||||||
return QDF_STATUS_E_NOMEM;
|
|
||||||
}
|
|
||||||
|
|
||||||
buf_ptr = (uint8_t *)wmi_buf_data(buf);
|
|
||||||
cmd = (wmi_ocb_set_utc_time_cmd_fixed_param *)buf_ptr;
|
|
||||||
WMITLV_SET_HDR(&cmd->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_ocb_set_utc_time_cmd_fixed_param,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN(wmi_ocb_set_utc_time_cmd_fixed_param));
|
|
||||||
cmd->vdev_id = utc->vdev_id;
|
|
||||||
|
|
||||||
for (i = 0; i < SIZE_UTC_TIME; i++)
|
|
||||||
WMI_UTC_TIME_SET(cmd, i, utc->utc_time[i]);
|
|
||||||
|
|
||||||
for (i = 0; i < SIZE_UTC_TIME_ERROR; i++)
|
|
||||||
WMI_TIME_ERROR_SET(cmd, i, utc->time_error[i]);
|
|
||||||
|
|
||||||
wmi_mtrace(WMI_OCB_SET_UTC_TIME_CMDID, cmd->vdev_id, 0);
|
|
||||||
ret = wmi_unified_cmd_send(wmi_handle, buf, len,
|
|
||||||
WMI_OCB_SET_UTC_TIME_CMDID);
|
|
||||||
if (QDF_IS_STATUS_ERROR(ret)) {
|
|
||||||
WMI_LOGE(FL("Failed to set OCB UTC time"));
|
|
||||||
wmi_buf_free(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* send_ocb_start_timing_advert_cmd_tlv() - start sending the timing advertisement
|
|
||||||
* frames on a channel
|
|
||||||
* @wmi_handle: pointer to the wmi handle
|
|
||||||
* @timing_advert: pointer to the timing advertisement struct
|
|
||||||
*
|
|
||||||
* Return: 0 on succes
|
|
||||||
*/
|
|
||||||
static QDF_STATUS send_ocb_start_timing_advert_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
struct ocb_timing_advert_param *timing_advert)
|
|
||||||
{
|
|
||||||
QDF_STATUS ret;
|
|
||||||
wmi_ocb_start_timing_advert_cmd_fixed_param *cmd;
|
|
||||||
uint8_t *buf_ptr;
|
|
||||||
uint32_t len, len_template;
|
|
||||||
wmi_buf_t buf;
|
|
||||||
|
|
||||||
len = sizeof(*cmd) +
|
|
||||||
WMI_TLV_HDR_SIZE;
|
|
||||||
|
|
||||||
len_template = timing_advert->template_length;
|
|
||||||
/* Add padding to the template if needed */
|
|
||||||
if (len_template % 4 != 0)
|
|
||||||
len_template += 4 - (len_template % 4);
|
|
||||||
len += len_template;
|
|
||||||
|
|
||||||
buf = wmi_buf_alloc(wmi_handle, len);
|
|
||||||
if (!buf) {
|
|
||||||
return QDF_STATUS_E_NOMEM;
|
|
||||||
}
|
|
||||||
|
|
||||||
buf_ptr = (uint8_t *)wmi_buf_data(buf);
|
|
||||||
cmd = (wmi_ocb_start_timing_advert_cmd_fixed_param *)buf_ptr;
|
|
||||||
WMITLV_SET_HDR(&cmd->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_ocb_start_timing_advert_cmd_fixed_param,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN(
|
|
||||||
wmi_ocb_start_timing_advert_cmd_fixed_param));
|
|
||||||
cmd->vdev_id = timing_advert->vdev_id;
|
|
||||||
cmd->repeat_rate = timing_advert->repeat_rate;
|
|
||||||
cmd->channel_freq = timing_advert->chan_freq;
|
|
||||||
cmd->timestamp_offset = timing_advert->timestamp_offset;
|
|
||||||
cmd->time_value_offset = timing_advert->time_value_offset;
|
|
||||||
cmd->timing_advert_template_length = timing_advert->template_length;
|
|
||||||
buf_ptr += sizeof(*cmd);
|
|
||||||
|
|
||||||
/* Add the timing advert template */
|
|
||||||
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE,
|
|
||||||
len_template);
|
|
||||||
qdf_mem_copy(buf_ptr + WMI_TLV_HDR_SIZE,
|
|
||||||
(uint8_t *)timing_advert->template_value,
|
|
||||||
timing_advert->template_length);
|
|
||||||
|
|
||||||
wmi_mtrace(WMI_OCB_START_TIMING_ADVERT_CMDID, cmd->vdev_id, 0);
|
|
||||||
ret = wmi_unified_cmd_send(wmi_handle, buf, len,
|
|
||||||
WMI_OCB_START_TIMING_ADVERT_CMDID);
|
|
||||||
if (QDF_IS_STATUS_ERROR(ret)) {
|
|
||||||
WMI_LOGE(FL("Failed to start OCB timing advert"));
|
|
||||||
wmi_buf_free(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* send_ocb_stop_timing_advert_cmd_tlv() - stop sending the timing advertisement frames
|
|
||||||
* on a channel
|
|
||||||
* @wmi_handle: pointer to the wmi handle
|
|
||||||
* @timing_advert: pointer to the timing advertisement struct
|
|
||||||
*
|
|
||||||
* Return: 0 on succes
|
|
||||||
*/
|
|
||||||
static QDF_STATUS send_ocb_stop_timing_advert_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
struct ocb_timing_advert_param *timing_advert)
|
|
||||||
{
|
|
||||||
QDF_STATUS ret;
|
|
||||||
wmi_ocb_stop_timing_advert_cmd_fixed_param *cmd;
|
|
||||||
uint8_t *buf_ptr;
|
|
||||||
uint32_t len;
|
|
||||||
wmi_buf_t buf;
|
|
||||||
|
|
||||||
len = sizeof(*cmd);
|
|
||||||
buf = wmi_buf_alloc(wmi_handle, len);
|
|
||||||
if (!buf) {
|
|
||||||
return QDF_STATUS_E_NOMEM;
|
|
||||||
}
|
|
||||||
|
|
||||||
buf_ptr = (uint8_t *)wmi_buf_data(buf);
|
|
||||||
cmd = (wmi_ocb_stop_timing_advert_cmd_fixed_param *)buf_ptr;
|
|
||||||
WMITLV_SET_HDR(&cmd->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_ocb_stop_timing_advert_cmd_fixed_param,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN(
|
|
||||||
wmi_ocb_stop_timing_advert_cmd_fixed_param));
|
|
||||||
cmd->vdev_id = timing_advert->vdev_id;
|
|
||||||
cmd->channel_freq = timing_advert->chan_freq;
|
|
||||||
|
|
||||||
wmi_mtrace(WMI_OCB_STOP_TIMING_ADVERT_CMDID, cmd->vdev_id, 0);
|
|
||||||
ret = wmi_unified_cmd_send(wmi_handle, buf, len,
|
|
||||||
WMI_OCB_STOP_TIMING_ADVERT_CMDID);
|
|
||||||
if (QDF_IS_STATUS_ERROR(ret)) {
|
|
||||||
WMI_LOGE(FL("Failed to stop OCB timing advert"));
|
|
||||||
wmi_buf_free(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* send_ocb_get_tsf_timer_cmd_tlv() - get ocb tsf timer val
|
|
||||||
* @wmi_handle: pointer to the wmi handle
|
|
||||||
* @request: pointer to the request
|
|
||||||
*
|
|
||||||
* Return: 0 on succes
|
|
||||||
*/
|
|
||||||
static QDF_STATUS send_ocb_get_tsf_timer_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
uint8_t vdev_id)
|
|
||||||
{
|
|
||||||
QDF_STATUS ret;
|
|
||||||
wmi_ocb_get_tsf_timer_cmd_fixed_param *cmd;
|
|
||||||
uint8_t *buf_ptr;
|
|
||||||
wmi_buf_t buf;
|
|
||||||
int32_t len;
|
|
||||||
|
|
||||||
len = sizeof(*cmd);
|
|
||||||
buf = wmi_buf_alloc(wmi_handle, len);
|
|
||||||
if (!buf) {
|
|
||||||
return QDF_STATUS_E_NOMEM;
|
|
||||||
}
|
|
||||||
buf_ptr = (uint8_t *)wmi_buf_data(buf);
|
|
||||||
|
|
||||||
cmd = (wmi_ocb_get_tsf_timer_cmd_fixed_param *)buf_ptr;
|
|
||||||
qdf_mem_zero(cmd, len);
|
|
||||||
WMITLV_SET_HDR(&cmd->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_cmd_fixed_param,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN(
|
|
||||||
wmi_ocb_get_tsf_timer_cmd_fixed_param));
|
|
||||||
cmd->vdev_id = vdev_id;
|
|
||||||
|
|
||||||
/* Send the WMI command */
|
|
||||||
wmi_mtrace(WMI_OCB_GET_TSF_TIMER_CMDID, cmd->vdev_id, 0);
|
|
||||||
ret = wmi_unified_cmd_send(wmi_handle, buf, len,
|
|
||||||
WMI_OCB_GET_TSF_TIMER_CMDID);
|
|
||||||
/* If there is an error, set the completion event */
|
|
||||||
if (QDF_IS_STATUS_ERROR(ret)) {
|
|
||||||
WMI_LOGE(FL("Failed to send WMI message: %d"), ret);
|
|
||||||
wmi_buf_free(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* send_dcc_get_stats_cmd_tlv() - get the DCC channel stats
|
|
||||||
* @wmi_handle: pointer to the wmi handle
|
|
||||||
* @get_stats_param: pointer to the dcc stats
|
|
||||||
*
|
|
||||||
* Return: 0 on succes
|
|
||||||
*/
|
|
||||||
static QDF_STATUS send_dcc_get_stats_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
struct ocb_dcc_get_stats_param *get_stats_param)
|
|
||||||
{
|
|
||||||
QDF_STATUS ret;
|
|
||||||
wmi_dcc_get_stats_cmd_fixed_param *cmd;
|
|
||||||
wmi_dcc_channel_stats_request *channel_stats_array;
|
|
||||||
wmi_buf_t buf;
|
|
||||||
uint8_t *buf_ptr;
|
|
||||||
uint32_t len;
|
|
||||||
uint32_t i;
|
|
||||||
|
|
||||||
/* Validate the input */
|
|
||||||
if (get_stats_param->request_array_len !=
|
|
||||||
get_stats_param->channel_count * sizeof(*channel_stats_array)) {
|
|
||||||
WMI_LOGE(FL("Invalid parameter"));
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Allocate memory for the WMI command */
|
|
||||||
len = sizeof(*cmd) + WMI_TLV_HDR_SIZE +
|
|
||||||
get_stats_param->request_array_len;
|
|
||||||
|
|
||||||
buf = wmi_buf_alloc(wmi_handle, len);
|
|
||||||
if (!buf) {
|
|
||||||
return QDF_STATUS_E_NOMEM;
|
|
||||||
}
|
|
||||||
|
|
||||||
buf_ptr = wmi_buf_data(buf);
|
|
||||||
qdf_mem_zero(buf_ptr, len);
|
|
||||||
|
|
||||||
/* Populate the WMI command */
|
|
||||||
cmd = (wmi_dcc_get_stats_cmd_fixed_param *)buf_ptr;
|
|
||||||
buf_ptr += sizeof(*cmd);
|
|
||||||
|
|
||||||
WMITLV_SET_HDR(&cmd->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_dcc_get_stats_cmd_fixed_param,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN(
|
|
||||||
wmi_dcc_get_stats_cmd_fixed_param));
|
|
||||||
cmd->vdev_id = get_stats_param->vdev_id;
|
|
||||||
cmd->num_channels = get_stats_param->channel_count;
|
|
||||||
|
|
||||||
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC,
|
|
||||||
get_stats_param->request_array_len);
|
|
||||||
buf_ptr += WMI_TLV_HDR_SIZE;
|
|
||||||
|
|
||||||
channel_stats_array = (wmi_dcc_channel_stats_request *)buf_ptr;
|
|
||||||
qdf_mem_copy(channel_stats_array, get_stats_param->request_array,
|
|
||||||
get_stats_param->request_array_len);
|
|
||||||
for (i = 0; i < cmd->num_channels; i++)
|
|
||||||
WMITLV_SET_HDR(&channel_stats_array[i].tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_dcc_channel_stats_request,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN(
|
|
||||||
wmi_dcc_channel_stats_request));
|
|
||||||
|
|
||||||
/* Send the WMI command */
|
|
||||||
wmi_mtrace(WMI_DCC_GET_STATS_CMDID, cmd->vdev_id, 0);
|
|
||||||
ret = wmi_unified_cmd_send(wmi_handle, buf, len,
|
|
||||||
WMI_DCC_GET_STATS_CMDID);
|
|
||||||
|
|
||||||
if (QDF_IS_STATUS_ERROR(ret)) {
|
|
||||||
WMI_LOGE(FL("Failed to send WMI message: %d"), ret);
|
|
||||||
wmi_buf_free(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* send_dcc_clear_stats_cmd_tlv() - command to clear the DCC stats
|
|
||||||
* @wmi_handle: pointer to the wmi handle
|
|
||||||
* @vdev_id: vdev id
|
|
||||||
* @dcc_stats_bitmap: dcc status bitmap
|
|
||||||
*
|
|
||||||
* Return: 0 on succes
|
|
||||||
*/
|
|
||||||
static QDF_STATUS send_dcc_clear_stats_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
uint32_t vdev_id, uint32_t dcc_stats_bitmap)
|
|
||||||
{
|
|
||||||
QDF_STATUS ret;
|
|
||||||
wmi_dcc_clear_stats_cmd_fixed_param *cmd;
|
|
||||||
wmi_buf_t buf;
|
|
||||||
uint8_t *buf_ptr;
|
|
||||||
uint32_t len;
|
|
||||||
|
|
||||||
/* Allocate memory for the WMI command */
|
|
||||||
len = sizeof(*cmd);
|
|
||||||
|
|
||||||
buf = wmi_buf_alloc(wmi_handle, len);
|
|
||||||
if (!buf) {
|
|
||||||
return QDF_STATUS_E_NOMEM;
|
|
||||||
}
|
|
||||||
|
|
||||||
buf_ptr = wmi_buf_data(buf);
|
|
||||||
qdf_mem_zero(buf_ptr, len);
|
|
||||||
|
|
||||||
/* Populate the WMI command */
|
|
||||||
cmd = (wmi_dcc_clear_stats_cmd_fixed_param *)buf_ptr;
|
|
||||||
|
|
||||||
WMITLV_SET_HDR(&cmd->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_dcc_clear_stats_cmd_fixed_param,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN(
|
|
||||||
wmi_dcc_clear_stats_cmd_fixed_param));
|
|
||||||
cmd->vdev_id = vdev_id;
|
|
||||||
cmd->dcc_stats_bitmap = dcc_stats_bitmap;
|
|
||||||
|
|
||||||
/* Send the WMI command */
|
|
||||||
wmi_mtrace(WMI_DCC_CLEAR_STATS_CMDID, cmd->vdev_id, 0);
|
|
||||||
ret = wmi_unified_cmd_send(wmi_handle, buf, len,
|
|
||||||
WMI_DCC_CLEAR_STATS_CMDID);
|
|
||||||
if (QDF_IS_STATUS_ERROR(ret)) {
|
|
||||||
WMI_LOGE(FL("Failed to send the WMI command"));
|
|
||||||
wmi_buf_free(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* send_dcc_update_ndl_cmd_tlv() - command to update the NDL data
|
|
||||||
* @wmi_handle: pointer to the wmi handle
|
|
||||||
* @update_ndl_param: pointer to the request parameters
|
|
||||||
*
|
|
||||||
* Return: 0 on success
|
|
||||||
*/
|
|
||||||
static QDF_STATUS send_dcc_update_ndl_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
struct ocb_dcc_update_ndl_param *update_ndl_param)
|
|
||||||
{
|
|
||||||
QDF_STATUS qdf_status;
|
|
||||||
wmi_dcc_update_ndl_cmd_fixed_param *cmd;
|
|
||||||
wmi_dcc_ndl_chan *ndl_chan_array;
|
|
||||||
wmi_dcc_ndl_active_state_config *ndl_active_state_array;
|
|
||||||
uint32_t active_state_count;
|
|
||||||
wmi_buf_t buf;
|
|
||||||
uint8_t *buf_ptr;
|
|
||||||
uint32_t len;
|
|
||||||
uint32_t i;
|
|
||||||
|
|
||||||
/* validate the input */
|
|
||||||
if (update_ndl_param->dcc_ndl_chan_list_len !=
|
|
||||||
update_ndl_param->channel_count * sizeof(*ndl_chan_array)) {
|
|
||||||
WMI_LOGE(FL("Invalid parameter"));
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
active_state_count = 0;
|
|
||||||
ndl_chan_array = update_ndl_param->dcc_ndl_chan_list;
|
|
||||||
for (i = 0; i < update_ndl_param->channel_count; i++)
|
|
||||||
active_state_count +=
|
|
||||||
WMI_NDL_NUM_ACTIVE_STATE_GET(&ndl_chan_array[i]);
|
|
||||||
if (update_ndl_param->dcc_ndl_active_state_list_len !=
|
|
||||||
active_state_count * sizeof(*ndl_active_state_array)) {
|
|
||||||
WMI_LOGE(FL("Invalid parameter"));
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Allocate memory for the WMI command */
|
|
||||||
len = sizeof(*cmd) +
|
|
||||||
WMI_TLV_HDR_SIZE + update_ndl_param->dcc_ndl_chan_list_len +
|
|
||||||
WMI_TLV_HDR_SIZE +
|
|
||||||
update_ndl_param->dcc_ndl_active_state_list_len;
|
|
||||||
|
|
||||||
buf = wmi_buf_alloc(wmi_handle, len);
|
|
||||||
if (!buf) {
|
|
||||||
return QDF_STATUS_E_NOMEM;
|
|
||||||
}
|
|
||||||
|
|
||||||
buf_ptr = wmi_buf_data(buf);
|
|
||||||
qdf_mem_zero(buf_ptr, len);
|
|
||||||
|
|
||||||
/* Populate the WMI command */
|
|
||||||
cmd = (wmi_dcc_update_ndl_cmd_fixed_param *)buf_ptr;
|
|
||||||
buf_ptr += sizeof(*cmd);
|
|
||||||
|
|
||||||
WMITLV_SET_HDR(&cmd->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_dcc_update_ndl_cmd_fixed_param,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN(
|
|
||||||
wmi_dcc_update_ndl_cmd_fixed_param));
|
|
||||||
cmd->vdev_id = update_ndl_param->vdev_id;
|
|
||||||
cmd->num_channel = update_ndl_param->channel_count;
|
|
||||||
|
|
||||||
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC,
|
|
||||||
update_ndl_param->dcc_ndl_chan_list_len);
|
|
||||||
buf_ptr += WMI_TLV_HDR_SIZE;
|
|
||||||
|
|
||||||
ndl_chan_array = (wmi_dcc_ndl_chan *)buf_ptr;
|
|
||||||
qdf_mem_copy(ndl_chan_array, update_ndl_param->dcc_ndl_chan_list,
|
|
||||||
update_ndl_param->dcc_ndl_chan_list_len);
|
|
||||||
for (i = 0; i < cmd->num_channel; i++)
|
|
||||||
WMITLV_SET_HDR(&ndl_chan_array[i].tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_dcc_ndl_chan,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN(
|
|
||||||
wmi_dcc_ndl_chan));
|
|
||||||
buf_ptr += update_ndl_param->dcc_ndl_chan_list_len;
|
|
||||||
|
|
||||||
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC,
|
|
||||||
update_ndl_param->dcc_ndl_active_state_list_len);
|
|
||||||
buf_ptr += WMI_TLV_HDR_SIZE;
|
|
||||||
|
|
||||||
ndl_active_state_array = (wmi_dcc_ndl_active_state_config *)buf_ptr;
|
|
||||||
qdf_mem_copy(ndl_active_state_array,
|
|
||||||
update_ndl_param->dcc_ndl_active_state_list,
|
|
||||||
update_ndl_param->dcc_ndl_active_state_list_len);
|
|
||||||
for (i = 0; i < active_state_count; i++) {
|
|
||||||
WMITLV_SET_HDR(&ndl_active_state_array[i].tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_dcc_ndl_active_state_config,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN(
|
|
||||||
wmi_dcc_ndl_active_state_config));
|
|
||||||
}
|
|
||||||
buf_ptr += update_ndl_param->dcc_ndl_active_state_list_len;
|
|
||||||
|
|
||||||
/* Send the WMI command */
|
|
||||||
wmi_mtrace(WMI_DCC_UPDATE_NDL_CMDID, cmd->vdev_id, 0);
|
|
||||||
qdf_status = wmi_unified_cmd_send(wmi_handle, buf, len,
|
|
||||||
WMI_DCC_UPDATE_NDL_CMDID);
|
|
||||||
/* If there is an error, set the completion event */
|
|
||||||
if (QDF_IS_STATUS_ERROR(qdf_status)) {
|
|
||||||
WMI_LOGE(FL("Failed to send WMI message: %d"), qdf_status);
|
|
||||||
wmi_buf_free(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
return qdf_status;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* send_ocb_set_config_cmd_tlv() - send the OCB config to the FW
|
|
||||||
* @wmi_handle: pointer to the wmi handle
|
|
||||||
* @config: the OCB configuration
|
|
||||||
*
|
|
||||||
* Return: 0 on success
|
|
||||||
*/
|
|
||||||
static QDF_STATUS send_ocb_set_config_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
struct ocb_config *config)
|
|
||||||
{
|
|
||||||
QDF_STATUS ret;
|
|
||||||
wmi_ocb_set_config_cmd_fixed_param *cmd;
|
|
||||||
wmi_channel *chan;
|
|
||||||
wmi_ocb_channel *ocb_chan;
|
|
||||||
wmi_qos_parameter *qos_param;
|
|
||||||
wmi_dcc_ndl_chan *ndl_chan;
|
|
||||||
wmi_dcc_ndl_active_state_config *ndl_active_config;
|
|
||||||
wmi_ocb_schedule_element *sched_elem;
|
|
||||||
uint8_t *buf_ptr;
|
|
||||||
wmi_buf_t buf;
|
|
||||||
int32_t len;
|
|
||||||
int32_t i, j, active_state_count;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Validate the dcc_ndl_chan_list_len and count the number of active
|
|
||||||
* states. Validate dcc_ndl_active_state_list_len.
|
|
||||||
*/
|
|
||||||
active_state_count = 0;
|
|
||||||
if (config->dcc_ndl_chan_list_len) {
|
|
||||||
if (!config->dcc_ndl_chan_list ||
|
|
||||||
config->dcc_ndl_chan_list_len !=
|
|
||||||
config->channel_count * sizeof(wmi_dcc_ndl_chan)) {
|
|
||||||
WMI_LOGE(FL("NDL channel is invalid. List len: %d"),
|
|
||||||
config->dcc_ndl_chan_list_len);
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0, ndl_chan = config->dcc_ndl_chan_list;
|
|
||||||
i < config->channel_count; ++i, ++ndl_chan)
|
|
||||||
active_state_count +=
|
|
||||||
WMI_NDL_NUM_ACTIVE_STATE_GET(ndl_chan);
|
|
||||||
|
|
||||||
if (active_state_count) {
|
|
||||||
if (!config->dcc_ndl_active_state_list ||
|
|
||||||
config->dcc_ndl_active_state_list_len !=
|
|
||||||
active_state_count *
|
|
||||||
sizeof(wmi_dcc_ndl_active_state_config)) {
|
|
||||||
WMI_LOGE(FL("NDL active state is invalid."));
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
len = sizeof(*cmd) +
|
|
||||||
WMI_TLV_HDR_SIZE + config->channel_count *
|
|
||||||
sizeof(wmi_channel) +
|
|
||||||
WMI_TLV_HDR_SIZE + config->channel_count *
|
|
||||||
sizeof(wmi_ocb_channel) +
|
|
||||||
WMI_TLV_HDR_SIZE + config->channel_count *
|
|
||||||
sizeof(wmi_qos_parameter) * WMI_MAX_NUM_AC +
|
|
||||||
WMI_TLV_HDR_SIZE + config->dcc_ndl_chan_list_len +
|
|
||||||
WMI_TLV_HDR_SIZE + active_state_count *
|
|
||||||
sizeof(wmi_dcc_ndl_active_state_config) +
|
|
||||||
WMI_TLV_HDR_SIZE + config->schedule_size *
|
|
||||||
sizeof(wmi_ocb_schedule_element);
|
|
||||||
buf = wmi_buf_alloc(wmi_handle, len);
|
|
||||||
if (!buf) {
|
|
||||||
return QDF_STATUS_E_NOMEM;
|
|
||||||
}
|
|
||||||
|
|
||||||
buf_ptr = (uint8_t *)wmi_buf_data(buf);
|
|
||||||
cmd = (wmi_ocb_set_config_cmd_fixed_param *)buf_ptr;
|
|
||||||
WMITLV_SET_HDR(&cmd->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_ocb_set_config_cmd_fixed_param,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN(wmi_ocb_set_config_cmd_fixed_param));
|
|
||||||
cmd->vdev_id = config->vdev_id;
|
|
||||||
cmd->channel_count = config->channel_count;
|
|
||||||
cmd->schedule_size = config->schedule_size;
|
|
||||||
cmd->flags = config->flags;
|
|
||||||
buf_ptr += sizeof(*cmd);
|
|
||||||
|
|
||||||
/* Add the wmi_channel info */
|
|
||||||
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC,
|
|
||||||
config->channel_count * sizeof(wmi_channel));
|
|
||||||
buf_ptr += WMI_TLV_HDR_SIZE;
|
|
||||||
for (i = 0; i < config->channel_count; i++) {
|
|
||||||
chan = (wmi_channel *)buf_ptr;
|
|
||||||
WMITLV_SET_HDR(&chan->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_channel,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN(wmi_channel));
|
|
||||||
chan->mhz = config->channels[i].chan_freq;
|
|
||||||
chan->band_center_freq1 = config->channels[i].chan_freq;
|
|
||||||
chan->band_center_freq2 = 0;
|
|
||||||
chan->info = 0;
|
|
||||||
|
|
||||||
WMI_SET_CHANNEL_MODE(chan, config->channels[i].ch_mode);
|
|
||||||
WMI_SET_CHANNEL_MAX_POWER(chan, config->channels[i].max_pwr);
|
|
||||||
WMI_SET_CHANNEL_MIN_POWER(chan, config->channels[i].min_pwr);
|
|
||||||
WMI_SET_CHANNEL_MAX_TX_POWER(chan, config->channels[i].max_pwr);
|
|
||||||
WMI_SET_CHANNEL_REG_POWER(chan, config->channels[i].reg_pwr);
|
|
||||||
WMI_SET_CHANNEL_ANTENNA_MAX(chan,
|
|
||||||
config->channels[i].antenna_max);
|
|
||||||
|
|
||||||
if (config->channels[i].bandwidth < 10)
|
|
||||||
WMI_SET_CHANNEL_FLAG(chan, WMI_CHAN_FLAG_QUARTER_RATE);
|
|
||||||
else if (config->channels[i].bandwidth < 20)
|
|
||||||
WMI_SET_CHANNEL_FLAG(chan, WMI_CHAN_FLAG_HALF_RATE);
|
|
||||||
buf_ptr += sizeof(*chan);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Add the wmi_ocb_channel info */
|
|
||||||
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC,
|
|
||||||
config->channel_count * sizeof(wmi_ocb_channel));
|
|
||||||
buf_ptr += WMI_TLV_HDR_SIZE;
|
|
||||||
for (i = 0; i < config->channel_count; i++) {
|
|
||||||
ocb_chan = (wmi_ocb_channel *)buf_ptr;
|
|
||||||
WMITLV_SET_HDR(&ocb_chan->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_ocb_channel,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN(wmi_ocb_channel));
|
|
||||||
ocb_chan->bandwidth = config->channels[i].bandwidth;
|
|
||||||
WMI_CHAR_ARRAY_TO_MAC_ADDR(
|
|
||||||
config->channels[i].mac_address.bytes,
|
|
||||||
&ocb_chan->mac_address);
|
|
||||||
buf_ptr += sizeof(*ocb_chan);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Add the wmi_qos_parameter info */
|
|
||||||
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC,
|
|
||||||
config->channel_count * sizeof(wmi_qos_parameter)*WMI_MAX_NUM_AC);
|
|
||||||
buf_ptr += WMI_TLV_HDR_SIZE;
|
|
||||||
/* WMI_MAX_NUM_AC parameters for each channel */
|
|
||||||
for (i = 0; i < config->channel_count; i++) {
|
|
||||||
for (j = 0; j < WMI_MAX_NUM_AC; j++) {
|
|
||||||
qos_param = (wmi_qos_parameter *)buf_ptr;
|
|
||||||
WMITLV_SET_HDR(&qos_param->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_qos_parameter,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN(wmi_qos_parameter));
|
|
||||||
qos_param->aifsn =
|
|
||||||
config->channels[i].qos_params[j].aifsn;
|
|
||||||
qos_param->cwmin =
|
|
||||||
config->channels[i].qos_params[j].cwmin;
|
|
||||||
qos_param->cwmax =
|
|
||||||
config->channels[i].qos_params[j].cwmax;
|
|
||||||
buf_ptr += sizeof(*qos_param);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Add the wmi_dcc_ndl_chan (per channel) */
|
|
||||||
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC,
|
|
||||||
config->dcc_ndl_chan_list_len);
|
|
||||||
buf_ptr += WMI_TLV_HDR_SIZE;
|
|
||||||
if (config->dcc_ndl_chan_list_len) {
|
|
||||||
ndl_chan = (wmi_dcc_ndl_chan *)buf_ptr;
|
|
||||||
qdf_mem_copy(ndl_chan, config->dcc_ndl_chan_list,
|
|
||||||
config->dcc_ndl_chan_list_len);
|
|
||||||
for (i = 0; i < config->channel_count; i++)
|
|
||||||
WMITLV_SET_HDR(&(ndl_chan[i].tlv_header),
|
|
||||||
WMITLV_TAG_STRUC_wmi_dcc_ndl_chan,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN(wmi_dcc_ndl_chan));
|
|
||||||
buf_ptr += config->dcc_ndl_chan_list_len;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Add the wmi_dcc_ndl_active_state_config */
|
|
||||||
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC, active_state_count *
|
|
||||||
sizeof(wmi_dcc_ndl_active_state_config));
|
|
||||||
buf_ptr += WMI_TLV_HDR_SIZE;
|
|
||||||
if (active_state_count) {
|
|
||||||
ndl_active_config = (wmi_dcc_ndl_active_state_config *)buf_ptr;
|
|
||||||
qdf_mem_copy(ndl_active_config,
|
|
||||||
config->dcc_ndl_active_state_list,
|
|
||||||
active_state_count * sizeof(*ndl_active_config));
|
|
||||||
for (i = 0; i < active_state_count; ++i)
|
|
||||||
WMITLV_SET_HDR(&(ndl_active_config[i].tlv_header),
|
|
||||||
WMITLV_TAG_STRUC_wmi_dcc_ndl_active_state_config,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN(
|
|
||||||
wmi_dcc_ndl_active_state_config));
|
|
||||||
buf_ptr += active_state_count *
|
|
||||||
sizeof(*ndl_active_config);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Add the wmi_ocb_schedule_element info */
|
|
||||||
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC,
|
|
||||||
config->schedule_size * sizeof(wmi_ocb_schedule_element));
|
|
||||||
buf_ptr += WMI_TLV_HDR_SIZE;
|
|
||||||
for (i = 0; i < config->schedule_size; i++) {
|
|
||||||
sched_elem = (wmi_ocb_schedule_element *)buf_ptr;
|
|
||||||
WMITLV_SET_HDR(&sched_elem->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_ocb_schedule_element,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN(wmi_ocb_schedule_element));
|
|
||||||
sched_elem->channel_freq = config->schedule[i].chan_freq;
|
|
||||||
sched_elem->total_duration = config->schedule[i].total_duration;
|
|
||||||
sched_elem->guard_interval = config->schedule[i].guard_interval;
|
|
||||||
buf_ptr += sizeof(*sched_elem);
|
|
||||||
}
|
|
||||||
|
|
||||||
wmi_mtrace(WMI_OCB_SET_CONFIG_CMDID, cmd->vdev_id, 0);
|
|
||||||
ret = wmi_unified_cmd_send(wmi_handle, buf, len,
|
|
||||||
WMI_OCB_SET_CONFIG_CMDID);
|
|
||||||
if (QDF_IS_STATUS_ERROR(ret)) {
|
|
||||||
WMI_LOGE("Failed to set OCB config");
|
|
||||||
wmi_buf_free(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* extract_ocb_channel_config_resp_tlv() - extract ocb channel config resp
|
|
||||||
* @wmi_handle: wmi handle
|
|
||||||
* @evt_buf: wmi event buffer
|
|
||||||
* @status: status buffer
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS on success
|
|
||||||
*/
|
|
||||||
static QDF_STATUS extract_ocb_channel_config_resp_tlv(wmi_unified_t wmi_handle,
|
|
||||||
void *evt_buf,
|
|
||||||
uint32_t *status)
|
|
||||||
{
|
|
||||||
WMI_OCB_SET_CONFIG_RESP_EVENTID_param_tlvs *param_tlvs;
|
|
||||||
wmi_ocb_set_config_resp_event_fixed_param *fix_param;
|
|
||||||
|
|
||||||
param_tlvs = evt_buf;
|
|
||||||
fix_param = param_tlvs->fixed_param;
|
|
||||||
|
|
||||||
*status = fix_param->status;
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* extract_ocb_tsf_timer_tlv() - extract TSF timer from event buffer
|
|
||||||
* @wmi_handle: wmi handle
|
|
||||||
* @evt_buf: wmi event buffer
|
|
||||||
* @resp: response buffer
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS on success
|
|
||||||
*/
|
|
||||||
static QDF_STATUS extract_ocb_tsf_timer_tlv(wmi_unified_t wmi_handle,
|
|
||||||
void *evt_buf, struct ocb_get_tsf_timer_response *resp)
|
|
||||||
{
|
|
||||||
WMI_OCB_GET_TSF_TIMER_RESP_EVENTID_param_tlvs *param_tlvs;
|
|
||||||
wmi_ocb_get_tsf_timer_resp_event_fixed_param *fix_param;
|
|
||||||
|
|
||||||
param_tlvs = evt_buf;
|
|
||||||
fix_param = param_tlvs->fixed_param;
|
|
||||||
resp->vdev_id = fix_param->vdev_id;
|
|
||||||
resp->timer_high = fix_param->tsf_timer_high;
|
|
||||||
resp->timer_low = fix_param->tsf_timer_low;
|
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* extract_ocb_ndl_resp_tlv() - extract TSF timer from event buffer
|
|
||||||
* @wmi_handle: wmi handle
|
|
||||||
* @evt_buf: wmi event buffer
|
|
||||||
* @resp: response buffer
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS on success
|
|
||||||
*/
|
|
||||||
static QDF_STATUS extract_ocb_ndl_resp_tlv(wmi_unified_t wmi_handle,
|
|
||||||
void *evt_buf, struct ocb_dcc_update_ndl_response *resp)
|
|
||||||
{
|
|
||||||
WMI_DCC_UPDATE_NDL_RESP_EVENTID_param_tlvs *param_tlvs;
|
|
||||||
wmi_dcc_update_ndl_resp_event_fixed_param *fix_param;
|
|
||||||
|
|
||||||
param_tlvs = evt_buf;
|
|
||||||
fix_param = param_tlvs->fixed_param;
|
|
||||||
resp->vdev_id = fix_param->vdev_id;
|
|
||||||
resp->status = fix_param->status;
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* extract_ocb_dcc_stats_tlv() - extract DCC stats from event buffer
|
|
||||||
* @wmi_handle: wmi handle
|
|
||||||
* @evt_buf: wmi event buffer
|
|
||||||
* @resp: response buffer
|
|
||||||
*
|
|
||||||
* Since length of stats is variable, buffer for DCC stats will be allocated
|
|
||||||
* in this function. The caller must free the buffer.
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS on success
|
|
||||||
*/
|
|
||||||
static QDF_STATUS extract_ocb_dcc_stats_tlv(wmi_unified_t wmi_handle,
|
|
||||||
void *evt_buf, struct ocb_dcc_get_stats_response **resp)
|
|
||||||
{
|
|
||||||
struct ocb_dcc_get_stats_response *response;
|
|
||||||
WMI_DCC_GET_STATS_RESP_EVENTID_param_tlvs *param_tlvs;
|
|
||||||
wmi_dcc_get_stats_resp_event_fixed_param *fix_param;
|
|
||||||
|
|
||||||
param_tlvs = (WMI_DCC_GET_STATS_RESP_EVENTID_param_tlvs *)evt_buf;
|
|
||||||
fix_param = param_tlvs->fixed_param;
|
|
||||||
|
|
||||||
/* Allocate and populate the response */
|
|
||||||
if (fix_param->num_channels > ((WMI_SVC_MSG_MAX_SIZE -
|
|
||||||
sizeof(*fix_param)) / sizeof(wmi_dcc_ndl_stats_per_channel))) {
|
|
||||||
WMI_LOGE("%s: too many channels:%d", __func__,
|
|
||||||
fix_param->num_channels);
|
|
||||||
QDF_ASSERT(0);
|
|
||||||
*resp = NULL;
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
response = qdf_mem_malloc(sizeof(*response) + fix_param->num_channels *
|
|
||||||
sizeof(wmi_dcc_ndl_stats_per_channel));
|
|
||||||
*resp = response;
|
|
||||||
if (!response)
|
|
||||||
return QDF_STATUS_E_NOMEM;
|
|
||||||
|
|
||||||
response->vdev_id = fix_param->vdev_id;
|
|
||||||
response->num_channels = fix_param->num_channels;
|
|
||||||
response->channel_stats_array_len =
|
|
||||||
fix_param->num_channels *
|
|
||||||
sizeof(wmi_dcc_ndl_stats_per_channel);
|
|
||||||
response->channel_stats_array = ((uint8_t *)response) +
|
|
||||||
sizeof(*response);
|
|
||||||
qdf_mem_copy(response->channel_stats_array,
|
|
||||||
param_tlvs->stats_per_channel_list,
|
|
||||||
response->channel_stats_array_len);
|
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
void wmi_ocb_attach_tlv(wmi_unified_t wmi_handle)
|
|
||||||
{
|
|
||||||
struct wmi_ops *ops = wmi_handle->ops;
|
|
||||||
|
|
||||||
ops->send_ocb_set_utc_time_cmd = send_ocb_set_utc_time_cmd_tlv;
|
|
||||||
ops->send_ocb_get_tsf_timer_cmd = send_ocb_get_tsf_timer_cmd_tlv;
|
|
||||||
ops->send_dcc_clear_stats_cmd = send_dcc_clear_stats_cmd_tlv;
|
|
||||||
ops->send_dcc_get_stats_cmd = send_dcc_get_stats_cmd_tlv;
|
|
||||||
ops->send_dcc_update_ndl_cmd = send_dcc_update_ndl_cmd_tlv;
|
|
||||||
ops->send_ocb_set_config_cmd = send_ocb_set_config_cmd_tlv;
|
|
||||||
ops->send_ocb_stop_timing_advert_cmd =
|
|
||||||
send_ocb_stop_timing_advert_cmd_tlv;
|
|
||||||
ops->send_ocb_start_timing_advert_cmd =
|
|
||||||
send_ocb_start_timing_advert_cmd_tlv;
|
|
||||||
ops->extract_ocb_chan_config_resp =
|
|
||||||
extract_ocb_channel_config_resp_tlv;
|
|
||||||
ops->extract_ocb_tsf_timer = extract_ocb_tsf_timer_tlv;
|
|
||||||
ops->extract_dcc_update_ndl_resp = extract_ocb_ndl_resp_tlv;
|
|
||||||
ops->extract_dcc_stats = extract_ocb_dcc_stats_tlv;
|
|
||||||
}
|
|
@@ -1,518 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2018 The Linux Foundation. All rights reserved.
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
|
||||||
* above copyright notice and this permission notice appear in all
|
|
||||||
* copies.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
|
||||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
|
||||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
||||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "wmi_unified_api.h"
|
|
||||||
#include "wmi.h"
|
|
||||||
#include "wmi_version.h"
|
|
||||||
#include "wmi_unified_priv.h"
|
|
||||||
#include <wlan_defs.h>
|
|
||||||
#include "target_if.h"
|
|
||||||
#include "wma.h"
|
|
||||||
#include "wlan_ocb_ucfg_api.h"
|
|
||||||
#include "wlan_ocb_main.h"
|
|
||||||
|
|
||||||
void wmi_ocb_ut_attach(struct wmi_unified *wmi_handle);
|
|
||||||
|
|
||||||
static inline struct wlan_ocb_rx_ops *
|
|
||||||
target_if_ocb_get_rx_ops(struct wlan_objmgr_psoc *psoc)
|
|
||||||
{
|
|
||||||
struct wlan_objmgr_pdev *pdev;
|
|
||||||
struct ocb_pdev_obj *pdev_obj;
|
|
||||||
|
|
||||||
pdev = wlan_objmgr_get_pdev_by_id(psoc, 0,
|
|
||||||
WLAN_OCB_SB_ID);
|
|
||||||
pdev_obj = (struct ocb_pdev_obj *)
|
|
||||||
wlan_objmgr_pdev_get_comp_private_obj(pdev,
|
|
||||||
WLAN_UMAC_COMP_OCB);
|
|
||||||
return &pdev_obj->ocb_rxops;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* fake_vdev_create_cmd_tlv() - send VDEV create command to fw
|
|
||||||
* @wmi_handle: wmi handle
|
|
||||||
* @param: pointer to hold vdev create parameter
|
|
||||||
* @macaddr: vdev mac address
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS for success or error code
|
|
||||||
*/
|
|
||||||
static QDF_STATUS fake_vdev_create_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
uint8_t macaddr[IEEE80211_ADDR_LEN],
|
|
||||||
struct vdev_create_params *param)
|
|
||||||
{
|
|
||||||
WMI_LOGP("%s : called", __func__);
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* fake_vdev_delete_cmd_tlv() - send VDEV delete command to fw
|
|
||||||
* @wmi_handle: wmi handle
|
|
||||||
* @if_id: vdev id
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS for success or error code
|
|
||||||
*/
|
|
||||||
static QDF_STATUS fake_vdev_delete_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
uint8_t if_id)
|
|
||||||
{
|
|
||||||
WMI_LOGP("%s : called", __func__);
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* fake_ocb_set_utc_time_cmd_tlv() - send the UTC time to the firmware
|
|
||||||
* @wmi_handle: pointer to the wmi handle
|
|
||||||
* @utc: pointer to the UTC time struct
|
|
||||||
*
|
|
||||||
* Return: 0 on succes
|
|
||||||
*/
|
|
||||||
static QDF_STATUS fake_ocb_set_utc_time_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
struct ocb_utc_param *utc)
|
|
||||||
{
|
|
||||||
WMI_LOGP("%s : called", __func__);
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* fake_ocb_get_tsf_timer_cmd_tlv() - get ocb tsf timer val
|
|
||||||
* @wmi_handle: pointer to the wmi handle
|
|
||||||
* @request: pointer to the request
|
|
||||||
*
|
|
||||||
* Return: 0 on succes
|
|
||||||
*/
|
|
||||||
static QDF_STATUS fake_ocb_get_tsf_timer_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
uint8_t vdev_id)
|
|
||||||
{
|
|
||||||
QDF_STATUS status;
|
|
||||||
struct wlan_objmgr_psoc *psoc;
|
|
||||||
struct wlan_ocb_rx_ops *ocb_rx_ops;
|
|
||||||
struct ocb_get_tsf_timer_response response;
|
|
||||||
ol_scn_t scn = (ol_scn_t) wmi_handle->scn_handle;
|
|
||||||
|
|
||||||
WMI_LOGP("%s : called", __func__);
|
|
||||||
psoc = target_if_get_psoc_from_scn_hdl(scn);
|
|
||||||
if (!psoc) {
|
|
||||||
WMI_LOGP("null psoc");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
response.vdev_id = vdev_id;
|
|
||||||
response.timer_high = 0x1234;
|
|
||||||
response.timer_low = 0x5678;
|
|
||||||
|
|
||||||
ocb_rx_ops = target_if_ocb_get_rx_ops(psoc);
|
|
||||||
if (ocb_rx_ops->ocb_tsf_timer) {
|
|
||||||
status = ocb_rx_ops->ocb_tsf_timer(psoc, &response);
|
|
||||||
if (status != QDF_STATUS_SUCCESS) {
|
|
||||||
WMI_LOGP("ocb_tsf_timer failed.");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
WMI_LOGP("No ocb_tsf_timer callback");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* fake_dcc_clear_stats_cmd_tlv() - command to clear the DCC stats
|
|
||||||
* @wmi_handle: pointer to the wmi handle
|
|
||||||
* @vdev_id: vdev id
|
|
||||||
* @dcc_stats_bitmap: dcc status bitmap
|
|
||||||
*
|
|
||||||
* Return: 0 on succes
|
|
||||||
*/
|
|
||||||
static QDF_STATUS fake_dcc_clear_stats_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
uint32_t vdev_id, uint32_t dcc_stats_bitmap)
|
|
||||||
{
|
|
||||||
WMI_LOGP("%s : called", __func__);
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
wmi_dcc_ndl_stats_per_channel chan1_info[2] = {
|
|
||||||
[0] = {.chan_info = 5860,
|
|
||||||
.tx_power_datarate = 23 | (10 << 8),
|
|
||||||
.carrier_sense_est_comm_range = 107 | (198 << 13),
|
|
||||||
.dcc_stats = 78 | (56 << 8) | (345 << 16),
|
|
||||||
.packet_stats = 1278 | (789 << 14),
|
|
||||||
.channel_busy_time = 1389,
|
|
||||||
},
|
|
||||||
[1] = {.chan_info = 5880,
|
|
||||||
.tx_power_datarate = 53 | (17 << 8),
|
|
||||||
.carrier_sense_est_comm_range = 137 | (198 << 13),
|
|
||||||
.dcc_stats = 78 | (66 << 8) | (245 << 16),
|
|
||||||
.packet_stats = 1278 | (889 << 14),
|
|
||||||
.channel_busy_time = 2389,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* fake_dcc_get_stats_cmd_tlv() - get the DCC channel stats
|
|
||||||
* @wmi_handle: pointer to the wmi handle
|
|
||||||
* @get_stats_param: pointer to the dcc stats
|
|
||||||
*
|
|
||||||
* Return: 0 on succes
|
|
||||||
*/
|
|
||||||
static QDF_STATUS fake_dcc_get_stats_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
struct ocb_dcc_get_stats_param *get_stats_param)
|
|
||||||
{
|
|
||||||
QDF_STATUS status;
|
|
||||||
struct wlan_objmgr_psoc *psoc;
|
|
||||||
struct wlan_ocb_rx_ops *ocb_rx_ops;
|
|
||||||
ol_scn_t scn = (ol_scn_t) wmi_handle->scn_handle;
|
|
||||||
struct ocb_dcc_get_stats_response *response;
|
|
||||||
WMI_LOGP("%s : called", __func__);
|
|
||||||
|
|
||||||
psoc = target_if_get_psoc_from_scn_hdl(scn);
|
|
||||||
if (!psoc) {
|
|
||||||
WMI_LOGP("null psoc");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
response = qdf_mem_malloc(sizeof(*response) + 2 *
|
|
||||||
sizeof(wmi_dcc_ndl_stats_per_channel));
|
|
||||||
response->num_channels = 2;
|
|
||||||
response->channel_stats_array_len = 2 *
|
|
||||||
sizeof(wmi_dcc_ndl_stats_per_channel);
|
|
||||||
response->vdev_id = get_stats_param->vdev_id;
|
|
||||||
response->channel_stats_array = (uint8_t *)response + sizeof(*response);
|
|
||||||
qdf_mem_copy(response->channel_stats_array,
|
|
||||||
&chan1_info,
|
|
||||||
2 * sizeof(wmi_dcc_ndl_stats_per_channel));
|
|
||||||
WMI_LOGP("channel1 freq %d, channel2 freq %d", chan1_info[0].chan_info,
|
|
||||||
chan1_info[1].chan_info);
|
|
||||||
ocb_rx_ops = target_if_ocb_get_rx_ops(psoc);
|
|
||||||
if (ocb_rx_ops->ocb_dcc_stats_indicate) {
|
|
||||||
status = ocb_rx_ops->ocb_dcc_stats_indicate(psoc,
|
|
||||||
response, true);
|
|
||||||
if (status != QDF_STATUS_SUCCESS) {
|
|
||||||
WMI_LOGP("dcc_stats_indicate failed.");
|
|
||||||
status = -EINVAL;
|
|
||||||
} else {
|
|
||||||
status = 0;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
WMI_LOGP("No dcc_stats_indicate callback");
|
|
||||||
status = -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
qdf_mem_free(response);
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* fake_dcc_update_ndl_cmd_tlv() - command to update the NDL data
|
|
||||||
* @wmi_handle: pointer to the wmi handle
|
|
||||||
* @update_ndl_param: pointer to the request parameters
|
|
||||||
*
|
|
||||||
* Return: 0 on success
|
|
||||||
*/
|
|
||||||
static QDF_STATUS fake_dcc_update_ndl_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
struct ocb_dcc_update_ndl_param *update_ndl_param)
|
|
||||||
{
|
|
||||||
QDF_STATUS status;
|
|
||||||
struct wlan_objmgr_psoc *psoc;
|
|
||||||
struct wlan_ocb_rx_ops *ocb_rx_ops;
|
|
||||||
ol_scn_t scn = (ol_scn_t) wmi_handle->scn_handle;
|
|
||||||
struct ocb_dcc_update_ndl_response *resp;
|
|
||||||
WMI_LOGP("%s : called", __func__);
|
|
||||||
/* Allocate and populate the response */
|
|
||||||
resp = qdf_mem_malloc(sizeof(*resp));
|
|
||||||
if (!resp) {
|
|
||||||
WMI_LOGP("%s:Error allocating memory for the response.",
|
|
||||||
__func__);
|
|
||||||
return -ENOMEM;
|
|
||||||
}
|
|
||||||
resp->vdev_id = update_ndl_param->vdev_id;
|
|
||||||
resp->status = 0;
|
|
||||||
|
|
||||||
psoc = target_if_get_psoc_from_scn_hdl(scn);
|
|
||||||
if (!psoc) {
|
|
||||||
WMI_LOGP("null psoc");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
ocb_rx_ops = target_if_ocb_get_rx_ops(psoc);
|
|
||||||
if (ocb_rx_ops->ocb_dcc_ndl_update) {
|
|
||||||
status = ocb_rx_ops->ocb_dcc_ndl_update(psoc, resp);
|
|
||||||
if (status != QDF_STATUS_SUCCESS) {
|
|
||||||
WMI_LOGP("dcc_ndl_update failed.");
|
|
||||||
status = -EINVAL;
|
|
||||||
} else {
|
|
||||||
status = 0;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
WMI_LOGP("No dcc_ndl_update callback");
|
|
||||||
status = -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
qdf_mem_free(resp);
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* fake_ocb_set_config_cmd_tlv() - send the OCB config to the FW
|
|
||||||
* @wmi_handle: pointer to the wmi handle
|
|
||||||
* @config: the OCB configuration
|
|
||||||
*
|
|
||||||
* Return: 0 on success
|
|
||||||
*/
|
|
||||||
static QDF_STATUS fake_ocb_set_config_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
struct ocb_config *config)
|
|
||||||
{
|
|
||||||
u32 i;
|
|
||||||
QDF_STATUS status;
|
|
||||||
struct wlan_objmgr_psoc *psoc;
|
|
||||||
struct wlan_ocb_rx_ops *ocb_rx_ops;
|
|
||||||
ol_scn_t scn = (ol_scn_t) wmi_handle->scn_handle;
|
|
||||||
|
|
||||||
WMI_LOGP("%s : called", __func__);
|
|
||||||
WMI_LOGI("%s: vdev_id=%d, channel_count=%d, schedule_size=%d, flag=%x",
|
|
||||||
__func__, config->vdev_id, config->channel_count,
|
|
||||||
config->schedule_size, config->flags);
|
|
||||||
|
|
||||||
for (i = 0; i < config->channel_count; i++) {
|
|
||||||
WMI_LOGI("%s: channel info for channel %d"
|
|
||||||
" chan_freq=%d, bandwidth=%d, " QDF_MAC_ADDRESS_STR
|
|
||||||
" max_pwr=%d, min_pwr=%d, reg_pwr=%d, antenna_max=%d, "
|
|
||||||
"flags=%d", __func__, i, config->channels[i].chan_freq,
|
|
||||||
config->channels[i].bandwidth,
|
|
||||||
QDF_MAC_ADDR_ARRAY(
|
|
||||||
config->channels[i].mac_address.bytes),
|
|
||||||
config->channels[i].max_pwr,
|
|
||||||
config->channels[i].min_pwr,
|
|
||||||
config->channels[i].reg_pwr,
|
|
||||||
config->channels[i].antenna_max,
|
|
||||||
config->channels[i].flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < config->schedule_size; i++) {
|
|
||||||
WMI_LOGI("%s: schedule info for channel %d: "
|
|
||||||
"chan_fre=%d, total_duration=%d, guard_intreval=%d",
|
|
||||||
__func__, i, config->schedule[i].chan_freq,
|
|
||||||
config->schedule[i].total_duration,
|
|
||||||
config->schedule[i].guard_interval);
|
|
||||||
}
|
|
||||||
psoc = target_if_get_psoc_from_scn_hdl(scn);
|
|
||||||
if (!psoc) {
|
|
||||||
WMI_LOGP("null psoc");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
ocb_rx_ops = target_if_ocb_get_rx_ops(psoc);
|
|
||||||
if (ocb_rx_ops->ocb_set_config_status) {
|
|
||||||
status = ocb_rx_ops->ocb_set_config_status(psoc, 0);
|
|
||||||
if (status != QDF_STATUS_SUCCESS) {
|
|
||||||
WMI_LOGP("ocb_set_config_status failed.");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
WMI_LOGP("No ocb_set_config_status callback");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* fake_ocb_stop_timing_advert_cmd_tlv() - stop sending the
|
|
||||||
* timing advertisement frames on a channel
|
|
||||||
* @wmi_handle: pointer to the wmi handle
|
|
||||||
* @timing_advert: pointer to the timing advertisement struct
|
|
||||||
*
|
|
||||||
* Return: 0 on succes
|
|
||||||
*/
|
|
||||||
static QDF_STATUS fake_ocb_stop_timing_advert_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
struct ocb_timing_advert_param *timing_advert)
|
|
||||||
{
|
|
||||||
WMI_LOGP("%s : called", __func__);
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* fake_ocb_start_timing_advert_cmd_tlv() - start sending the
|
|
||||||
* timing advertisement frames on a channel
|
|
||||||
* @wmi_handle: pointer to the wmi handle
|
|
||||||
* @timing_advert: pointer to the timing advertisement struct
|
|
||||||
*
|
|
||||||
* Return: 0 on succes
|
|
||||||
*/
|
|
||||||
static QDF_STATUS
|
|
||||||
fake_ocb_start_timing_advert_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
struct ocb_timing_advert_param *timing_advert)
|
|
||||||
{
|
|
||||||
WMI_LOGP("%s : called", __func__);
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* fake_peer_create_cmd_tlv() - send peer create command to fw
|
|
||||||
* @wmi: wmi handle
|
|
||||||
* @peer_addr: peer mac address
|
|
||||||
* @peer_type: peer type
|
|
||||||
* @vdev_id: vdev id
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS for success or error code
|
|
||||||
*/
|
|
||||||
static QDF_STATUS fake_peer_create_cmd_tlv(wmi_unified_t wmi,
|
|
||||||
struct peer_create_params *param)
|
|
||||||
{
|
|
||||||
WMI_LOGP("%s : called", __func__);
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* fake_peer_delete_cmd_tlv() - send PEER delete command to fw
|
|
||||||
* @wmi: wmi handle
|
|
||||||
* @peer_addr: peer mac addr
|
|
||||||
* @vdev_id: vdev id
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS for success or error code
|
|
||||||
*/
|
|
||||||
static QDF_STATUS fake_peer_delete_cmd_tlv(wmi_unified_t wmi,
|
|
||||||
uint8_t peer_addr[IEEE80211_ADDR_LEN],
|
|
||||||
uint8_t vdev_id)
|
|
||||||
{
|
|
||||||
WMI_LOGP("%s : called", __func__);
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* fake_vdev_start_cmd_tlv() - send vdev start request to fw
|
|
||||||
* @wmi_handle: wmi handle
|
|
||||||
* @req: vdev start params
|
|
||||||
*
|
|
||||||
* Return: QDF status
|
|
||||||
*/
|
|
||||||
static QDF_STATUS fake_vdev_start_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
struct vdev_start_params *req)
|
|
||||||
{
|
|
||||||
tp_wma_handle wma = (tp_wma_handle) wmi_handle->scn_handle;
|
|
||||||
WMI_LOGP("%s : called", __func__);
|
|
||||||
WMI_LOGI("%s: vdev_id %d freq %d chanmode %d ch_info is_dfs %d "
|
|
||||||
"beacon interval %d dtim %d center_chan %d center_freq2 %d "
|
|
||||||
"max_txpow: 0x%x "
|
|
||||||
"Tx SS %d, Rx SS %d, ldpc_rx: %d, cac %d, regd %d, HE ops: %d",
|
|
||||||
__func__, (int)req->vdev_id, req->channel.mhz,
|
|
||||||
req->channel.phy_mode,
|
|
||||||
(int)req->channel.dfs_set, req->beacon_intval, req->dtim_period,
|
|
||||||
req->channel.cfreq1, req->channel.cfreq2,
|
|
||||||
req->channel.maxregpower,
|
|
||||||
req->preferred_tx_streams, req->preferred_rx_streams,
|
|
||||||
(int)req->ldpc_rx_enabled, req->cac_duration_ms,
|
|
||||||
req->regdomain, req->he_ops);
|
|
||||||
wma_remove_vdev_req(wma, req->vdev_id,
|
|
||||||
WMA_TARGET_REQ_TYPE_VDEV_START);
|
|
||||||
#ifndef CONFIG_VDEV_SM
|
|
||||||
wma_vdev_set_mlme_state(wma, req->vdev_id,
|
|
||||||
WLAN_VDEV_S_RUN);
|
|
||||||
#endif
|
|
||||||
ucfg_ocb_config_channel(wma->pdev);
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* fake_vdev_down_cmd_tlv() - send vdev down command to fw
|
|
||||||
* @wmi: wmi handle
|
|
||||||
* @vdev_id: vdev id
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS for success or error code
|
|
||||||
*/
|
|
||||||
static QDF_STATUS fake_vdev_down_cmd_tlv(wmi_unified_t wmi, uint8_t vdev_id)
|
|
||||||
{
|
|
||||||
WMI_LOGP("%s : called", __func__);
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* fake_vdev_set_param_cmd_tlv() - WMI vdev set parameter function
|
|
||||||
* @param wmi_handle : handle to WMI.
|
|
||||||
* @param macaddr : MAC address
|
|
||||||
* @param param : pointer to hold vdev set parameter
|
|
||||||
*
|
|
||||||
* Return: 0 on success and -ve on failure.
|
|
||||||
*/
|
|
||||||
static QDF_STATUS fake_vdev_set_param_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
struct vdev_set_params *param)
|
|
||||||
{
|
|
||||||
WMI_LOGP("%s : called", __func__);
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* fake_set_enable_disable_mcc_adaptive_scheduler_cmd_tlv() -
|
|
||||||
* faked API to enable/disable mcc scheduler
|
|
||||||
* @wmi_handle: wmi handle
|
|
||||||
* @mcc_adaptive_scheduler: enable/disable
|
|
||||||
*
|
|
||||||
* This function enable/disable mcc adaptive scheduler in fw.
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS for success or error code
|
|
||||||
*/
|
|
||||||
static QDF_STATUS fake_set_enable_disable_mcc_adaptive_scheduler_cmd_tlv(
|
|
||||||
wmi_unified_t wmi_handle, uint32_t mcc_adaptive_scheduler,
|
|
||||||
uint32_t pdev_id)
|
|
||||||
{
|
|
||||||
WMI_LOGP("%s : called", __func__);
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* fake_process_set_ie_info_cmd_tlv() - Function to send IE info to firmware
|
|
||||||
* @wmi_handle: Pointer to WMi handle
|
|
||||||
* @ie_data: Pointer for ie data
|
|
||||||
*
|
|
||||||
* This function sends IE information to firmware
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS for success otherwise failure
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
static QDF_STATUS fake_process_set_ie_info_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
struct vdev_ie_info_param *ie_info)
|
|
||||||
{
|
|
||||||
WMI_LOGP("%s : called", __func__);
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
void wmi_ocb_ut_attach(struct wmi_unified *wmi_handle)
|
|
||||||
{
|
|
||||||
struct wmi_ops *wmi_ops;
|
|
||||||
|
|
||||||
if (!wmi_handle) {
|
|
||||||
WMI_LOGP("%s: null wmi handle", __func__);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
wmi_ops = wmi_handle->ops;
|
|
||||||
wmi_ops->send_vdev_create_cmd = fake_vdev_create_cmd_tlv;
|
|
||||||
wmi_ops->send_vdev_delete_cmd = fake_vdev_delete_cmd_tlv;
|
|
||||||
wmi_ops->send_vdev_down_cmd = fake_vdev_down_cmd_tlv;
|
|
||||||
wmi_ops->send_vdev_start_cmd = fake_vdev_start_cmd_tlv;
|
|
||||||
wmi_ops->send_peer_create_cmd = fake_peer_create_cmd_tlv;
|
|
||||||
wmi_ops->send_peer_delete_cmd = fake_peer_delete_cmd_tlv;
|
|
||||||
wmi_ops->send_vdev_set_param_cmd = fake_vdev_set_param_cmd_tlv;
|
|
||||||
wmi_ops->send_ocb_set_utc_time_cmd = fake_ocb_set_utc_time_cmd_tlv;
|
|
||||||
wmi_ops->send_ocb_get_tsf_timer_cmd = fake_ocb_get_tsf_timer_cmd_tlv;
|
|
||||||
wmi_ops->send_dcc_clear_stats_cmd = fake_dcc_clear_stats_cmd_tlv;
|
|
||||||
wmi_ops->send_dcc_get_stats_cmd = fake_dcc_get_stats_cmd_tlv;
|
|
||||||
wmi_ops->send_dcc_update_ndl_cmd = fake_dcc_update_ndl_cmd_tlv;
|
|
||||||
wmi_ops->send_ocb_set_config_cmd = fake_ocb_set_config_cmd_tlv;
|
|
||||||
wmi_ops->send_ocb_stop_timing_advert_cmd =
|
|
||||||
fake_ocb_stop_timing_advert_cmd_tlv;
|
|
||||||
wmi_ops->send_ocb_start_timing_advert_cmd =
|
|
||||||
fake_ocb_start_timing_advert_cmd_tlv;
|
|
||||||
wmi_ops->send_set_enable_disable_mcc_adaptive_scheduler_cmd =
|
|
||||||
fake_set_enable_disable_mcc_adaptive_scheduler_cmd_tlv;
|
|
||||||
wmi_ops->send_process_set_ie_info_cmd =
|
|
||||||
fake_process_set_ie_info_cmd_tlv;
|
|
||||||
}
|
|
@@ -1,153 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
|
||||||
* above copyright notice and this permission notice appear in all
|
|
||||||
* copies.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
|
||||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
|
||||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
||||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* DOC: Implement API's specific to P2P component.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <wmi_unified_priv.h>
|
|
||||||
#include <wmi_unified_p2p_api.h>
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_set_p2pgo_oppps_req(void *wmi_hdl,
|
|
||||||
struct p2p_ps_params *oppps)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_set_p2pgo_oppps_req_cmd)
|
|
||||||
return wmi_handle->ops->send_set_p2pgo_oppps_req_cmd(wmi_handle,
|
|
||||||
oppps);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_set_p2pgo_noa_req_cmd(void *wmi_hdl,
|
|
||||||
struct p2p_ps_params *noa)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_set_p2pgo_noa_req_cmd)
|
|
||||||
return wmi_handle->ops->send_set_p2pgo_noa_req_cmd(wmi_handle,
|
|
||||||
noa);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_p2p_noa_ev_param(void *wmi_hdl, void *evt_buf,
|
|
||||||
struct p2p_noa_info *param)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
|
|
||||||
|
|
||||||
if (!wmi_handle) {
|
|
||||||
WMI_LOGE("wmi handle is null");
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (wmi_handle->ops->extract_p2p_noa_ev_param)
|
|
||||||
return wmi_handle->ops->extract_p2p_noa_ev_param(
|
|
||||||
wmi_handle, evt_buf, param);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS
|
|
||||||
wmi_send_set_mac_addr_rx_filter_cmd(void *wmi_hdl,
|
|
||||||
struct p2p_set_mac_filter *param)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
|
|
||||||
|
|
||||||
if (!wmi_handle) {
|
|
||||||
WMI_LOGE("wmi handle is null");
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (wmi_handle->ops->set_mac_addr_rx_filter)
|
|
||||||
return wmi_handle->ops->set_mac_addr_rx_filter(
|
|
||||||
wmi_handle, param);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS
|
|
||||||
wmi_extract_mac_addr_rx_filter_evt_param(void *wmi_hdl, void *evt_buf,
|
|
||||||
struct p2p_set_mac_filter_evt *param)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
|
|
||||||
|
|
||||||
if (!wmi_handle) {
|
|
||||||
WMI_LOGE("wmi handle is null");
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (wmi_handle->ops->extract_mac_addr_rx_filter_evt_param)
|
|
||||||
return wmi_handle->ops->extract_mac_addr_rx_filter_evt_param(
|
|
||||||
wmi_handle, evt_buf, param);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef FEATURE_P2P_LISTEN_OFFLOAD
|
|
||||||
QDF_STATUS wmi_unified_p2p_lo_start_cmd(void *wmi_hdl,
|
|
||||||
struct p2p_lo_start *param)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
|
|
||||||
|
|
||||||
if (!wmi_handle) {
|
|
||||||
WMI_LOGE("wmi handle is null");
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_p2p_lo_start_cmd)
|
|
||||||
return wmi_handle->ops->send_p2p_lo_start_cmd(wmi_handle,
|
|
||||||
param);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_p2p_lo_stop_cmd(void *wmi_hdl, uint8_t vdev_id)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
|
|
||||||
|
|
||||||
if (!wmi_handle) {
|
|
||||||
WMI_LOGE("wmi handle is null");
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_p2p_lo_stop_cmd)
|
|
||||||
return wmi_handle->ops->send_p2p_lo_stop_cmd(wmi_handle,
|
|
||||||
vdev_id);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_p2p_lo_stop_ev_param(void *wmi_hdl, void *evt_buf,
|
|
||||||
struct p2p_lo_event *param)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
|
|
||||||
|
|
||||||
if (!wmi_handle) {
|
|
||||||
WMI_LOGE("wmi handle is null");
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (wmi_handle->ops->extract_p2p_lo_stop_ev_param)
|
|
||||||
return wmi_handle->ops->extract_p2p_lo_stop_ev_param(
|
|
||||||
wmi_handle, evt_buf, param);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
#endif /* End of FEATURE_P2P_LISTEN_OFFLOAD*/
|
|
||||||
|
|
@@ -1,489 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
|
||||||
* above copyright notice and this permission notice appear in all
|
|
||||||
* copies.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
|
||||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
|
||||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
||||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <osdep.h>
|
|
||||||
#include <wmi.h>
|
|
||||||
#include <wmi_unified_priv.h>
|
|
||||||
#include <wmi_unified_p2p_api.h>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* send_set_p2pgo_noa_req_cmd_tlv() - send p2p go noa request to fw
|
|
||||||
* @wmi_handle: wmi handle
|
|
||||||
* @noa: p2p power save parameters
|
|
||||||
*
|
|
||||||
* Return: CDF status
|
|
||||||
*/
|
|
||||||
static QDF_STATUS send_set_p2pgo_noa_req_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
struct p2p_ps_params *noa)
|
|
||||||
{
|
|
||||||
wmi_p2p_set_noa_cmd_fixed_param *cmd;
|
|
||||||
wmi_p2p_noa_descriptor *noa_discriptor;
|
|
||||||
wmi_buf_t buf;
|
|
||||||
uint8_t *buf_ptr;
|
|
||||||
uint16_t len;
|
|
||||||
QDF_STATUS status;
|
|
||||||
uint32_t duration;
|
|
||||||
|
|
||||||
WMI_LOGD("%s: Enter", __func__);
|
|
||||||
len = sizeof(*cmd) + WMI_TLV_HDR_SIZE + sizeof(*noa_discriptor);
|
|
||||||
buf = wmi_buf_alloc(wmi_handle, len);
|
|
||||||
if (!buf) {
|
|
||||||
status = QDF_STATUS_E_FAILURE;
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
|
|
||||||
buf_ptr = (uint8_t *)wmi_buf_data(buf);
|
|
||||||
cmd = (wmi_p2p_set_noa_cmd_fixed_param *)buf_ptr;
|
|
||||||
WMITLV_SET_HDR(&cmd->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_p2p_set_noa_cmd_fixed_param,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN
|
|
||||||
(wmi_p2p_set_noa_cmd_fixed_param));
|
|
||||||
duration = (noa->count == 1) ? noa->single_noa_duration : noa->duration;
|
|
||||||
cmd->vdev_id = noa->session_id;
|
|
||||||
cmd->enable = (duration) ? true : false;
|
|
||||||
cmd->num_noa = 1;
|
|
||||||
|
|
||||||
WMITLV_SET_HDR((buf_ptr + sizeof(wmi_p2p_set_noa_cmd_fixed_param)),
|
|
||||||
WMITLV_TAG_ARRAY_STRUC, sizeof(wmi_p2p_noa_descriptor));
|
|
||||||
noa_discriptor = (wmi_p2p_noa_descriptor *)(buf_ptr +
|
|
||||||
sizeof
|
|
||||||
(wmi_p2p_set_noa_cmd_fixed_param)
|
|
||||||
+ WMI_TLV_HDR_SIZE);
|
|
||||||
WMITLV_SET_HDR(&noa_discriptor->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_p2p_noa_descriptor,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN(wmi_p2p_noa_descriptor));
|
|
||||||
noa_discriptor->type_count = noa->count;
|
|
||||||
noa_discriptor->duration = duration;
|
|
||||||
noa_discriptor->interval = noa->interval;
|
|
||||||
noa_discriptor->start_time = 0;
|
|
||||||
|
|
||||||
WMI_LOGI("SET P2P GO NOA:vdev_id:%d count:%d duration:%d interval:%d",
|
|
||||||
cmd->vdev_id, noa->count, noa_discriptor->duration,
|
|
||||||
noa->interval);
|
|
||||||
wmi_mtrace(WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID, cmd->vdev_id, 0);
|
|
||||||
status = wmi_unified_cmd_send(wmi_handle, buf, len,
|
|
||||||
WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID);
|
|
||||||
if (QDF_IS_STATUS_ERROR(status)) {
|
|
||||||
WMI_LOGE("Failed to send WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID");
|
|
||||||
wmi_buf_free(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
end:
|
|
||||||
WMI_LOGD("%s: Exit", __func__);
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* send_set_p2pgo_oppps_req_cmd_tlv() - send p2p go opp power save request to fw
|
|
||||||
* @wmi_handle: wmi handle
|
|
||||||
* @noa: p2p opp power save parameters
|
|
||||||
*
|
|
||||||
* Return: CDF status
|
|
||||||
*/
|
|
||||||
static QDF_STATUS send_set_p2pgo_oppps_req_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
struct p2p_ps_params *oppps)
|
|
||||||
{
|
|
||||||
wmi_p2p_set_oppps_cmd_fixed_param *cmd;
|
|
||||||
wmi_buf_t buf;
|
|
||||||
QDF_STATUS status;
|
|
||||||
|
|
||||||
WMI_LOGD("%s: Enter", __func__);
|
|
||||||
buf = wmi_buf_alloc(wmi_handle, sizeof(*cmd));
|
|
||||||
if (!buf) {
|
|
||||||
status = QDF_STATUS_E_FAILURE;
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
|
|
||||||
cmd = (wmi_p2p_set_oppps_cmd_fixed_param *) wmi_buf_data(buf);
|
|
||||||
WMITLV_SET_HDR(&cmd->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_p2p_set_oppps_cmd_fixed_param,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN(
|
|
||||||
wmi_p2p_set_oppps_cmd_fixed_param));
|
|
||||||
cmd->vdev_id = oppps->session_id;
|
|
||||||
if (oppps->ctwindow)
|
|
||||||
WMI_UNIFIED_OPPPS_ATTR_ENABLED_SET(cmd);
|
|
||||||
|
|
||||||
WMI_UNIFIED_OPPPS_ATTR_CTWIN_SET(cmd, oppps->ctwindow);
|
|
||||||
WMI_LOGI("SET P2P GO OPPPS:vdev_id:%d ctwindow:%d",
|
|
||||||
cmd->vdev_id, oppps->ctwindow);
|
|
||||||
wmi_mtrace(WMI_P2P_SET_OPPPS_PARAM_CMDID, cmd->vdev_id, 0);
|
|
||||||
status = wmi_unified_cmd_send(wmi_handle, buf, sizeof(*cmd),
|
|
||||||
WMI_P2P_SET_OPPPS_PARAM_CMDID);
|
|
||||||
if (QDF_IS_STATUS_ERROR(status)) {
|
|
||||||
WMI_LOGE("Failed to send WMI_P2P_SET_OPPPS_PARAM_CMDID");
|
|
||||||
wmi_buf_free(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
end:
|
|
||||||
WMI_LOGD("%s: Exit", __func__);
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* extract_p2p_noa_ev_param_tlv() - extract p2p noa information from event
|
|
||||||
* @wmi_handle: wmi handle
|
|
||||||
* @param evt_buf: pointer to event buffer
|
|
||||||
* @param param: Pointer to hold p2p noa info
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS for success or error code
|
|
||||||
*/
|
|
||||||
static QDF_STATUS extract_p2p_noa_ev_param_tlv(
|
|
||||||
wmi_unified_t wmi_handle, void *evt_buf,
|
|
||||||
struct p2p_noa_info *param)
|
|
||||||
{
|
|
||||||
WMI_P2P_NOA_EVENTID_param_tlvs *param_tlvs;
|
|
||||||
wmi_p2p_noa_event_fixed_param *fixed_param;
|
|
||||||
uint8_t i;
|
|
||||||
wmi_p2p_noa_info *wmi_noa_info;
|
|
||||||
uint8_t *buf_ptr;
|
|
||||||
uint32_t descriptors;
|
|
||||||
|
|
||||||
param_tlvs = (WMI_P2P_NOA_EVENTID_param_tlvs *)evt_buf;
|
|
||||||
if (!param_tlvs) {
|
|
||||||
WMI_LOGE("%s: Invalid P2P NoA event buffer", __func__);
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!param) {
|
|
||||||
WMI_LOGE("noa information param is null");
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
fixed_param = param_tlvs->fixed_param;
|
|
||||||
buf_ptr = (uint8_t *) fixed_param;
|
|
||||||
buf_ptr += sizeof(wmi_p2p_noa_event_fixed_param);
|
|
||||||
wmi_noa_info = (wmi_p2p_noa_info *) (buf_ptr);
|
|
||||||
|
|
||||||
if (!WMI_UNIFIED_NOA_ATTR_IS_MODIFIED(wmi_noa_info)) {
|
|
||||||
WMI_LOGE("%s: noa attr is not modified", __func__);
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
param->vdev_id = fixed_param->vdev_id;
|
|
||||||
param->index =
|
|
||||||
(uint8_t)WMI_UNIFIED_NOA_ATTR_INDEX_GET(wmi_noa_info);
|
|
||||||
param->opps_ps =
|
|
||||||
(uint8_t)WMI_UNIFIED_NOA_ATTR_OPP_PS_GET(wmi_noa_info);
|
|
||||||
param->ct_window =
|
|
||||||
(uint8_t)WMI_UNIFIED_NOA_ATTR_CTWIN_GET(wmi_noa_info);
|
|
||||||
descriptors = WMI_UNIFIED_NOA_ATTR_NUM_DESC_GET(wmi_noa_info);
|
|
||||||
param->num_desc = (uint8_t)descriptors;
|
|
||||||
if (param->num_desc > WMI_P2P_MAX_NOA_DESCRIPTORS) {
|
|
||||||
WMI_LOGE("%s: invalid num desc:%d", __func__,
|
|
||||||
param->num_desc);
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
WMI_LOGD("%s:index %u, opps_ps %u, ct_window %u, num_descriptors = %u",
|
|
||||||
__func__,
|
|
||||||
param->index, param->opps_ps, param->ct_window,
|
|
||||||
param->num_desc);
|
|
||||||
for (i = 0; i < param->num_desc; i++) {
|
|
||||||
param->noa_desc[i].type_count =
|
|
||||||
(uint8_t)wmi_noa_info->noa_descriptors[i].
|
|
||||||
type_count;
|
|
||||||
param->noa_desc[i].duration =
|
|
||||||
wmi_noa_info->noa_descriptors[i].duration;
|
|
||||||
param->noa_desc[i].interval =
|
|
||||||
wmi_noa_info->noa_descriptors[i].interval;
|
|
||||||
param->noa_desc[i].start_time =
|
|
||||||
wmi_noa_info->noa_descriptors[i].start_time;
|
|
||||||
WMI_LOGD("%s:NoA descriptor[%d] type_count %u, duration %u, interval %u, start_time = %u",
|
|
||||||
__func__, i, param->noa_desc[i].type_count,
|
|
||||||
param->noa_desc[i].duration,
|
|
||||||
param->noa_desc[i].interval,
|
|
||||||
param->noa_desc[i].start_time);
|
|
||||||
}
|
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
static QDF_STATUS
|
|
||||||
send_set_mac_addr_rx_filter_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
struct p2p_set_mac_filter *param)
|
|
||||||
{
|
|
||||||
wmi_vdev_add_mac_addr_to_rx_filter_cmd_fixed_param *cmd;
|
|
||||||
uint32_t len;
|
|
||||||
wmi_buf_t buf;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (!wmi_handle) {
|
|
||||||
WMI_LOGE("WMA context is invald!");
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
len = sizeof(*cmd);
|
|
||||||
buf = wmi_buf_alloc(wmi_handle, len);
|
|
||||||
if (!buf) {
|
|
||||||
WMI_LOGE("Failed allocate wmi buffer");
|
|
||||||
return QDF_STATUS_E_NOMEM;
|
|
||||||
}
|
|
||||||
|
|
||||||
cmd = (wmi_vdev_add_mac_addr_to_rx_filter_cmd_fixed_param *)
|
|
||||||
wmi_buf_data(buf);
|
|
||||||
|
|
||||||
WMITLV_SET_HDR(
|
|
||||||
&cmd->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_vdev_add_mac_addr_to_rx_filter_cmd_fixed_param,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN(
|
|
||||||
wmi_vdev_add_mac_addr_to_rx_filter_cmd_fixed_param));
|
|
||||||
|
|
||||||
cmd->vdev_id = param->vdev_id;
|
|
||||||
cmd->freq = param->freq;
|
|
||||||
WMI_CHAR_ARRAY_TO_MAC_ADDR(param->mac, &cmd->mac_addr);
|
|
||||||
if (param->set)
|
|
||||||
cmd->enable = 1;
|
|
||||||
else
|
|
||||||
cmd->enable = 0;
|
|
||||||
WMI_LOGD("set random mac rx vdev %d freq %d set %d %pM",
|
|
||||||
param->vdev_id, param->freq, param->set, param->mac);
|
|
||||||
ret = wmi_unified_cmd_send(wmi_handle, buf, len,
|
|
||||||
WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_CMDID);
|
|
||||||
if (ret) {
|
|
||||||
WMI_LOGE("Failed to send action frame random mac cmd");
|
|
||||||
wmi_buf_free(buf);
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
static QDF_STATUS extract_mac_addr_rx_filter_evt_param_tlv(
|
|
||||||
wmi_unified_t wmi_handle, void *evt_buf,
|
|
||||||
struct p2p_set_mac_filter_evt *param)
|
|
||||||
{
|
|
||||||
WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_STATUS_EVENTID_param_tlvs *param_buf;
|
|
||||||
wmi_vdev_add_mac_addr_to_rx_filter_status_event_fixed_param *event;
|
|
||||||
|
|
||||||
param_buf =
|
|
||||||
(WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_STATUS_EVENTID_param_tlvs *)
|
|
||||||
evt_buf;
|
|
||||||
if (!param_buf) {
|
|
||||||
WMI_LOGE("Invalid action frame filter mac event");
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
event = param_buf->fixed_param;
|
|
||||||
if (!event) {
|
|
||||||
WMI_LOGE("Invalid fixed param");
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
param->vdev_id = event->vdev_id;
|
|
||||||
param->status = event->status;
|
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef FEATURE_P2P_LISTEN_OFFLOAD
|
|
||||||
/**
|
|
||||||
* send_p2p_lo_start_cmd_tlv() - send p2p lo start request to fw
|
|
||||||
* @wmi_handle: wmi handle
|
|
||||||
* @param: p2p listen offload start parameters
|
|
||||||
*
|
|
||||||
* Return: QDF status
|
|
||||||
*/
|
|
||||||
static QDF_STATUS send_p2p_lo_start_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
struct p2p_lo_start *param)
|
|
||||||
{
|
|
||||||
wmi_buf_t buf;
|
|
||||||
wmi_p2p_lo_start_cmd_fixed_param *cmd;
|
|
||||||
int32_t len = sizeof(*cmd);
|
|
||||||
uint8_t *buf_ptr;
|
|
||||||
QDF_STATUS status;
|
|
||||||
int device_types_len_aligned;
|
|
||||||
int probe_resp_len_aligned;
|
|
||||||
|
|
||||||
if (!param) {
|
|
||||||
WMI_LOGE("lo start param is null");
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
WMI_LOGD("%s: vdev_id:%d", __func__, param->vdev_id);
|
|
||||||
|
|
||||||
device_types_len_aligned =
|
|
||||||
qdf_roundup(param->dev_types_len,
|
|
||||||
sizeof(uint32_t));
|
|
||||||
probe_resp_len_aligned =
|
|
||||||
qdf_roundup(param->probe_resp_len,
|
|
||||||
sizeof(uint32_t));
|
|
||||||
|
|
||||||
len += 2 * WMI_TLV_HDR_SIZE + device_types_len_aligned +
|
|
||||||
probe_resp_len_aligned;
|
|
||||||
|
|
||||||
buf = wmi_buf_alloc(wmi_handle, len);
|
|
||||||
if (!buf) {
|
|
||||||
return QDF_STATUS_E_NOMEM;
|
|
||||||
}
|
|
||||||
|
|
||||||
cmd = (wmi_p2p_lo_start_cmd_fixed_param *)wmi_buf_data(buf);
|
|
||||||
buf_ptr = (uint8_t *) wmi_buf_data(buf);
|
|
||||||
|
|
||||||
WMITLV_SET_HDR(&cmd->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_p2p_lo_start_cmd_fixed_param,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN(wmi_p2p_lo_start_cmd_fixed_param));
|
|
||||||
|
|
||||||
cmd->vdev_id = param->vdev_id;
|
|
||||||
cmd->ctl_flags = param->ctl_flags;
|
|
||||||
cmd->channel = param->freq;
|
|
||||||
cmd->period = param->period;
|
|
||||||
cmd->interval = param->interval;
|
|
||||||
cmd->count = param->count;
|
|
||||||
cmd->device_types_len = param->dev_types_len;
|
|
||||||
cmd->prob_resp_len = param->probe_resp_len;
|
|
||||||
|
|
||||||
buf_ptr += sizeof(wmi_p2p_lo_start_cmd_fixed_param);
|
|
||||||
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE,
|
|
||||||
device_types_len_aligned);
|
|
||||||
buf_ptr += WMI_TLV_HDR_SIZE;
|
|
||||||
qdf_mem_copy(buf_ptr, param->device_types,
|
|
||||||
param->dev_types_len);
|
|
||||||
|
|
||||||
buf_ptr += device_types_len_aligned;
|
|
||||||
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE,
|
|
||||||
probe_resp_len_aligned);
|
|
||||||
buf_ptr += WMI_TLV_HDR_SIZE;
|
|
||||||
qdf_mem_copy(buf_ptr, param->probe_resp_tmplt,
|
|
||||||
param->probe_resp_len);
|
|
||||||
|
|
||||||
WMI_LOGD("%s: Sending WMI_P2P_LO_START command, channel=%d, period=%d, interval=%d, count=%d", __func__,
|
|
||||||
cmd->channel, cmd->period, cmd->interval, cmd->count);
|
|
||||||
|
|
||||||
wmi_mtrace(WMI_P2P_LISTEN_OFFLOAD_START_CMDID, cmd->vdev_id, 0);
|
|
||||||
status = wmi_unified_cmd_send(wmi_handle,
|
|
||||||
buf, len,
|
|
||||||
WMI_P2P_LISTEN_OFFLOAD_START_CMDID);
|
|
||||||
if (status != QDF_STATUS_SUCCESS) {
|
|
||||||
WMI_LOGE("%s: Failed to send p2p lo start: %d",
|
|
||||||
__func__, status);
|
|
||||||
wmi_buf_free(buf);
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
WMI_LOGD("%s: Successfully sent WMI_P2P_LO_START", __func__);
|
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* send_p2p_lo_stop_cmd_tlv() - send p2p lo stop request to fw
|
|
||||||
* @wmi_handle: wmi handle
|
|
||||||
* @param: p2p listen offload stop parameters
|
|
||||||
*
|
|
||||||
* Return: QDF status
|
|
||||||
*/
|
|
||||||
static QDF_STATUS send_p2p_lo_stop_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
uint8_t vdev_id)
|
|
||||||
{
|
|
||||||
wmi_buf_t buf;
|
|
||||||
wmi_p2p_lo_stop_cmd_fixed_param *cmd;
|
|
||||||
int32_t len;
|
|
||||||
QDF_STATUS status;
|
|
||||||
|
|
||||||
WMI_LOGD("%s: vdev_id:%d", __func__, vdev_id);
|
|
||||||
|
|
||||||
len = sizeof(*cmd);
|
|
||||||
buf = wmi_buf_alloc(wmi_handle, len);
|
|
||||||
if (!buf) {
|
|
||||||
return QDF_STATUS_E_NOMEM;
|
|
||||||
}
|
|
||||||
cmd = (wmi_p2p_lo_stop_cmd_fixed_param *)wmi_buf_data(buf);
|
|
||||||
|
|
||||||
WMITLV_SET_HDR(&cmd->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_p2p_lo_stop_cmd_fixed_param,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN(wmi_p2p_lo_stop_cmd_fixed_param));
|
|
||||||
|
|
||||||
cmd->vdev_id = vdev_id;
|
|
||||||
|
|
||||||
WMI_LOGD("%s: Sending WMI_P2P_LO_STOP command", __func__);
|
|
||||||
|
|
||||||
wmi_mtrace(WMI_P2P_LISTEN_OFFLOAD_STOP_CMDID, cmd->vdev_id, 0);
|
|
||||||
status = wmi_unified_cmd_send(wmi_handle,
|
|
||||||
buf, len,
|
|
||||||
WMI_P2P_LISTEN_OFFLOAD_STOP_CMDID);
|
|
||||||
if (status != QDF_STATUS_SUCCESS) {
|
|
||||||
WMI_LOGE("%s: Failed to send p2p lo stop: %d",
|
|
||||||
__func__, status);
|
|
||||||
wmi_buf_free(buf);
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
WMI_LOGD("%s: Successfully sent WMI_P2P_LO_STOP", __func__);
|
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* extract_p2p_lo_stop_ev_param_tlv() - extract p2p lo stop
|
|
||||||
* information from event
|
|
||||||
* @wmi_handle: wmi handle
|
|
||||||
* @param evt_buf: pointer to event buffer
|
|
||||||
* @param param: Pointer to hold p2p lo stop event information
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS for success or error code
|
|
||||||
*/
|
|
||||||
static QDF_STATUS extract_p2p_lo_stop_ev_param_tlv(
|
|
||||||
wmi_unified_t wmi_handle, void *evt_buf,
|
|
||||||
struct p2p_lo_event *param)
|
|
||||||
{
|
|
||||||
WMI_P2P_LISTEN_OFFLOAD_STOPPED_EVENTID_param_tlvs *param_tlvs;
|
|
||||||
wmi_p2p_lo_stopped_event_fixed_param *lo_param;
|
|
||||||
|
|
||||||
param_tlvs = (WMI_P2P_LISTEN_OFFLOAD_STOPPED_EVENTID_param_tlvs *)
|
|
||||||
evt_buf;
|
|
||||||
if (!param_tlvs) {
|
|
||||||
WMI_LOGE("%s: Invalid P2P lo stop event buffer", __func__);
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!param) {
|
|
||||||
WMI_LOGE("lo stop event param is null");
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
lo_param = param_tlvs->fixed_param;
|
|
||||||
param->vdev_id = lo_param->vdev_id;
|
|
||||||
param->reason_code = lo_param->reason;
|
|
||||||
WMI_LOGD("%s: vdev_id:%d, reason:%d", __func__,
|
|
||||||
param->vdev_id, param->reason_code);
|
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
void wmi_p2p_listen_offload_attach_tlv(wmi_unified_t wmi_handle)
|
|
||||||
{
|
|
||||||
struct wmi_ops *ops = wmi_handle->ops;
|
|
||||||
|
|
||||||
ops->send_p2p_lo_start_cmd = send_p2p_lo_start_cmd_tlv;
|
|
||||||
ops->send_p2p_lo_stop_cmd = send_p2p_lo_stop_cmd_tlv;
|
|
||||||
ops->extract_p2p_lo_stop_ev_param =
|
|
||||||
extract_p2p_lo_stop_ev_param_tlv;
|
|
||||||
}
|
|
||||||
#endif /* FEATURE_P2P_LISTEN_OFFLOAD */
|
|
||||||
|
|
||||||
void wmi_p2p_attach_tlv(wmi_unified_t wmi_handle)
|
|
||||||
{
|
|
||||||
struct wmi_ops *ops = wmi_handle->ops;
|
|
||||||
|
|
||||||
ops->send_set_p2pgo_oppps_req_cmd = send_set_p2pgo_oppps_req_cmd_tlv;
|
|
||||||
ops->send_set_p2pgo_noa_req_cmd = send_set_p2pgo_noa_req_cmd_tlv;
|
|
||||||
ops->extract_p2p_noa_ev_param = extract_p2p_noa_ev_param_tlv;
|
|
||||||
ops->set_mac_addr_rx_filter = send_set_mac_addr_rx_filter_cmd_tlv,
|
|
||||||
ops->extract_mac_addr_rx_filter_evt_param =
|
|
||||||
extract_mac_addr_rx_filter_evt_param_tlv,
|
|
||||||
wmi_p2p_listen_offload_attach_tlv(wmi_handle);
|
|
||||||
}
|
|
||||||
|
|
@@ -1,383 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
|
||||||
* above copyright notice and this permission notice appear in all
|
|
||||||
* copies.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
|
||||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
|
||||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
||||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* DOC: Implement API's specific to PMO component.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "ol_if_athvar.h"
|
|
||||||
#include "ol_defines.h"
|
|
||||||
#include "wmi_unified_priv.h"
|
|
||||||
#include "wmi_unified_pmo_api.h"
|
|
||||||
#include "wlan_pmo_hw_filter_public_struct.h"
|
|
||||||
|
|
||||||
#ifdef FEATURE_WLAN_D0WOW
|
|
||||||
QDF_STATUS wmi_unified_d0wow_enable_send(void *wmi_hdl,
|
|
||||||
uint8_t mac_id)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_d0wow_enable_cmd)
|
|
||||||
return wmi_handle->ops->send_d0wow_enable_cmd(wmi_handle,
|
|
||||||
mac_id);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_d0wow_disable_send(void *wmi_hdl,
|
|
||||||
uint8_t mac_id)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_d0wow_disable_cmd)
|
|
||||||
return wmi_handle->ops->send_d0wow_disable_cmd(wmi_handle,
|
|
||||||
mac_id);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
#endif /* FEATURE_WLAN_D0WOW */
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_add_wow_wakeup_event_cmd(void *wmi_hdl,
|
|
||||||
uint32_t vdev_id,
|
|
||||||
uint32_t *bitmap,
|
|
||||||
bool enable)
|
|
||||||
{
|
|
||||||
struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_add_wow_wakeup_event_cmd)
|
|
||||||
return wmi_handle->ops->send_add_wow_wakeup_event_cmd(
|
|
||||||
wmi_handle, vdev_id, bitmap, enable);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_wow_patterns_to_fw_cmd(void *wmi_hdl,
|
|
||||||
uint8_t vdev_id, uint8_t ptrn_id,
|
|
||||||
const uint8_t *ptrn, uint8_t ptrn_len,
|
|
||||||
uint8_t ptrn_offset, const uint8_t *mask,
|
|
||||||
uint8_t mask_len, bool user,
|
|
||||||
uint8_t default_patterns)
|
|
||||||
{
|
|
||||||
struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_wow_patterns_to_fw_cmd)
|
|
||||||
return wmi_handle->ops->send_wow_patterns_to_fw_cmd(wmi_handle,
|
|
||||||
vdev_id, ptrn_id, ptrn,
|
|
||||||
ptrn_len, ptrn_offset, mask,
|
|
||||||
mask_len, user, default_patterns);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_enable_arp_ns_offload_cmd(void *wmi_hdl,
|
|
||||||
struct pmo_arp_offload_params *arp_offload_req,
|
|
||||||
struct pmo_ns_offload_params *ns_offload_req,
|
|
||||||
uint8_t vdev_id)
|
|
||||||
{
|
|
||||||
struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_enable_arp_ns_offload_cmd)
|
|
||||||
return wmi_handle->ops->send_enable_arp_ns_offload_cmd(
|
|
||||||
wmi_handle,
|
|
||||||
arp_offload_req, ns_offload_req, vdev_id);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_add_clear_mcbc_filter_cmd(void *wmi_hdl,
|
|
||||||
uint8_t vdev_id,
|
|
||||||
struct qdf_mac_addr multicast_addr,
|
|
||||||
bool clearList)
|
|
||||||
{
|
|
||||||
struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_add_clear_mcbc_filter_cmd)
|
|
||||||
return wmi_handle->ops->send_add_clear_mcbc_filter_cmd(
|
|
||||||
wmi_handle, vdev_id, multicast_addr, clearList);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_multiple_add_clear_mcbc_filter_cmd(void *wmi_hdl,
|
|
||||||
uint8_t vdev_id,
|
|
||||||
struct pmo_mcast_filter_params *filter_param)
|
|
||||||
{
|
|
||||||
struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_multiple_add_clear_mcbc_filter_cmd)
|
|
||||||
return wmi_handle->ops->send_multiple_add_clear_mcbc_filter_cmd(
|
|
||||||
wmi_handle, vdev_id, filter_param);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_conf_hw_filter_cmd(void *opaque_wmi,
|
|
||||||
struct pmo_hw_filter_params *req)
|
|
||||||
{
|
|
||||||
struct wmi_unified *wmi = opaque_wmi;
|
|
||||||
|
|
||||||
if (!wmi->ops->send_conf_hw_filter_cmd)
|
|
||||||
return QDF_STATUS_E_NOSUPPORT;
|
|
||||||
|
|
||||||
return wmi->ops->send_conf_hw_filter_cmd(wmi, req);
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_send_gtk_offload_cmd(void *wmi_hdl, uint8_t vdev_id,
|
|
||||||
struct pmo_gtk_req *params,
|
|
||||||
bool enable_offload,
|
|
||||||
uint32_t gtk_offload_opcode)
|
|
||||||
{
|
|
||||||
struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_gtk_offload_cmd)
|
|
||||||
return wmi_handle->ops->send_gtk_offload_cmd(wmi_handle,
|
|
||||||
vdev_id, params, enable_offload,
|
|
||||||
gtk_offload_opcode);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_process_gtk_offload_getinfo_cmd(void *wmi_hdl,
|
|
||||||
uint8_t vdev_id,
|
|
||||||
uint64_t offload_req_opcode)
|
|
||||||
{
|
|
||||||
struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_process_gtk_offload_getinfo_cmd)
|
|
||||||
return wmi_handle->ops->send_process_gtk_offload_getinfo_cmd(
|
|
||||||
wmi_handle, vdev_id, offload_req_opcode);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_enable_enhance_multicast_offload_cmd(
|
|
||||||
void *wmi_hdl, uint8_t vdev_id, bool action)
|
|
||||||
{
|
|
||||||
struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
|
|
||||||
struct wmi_ops *ops;
|
|
||||||
|
|
||||||
ops = wmi_handle->ops;
|
|
||||||
if (ops && ops->send_enable_enhance_multicast_offload_cmd)
|
|
||||||
return ops->send_enable_enhance_multicast_offload_cmd(
|
|
||||||
wmi_handle, vdev_id, action);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_gtk_rsp_event(void *wmi_hdl, void *evt_buf,
|
|
||||||
struct pmo_gtk_rsp_params *gtk_rsp_param, uint32_t len)
|
|
||||||
{
|
|
||||||
struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->extract_gtk_rsp_event)
|
|
||||||
return wmi_handle->ops->extract_gtk_rsp_event(wmi_handle,
|
|
||||||
evt_buf, gtk_rsp_param, len);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef FEATURE_WLAN_RA_FILTERING
|
|
||||||
QDF_STATUS wmi_unified_wow_sta_ra_filter_cmd(void *wmi_hdl,
|
|
||||||
uint8_t vdev_id, uint8_t default_pattern,
|
|
||||||
uint16_t rate_limit_interval)
|
|
||||||
{
|
|
||||||
|
|
||||||
struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_wow_sta_ra_filter_cmd)
|
|
||||||
return wmi_handle->ops->send_wow_sta_ra_filter_cmd(wmi_handle,
|
|
||||||
vdev_id, default_pattern, rate_limit_interval);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
|
|
||||||
}
|
|
||||||
#endif /* FEATURE_WLAN_RA_FILTERING */
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_action_frame_patterns_cmd(void *wmi_hdl,
|
|
||||||
struct pmo_action_wakeup_set_params *action_params)
|
|
||||||
{
|
|
||||||
struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_action_frame_patterns_cmd)
|
|
||||||
return wmi_handle->ops->send_action_frame_patterns_cmd(
|
|
||||||
wmi_handle, action_params);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef FEATURE_WLAN_LPHB
|
|
||||||
QDF_STATUS wmi_unified_lphb_config_hbenable_cmd(void *wmi_hdl,
|
|
||||||
wmi_hb_set_enable_cmd_fixed_param *params)
|
|
||||||
{
|
|
||||||
struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_lphb_config_hbenable_cmd)
|
|
||||||
return wmi_handle->ops->send_lphb_config_hbenable_cmd(
|
|
||||||
wmi_handle, params);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_lphb_config_tcp_params_cmd(void *wmi_hdl,
|
|
||||||
wmi_hb_set_tcp_params_cmd_fixed_param *lphb_conf_req)
|
|
||||||
{
|
|
||||||
struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_lphb_config_tcp_params_cmd)
|
|
||||||
return wmi_handle->ops->send_lphb_config_tcp_params_cmd(
|
|
||||||
wmi_handle, lphb_conf_req);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_lphb_config_tcp_pkt_filter_cmd(void *wmi_hdl,
|
|
||||||
wmi_hb_set_tcp_pkt_filter_cmd_fixed_param *g_hb_tcp_filter_fp)
|
|
||||||
{
|
|
||||||
struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_lphb_config_tcp_pkt_filter_cmd)
|
|
||||||
return wmi_handle->ops->send_lphb_config_tcp_pkt_filter_cmd(
|
|
||||||
wmi_handle, g_hb_tcp_filter_fp);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_lphb_config_udp_params_cmd(void *wmi_hdl,
|
|
||||||
wmi_hb_set_udp_params_cmd_fixed_param *lphb_conf_req)
|
|
||||||
{
|
|
||||||
struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_lphb_config_udp_params_cmd)
|
|
||||||
return wmi_handle->ops->send_lphb_config_udp_params_cmd(
|
|
||||||
wmi_handle, lphb_conf_req);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_lphb_config_udp_pkt_filter_cmd(void *wmi_hdl,
|
|
||||||
wmi_hb_set_udp_pkt_filter_cmd_fixed_param *lphb_conf_req)
|
|
||||||
{
|
|
||||||
struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_lphb_config_udp_pkt_filter_cmd)
|
|
||||||
return wmi_handle->ops->send_lphb_config_udp_pkt_filter_cmd(
|
|
||||||
wmi_handle, lphb_conf_req);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
#endif /* FEATURE_WLAN_LPHB */
|
|
||||||
|
|
||||||
#ifdef WLAN_FEATURE_PACKET_FILTERING
|
|
||||||
QDF_STATUS wmi_unified_enable_disable_packet_filter_cmd(void *wmi_hdl,
|
|
||||||
uint8_t vdev_id, bool enable)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_enable_disable_packet_filter_cmd)
|
|
||||||
return wmi_handle->ops->send_enable_disable_packet_filter_cmd(
|
|
||||||
wmi_handle, vdev_id, enable);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_config_packet_filter_cmd(void *wmi_hdl,
|
|
||||||
uint8_t vdev_id, struct pmo_rcv_pkt_fltr_cfg *rcv_filter_param,
|
|
||||||
uint8_t filter_id, bool enable)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_config_packet_filter_cmd)
|
|
||||||
return wmi_handle->ops->send_config_packet_filter_cmd(
|
|
||||||
wmi_handle, vdev_id, rcv_filter_param, filter_id, enable);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
#endif /* WLAN_FEATURE_PACKET_FILTERING */
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_wow_delete_pattern_cmd(void *wmi_hdl, uint8_t ptrn_id,
|
|
||||||
uint8_t vdev_id)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_wow_delete_pattern_cmd)
|
|
||||||
return wmi_handle->ops->send_wow_delete_pattern_cmd(wmi_handle,
|
|
||||||
ptrn_id,
|
|
||||||
vdev_id);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_host_wakeup_ind_to_fw_cmd(void *wmi_hdl)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_host_wakeup_ind_to_fw_cmd)
|
|
||||||
return wmi_handle->ops->send_host_wakeup_ind_to_fw_cmd(wmi_handle);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_wow_timer_pattern_cmd(void *wmi_hdl, uint8_t vdev_id,
|
|
||||||
uint32_t cookie, uint32_t time)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_wow_timer_pattern_cmd)
|
|
||||||
return wmi_handle->ops->send_wow_timer_pattern_cmd(wmi_handle,
|
|
||||||
vdev_id, cookie, time);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef WLAN_FEATURE_EXTWOW_SUPPORT
|
|
||||||
QDF_STATUS wmi_unified_enable_ext_wow_cmd(void *wmi_hdl,
|
|
||||||
struct ext_wow_params *params)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_enable_ext_wow_cmd)
|
|
||||||
return wmi_handle->ops->send_enable_ext_wow_cmd(wmi_handle,
|
|
||||||
params);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_set_app_type2_params_in_fw_cmd(void *wmi_hdl,
|
|
||||||
struct app_type2_params *appType2Params)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_set_app_type2_params_in_fw_cmd)
|
|
||||||
return wmi_handle->ops->send_set_app_type2_params_in_fw_cmd(
|
|
||||||
wmi_handle, appType2Params);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_app_type1_params_in_fw_cmd(void *wmi_hdl,
|
|
||||||
struct app_type1_params *app_type1_params)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_app_type1_params_in_fw_cmd)
|
|
||||||
return wmi_handle->ops->send_app_type1_params_in_fw_cmd(
|
|
||||||
wmi_handle, app_type1_params);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
#endif /* WLAN_FEATURE_EXTWOW_SUPPORT */
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@@ -1,124 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
|
||||||
* above copyright notice and this permission notice appear in all
|
|
||||||
* copies.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
|
||||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
|
||||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
||||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* DOC: Implement API's specific to Regulatory component.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <qdf_status.h>
|
|
||||||
#include <qdf_module.h>
|
|
||||||
#include <wmi_unified_api.h>
|
|
||||||
#include <wmi_unified_priv.h>
|
|
||||||
#include <wmi_unified_reg_api.h>
|
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_reg_chan_list_update_event(void *wmi_hdl,
|
|
||||||
uint8_t *evt_buf,
|
|
||||||
struct cur_regulatory_info
|
|
||||||
*reg_info,
|
|
||||||
uint32_t len)
|
|
||||||
{
|
|
||||||
struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle && wmi_handle->ops->extract_reg_chan_list_update_event)
|
|
||||||
return wmi_handle->ops->extract_reg_chan_list_update_event
|
|
||||||
(wmi_handle,
|
|
||||||
evt_buf, reg_info, len);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
qdf_export_symbol(wmi_extract_reg_chan_list_update_event);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* wmi_unified_send_start_11d_scan_cmd() - start 11d scan
|
|
||||||
* @wmi_handle: wmi handle
|
|
||||||
* @start_11d_scan: pointer to 11d scan start req.
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
|
|
||||||
*/
|
|
||||||
QDF_STATUS wmi_unified_send_start_11d_scan_cmd(wmi_unified_t wmi_handle,
|
|
||||||
struct reg_start_11d_scan_req *start_11d_scan)
|
|
||||||
{
|
|
||||||
if (wmi_handle->ops->send_start_11d_scan_cmd)
|
|
||||||
return wmi_handle->ops->send_start_11d_scan_cmd(wmi_handle,
|
|
||||||
start_11d_scan);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
qdf_export_symbol(wmi_unified_send_start_11d_scan_cmd);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* wmi_unified_send_stop_11d_scan_cmd() - stop 11d scan
|
|
||||||
* @wmi_handle: wmi handle
|
|
||||||
* @stop_11d_scan: pointer to 11d scan stop req.
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
|
|
||||||
*/
|
|
||||||
QDF_STATUS wmi_unified_send_stop_11d_scan_cmd(wmi_unified_t wmi_handle,
|
|
||||||
struct reg_stop_11d_scan_req *stop_11d_scan)
|
|
||||||
{
|
|
||||||
if (wmi_handle->ops->send_stop_11d_scan_cmd)
|
|
||||||
return wmi_handle->ops->send_stop_11d_scan_cmd(wmi_handle,
|
|
||||||
stop_11d_scan);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
qdf_export_symbol(wmi_unified_send_stop_11d_scan_cmd);
|
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_reg_11d_new_cc_event(void *wmi_hdl,
|
|
||||||
uint8_t *evt_buf,
|
|
||||||
struct reg_11d_new_country *reg_11d_new_cc,
|
|
||||||
uint32_t len)
|
|
||||||
{
|
|
||||||
struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle && wmi_handle->ops->extract_reg_11d_new_country_event)
|
|
||||||
return wmi_handle->ops->extract_reg_11d_new_country_event(
|
|
||||||
wmi_handle, evt_buf, reg_11d_new_cc, len);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
qdf_export_symbol(wmi_extract_reg_11d_new_cc_event);
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_set_user_country_code_cmd_send(void *wmi_hdl,
|
|
||||||
uint8_t pdev_id, struct cc_regdmn_s *rd)
|
|
||||||
{
|
|
||||||
struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_user_country_code_cmd)
|
|
||||||
return wmi_handle->ops->send_user_country_code_cmd(
|
|
||||||
wmi_handle, pdev_id, rd);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
qdf_export_symbol(wmi_unified_set_user_country_code_cmd_send);
|
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_reg_ch_avoid_event(void *wmi_hdl,
|
|
||||||
uint8_t *evt_buf,
|
|
||||||
struct ch_avoid_ind_type *ch_avoid_ind,
|
|
||||||
uint32_t len)
|
|
||||||
{
|
|
||||||
struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle && wmi_handle->ops->extract_reg_ch_avoid_event)
|
|
||||||
return wmi_handle->ops->extract_reg_ch_avoid_event(
|
|
||||||
wmi_handle, evt_buf, ch_avoid_ind, len);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
qdf_export_symbol(wmi_extract_reg_ch_avoid_event);
|
|
@@ -1,326 +0,0 @@
|
|||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
|
||||||
* above copyright notice and this permission notice appear in all
|
|
||||||
* copies.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
|
||||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
|
||||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
||||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <osdep.h>
|
|
||||||
#include <wmi.h>
|
|
||||||
#include <wmi_unified_priv.h>
|
|
||||||
#include <wmi_unified_roam_param.h>
|
|
||||||
#include <wmi_unified_roam_api.h>
|
|
||||||
|
|
||||||
#ifdef FEATURE_LFR_SUBNET_DETECTION
|
|
||||||
QDF_STATUS wmi_unified_set_gateway_params_cmd(void *wmi_hdl,
|
|
||||||
struct gateway_update_req_param *req)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_set_gateway_params_cmd)
|
|
||||||
return wmi_handle->ops->send_set_gateway_params_cmd(wmi_handle,
|
|
||||||
req);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
#endif /* FEATURE_LFR_SUBNET_DETECTION */
|
|
||||||
|
|
||||||
#ifdef FEATURE_RSSI_MONITOR
|
|
||||||
QDF_STATUS wmi_unified_set_rssi_monitoring_cmd(void *wmi_hdl,
|
|
||||||
struct rssi_monitor_param *req)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_set_rssi_monitoring_cmd)
|
|
||||||
return wmi_handle->ops->send_set_rssi_monitoring_cmd(wmi_handle,
|
|
||||||
req);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
#endif /* FEATURE_RSSI_MONITOR */
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_roam_scan_offload_rssi_thresh_cmd(void *wmi_hdl,
|
|
||||||
struct roam_offload_scan_rssi_params
|
|
||||||
*roam_req)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_roam_scan_offload_rssi_thresh_cmd)
|
|
||||||
return wmi_handle->ops->send_roam_scan_offload_rssi_thresh_cmd(
|
|
||||||
wmi_handle, roam_req);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_roam_mawc_params_cmd(
|
|
||||||
void *wmi_hdl, struct wmi_mawc_roam_params *params)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_roam_mawc_params_cmd)
|
|
||||||
return wmi_handle->ops->send_roam_mawc_params_cmd(wmi_handle,
|
|
||||||
params);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_roam_scan_filter_cmd(void *wmi_hdl,
|
|
||||||
struct roam_scan_filter_params *roam_req)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_roam_scan_filter_cmd)
|
|
||||||
return wmi_handle->ops->send_roam_scan_filter_cmd(wmi_handle,
|
|
||||||
roam_req);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef FEATURE_WLAN_ESE
|
|
||||||
QDF_STATUS wmi_unified_plm_stop_cmd(void *wmi_hdl,
|
|
||||||
const struct plm_req_params *plm)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_plm_stop_cmd)
|
|
||||||
return wmi_handle->ops->send_plm_stop_cmd(wmi_handle, plm);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_plm_start_cmd(void *wmi_hdl,
|
|
||||||
const struct plm_req_params *plm,
|
|
||||||
uint32_t *gchannel_list)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_plm_start_cmd)
|
|
||||||
return wmi_handle->ops->send_plm_start_cmd(wmi_handle,
|
|
||||||
plm,
|
|
||||||
gchannel_list);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
#endif /* FEATURE_WLAN_ESE */
|
|
||||||
|
|
||||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
|
||||||
QDF_STATUS wmi_unified_set_ric_req_cmd(void *wmi_hdl, void *msg,
|
|
||||||
uint8_t is_add_ts)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_set_ric_req_cmd)
|
|
||||||
return wmi_handle->ops->send_set_ric_req_cmd(wmi_handle, msg,
|
|
||||||
is_add_ts);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_roam_synch_complete_cmd(void *wmi_hdl,
|
|
||||||
uint8_t vdev_id)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_process_roam_synch_complete_cmd)
|
|
||||||
return wmi_handle->ops->send_process_roam_synch_complete_cmd(
|
|
||||||
wmi_handle, vdev_id);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_roam_invoke_cmd(void *wmi_hdl,
|
|
||||||
struct wmi_roam_invoke_cmd *roaminvoke,
|
|
||||||
uint32_t ch_hz)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_roam_invoke_cmd)
|
|
||||||
return wmi_handle->ops->send_roam_invoke_cmd(wmi_handle,
|
|
||||||
roaminvoke,
|
|
||||||
ch_hz);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_roam_scan_offload_mode_cmd(void *wmi_hdl,
|
|
||||||
wmi_start_scan_cmd_fixed_param *scan_cmd_fp,
|
|
||||||
struct roam_offload_scan_params *roam_req)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_roam_scan_offload_mode_cmd)
|
|
||||||
return wmi_handle->ops->send_roam_scan_offload_mode_cmd(
|
|
||||||
wmi_handle, scan_cmd_fp, roam_req);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_send_roam_scan_offload_ap_cmd(void *wmi_hdl,
|
|
||||||
struct ap_profile_params *ap_profile)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_roam_scan_offload_ap_profile_cmd)
|
|
||||||
return wmi_handle->ops->send_roam_scan_offload_ap_profile_cmd(
|
|
||||||
wmi_handle, ap_profile);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_roam_scan_offload_cmd(void *wmi_hdl,
|
|
||||||
uint32_t command, uint32_t vdev_id)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_roam_scan_offload_cmd)
|
|
||||||
return wmi_handle->ops->send_roam_scan_offload_cmd(wmi_handle,
|
|
||||||
command,
|
|
||||||
vdev_id);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_roam_scan_offload_scan_period(void *wmi_hdl,
|
|
||||||
uint32_t scan_period,
|
|
||||||
uint32_t scan_age,
|
|
||||||
uint32_t vdev_id)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_roam_scan_offload_scan_period_cmd)
|
|
||||||
return wmi_handle->ops->send_roam_scan_offload_scan_period_cmd(wmi_handle,
|
|
||||||
scan_period, scan_age, vdev_id);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_roam_scan_offload_chan_list_cmd(void *wmi_hdl,
|
|
||||||
uint8_t chan_count,
|
|
||||||
uint32_t *chan_list,
|
|
||||||
uint8_t list_type, uint32_t vdev_id)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_roam_scan_offload_chan_list_cmd)
|
|
||||||
return wmi_handle->ops->send_roam_scan_offload_chan_list_cmd(wmi_handle,
|
|
||||||
chan_count, chan_list,
|
|
||||||
list_type, vdev_id);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_roam_scan_offload_rssi_change_cmd(void *wmi_hdl,
|
|
||||||
uint32_t vdev_id,
|
|
||||||
int32_t rssi_change_thresh,
|
|
||||||
uint32_t bcn_rssi_weight,
|
|
||||||
uint32_t hirssi_delay_btw_scans)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_roam_scan_offload_rssi_change_cmd)
|
|
||||||
return wmi_handle->ops->send_roam_scan_offload_rssi_change_cmd(wmi_handle,
|
|
||||||
vdev_id, rssi_change_thresh,
|
|
||||||
bcn_rssi_weight, hirssi_delay_btw_scans);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_set_per_roam_config(void *wmi_hdl,
|
|
||||||
struct wmi_per_roam_config_req *req_buf)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_per_roam_config_cmd)
|
|
||||||
return wmi_handle->ops->send_per_roam_config_cmd(wmi_handle,
|
|
||||||
req_buf);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_send_limit_off_chan_cmd(void *wmi_hdl,
|
|
||||||
struct wmi_limit_off_chan_param *limit_off_chan_param)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_limit_off_chan_cmd)
|
|
||||||
return wmi_handle->ops->send_limit_off_chan_cmd(wmi_handle,
|
|
||||||
limit_off_chan_param);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef WLAN_FEATURE_FILS_SK
|
|
||||||
QDF_STATUS wmi_unified_roam_send_hlp_cmd(void *wmi_hdl,
|
|
||||||
struct hlp_params *req_buf)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_roam_scan_hlp_cmd)
|
|
||||||
return wmi_handle->ops->send_roam_scan_hlp_cmd(wmi_handle,
|
|
||||||
req_buf);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
#endif /* WLAN_FEATURE_FILS_SK */
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_send_btm_config(void *wmi_hdl,
|
|
||||||
struct wmi_btm_config *params)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_btm_config)
|
|
||||||
return wmi_handle->ops->send_btm_config(wmi_handle,
|
|
||||||
params);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_send_bss_load_config(void *wmi_hdl,
|
|
||||||
struct wmi_bss_load_config *params)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_roam_bss_load_config)
|
|
||||||
return wmi_handle->ops->send_roam_bss_load_config(wmi_handle,
|
|
||||||
params);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_offload_11k_cmd(void *wmi_hdl,
|
|
||||||
struct wmi_11k_offload_params *params)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_offload_11k_cmd)
|
|
||||||
return wmi_handle->ops->send_offload_11k_cmd(wmi_handle,
|
|
||||||
params);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_invoke_neighbor_report_cmd(void *wmi_hdl,
|
|
||||||
struct wmi_invoke_neighbor_report_params *params)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_invoke_neighbor_report_cmd)
|
|
||||||
return wmi_handle->ops->send_invoke_neighbor_report_cmd(
|
|
||||||
wmi_handle, params);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@@ -1,490 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
|
||||||
* above copyright notice and this permission notice appear in all
|
|
||||||
* copies.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
|
||||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
|
||||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
||||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* DOC: Implement API's specific to STA component.
|
|
||||||
*/
|
|
||||||
#include <wmi.h>
|
|
||||||
#include "wmi_unified_priv.h"
|
|
||||||
#include "wmi_unified_sta_api.h"
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_set_sta_sa_query_param_cmd(void *wmi_hdl,
|
|
||||||
uint8_t vdev_id,
|
|
||||||
uint32_t max_retries,
|
|
||||||
uint32_t retry_interval)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_set_sta_sa_query_param_cmd)
|
|
||||||
return wmi_handle->ops->send_set_sta_sa_query_param_cmd(wmi_handle,
|
|
||||||
vdev_id, max_retries,
|
|
||||||
retry_interval);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_set_sta_keep_alive_cmd(void *wmi_hdl,
|
|
||||||
struct sta_params *params)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_set_sta_keep_alive_cmd)
|
|
||||||
return wmi_handle->ops->send_set_sta_keep_alive_cmd(wmi_handle,
|
|
||||||
params);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_vdev_set_gtx_cfg_cmd(void *wmi_hdl, uint32_t if_id,
|
|
||||||
struct wmi_gtx_config *gtx_info)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_vdev_set_gtx_cfg_cmd)
|
|
||||||
return wmi_handle->ops->send_vdev_set_gtx_cfg_cmd(wmi_handle,
|
|
||||||
if_id,
|
|
||||||
gtx_info);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_process_dhcp_ind(void *wmi_hdl,
|
|
||||||
wmi_peer_set_param_cmd_fixed_param *ta_dhcp_ind)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_process_dhcp_ind_cmd)
|
|
||||||
return wmi_handle->ops->send_process_dhcp_ind_cmd(wmi_handle,
|
|
||||||
ta_dhcp_ind);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_get_link_speed_cmd(void *wmi_hdl,
|
|
||||||
wmi_mac_addr peer_macaddr)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_get_link_speed_cmd)
|
|
||||||
return wmi_handle->ops->send_get_link_speed_cmd(wmi_handle,
|
|
||||||
peer_macaddr);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_fw_profiling_data_cmd(void *wmi_hdl,
|
|
||||||
uint32_t cmd, uint32_t value1, uint32_t value2)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_fw_profiling_cmd)
|
|
||||||
return wmi_handle->ops->send_fw_profiling_cmd(wmi_handle,
|
|
||||||
cmd,
|
|
||||||
value1,
|
|
||||||
value2);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_nat_keepalive_en_cmd(void *wmi_hdl, uint8_t vdev_id)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_nat_keepalive_en_cmd)
|
|
||||||
return wmi_handle->ops->send_nat_keepalive_en_cmd(wmi_handle,
|
|
||||||
vdev_id);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_wlm_latency_level_cmd(void *wmi_hdl,
|
|
||||||
struct wlm_latency_level_param *param)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_wlm_latency_level_cmd)
|
|
||||||
return wmi_handle->ops->send_wlm_latency_level_cmd(wmi_handle,
|
|
||||||
param);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_process_set_ie_info_cmd(void *wmi_hdl,
|
|
||||||
struct vdev_ie_info_param *ie_info)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_process_set_ie_info_cmd)
|
|
||||||
return wmi_handle->ops->send_process_set_ie_info_cmd(wmi_handle,
|
|
||||||
ie_info);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_set_base_macaddr_indicate_cmd(void *wmi_hdl,
|
|
||||||
uint8_t *custom_addr)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_set_base_macaddr_indicate_cmd)
|
|
||||||
return wmi_handle->ops->send_set_base_macaddr_indicate_cmd(wmi_handle,
|
|
||||||
custom_addr);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef CONVERGED_TDLS_ENABLE
|
|
||||||
QDF_STATUS wmi_unified_set_tdls_offchan_mode_cmd(void *wmi_hdl,
|
|
||||||
struct tdls_channel_switch_params *chan_switch_params)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_set_tdls_offchan_mode_cmd)
|
|
||||||
return wmi_handle->ops->send_set_tdls_offchan_mode_cmd(wmi_handle,
|
|
||||||
chan_switch_params);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_update_fw_tdls_state_cmd(void *wmi_hdl,
|
|
||||||
struct tdls_info *tdls_param,
|
|
||||||
enum wmi_tdls_state tdls_state)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_update_fw_tdls_state_cmd)
|
|
||||||
return wmi_handle->ops->send_update_fw_tdls_state_cmd(
|
|
||||||
wmi_handle, tdls_param, tdls_state);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_update_tdls_peer_state_cmd(void *wmi_hdl,
|
|
||||||
struct tdls_peer_state_params *peerStateParams,
|
|
||||||
uint32_t *ch_mhz)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_update_tdls_peer_state_cmd)
|
|
||||||
return wmi_handle->ops->send_update_tdls_peer_state_cmd(wmi_handle,
|
|
||||||
peerStateParams, ch_mhz);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_vdev_tdls_ev_param(void *wmi_hdl, void *evt_buf,
|
|
||||||
struct tdls_event_info *param)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->extract_vdev_tdls_ev_param)
|
|
||||||
return wmi_handle->ops->extract_vdev_tdls_ev_param(wmi_handle,
|
|
||||||
evt_buf, param);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
#endif /* CONVERGED_TDLS_ENABLE */
|
|
||||||
|
|
||||||
#ifdef WLAN_FEATURE_DISA
|
|
||||||
QDF_STATUS wmi_unified_encrypt_decrypt_send_cmd(void *wmi_hdl,
|
|
||||||
struct disa_encrypt_decrypt_req_params *params)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_encrypt_decrypt_send_cmd)
|
|
||||||
return wmi_handle->ops->send_encrypt_decrypt_send_cmd(
|
|
||||||
wmi_handle,
|
|
||||||
params);
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_encrypt_decrypt_resp_params(void *wmi_hdl,
|
|
||||||
uint8_t *evt_buf,
|
|
||||||
struct disa_encrypt_decrypt_resp_params *resp)
|
|
||||||
{
|
|
||||||
struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->extract_encrypt_decrypt_resp_event)
|
|
||||||
return wmi_handle->ops->extract_encrypt_decrypt_resp_event(
|
|
||||||
wmi_handle, evt_buf, resp);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
#endif /* WLAN_FEATURE_DISA */
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_send_sar_limit_cmd(void *wmi_hdl,
|
|
||||||
struct sar_limit_cmd_params *params)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_sar_limit_cmd)
|
|
||||||
return wmi_handle->ops->send_sar_limit_cmd(
|
|
||||||
wmi_handle,
|
|
||||||
params);
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_get_sar_limit_cmd(void *wmi_hdl)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->get_sar_limit_cmd)
|
|
||||||
return wmi_handle->ops->get_sar_limit_cmd(wmi_handle);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_extract_sar_limit_event(void *wmi_hdl,
|
|
||||||
uint8_t *evt_buf,
|
|
||||||
struct sar_limit_event *event)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->extract_sar_limit_event)
|
|
||||||
return wmi_handle->ops->extract_sar_limit_event(wmi_handle,
|
|
||||||
evt_buf,
|
|
||||||
event);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_extract_sar2_result_event(void *handle,
|
|
||||||
uint8_t *event, uint32_t len)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = handle;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->extract_sar2_result_event)
|
|
||||||
return wmi_handle->ops->extract_sar2_result_event(wmi_handle,
|
|
||||||
event,
|
|
||||||
len);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_set_del_pmkid_cache(void *wmi_hdl,
|
|
||||||
struct wmi_unified_pmk_cache *req_buf)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_set_del_pmkid_cache_cmd)
|
|
||||||
return wmi_handle->ops->send_set_del_pmkid_cache_cmd(wmi_handle,
|
|
||||||
req_buf);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_del_ts_cmd(void *wmi_hdl, uint8_t vdev_id,
|
|
||||||
uint8_t ac)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_del_ts_cmd)
|
|
||||||
return wmi_handle->ops->send_del_ts_cmd(wmi_handle,
|
|
||||||
vdev_id, ac);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_aggr_qos_cmd(void *wmi_hdl,
|
|
||||||
struct aggr_add_ts_param *aggr_qos_rsp_msg)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_aggr_qos_cmd)
|
|
||||||
return wmi_handle->ops->send_aggr_qos_cmd(wmi_handle,
|
|
||||||
aggr_qos_rsp_msg);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_add_ts_cmd(void *wmi_hdl,
|
|
||||||
struct add_ts_param *msg)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_add_ts_cmd)
|
|
||||||
return wmi_handle->ops->send_add_ts_cmd(wmi_handle,
|
|
||||||
msg);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_process_add_periodic_tx_ptrn_cmd(
|
|
||||||
wmi_unified_t wmi_handle,
|
|
||||||
struct periodic_tx_pattern *pattern,
|
|
||||||
uint8_t vdev_id)
|
|
||||||
{
|
|
||||||
if (wmi_handle->ops->send_process_add_periodic_tx_ptrn_cmd)
|
|
||||||
return wmi_handle->ops->send_process_add_periodic_tx_ptrn_cmd(
|
|
||||||
wmi_handle, pattern, vdev_id);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_process_del_periodic_tx_ptrn_cmd(void *wmi_hdl,
|
|
||||||
uint8_t vdev_id,
|
|
||||||
uint8_t pattern_id)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_process_del_periodic_tx_ptrn_cmd)
|
|
||||||
return wmi_handle->ops->send_process_del_periodic_tx_ptrn_cmd(
|
|
||||||
wmi_handle,
|
|
||||||
vdev_id,
|
|
||||||
pattern_id);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_set_auto_shutdown_timer_cmd(void *wmi_hdl,
|
|
||||||
uint32_t timer_val)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_set_auto_shutdown_timer_cmd)
|
|
||||||
return wmi_handle->ops->send_set_auto_shutdown_timer_cmd(
|
|
||||||
wmi_handle,
|
|
||||||
timer_val);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_set_led_flashing_cmd(void *wmi_hdl,
|
|
||||||
struct flashing_req_params *flashing)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_set_led_flashing_cmd)
|
|
||||||
return wmi_handle->ops->send_set_led_flashing_cmd(wmi_handle,
|
|
||||||
flashing);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_process_ch_avoid_update_cmd(void *wmi_hdl)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_process_ch_avoid_update_cmd)
|
|
||||||
return wmi_handle->ops->send_process_ch_avoid_update_cmd(
|
|
||||||
wmi_handle);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_pdev_set_pcl_cmd(void *wmi_hdl,
|
|
||||||
struct wmi_pcl_chan_weights *msg)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_pdev_set_pcl_cmd)
|
|
||||||
return wmi_handle->ops->send_pdev_set_pcl_cmd(wmi_handle, msg);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_soc_set_hw_mode_cmd(void *wmi_hdl,
|
|
||||||
uint32_t hw_mode_index)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_pdev_set_hw_mode_cmd)
|
|
||||||
return wmi_handle->ops->send_pdev_set_hw_mode_cmd(wmi_handle,
|
|
||||||
hw_mode_index);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef WLAN_POLICY_MGR_ENABLE
|
|
||||||
QDF_STATUS wmi_unified_pdev_set_dual_mac_config_cmd(void *wmi_hdl,
|
|
||||||
struct policy_mgr_dual_mac_config *msg)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_pdev_set_dual_mac_config_cmd)
|
|
||||||
return wmi_handle->ops->send_pdev_set_dual_mac_config_cmd(
|
|
||||||
wmi_handle,
|
|
||||||
msg);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
#endif /* WLAN_POLICY_MGR_ENABLE */
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_send_adapt_dwelltime_params_cmd(void *wmi_hdl,
|
|
||||||
struct wmi_adaptive_dwelltime_params *dwelltime_params)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_adapt_dwelltime_params_cmd)
|
|
||||||
return wmi_handle->ops->
|
|
||||||
send_adapt_dwelltime_params_cmd(wmi_handle,
|
|
||||||
dwelltime_params);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_send_dbs_scan_sel_params_cmd(void *wmi_hdl,
|
|
||||||
struct wmi_dbs_scan_sel_params *dbs_scan_params)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_dbs_scan_sel_params_cmd)
|
|
||||||
return wmi_handle->ops->
|
|
||||||
send_dbs_scan_sel_params_cmd(wmi_handle,
|
|
||||||
dbs_scan_params);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_set_arp_stats_req(void *wmi_hdl,
|
|
||||||
struct set_arp_stats *req_buf)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_set_arp_stats_req_cmd)
|
|
||||||
return wmi_handle->ops->send_set_arp_stats_req_cmd(wmi_handle,
|
|
||||||
req_buf);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_get_arp_stats_req(void *wmi_hdl,
|
|
||||||
struct get_arp_stats *req_buf)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_get_arp_stats_req_cmd)
|
|
||||||
return wmi_handle->ops->send_get_arp_stats_req_cmd(wmi_handle,
|
|
||||||
req_buf);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_peer_unmap_conf_send(void *wmi_hdl,
|
|
||||||
uint8_t vdev_id,
|
|
||||||
uint32_t peer_id_cnt,
|
|
||||||
uint16_t *peer_id_list)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_peer_unmap_conf_cmd)
|
|
||||||
return wmi_handle->ops->send_peer_unmap_conf_cmd(wmi_handle,
|
|
||||||
vdev_id, peer_id_cnt, peer_id_list);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
12502
wmi_unified_tlv.c
12502
wmi_unified_tlv.c
File diff suppressed because it is too large
Load Diff
@@ -1,174 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2018 The Linux Foundation. All rights reserved.
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
|
||||||
* above copyright notice and this permission notice appear in all
|
|
||||||
* copies.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
|
||||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
|
||||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
||||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* DOC: Implement API's specific to TWT component.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "wmi_unified_priv.h"
|
|
||||||
#include "wmi_unified_twt_api.h"
|
|
||||||
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_twt_enable_cmd(void *wmi_hdl,
|
|
||||||
struct wmi_twt_enable_param *params)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_twt_enable_cmd)
|
|
||||||
return wmi_handle->ops->send_twt_enable_cmd(
|
|
||||||
wmi_handle, params);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_twt_disable_cmd(void *wmi_hdl,
|
|
||||||
struct wmi_twt_disable_param *params)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_twt_disable_cmd)
|
|
||||||
return wmi_handle->ops->send_twt_disable_cmd(
|
|
||||||
wmi_handle, params);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_twt_add_dialog_cmd(void *wmi_hdl,
|
|
||||||
struct wmi_twt_add_dialog_param *params)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_twt_add_dialog_cmd)
|
|
||||||
return wmi_handle->ops->send_twt_add_dialog_cmd(
|
|
||||||
wmi_handle, params);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_twt_del_dialog_cmd(void *wmi_hdl,
|
|
||||||
struct wmi_twt_del_dialog_param *params)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_twt_del_dialog_cmd)
|
|
||||||
return wmi_handle->ops->send_twt_del_dialog_cmd(
|
|
||||||
wmi_handle, params);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_twt_pause_dialog_cmd(void *wmi_hdl,
|
|
||||||
struct wmi_twt_pause_dialog_cmd_param *params)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_twt_pause_dialog_cmd)
|
|
||||||
return wmi_handle->ops->send_twt_pause_dialog_cmd(
|
|
||||||
wmi_handle, params);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_twt_resume_dialog_cmd(void *wmi_hdl,
|
|
||||||
struct wmi_twt_resume_dialog_cmd_param *params)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->send_twt_resume_dialog_cmd)
|
|
||||||
return wmi_handle->ops->send_twt_resume_dialog_cmd(
|
|
||||||
wmi_handle, params);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_twt_enable_comp_event(void *wmi_hdl,
|
|
||||||
uint8_t *evt_buf,
|
|
||||||
struct wmi_twt_enable_complete_event_param *params)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->extract_twt_enable_comp_event)
|
|
||||||
return wmi_handle->ops->extract_twt_enable_comp_event(
|
|
||||||
wmi_handle, evt_buf, params);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_twt_disable_comp_event(void *wmi_hdl,
|
|
||||||
uint8_t *evt_buf,
|
|
||||||
struct wmi_twt_disable_complete_event *params)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->extract_twt_disable_comp_event)
|
|
||||||
return wmi_handle->ops->extract_twt_disable_comp_event(
|
|
||||||
wmi_handle, evt_buf, params);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_twt_add_dialog_comp_event(void *wmi_hdl,
|
|
||||||
uint8_t *evt_buf,
|
|
||||||
struct wmi_twt_add_dialog_complete_event_param *params)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->extract_twt_add_dialog_comp_event)
|
|
||||||
return wmi_handle->ops->extract_twt_add_dialog_comp_event(
|
|
||||||
wmi_handle, evt_buf, params);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_twt_del_dialog_comp_event(void *wmi_hdl,
|
|
||||||
uint8_t *evt_buf,
|
|
||||||
struct wmi_twt_del_dialog_complete_event_param *params)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->extract_twt_del_dialog_comp_event)
|
|
||||||
return wmi_handle->ops->extract_twt_del_dialog_comp_event(
|
|
||||||
wmi_handle, evt_buf, params);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_twt_pause_dialog_comp_event(void *wmi_hdl,
|
|
||||||
uint8_t *evt_buf,
|
|
||||||
struct wmi_twt_pause_dialog_complete_event_param *params)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->extract_twt_pause_dialog_comp_event)
|
|
||||||
return wmi_handle->ops->extract_twt_pause_dialog_comp_event(
|
|
||||||
wmi_handle, evt_buf, params);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_twt_resume_dialog_comp_event(void *wmi_hdl,
|
|
||||||
uint8_t *evt_buf,
|
|
||||||
struct wmi_twt_resume_dialog_complete_event_param *params)
|
|
||||||
{
|
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
|
||||||
|
|
||||||
if (wmi_handle->ops->extract_twt_resume_dialog_comp_event)
|
|
||||||
return wmi_handle->ops->extract_twt_resume_dialog_comp_event(
|
|
||||||
wmi_handle, evt_buf, params);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
@@ -1,416 +0,0 @@
|
|||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) 2018 The Linux Foundation. All rights reserved.
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
|
||||||
* above copyright notice and this permission notice appear in all
|
|
||||||
* copies.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
|
||||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
|
||||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
||||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <osdep.h>
|
|
||||||
#include "wmi.h"
|
|
||||||
#include "wmi_unified_priv.h"
|
|
||||||
#include "wmi_unified_twt_param.h"
|
|
||||||
#include "wmi_unified_twt_api.h"
|
|
||||||
|
|
||||||
static QDF_STATUS send_twt_enable_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
struct wmi_twt_enable_param *params)
|
|
||||||
{
|
|
||||||
wmi_twt_enable_cmd_fixed_param *cmd;
|
|
||||||
wmi_buf_t buf;
|
|
||||||
QDF_STATUS status;
|
|
||||||
|
|
||||||
buf = wmi_buf_alloc(wmi_handle, sizeof(*cmd));
|
|
||||||
if (!buf) {
|
|
||||||
WMI_LOGE("Failed to allocate memory");
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
cmd = (wmi_twt_enable_cmd_fixed_param *) wmi_buf_data(buf);
|
|
||||||
WMITLV_SET_HDR(&cmd->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_twt_enable_cmd_fixed_param,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN
|
|
||||||
(wmi_twt_enable_cmd_fixed_param));
|
|
||||||
|
|
||||||
cmd->pdev_id =
|
|
||||||
wmi_handle->ops->convert_pdev_id_host_to_target(
|
|
||||||
params->pdev_id);
|
|
||||||
cmd->sta_cong_timer_ms = params->sta_cong_timer_ms;
|
|
||||||
cmd->mbss_support = params->mbss_support;
|
|
||||||
cmd->default_slot_size = params->default_slot_size;
|
|
||||||
cmd->congestion_thresh_setup = params->congestion_thresh_setup;
|
|
||||||
cmd->congestion_thresh_teardown = params->congestion_thresh_teardown;
|
|
||||||
cmd->congestion_thresh_critical = params->congestion_thresh_critical;
|
|
||||||
cmd->interference_thresh_teardown =
|
|
||||||
params->interference_thresh_teardown;
|
|
||||||
cmd->interference_thresh_setup = params->interference_thresh_setup;
|
|
||||||
cmd->min_no_sta_setup = params->min_no_sta_setup;
|
|
||||||
cmd->min_no_sta_teardown = params->min_no_sta_teardown;
|
|
||||||
cmd->no_of_bcast_mcast_slots = params->no_of_bcast_mcast_slots;
|
|
||||||
cmd->min_no_twt_slots = params->min_no_twt_slots;
|
|
||||||
cmd->max_no_sta_twt = params->max_no_sta_twt;
|
|
||||||
cmd->mode_check_interval = params->mode_check_interval;
|
|
||||||
cmd->add_sta_slot_interval = params->add_sta_slot_interval;
|
|
||||||
cmd->remove_sta_slot_interval = params->remove_sta_slot_interval;
|
|
||||||
|
|
||||||
status = wmi_unified_cmd_send(wmi_handle, buf, sizeof(*cmd),
|
|
||||||
WMI_TWT_ENABLE_CMDID);
|
|
||||||
if (QDF_IS_STATUS_ERROR(status)) {
|
|
||||||
WMI_LOGE("Failed to send WMI_TWT_ENABLE_CMDID");
|
|
||||||
wmi_buf_free(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static QDF_STATUS send_twt_disable_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
struct wmi_twt_disable_param *params)
|
|
||||||
{
|
|
||||||
wmi_twt_disable_cmd_fixed_param *cmd;
|
|
||||||
wmi_buf_t buf;
|
|
||||||
QDF_STATUS status;
|
|
||||||
|
|
||||||
buf = wmi_buf_alloc(wmi_handle, sizeof(*cmd));
|
|
||||||
if (!buf) {
|
|
||||||
WMI_LOGE("Failed to allocate memory");
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
cmd = (wmi_twt_disable_cmd_fixed_param *) wmi_buf_data(buf);
|
|
||||||
WMITLV_SET_HDR(&cmd->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_twt_disable_cmd_fixed_param,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN
|
|
||||||
(wmi_twt_disable_cmd_fixed_param));
|
|
||||||
|
|
||||||
cmd->pdev_id =
|
|
||||||
wmi_handle->ops->convert_pdev_id_host_to_target(
|
|
||||||
params->pdev_id);
|
|
||||||
|
|
||||||
status = wmi_unified_cmd_send(wmi_handle, buf, sizeof(*cmd),
|
|
||||||
WMI_TWT_DISABLE_CMDID);
|
|
||||||
if (QDF_IS_STATUS_ERROR(status)) {
|
|
||||||
WMI_LOGE("Failed to send WMI_TWT_DISABLE_CMDID");
|
|
||||||
wmi_buf_free(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
static QDF_STATUS send_twt_add_dialog_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
struct wmi_twt_add_dialog_param *params)
|
|
||||||
{
|
|
||||||
wmi_twt_add_dialog_cmd_fixed_param *cmd;
|
|
||||||
wmi_buf_t buf;
|
|
||||||
QDF_STATUS status;
|
|
||||||
|
|
||||||
buf = wmi_buf_alloc(wmi_handle, sizeof(*cmd));
|
|
||||||
if (!buf) {
|
|
||||||
WMI_LOGE("Failed to allocate memory");
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
cmd = (wmi_twt_add_dialog_cmd_fixed_param *) wmi_buf_data(buf);
|
|
||||||
WMITLV_SET_HDR(&cmd->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_twt_add_dialog_cmd_fixed_param,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN
|
|
||||||
(wmi_twt_add_dialog_cmd_fixed_param));
|
|
||||||
|
|
||||||
cmd->vdev_id = params->vdev_id;
|
|
||||||
WMI_CHAR_ARRAY_TO_MAC_ADDR(params->peer_macaddr, &cmd->peer_macaddr);
|
|
||||||
cmd->dialog_id = params->dialog_id;
|
|
||||||
cmd->wake_intvl_us = params->wake_intvl_us;
|
|
||||||
cmd->wake_intvl_mantis = params->wake_intvl_mantis;
|
|
||||||
cmd->wake_dura_us = params->wake_dura_us;
|
|
||||||
cmd->sp_offset_us = params->sp_offset_us;
|
|
||||||
TWT_FLAGS_SET_CMD(cmd->flags, params->twt_cmd);
|
|
||||||
TWT_FLAGS_SET_BROADCAST(cmd->flags, params->flag_bcast);
|
|
||||||
TWT_FLAGS_SET_TRIGGER(cmd->flags, params->flag_trigger);
|
|
||||||
TWT_FLAGS_SET_FLOW_TYPE(cmd->flags, params->flag_flow_type);
|
|
||||||
TWT_FLAGS_SET_PROTECTION(cmd->flags, params->flag_protection);
|
|
||||||
|
|
||||||
status = wmi_unified_cmd_send(wmi_handle, buf, sizeof(*cmd),
|
|
||||||
WMI_TWT_ADD_DIALOG_CMDID);
|
|
||||||
if (QDF_IS_STATUS_ERROR(status)) {
|
|
||||||
WMI_LOGE("Failed to send WMI_TWT_ADD_DIALOG_CMDID");
|
|
||||||
wmi_buf_free(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
static QDF_STATUS send_twt_del_dialog_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
struct wmi_twt_del_dialog_param *params)
|
|
||||||
{
|
|
||||||
wmi_twt_del_dialog_cmd_fixed_param *cmd;
|
|
||||||
wmi_buf_t buf;
|
|
||||||
QDF_STATUS status;
|
|
||||||
|
|
||||||
buf = wmi_buf_alloc(wmi_handle, sizeof(*cmd));
|
|
||||||
if (!buf) {
|
|
||||||
WMI_LOGE("Failed to allocate memory");
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
cmd = (wmi_twt_del_dialog_cmd_fixed_param *) wmi_buf_data(buf);
|
|
||||||
WMITLV_SET_HDR(&cmd->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_twt_del_dialog_cmd_fixed_param,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN
|
|
||||||
(wmi_twt_del_dialog_cmd_fixed_param));
|
|
||||||
|
|
||||||
cmd->vdev_id = params->vdev_id;
|
|
||||||
WMI_CHAR_ARRAY_TO_MAC_ADDR(params->peer_macaddr, &cmd->peer_macaddr);
|
|
||||||
cmd->dialog_id = params->dialog_id;
|
|
||||||
|
|
||||||
status = wmi_unified_cmd_send(wmi_handle, buf, sizeof(*cmd),
|
|
||||||
WMI_TWT_DEL_DIALOG_CMDID);
|
|
||||||
if (QDF_IS_STATUS_ERROR(status)) {
|
|
||||||
WMI_LOGE("Failed to send WMI_TWT_DEL_DIALOG_CMDID");
|
|
||||||
wmi_buf_free(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
static QDF_STATUS send_twt_pause_dialog_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
struct wmi_twt_pause_dialog_cmd_param *params)
|
|
||||||
{
|
|
||||||
wmi_twt_pause_dialog_cmd_fixed_param *cmd;
|
|
||||||
wmi_buf_t buf;
|
|
||||||
QDF_STATUS status;
|
|
||||||
|
|
||||||
buf = wmi_buf_alloc(wmi_handle, sizeof(*cmd));
|
|
||||||
if (!buf) {
|
|
||||||
WMI_LOGE("Failed to allocate memory");
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
cmd = (wmi_twt_pause_dialog_cmd_fixed_param *) wmi_buf_data(buf);
|
|
||||||
WMITLV_SET_HDR(&cmd->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_twt_pause_dialog_cmd_fixed_param,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN
|
|
||||||
(wmi_twt_pause_dialog_cmd_fixed_param));
|
|
||||||
|
|
||||||
cmd->vdev_id = params->vdev_id;
|
|
||||||
WMI_CHAR_ARRAY_TO_MAC_ADDR(params->peer_macaddr, &cmd->peer_macaddr);
|
|
||||||
cmd->dialog_id = params->dialog_id;
|
|
||||||
|
|
||||||
status = wmi_unified_cmd_send(wmi_handle, buf, sizeof(*cmd),
|
|
||||||
WMI_TWT_PAUSE_DIALOG_CMDID);
|
|
||||||
if (QDF_IS_STATUS_ERROR(status)) {
|
|
||||||
WMI_LOGE("Failed to send WMI_TWT_PAUSE_DIALOG_CMDID");
|
|
||||||
wmi_buf_free(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
static QDF_STATUS send_twt_resume_dialog_cmd_tlv(wmi_unified_t wmi_handle,
|
|
||||||
struct wmi_twt_resume_dialog_cmd_param *params)
|
|
||||||
{
|
|
||||||
wmi_twt_resume_dialog_cmd_fixed_param *cmd;
|
|
||||||
wmi_buf_t buf;
|
|
||||||
QDF_STATUS status;
|
|
||||||
|
|
||||||
buf = wmi_buf_alloc(wmi_handle, sizeof(*cmd));
|
|
||||||
if (!buf) {
|
|
||||||
WMI_LOGE("Failed to allocate memory");
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
cmd = (wmi_twt_resume_dialog_cmd_fixed_param *) wmi_buf_data(buf);
|
|
||||||
WMITLV_SET_HDR(&cmd->tlv_header,
|
|
||||||
WMITLV_TAG_STRUC_wmi_twt_resume_dialog_cmd_fixed_param,
|
|
||||||
WMITLV_GET_STRUCT_TLVLEN
|
|
||||||
(wmi_twt_resume_dialog_cmd_fixed_param));
|
|
||||||
|
|
||||||
cmd->vdev_id = params->vdev_id;
|
|
||||||
WMI_CHAR_ARRAY_TO_MAC_ADDR(params->peer_macaddr, &cmd->peer_macaddr);
|
|
||||||
cmd->dialog_id = params->dialog_id;
|
|
||||||
cmd->sp_offset_us = params->sp_offset_us;
|
|
||||||
cmd->next_twt_size = params->next_twt_size;
|
|
||||||
|
|
||||||
status = wmi_unified_cmd_send(wmi_handle, buf, sizeof(*cmd),
|
|
||||||
WMI_TWT_RESUME_DIALOG_CMDID);
|
|
||||||
if (QDF_IS_STATUS_ERROR(status)) {
|
|
||||||
WMI_LOGE("Failed to send WMI_TWT_RESUME_DIALOG_CMDID");
|
|
||||||
wmi_buf_free(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
static QDF_STATUS extract_twt_enable_comp_event_tlv(wmi_unified_t wmi_handle,
|
|
||||||
uint8_t *evt_buf,
|
|
||||||
struct wmi_twt_enable_complete_event_param *params)
|
|
||||||
{
|
|
||||||
WMI_TWT_ENABLE_COMPLETE_EVENTID_param_tlvs *param_buf;
|
|
||||||
wmi_twt_enable_complete_event_fixed_param *ev;
|
|
||||||
|
|
||||||
param_buf = (WMI_TWT_ENABLE_COMPLETE_EVENTID_param_tlvs *)evt_buf;
|
|
||||||
if (!param_buf) {
|
|
||||||
WMI_LOGE("evt_buf is NULL");
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
ev = param_buf->fixed_param;
|
|
||||||
|
|
||||||
params->pdev_id =
|
|
||||||
wmi_handle->ops->convert_pdev_id_target_to_host(ev->pdev_id);
|
|
||||||
params->status = ev->status;
|
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
static QDF_STATUS extract_twt_disable_comp_event_tlv(wmi_unified_t wmi_handle,
|
|
||||||
uint8_t *evt_buf,
|
|
||||||
struct wmi_twt_disable_complete_event *params)
|
|
||||||
{
|
|
||||||
WMI_TWT_DISABLE_COMPLETE_EVENTID_param_tlvs *param_buf;
|
|
||||||
wmi_twt_disable_complete_event_fixed_param *ev;
|
|
||||||
|
|
||||||
param_buf = (WMI_TWT_DISABLE_COMPLETE_EVENTID_param_tlvs *)evt_buf;
|
|
||||||
if (!param_buf) {
|
|
||||||
WMI_LOGE("evt_buf is NULL");
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
ev = param_buf->fixed_param;
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
params->pdev_id =
|
|
||||||
wmi_handle->ops->convert_pdev_id_target_to_host(ev->pdev_id);
|
|
||||||
params->status = ev->status;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
static QDF_STATUS extract_twt_add_dialog_comp_event_tlv(
|
|
||||||
wmi_unified_t wmi_handle,
|
|
||||||
uint8_t *evt_buf,
|
|
||||||
struct wmi_twt_add_dialog_complete_event_param *params)
|
|
||||||
{
|
|
||||||
WMI_TWT_ADD_DIALOG_COMPLETE_EVENTID_param_tlvs *param_buf;
|
|
||||||
wmi_twt_add_dialog_complete_event_fixed_param *ev;
|
|
||||||
|
|
||||||
param_buf = (WMI_TWT_ADD_DIALOG_COMPLETE_EVENTID_param_tlvs *)evt_buf;
|
|
||||||
if (!param_buf) {
|
|
||||||
WMI_LOGE("evt_buf is NULL");
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
ev = param_buf->fixed_param;
|
|
||||||
|
|
||||||
params->vdev_id = ev->vdev_id;
|
|
||||||
WMI_MAC_ADDR_TO_CHAR_ARRAY(&ev->peer_macaddr, params->peer_macaddr);
|
|
||||||
params->status = ev->status;
|
|
||||||
params->dialog_id = ev->dialog_id;
|
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
static QDF_STATUS extract_twt_del_dialog_comp_event_tlv(
|
|
||||||
wmi_unified_t wmi_handle,
|
|
||||||
uint8_t *evt_buf,
|
|
||||||
struct wmi_twt_del_dialog_complete_event_param *params)
|
|
||||||
{
|
|
||||||
WMI_TWT_DEL_DIALOG_COMPLETE_EVENTID_param_tlvs *param_buf;
|
|
||||||
wmi_twt_del_dialog_complete_event_fixed_param *ev;
|
|
||||||
|
|
||||||
param_buf = (WMI_TWT_DEL_DIALOG_COMPLETE_EVENTID_param_tlvs *)evt_buf;
|
|
||||||
if (!param_buf) {
|
|
||||||
WMI_LOGE("evt_buf is NULL");
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
ev = param_buf->fixed_param;
|
|
||||||
|
|
||||||
params->vdev_id = ev->vdev_id;
|
|
||||||
WMI_MAC_ADDR_TO_CHAR_ARRAY(&ev->peer_macaddr, params->peer_macaddr);
|
|
||||||
params->dialog_id = ev->dialog_id;
|
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
static QDF_STATUS extract_twt_pause_dialog_comp_event_tlv(
|
|
||||||
wmi_unified_t wmi_handle,
|
|
||||||
uint8_t *evt_buf,
|
|
||||||
struct wmi_twt_pause_dialog_complete_event_param *params)
|
|
||||||
{
|
|
||||||
WMI_TWT_PAUSE_DIALOG_COMPLETE_EVENTID_param_tlvs *param_buf;
|
|
||||||
wmi_twt_pause_dialog_complete_event_fixed_param *ev;
|
|
||||||
|
|
||||||
param_buf = (WMI_TWT_PAUSE_DIALOG_COMPLETE_EVENTID_param_tlvs *)evt_buf;
|
|
||||||
if (!param_buf) {
|
|
||||||
WMI_LOGE("evt_buf is NULL");
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
ev = param_buf->fixed_param;
|
|
||||||
|
|
||||||
params->vdev_id = ev->vdev_id;
|
|
||||||
WMI_MAC_ADDR_TO_CHAR_ARRAY(&ev->peer_macaddr, params->peer_macaddr);
|
|
||||||
params->status = ev->status;
|
|
||||||
params->dialog_id = ev->dialog_id;
|
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
static QDF_STATUS extract_twt_resume_dialog_comp_event_tlv(
|
|
||||||
wmi_unified_t wmi_handle,
|
|
||||||
uint8_t *evt_buf,
|
|
||||||
struct wmi_twt_resume_dialog_complete_event_param *params)
|
|
||||||
{
|
|
||||||
WMI_TWT_RESUME_DIALOG_COMPLETE_EVENTID_param_tlvs *param_buf;
|
|
||||||
wmi_twt_resume_dialog_complete_event_fixed_param *ev;
|
|
||||||
|
|
||||||
param_buf =
|
|
||||||
(WMI_TWT_RESUME_DIALOG_COMPLETE_EVENTID_param_tlvs *)evt_buf;
|
|
||||||
if (!param_buf) {
|
|
||||||
WMI_LOGE("evt_buf is NULL");
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
ev = param_buf->fixed_param;
|
|
||||||
|
|
||||||
params->vdev_id = ev->vdev_id;
|
|
||||||
WMI_MAC_ADDR_TO_CHAR_ARRAY(&ev->peer_macaddr, params->peer_macaddr);
|
|
||||||
params->status = ev->status;
|
|
||||||
params->dialog_id = ev->dialog_id;
|
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
void wmi_twt_attach_tlv(wmi_unified_t wmi_handle)
|
|
||||||
{
|
|
||||||
struct wmi_ops *ops = wmi_handle->ops;
|
|
||||||
|
|
||||||
ops->send_twt_enable_cmd = send_twt_enable_cmd_tlv;
|
|
||||||
ops->send_twt_disable_cmd = send_twt_disable_cmd_tlv;
|
|
||||||
ops->send_twt_add_dialog_cmd = send_twt_add_dialog_cmd_tlv;
|
|
||||||
ops->send_twt_del_dialog_cmd = send_twt_del_dialog_cmd_tlv;
|
|
||||||
ops->send_twt_pause_dialog_cmd = send_twt_pause_dialog_cmd_tlv;
|
|
||||||
ops->send_twt_resume_dialog_cmd = send_twt_resume_dialog_cmd_tlv;
|
|
||||||
ops->extract_twt_enable_comp_event = extract_twt_enable_comp_event_tlv;
|
|
||||||
ops->extract_twt_disable_comp_event =
|
|
||||||
extract_twt_disable_comp_event_tlv;
|
|
||||||
ops->extract_twt_add_dialog_comp_event =
|
|
||||||
extract_twt_add_dialog_comp_event_tlv;
|
|
||||||
ops->extract_twt_del_dialog_comp_event =
|
|
||||||
extract_twt_del_dialog_comp_event_tlv;
|
|
||||||
ops->extract_twt_pause_dialog_comp_event =
|
|
||||||
extract_twt_pause_dialog_comp_event_tlv;
|
|
||||||
ops->extract_twt_resume_dialog_comp_event =
|
|
||||||
extract_twt_resume_dialog_comp_event_tlv;
|
|
||||||
}
|
|
Reference in New Issue
Block a user