From 0eda166b8febc5be459424636c363de2ec3d0a37 Mon Sep 17 00:00:00 2001 From: Sam Leffler Date: Sun, 16 Jul 2006 19:10:41 +0000 Subject: [PATCH] power save mode state changes should not require clocking the 802.11 state machine; use the reset method instead MFC after: 2 weeks --- sys/net80211/ieee80211_ioctl.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c index 412114823f4d..5d8893b56bf3 100644 --- a/sys/net80211/ieee80211_ioctl.c +++ b/sys/net80211/ieee80211_ioctl.c @@ -2321,6 +2321,13 @@ ieee80211_ioctl_set80211(struct ieee80211com *ic, u_long cmd, struct ieee80211re error = EINVAL; break; } + if (error == ENETRESET) { + /* + * Switching in+out of power save mode + * should not require a state change. + */ + error = IS_UP(ic) ? ic->ic_reset(ic->ic_ifp) : 0; + } break; case IEEE80211_IOC_POWERSAVESLEEP: if (ireq->i_val < 0)