mac80211: Fix power save in change interface
authorMohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Wed, 14 Dec 2011 14:16:08 +0000 (19:46 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 15 Dec 2011 19:46:35 +0000 (14:46 -0500)
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 <leela@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/mlme.c

index e895ad560d55c69e6cc8215fca2f067f86254f08..a984f1f60ddbc7ab0370ce3665415260f2a7ef2e 100644 (file)
@@ -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);