2012.11.13. 18:21 keltezéssel, Daniel Golle írta:
> On 13/11/12 19:12, Сергей Василюгин wrote:
>> The same problem with this version on my dir-620 d1. Searching what is 
>> broken..
> Looks like rt2x00lib_probe_hw_modes isn't actually called on the SoCs... 
> *sigh*

Erm, this is not true.

rt2x00lib_probe_dev is called for all devices...

> /*
>  * driver allocation handlers.
>  */
> int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev)
> {
>       int retval = -ENOMEM;
> 

<...>

>       retval = rt2x00lib_load_eeprom_file(rt2x00dev);
>       if (retval)
>               goto exit;

... the EEPROM file for SoCs/onboard PCI devices is loaded from here ...

> 
>       /*
>        * Initialize work.
>        */
>       rt2x00dev->workqueue =
>           alloc_ordered_workqueue(wiphy_name(rt2x00dev->hw->wiphy), 0);
>       if (!rt2x00dev->workqueue) {
>               retval = -ENOMEM;
>               goto exit;
>       }
> 
>       INIT_WORK(&rt2x00dev->intf_work, rt2x00lib_intf_scheduled);
>       INIT_DELAYED_WORK(&rt2x00dev->autowakeup_work, rt2x00lib_autowakeup);
>       INIT_WORK(&rt2x00dev->sleep_work, rt2x00lib_sleep);
> 
>       /*
>        * Let the driver probe the device to detect the capabilities.
>        */
>       retval = rt2x00dev->ops->lib->probe_hw(rt2x00dev);
>       if (retval) {
>               ERROR(rt2x00dev, "Failed to allocate device.\n");
>               goto exit;
>       }
> 
>       /*
>        * Allocate queue array.
>        */
>       retval = rt2x00queue_allocate(rt2x00dev);
>       if (retval)
>               goto exit;
> 
>       /*
>        * Initialize ieee80211 structure.
>        */
>       retval = rt2x00lib_probe_hw(rt2x00dev);

... later it calls rt2x00lib_probe_hw() ....

>       if (retval) {
>               ERROR(rt2x00dev, "Failed to initialize hw.\n");
>               goto exit;
>       }
> 

<...>

> static int rt2x00lib_probe_hw(struct rt2x00_dev *rt2x00dev)
> {
>       struct hw_mode_spec *spec = &rt2x00dev->spec;
>       int status;
> 
>       if (test_bit(DEVICE_STATE_REGISTERED_HW, &rt2x00dev->flags))
>               return 0;
> 
>       /*
>        * Initialize HW modes.
>        */
>       status = rt2x00lib_probe_hw_modes(rt2x00dev, spec);

and rt2x00lib_probe_hw_modes is called from here.

>       if (status)
>               return status;
> 

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to