Search Linux Wireless

Re: [RFC/RFT 2/5] b43: Load firmware from a work queue and not from the probe routine

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

 



Hi Larry,

On Tue, Feb 14, 2012 at 10:28, Larry Finger <Larry.Finger@xxxxxxxxxxxx> wrote:
> On 02/13/2012 05:06 PM, Julian Calaby wrote:
>>
>> Hi Larry,
>>
>> On Tue, Feb 14, 2012 at 06:37, Larry Finger<Larry.Finger@xxxxxxxxxxxx>
>>  wrote:
>>>
>>> Recent changes in udev are causing problems for drivers that load
>>> firmware
>>> from the probe routine. As b43 has such a structure, it must be changed.
>>> As this driver loads more than 1 firmware file, changing to the
>>> asynchronous routine
>>> request_firmware_nowait() would be complicated. In this implementation,
>>> the probe
>>> routine starts a delayed_work queue that calls the firmware loading
>>> routines when
>>> the delay (1 sec) expires..
>>>
>>> Signed-off-by: Larry Finger<Larry.Finger@xxxxxxxxxxxx>
>>> ---
>>> diff --git a/drivers/net/wireless/b43/b43.h
>>> b/drivers/net/wireless/b43/b43.h
>>> index 835462d..532ba79 100644
>>> --- a/drivers/net/wireless/b43/b43.h
>>> +++ b/drivers/net/wireless/b43/b43.h
>>> @@ -932,6 +932,9 @@ struct b43_wl {
>>>        /* Flag that implement the queues stopping. */
>>>        bool tx_queue_stopped[B43_QOS_QUEUE_NUM];
>>>
>>> +       /* delayed firmware loading */
>>> +       struct delayed_work firmware_load;
>>> +
>>>        /* The device LEDs. */
>>>        struct b43_leds leds;
>>>
>>> diff --git a/drivers/net/wireless/b43/main.c
>>> b/drivers/net/wireless/b43/main.c
>>> index 1b540d2..903e1ea 100644
>>> --- a/drivers/net/wireless/b43/main.c
>>> +++ b/drivers/net/wireless/b43/main.c
>>> @@ -2427,9 +2433,17 @@ static int b43_request_firmware(struct b43_wldev
>>> *dev)
>>>        b43_print_fw_helptext(dev->wl, 1);
>>>        err = -ENOENT;
>>
>>
>> Should something be done here rather than immediately going to
>> register the card with ieee80211?
>
>
> I don't think so. When firmware is loaded from the probe routine, it
> registers the card as the next step. I did miss the step that registers the
> leds - that has now been added.

My point here is that in the original flow, the -ENOENT would have
been returned to b43_chip_init() and the hardware would never have
been registered with mac80211. After this patch, it appears that if
the firmware cannot be found, it still registers the hardware with
mac80211.

Thanks,

-- 
Julian Calaby

Email: julian.calaby@xxxxxxxxx
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/
--
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 Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux