]> git.baikalelectronics.ru Git - kernel.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)
commit5a34e01631cc35012de14675d6be8556938ba7e4
tree7e0d508ed3ae1751ee465ebb80e0aec82a0d5a07
parentf3fd6835399caf20cdfa3d80f33f1f2ffdd0ddf0
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