[LEDE-DEV] [PATCH v2 4/5] base-files, mac80211, broadcom-wl: plug-and-play wifi detection

Mathias Kresin dev at kresin.me
Wed Oct 12 11:12:59 PDT 2016


2016-10-12 13:32 GMT+02:00 Jonas Gorski <jonas.gorski at gmail.com>:
>> diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
>> index 91c9362..f320326 100644
>> --- a/package/kernel/mac80211/Makefile
>> +++ b/package/kernel/mac80211/Makefile
>> @@ -1732,6 +1732,8 @@ define KernelPackage/cfg80211/install
>>         $(INSTALL_DIR) $(1)/lib/wifi $(1)/lib/netifd/wireless
>>         $(INSTALL_DATA) ./files/lib/wifi/mac80211.sh $(1)/lib/wifi
>>         $(INSTALL_BIN) ./files/lib/netifd/wireless/mac80211.sh $(1)/lib/netifd/wireless
>> +       $(INSTALL_DIR) $(1)/etc/hotplug.d/ieee80211
>
> Don't you also need to update /etc/hotplug.json to pass through
> ieee80211 events?

Since https://git.lede-project.org/4f3c1e779364394a7e8f9f45ee824e0dff556cec
events from all subsystems are passed through.

>> --- /dev/null
>> +++ b/package/kernel/mac80211/files/mac80211.hotplug
>> @@ -0,0 +1,5 @@
>> +#!/bin/sh
>> +
>> +[ "${ACTION}" = "add" ] && {
>> +       /sbin/wifi detect
>
> You need to fork here, else you will get a deadlock with wifi drivers
> that request firmware on interface up instead of probe time, e.g.
> rt2x00-usb.

I've to admit, I fail to see where or how a deadlock could happen
here. Using a Lantiq board with a RT3062F (PCI, firmware request on up
as well), I've moved the firmware file rt2860.bin out of
/lib/firmware/ and added a hotplug script to copy it back. I wasn't
able to trigger any deadlocks.

Well, it might be possible that my test setup isn't close enough to
the example with the rt2x00-usb to trigger a deadlock.

Anyway, would you please give an example where/how exactly the
deadlock could happen!

Mathias



More information about the Lede-dev mailing list