]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
cfg80211: Fix power save state after interface type change
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>
Mon, 31 Jan 2011 13:52:58 +0000 (15:52 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 3 Feb 2011 21:44:42 +0000 (16:44 -0500)
commitbf6a0579f60ae5225280c82cc52b51db1255e7fb
tree7e0d508ed3ae1751ee465ebb80e0aec82a0d5a07
parent73b30dfe4f756315b8cc431fca3ff340090c0ae4
cfg80211: Fix power save state after interface type change

Currently cfg80211 only configures the PSM state to the driver upon creation
of a new virtual interface, but not after interface type change. The mac80211
on the other hand reinitializes its sdata structure every time the interface
type is changed, losing the PSM configuration.

Hence, if the interface type is changed to, say, ad-hoc and then back to
managed, "iw wlan0 get power_save" will claim that PSM is enabled, when in
fact on mac80211 level it is not.

Fix this in cfg80211 by configuring the PSM state to the driver each time
the interface is brought up instead of just when the interface is created.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/wireless/core.c