rtlwifi: merge ips,lps spinlocks into one mutex
authorStanislaw Gruszka <sgruszka@redhat.com>
Mon, 12 Dec 2011 11:43:24 +0000 (12:43 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 13 Dec 2011 20:34:05 +0000 (15:34 -0500)
commit6539306b2c3ceafbc4094cf68c58094c282da053
tree5ebe30b3b6aca06fb801abfd4a9abedeae1332f6
parent41affd5286fb91176eb99b34ecd8eb522ba22369
rtlwifi: merge ips,lps spinlocks into one mutex

With previous patch "rtlwifi: use work for lps" we can now use mutex for
protecting ps mode changing critical sections. This fixes running system
with interrupts disabled for long time.

Merge ips_lock and lps_lock as they seems to protect the same data
structures (accessed in rtl_ps_set_rf_state() function).

Reported-by: Philipp Dreimann <philipp@dreimann.net>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Mike McCormack <mikem@ring3k.org>
Cc: Chaoming Li <chaoming_li@realsil.com.cn>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rtlwifi/base.c
drivers/net/wireless/rtlwifi/ps.c
drivers/net/wireless/rtlwifi/wifi.h