diff options
author | Daniel Golle <daniel@makrotopia.org> | 2020-04-17 11:33:40 +0100 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2020-04-17 11:36:35 +0100 |
commit | 99d567a83de5e0531d94721c6831e32b2990bb1c (patch) | |
tree | b35ac0607eda5e9e4ab6a2cd6298183050650930 /package | |
parent | 75ef28be59c5b76d73313cfb9650f464ae943cc8 (diff) | |
download | upstream-99d567a83de5e0531d94721c6831e32b2990bb1c.tar.gz upstream-99d567a83de5e0531d94721c6831e32b2990bb1c.tar.bz2 upstream-99d567a83de5e0531d94721c6831e32b2990bb1c.zip |
mac80211: fix detecting existing interface
Instead of using the actual interface name, a hard-coded 'wlan0' has
slipped into the script. Replace it.
Fixes: ccf2aa9d4b ("mac80211: detect existing interface before adding")
Reported-by: John Crispin <john@phrozen.org>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'package')
-rw-r--r-- | package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index f9a60792dc..501b1ad0de 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -455,7 +455,7 @@ mac80211_iw_interface_add() { [ "$rc" = 233 ] && { # Keep matching pre-existing interface [ -d "/sys/class/ieee80211/${phy}/device/net/${ifname}" ] && \ - case "$(iw dev wlan0 info | grep "^\ttype" | cut -d' ' -f2- 2>/dev/null)" in + case "$(iw dev $ifname info | grep "^\ttype" | cut -d' ' -f2- 2>/dev/null)" in "AP") [ "$type" = "__ap" ] && rc=0 ;; |