rtlwifi: fix for race condition when firmware is cached
authorLarry Finger <Larry.Finger@lwfinger.net>
Fri, 4 May 2012 13:27:43 +0000 (08:27 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Jun 2012 07:15:54 +0000 (15:15 +0800)
commit0adf705f805bbb05a776c72f7cdff03d85218513
tree9310a52f7663f5031c1fff0673c795919c6d631a
parent4f4e3f10fb3427bfafd2e3439124000f2874c457
rtlwifi: fix for race condition when firmware is cached

commit 574e02abaf816b582685805f0c1150ca9f1f18ee upstream.

In commit b0302ab, the rtlwifi family of drivers was converted to use
asynchronous firmware loading. Unfortumately, the implementation was
racy, and the ieee80211 routines could be started before rtl_init_core()
was called to setup the data.

This patch fixes the bug noted in https://bugzilla.kernel.org/show_bug.cgi?id=43187.

Reported-by: Joshua Roys <Joshua.Roys@gtri.gatech.edu>
Tested-by: Neptune Ning <frostyplanet@gmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/rtlwifi/pci.c
drivers/net/wireless/rtlwifi/usb.c