|
@@ -83,6 +83,9 @@
|
|
|
#define CSR_MIN_GLOBAL_STAT_QUERY_PERIOD 500 /* ms */
|
|
|
#define CSR_MIN_GLOBAL_STAT_QUERY_PERIOD_IN_BMPS 2000 /* ms */
|
|
|
|
|
|
+#define CSR_SINGLE_PMK_OUI "\x00\x40\x96\x03"
|
|
|
+#define CSR_SINGLE_PMK_OUI_SIZE 4
|
|
|
+
|
|
|
/* Flag to send/do not send disassoc frame over the air */
|
|
|
#define CSR_DONT_SEND_DISASSOC_OVER_THE_AIR 1
|
|
|
#define RSSI_HACK_BMPS (-40)
|
|
@@ -21152,6 +21155,83 @@ QDF_STATUS csr_fast_reassoc(mac_handle_t mac_handle,
|
|
|
|
|
|
return status;
|
|
|
}
|
|
|
+#if defined(WLAN_SAE_SINGLE_PMK) && defined(WLAN_FEATURE_ROAM_OFFLOAD)
|
|
|
+/**
|
|
|
+ * csr_is_sae_single_pmk_vsie_ap() - check if the Roamed AP supports sae
|
|
|
+ * roaming using single pmk connection
|
|
|
+ * with same pmk or not
|
|
|
+ * @bss_des: bss descriptor
|
|
|
+ *
|
|
|
+ * Return: True if same pmk IE is present
|
|
|
+ */
|
|
|
+static bool csr_is_sae_single_pmk_vsie_ap(struct bss_description *bss_des)
|
|
|
+{
|
|
|
+ uint16_t ie_len;
|
|
|
+ const uint8_t *vendor_ie;
|
|
|
+
|
|
|
+ if (!bss_des) {
|
|
|
+ sme_debug("Invalid bss description");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ ie_len = csr_get_ielen_from_bss_description(bss_des);
|
|
|
+
|
|
|
+ vendor_ie =
|
|
|
+ wlan_get_vendor_ie_ptr_from_oui(CSR_SINGLE_PMK_OUI,
|
|
|
+ CSR_SINGLE_PMK_OUI_SIZE,
|
|
|
+ (uint8_t *)bss_des->ieFields,
|
|
|
+ ie_len);
|
|
|
+
|
|
|
+ if (!vendor_ie)
|
|
|
+ return false;
|
|
|
+
|
|
|
+ sme_debug("AP supports sae single pmk feature");
|
|
|
+
|
|
|
+ return true;
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * csr_check_and_set_sae_single_pmk_cap() - check if the Roamed AP support
|
|
|
+ * roaming using single pmk
|
|
|
+ * with same pmk or not
|
|
|
+ * @mac_ctx: mac context
|
|
|
+ * @session: Session
|
|
|
+ * @vdev_id: session id
|
|
|
+ *
|
|
|
+ * Return: True if same pmk IE is present
|
|
|
+ */
|
|
|
+static void
|
|
|
+csr_check_and_set_sae_single_pmk_cap(struct mac_context *mac_ctx,
|
|
|
+ struct csr_roam_session *session,
|
|
|
+ uint8_t vdev_id)
|
|
|
+{
|
|
|
+ bool val;
|
|
|
+ struct wlan_objmgr_vdev *vdev;
|
|
|
+ uint32_t keymgmt;
|
|
|
+
|
|
|
+ vdev = wlan_objmgr_get_vdev_by_id_from_psoc(mac_ctx->psoc, vdev_id,
|
|
|
+ WLAN_LEGACY_SME_ID);
|
|
|
+ if (!vdev) {
|
|
|
+ mlme_err("get vdev failed");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ keymgmt = wlan_crypto_get_param(vdev, WLAN_CRYPTO_PARAM_KEY_MGMT);
|
|
|
+
|
|
|
+ if (keymgmt & (1 << WLAN_CRYPTO_KEY_MGMT_SAE)) {
|
|
|
+ val = csr_is_sae_single_pmk_vsie_ap(session->pConnectBssDesc);
|
|
|
+ wlan_mlme_set_sae_single_pmk_bss_cap(mac_ctx->psoc, vdev_id,
|
|
|
+ val);
|
|
|
+ }
|
|
|
+ wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
|
|
|
+}
|
|
|
+#else
|
|
|
+static inline void
|
|
|
+csr_check_and_set_sae_single_pmk_cap(struct mac_context *mac_ctx,
|
|
|
+ struct csr_roam_session *session,
|
|
|
+ uint8_t vdev_id)
|
|
|
+{
|
|
|
+}
|
|
|
+#endif
|
|
|
|
|
|
static QDF_STATUS csr_process_roam_sync_callback(struct mac_context *mac_ctx,
|
|
|
struct roam_offload_synch_ind *roam_synch_data,
|
|
@@ -21293,6 +21373,8 @@ static QDF_STATUS csr_process_roam_sync_callback(struct mac_context *mac_ctx,
|
|
|
mac_ctx->psoc);
|
|
|
mac_ctx->sme.set_connection_info_cb(false);
|
|
|
session->roam_synch_in_progress = false;
|
|
|
+ csr_check_and_set_sae_single_pmk_cap(mac_ctx, session,
|
|
|
+ session_id);
|
|
|
|
|
|
if (WLAN_REG_IS_5GHZ_CH_FREQ(bss_desc->chan_freq)) {
|
|
|
session->disable_hi_rssi = true;
|