]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: Fix incorrect num_sta_ps decrement in __sta_info_destroy
authorHelmut Schaa <helmut.schaa@googlemail.com>
Fri, 27 Jan 2012 10:02:51 +0000 (11:02 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 30 Jan 2012 20:48:18 +0000 (15:48 -0500)
commit042ffde8c627d3ca536286c829da52c65dce189d
tree18ff458004469014eaafe24618a9bdd45a11d780
parent87301f3f12e6a6a066efd1665710fab5be45a914
mac80211: Fix incorrect num_sta_ps decrement in __sta_info_destroy

When WLAN_STA_PS_DRIVER is set by ieee80211_sta_block_awake the
num_sta_ps counter is not incremented. Hence, we shouldn't decrement
it in __sta_info_destroy if only WLAN_STA_PS_DRIVER is set. This
could result in an incorrect num_sta_ps counter leading to strange side
effects with associated powersaving clients.

Fix this by only decrementing num_sta_ps when WLAN_STA_PS_STA was set
before.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/sta_info.c