aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/pci.c
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2012-05-04 09:27:43 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-05-14 13:51:24 -0400
commit574e02abaf816b582685805f0c1150ca9f1f18ee (patch)
tree51d3bd9e4ddb589ee4fafdde00b5d1a6c090b3dc /drivers/net/wireless/rtlwifi/pci.c
parented90542b0ce5415050c6fbfca324bccaafa69f2f (diff)
rtlwifi: fix for race condition when firmware is cached
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> Cc: Stable <stable@vger.kernel.org> [3.3] Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/pci.c')
-rw-r--r--drivers/net/wireless/rtlwifi/pci.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c
index cc15fdb36060..67f9430ee197 100644
--- a/drivers/net/wireless/rtlwifi/pci.c
+++ b/drivers/net/wireless/rtlwifi/pci.c
@@ -1851,14 +1851,6 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev,
1851 /*like read eeprom and so on */ 1851 /*like read eeprom and so on */
1852 rtlpriv->cfg->ops->read_eeprom_info(hw); 1852 rtlpriv->cfg->ops->read_eeprom_info(hw);
1853 1853
1854 if (rtlpriv->cfg->ops->init_sw_vars(hw)) {
1855 RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Can't init_sw_vars\n");
1856 err = -ENODEV;
1857 goto fail3;
1858 }
1859
1860 rtlpriv->cfg->ops->init_sw_leds(hw);
1861
1862 /*aspm */ 1854 /*aspm */
1863 rtl_pci_init_aspm(hw); 1855 rtl_pci_init_aspm(hw);
1864 1856
@@ -1877,6 +1869,14 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev,
1877 goto fail3; 1869 goto fail3;
1878 } 1870 }
1879 1871
1872 if (rtlpriv->cfg->ops->init_sw_vars(hw)) {
1873 RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Can't init_sw_vars\n");
1874 err = -ENODEV;
1875 goto fail3;
1876 }
1877
1878 rtlpriv->cfg->ops->init_sw_leds(hw);
1879
1880 err = sysfs_create_group(&pdev->dev.kobj, &rtl_attribute_group); 1880 err = sysfs_create_group(&pdev->dev.kobj, &rtl_attribute_group);
1881 if (err) { 1881 if (err) {
1882 RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, 1882 RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,