rt2x00: usb: fix reset resume
authorStanislaw Gruszka <sgruszka@redhat.com>
Tue, 16 Oct 2012 12:34:12 +0000 (14:34 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 24 Oct 2012 17:18:07 +0000 (13:18 -0400)
commit761ce8c41ed20ee3af77f2df527edc3f92e6f3bf
tree7107a24ca4bcf3c3f9a2ff4888f35ef40146a8ef
parent0c7e92075f6e61bfc90ec2664c034b04bc157315
rt2x00: usb: fix reset resume

Patch fixes warnings like below happened on resume:

WARNING: at net/mac80211/driver-ops.h:12 check_sdata_in_driver+0x32/0x34()

Problem is that in __ieee80211_susped() we remove sdata (i.e wlan0
interface) and then during resume we call usb_unbind_interface() ->
ieee80211_unregister_hw() with sdata removed.

Patch fixes problem by adding .reset_resume calback, hence we do not
unbind usb device on resume. This callback can be the same as normal
.resume callback, sice we do all needed initalization during interface
start, which is performed on resume [ ieee80211_resume() ->
ieee80211_reconfig() -> rt2x00mac_start() -> rt2x00lib_start ].

Resolves:
https://bugzilla.kernel.org/show_bug.cgi?id=48041

Reported-by: David Herrmann <dh.herrmann@googlemail.com>
Reported-and-tested-by: Stephen Boyd <bebarino@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2500usb.c
drivers/net/wireless/rt2x00/rt2800usb.c
drivers/net/wireless/rt2x00/rt73usb.c