aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-09-26 18:30:43 (GMT)
committerJouni Malinen <j@w1.fi>2009-11-22 18:58:15 (GMT)
commit862623d97af0912df21eb1f0b37636ca29636ddb (patch)
tree075e2c067ea5e070dfc8451d557343162424cb75
parent81f555f43930dda26c89b0a3f9f2d5c432357eb6 (diff)
downloadhostap-06-862623d97af0912df21eb1f0b37636ca29636ddb.zip
hostap-06-862623d97af0912df21eb1f0b37636ca29636ddb.tar.gz
hostap-06-862623d97af0912df21eb1f0b37636ca29636ddb.tar.bz2
Remove the STA entry on reassociation to clear STA PS state
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. (cherry picked from commit c140a22858bb63222cd4f682e0b596b313ef0de9)
-rw-r--r--hostapd/ieee802_11.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/hostapd/ieee802_11.c b/hostapd/ieee802_11.c
index dfda956..12767a5 100644
--- a/hostapd/ieee802_11.c
+++ b/hostapd/ieee802_11.c
@@ -1656,6 +1656,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,