Date: Mon, 2 Jun 2008 01:31:15 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 142727 for review Message-ID: <200806020131.m521VFOU048043@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=142727 Change 142727 by sam@sam_ebb on 2008/06/02 01:31:13 IFC Affected files ... .. //depot/projects/vap/sys/dev/ath/if_ath.c#82 integrate Differences ... ==== //depot/projects/vap/sys/dev/ath/if_ath.c#82 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.186 2008/05/12 00:15:27 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.190 2008/05/29 00:14:35 sam Exp $"); /* * Driver for the Atheros Wireless LAN controller. @@ -3860,7 +3860,10 @@ ath_rx_tap(struct ifnet *ifp, struct mbuf *m, const struct ath_rx_status *rs, u_int64_t tsf, int16_t nf) { -#define CHANNEL_HT (CHANNEL_HT20|CHANNEL_HT40PLUS|CHANNEL_HT40MINUS) +#define CHAN_HT htole32(CHANNEL_HT20|CHANNEL_HT40PLUS|CHANNEL_HT40MINUS) +#define CHAN_HT20 htole32(IEEE80211_CHAN_HT20) +#define CHAN_HT40U htole32(IEEE80211_CHAN_HT40U) +#define CHAN_HT40D htole32(IEEE80211_CHAN_HT40D) struct ath_softc *sc = ifp->if_softc; uint8_t rxrate; @@ -3877,23 +3880,16 @@ sc->sc_rx_th.wr_rate = sc->sc_hwmap[rxrate].ieeerate; sc->sc_rx_th.wr_flags = sc->sc_hwmap[rxrate].rxflags; #if HAL_ABI_VERSION >= 0x07050400 - if (sc->sc_curchan.channelFlags & CHANNEL_HT) { - /* - * For HT operation we must specify the channel - * attributes for each packet since they vary. - * We deduce this by from HT40 bit in the rx - * status and the MCS/legacy rate bit. - */ - sc->sc_rx_th.wr_chan_flags &= ~IEEE80211_CHAN_HT; - if (sc->sc_rx_th.wr_rate & 0x80) { /* HT rate */ - /* XXX 40U/40D */ - sc->sc_rx_th.wr_chan_flags |= - (rs->rs_flags & HAL_RX_2040) ? - IEEE80211_CHAN_HT40U : IEEE80211_CHAN_HT20; - if ((rs->rs_flags & HAL_RX_GI) == 0) - sc->sc_rx_th.wr_flags |= - IEEE80211_RADIOTAP_F_SHORTGI; - } + sc->sc_rx_th.wr_chan_flags &= ~CHAN_HT; + if (sc->sc_rx_th.wr_rate & 0x80) { /* HT rate */ + if ((rs->rs_flags & HAL_RX_2040) == 0) + sc->sc_rx_th.wr_chan_flags |= CHAN_HT20; + else if (sc->sc_curchan.channelFlags & CHANNEL_HT40PLUS) + sc->sc_rx_th.wr_chan_flags |= CHAN_HT40U; + else + sc->sc_rx_th.wr_chan_flags |= CHAN_HT40D; + if ((rs->rs_flags & HAL_RX_GI) == 0) + sc->sc_rx_th.wr_flags |= IEEE80211_RADIOTAP_F_SHORTGI; } #endif sc->sc_rx_th.wr_tsf = htole64(ath_extend_tsf(rs->rs_tstamp, tsf)); @@ -3907,7 +3903,10 @@ bpf_mtap2(ifp->if_bpf, &sc->sc_rx_th, sc->sc_rx_th_len, m); return 1; -#undef CHANNEL_HT +#undef CHAN_HT20 +#undef CHAN_HT40U +#undef CHAN_HT40D +#undef CHAN_HT } static void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200806020131.m521VFOU048043>