[PATCH v2 12/13] WMM AC: notify driver before sending DelTS

Ilan Peer ilan.peer at intel.com
Wed Oct 22 08:04:03 EDT 2014


From: Johannes Berg <johannes.berg at intel.com>

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 mgmt
frames.

Signed-off-by: Johannes Berg <johannes.berg at intel.com>
---
 wpa_supplicant/wmm_ac.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/wpa_supplicant/wmm_ac.c b/wpa_supplicant/wmm_ac.c
index 5e26940..e1034a9 100644
--- a/wpa_supplicant/wmm_ac.c
+++ b/wpa_supplicant/wmm_ac.c
@@ -538,7 +538,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;
 
@@ -554,11 +554,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;
 }
 
-- 
1.8.3.2



More information about the HostAP mailing list