Delay STA entry removal until Deauth/Disassoc TX status in AP mode
authorJouni Malinen <j@w1.fi>
Sun, 28 Aug 2011 20:07:02 +0000 (23:07 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 28 Aug 2011 20:07:02 +0000 (23:07 +0300)
commit4dc03726de072b127ba4f219cdf50df8f9b7c9be
tree0b3881f8fc2ccdc2b4e4426ac784190fe30e8cea
parent49a191a1421483c2a6c5094a9e60aa0c787703d4
Delay STA entry removal until Deauth/Disassoc TX status in AP mode

This allows the driver to use PS buffering of Deauthentication and
Disassociation frames when the STA is in power save sleep. The STA
entry (and PTK) will be removed from the kernel only after the
Deauth/Disassoc has been transmitted (e.g., when the STA wakes up).
A hardcoded two second timeout is used to limit the length of this
window should the driver fail to deliver the frame (e.g., the STA
is out of range and does not wake up). The kernel STA entry is
marked unauthorized during the wait to avoid accepting Data
frames from the STA that we have decided to disconnect.

This behavior is available only with drivers that provide TX status
events for Deauth/Disassoc frames (nl80211 at this point). Other
drivers continue to use the previous behavior where the STA entry
is removed immediately.
src/ap/ieee802_11.c
src/ap/sta_info.c
src/ap/sta_info.h
src/drivers/driver.h
src/drivers/driver_nl80211.c