Commit 99d567a8 authored by Daniel Golle's avatar Daniel Golle
Browse files

mac80211: fix detecting existing interface

Instead of using the actual interface name, a hard-coded 'wlan0' has
slipped into the script. Replace it.

Fixes: ccf2aa9d

 ("mac80211: detect existing interface before adding")
Reported-by: default avatarJohn Crispin <john@phrozen.org>
Signed-off-by: default avatarDaniel Golle <daniel@makrotopia.org>
parent 75ef28be
......@@ -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
;;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment