summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2013-07-04 19:45:34 +0000
committeradrian <adrian@FreeBSD.org>2013-07-04 19:45:34 +0000
commit0f901ba9ecb8cf5588f903fba8a4ce50d533f890 (patch)
tree2485b3729c8b592f7c5bd8cd4d0292d7654e1e5f
parentef8e539e8daae6e8331dc786ccd04dd48e41ba7b (diff)
downloadFreeBSD-src-0f901ba9ecb8cf5588f903fba8a4ce50d533f890.zip
FreeBSD-src-0f901ba9ecb8cf5588f903fba8a4ce50d533f890.tar.gz
Enable the station-side power management flag.
It's not enabled by default in net80211 so this is a no-op unless if you enable it (ifconfig wlan0 powersave). Tested: * iwn0: <Intel WiFi Link 5100> mem 0xf4300000-0xf4301fff irq 17 at device 0.0 on pci3 TODO: * .. test on all the other NICs * See if I have to disable it during scan and such * Make it configurable live, rather than only after it's done its initial receive calibration.
-rw-r--r--sys/dev/iwn/if_iwn.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c
index e57b56e..cdf7d27 100644
--- a/sys/dev/iwn/if_iwn.c
+++ b/sys/dev/iwn/if_iwn.c
@@ -585,6 +585,7 @@ iwn_attach(device_t dev)
| IEEE80211_C_IBSS /* ibss/adhoc mode */
#endif
| IEEE80211_C_WME /* WME */
+ | IEEE80211_C_PMGT /* Station-side power mgmt */
;
/* Read MAC address, channels, etc from EEPROM. */
@@ -4585,6 +4586,8 @@ iwn_collect_noise(struct iwn_softc *sc,
{
struct iwn_ops *ops = &sc->ops;
struct iwn_calib_state *calib = &sc->calib;
+ struct ifnet *ifp = sc->sc_ifp;
+ struct ieee80211com *ic = ifp->if_l2com;
uint32_t val;
int i;
@@ -4623,12 +4626,9 @@ iwn_collect_noise(struct iwn_softc *sc,
(void)iwn_cmd(sc, IWN_CMD_RXON, &sc->rxon, sc->rxonsz, 1);
#endif
-#if 0
- /* XXX: not yet */
/* Enable power-saving mode if requested by user. */
- if (sc->sc_ic.ic_flags & IEEE80211_F_PMGTON)
+ if (ic->ic_flags & IEEE80211_F_PMGTON)
(void)iwn_set_pslevel(sc, 0, 3, 1);
-#endif
}
static int
OpenPOWER on IntegriCloud