openwrt/package
Vittorio Gambaletta 62a8252a0f 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>
(cherry picked from commit 8301e61365)
2017-12-13 14:52:24 +01:00
..
base-files base-files: add submission service port 2017-12-13 14:39:51 +01:00
boot uboot-envtools: add support for ALFA Network AP121F 2017-07-23 00:26:51 +02:00
devel binutils: fix build with host gcc < 4.9 2017-05-24 18:05:18 +02:00
firmware ath10k-firmware: do not select the qca988x by default 2017-05-27 14:22:16 +02:00
kernel mac80211: Fix race condition leading to wifi interfaces not coming up at boot sometimes. 2017-12-13 14:52:24 +01:00
libs lzo: Update to 2.10 2017-12-13 14:47:43 +01:00
network lldpd: bump to 0.9.6 2017-12-13 14:46:10 +01:00
system procd.sh: use parameterized respawn values 2017-12-13 14:39:02 +01:00
utils adb: Also pass TARGET_CPPFLAGS 2017-12-13 14:37:28 +01:00
Makefile build: fix triggering opkg/host compilation 2017-04-09 15:42:20 +02:00