diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2015-09-27 16:52:36 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2015-09-27 16:52:36 +0000 |
commit | c392cdfbcc8c4566f558dfb757278d8de06746fb (patch) | |
tree | 9f40da8444687263b69b46a92fc9d4a9b1740248 /sys/dev | |
parent | 043f7c0fc4e92e729b7f4d5fc7961047915405dc (diff) |
Align the way iwm(4) adds the MAC context with how it's done in Linux iwlwifi.
Noted by Adrian Chadd (FreeBSD).
ok kettenis@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/if_iwm.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index c59f35fde67..af0429b8a06 100644 --- a/sys/dev/pci/if_iwm.c +++ b/sys/dev/pci/if_iwm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwm.c,v 1.49 2015/09/26 10:52:09 stsp Exp $ */ +/* $OpenBSD: if_iwm.c,v 1.50 2015/09/27 16:52:35 stsp Exp $ */ /* * Copyright (c) 2014 genua mbh <info@genua.de> @@ -4634,7 +4634,8 @@ iwm_mvm_ack_rates(struct iwm_softc *sc, struct iwm_node *in, uint8_t ofdm = 0; int i; - if (IEEE80211_IS_CHAN_2GHZ(ni->ni_chan)) { + if (ni->ni_chan == IEEE80211_CHAN_ANYC || + IEEE80211_IS_CHAN_2GHZ(ni->ni_chan)) { for (i = 0; i <= IWM_LAST_CCK_RATE; i++) { cck |= (1 << i); if (lowest_present_cck > i) @@ -4998,11 +4999,6 @@ iwm_auth(struct iwm_softc *sc) if (error) return error; - if ((error = iwm_mvm_mac_ctxt_add(sc, in)) != 0) { - DPRINTF(("%s: failed to add MAC\n", DEVNAME(sc))); - return error; - } - if ((error = iwm_mvm_phy_ctxt_changed(sc, &sc->sc_phyctxt[0], in->in_ni.ni_chan, 1, 1)) != 0) { DPRINTF(("%s: failed add phy ctxt\n", DEVNAME(sc))); @@ -5455,6 +5451,7 @@ int iwm_init_hw(struct iwm_softc *sc) { struct ieee80211com *ic = &sc->sc_ic; + struct iwm_node *in = (struct iwm_node *)ic->ic_bss; int error, i, qid; if ((error = iwm_preinit(sc)) != 0) @@ -5518,6 +5515,12 @@ iwm_init_hw(struct iwm_softc *sc) iwm_enable_txq(sc, qid, qid); } + /* Add the MAC context. */ + if ((error = iwm_mvm_mac_ctxt_add(sc, in)) != 0) { + printf("%s: failed to add MAC\n", DEVNAME(sc)); + goto error; + } + return 0; error: |