Skip to content

Commit

Permalink
mac80211: fix detecting existing interface
Browse files Browse the repository at this point in the history
Instead of using the actual interface name, a hard-coded 'wlan0' has
slipped into the script. Replace it.

Fixes: ccf2aa9 ("mac80211: detect existing interface before adding")
Reported-by: John Crispin <john@phrozen.org>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  • Loading branch information
dangowrt committed Apr 17, 2020
1 parent 75ef28b commit 99d567a
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -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
;;
Expand Down

0 comments on commit 99d567a

Please sign in to comment.