diff --git a/fw/wmi_tlv_defs.h b/fw/wmi_tlv_defs.h index 6003552145..d4804193a0 100644 --- a/fw/wmi_tlv_defs.h +++ b/fw/wmi_tlv_defs.h @@ -804,6 +804,9 @@ typedef enum { WMITLV_TAG_STRUC_wmi_pdev_set_diversity_gain_cmd_fixed_param, WMITLV_TAG_STRUC_WMI_MAC_PHY_CHAINMASK_COMBO, WMITLV_TAG_STRUC_WMI_MAC_PHY_CHAINMASK_CAPABILITY, + WMITLV_TAG_STRUC_wmi_vdev_set_arp_stats_cmd_fixed_param, + WMITLV_TAG_STRUC_wmi_vdev_get_arp_stats_cmd_fixed_param, + WMITLV_TAG_STRUC_wmi_vdev_get_arp_stats_event_fixed_param, } WMITLV_TAG_ID; /* @@ -1129,6 +1132,8 @@ typedef enum { OP(WMI_PDEV_UPDATE_PKT_ROUTING_CMDID) \ OP(WMI_PDEV_CHECK_CAL_VERSION_CMDID) \ OP(WMI_PDEV_SET_DIVERSITY_GAIN_CMDID) \ + OP(WMI_VDEV_SET_ARP_STAT_CMDID) \ + OP(WMI_VDEV_GET_ARP_STAT_CMDID) \ /* add new CMD_LIST elements above this line */ @@ -1307,6 +1312,7 @@ typedef enum { OP(WMI_PDEV_CHIP_POWER_SAVE_FAILURE_DETECTED_EVENTID) \ OP(WMI_PDEV_CSA_SWITCH_COUNT_STATUS_EVENTID) \ OP(WMI_PDEV_CHECK_CAL_VERSION_EVENTID) \ + OP(WMI_VDEV_GET_ARP_STAT_EVENTID) \ /* add new EVT_LIST elements above this line */ @@ -3241,6 +3247,16 @@ WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_CHECK_CAL_VERSION_CMDID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, diversity_gains, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_SET_DIVERSITY_GAIN_CMDID); +/* set arp stats cmd */ +#define WMITLV_TABLE_WMI_VDEV_SET_ARP_STAT_CMDID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_set_arp_stats_cmd_fixed_param, wmi_vdev_set_arp_stats_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_SET_ARP_STAT_CMDID); + +/* get arp stats cmd */ +#define WMITLV_TABLE_WMI_VDEV_GET_ARP_STAT_CMDID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_get_arp_stats_cmd_fixed_param, wmi_vdev_get_arp_stats_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_GET_ARP_STAT_CMDID); + /************************** TLV definitions of WMI events *******************************/ @@ -4322,6 +4338,11 @@ WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_CSA_SWITCH_COUNT_STATUS_EVENTID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_pdev_check_cal_version_event_fixed_param, wmi_pdev_check_cal_version_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_CHECK_CAL_VERSION_EVENTID); +/* ARP stats response event */ +#define WMITLV_TABLE_WMI_VDEV_GET_ARP_STAT_EVENTID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_get_arp_stats_event_fixed_param, wmi_vdev_get_arp_stats_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_GET_ARP_STAT_EVENTID); + #ifdef __cplusplus } diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 0ea1f751b1..0f3b498b18 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -419,6 +419,10 @@ typedef enum { /** Command to enable mac randomizaton **/ WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_CMDID, + /** WMI commands related to dbg arp stats */ + WMI_VDEV_SET_ARP_STAT_CMDID, + WMI_VDEV_GET_ARP_STAT_CMDID, + /* peer specific commands */ /** create a peer */ @@ -1136,6 +1140,9 @@ typedef enum { /** event to report mac randomization success **/ WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_STATUS_EVENTID, + /* event for ARP stats collection */ + WMI_VDEV_GET_ARP_STAT_EVENTID, + /* peer specific events */ /** FW reauet to kick out the station for reasons like inactivity,lack of response ..etc */ WMI_PEER_STA_KICKOUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PEER), @@ -5999,17 +6006,18 @@ typedef struct { A_UINT32 key_seq_counter_h; } wmi_key_seq_counter; -#define WMI_CIPHER_NONE 0x0 /* clear key */ -#define WMI_CIPHER_WEP 0x1 -#define WMI_CIPHER_TKIP 0x2 -#define WMI_CIPHER_AES_OCB 0x3 -#define WMI_CIPHER_AES_CCM 0x4 -#define WMI_CIPHER_WAPI 0x5 -#define WMI_CIPHER_CKIP 0x6 -#define WMI_CIPHER_AES_CMAC 0x7 -#define WMI_CIPHER_ANY 0x8 -#define WMI_CIPHER_AES_GCM 0x9 -#define WMI_CIPHER_AES_GMAC 0xa +#define WMI_CIPHER_NONE 0x0 /* clear key */ +#define WMI_CIPHER_WEP 0x1 +#define WMI_CIPHER_TKIP 0x2 +#define WMI_CIPHER_AES_OCB 0x3 +#define WMI_CIPHER_AES_CCM 0x4 +#define WMI_CIPHER_WAPI 0x5 +#define WMI_CIPHER_CKIP 0x6 +#define WMI_CIPHER_AES_CMAC 0x7 +#define WMI_CIPHER_ANY 0x8 +#define WMI_CIPHER_AES_GCM 0x9 +#define WMI_CIPHER_AES_GMAC 0xa +#define WMI_CIPHER_WAPI_GCM_SM4 0xb typedef struct { A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_cmd_fixed_param */ @@ -10442,6 +10450,54 @@ typedef struct { A_UINT32 keepaliveMethod; /* seconds */ } wmi_vdev_get_keepalive_event_fixed_param; +typedef enum { + WMI_CLEAR_ARP_STATS_COLLECTED = 0x0, + WMI_START_ARP_STATS_COLLECTION, +} WMI_ARP_STATS_ACTION; + +typedef enum { + WMI_ARP_STATS_RX_PKT_TYPE_ARP = 0x1, +} WMI_ARP_STATS_RX_PKT_TYPE; + +typedef enum { + WMI_BA_SESSION_ESTABLISHMENT_STATUS_SUCCESS = 0x0, + WMI_BA_SESSION_ESTABLISHMENT_STATUS_FAILURE, +} WMI_ARP_STATS_BA_SESSION_ESTABLISH_STATUS; + +typedef enum { + WMI_CONNECTION_STATUS_FAILURE = 0x0, + WMI_CONNECTION_STATUS_SUCCESS, +} WMI_ARP_STATS_CONNECTION_STATUS; + +/* ARP stats set (configure) req */ +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_arp_stats_cmd_fixed_param */ + A_UINT32 vdev_id; + A_UINT32 set_clr; /* WMI_ARP_STATS_ACTION */ + A_UINT32 pkt_type; /* WMI_ARP_STATS_RX_PKT_TYPE */ + A_UINT32 ipv4; /* target will maintain ARP stats (only) for frames containing this IP address */ +} wmi_vdev_set_arp_stats_cmd_fixed_param; + +/* ARP stats get req */ +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_arp_stats_cmd_fixed_param */ + A_UINT32 vdev_id; +} wmi_vdev_get_arp_stats_cmd_fixed_param; + +/* per vdev based ARP stats */ +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_arp_stats_event_fixed_param */ + A_UINT32 vdev_id; + A_UINT32 arp_req_enqueue; + A_UINT32 arp_req_tx_success; + A_UINT32 arp_req_tx_failure; /* number of times a tx MPDU containing a unicast ARP request went unacked */ + A_UINT32 arp_rsp_recvd; + A_UINT32 out_of_order_arp_rsp_drop_cnt; + A_UINT32 dad_detected; /* duplicate address detection */ + A_UINT32 connect_status; /* WMI_ARP_STATS_CONNECTION_STATUS */ + A_UINT32 ba_session_establishment_status; /* WMI_ARP_STATS_BA_SESSION_ESTABLISH_STATUS */ +} wmi_vdev_get_arp_stats_event_fixed_param; + typedef struct { A_UINT32 tlv_header; A_UINT32 vdev_id; @@ -16489,7 +16545,7 @@ typedef struct { typedef struct { A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_inst_rssi_stats_resp_fixed_param */ - A_UINT32 iRSSI; /* dBm above the noise floor */ + A_UINT32 iRSSI; /* dB above the noise floor */ /* peer MAC address */ wmi_mac_addr peer_macaddr; A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */ @@ -17833,6 +17889,8 @@ static INLINE A_UINT8 *wmi_id_to_name(A_UINT32 wmi_command) WMI_RETURN_STRING(WMI_PDEV_UPDATE_PKT_ROUTING_CMDID); WMI_RETURN_STRING(WMI_PDEV_CHECK_CAL_VERSION_CMDID); WMI_RETURN_STRING(WMI_PDEV_SET_DIVERSITY_GAIN_CMDID); + WMI_RETURN_STRING(WMI_VDEV_SET_ARP_STAT_CMDID); + WMI_RETURN_STRING(WMI_VDEV_GET_ARP_STAT_CMDID); } return "Invalid WMI cmd"; diff --git a/fw/wmi_version.h b/fw/wmi_version.h index d167f14ede..b84af6bfdb 100644 --- a/fw/wmi_version.h +++ b/fw/wmi_version.h @@ -36,7 +36,7 @@ #define __WMI_VER_MINOR_ 0 /** WMI revision number has to be incremented when there is a * change that may or may not break compatibility. */ -#define __WMI_REVISION_ 354 +#define __WMI_REVISION_ 355 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work