aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-10-03 08:16:36 -0600
committerLinux Build Service Account <lnxbuild@localhost>2016-10-03 08:16:36 -0600
commit4b90e06ec3e20955d327a9da9e806b2591967b00 (patch)
tree9bef97c6dd4a0624335dd0b76fc0d5a621a4a9b0
parent70ba2e0b9478f9db6dced17278c742a5185df7bc (diff)
parent0412416b554b96c347030ef70dc834f85ea4416c (diff)
downloadandroid_external_wpa_supplicant_8-4b90e06ec3e20955d327a9da9e806b2591967b00.tar.gz
android_external_wpa_supplicant_8-4b90e06ec3e20955d327a9da9e806b2591967b00.tar.bz2
android_external_wpa_supplicant_8-4b90e06ec3e20955d327a9da9e806b2591967b00.zip
Promotion of wlan-aosp-service.lnx.2.0-00008.
CRs Change ID Subject -------------------------------------------------------------------------------------------------------------- 1071516 Ic51c38c929f153a79cf0c1513576b9fc56eb5164 Define a QCA vendor command to validate encryption engin 1069689 I79b5332364a7bc942846c0e4c8bafc08c610d2fe mesh: Allow 160 MHz channel to be configured Change-Id: Iebedd2f7e07e8f52aab4092b96875e5020244c95 CRs-Fixed: 1069689, 1071516
-rw-r--r--src/common/qca-vendor.h42
-rw-r--r--wpa_supplicant/wpa_supplicant.c10
2 files changed, 52 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 */
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index a158501a..ef1c63fd 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -2034,6 +2034,16 @@ void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
if (chwidth == VHT_CHANWIDTH_80P80MHZ)
break;
}
+ } else if (ssid->max_oper_chwidth == VHT_CHANWIDTH_160MHZ) {
+ if (freq->freq == 5180) {
+ chwidth = VHT_CHANWIDTH_160MHZ;
+ vht_caps |= VHT_CAP_SUPP_CHAN_WIDTH_160MHZ;
+ seg0 = 50;
+ } else if (freq->freq == 5520) {
+ chwidth = VHT_CHANWIDTH_160MHZ;
+ vht_caps |= VHT_CAP_SUPP_CHAN_WIDTH_160MHZ;
+ seg0 = 114;
+ }
}
if (hostapd_set_freq_params(&vht_freq, mode->mode, freq->freq,