Ignore:
Timestamp:
2010-03-09T19:05:45+01:00 (6 years ago)
Author:
juhosg
Message:

ar71xx: allow overriding of the lan port names on AP91 based boards

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap91-eth.c

    r19928 r20095  
    1111#include "devices.h" 
    1212#include "dev-dsa.h" 
     13#include "dev-ap91-eth.h" 
    1314 
    1415static struct dsa_chip_data ap91_dsa_chip = { 
     
    2526}; 
    2627 
    27 void __init ap91_eth_init(u8 *mac_addr) 
     28static void ap91_eth_set_port_name(unsigned port, const char *name) 
     29{ 
     30        if (port < 1 || port > 5) 
     31                return; 
     32 
     33        if (name) 
     34                ap91_dsa_chip.port_names[port] = (char *) name; 
     35} 
     36 
     37void __init ap91_eth_init(u8 *mac_addr, const char *port_names[]) 
    2838{ 
    2939        if (mac_addr) 
    3040                ar71xx_set_mac_base(mac_addr); 
     41 
     42        if (port_names) { 
     43                int i; 
     44 
     45                for (i = 0; i < AP91_ETH_NUM_PORT_NAMES; i++) 
     46                        ap91_eth_set_port_name(i + 1, port_names[i]); 
     47        } 
    3148 
    3249        /* WAN port */ 
Note: See TracChangeset for help on using the changeset viewer.