From owner-p4-projects@FreeBSD.ORG Fri Oct 17 12:31:36 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9F26E16A4C0; Fri, 17 Oct 2003 12:31:36 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 79ED316A4B3 for ; Fri, 17 Oct 2003 12:31:36 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D807943FD7 for ; Fri, 17 Oct 2003 12:31:35 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h9HJVZXJ028048 for ; Fri, 17 Oct 2003 12:31:35 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h9HJVZYS028045 for perforce@freebsd.org; Fri, 17 Oct 2003 12:31:35 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Fri, 17 Oct 2003 12:31:35 -0700 (PDT) Message-Id: <200310171931.h9HJVZYS028045@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 39851 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Oct 2003 19:31:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=39851 Change 39851 by sam@sam_ebb on 2003/10/17 12:31:32 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 o add missing \n in debug msg Affected files ... .. //depot/projects/netperf/sys/net80211/ieee80211_output.c#9 edit .. //depot/projects/netperf/sys/net80211/ieee80211_var.h#8 edit Differences ... ==== //depot/projects/netperf/sys/net80211/ieee80211_output.c#9 (text+ko) ==== @@ -165,14 +165,23 @@ 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)) { + if (!IEEE80211_IS_MULTICAST(eh.ether_dhost) && + (ic->ic_caps & IEEE80211_C_RCVMGT)) { IEEE80211_DPRINTF(("%s: no node for dst %s, " - "discard frame", __func__, + "discard frame\n", __func__, ether_sprintf(eh.ether_dhost))); ic->ic_stats.is_tx_nonode++; goto bad; ==== //depot/projects/netperf/sys/net80211/ieee80211_var.h#8 (text+ko) ==== @@ -219,7 +219,7 @@ #define IEEE80211_F_SHSLOT 0x00020000 /* CONF: short slot time */ #define IEEE80211_F_SHPREAMBLE 0x00040000 /* CONF: short preamble */ -/* ic_capabilities */ +/* ic_caps */ #define IEEE80211_C_WEP 0x00000001 /* CAPABILITY: WEP available */ #define IEEE80211_C_IBSS 0x00000002 /* CAPABILITY: IBSS available */ #define IEEE80211_C_PMGT 0x00000004 /* CAPABILITY: Power mgmt */ @@ -230,6 +230,7 @@ #define IEEE80211_C_SHSLOT 0x00000080 /* CAPABILITY: short slottime */ #define IEEE80211_C_SHPREAMBLE 0x00000100 /* CAPABILITY: short preamble */ #define IEEE80211_C_MONITOR 0x00000200 /* CAPABILITY: monitor mode */ +#define IEEE80211_C_RCVMGT 0x00000400 /* CAPABILITY: rcv mgt frames */ /* flags for ieee80211_fix_rate() */ #define IEEE80211_F_DOSORT 0x00000001 /* sort rate list */