]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Remove the STA entry on reassociation to clear STA PS state
authorJouni Malinen <j@w1.fi>
Sat, 26 Sep 2009 18:30:43 +0000 (21:30 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 26 Sep 2009 18:30:43 +0000 (21:30 +0300)
hostapd needs to remove the old STA entry if it exists when processing
reassociation back to the same AP. This removes the potentially PS
buffered frames and allows association parameters to be updated with
mac80211.

hostapd/ieee802_11.c

index 801048b22f24dcac920b59e53a23a9ce75f7a46f..394dfab747d672c94864f5b9a170b23a7cdeb3c6 100644 (file)
@@ -1679,6 +1679,13 @@ static void handle_assoc_cb(struct hostapd_data *hapd,
        sta->sa_query_timed_out = 0;
 #endif /* CONFIG_IEEE80211W */
 
+       /*
+        * Remove the STA entry in order to make sure the STA PS state gets
+        * cleared and configuration gets updated in case of reassociation back
+        * to the same AP.
+        */
+       hostapd_sta_remove(hapd, sta->addr);
+
        if (hostapd_sta_add(hapd->conf->iface, hapd, sta->addr, sta->aid,
                            sta->capability, sta->supported_rates,
                            sta->supported_rates_len, 0, sta->listen_interval,