qcacmn: add wmi support for MLO link set active command

Add wmi support for MLO link set active command.

Change-Id: If0dbadc3d0687bfeee9e2ddb14e9c843f5ba9250
CRs-Fixed: 3036840
这个提交包含在:
Yu Wang
2021-10-21 16:11:29 +08:00
提交者 Madan Koyyalamudi
父节点 85bfde2f0a
当前提交 f09d8efa11
修改 7 个文件,包含 446 行新增2 行删除

查看文件

@@ -0,0 +1,56 @@
/*
* Copyright (c) 2021, 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.
*/
/*
* This file contains the API definitions for the Unified Wireless Module
* Interface (WMI) specific to 11be.
*/
#ifndef _WMI_UNIFIED_11BE_API_H_
#define _WMI_UNIFIED_11BE_API_H_
#include <wmi_unified_api.h>
#include <wmi_unified_priv.h>
#include <wmi_unified_11be_param.h>
#ifdef WLAN_FEATURE_11BE_MLO
/**
* wmi_extract_mlo_link_set_active_resp() - extract mlo link set active
* response event
* @wmi: wmi handle
* @evt_buf: pointer to event buffer
* @evt: Pointer to hold mlo link set active response event
*
* This function gets called to extract mlo link set active response event
*
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
*/
QDF_STATUS
wmi_extract_mlo_link_set_active_resp(wmi_unified_t wmi,
void *evt_buf,
struct wmi_mlo_link_set_active_resp *evt);
/**
* wmi_send_mlo_link_set_active_cmd() - send mlo link set active command
* @wmi: WMI handle for this pdev
* @param: Pointer to mlo link set active param
*
* Return: QDF_STATUS code
*/
QDF_STATUS
wmi_send_mlo_link_set_active_cmd(wmi_unified_t wmi_handle,
struct wmi_mlo_link_set_active_param *param);
#endif /*WLAN_FEATURE_11BE_MLO*/
#endif /*_WMI_UNIFIED_11BE_API_H_*/

查看文件

@@ -18,8 +18,6 @@
#ifndef _WMI_UNIFIED_11BE_PARAM_H_
#define _WMI_UNIFIED_11BE_PARAM_H_
#include <wmi_unified_param.h>
#ifdef WLAN_FEATURE_11BE_MLO
#define MAX_LINK_IN_MLO 6
@@ -97,5 +95,96 @@ struct wmi_mlo_teardown_cmpl_params {
uint32_t pdev_id;
enum wmi_mlo_teardown_status status;
};
/* maximum size of vdev bitmap array for MLO link set active command */
#define WMI_MLO_VDEV_BITMAP_SZ 2
/* maximum size of link number param array for MLO link set active command */
#define WMI_MLO_LINK_NUM_SZ 2
/**
* enum wmi_mlo_link_force_mode: MLO link force modes
* @WMI_MLO_LINK_FORCE_MODE_ACTIVE:
* Force specific links active
* @WMI_MLO_LINK_FORCE_MODE_INACTIVE:
* Force specific links inactive
* @WMI_MLO_LINK_FORCE_MODE_ACTIVE_NUM:
* Force active a number of links, firmware to decide which links to inactive
* @WMI_MLO_LINK_FORCE_MODE_INACTIVE_NUM:
* Force inactive a number of links, firmware to decide which links to inactive
* @WMI_MLO_LINK_FORCE_MODE_NO_FORCE:
* Cancel the force operation of specific links, allow firmware to decide
*/
enum wmi_mlo_link_force_mode {
WMI_MLO_LINK_FORCE_MODE_ACTIVE = 1,
WMI_MLO_LINK_FORCE_MODE_INACTIVE = 2,
WMI_MLO_LINK_FORCE_MODE_ACTIVE_NUM = 3,
WMI_MLO_LINK_FORCE_MODE_INACTIVE_NUM = 4,
WMI_MLO_LINK_FORCE_MODE_NO_FORCE = 5,
};
/**
* enum wmi_mlo_link_force_reason: MLO link force reasons
* @WMI_MLO_LINK_FORCE_REASON_CONNECT:
* Set force specific links because of new connection
* @WMI_MLO_LINK_FORCE_REASON_DISCONNECT:
* Set force specific links because of new dis-connection
*/
enum wmi_mlo_link_force_reason {
WMI_MLO_LINK_FORCE_REASON_CONNECT = 1,
WMI_MLO_LINK_FORCE_REASON_DISCONNECT = 2,
};
/**
* struct wmi_mlo_link_set_active_resp: MLO link set active response structure
* @status: Return status, 0 for success, non-zero otherwise
* @active_sz: size of current active vdev bitmap array
* @active: current active vdev bitmap array
* @inactive_sz: size of current inactive vdev bitmap array
* @inactive: current inactive vdev bitmap array
*/
struct wmi_mlo_link_set_active_resp {
uint32_t status;
uint32_t active_sz;
uint32_t active[WMI_MLO_VDEV_BITMAP_SZ];
uint32_t inactive_sz;
uint32_t inactive[WMI_MLO_VDEV_BITMAP_SZ];
};
/**
* struct wmi_mlo_link_num_param: MLO link set active number params
* @num_of_link: number of links to active/inactive
* @vdev_type: type of vdev
* @vdev_subtype: subtype of vdev
* @home_freq: home frequency of the link
*/
struct wmi_mlo_link_num_param {
uint32_t num_of_link;
uint32_t vdev_type;
uint32_t vdev_subtype;
uint32_t home_freq;
};
/**
* struct wmi_mlo_link_set_active_param: MLO link set active params
* @force_mode: operation to take (enum wmi_mlo_link_force_mode)
* @reason: reason for the operation (enum wmi_mlo_link_force_reason)
* @entry_num: number of the valid entries for link_num/vdev_bitmap
* @link_num: link number param array
* It's present only when force_mode is WMI_MLO_LINK_FORCE_MODE_ACTIVE_NUM or
* WMI_MLO_LINK_FORCE_MODE_INACTIVE_NUM
* @vdev_bitmap: active/inactive vdev bitmap array
* It's present only when force_mode is WMI_MLO_LINK_FORCE_MODE_ACTIVE,
* WMI_MLO_LINK_FORCE_MODE_INACTIVE or WMI_MLO_LINK_FORCE_MODE_NO_FORCE.
*/
struct wmi_mlo_link_set_active_param {
uint32_t force_mode;
uint32_t reason;
uint32_t entry_num;
union {
struct wmi_mlo_link_num_param link_num[WMI_MLO_LINK_NUM_SZ];
uint32_t vdev_bitmap[WMI_MLO_VDEV_BITMAP_SZ];
};
};
#endif
#endif

查看文件

@@ -4654,6 +4654,7 @@ typedef enum {
#ifdef WLAN_FEATURE_11BE_MLO
wmi_mlo_setup_complete_event_id,
wmi_mlo_teardown_complete_event_id,
wmi_mlo_link_set_active_resp_eventid,
#endif
wmi_events_max,
} wmi_conv_event_id;

查看文件

@@ -2738,6 +2738,14 @@ QDF_STATUS
(*extract_mlo_teardown_cmpl_event)(wmi_unified_t wmi_handle,
uint8_t *buf,
struct wmi_mlo_teardown_cmpl_params *param);
QDF_STATUS
(*send_mlo_link_set_active_cmd)(wmi_unified_t wmi_handle,
struct wmi_mlo_link_set_active_param *param);
QDF_STATUS
(*extract_mlo_link_set_active_resp)(wmi_unified_t wmi_handle,
void *evt_buf,
struct wmi_mlo_link_set_active_resp *resp);
#endif
};