summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_output.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2003-10-17 21:54:59 +0000
committersam <sam@FreeBSD.org>2003-10-17 21:54:59 +0000
commit98b46f244c7d66e3e96243dd274f2ba9529e017b (patch)
tree0ed84e9f41800406f01e57e6b425f5d96a00652b /sys/net80211/ieee80211_output.c
parent49356e4d0e1a781d28164a8f6e3e0fc4c249c86b (diff)
downloadFreeBSD-src-98b46f244c7d66e3e96243dd274f2ba9529e017b.zip
FreeBSD-src-98b46f244c7d66e3e96243dd274f2ba9529e017b.tar.gz
o add capability to indicate if device receives all management frames
o use recv mgmt capability to decide if outbound frames should be discarded if no node table entry is present
Diffstat (limited to 'sys/net80211/ieee80211_output.c')
-rw-r--r--sys/net80211/ieee80211_output.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c
index 0b0735f..c2c7faa 100644
--- a/sys/net80211/ieee80211_output.c
+++ b/sys/net80211/ieee80211_output.c
@@ -165,13 +165,24 @@ ieee80211_encap(struct ifnet *ifp, struct mbuf *m, struct ieee80211_node **pni)
ni = ieee80211_find_node(ic, eh.ether_dhost);
if (ni == NULL) {
/*
- * When not in station mode the
- * destination address should always be
- * in the node table unless this is a
- * multicast/broadcast frame.
+ * When not in station mode the destination
+ * address should always be in the node table
+ * if the device sends management frames to us;
+ * unless this is a multicast/broadcast frame.
+ * For devices that don't send management frames
+ * to the host we have to cheat; use the bss
+ * node instead; the card will/should clobber
+ * the bssid address as necessary.
+ *
+ * XXX this handles AHDEMO because all devices
+ * that support it don't send mgmt frames;
+ * but it might be better to test explicitly
*/
- if (!IEEE80211_IS_MULTICAST(eh.ether_dhost)) {
- /* ic->ic_stats.st_tx_nonode++; XXX statistic */
+ if (!IEEE80211_IS_MULTICAST(eh.ether_dhost) &&
+ (ic->ic_caps & IEEE80211_C_RCVMGT)) {
+ IEEE80211_DPRINTF(("%s: no node for dst %s, "
+ "discard frame\n", __func__,
+ ether_sprintf(eh.ether_dhost)));
goto bad;
}
ni = ic->ic_bss;
OpenPOWER on IntegriCloud