From 5c105d9f3fd086aff195d3849dcf847d6b0bd927 Mon Sep 17 00:00:00 2001 From: blogic Date: Fri, 5 Oct 2012 10:12:53 +0000 Subject: branch Attitude Adjustment git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@33625 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/broadcom-wl/files/etc/init.d/wlunbind | 29 +++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 package/broadcom-wl/files/etc/init.d/wlunbind (limited to 'package/broadcom-wl/files/etc/init.d/wlunbind') diff --git a/package/broadcom-wl/files/etc/init.d/wlunbind b/package/broadcom-wl/files/etc/init.d/wlunbind new file mode 100755 index 000000000..0a29db565 --- /dev/null +++ b/package/broadcom-wl/files/etc/init.d/wlunbind @@ -0,0 +1,29 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2010-2011 OpenWrt.org + +START=09 + +unbind_driver() { + local driver="$1" + local sysfs="/sys/bus/pci/drivers/$driver" + if [ -d "$sysfs" ]; then + local lnk + for lnk in $sysfs/*; do + [ -h "$lnk" ] || continue + case "${lnk##*/}" in + *:*:*.*) + logger "Unbinding WL PCI device ${lnk##*/} from $driver" + echo -n "${lnk##*/}" > "$sysfs/unbind" + ;; + esac + done + fi +} + +boot() { + unbind_driver b43-pci-bridge + unbind_driver bcma-pci-bridge +} + +start() { :; } +stop() { :; } -- cgit v1.2.3