Root/package/broadcom-wl/files/etc/init.d/wlunbind

1#!/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() { :; }
30

Archive Download this file



interactive