aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/iwm/if_iwm.c
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2017-05-12 06:21:03 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2017-05-12 06:21:03 +0000
commitf1bd8a14fa2d275173a38cf3f442428d3e752824 (patch)
tree07081c3a848c3cb330caf014aaa3aace8800b400 /sys/dev/iwm/if_iwm.c
parentf7be9693b280447fd8b1073b10cbbb2c0fb714a8 (diff)
downloadsrc-f1bd8a14fa2d275173a38cf3f442428d3e752824.tar.gz
src-f1bd8a14fa2d275173a38cf3f442428d3e752824.zip
[iwm] Already call iwm_mvm_power_update_mac() during SCAN<->AUTH paths.
* Otherwise we would never update powersaving settings until we complete an association, after the first authentication attempt. * This corresponds to what Linux iwlwifi seems to do. Obtained from: dragonflybsd.git aa128dc02a17c2e616232ef0fa997121e969c995
Notes
Notes: svn path=/head/; revision=318225
Diffstat (limited to 'sys/dev/iwm/if_iwm.c')
-rw-r--r--sys/dev/iwm/if_iwm.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/sys/dev/iwm/if_iwm.c b/sys/dev/iwm/if_iwm.c
index 268ccf836d51..a6f8e5b5b826 100644
--- a/sys/dev/iwm/if_iwm.c
+++ b/sys/dev/iwm/if_iwm.c
@@ -4029,12 +4029,6 @@ iwm_auth(struct ieee80211vap *vap, struct iwm_softc *sc)
"%s: failed to add MAC\n", __func__);
goto out;
}
- if ((error = iwm_mvm_power_update_mac(sc)) != 0) {
- device_printf(sc->sc_dev,
- "%s: failed to update power management\n",
- __func__);
- goto out;
- }
}
if ((error = iwm_mvm_phy_ctxt_changed(sc, &sc->sc_phyctxt[0],
@@ -4050,6 +4044,12 @@ iwm_auth(struct ieee80211vap *vap, struct iwm_softc *sc)
"%s: binding update cmd\n", __func__);
goto out;
}
+ if ((error = iwm_mvm_power_update_mac(sc)) != 0) {
+ device_printf(sc->sc_dev,
+ "%s: failed to update power management\n",
+ __func__);
+ goto out;
+ }
if ((error = iwm_mvm_add_sta(sc, in)) != 0) {
device_printf(sc->sc_dev,
"%s: failed to add sta\n", __func__);
@@ -4408,6 +4408,12 @@ iwm_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
__func__, error);
}
ivp->phy_ctxt = NULL;
+ error = iwm_mvm_power_update_mac(sc);
+ if (error != 0) {
+ device_printf(sc->sc_dev,
+ "%s: failed to update power management\n",
+ __func__);
+ }
IWM_UNLOCK(sc);
IEEE80211_LOCK(ic);
return myerr;