]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Always process pending QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH data
authorVeerendranath Jakkam <quic_vjakkam@quicinc.com>
Mon, 25 Jul 2022 11:20:12 +0000 (16:50 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 28 Jul 2022 09:49:45 +0000 (12:49 +0300)
Commit 74818ca63f7e ("Process
QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH after NL80211_CMD_ROAM")
added workaround to hold the pending
QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH event data for up to 100 ms
in case NL80211_CMD_ROAM is not received first. The 100 ms wait period
was sufficient for most of the cases but it's observed that some times
kernel is taking more than 100 ms to process and send NL80211_CMD_ROAM
to userspace.

If NL80211_CMD_ROAM takes more than 100 ms
QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH event data getting ignored
though wpa_supplicant has it. To avoid this remove timeout for
QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH event data since driver
always indicates NL80211_CMD_ROAM along with
QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH.

In addition, clear the pending event data when marking the interface
disconnected since the roaming information is supposed to be used only
when reassociating without a disconnection.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
src/drivers/driver_nl80211.c
src/drivers/driver_nl80211.h
src/drivers/driver_nl80211_event.c

index 460072023d8698043ae87c28de7a73c44ed7a8b6..b52a4800e03c08f174abbb7abde5d55ac1d459e8 100644 (file)
@@ -270,6 +270,10 @@ void nl80211_mark_disconnected(struct wpa_driver_nl80211_data *drv)
        drv->associated = 0;
        os_memset(drv->bssid, 0, ETH_ALEN);
        drv->first_bss->freq = 0;
+#ifdef CONFIG_DRIVER_NL80211_QCA
+       os_free(drv->pending_roam_data);
+       drv->pending_roam_data = NULL;
+#endif /* CONFIG_DRIVER_NL80211_QCA */
 }
 
 
index 80d4564721ade3c1db8c529bd38c97f8b89780fe..18da94a7609fc4de27bdb264de93cb209d2c1516 100644 (file)
@@ -232,7 +232,6 @@ struct wpa_driver_nl80211_data {
        bool roam_indication_done;
        u8 *pending_roam_data;
        size_t pending_roam_data_len;
-       struct os_reltime pending_roam_ind_time;
 #endif /* CONFIG_DRIVER_NL80211_QCA */
 };
 
index 70a10655d583b9f6f3e09e127ff59a8de27eedb8..896d188f36b047bcabc3f528b6bbc15167f429a7 100644 (file)
@@ -2120,7 +2120,6 @@ qca_nl80211_key_mgmt_auth_handler(struct wpa_driver_nl80211_data *drv,
        if (!drv->roam_indication_done) {
                wpa_printf(MSG_DEBUG,
                           "nl80211: Pending roam indication, delay processing roam+auth vendor event");
-               os_get_reltime(&drv->pending_roam_ind_time);
 
                os_free(drv->pending_roam_data);
                drv->pending_roam_data = os_memdup(data, len);
@@ -2987,17 +2986,10 @@ static void do_process_drv_event(struct i802_bss *bss, int cmd,
        if (cmd == NL80211_CMD_ROAM &&
            (drv->capa.flags & WPA_DRIVER_FLAGS_KEY_MGMT_OFFLOAD)) {
                if (drv->pending_roam_data) {
-                       struct os_reltime now, age;
-
-                       os_get_reltime(&now);
-                       os_reltime_sub(&now, &drv->pending_roam_ind_time, &age);
-                       if (age.sec == 0 && age.usec < 100000) {
-                               wpa_printf(MSG_DEBUG,
-                                          "nl80211: Process pending roam+auth vendor event");
-                               qca_nl80211_key_mgmt_auth(
-                                       drv, drv->pending_roam_data,
-                                       drv->pending_roam_data_len);
-                       }
+                       wpa_printf(MSG_DEBUG,
+                                  "nl80211: Process pending roam+auth vendor event");
+                       qca_nl80211_key_mgmt_auth(drv, drv->pending_roam_data,
+                                                 drv->pending_roam_data_len);
                        os_free(drv->pending_roam_data);
                        drv->pending_roam_data = NULL;
                        return;