]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WMM AC: Notify driver before sending DelTS
authorJohannes Berg <johannes.berg@intel.com>
Wed, 22 Oct 2014 12:04:03 +0000 (08:04 -0400)
committerJouni Malinen <j@w1.fi>
Sun, 16 Nov 2014 19:40:57 +0000 (21:40 +0200)
Switch the stop and sending DelTS to avoid sending data packets
for the session after the DelTS, which is otherwise possible.

This also helps the mac80211 implementation as it requires stopping the
traffic flow before sending the DelTS as it may modify the AC parameters
for the affected queue, and that may in turn affect management frames.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
wpa_supplicant/wmm_ac.c

index b26b8aa1146f7db4846a2aa6acda0ec64db266ef..7d39c20feebc1db0eb8ee53e0805c4d80570ff8d 100644 (file)
@@ -556,7 +556,7 @@ void wmm_ac_notify_disassoc(struct wpa_supplicant *wpa_s)
 
 int wpas_wmm_ac_delts(struct wpa_supplicant *wpa_s, u8 tsid)
 {
-       struct wmm_tspec_element *tspec;
+       struct wmm_tspec_element tspec;
        int ac;
        enum ts_dir_idx dir;
 
@@ -572,11 +572,12 @@ int wpas_wmm_ac_delts(struct wpa_supplicant *wpa_s, u8 tsid)
                return -1;
        }
 
-       tspec = wpa_s->tspecs[ac][dir];
-       wmm_ac_send_delts(wpa_s, tspec, wpa_s->bssid);
+       tspec = *wpa_s->tspecs[ac][dir];
 
        wmm_ac_del_ts_idx(wpa_s, ac, dir);
 
+       wmm_ac_send_delts(wpa_s, &tspec, wpa_s->bssid);
+
        return 0;
 }