aboutsummaryrefslogtreecommitdiff
path: root/sys/mips/cavium/octe/ethernet-common.c
diff options
context:
space:
mode:
authorJuli Mallett <jmallett@FreeBSD.org>2011-03-16 22:51:34 +0000
committerJuli Mallett <jmallett@FreeBSD.org>2011-03-16 22:51:34 +0000
commite22b8a5a3b64fae412818dd70c82d067b434c88a (patch)
tree2265742959d9b5fce206372d69b59f42b58143b6 /sys/mips/cavium/octe/ethernet-common.c
parentb00a71345c8689813d5afe1958aca1ce81316ee6 (diff)
o) Set MAC addresses starting at the MAC base for all management ports, not
just the MR-730. o) Start MAC addresses for the non-management ports after the management ports. Submitted by: Bhanu Prakash (with modifications)
Notes
Notes: svn path=/head/; revision=219706
Diffstat (limited to 'sys/mips/cavium/octe/ethernet-common.c')
-rw-r--r--sys/mips/cavium/octe/ethernet-common.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/sys/mips/cavium/octe/ethernet-common.c b/sys/mips/cavium/octe/ethernet-common.c
index 415c3d43600f..73103cc4725a 100644
--- a/sys/mips/cavium/octe/ethernet-common.c
+++ b/sys/mips/cavium/octe/ethernet-common.c
@@ -269,34 +269,19 @@ void cvm_oct_common_poll(struct ifnet *ifp)
*/
int cvm_oct_common_init(struct ifnet *ifp)
{
- static int count;
char mac[6] = {
octeon_bootinfo->mac_addr_base[0],
octeon_bootinfo->mac_addr_base[1],
octeon_bootinfo->mac_addr_base[2],
octeon_bootinfo->mac_addr_base[3],
octeon_bootinfo->mac_addr_base[4],
- octeon_bootinfo->mac_addr_base[5] + count};
+ octeon_bootinfo->mac_addr_base[5] };
cvm_oct_private_t *priv = (cvm_oct_private_t *)ifp->if_softc;
- switch (cvmx_sysinfo_get()->board_type) {
-#if defined(OCTEON_VENDOR_LANNER)
- case CVMX_BOARD_TYPE_CUST_LANNER_MR730:
- /*
- * The MR-730 uses its first two MACs for the management
- * ports.
- */
- mac[5] += 2;
- break;
-#endif
- default:
- break;
- }
+ mac[5] += cvm_oct_mac_addr_offset++;
ifp->if_mtu = ETHERMTU;
- count++;
-
cvm_oct_mdio_setup_device(ifp);
cvm_oct_common_set_mac_address(ifp, mac);