mirror of https://github.com/hak5/openwrt.git
switch: fix switches with more than 6 ports
This is based on a patch by jcharest and the Broadcom SDK. SVN-Revision: 35582lede-17.01
parent
3c51948454
commit
b8a84038a5
|
@ -78,7 +78,7 @@ struct robo_switch {
|
||||||
int gpio_lanports_enable;
|
int gpio_lanports_enable;
|
||||||
struct ifreq ifr;
|
struct ifreq ifr;
|
||||||
struct net_device *dev;
|
struct net_device *dev;
|
||||||
unsigned char port[6];
|
unsigned char port[9];
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Currently we can only have one device in the system. */
|
/* Currently we can only have one device in the system. */
|
||||||
|
@ -308,9 +308,6 @@ static int robo_probe(char *devname)
|
||||||
}
|
}
|
||||||
|
|
||||||
robo.device = devname;
|
robo.device = devname;
|
||||||
for (i = 0; i < 5; i++)
|
|
||||||
robo.port[i] = i;
|
|
||||||
robo.port[5] = 8;
|
|
||||||
|
|
||||||
/* try access using MII ioctls - get phy address */
|
/* try access using MII ioctls - get phy address */
|
||||||
err = do_ioctl(SIOCGMIIPHY);
|
err = do_ioctl(SIOCGMIIPHY);
|
||||||
|
@ -386,6 +383,14 @@ static int robo_probe(char *devname)
|
||||||
robo.is_5365 = false;
|
robo.is_5365 = false;
|
||||||
|
|
||||||
robo.gmii = robo_gmii();
|
robo.gmii = robo_gmii();
|
||||||
|
if (robo.devid == ROBO_DEVICE_ID_5325) {
|
||||||
|
for (i = 0; i < 5; i++)
|
||||||
|
robo.port[i] = i;
|
||||||
|
} else {
|
||||||
|
for (i = 0; i < 8; i++)
|
||||||
|
robo.port[i] = i;
|
||||||
|
}
|
||||||
|
robo.port[i] = ROBO_IM_PORT_CTRL;
|
||||||
|
|
||||||
robo_switch_reset();
|
robo_switch_reset();
|
||||||
err = robo_switch_enable();
|
err = robo_switch_enable();
|
||||||
|
|
Loading…
Reference in New Issue