diff options
author | Srinivas Dasari <dasaris@qti.qualcomm.com> | 2016-09-27 11:03:10 +0530 |
---|---|---|
committer | Srinivas Dasari <dasaris@codeaurora.org> | 2016-09-29 11:00:14 +0530 |
commit | fc3e35cd8eca4beb66a87f18254f584acf11098e (patch) | |
tree | 6a1fae20cb3da7d7be08331e338c2e482489d629 | |
parent | be72c3e4a10c2c44b0a2c9eb20dee525ca67aa2b (diff) | |
download | android_external_wpa_supplicant_8-fc3e35cd8eca4beb66a87f18254f584acf11098e.tar.gz android_external_wpa_supplicant_8-fc3e35cd8eca4beb66a87f18254f584acf11098e.tar.bz2 android_external_wpa_supplicant_8-fc3e35cd8eca4beb66a87f18254f584acf11098e.zip |
Define a QCA vendor command to validate encryption engine
This command carries 802.11 header and payload along with key (TK) and
PN for encryption/decryption purpose. Firmware/driver encrypts/decrypts
the given data and sends to userspace as a response to the command. User
space component can validate the data received from the driver to unit
test the hardware's encryption engine.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Git-commit: 0d7eba5417cf0caa42d72ec3acbfe9b068d06e66
Git-repo: git://w1.fi/srv/git/hostap.git
CRs-Fixed: 1071516
Change-Id: Ic51c38c929f153a79cf0c1513576b9fc56eb5164
-rw-r--r-- | src/common/qca-vendor.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/common/qca-vendor.h b/src/common/qca-vendor.h index 453890b9..4158c5dc 100644 --- a/src/common/qca-vendor.h +++ b/src/common/qca-vendor.h @@ -179,6 +179,9 @@ enum qca_radiotap_vendor_ids { * Measurement data is reported in QCA_WLAN_VENDOR_ATTR_AOA_MEAS_RESULT. * The antenna array(s) used in the measurement are reported in * QCA_WLAN_VENDOR_ATTR_LOC_ANTENNA_ARRAY_MASK. + * + * @QCA_NL80211_VENDOR_SUBCMD_ENCRYPTION_TEST: Encrypt/decrypt the given + * data as per the given parameters. */ enum qca_nl80211_vendor_subcmds { QCA_NL80211_VENDOR_SUBCMD_UNSPEC = 0, @@ -277,6 +280,7 @@ enum qca_nl80211_vendor_subcmds { QCA_NL80211_VENDOR_SUBCMD_AOA_MEAS = 134, QCA_NL80211_VENDOR_SUBCMD_AOA_ABORT_MEAS = 135, QCA_NL80211_VENDOR_SUBCMD_AOA_MEAS_RESULT = 136, + QCA_NL80211_VENDOR_SUBCMD_ENCRYPTION_TEST = 137, }; @@ -1255,4 +1259,42 @@ enum qca_wlan_vendor_attr_aoa_type { QCA_WLAN_VENDOR_ATTR_AOA_TYPE_MAX }; +/** + * enum qca_wlan_vendor_attr_encryption_test - Attributes to + * validate encryption engine + * + * @QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_NEEDS_DECRYPTION: Flag attribute. + * This will be included if the request is for decryption; if not included, + * the request is treated as a request for encryption by default. + * @QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_CIPHER: Unsigned 32-bit value + * indicating the key cipher suite. Takes same values as + * NL80211_ATTR_KEY_CIPHER. + * @QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_KEYID: Unsigned 8-bit value + * Key Id to be used for encryption + * @QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_TK: Array of 8-bit values. + * Key (TK) to be used for encryption/decryption + * @QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_PN: Array of 8-bit values. + * Packet number to be specified for encryption/decryption + * 6 bytes for TKIP/CCMP/GCMP. + * @QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_DATA: Array of 8-bit values + * representing the 802.11 packet (header + payload + FCS) that + * needs to be encrypted/decrypted. + * Encrypted/decrypted response from the driver will also be sent + * to userspace with the same attribute. + */ +enum qca_wlan_vendor_attr_encryption_test { + QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_INVALID = 0, + QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_NEEDS_DECRYPTION, + QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_CIPHER, + QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_KEYID, + QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_TK, + QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_PN, + QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_DATA, + + /* keep last */ + QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_AFTER_LAST, + QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_MAX = + QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_AFTER_LAST - 1 +}; + #endif /* QCA_VENDOR_H */ |