diff options
| -rw-r--r-- | CORE/SERVICES/COMMON/wmi_tlv_defs.h | 15 | ||||
| -rw-r--r-- | CORE/SERVICES/COMMON/wmi_unified.h | 82 | ||||
| -rw-r--r-- | CORE/SERVICES/COMMON/wmi_version.h | 2 | ||||
| -rw-r--r-- | CORE/SERVICES/WMI/wmi_unified.c | 1 |
4 files changed, 98 insertions, 2 deletions
diff --git a/CORE/SERVICES/COMMON/wmi_tlv_defs.h b/CORE/SERVICES/COMMON/wmi_tlv_defs.h index ad92b2925553..2d522806e224 100644 --- a/CORE/SERVICES/COMMON/wmi_tlv_defs.h +++ b/CORE/SERVICES/COMMON/wmi_tlv_defs.h @@ -750,6 +750,8 @@ typedef enum { WMITLV_TAG_STRUC_wmi_request_wlan_stats_cmd_fixed_param, WMITLV_TAG_STRUC_wmi_rx_aggr_failure_event_fixed_param, WMITLV_TAG_STRUC_wmi_rx_aggr_failure_info, + WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param, + WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param, } WMITLV_TAG_ID; /* @@ -1053,6 +1055,7 @@ typedef enum { OP(WMI_COEX_GET_ANTENNA_ISOLATION_CMDID) \ OP(WMI_PDEV_SET_STATS_THRESHOLD_CMDID) \ OP(WMI_REQUEST_WLAN_STATS_CMDID) \ + OP(WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID) \ /* add new CMD_LIST elements above this line */ /* @@ -1213,6 +1216,7 @@ typedef enum { OP(WMI_COEX_REPORT_ANTENNA_ISOLATION_EVENTID) \ OP(WMI_REPORT_STATS_EVENTID) \ OP(WMI_REPORT_RX_AGGR_FAILURE_EVENTID) \ + OP(WMI_VDEV_ENCRYPT_DECRYPT_DATA_RESP_EVENTID) \ /* add new EVT_LIST elements above this line */ @@ -2585,6 +2589,12 @@ WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_GET_TEMPERATURE_CMDID); WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_pdev_get_antdiv_status_cmd_fixed_param, wmi_pdev_get_antdiv_status_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_GET_ANTDIV_STATUS_CMDID); +/* DISA feature : vdev encrypt decrypt request */ +#define WMITLV_TABLE_WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param, wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, data, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID); + /* Set antenna diversity Cmd */ #define WMITLV_TABLE_WMI_SET_ANTENNA_DIVERSITY_CMDID(id,op,buf,len) \ WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_pdev_set_antenna_diversity_cmd_fixed_param, wmi_pdev_set_antenna_diversity_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) @@ -4013,6 +4023,11 @@ WMITLV_CREATE_PARAM_STRUC(WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, rx_mcs, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_REPORT_STATS_EVENTID); +#define WMITLV_TABLE_WMI_VDEV_ENCRYPT_DECRYPT_DATA_RESP_EVENTID(id, op, buf, len) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param, wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, enc80211_frame, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_ENCRYPT_DECRYPT_DATA_RESP_EVENTID); + #ifdef __cplusplus } #endif diff --git a/CORE/SERVICES/COMMON/wmi_unified.h b/CORE/SERVICES/COMMON/wmi_unified.h index a7b41de86245..b0155108589b 100644 --- a/CORE/SERVICES/COMMON/wmi_unified.h +++ b/CORE/SERVICES/COMMON/wmi_unified.h @@ -403,6 +403,9 @@ typedef enum { /** To set custom aggregation size for per vdev */ WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID, + /* DISA feature: Encrypt-decrypt data request */ + WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID, + /* peer specific commands */ /** create a peer */ @@ -1077,7 +1080,13 @@ typedef enum { /* FW response to Host for vdev delete cmdid */ WMI_VDEV_DELETE_RESP_EVENTID, - /* peer specific events */ + /** + * DISA feature: FW response to Host with encrypted/decrypted + * 802.11 DISA frame + */ + WMI_VDEV_ENCRYPT_DECRYPT_DATA_RESP_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), @@ -14518,6 +14527,77 @@ typedef struct { * A_UINT8 ie_data[]; */ } wmi_vdev_set_ie_cmd_fixed_param; +/* DISA feature related data structures */ +#define MAX_MAC_HEADER_LEN 32 +typedef enum { + INVALID, + ENCRYPT = 1, + DECRYPT = 2, +} ENCRYPT_DECRYPT_FLAG; + +typedef struct { + /** + * TLV tag and len; tag equals + * WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param + */ + A_UINT32 tlv_header; + /** unique id identifying the VDEV, generated by the caller */ + A_UINT32 vdev_id; + ENCRYPT_DECRYPT_FLAG key_flag; + A_UINT32 key_idx; + A_UINT32 key_cipher; + A_UINT32 key_len; /* units = bytes */ + A_UINT32 key_txmic_len; /* units = bytes */ + A_UINT32 key_rxmic_len; /* units = bytes */ + /** Key: This array needs to be provided in little-endian order */ + A_UINT8 key_data[WMI_MAX_KEY_LEN]; + /** + * Packet number: This array needs to be provided in little-endian + * order. + * If the PN is less than 8 bytes, the PN data shall be placed into this + * pn[] array starting at byte 0, leaving the MSBs empty. + */ + A_UINT8 pn[8]; + /** + * 802.11 MAC header to be typecast to struct ieee80211_qosframe_addr4 + * This array needs to be provided in little-endian order. + */ + A_UINT8 mac_hdr[MAX_MAC_HEADER_LEN]; + A_UINT32 data_len; /** Payload length, units = bytes */ + /** + * Following this struct are this TLV: + * A_UINT8 data[]; <-- actual data to be encrypted, + * needs to be provided in little-endian order + */ +} wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param; + +/** + * This event is generated in response to + * WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID from HOST. + * On receiving WMI command WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID from + * HOST with DISA test vectors, DISA frame will prepared and submitted to HW, + * then on receiving the tx completion for the DISA frame this WMI event + * will be delivered to HOST with the encrypted frame. + */ +typedef struct { + /** + * TLV tag and len; tag equals + * WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param + */ + A_UINT32 tlv_header; + /* VDEV identifier */ + A_UINT32 vdev_id; + A_INT32 status; /* 0: success, -1: Failure, */ + /* 802.11 header length + encrypted payload length (units = bytes) */ + A_UINT32 data_length; + /** + * Following this struct is this TLV: + * A_UINT8 enc80211_frame[]; <-- Encrypted 802.11 frame; + * 802.11 header + encrypted payload, + * provided in little-endian order + */ +} wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param; + /* DEPRECATED - use wmi_pdev_set_pcl_cmd_fixed_param instead */ typedef struct { A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_pcl_cmd_fixed_param */ diff --git a/CORE/SERVICES/COMMON/wmi_version.h b/CORE/SERVICES/COMMON/wmi_version.h index 6a4af44cd219..bdb566aad8af 100644 --- a/CORE/SERVICES/COMMON/wmi_version.h +++ b/CORE/SERVICES/COMMON/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_ 295 +#define __WMI_REVISION_ 296 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work diff --git a/CORE/SERVICES/WMI/wmi_unified.c b/CORE/SERVICES/WMI/wmi_unified.c index f911685640d7..c5c5a312c17d 100644 --- a/CORE/SERVICES/WMI/wmi_unified.c +++ b/CORE/SERVICES/WMI/wmi_unified.c @@ -719,6 +719,7 @@ static u_int8_t* get_wmi_cmd_string(WMI_CMD_ID wmi_command) CASE_RETURN_STRING(WMI_COEX_GET_ANTENNA_ISOLATION_CMDID); CASE_RETURN_STRING(WMI_PDEV_SET_STATS_THRESHOLD_CMDID); CASE_RETURN_STRING(WMI_REQUEST_WLAN_STATS_CMDID); + CASE_RETURN_STRING(WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID); } return "Invalid WMI cmd"; } |
