diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2018-09-04 15:20:34 +0200 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2018-11-07 13:06:38 +0100 |
commit | 10eb247ee8180d3d46d7f0cda5df8dab701e2c32 (patch) | |
tree | d11b952ce9d4be3668f292077b7a916ce2ebcee4 | |
parent | 01a8f0e444c9b52f100eff878cc7011fffeddeaf (diff) | |
download | upstream-10eb247ee8180d3d46d7f0cda5df8dab701e2c32.tar.gz upstream-10eb247ee8180d3d46d7f0cda5df8dab701e2c32.tar.bz2 upstream-10eb247ee8180d3d46d7f0cda5df8dab701e2c32.zip |
mac80211: add iw command wrapper with error logging
Currently it's close to impossible to tell what part of mac80211 setup
went wrong. Errors logged into system log look like this:
radio0 (6155): command failed: No error information (-524)
radio0 (6155): command failed: Not supported (-95)
radio0 (6155): command failed: I/O error (-5)
radio0 (6155): command failed: Too many open files in system (-23)
With this commit change it's getting clear:
command failed: No error information (-524)
Failed command: iw dev wlan0 del
command failed: Not supported (-95)
Failed command: iw phy phy0 set antenna_gain 0
command failed: I/O error (-5)
Failed command: iw phy phy0 set distance 0
command failed: Too many open files in system (-23)
Failed command: iw phy phy0 interface add wlan0 type __ap
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit ffa80bf5a784a34b81e32144669f30560780bdb6)
-rw-r--r-- | package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index 703609b147..80e5498434 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -14,6 +14,10 @@ MP_CONFIG_INT="mesh_retry_timeout mesh_confirm_timeout mesh_holding_timeout mesh MP_CONFIG_BOOL="mesh_auto_open_plinks mesh_fwding" MP_CONFIG_STRING="mesh_power_mode" +iw() { + command iw $@ || logger -t mac80211 "Failed command: iw $@" +} + drv_mac80211_init_device_config() { hostapd_common_add_device_config |