mac80211: rely on iwinfo for phy->path and path->phy lookups
[openwrt/openwrt.git] / package / kernel / mac80211 / files / lib / netifd / wireless / mac80211.sh
index f1ed47802a934b72ad39dbdd96a63d050b63cc07..c9a0fe542ac669dd78ff28330596fba890cd5503 100644 (file)
@@ -1,7 +1,6 @@
 #!/bin/sh
 . /lib/netifd/netifd-wireless.sh
 . /lib/netifd/hostapd.sh
-. /lib/netifd/mac80211.sh
 
 init_wireless_driver "$@"
 
@@ -546,7 +545,7 @@ mac80211_generate_mac() {
 find_phy() {
        [ -n "$phy" -a -d /sys/class/ieee80211/$phy ] && return 0
        [ -n "$path" ] && {
-               phy="$(mac80211_path_to_phy "$path")"
+               phy="$(iwinfo nl80211 phyname "path=$path")"
                [ -n "$phy" ] && return 0
        }
        [ -n "$macaddr" ] && {