]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Do not disconnect STA based on inactivity on driver failure
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 2 Jan 2012 19:27:06 +0000 (21:27 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 2 Jan 2012 19:27:06 +0000 (21:27 +0200)
Now that we can use driver_nl80211.c with non-mac80211 drivers that
implement SME/MLME internally, we may not get inactivity time from the
driver. If that is the case, we need to skip disconnection based on
maximum inactivity timeout. This fixes some unexpected disconnection
cases with ath6kl in AP mode.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

src/ap/sta_info.c

index 972a72367026c654c50d12e7397f42b38f01944e..0366e40fb093469945013cf99b2166df2721f8af 100644 (file)
@@ -284,8 +284,14 @@ void ap_handle_timer(void *eloop_ctx, void *timeout_ctx)
                if (inactive_sec == -1) {
                        wpa_msg(hapd->msg_ctx, MSG_DEBUG,
                                "Check inactivity: Could not "
-                               "get station info rom kernel driver for "
+                               "get station info from kernel driver for "
                                MACSTR, MAC2STR(sta->addr));
+                       /*
+                        * The driver may not support this functionality.
+                        * Anyway, try again after the next inactivity timeout,
+                        * but do not disconnect the station now.
+                        */
+                       next_time = hapd->conf->ap_max_inactivity;
                } else if (inactive_sec < hapd->conf->ap_max_inactivity &&
                           sta->flags & WLAN_STA_ASSOC) {
                        /* station activity detected; reset timeout state */