From 38a484b2d04f16c7e8ddda4513477ead874e6213 Mon Sep 17 00:00:00 2001 From: dyoung Date: Thu, 23 Oct 2003 06:30:32 +0000 Subject: [PATCH] In the input path, do not discard management frames belonging to a different BSS, because that keeps drivers like atw from detecting ad hoc beacons with the same SSID but different BSSID for the purpose of IBSS merges. This should be revisited: maybe drivers should check for beacons before handing packets up with ieee80211_input(). However, this restores the atw(4) to working like it did with the old 802.11 layer, and it *is* nice to re-use the 802.11 layer's packet-decode & -dispatch code (i.e., the ic_recv_mgmt callback). --- sys/net80211/ieee80211_input.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index 09c4b7023558..7d68bf190b8c 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -1,4 +1,4 @@ -/* $NetBSD: ieee80211_input.c,v 1.9 2003/10/18 05:06:43 itojun Exp $ */ +/* $NetBSD: ieee80211_input.c,v 1.10 2003/10/23 06:30:32 dyoung Exp $ */ /*- * Copyright (c) 2001 Atsushi Onoe * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting @@ -35,7 +35,7 @@ #ifdef __FreeBSD__ __FBSDID("$FreeBSD: src/sys/net80211/ieee80211_input.c,v 1.8 2003/08/19 22:17:03 sam Exp $"); #else -__KERNEL_RCSID(0, "$NetBSD: ieee80211_input.c,v 1.9 2003/10/18 05:06:43 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ieee80211_input.c,v 1.10 2003/10/23 06:30:32 dyoung Exp $"); #endif #include "opt_inet.h" @@ -157,8 +157,8 @@ ieee80211_input(struct ifnet *ifp, struct mbuf *m, struct ieee80211_node *ni, bssid = wh->i_addr1; if (!IEEE80211_ADDR_EQ(bssid, ic->ic_bss->ni_bssid) && !IEEE80211_ADDR_EQ(bssid, ifp->if_broadcastaddr) && - (wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) != - IEEE80211_FC0_TYPE_CTL) { + (wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == + IEEE80211_FC0_TYPE_DATA) { /* not interested in */ IEEE80211_DPRINTF2(("%s: other bss %s\n", __func__, ether_sprintf(wh->i_addr3)));