summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_iwn.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci/if_iwn.c')
-rw-r--r--sys/dev/pci/if_iwn.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/dev/pci/if_iwn.c b/sys/dev/pci/if_iwn.c
index be7825b8591..ed749947b79 100644
--- a/sys/dev/pci/if_iwn.c
+++ b/sys/dev/pci/if_iwn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwn.c,v 1.178 2016/12/10 13:22:07 stsp Exp $ */
+/* $OpenBSD: if_iwn.c,v 1.179 2016/12/18 10:37:42 stsp Exp $ */
/*-
* Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -2130,14 +2130,17 @@ iwn_rx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc,
if (sc->sc_drvbpf != NULL) {
struct mbuf mb;
struct iwn_rx_radiotap_header *tap = &sc->sc_rxtap;
+ uint16_t chan_flags;
tap->wr_flags = 0;
if (stat->flags & htole16(IWN_STAT_FLAG_SHPREAMBLE))
tap->wr_flags |= IEEE80211_RADIOTAP_F_SHORTPRE;
tap->wr_chan_freq =
htole16(ic->ic_channels[stat->chan].ic_freq);
- tap->wr_chan_flags =
- htole16(ic->ic_channels[stat->chan].ic_flags);
+ chan_flags = ic->ic_channels[stat->chan].ic_flags;
+ if (ic->ic_curmode != IEEE80211_MODE_11N)
+ chan_flags &= ~IEEE80211_CHAN_HT;
+ tap->wr_chan_flags = htole16(chan_flags);
tap->wr_dbm_antsignal = (int8_t)rssi;
tap->wr_dbm_antnoise = (int8_t)sc->noise;
tap->wr_tsft = stat->tstamp;
@@ -2908,10 +2911,14 @@ iwn_tx(struct iwn_softc *sc, struct mbuf *m, struct ieee80211_node *ni)
if (sc->sc_drvbpf != NULL) {
struct mbuf mb;
struct iwn_tx_radiotap_header *tap = &sc->sc_txtap;
+ uint16_t chan_flags;
tap->wt_flags = 0;
tap->wt_chan_freq = htole16(ni->ni_chan->ic_freq);
- tap->wt_chan_flags = htole16(ni->ni_chan->ic_flags);
+ chan_flags = ni->ni_chan->ic_flags;
+ if (ic->ic_curmode != IEEE80211_MODE_11N)
+ chan_flags &= ~IEEE80211_CHAN_HT;
+ tap->wt_chan_flags = htole16(chan_flags);
if ((ni->ni_flags & IEEE80211_NODE_HT) &&
!IEEE80211_IS_MULTICAST(wh->i_addr1) &&
type == IEEE80211_FC0_TYPE_DATA) {