summaryrefslogtreecommitdiffstats
path: root/package/switch/src/switch-robo.c
diff options
context:
space:
mode:
authorhauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-02-14 12:36:52 +0000
committerhauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-02-14 12:36:52 +0000
commitd8af1489e0e3cbeba49897e8f6dee1572295dd43 (patch)
treeb5a9c9744bf5a5c89a9ed7acf3a208e7aa6eadc7 /package/switch/src/switch-robo.c
parent03eaf681abe52e6ea4bf52670f0a69baceb30245 (diff)
switch: export name of device found via /proc
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35596 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/switch/src/switch-robo.c')
-rw-r--r--package/switch/src/switch-robo.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/package/switch/src/switch-robo.c b/package/switch/src/switch-robo.c
index 57240a3fd..f7159729b 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);
}