From: Mohammed Shafi Shajakhan Date: Wed, 14 Dec 2011 14:16:08 +0000 (+0530) Subject: mac80211: Fix power save in change interface X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=1478acb392d8564d109c4add9de6a0c6258c4057;p=openwrt%2Fstaging%2Fblogic.git mac80211: Fix power save in change interface we found that power save is not getting enabled when we do change interface in this order STA->IBSS->STA. this is because ieee80211_setup_sdata clears type-dependent union Reported-by: Leela Kella Signed-off-by: Mohammed Shafi Shajakhan Signed-off-by: John W. Linville --- diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index e895ad560d55..a984f1f60ddb 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -2371,6 +2371,7 @@ void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata) (unsigned long) sdata); ifmgd->flags = 0; + ifmgd->powersave = sdata->wdev.ps; mutex_init(&ifmgd->mtx);