From 93d78a7faecd198a412dfed294a70ef0e2ad1b48 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 21 Jan 2016 15:55:35 +0000 Subject: mac80211: only strip the platform/ prefix from path for pci devices Signed-off-by: Felix Fietkau git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48440 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/kernel/mac80211/files/lib/wifi/mac80211.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'package') diff --git a/package/kernel/mac80211/files/lib/wifi/mac80211.sh b/package/kernel/mac80211/files/lib/wifi/mac80211.sh index 92a9fce744..06f3b8b449 100644 --- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh +++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh @@ -101,7 +101,9 @@ detect_mac80211() { fi if [ -n "$path" ]; then path="${path##/sys/devices/}" - path="${path##platform/}" + case "$path" in + platform*/pci*) path="${path##platform/}";; + esac dev_id=" option path '$path'" else dev_id=" option macaddr $(cat /sys/class/ieee80211/${dev}/macaddress)" -- cgit v1.2.3