blob: 0a29db565fb91ec6d5bfe8329d6a61d46b05e346 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001#!/bin/sh /etc/rc.common
2# Copyright (C) 2010-2011 OpenWrt.org
3
4START=09
5
6unbind_driver() {
7 local driver="$1"
8 local sysfs="/sys/bus/pci/drivers/$driver"
9 if [ -d "$sysfs" ]; then
10 local lnk
11 for lnk in $sysfs/*; do
12 [ -h "$lnk" ] || continue
13 case "${lnk##*/}" in
14 *:*:*.*)
15 logger "Unbinding WL PCI device ${lnk##*/} from $driver"
16 echo -n "${lnk##*/}" > "$sysfs/unbind"
17 ;;
18 esac
19 done
20 fi
21}
22
23boot() {
24 unbind_driver b43-pci-bridge
25 unbind_driver bcma-pci-bridge
26}
27
28start() { :; }
29stop() { :; }