summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2016-02-09 13:48:32 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2016-02-09 13:48:32 +0000
commitfbddbef7d43c74238b38217eb1e543ce4f4c48b3 (patch)
tree6772591b1e70b87beb6b692903aa0d63ee52e471 /sys
parentc142b696f675fa1c475c9811e27ad0ea539c172f (diff)
Log frames which fall outside the BlockAack window in dmesg if the
interface debug flag is set (enabled with: ifconfig iwn0 debug). Shows the frame's sequence number and the current BA window. I'm adding this for diagnosis, just in case it will be needed to make future decisions about tuning the heuristic which works around network stalls caused by such frames.
Diffstat (limited to 'sys')
-rw-r--r--sys/net80211/ieee80211_input.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c
index e46c5135fef..5dc48198686 100644
--- a/sys/net80211/ieee80211_input.c
+++ b/sys/net80211/ieee80211_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_input.c,v 1.161 2016/02/08 01:00:47 stsp Exp $ */
+/* $OpenBSD: ieee80211_input.c,v 1.162 2016/02/09 13:48:31 stsp Exp $ */
/*-
* Copyright (c) 2001 Atsushi Onoe
@@ -728,6 +728,13 @@ ieee80211_input_ba(struct ieee80211com *ic, struct mbuf *m,
* APs, which emit "sequence" numbers such as 1888, 1889, 2501,
* 1890, 1891, ... all for the same TID.
*/
+#ifdef DIAGNOSTIC
+ if ((ifp->if_flags & IFF_DEBUG) &&
+ ((sn - ba->ba_winend) & 0xfff) > 1)
+ printf("%s: received frame with bad sequence number "
+ "%d, expecting %d:%d\n", __func__,
+ sn, ba->ba_winstart, ba->ba_winend);
+#endif
if (((sn - ba->ba_winend) & 0xfff) > IEEE80211_BA_MAX_WINSZ) {
if (ba->ba_winmiss < IEEE80211_BA_MAX_WINMISS) {
if (ba->ba_missedsn == sn - 1)