mac80211: fix auth/assoc timeout handling
In my commit 1672c0e319
("mac80211: start auth/assoc timeout on frame status")
I broke auth/assoc timeout handling: in case we wait
for the TX status, it now leaves the timeout field set
to 0, which is a valid time and can compare as being
before now ("jiffies"). Thus, if the work struct runs
for some other reason, the auth/assoc is treated as
having timed out.
Fix this by introducing a separate "timeout_started"
variable that tracks whether the timeout has started
and is checked before timing out.
Additionally, for proper TX status handling the change
requires that the skb->dev pointer is set up for all
the frames, so set it up for all frames in mac80211.
Reported-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
Tested-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
@@ -343,6 +343,7 @@ struct ieee80211_mgd_auth_data {
|
||||
u8 key[WLAN_KEY_LEN_WEP104];
|
||||
u8 key_len, key_idx;
|
||||
bool done;
|
||||
bool timeout_started;
|
||||
|
||||
u16 sae_trans, sae_status;
|
||||
size_t data_len;
|
||||
@@ -364,6 +365,7 @@ struct ieee80211_mgd_assoc_data {
|
||||
bool wmm, uapsd;
|
||||
bool have_beacon, need_beacon;
|
||||
bool synced;
|
||||
bool timeout_started;
|
||||
|
||||
u8 ap_ht_param;
|
||||
|
||||
|
Reference in New Issue
Block a user