qcacmn: move MLO related common definitions to umac

WMI includes are not part of include path in some WIN projects,
move MLO related common definitions to wlan_mlo_mgr_public_structs.h.

Change-Id: If63c82bc15a2a0e0a045be896b74ea9addb3a64d
CRs-Fixed: 3083776
This commit is contained in:
Yu Wang
2021-11-29 14:59:52 +08:00
committed by Madan Koyyalamudi
parent a9ed2d6a47
commit 2cec5acc85
6 changed files with 116 additions and 111 deletions

View File

@@ -384,4 +384,94 @@ struct mlo_mlme_ext_ops {
void (*mlo_mlme_ext_deauth)(struct wlan_objmgr_peer *peer);
};
/* maximum size of vdev bitmap array for MLO link set active command */
#define MLO_VDEV_BITMAP_SZ 2
/* maximum size of link number param array for MLO link set active command */
#define MLO_LINK_NUM_SZ 2
/**
* enum mlo_link_force_mode: MLO link force modes
* @MLO_LINK_FORCE_MODE_ACTIVE:
* Force specific links active
* @MLO_LINK_FORCE_MODE_INACTIVE:
* Force specific links inactive
* @MLO_LINK_FORCE_MODE_ACTIVE_NUM:
* Force active a number of links, firmware to decide which links to inactive
* @MLO_LINK_FORCE_MODE_INACTIVE_NUM:
* Force inactive a number of links, firmware to decide which links to inactive
* @MLO_LINK_FORCE_MODE_NO_FORCE:
* Cancel the force operation of specific links, allow firmware to decide
*/
enum mlo_link_force_mode {
MLO_LINK_FORCE_MODE_ACTIVE = 1,
MLO_LINK_FORCE_MODE_INACTIVE = 2,
MLO_LINK_FORCE_MODE_ACTIVE_NUM = 3,
MLO_LINK_FORCE_MODE_INACTIVE_NUM = 4,
MLO_LINK_FORCE_MODE_NO_FORCE = 5,
};
/**
* enum mlo_link_force_reason: MLO link force reasons
* @MLO_LINK_FORCE_REASON_CONNECT:
* Set force specific links because of new connection
* @MLO_LINK_FORCE_REASON_DISCONNECT:
* Set force specific links because of new dis-connection
*/
enum mlo_link_force_reason {
MLO_LINK_FORCE_REASON_CONNECT = 1,
MLO_LINK_FORCE_REASON_DISCONNECT = 2,
};
/**
* struct 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 mlo_link_set_active_resp {
uint32_t status;
uint32_t active_sz;
uint32_t active[MLO_VDEV_BITMAP_SZ];
uint32_t inactive_sz;
uint32_t inactive[MLO_VDEV_BITMAP_SZ];
};
/**
* struct 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 mlo_link_num_param {
uint32_t num_of_link;
uint32_t vdev_type;
uint32_t vdev_subtype;
uint32_t home_freq;
};
/**
* struct mlo_link_set_active_param: MLO link set active params
* @force_mode: operation to take (enum mlo_link_force_mode)
* @reason: reason for the operation (enum 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 MLO_LINK_FORCE_MODE_ACTIVE_NUM or
* MLO_LINK_FORCE_MODE_INACTIVE_NUM
* @vdev_bitmap: active/inactive vdev bitmap array
* It's present only when force_mode is MLO_LINK_FORCE_MODE_ACTIVE,
* MLO_LINK_FORCE_MODE_INACTIVE or MLO_LINK_FORCE_MODE_NO_FORCE.
*/
struct mlo_link_set_active_param {
uint32_t force_mode;
uint32_t reason;
uint32_t entry_num;
union {
struct mlo_link_num_param link_num[MLO_LINK_NUM_SZ];
uint32_t vdev_bitmap[MLO_VDEV_BITMAP_SZ];
};
};
#endif

View File

@@ -1,5 +1,6 @@
/*
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. 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
@@ -23,7 +24,6 @@
#include <wmi_unified_api.h>
#include <wmi_unified_priv.h>
#include <wmi_unified_11be_param.h>
#ifdef WLAN_FEATURE_11BE_MLO
/**
@@ -40,7 +40,7 @@
QDF_STATUS
wmi_extract_mlo_link_set_active_resp(wmi_unified_t wmi,
void *evt_buf,
struct wmi_mlo_link_set_active_resp *evt);
struct mlo_link_set_active_resp *evt);
/**
* wmi_send_mlo_link_set_active_cmd() - send mlo link set active command
@@ -51,6 +51,6 @@ wmi_extract_mlo_link_set_active_resp(wmi_unified_t wmi,
*/
QDF_STATUS
wmi_send_mlo_link_set_active_cmd(wmi_unified_t wmi_handle,
struct wmi_mlo_link_set_active_param *param);
struct mlo_link_set_active_param *param);
#endif /*WLAN_FEATURE_11BE_MLO*/
#endif /*_WMI_UNIFIED_11BE_API_H_*/

View File

@@ -1,6 +1,7 @@
/*
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. 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
@@ -18,6 +19,8 @@
#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
@@ -95,96 +98,5 @@ 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

View File

@@ -96,6 +96,7 @@
#ifdef WLAN_FEATURE_11BE_MLO
#include <wmi_unified_11be_param.h>
#include "wlan_mlo_mgr_public_structs.h"
#endif
#define WMI_UNIFIED_MAX_EVENT 0x100
@@ -2775,12 +2776,12 @@ QDF_STATUS
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);
struct 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);
struct mlo_link_set_active_resp *resp);
#endif
#ifdef WLAN_FEATURE_SON

View File

@@ -1,5 +1,6 @@
/*
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. 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
@@ -31,7 +32,7 @@
QDF_STATUS
wmi_extract_mlo_link_set_active_resp(wmi_unified_t wmi,
void *evt_buf,
struct wmi_mlo_link_set_active_resp *resp)
struct mlo_link_set_active_resp *resp)
{
if (wmi->ops->extract_mlo_link_set_active_resp) {
return wmi->ops->extract_mlo_link_set_active_resp(wmi,
@@ -50,7 +51,7 @@ wmi_extract_mlo_link_set_active_resp(wmi_unified_t wmi,
*/
QDF_STATUS
wmi_send_mlo_link_set_active_cmd(wmi_unified_t wmi,
struct wmi_mlo_link_set_active_param *param)
struct mlo_link_set_active_param *param)
{
if (wmi->ops->send_mlo_link_set_active_cmd)
return wmi->ops->send_mlo_link_set_active_cmd(wmi, param);

View File

@@ -1,5 +1,6 @@
/*
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. 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
@@ -280,23 +281,23 @@ uint8_t *peer_assoc_add_ml_partner_links(uint8_t *buf_ptr,
* Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_INVAL otherwise
*/
static inline QDF_STATUS
force_mode_host_to_fw(enum wmi_mlo_link_force_mode host_mode,
force_mode_host_to_fw(enum mlo_link_force_mode host_mode,
WMI_MLO_LINK_FORCE_MODE *fw_mode)
{
switch (host_mode) {
case WMI_MLO_LINK_FORCE_MODE_ACTIVE:
case MLO_LINK_FORCE_MODE_ACTIVE:
*fw_mode = WMI_MLO_LINK_FORCE_ACTIVE;
break;
case WMI_MLO_LINK_FORCE_MODE_INACTIVE:
case MLO_LINK_FORCE_MODE_INACTIVE:
*fw_mode = WMI_MLO_LINK_FORCE_INACTIVE;
break;
case WMI_MLO_LINK_FORCE_MODE_ACTIVE_NUM:
case MLO_LINK_FORCE_MODE_ACTIVE_NUM:
*fw_mode = WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM;
break;
case WMI_MLO_LINK_FORCE_MODE_INACTIVE_NUM:
case MLO_LINK_FORCE_MODE_INACTIVE_NUM:
*fw_mode = WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM;
break;
case WMI_MLO_LINK_FORCE_MODE_NO_FORCE:
case MLO_LINK_FORCE_MODE_NO_FORCE:
*fw_mode = WMI_MLO_LINK_NO_FORCE;
break;
default:
@@ -316,14 +317,14 @@ force_mode_host_to_fw(enum wmi_mlo_link_force_mode host_mode,
* Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_INVAL otherwise
*/
static inline QDF_STATUS
force_reason_host_to_fw(enum wmi_mlo_link_force_reason host_reason,
force_reason_host_to_fw(enum mlo_link_force_reason host_reason,
WMI_MLO_LINK_FORCE_REASON *fw_reason)
{
switch (host_reason) {
case WMI_MLO_LINK_FORCE_REASON_CONNECT:
case MLO_LINK_FORCE_REASON_CONNECT:
*fw_reason = WMI_MLO_LINK_FORCE_REASON_NEW_CONNECT;
break;
case WMI_MLO_LINK_FORCE_REASON_DISCONNECT:
case MLO_LINK_FORCE_REASON_DISCONNECT:
*fw_reason = WMI_MLO_LINK_FORCE_REASON_NEW_DISCONNECT;
break;
default:
@@ -343,7 +344,7 @@ force_reason_host_to_fw(enum wmi_mlo_link_force_reason host_reason,
*/
static QDF_STATUS
send_mlo_link_set_active_cmd_tlv(wmi_unified_t wmi_handle,
struct wmi_mlo_link_set_active_param *param)
struct mlo_link_set_active_param *param)
{
QDF_STATUS status;
wmi_mlo_link_set_active_cmd_fixed_param *cmd;
@@ -471,7 +472,7 @@ send_mlo_link_set_active_cmd_tlv(wmi_unified_t wmi_handle,
*/
static QDF_STATUS
extract_mlo_link_set_active_resp_tlv(wmi_unified_t wmi_handle, void *evt_buf,
struct wmi_mlo_link_set_active_resp *resp)
struct mlo_link_set_active_resp *resp)
{
wmi_mlo_link_set_active_resp_event_fixed_param *evt;
WMI_MLO_LINK_SET_ACTIVE_RESP_EVENTID_param_tlvs *param_buf;
@@ -490,7 +491,7 @@ extract_mlo_link_set_active_resp_tlv(wmi_unified_t wmi_handle, void *evt_buf,
bitmap = param_buf->force_active_vdev_bitmap;
entry_num = qdf_min(param_buf->num_force_active_vdev_bitmap,
(uint32_t)WMI_MLO_VDEV_BITMAP_SZ);
(uint32_t)MLO_VDEV_BITMAP_SZ);
resp->active_sz = entry_num;
for (i = 0; i < entry_num; i++) {
resp->active[i] = bitmap[i];
@@ -499,7 +500,7 @@ extract_mlo_link_set_active_resp_tlv(wmi_unified_t wmi_handle, void *evt_buf,
bitmap = param_buf->force_inactive_vdev_bitmap;
entry_num = qdf_min(param_buf->num_force_inactive_vdev_bitmap,
(uint32_t)WMI_MLO_VDEV_BITMAP_SZ);
(uint32_t)MLO_VDEV_BITMAP_SZ);
resp->inactive_sz = entry_num;
for (i = 0; i < entry_num; i++) {
resp->inactive[i] = bitmap[i];