From owner-freebsd-wireless@FreeBSD.ORG Wed May 4 02:26:17 2011 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CD67106566B; Wed, 4 May 2011 02:26:17 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8F4DB8FC17; Wed, 4 May 2011 02:26:16 +0000 (UTC) Received: by vxc34 with SMTP id 34so934127vxc.13 for ; Tue, 03 May 2011 19:26:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=l1ElypN4UVXqEbOCEGRgjRPit5eBeuNjK45qJVILIW8=; b=g5f6zjm4gWdkJyIwbHCx4P4L8za6NbPOvJx3W+TBVE7sHUtpPg3rwg0L82VQEg8FWN k9l6eosXrH+ovA4dX9tbdPP0oyVvCdjg7U/T3YhHjm/dPZLXV5VIxm0RNSDHttNNW8G3 XKycF6eMzDm3H8BIgabzPjtxgIxpU/glzKQ2g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=ctFAxGTbAhoDqsRJ41XUxu2SoJWOM2SYqz4hduE41P8FaKKIBddQNBNE3eWzhMg0TX YSy5eMVedCji0Pq86Sa8qtek351SLzy0lqBRaN4g8XDRHjLBQgWJ7EBpfkiHNvuutgeH IIlRF0MhdKVHC6Ct/FPRAnxk8lqOr38Q9jZMk= MIME-Version: 1.0 Received: by 10.52.183.136 with SMTP id em8mr656979vdc.262.1304475975528; Tue, 03 May 2011 19:26:15 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.52.157.202 with HTTP; Tue, 3 May 2011 19:26:15 -0700 (PDT) In-Reply-To: <201105040223.p442Nx1r026636@svn.freebsd.org> References: <201105040223.p442Nx1r026636@svn.freebsd.org> Date: Wed, 4 May 2011 10:26:15 +0800 X-Google-Sender-Auth: HnTPwcFqwYEXKnfHNOSAGZhKlHY Message-ID: From: Adrian Chadd To: freebsd-wireless@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-current , freebsd-mobile@freebsd.org Subject: Fwd: svn commit: r221418 - head/sys/net80211 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 02:26:17 -0000 This has the potential to subtly break things, so I'd appreciate it if users of wireless devices would please test this out and let me know if it breaks anything. Thanks, Adrian ---------- Forwarded message ---------- From: Adrian Chadd Date: 4 May 2011 10:23 Subject: svn commit: r221418 - head/sys/net80211 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Author: adrian Date: Wed May =A04 02:23:59 2011 New Revision: 221418 URL: http://svn.freebsd.org/changeset/base/221418 Log: =A0Fix some corner cases in the net80211 sequence number retransmission =A0handling. =A0The current sequence number code does a few things incorrectly: =A0* It didn't try eliminating duplications from HT nodes. I guess it's ass= umed =A0 =A0that out of order / retransmission handling would be handled by the = AMPDU RX =A0 =A0routines. If a HT node isn't doing AMPDU RX, then retransmissions ne= ed to =A0 =A0be eliminated. Since most of my debugging is based on this (as AMPDU= TX =A0 =A0software packet aggregation isn't yet handled), handle this corner c= ase. =A0* When a sequence number of 4095 was received, any subsequent sequence n= umber =A0 =A0is going to be (by definition) less than 4095. So if the following s= equence =A0 =A0number (0) doesn't initially occur and the retransmit is received, i= t's =A0 =A0incorrectly eliminated by the IEEE80211_FC1_RETRY && SEQ_LEQ() check= . =A0 =A0Try to handle this better. =A0This almost completely eliminates out of order TCP statistics showing up= during =A0iperf testing for the 11a, 11g and non-aggregate 11n AMPDU RX case. The = only =A0other packet loss conditions leading to this are due to baseband resets = or =A0heavy interference. Modified: =A0head/sys/net80211/ieee80211_adhoc.c =A0head/sys/net80211/ieee80211_hostap.c =A0head/sys/net80211/ieee80211_input.h =A0head/sys/net80211/ieee80211_mesh.c =A0head/sys/net80211/ieee80211_sta.c =A0head/sys/net80211/ieee80211_wds.c Modified: head/sys/net80211/ieee80211_adhoc.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/sys/net80211/ieee80211_adhoc.c Wed May =A04 01:39:44 2011 =A0(r221417) +++ head/sys/net80211/ieee80211_adhoc.c Wed May =A04 02:23:59 2011 =A0(r221418) @@ -285,7 +285,6 @@ doprint(struct ieee80211vap *vap, int su =A0static int =A0adhoc_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf) =A0{ -#define =A0 =A0 =A0 =A0SEQ_LEQ(a,b) =A0 =A0((int)((a)-(b)) <=3D 0) =A0#define =A0 =A0 =A0 =A0HAS_SEQ(type) =A0 ((type & 0x4) =3D=3D 0) =A0 =A0 =A0 =A0struct ieee80211vap *vap =3D ni->ni_vap; =A0 =A0 =A0 =A0struct ieee80211com *ic =3D ni->ni_ic; @@ -412,9 +411,7 @@ adhoc_input(struct ieee80211_node *ni, s =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0TID_TO_WME_AC(tid) >= =3D WME_AC_VI) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ic->ic_wme.w= me_hipri_traffic++; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0rxseq =3D le16toh(*(uint16_t= *)wh->i_seq); - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if ((ni->ni_flags & IEEE80211= _NODE_HT) =3D=3D 0 && - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (wh->i_fc[1] & IEEE80= 211_FC1_RETRY) && - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 SEQ_LEQ(rxseq, ni->ni= _rxseqs[tid])) { + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (! ieee80211_check_rxseq(n= i, wh)) { =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* duplicate= , discard */ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0IEEE80211_DI= SCARD_MAC(vap, IEEE80211_MSG_INPUT, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0bssi= d, "duplicate", @@ -660,7 +657,6 @@ out: =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0m_freem(m); =A0 =A0 =A0 =A0} =A0 =A0 =A0 =A0return type; -#undef SEQ_LEQ =A0} =A0static int Modified: head/sys/net80211/ieee80211_hostap.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/sys/net80211/ieee80211_hostap.c =A0 =A0 =A0 =A0Wed May =A04 01:39:= 44 2011 =A0 =A0 =A0 =A0(r221417) +++ head/sys/net80211/ieee80211_hostap.c =A0 =A0 =A0 =A0Wed May =A04 02:23:= 59 2011 =A0 =A0 =A0 =A0(r221418) @@ -472,7 +472,6 @@ doprint(struct ieee80211vap *vap, int su =A0static int =A0hostap_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf= ) =A0{ -#define =A0 =A0 =A0 =A0SEQ_LEQ(a,b) =A0 =A0((int)((a)-(b)) <=3D 0) =A0#define =A0 =A0 =A0 =A0HAS_SEQ(type) =A0 ((type & 0x4) =3D=3D 0) =A0 =A0 =A0 =A0struct ieee80211vap *vap =3D ni->ni_vap; =A0 =A0 =A0 =A0struct ieee80211com *ic =3D ni->ni_ic; @@ -572,9 +571,7 @@ hostap_input(struct ieee80211_node *ni, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0TID_TO_WME_AC(tid) >= =3D WME_AC_VI) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ic->ic_wme.w= me_hipri_traffic++; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0rxseq =3D le16toh(*(uint16_t= *)wh->i_seq); - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if ((ni->ni_flags & IEEE80211= _NODE_HT) =3D=3D 0 && - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (wh->i_fc[1] & IEEE80= 211_FC1_RETRY) && - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 SEQ_LEQ(rxseq, ni->ni= _rxseqs[tid])) { + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (! ieee80211_check_rxseq(n= i, wh)) { =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* duplicate= , discard */ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0IEEE80211_DI= SCARD_MAC(vap, IEEE80211_MSG_INPUT, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0bssi= d, "duplicate", @@ -914,7 +911,6 @@ out: =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0m_freem(m); =A0 =A0 =A0 =A0} =A0 =A0 =A0 =A0return type; -#undef SEQ_LEQ =A0} =A0static void Modified: head/sys/net80211/ieee80211_input.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/sys/net80211/ieee80211_input.h Wed May =A04 01:39:44 2011 =A0(r221417) +++ head/sys/net80211/ieee80211_input.h Wed May =A04 02:23:59 2011 =A0(r221418) @@ -142,6 +142,104 @@ ishtinfooui(const uint8_t *frm) =A0 =A0 =A0 =A0return frm[1] > 3 && LE_READ_4(frm+2) =3D=3D ((BCM_OUI_HTINF= O<<24)|BCM_OUI); =A0} +#include =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* For le16toh() */ + +/* + * Check the current frame sequence number against the current TID + * state and return whether it's in sequence or should be dropped. + * + * Since out of order packet and duplicate packet eliminations should + * be done by the AMPDU RX code, this routine blindly accepts all + * frames from a HT station w/ a TID that is currently doing AMPDU-RX. + * HT stations without WME or where the TID is not doing AMPDU-RX + * are checked like non-HT stations. + * + * The routine only eliminates packets whose sequence/fragment + * match or are less than the last seen sequence/fragment number + * AND are retransmits It doesn't try to eliminate out of order packets. + * + * Since all frames after sequence number 4095 will be less than 4095 + * (as the seqnum wraps), handle that special case so packets aren't + * incorrectly dropped - ie, if the next packet is sequence number 0 + * but a retransmit since the initial packet didn't make it. + */ +static __inline int +ieee80211_check_rxseq(struct ieee80211_node *ni, struct ieee80211_frame *w= h) +{ +#define =A0 =A0 =A0 =A0SEQ_LEQ(a,b) =A0 =A0((int)((a)-(b)) <=3D 0) +#define =A0 =A0 =A0 =A0SEQ_EQ(a,b) =A0 =A0 ((int)((a)-(b)) =3D=3D 0) +#define =A0 =A0 =A0 =A0HAS_SEQ(type) =A0 ((type & 0x4) =3D=3D 0) +#define =A0 =A0 =A0 =A0SEQNO(a) =A0 =A0 =A0 =A0((a) >> IEEE80211_SEQ_SEQ_S= HIFT) +#define =A0 =A0 =A0 =A0FRAGNO(a) =A0 =A0 =A0 ((a) & IEEE80211_SEQ_FRAG_MAS= K) + =A0 =A0 =A0 uint16_t rxseq; + =A0 =A0 =A0 uint8_t type; + =A0 =A0 =A0 uint8_t tid; + =A0 =A0 =A0 struct ieee80211_rx_ampdu *rap; + + =A0 =A0 =A0 rxseq =3D le16toh(*(uint16_t *)wh->i_seq); + =A0 =A0 =A0 type =3D wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; + + =A0 =A0 =A0 /* Types with no sequence number are always treated valid */ + =A0 =A0 =A0 if (! HAS_SEQ(type)) + =A0 =A0 =A0 =A0 =A0 =A0 =A0 return 1; + + =A0 =A0 =A0 tid =3D ieee80211_gettid(wh); + + =A0 =A0 =A0 /* + =A0 =A0 =A0 =A0* Only do the HT AMPDU check for WME stations; non-WME HT = stations + =A0 =A0 =A0 =A0* shouldn't exist outside of debugging. We should at least + =A0 =A0 =A0 =A0* handle that. + =A0 =A0 =A0 =A0*/ + =A0 =A0 =A0 if (tid < WME_NUM_TID) { + =A0 =A0 =A0 =A0 =A0 =A0 =A0 rap =3D &ni->ni_rx_ampdu[tid]; + =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* HT nodes currently doing RX AMPDU are alwa= ys valid */ + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if ((ni->ni_flags & IEEE80211_NODE_HT) && + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (rap->rxa_flags & IEEE80211_AGGR_RUNN= ING)) + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 return 1; + =A0 =A0 =A0 } + + =A0 =A0 =A0 /* + =A0 =A0 =A0 =A0* Otherwise, retries for packets below or equal to the las= t + =A0 =A0 =A0 =A0* seen sequence number should be dropped. + =A0 =A0 =A0 =A0*/ + + =A0 =A0 =A0 /* + =A0 =A0 =A0 =A0* Treat frame seqnum 4095 as special due to boundary + =A0 =A0 =A0 =A0* wrapping conditions. + =A0 =A0 =A0 =A0*/ + =A0 =A0 =A0 if (SEQNO(ni->ni_rxseqs[tid]) =3D=3D 4095) { + =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0* Drop retransmits on seqnum 4095/current = fragment for itself. + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*/ + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (SEQ_EQ(rxseq, ni->ni_rxseqs[tid]) && + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (wh->i_fc[1] & IEEE80211_FC1_RETRY)) + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 return 0; + =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0* Treat any subsequent frame as fine if th= e last seen frame + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0* is 4095 and it's not a retransmit for th= e same sequence + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0* number. However, this doesn't capture in= correctly ordered + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0* fragments w/ sequence number 4095. It sh= ouldn't be seen + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0* in practice, but see the comment above f= or further info. + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*/ + =A0 =A0 =A0 =A0 =A0 =A0 =A0 return 1; + =A0 =A0 =A0 } + + =A0 =A0 =A0 /* + =A0 =A0 =A0 =A0* At this point we assume that retransmitted seq/frag numb= ers below + =A0 =A0 =A0 =A0* the current can simply be eliminated. + =A0 =A0 =A0 =A0*/ + =A0 =A0 =A0 if ((wh->i_fc[1] & IEEE80211_FC1_RETRY) && + =A0 =A0 =A0 =A0 =A0 SEQ_LEQ(rxseq, ni->ni_rxseqs[tid])) + =A0 =A0 =A0 =A0 =A0 =A0 =A0 return 0; + + =A0 =A0 =A0 return 1; +#undef SEQ_LEQ +#undef SEQ_EQ +#undef HAS_SEQ +#undef SEQNO +#undef FRAGNO +} + =A0void =A0 ieee80211_deliver_data(struct ieee80211vap *, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0struct ieee80211_node *, struct mbuf *); =A0struct mbuf *ieee80211_defrag(struct ieee80211_node *, Modified: head/sys/net80211/ieee80211_mesh.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/sys/net80211/ieee80211_mesh.c =A0Wed May =A04 01:39:44 2011 =A0(r221417) +++ head/sys/net80211/ieee80211_mesh.c =A0Wed May =A04 02:23:59 2011 =A0(r221418) @@ -1040,7 +1040,6 @@ mesh_isucastforme(struct ieee80211vap *v =A0static int =A0mesh_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf) =A0{ -#define =A0 =A0 =A0 =A0SEQ_LEQ(a,b) =A0 =A0((int)((a)-(b)) <=3D 0) =A0#define =A0 =A0 =A0 =A0HAS_SEQ(type) =A0 ((type & 0x4) =3D=3D 0) =A0 =A0 =A0 =A0struct ieee80211vap *vap =3D ni->ni_vap; =A0 =A0 =A0 =A0struct ieee80211com *ic =3D ni->ni_ic; @@ -1094,9 +1093,7 @@ mesh_input(struct ieee80211_node *ni, st =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0TID_TO_WME_AC(tid) >= =3D WME_AC_VI) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ic->ic_wme.w= me_hipri_traffic++; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0rxseq =3D le16toh(*(uint16_t= *)wh->i_seq); - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if ((ni->ni_flags & IEEE80211= _NODE_HT) =3D=3D 0 && - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (wh->i_fc[1] & IEEE80= 211_FC1_RETRY) && - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 SEQ_LEQ(rxseq, ni->ni= _rxseqs[tid])) { + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (! ieee80211_check_rxseq(n= i, wh)) { =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* duplicate= , discard */ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0IEEE80211_DI= SCARD_MAC(vap, IEEE80211_MSG_INPUT, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0wh->= i_addr1, "duplicate", Modified: head/sys/net80211/ieee80211_sta.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/sys/net80211/ieee80211_sta.c =A0 Wed May =A04 01:39:44 2011 =A0(r221417) +++ head/sys/net80211/ieee80211_sta.c =A0 Wed May =A04 02:23:59 2011 =A0(r221418) @@ -512,7 +512,6 @@ doprint(struct ieee80211vap *vap, int su =A0static int =A0sta_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf) =A0{ -#define =A0 =A0 =A0 =A0SEQ_LEQ(a,b) =A0 =A0((int)((a)-(b)) <=3D 0) =A0#define =A0 =A0 =A0 =A0HAS_SEQ(type) =A0 ((type & 0x4) =3D=3D 0) =A0 =A0 =A0 =A0struct ieee80211vap *vap =3D ni->ni_vap; =A0 =A0 =A0 =A0struct ieee80211com *ic =3D ni->ni_ic; @@ -591,9 +590,7 @@ sta_input(struct ieee80211_node *ni, str =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0TID_TO_WME_AC(tid) >= =3D WME_AC_VI) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ic->ic_wme.w= me_hipri_traffic++; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0rxseq =3D le16toh(*(uint16_t= *)wh->i_seq); - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if ((ni->ni_flags & IEEE80211= _NODE_HT) =3D=3D 0 && - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (wh->i_fc[1] & IEEE80= 211_FC1_RETRY) && - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 SEQ_LEQ(rxseq, ni->ni= _rxseqs[tid])) { + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (! ieee80211_check_rxseq(n= i, wh)) { =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* duplicate= , discard */ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0IEEE80211_DI= SCARD_MAC(vap, IEEE80211_MSG_INPUT, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0bssi= d, "duplicate", @@ -910,7 +907,6 @@ out: =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0m_freem(m); =A0 =A0 =A0 =A0} =A0 =A0 =A0 =A0return type; -#undef SEQ_LEQ =A0} =A0static void Modified: head/sys/net80211/ieee80211_wds.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/sys/net80211/ieee80211_wds.c =A0 Wed May =A04 01:39:44 2011 =A0(r221417) +++ head/sys/net80211/ieee80211_wds.c =A0 Wed May =A04 02:23:59 2011 =A0(r221418) @@ -406,7 +406,6 @@ wds_newstate(struct ieee80211vap *vap, e =A0static int =A0wds_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf) =A0{ -#define =A0 =A0 =A0 =A0SEQ_LEQ(a,b) =A0 =A0((int)((a)-(b)) <=3D 0) =A0#define =A0 =A0 =A0 =A0HAS_SEQ(type) =A0 ((type & 0x4) =3D=3D 0) =A0 =A0 =A0 =A0struct ieee80211vap *vap =3D ni->ni_vap; =A0 =A0 =A0 =A0struct ieee80211com *ic =3D ni->ni_ic; @@ -495,9 +494,7 @@ wds_input(struct ieee80211_node *ni, str =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0TID_TO_WME_AC(tid) >=3D WME_AC_VI) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ic->ic_wme.wme_hipri_traffic= ++; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0rxseq =3D le16toh(*(uint16_t *)wh->i_seq); - =A0 =A0 =A0 =A0 =A0 =A0 =A0 if ((ni->ni_flags & IEEE80211_NODE_HT) =3D=3D= 0 && - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (wh->i_fc[1] & IEEE80211_FC1_RETRY) &= & - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 SEQ_LEQ(rxseq, ni->ni_rxseqs[tid])) { + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (! ieee80211_check_rxseq(ni, wh)) { =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* duplicate, discard */ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0IEEE80211_DISCARD_MAC(vap, I= EEE80211_MSG_INPUT, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0wh->i_addr1, "duplic= ate", @@ -741,7 +738,6 @@ out: =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0m_freem(m); =A0 =A0 =A0 =A0} =A0 =A0 =A0 =A0return type; -#undef SEQ_LEQ =A0} =A0static void