summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstsp <stsp@openbsd.org>2021-03-17 15:34:21 +0000
committerstsp <stsp@openbsd.org>2021-03-17 15:34:21 +0000
commit636ec488178eed9182b9460b924adc82e17d178c (patch)
treeecff6c720ea236d2bc93b8d0a53178c0adaee3b3
parentSplit off init_ifaces from update_iface. init_ifaces discovers the (diff)
downloadwireguard-openbsd-636ec488178eed9182b9460b924adc82e17d178c.tar.xz
wireguard-openbsd-636ec488178eed9182b9460b924adc82e17d178c.zip
Make iwn(4) send block ack request frames with the firmware node
which represents the AP, rather than the firmware's broadcast node. Fixes a problem where firmware would generate bogus block ack requests with a wrong starting sequence number, shifting the receiver's block ack window out of sync with that of the firmware. Traffic would stall until enough frames were sent to wrap sequence numbers of the block ack window. ok chris@ kmos@
-rw-r--r--sys/dev/pci/if_iwn.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/pci/if_iwn.c b/sys/dev/pci/if_iwn.c
index afeb963ef62..db09809c2a1 100644
--- a/sys/dev/pci/if_iwn.c
+++ b/sys/dev/pci/if_iwn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwn.c,v 1.245 2021/03/12 16:27:27 stsp Exp $ */
+/* $OpenBSD: if_iwn.c,v 1.246 2021/03/17 15:34:21 stsp Exp $ */
/*-
* Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -3505,7 +3505,10 @@ iwn_tx(struct iwn_softc *sc, struct mbuf *m, struct ieee80211_node *ni)
}
}
- if (IEEE80211_IS_MULTICAST(wh->i_addr1) ||
+ if (type == IEEE80211_FC0_TYPE_CTL &&
+ subtype == IEEE80211_FC0_SUBTYPE_BAR)
+ tx->id = wn->id;
+ else if (IEEE80211_IS_MULTICAST(wh->i_addr1) ||
type != IEEE80211_FC0_TYPE_DATA)
tx->id = sc->broadcast_id;
else