Browse Source

mac80211: only strip the platform/ prefix from path for pci devices

Signed-off-by: Felix Fietkau <[email protected]>

SVN-Revision: 48440
Felix Fietkau 9 years ago
parent
commit
145a6e9db9
1 changed files with 3 additions and 1 deletions
  1. 3 1
      package/kernel/mac80211/files/lib/wifi/mac80211.sh

+ 3 - 1
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)"