openwrtv3/package/kernel
Vittorio Gambaletta 8301e61365 mac80211: Fix race condition leading to wifi interfaces not coming up at boot sometimes.
In the drv_mac80211_setup function, mac80211_interface_cleanup
is called to ask the kernel to delete all existing interfaces
for the phy that is being configured via netlink.

Later in the first function, mac80211_prepare_vif is called to
set up the new interfaces as required.

But sometimes, when mac80211_prepare_vif (and so the relevant
`iw phy x interface add y` command) runs, the kernel might still
be cleaning up the old interface with the same ifname. It usually
takes very few time to do that; possibly a few milliseconds of
sleep in the script after detecting this error condition could be
enough, but the busybox sh does not support sub-second sleep
intervals.

When this happens, iw obviously fails to create the new interface;
and the following message is printed in the system log, followed by
subsequent failure messages from hostapd in case this would have been
an AP interface.

Tue Mar 14 04:21:57 2017 daemon.notice netifd: radio1 (2767): command failed: Too many open files in system (-23)

This was a long-standing issue existing since at least OpenWrt Backfire,
and today I finally managed to debug and (hopefully) solve it.
It was happening very few times on most devices; but it was happening
a lot more frequently on fast platforms with multiple radios, such as
the powerpc-based dual-ath9k-radio tl-wdr4900-v1.

Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>
2017-03-22 11:42:43 +01:00
..
acx-mac80211 acx-mac80211: fix scan API error that could lead to a crash 2017-02-03 12:35:44 +01:00
ar7-atm treewide: clean up download hashes 2016-12-16 22:39:22 +01:00
ath10k-ct ath10k-ct: depend on kmod-hwmon-core, it gets used when CONFIG_THERMAL is set 2017-02-01 17:49:54 +01:00
avila-wdt kernel/avila-wdt: drop Build/Prepare rule in favor of default one 2016-10-15 11:36:52 +02:00
brcm2708-gpu-fw brcm2708-gpu-fw: update to latest version 2017-03-04 19:40:49 +01:00
broadcom-wl treewide: clean up download hashes 2016-12-16 22:39:22 +01:00
button-hotplug kernel/button-hotplug: drop Build/Prepare rule in favor of default one 2016-10-15 11:36:52 +02:00
gpio-button-hotplug gpio-button-hotplug: add more buttons 2016-11-27 15:34:23 +01:00
gpio-nct5104d gpio-nct5104d: add compatibility for linux 4.9 2017-02-01 17:49:52 +01:00
hwmon-gsc kernel: move the gateworks system controller driver to an out-of-tree package 2017-01-10 12:10:20 +01:00
i2c-gpio-custom kernel/i2c-gpio-custom: drop Build/Prepare rule in favor of default one 2016-10-15 11:36:52 +02:00
kmod-sched-cake kmod-sched-cake: Bump to latest version 2017-01-30 16:30:41 +01:00
lantiq ltq-ptm: use netif_trans_update() only for kernel >= 4.7 2017-02-12 01:26:33 +01:00
leds-apu2 leds-apu2: add compatibility for linux 4.9 2017-02-01 17:49:52 +01:00
linux kernel: move disabling DRM symbols to the config file 2017-03-21 08:22:56 +01:00
mac80211 mac80211: Fix race condition leading to wifi interfaces not coming up at boot sometimes. 2017-03-22 11:42:43 +01:00
mt76 mt76: update to the latest version, fixes Mesh/IBSS crypto support 2017-03-17 13:56:58 +01:00
mwlwifi mwlwifi: Fixes rewritten history hash and latest version 2017-01-26 13:53:57 +01:00
om-watchdog package/om-watchdog: add OpenMesh A40 support 2017-02-14 12:18:05 +01:00
rotary-gpio-custom rotary-gpio-custom: depend on Linux 3.18 and 4.4 (will not work on newer kernels) 2017-02-01 17:49:53 +01:00
rtc-rv5c386a rtc-rv5c386a: fix include path for bcm47xx_nvram.h 2016-11-30 12:47:25 +01:00
spi-gpio-custom kernel/spi-gpio-custom: drop Build/Prepare rule in favor of default one 2016-10-15 11:36:53 +02:00
trelay kernel/trelay: drop Build/Prepare rule in favor of default one 2016-10-15 11:36:53 +02:00
w1-gpio-custom kernel/w1-gpio-custom: drop Build/Prepare rule in favor of default one 2016-10-15 11:36:53 +02:00
wrt55agv2-spidevs kernel/wrt55agv2-spidevs: drop Build/Prepare rule in favor of default one 2016-10-15 11:36:53 +02:00