qcacmn: Add set link source data structure

Add new data structure to save the external/internal set link
request. The different source of request has different priority.
In some situations, a certain request may not be honored if
it conflicts with higher priority request.

Change-Id: Ia0bce7b50436e4e2b52d2c4948c7aa8a3a7a0a97
CRs-Fixed: 3654159
This commit is contained in:
Liangwei Dong
2023-11-01 17:19:09 +08:00
committed by Ravindra Konda
parent cc617c7e50
commit 9dc8b77e85

View File

@@ -548,6 +548,84 @@ struct mlo_sta_quiet_status {
bool valid_status; bool valid_status;
}; };
/**
* 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
* @MLO_LINK_FORCE_MODE_ACTIVE_INACTIVE: Force specific links active and
* force specific links inactive
*/
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,
MLO_LINK_FORCE_MODE_ACTIVE_INACTIVE = 6,
};
/**
* 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
* @MLO_LINK_FORCE_REASON_LINK_REMOVAL:
* Set force specific links because of AP side link removal
* @MLO_LINK_FORCE_REASON_TDLS:
* Set force specific links because of TDLS operation
*/
enum mlo_link_force_reason {
MLO_LINK_FORCE_REASON_CONNECT = 1,
MLO_LINK_FORCE_REASON_DISCONNECT = 2,
MLO_LINK_FORCE_REASON_LINK_REMOVAL = 3,
MLO_LINK_FORCE_REASON_TDLS = 4,
};
/**
* enum set_link_source - set link source
* @SET_LINK_FROM_CONCURRENCY: concurrent connection request
* @SET_LINK_FROM_VENDOR_CMD: vendor command request
* @SET_LINK_FROM_TDLS: tdls command request
* @SET_LINK_SOURCE_MAX: max num of source
*/
enum set_link_source {
SET_LINK_FROM_CONCURRENCY = 0,
SET_LINK_FROM_VENDOR_CMD = 1,
SET_LINK_FROM_TDLS = 2,
SET_LINK_SOURCE_MAX,
};
/**
* struct set_link_req - set link request
* @mode: set link mode
* @reason: reason of set link
* @force_active_bitmap: force active link bitmap
* @force_inactive_bitmap: force inactive link bitmap
* @force_active_num: force active link num
* @force_active_num_bitmap: force active num link bitmap
* @force_inactive_num: force inactive link num
* @force_inactive_num_bitmap: force inactive num link bitmap
*/
struct set_link_req {
enum mlo_link_force_mode mode;
enum mlo_link_force_reason reason;
uint16_t force_active_bitmap;
uint16_t force_inactive_bitmap;
uint8_t force_active_num;
uint16_t force_active_num_bitmap;
uint8_t force_inactive_num;
uint16_t force_inactive_num_bitmap;
};
/** /**
* struct ml_link_force_state - link force state. * struct ml_link_force_state - link force state.
* @force_active_bitmap: force active link bitmap * @force_active_bitmap: force active link bitmap
@@ -576,9 +654,11 @@ struct ml_link_force_state {
* struct wlan_link_force_context - link force ctx. * struct wlan_link_force_context - link force ctx.
* @force_state: current force active/inactive states which * @force_state: current force active/inactive states which
* have been sent to target * have been sent to target
* @reqs: request of set link
*/ */
struct wlan_link_force_context { struct wlan_link_force_context {
struct ml_link_force_state force_state; struct ml_link_force_state force_state;
struct set_link_req reqs[SET_LINK_SOURCE_MAX];
}; };
#if defined(UMAC_SUPPORT_MLNAWDS) || defined(MESH_MODE_SUPPORT) #if defined(UMAC_SUPPORT_MLNAWDS) || defined(MESH_MODE_SUPPORT)
@@ -1248,48 +1328,6 @@ struct mlo_osif_ext_ops {
/* maximum size of link number param array for MLO link set active command */ /* maximum size of link number param array for MLO link set active command */
#define MLO_LINK_NUM_SZ 2 #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
* @MLO_LINK_FORCE_MODE_ACTIVE_INACTIVE: Force specific links active and
* force specific links inactive
*/
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,
MLO_LINK_FORCE_MODE_ACTIVE_INACTIVE = 6,
};
/**
* 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
* @MLO_LINK_FORCE_REASON_LINK_REMOVAL:
* Set force specific links because of AP side link removal
* @MLO_LINK_FORCE_REASON_TDLS:
* Set force specific links because of TDLS operation
*/
enum mlo_link_force_reason {
MLO_LINK_FORCE_REASON_CONNECT = 1,
MLO_LINK_FORCE_REASON_DISCONNECT = 2,
MLO_LINK_FORCE_REASON_LINK_REMOVAL = 3,
MLO_LINK_FORCE_REASON_TDLS = 4,
};
/** /**
* struct mlo_link_set_active_resp: MLO link set active response structure * struct mlo_link_set_active_resp: MLO link set active response structure
* @status: Return status, 0 for success, non-zero otherwise * @status: Return status, 0 for success, non-zero otherwise