Date: Tue, 23 Aug 2011 17:37:29 +0800 From: Kang Yin Su <cantona@cantona.net> To: freebsd-wireless@freebsd.org, Adrian Chadd <adrian@freebsd.org> Subject: Re: AR5416 beacon issue. Message-ID: <CAHjFwoC%2BH91gXOE1V7sYtH3fQHNuSPK5=W=y_5_hQAYUYPa7Rw@mail.gmail.com> In-Reply-To: <CAHjFwoCVwRNyJ_jCgthWFvi%2Bh%2B7xy6-bt=hDrhimMVHS7--dtQ@mail.gmail.com> References: <CAHjFwoCVwRNyJ_jCgthWFvi%2Bh%2B7xy6-bt=hDrhimMVHS7--dtQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] Hi all, OK, this patch fix the beacons sequence number from AR5416 chips. With this code added, both beacons send from AR5212 and AR5416 chips are fine, the sequence numbers are increase by 1. I have no idea why the AR5212 chips do not this require this. The AR5212 hardware probably ignore this field and added the seq no. by itself? Thanks, Yin On Tue, Aug 23, 2011 at 3:50 PM, Kang Yin Su <cantona@cantona.net> wrote: > Hi All, > > Using FreeBSD HEAD create a AP, found that the beacon frames have no > sequence number on AR5416 WiFi card, however there is sequence number on > AR5212 WiFi card. Attached is the WiFi capture on both card. > 00:1b:b1:59:ab:4d is AR5416 and 00:0b:6b:2d:f2:cc is AR5212. > > Thanks, > Yin > [-- Attachment #2 --] Index: sys/net80211/ieee80211_output.c =================================================================== --- sys/net80211/ieee80211_output.c (revision 225104) +++ sys/net80211/ieee80211_output.c (working copy) @@ -2792,6 +2792,8 @@ struct ieee80211com *ic = ni->ni_ic; int len_changed = 0; uint16_t capinfo; + struct ieee80211_frame *wh; + ieee80211_seq seqno; IEEE80211_LOCK(ic); /* @@ -2823,6 +2825,12 @@ return 1; /* just assume length changed */ } + wh = mtod(m, struct ieee80211_frame *); + seqno = ni->ni_txseqs[IEEE80211_NONQOS_TID]++; + *(uint16_t *)&wh->i_seq[0] = + htole16(seqno << IEEE80211_SEQ_SEQ_SHIFT); + M_SEQNO_SET(m, seqno); + /* XXX faster to recalculate entirely or just changes? */ capinfo = ieee80211_getcapinfo(vap, ni->ni_chan); *bo->bo_caps = htole16(capinfo);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHjFwoC%2BH91gXOE1V7sYtH3fQHNuSPK5=W=y_5_hQAYUYPa7Rw>
