diff options
Diffstat (limited to 'fw/wmi_unified.h')
-rw-r--r-- | fw/wmi_unified.h | 220 |
1 files changed, 219 insertions, 1 deletions
diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 012a14f..7941f19 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -1230,6 +1230,11 @@ typedef enum { */ WMI_SERVICE_AVAILABLE_EVENTID, + /** Specify what numbers and kinds of interfaces (a.k.a. vdevs) + * the target supports + */ + WMI_IFACE_COMBINATION_IND_EVENTID, + /** Scan specific events */ WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN), @@ -2472,6 +2477,13 @@ typedef struct { /* 2nd DWORD of HE MAC Capabilities */ A_UINT32 he_cap_info_ext; + + /* + * A variable-length TLV array of wmi_chan_rf_characterization_info will + * follow this fixed_param TLV, containing rx characterization info for + * primary channels. + * WMI_CHAN_RF_CHARACTERIZATION_INFO wmi_chan_rf_characterization_info[]; + */ } wmi_service_ready_ext_event_fixed_param; typedef enum { @@ -8091,6 +8103,8 @@ typedef struct { /* NAN Data Interface */ #define WMI_VDEV_TYPE_NDI 0x7 +#define WMI_VDEV_TYPE_MESH_POINT 0x8 + /* * Param values to be sent for WMI_VDEV_PARAM_SGI command * which are used in 11ax systems @@ -12475,6 +12489,7 @@ typedef struct { A_UINT32 psk_msk_len; /**length of psk_msk*/ A_UINT32 psk_msk_ext_len; /**length of psk_msk_ext*/ A_UINT32 psk_msk_ext[ROAM_OFFLOAD_PSK_MSK_BYTES>>2]; + A_UINT32 adaptive_11r; /* FW needs to perform adaptive 11r roaming */ } wmi_roam_11r_offload_tlv_param; /* This TLV will be filled only in case of ESE */ @@ -12531,7 +12546,6 @@ typedef struct { #define WMI_ROAM_REASON_INVALID 0x0 /** invalid reason. Do not interpret reason field */ #define WMI_ROAM_REASON_BETTER_AP 0x1 /** found a better AP */ #define WMI_ROAM_REASON_BMISS 0x2 /** beacon miss detected */ -#define WMI_ROAM_REASON_DEAUTH 0x2 /** deauth/disassoc received */ #define WMI_ROAM_REASON_LOW_RSSI 0x3 /** connected AP's low rssi condition detected */ #define WMI_ROAM_REASON_SUITABLE_AP 0x4 /** found another AP that matches SSID and Security profile in @@ -12548,6 +12562,7 @@ typedef struct { #define WMI_ROAM_REASON_INVOKE_ROAM_FAIL 0x6 #define WMI_ROAM_REASON_RSO_STATUS 0x7 #define WMI_ROAM_REASON_BTM 0x8 /** Roaming because of BTM request received */ +#define WMI_ROAM_REASON_DEAUTH 0x9 /** deauth/disassoc received */ /* reserved up through 0xF */ /* subnet status: bits 4-5 */ @@ -12596,6 +12611,8 @@ typedef enum #define WMI_ROAM_NOTIF_DISCONNECT 0x6 /** indicate that roaming not allowed due BTM req */ #define WMI_ROAM_NOTIF_SUBNET_CHANGED 0x7 /** indicate that subnet has changed */ #define WMI_ROAM_NOTIF_SCAN_START 0x8 /** indicate roam scan start, notif_params to be sent as WMI_ROAM_TRIGGER_REASON_ID */ +#define WMI_ROAM_NOTIF_DEAUTH_RECV 0x9 /** indicate deauth received, notif_params to be sent as reason code */ +#define WMI_ROAM_NOTIF_DISASSOC_RECV 0xa /** indicate disassoc received, notif_params to be sent as reason code */ /**whenever RIC request information change, host driver should pass all ric related information to firmware (now only support tsepc) * Once, 11r roaming happens, firmware can generate RIC request in reassoc request based on these informations @@ -24677,6 +24694,54 @@ typedef struct { A_UINT32 min_buf_align; /* minimum alignment in bytes of each buffer in the DMA ring */ } WMI_DMA_RING_CAPABILITIES; +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUCT_ wmi_chan_rf_characterization_info */ + + /** + * [3:0] : channel metric - 0 = unusable, 1 = worst, 10 = best + * [4:7] : channel BW - + * 0 = 20MHz + * 1 = 40MHz + * 2 = 80MHz + * 3 = 160MHz + * (4-10 unused) + * 11 = 5MHz + * 12 = 10MHz + * (13-15 unused) + * [15:8 ]: Reserved + * [31:16]: Frequency - channel frequency of RF characteristic info (MHz) + */ + A_UINT32 freq_info; +} WMI_CHAN_RF_CHARACTERIZATION_INFO; + +#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC 0x0000000f +#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC_S 0 +#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW 0x000000f0 +#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW_S 4 +#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ 0xffff0000 +#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ_S 16 + +#define WMI_CHAN_RF_CHARACTERIZATION_CHAN_METRIC_SET(dword,val) \ + WMI_F_RMW((dword)->freq_info,(val) & 0xff, \ + WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC) +#define WMI_CHAN_RF_CHARACTERIZATION_CHAN_METRIC_GET(dword) \ + WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC) + +#define WMI_CHAN_RF_CHARACTERIZATION_BW_SET(dword, val) \ + WMI_F_RMW((dword)->freq_info,(val) & 0xf0, \ + WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW) +#define WMI_CHAN_RF_CHARACTERIZATION_BW_GET(dword) \ + WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW) + +#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_SET(dword, val) \ + WMI_F_RMW((dword)->freq_info,(val) & 0xffff, \ + WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ) + +#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_GET(dword) \ + WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ) + + + #define WMI_DMA_RING_PADDR_LO_S 0 #define WMI_DMA_RING_PADDR_LO 0xffffffff @@ -26418,6 +26483,159 @@ typedef struct { wmi_mac_addr bssid; /** bssid of the rogue ap */ } wmi_pdev_rap_info_event_fixed_param; +/* + * WMI API for Firmware to indicate iface combinations which Firmware + * support to Host + */ +typedef struct { + A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_wlanfw_iface_cmb_ind_event_fixed_param */ + + /* common part */ + /* Consider DBS/DBDC for this new implementation */ + A_UINT32 pdev_n; + + /* iface combinations part - + * Use subsequent TLV arrays to list supported combinations of interfaces. + */ + +/* + * The TLVs listing interface combinations, will follow this TLV. + * The number of combinations can be calculated by dividing the + * TLV array length by the TLV array element length. + * + * The fixed_param TLV is directly followed by a list of + * wlanfw_iface_combination elements: + * wlanfw_iface_combination combinations[0]; + * wlanfw_iface_combination combinations[1]; + * ... + * wlanfw_iface_combination combinations[N]; + * + * After the list of wlanfw_iface_combinations is a list of interface limits. + * The cmb_limits field of each wlanfw_iface_combination show which of the + * limits within the "wlanfw_ifact_limit limits" list belong to that + * iface_combination: + * limits[0] <- cmb 0, limit 0 + * ... + * limits[cmb[0].cmb_limits-1] <- cmb 0, limit N + * limits[cmb[0].cmb_limits] <- cmb 1, limit 0 + * ... + * limits[cmb[0].cmb_limits+cmb[1].cmb_limits-1] <- cmb 1, limit N + * limits[cmb[0].cmb_limits+cmb[1].cmb_limits] <- cmb 2, limit 0 + * ... + */ +} wmi_wlanfw_iface_cmb_ind_event_fixed_param; + +typedef struct { + A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_wlanfw_iface_limit_param */ + /* + * How many vdevs can work as below vdev_type/vdev_subtype + * in one combination. + */ + A_UINT32 vdev_limit_n; + /* + * Indicate what role above vdevs can work as. + * Refer to "WMI_VDEV_TYPE_xx, WMI_UNIFIED_VDEV_SUBTYPE_xx" + * for roles definition. + */ + A_UINT32 vdev_type; + A_UINT32 vdev_subtype; +} wlanfw_iface_limit; + +/** + * @brief specific configuration of valid_fields for host. + * These flags are used for indicating which fields in wlanfw_iface_combination + * contains valid value for Host Driver. + * 0: Host can ignore this field + * 1: field contains valid value for Host Driver + */ + +#define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_S 0 +#define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_M 0x1 + +#define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_S 1 +#define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_M 0x2 + +#define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_S 2 +#define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_M 0x4 + +#define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_S 3 +#define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_M 0x8 + +#define WMI_CMB_VALID_FIELDS_FLAG_SET(word32, flag, value) \ + do { \ + (word32) &= ~WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _M; \ + (word32) |= ((value) << WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _S) & \ + WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _M; \ + } while (0) + +#define WMI_CMB_VALID_FIELDS_FLAG_GET(word32, flag) \ + (((word32) & WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _M) >> \ + WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _S) + +#define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_SET(word32, value) \ + WMI_CMB_VALID_FIELDS_FLAG_SET((word32), PEER_MAX, (value)) +#define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_GET(word32) \ + WMI_CMB_VALID_FIELDS_FLAG_GET((word32), PEER_MAX) + +#define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_SET(word32, value) \ + WMI_CMB_VALID_FIELDS_FLAG_SET((word32), STA_AP_BCN_INT_MATCH, (value)) +#define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_GET(word32) \ + WMI_CMB_VALID_FIELDS_FLAG_GET((word32), STA_AP_BCN_INT_MATCH) + +#define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_SET(word32, value) \ + WMI_CMB_VALID_FIELDS_FLAG_SET((word32), BCN_INT_MIN, (value)) +#define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_GET(word32) \ + WMI_CMB_VALID_FIELDS_FLAG_GET((word32), BCN_INT_MIN) + +#define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_SET(word32, value) \ + WMI_CMB_VALID_FIELDS_FLAG_SET((word32), BCN_INT_N, (value)) +#define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_GET(word32) \ + WMI_CMB_VALID_FIELDS_FLAG_GET((word32), BCN_INT_N) + +typedef struct { + A_UINT32 tlv_header; + /* + * Max num Peers can be supported in this combination. + * It excludes the self-peers associated with each vdev. + * It's the number of real remote peers. + * eg: when working as AP mode, indicating how many clients can be + * supported to connect with this AP. + */ + A_UINT32 peer_max; + /* Home Channels supported on one single phy concurrently */ + A_UINT32 channel_n; + /* + * The number of "wlanfw_iface_limit" for a specified combination. + * eg: there is 2 vdev, including 1 AP vdev and 1 STA vdev, then this + * cmb_limits will be 2 for this combination. + */ + A_UINT32 cmb_limits; + /* + * Beacon intervals for STA and AP types need to be match or not. + * 1: need to be match + * 0: not need + */ + A_UINT32 sta_ap_bcn_int_match; + /* + * This combination supports different beacon intervals or not. + * 0: Beacon interval is same for all interface + * !0: STA Beacon interval AND GCD of AP Beacon intervals + * should be greater or equal to this value. + */ + A_UINT32 bcn_int_min; + /* + * Number of different Beacon intervals + */ + A_UINT32 bcn_int_n; + + /* + * This indicates which field in this struct + * contains valid value for Host Driver. + * Refer to definitions for "WMI_CMB_VALID_FIELDS_FLAG_xx". + */ + A_UINT32 valid_fields; +} wlanfw_iface_combination; + /* ADD NEW DEFS HERE */ |