source: trunk/package/broadcom-wl/files/etc/init.d/wlunbind @ 27751

Last change on this file since 27751 was 27751, checked in by jow, 5 years ago

[package] broadcom-wl: make it work on the RT-N16 and other device using the BCMA bus

  • refresh and reorder patches
  • introduce a unified BCMA/SSB glue driver to accomodate for both bus types on brcm47xx
  • extend wlunbind init script to detach device from bcma-pci-bridge as well
  • Property svn:executable set to *
File size: 522 bytes
Line 
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() { :; }
Note: See TracBrowser for help on using the repository browser.