]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Android: Delay QCA roam+auth event until NL80211_CMD_ROAM is received
authorSwarn Singh <quic_swarnkum@quicinc.com>
Wed, 28 Sep 2022 18:10:52 +0000 (23:40 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 13 Oct 2022 15:34:26 +0000 (18:34 +0300)
Information from both NL80211_CMD_ROAM and
QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH events is required for
processing the roam events correctly, especially to get the newly
connected BSS details. Indicate the roam event to private libraries only
after NL80211_CMD_ROAM and QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH
events are received.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
src/drivers/driver_nl80211_event.c

index 996a892924167aad1b448a6cebe580051d330236..4f6de9891875906257b1dca667e0a6d113091357 100644 (file)
@@ -2295,6 +2295,14 @@ static void qca_nl80211_key_mgmt_auth(struct wpa_driver_nl80211_data *drv,
                           tb[QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_PMK],
                           tb[QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_PMKID],
                           tb[QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_MLO_LINKS]);
+
+#ifdef ANDROID
+#ifdef ANDROID_LIB_EVENT
+       wpa_driver_nl80211_driver_event(
+               drv, OUI_QCA, QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH,
+               data, len);
+#endif /* ANDROID_LIB_EVENT */
+#endif /* ANDROID */
 }
 
 
@@ -2804,7 +2812,13 @@ static void nl80211_vendor_event(struct wpa_driver_nl80211_data *drv,
 
 #ifdef ANDROID
 #ifdef ANDROID_LIB_EVENT
-       wpa_driver_nl80211_driver_event(drv, vendor_id, subcmd, data, len);
+       /* Postpone QCA roam+auth event indication to the point when both that
+        * and the NL80211_CMD_ROAM event have been received (see calls to
+        * qca_nl80211_key_mgmt_auth() and drv->pending_roam_data). */
+       if (!(vendor_id == OUI_QCA &&
+             subcmd == QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH))
+               wpa_driver_nl80211_driver_event(drv, vendor_id, subcmd, data,
+                                               len);
 #endif /* ANDROID_LIB_EVENT */
 #endif /* ANDROID */