qcacmn: Add mlme/vdev_mgr support for vdev mgmt ops
Add support in mlme vdev_mgr to update data structures corresponding to vdev mgmt ops as expected by WMI and send the same to target_if/mlme/vdev_mgr for sending to WMI. Core MLME data structures in wlan_vdev_mlme.h will be updated through provided ucfg APIs which are used in updated vdev mgmt ops data structures. Change-Id: Ic6fc03bcb817c9f2f2724a9591b76656840903ba CRs-Fixed: 2383346
This commit is contained in:
@@ -20,12 +20,360 @@
|
||||
#ifndef _WLAN_VDEV_MLME_H_
|
||||
#define _WLAN_VDEV_MLME_H_
|
||||
|
||||
#include <wlan_vdev_mgr_tgt_if_rx_defs.h>
|
||||
|
||||
struct vdev_mlme_obj;
|
||||
|
||||
/* Requestor ID for multiple vdev restart */
|
||||
#define MULTIPLE_VDEV_RESTART_REQ_ID 0x1234
|
||||
|
||||
/* values for vdev_type */
|
||||
#define WLAN_VDEV_MLME_TYPE_AP 0x1
|
||||
#define WLAN_VDEV_MLME_TYPE_STA 0x2
|
||||
#define WLAN_VDEV_MLME_TYPE_IBSS 0x3
|
||||
#define WLAN_VDEV_MLME_TYPE_MONITOR 0x4
|
||||
|
||||
/* values for vdev_subtype */
|
||||
#define WLAN_VDEV_MLME_SUBTYPE_P2P_DEVICE 0x1
|
||||
#define WLAN_VDEV_MLME_SUBTYPE_P2P_CLIENT 0x2
|
||||
#define WLAN_VDEV_MLME_SUBTYPE_P2P_GO 0x3
|
||||
#define WLAN_VDEV_MLME_SUBTYPE_PROXY_STA 0x4
|
||||
#define WLAN_VDEV_MLME_SUBTYPE_MESH 0x5
|
||||
|
||||
/* vdev control flags (per bits) */
|
||||
#define WLAN_VDEV_MLME_FLAGS_NON_MBSSID_AP 0x00000001
|
||||
#define WLAN_VDEV_MLME_FLAGS_TRANSMIT_AP 0x00000002
|
||||
#define WLAN_VDEV_MLME_FLAGS_NON_TRANSMIT_AP 0x00000004
|
||||
|
||||
/**
|
||||
* struct vdev_mlme_proto - VDEV protocol strucutre
|
||||
* struct vdev_mlme_proto_generic - generic mlme proto structure
|
||||
* sent in frames
|
||||
* @dtim_period: frequency of data transmissions per beacon 1-255
|
||||
* @slot_time: slot time
|
||||
* @protection_mode: rts cts protection mode
|
||||
* @beacon_interval: beacon interval
|
||||
* @ldpc: low density parity check value
|
||||
* @nss: number of spatial stream
|
||||
* @tsfadjust: adjusted timer sync value
|
||||
*/
|
||||
struct vdev_mlme_proto_generic {
|
||||
uint8_t dtim_period;
|
||||
uint32_t slot_time;
|
||||
uint32_t protection_mode;
|
||||
uint16_t beacon_interval;
|
||||
uint8_t ldpc;
|
||||
uint8_t nss;
|
||||
uint64_t tsfadjust;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct vdev_mlme_proto_ap - ap specific mlme protocol
|
||||
* @.
|
||||
*/
|
||||
struct vdev_mlme_proto_ap {
|
||||
};
|
||||
|
||||
/**
|
||||
* struct vdev_mlme_proto_sta - sta specific mlme protocol
|
||||
* @assoc_id: association id of station
|
||||
* @uapsd_cfg: uapsd configuration
|
||||
*/
|
||||
struct vdev_mlme_proto_sta {
|
||||
uint16_t assoc_id;
|
||||
uint16_t uapsd_cfg;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct vdev_mlme_proto_bss_color - bss color cfg
|
||||
* @flags: proposed for future use cases, currently not used.
|
||||
* @evt_type: bss color collision event.
|
||||
* @current_bss_color: current bss color.
|
||||
* @detection_period_ms: scan interval for both AP and STA mode.
|
||||
* @scan_period_ms: scan period for passive scan to detect collision.
|
||||
* @free_slot_expiry_time_ms: FW to notify host at timer expiry after
|
||||
* which Host will disable the bss color.
|
||||
*/
|
||||
struct vdev_mlme_proto_bss_color {
|
||||
uint32_t flags;
|
||||
uint8_t evt_type;
|
||||
uint32_t current_bss_color;
|
||||
uint32_t detection_period_ms;
|
||||
uint32_t scan_period_ms;
|
||||
uint32_t free_slot_expiry_time_ms;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct vdev_mlme_vht_info - vdev VHT information
|
||||
* @caps: vht capabilities
|
||||
* @subfer: su beam former capability
|
||||
* @subfee: su beam formee capability
|
||||
* @mubfer: mu beam former capability
|
||||
* @mubfee: mu beam formee capability
|
||||
* @implicit_bf: Implicit BF support
|
||||
* @sounding_dimension: Beamformer number of sounding dimension
|
||||
* @en_2gvht: 256 qam status
|
||||
* @allow_vht: vht capability status
|
||||
*/
|
||||
struct vdev_mlme_vht_info {
|
||||
uint32_t caps;
|
||||
uint8_t subfer;
|
||||
uint8_t mubfer;
|
||||
uint8_t subfee;
|
||||
uint8_t mubfee;
|
||||
uint8_t implicit_bf;
|
||||
uint8_t sounding_dimension;
|
||||
uint8_t en_2gvht;
|
||||
bool allow_vht;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct vdev_mlme_ht_info - vdev HT information
|
||||
* @ht_caps: HT capabilities
|
||||
* @allow_ht: HT capability status
|
||||
*/
|
||||
struct vdev_mlme_ht_info {
|
||||
uint32_t ht_caps;
|
||||
bool allow_ht;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct vdev_mlme_he_ops_info - vdev mlme HEOPS information
|
||||
* @he_ops: he ops
|
||||
*/
|
||||
struct vdev_mlme_he_ops_info {
|
||||
uint32_t he_ops;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct vdev_mlme_he_ops_info - vdev protocol structure holding information
|
||||
* that is used in frames
|
||||
* @generic: generic protocol information
|
||||
* @ap: ap specific protocol information
|
||||
* @sta: sta specific protocol information
|
||||
* @vht_info: vht information
|
||||
* @ht_info: ht capabilities information
|
||||
* @he_ops_info: he ops information
|
||||
* @bss_color: 11ax HE BSS Color information
|
||||
*/
|
||||
struct vdev_mlme_proto {
|
||||
struct vdev_mlme_proto_generic generic;
|
||||
struct vdev_mlme_proto_ap ap;
|
||||
struct vdev_mlme_proto_sta sta;
|
||||
struct vdev_mlme_vht_info vht_info;
|
||||
struct vdev_mlme_ht_info ht_info;
|
||||
struct vdev_mlme_he_ops_info he_ops_info;
|
||||
struct vdev_mlme_proto_bss_color bss_color;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct vdev_mlme_mgmt_generic - generic vdev mlme mgmt cfg
|
||||
* @rts_threshold: RTS threshold
|
||||
* @frag_threshold: Fragmentation threshold
|
||||
* @probe_delay: time in msec for delaying to send first probe request
|
||||
* @repeat_probe_time: probe request transmission time
|
||||
* @drop_unencry: drop unencrypted status
|
||||
* @ tx_pwrlimit: Tx power limit
|
||||
* @tx_power: Tx power
|
||||
* @minpower: Min power
|
||||
* @maxpower: Max power
|
||||
* @maxregpower: max regulatory power
|
||||
* @antennamax: max antenna
|
||||
* @ampdu: ampdu limit
|
||||
* @amsdu: amsdu limit
|
||||
* @ssid: service set identifier
|
||||
* @ssid_len: ssid length
|
||||
* @type: vdev type
|
||||
* @sub_type: vdev subtype
|
||||
* @rx_decap_type: rx decap type
|
||||
* @tx_decap_type: tx decap type
|
||||
* @disable_hw_ack: disable ha ack flag
|
||||
* @chan_flags: channel flags
|
||||
* @chan_flags_ext: extended channel flags
|
||||
* @cfreq0: channel frequency index0
|
||||
* @cfreq1: channel frequency index1
|
||||
* @dfs_set: DFS status flag
|
||||
* @dfs_set_cfreq2: DFS status channel index
|
||||
* @is_chan_passive: channel passive indication flag
|
||||
* @reg_class_id: reg domain class id
|
||||
* @is_11ax_stub_enabled: 11AX stub status indication flag
|
||||
* @nss_2g: 2G spatial streams
|
||||
* @nss_5g: 5G spatial streams
|
||||
*/
|
||||
struct vdev_mlme_mgmt_generic {
|
||||
uint32_t rts_threshold;
|
||||
uint32_t frag_threshold;
|
||||
uint32_t probe_delay;
|
||||
uint32_t repeat_probe_time;
|
||||
uint32_t drop_unencry;
|
||||
uint32_t tx_pwrlimit;
|
||||
uint8_t tx_power;
|
||||
uint8_t minpower;
|
||||
uint8_t maxpower;
|
||||
uint8_t maxregpower;
|
||||
uint8_t antennamax;
|
||||
uint8_t ampdu;
|
||||
uint8_t amsdu;
|
||||
char ssid[WLAN_SSID_MAX_LEN + 1];
|
||||
uint8_t ssid_len;
|
||||
uint8_t type;
|
||||
uint8_t subtype;
|
||||
uint8_t rx_decap_type;
|
||||
uint8_t tx_decap_type;
|
||||
bool disable_hw_ack;
|
||||
uint64_t chan_flags;
|
||||
uint16_t chan_flags_ext;
|
||||
uint32_t cfreq1;
|
||||
uint32_t cfreq2;
|
||||
bool dfs_set;
|
||||
bool dfs_set_cfreq2;
|
||||
bool is_chan_passive;
|
||||
uint8_t reg_class_id;
|
||||
uint8_t is_11ax_stub_enabled;
|
||||
uint8_t nss_2g;
|
||||
uint8_t nss_5g;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct vdev_mlme_mgmt_ap - ap specific vdev mlme mgmt cfg
|
||||
* @.
|
||||
*/
|
||||
struct vdev_mlme_mgmt_ap {
|
||||
};
|
||||
|
||||
/**
|
||||
* struct vdev_mlme_mgmt_sta - sta specific vdev mlme mgmt cfg
|
||||
* @.
|
||||
*/
|
||||
struct vdev_mlme_mgmt_sta {
|
||||
};
|
||||
|
||||
/**
|
||||
* struct vdev_mlme_inactivity_params - vdev mlme inactivity parameters
|
||||
* @bmiss_first_bcnt: bmiss first time
|
||||
* @bmiss_final_bcnt: bmiss final time
|
||||
* @keepalive_min_idle_inactive_time_secs: min time AP consider STA to be
|
||||
* inactive
|
||||
* @keepalive_max_idle_inactive_time_secs: max inactive idle time for AP to send
|
||||
* data-null
|
||||
* @keepalive_max_unresponsive_time_secs: max time to send WMI_STA_KICKOUT
|
||||
*/
|
||||
struct vdev_mlme_inactivity_params {
|
||||
uint32_t bmiss_first_bcnt;
|
||||
uint32_t bmiss_final_bcnt;
|
||||
uint32_t keepalive_min_idle_inactive_time_secs;
|
||||
uint32_t keepalive_max_idle_inactive_time_secs;
|
||||
uint32_t keepalive_max_unresponsive_time_secs;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct vdev_mlme_rate_info - vdev mlme rate information
|
||||
* @rate_flags: dynamic bandwidth info
|
||||
* @per_band_tx_mgmt_rate: per band Tx mgmt rate
|
||||
* @max_rate: max bandwidth rate
|
||||
* @tx_mgmt_rate: Tx Mgmt rate
|
||||
* @bcn_tx_rate: beacon Tx rate
|
||||
* @type: Type of ratemask configuration
|
||||
* @lower32: Lower 32 bits in the 1st 64-bit value
|
||||
* @higher32: Higher 32 bits in the 1st 64-bit value
|
||||
* @lower32_2: Lower 32 bits in the 2nd 64-bit value
|
||||
* @half_rate: Half rate
|
||||
* @quarter_rate: quarter rate
|
||||
*/
|
||||
struct vdev_mlme_rate_info {
|
||||
uint32_t rate_flags;
|
||||
uint32_t per_band_tx_mgmt_rate;
|
||||
uint32_t max_rate;
|
||||
uint32_t tx_mgmt_rate;
|
||||
uint32_t bcn_tx_rate;
|
||||
uint8_t type;
|
||||
uint32_t lower32;
|
||||
uint32_t higher32;
|
||||
uint32_t lower32_2;
|
||||
bool half_rate;
|
||||
bool quarter_rate;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct vdev_mlme_chainmask_info - vdev mlme chainmask information
|
||||
* @tx_chainmask: Tx chainmask
|
||||
* @rx_chainmask: Rx Chainmask
|
||||
* @num_rx_chain: Num of bits set in Rx chain
|
||||
* @num_tx_chain: Num of bits set in Tx chain
|
||||
*/
|
||||
struct vdev_mlme_chainmask_info {
|
||||
uint8_t tx_chainmask;
|
||||
uint8_t rx_chainmask;
|
||||
uint8_t num_rx_chain;
|
||||
uint8_t num_tx_chain;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct vdev_mlme_powersave_info - vdev mlme powersave information
|
||||
* @packet_powersave: packet powersave
|
||||
* @max_li_of_moddtim: max mod dtim
|
||||
* @dyndtim_cnt: dynamic dtim count
|
||||
* @listen_interval: listen interval
|
||||
* @moddtim_cnt: mod dtim count
|
||||
*/
|
||||
struct vdev_mlme_powersave_info {
|
||||
uint32_t packet_powersave;
|
||||
uint32_t max_li_of_moddtim;
|
||||
uint32_t dyndtim_cnt;
|
||||
uint32_t listen_interval;
|
||||
uint32_t moddtim_cnt;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct vdev_mlme_beacon_info - vdev mlme beacon information
|
||||
* @beacon_buffer: buffer allocated for beacon frame
|
||||
* @beacon_offsets: beacon IE's offsets
|
||||
*/
|
||||
struct vdev_mlme_beacon_info {
|
||||
qdf_nbuf_t beacon_buffer;
|
||||
void *beacon_offsets;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct vdev_mlme_mbss_11ax - mbss 11ax fields required for up cmd
|
||||
* @profile_idx: profile index of the connected non-trans ap (mbssid case).
|
||||
* 0 means invalid.
|
||||
* @profile_num: the total profile numbers of non-trans aps (mbssid
|
||||
* case).
|
||||
* 0 means non-MBSS AP.
|
||||
* @mbssid-flags: MBSS IE flags indicating vdev type
|
||||
* @vdevid_trans: id of transmitting vdev for MBSS IE
|
||||
* @trans_bssid: bssid of transmitted AP (MBSS IE case)
|
||||
*/
|
||||
struct vdev_mlme_mbss_11ax {
|
||||
uint32_t profile_idx;
|
||||
uint32_t profile_num;
|
||||
uint32_t mbssid_flags;
|
||||
uint8_t vdevid_trans;
|
||||
uint8_t trans_bssid[QDF_MAC_ADDR_SIZE];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct vdev_mlme_mgmt - vdev mlme mgmt related cfg
|
||||
* @generic: generic mgmt information
|
||||
* @ap: ap specific mgmt information
|
||||
* @sta: sta specific mgmt information
|
||||
* @inactivity_params: inactivity parameters
|
||||
* @rate_info: bandwidth rate information
|
||||
* @chainmask_info: Chainmask information
|
||||
* @powersave_info: Power save parameters
|
||||
* @beacon_info: beacon buffer information
|
||||
* @mbss_11ax: MBSS 11ax information
|
||||
*/
|
||||
struct vdev_mlme_mgmt {
|
||||
struct vdev_mlme_mgmt_generic generic;
|
||||
struct vdev_mlme_mgmt_ap ap;
|
||||
struct vdev_mlme_mgmt_sta sta;
|
||||
struct vdev_mlme_inactivity_params inactivity_params;
|
||||
struct vdev_mlme_rate_info rate_info;
|
||||
struct vdev_mlme_chainmask_info chainmask_info;
|
||||
struct vdev_mlme_powersave_info powersave_info;
|
||||
struct vdev_mlme_beacon_info beacon_info;
|
||||
struct vdev_mlme_mbss_11ax mbss_11ax;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -48,10 +396,28 @@ enum beacon_update_op {
|
||||
* enum vdev_cmd_type - Command type
|
||||
* @START_REQ: Start request
|
||||
* @RESTART_REQ: Restart request
|
||||
* @STOP_REQ: STOP request
|
||||
* @DELETE_REQ: DELETE request
|
||||
*/
|
||||
enum vdev_cmd_type {
|
||||
START_REQ,
|
||||
RESTART_REQ,
|
||||
STOP_REQ,
|
||||
DELETE_REQ,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum vdev_rsp_type - Response type
|
||||
* @START_RSP: Start Response
|
||||
* @RESTART_RSP: Restart Response
|
||||
* @STOP_RSP: STOP Response
|
||||
* @DELETE_RSP: DELETE Response
|
||||
*/
|
||||
enum vdev_rsp_type {
|
||||
START_RSP,
|
||||
RESTART_RSP,
|
||||
STOP_RSP,
|
||||
DELETE_RSP,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -141,19 +507,41 @@ struct vdev_mlme_ops {
|
||||
QDF_STATUS (*mlme_vdev_notify_down_complete)(
|
||||
struct vdev_mlme_obj *vdev_mlme,
|
||||
uint16_t event_data_len, void *event_data);
|
||||
QDF_STATUS (*mlme_vdev_ext_hdl_create)(
|
||||
struct vdev_mlme_obj *vdev_mlme);
|
||||
QDF_STATUS (*mlme_vdev_ext_hdl_post_create)(
|
||||
struct vdev_mlme_obj *vdev_mlme);
|
||||
QDF_STATUS (*mlme_vdev_ext_hdl_destroy)(
|
||||
struct vdev_mlme_obj *vdev_mlme);
|
||||
QDF_STATUS (*mlme_vdev_enqueue_exp_cmd)(
|
||||
struct vdev_mlme_obj *vdev_mlme,
|
||||
uint8_t cmd_type);
|
||||
QDF_STATUS (*mlme_vdev_ext_delete_rsp)(
|
||||
struct vdev_mlme_obj *vdev_mlme,
|
||||
struct vdev_delete_response *rsp);
|
||||
QDF_STATUS (*mlme_vdev_ext_stop_rsp)(
|
||||
struct vdev_mlme_obj *vdev_mlme,
|
||||
struct vdev_stop_response *rsp);
|
||||
QDF_STATUS (*mlme_vdev_ext_start_rsp)(
|
||||
struct vdev_mlme_obj *vdev_mlme,
|
||||
struct vdev_start_response *rsp);
|
||||
};
|
||||
|
||||
/**
|
||||
* struct vdev_mlme_obj - VDEV MLME component object
|
||||
* @vdev_proto: VDEV MLME proto substructure
|
||||
* @proto: VDEV MLME proto substructure
|
||||
* @mgmt: VDEV MLME mgmt substructure
|
||||
* @sm_lock: VDEV SM lock
|
||||
* @vdev_cmd_lock: VDEV MLME command atomicity
|
||||
* @sm_hdl: VDEV SM handle
|
||||
* @vdev: Pointer to vdev objmgr
|
||||
* @ops: VDEV MLME callback table
|
||||
* @ext_vdev_ptr: VDEV MLME legacy pointer
|
||||
* @vdev_rt: VDEV response timer
|
||||
*/
|
||||
struct vdev_mlme_obj {
|
||||
struct vdev_mlme_proto vdev_proto;
|
||||
struct vdev_mlme_proto proto;
|
||||
struct vdev_mlme_mgmt mgmt;
|
||||
#ifdef VDEV_SM_LOCK_SUPPORT
|
||||
qdf_spinlock_t sm_lock;
|
||||
qdf_mutex_t vdev_cmd_lock;
|
||||
@@ -162,6 +550,7 @@ struct vdev_mlme_obj {
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
struct vdev_mlme_ops *ops;
|
||||
void *ext_vdev_ptr;
|
||||
struct vdev_response_timer vdev_rt;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user