Search Linux Wireless

Re: [PATCH 1/9] rtlwifi: avoid race registering with mac80211

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/03/2012 12:21 PM, Joshua Roys wrote:

Do you think I should have moved the
set_bit(RTL_STATUS_INTERFACE_START, &rtlpriv->status);
lines also? Or is the idea of the patch just wrong?

I am still thinking about the problem, but a few things are clear. There can be no ieee80211 callbacks until the firmware has been loaded from the file. On bootup when user-space code is not running, there will be a delay, which is the reason we switched to asynchronous fw loading. Thus, the call to ieee80211_register_hw() must not be done until the firmware is available.

If your analysis that the calling of rtl_init_core() is out of order, then the following should fix it:


Index: wireless-testing-new/drivers/net/wireless/rtlwifi/pci.c
===================================================================
--- wireless-testing-new.orig/drivers/net/wireless/rtlwifi/pci.c
+++ wireless-testing-new/drivers/net/wireless/rtlwifi/pci.c
@@ -1853,14 +1853,6 @@ int __devinit rtl_pci_probe(struct pci_d
  	/*like read eeprom and so on */
  	rtlpriv->cfg->ops->read_eeprom_info(hw);

-	if (rtlpriv->cfg->ops->init_sw_vars(hw)) {
-		RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Can't init_sw_vars\n");
-		err = -ENODEV;
-		goto fail3;
-	}
-
-	rtlpriv->cfg->ops->init_sw_leds(hw);
-
  	/*aspm */
  	rtl_pci_init_aspm(hw);

@@ -1879,6 +1871,14 @@ int __devinit rtl_pci_probe(struct pci_d
  		goto fail3;
  	}

+	if (rtlpriv->cfg->ops->init_sw_vars(hw)) {
+		RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Can't init_sw_vars\n");
+		err = -ENODEV;
+		goto fail3;
+	}
+
+	rtlpriv->cfg->ops->init_sw_leds(hw);
+
  	err = sysfs_create_group(&pdev->dev.kobj, &rtl_attribute_group);
  	if (err) {
  		RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,

This one works on my system, and is being tested against the Bugzilla entry I noted earlier.

Larry


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux