diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2013-02-14 12:36:52 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2013-02-14 12:36:52 +0000 |
commit | 243c5822134e452084069b0afc68c4ac78bfd795 (patch) | |
tree | f5674acf467a05f929dd2dcb4d6355feb7f9a60f /package/switch/src/switch-robo.c | |
parent | 60913bbac6756bf45b0a22ba575c8b68a8e432d4 (diff) | |
download | upstream-243c5822134e452084069b0afc68c4ac78bfd795.tar.gz upstream-243c5822134e452084069b0afc68c4ac78bfd795.tar.bz2 upstream-243c5822134e452084069b0afc68c4ac78bfd795.zip |
switch: export name of device found via /proc
SVN-Revision: 35596
Diffstat (limited to 'package/switch/src/switch-robo.c')
-rw-r--r-- | package/switch/src/switch-robo.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/package/switch/src/switch-robo.c b/package/switch/src/switch-robo.c index 57240a3fd0..f7159729b8 100644 --- a/package/switch/src/switch-robo.c +++ b/package/switch/src/switch-robo.c @@ -3,6 +3,7 @@ * * Copyright (C) 2005 Felix Fietkau <nbd@nbd.name> * Copyright (C) 2008 Michael Buesch <mb@bu3sch.de> + * Copyright (C) 2013 Hauke Mehrtens <hauke@hauke-m.de> * Based on 'robocfg' by Oleg I. Vdovikin * * This program is free software; you can redistribute it and/or @@ -40,7 +41,7 @@ #endif #define DRIVER_NAME "bcm53xx" -#define DRIVER_VERSION "0.02" +#define DRIVER_VERSION "0.03" #define PFX "roboswitch: " #define ROBO_PHY_ADDR 0x1E /* robo switch phy address */ @@ -862,6 +863,10 @@ static int __init robo_init(void) driver.ports = 9; driver.cpuport = 8; } + if (robo.is_5365) + snprintf(driver.dev_name, SWITCH_NAME_BUFSZ, "BCM5365"); + else + snprintf(driver.dev_name, SWITCH_NAME_BUFSZ, "BCM5%s%x", robo.devid & 0xff00 ? "" : "3", robo.devid); return switch_register_driver(&driver); } |