Changeset 35624


Ignore:
Timestamp:
2013-02-16T17:24:15+01:00 (5 years ago)
Author:
hauke
Message:

brcm47xx: improve cpuport detection for filesafe

Do not try to load bcm57xx.ko any more this is not needed for kernel 2.6 and 3.X
Ask the switch driver where the CPU port is.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/brcm47xx/base-files/lib/preinit/05_init_interfaces_brcm

    r35491 r35624  
    1515        case "$(cat /proc/diag/model)" in 
    1616                "Linksys WAP54G V1") ifname=eth1;; 
    17                 "Linksys E3000 V1"|"Linksys WRT610N V2") cpu_port="8u*";; 
    1817                "ASUS WL-HDD") ifname=eth1;; 
    1918                "ASUS WL-300g") ifname=eth1;; 
     
    2423} 
    2524 
    26 check_module () { 
    27   module="$1"; shift; params="$*" 
    28  
    29   insmod "$module" "$params" 
    30   sleep 1 
    31   grep -q ^"$module " /proc/modules 
    32   return $? 
    33 } 
    34  
    3525init_iface() { 
    3626        insmod switch-core 
    37         check_module switch-robo || check_module switch-adm  || { 
    38           check_module bcm57xx activate_gpio=0x4 && cpu_port="8u*" 
    39         } || rmmod switch-core 
     27        insmod switch-robo 
     28        insmod switch-adm 
     29 
     30        [ -d /proc/switch/eth0 ] && [ "$ifname" = "eth0" ] && { 
     31                case "$(cat /proc/switch/eth0/cpuport)" in 
     32                        "5") cpu_port="5u*";; 
     33                        "8") cpu_port="8u*";; 
     34                esac 
     35        } 
    4036} 
    4137 
Note: See TracChangeset for help on using the changeset viewer.