From 66df67e635a11eed972fa07dee327b244b938521 Mon Sep 17 00:00:00 2001 From: stsp Date: Fri, 3 Dec 2021 12:40:15 +0000 Subject: [PATCH] Ignore ADDBA requests from our AP while we are roaming away from it. Noticed while testing iwm/iwx roaming patches, where my AP would request a new Rx BA session when we had already decided to roam away. There is no need to set up a new Rx BA session with our old AP which we would have to immediately tear down again anyway. --- sys/net80211/ieee80211_input.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index 888a39c43dd..bb6367fd1d5 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_input.c,v 1.239 2021/10/11 09:02:01 stsp Exp $ */ +/* $OpenBSD: ieee80211_input.c,v 1.240 2021/12/03 12:40:15 stsp Exp $ */ /*- * Copyright (c) 2001 Atsushi Onoe @@ -2822,6 +2822,10 @@ ieee80211_recv_addba_req(struct ieee80211com *ic, struct mbuf *m, /* The driver is still processing an ADDBA request for this tid. */ if (ba->ba_state == IEEE80211_BA_REQUESTED) return; + /* If we are in the process of roaming between APs, ignore. */ + if ((ic->ic_flags & IEEE80211_F_BGSCAN) && + (ic->ic_xflags & IEEE80211_F_TX_MGMT_ONLY)) + return; /* check if we already have a Block Ack agreement for this RA/TID */ if (ba->ba_state == IEEE80211_BA_AGREED) { /* XXX should we update the timeout value? */ -- 2.20.1