From owner-svn-src-head@FreeBSD.ORG Sat Oct 25 23:28:04 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB5B2106567A; Sat, 25 Oct 2008 23:28:04 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9AA768FC14; Sat, 25 Oct 2008 23:28:04 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9PNS400060206; Sat, 25 Oct 2008 23:28:04 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9PNS4n4060205; Sat, 25 Oct 2008 23:28:04 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810252328.m9PNS4n4060205@svn.freebsd.org> From: Sam Leffler Date: Sat, 25 Oct 2008 23:28:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184271 - head/sys/net80211 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Oct 2008 23:28:04 -0000 Author: sam Date: Sat Oct 25 23:28:04 2008 New Revision: 184271 URL: http://svn.freebsd.org/changeset/base/184271 Log: fix associd check for adhoc mode Reviewed by: jhay Modified: head/sys/net80211/ieee80211_output.c Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Sat Oct 25 23:26:57 2008 (r184270) +++ head/sys/net80211/ieee80211_output.c Sat Oct 25 23:28:04 2008 (r184271) @@ -203,24 +203,19 @@ ieee80211_start(struct ifnet *ifp) continue; } /* XXX AUTH'd */ - if (ni->ni_associd == 0) { - /* - * Destination is not associated; must special - * case DWDS where we point iv_bss at the node - * for the associated station. - * XXX adhoc mode? - */ - if (ni != vap->iv_bss || IS_DWDS(vap)) { - IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_OUTPUT, - eh->ether_dhost, NULL, - "sta not associated (type 0x%04x)", - htons(eh->ether_type)); - vap->iv_stats.is_tx_notassoc++; - ifp->if_oerrors++; - m_freem(m); - ieee80211_free_node(ni); - continue; - } + /* XXX mark vap to identify if associd is required */ + if (ni->ni_associd == 0 && + (vap->iv_opmode == IEEE80211_M_STA || + vap->iv_opmode == IEEE80211_M_HOSTAP || IS_DWDS(vap))) { + IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_OUTPUT, + eh->ether_dhost, NULL, + "sta not associated (type 0x%04x)", + htons(eh->ether_type)); + vap->iv_stats.is_tx_notassoc++; + ifp->if_oerrors++; + m_freem(m); + ieee80211_free_node(ni); + continue; } if ((ni->ni_flags & IEEE80211_NODE_PWR_MGT) && (m->m_flags & M_PWR_SAV) == 0) {