Kaynağa Gözat

qcacmn: Add changes for DISA certification

Add TLV changes to pass DISA parameters received from
WMA and pass them to firmware for firmware
to encrypt data and send back to driver.

Change-Id: Ic6928a93f799c47518fbbad96564062f595287dd
CRs-Fixed: 1072545
Padma, Santhosh Kumar 8 yıl önce
ebeveyn
işleme
7352405bb9
3 değiştirilmiş dosya ile 45 ekleme ve 0 silme
  1. 3 0
      wmi_unified_api.h
  2. 39 0
      wmi_unified_param.h
  3. 3 0
      wmi_unified_priv.h

+ 3 - 0
wmi_unified_api.h

@@ -502,6 +502,9 @@ QDF_STATUS wmi_unified_probe_rsp_tmpl_send_cmd(void *wmi_hdl,
 QDF_STATUS wmi_unified_setup_install_key_cmd(void *wmi_hdl,
 			struct set_key_params *key_params);
 
+QDF_STATUS wmi_unified_encrypt_decrypt_send_cmd(void *wmi_hdl,
+			struct encrypt_decrypt_req_params *params);
+
 QDF_STATUS wmi_unified_p2p_go_set_beacon_ie_cmd(void *wmi_hdl,
 				    A_UINT32 vdev_id, uint8_t *p2p_ie);
 

+ 39 - 0
wmi_unified_param.h

@@ -32,6 +32,13 @@
 
 #ifndef _WMI_UNIFIED_PARAM_H_
 #define _WMI_UNIFIED_PARAM_H_
+
+#define MAC_MAX_KEY_LENGTH 32
+#define MAC_PN_LENGTH 8
+#define MAX_MAC_HEADER_LEN 32
+#define MIN_MAC_HEADER_LEN 24
+#define QOS_CONTROL_LEN 2
+
 #define IEEE80211_ADDR_LEN  6  /* size of 802.11 address */
 #define WMI_MAC_MAX_SSID_LENGTH              32
 #define WMI_SCAN_MAX_NUM_SSID                0x0A
@@ -6567,5 +6574,37 @@ enum wmi_userspace_log_level {
 	WMI_LOG_LEVEL_ACTIVE,
 };
 
+/**
+ * struct encrypt_decrypt_req_params - encrypt/decrypt params
+ * @vdev_id: virtual device id
+ * @key_flag: This indicates firmware to encrypt/decrypt payload
+ *    see ENCRYPT_DECRYPT_FLAG
+ * @key_idx: Index used in storing key
+ * @key_cipher: cipher used for encryption/decryption
+ *   Eg: see WMI_CIPHER_AES_CCM for CCMP
+ * @key_len: length of key data
+ * @key_txmic_len: length of Tx MIC
+ * @key_rxmic_len: length of Rx MIC
+ * @key_data: Key
+ * @pn: packet number
+ * @mac_header: MAC header
+ * @data_len: length of data
+ * @data: pointer to payload
+ */
+struct encrypt_decrypt_req_params {
+	uint32_t vdev_id;
+	uint8_t key_flag;
+	uint32_t key_idx;
+	uint32_t key_cipher;
+	uint32_t key_len;
+	uint32_t key_txmic_len;
+	uint32_t key_rxmic_len;
+	uint8_t key_data[MAC_MAX_KEY_LENGTH];
+	uint8_t pn[MAC_PN_LENGTH];
+	uint8_t mac_header[MAX_MAC_HEADER_LEN];
+	uint32_t data_len;
+	uint8_t *data;
+};
+
 #endif /* _WMI_UNIFIED_PARAM_H_ */
 

+ 3 - 0
wmi_unified_priv.h

@@ -1129,6 +1129,9 @@ QDF_STATUS (*send_adapt_dwelltime_params_cmd)(wmi_unified_t wmi_handle,
 
 QDF_STATUS (*send_fw_test_cmd)(wmi_unified_t wmi_handle,
 			       struct set_fwtest_params *wmi_fwtest);
+
+QDF_STATUS (*send_encrypt_decrypt_send_cmd)(wmi_unified_t wmi_handle,
+				struct encrypt_decrypt_req_params *params);
 };
 
 struct target_abi_version {