#define DRIVER_NAME "bcm53xx"
#define DRIVER_VERSION "0.02"
#define PFX "roboswitch: "
#define DRIVER_NAME "bcm53xx"
#define DRIVER_VERSION "0.02"
#define PFX "roboswitch: "
- if (strcmp(getvar("nvram_type"), "cfe") != 0)
- robo_write16(ROBO_CTRL_PAGE, 0x16, 0x1F);
-
+ if (nvram_getenv("nvram_type", buf, sizeof(buf)) >= 0) {
+ if (strcmp(buf, "cfe") != 0)
+ robo_write16(ROBO_CTRL_PAGE, 0x16, 0x1F);
+ }
+#endif
robo_write32(ROBO_ARLIO_PAGE, 0x63 + regoff, (c->untag << 9) | c->port);
robo_write16(ROBO_ARLIO_PAGE, 0x61 + regoff, nr);
robo_write16(ROBO_ARLIO_PAGE, 0x60 + regoff, 1 << 7);
robo_write32(ROBO_ARLIO_PAGE, 0x63 + regoff, (c->untag << 9) | c->port);
robo_write16(ROBO_ARLIO_PAGE, 0x61 + regoff, nr);
robo_write16(ROBO_ARLIO_PAGE, 0x60 + regoff, 1 << 7);
static int handle_reset(void *driver, char *buf, int nr)
{
switch_driver *d = (switch_driver *) driver;
static int handle_reset(void *driver, char *buf, int nr)
{
switch_driver *d = (switch_driver *) driver;