etherswitch/arswitch: correct version detection
During porting of etherswitch to NetBSD mistypo was discovered in Atheros switch version detection. Reported by: Hiroki Mori yamori813@yahoo.co.jp MFC after: 1 week
This commit is contained in:
parent
d4a8f5bf13
commit
e0bc8f8da2
@ -126,7 +126,7 @@ arswitch_probe(device_t dev)
|
||||
/* AR8xxx probe */
|
||||
id = arswitch_readreg(dev, AR8X16_REG_MASK_CTRL);
|
||||
sc->chip_rev = (id & AR8X16_MASK_CTRL_REV_MASK);
|
||||
sc->chip_ver = (id & AR8X16_MASK_CTRL_VER_MASK) > AR8X16_MASK_CTRL_VER_SHIFT;
|
||||
sc->chip_ver = (id & AR8X16_MASK_CTRL_VER_MASK) >> AR8X16_MASK_CTRL_VER_SHIFT;
|
||||
switch (id & (AR8X16_MASK_CTRL_VER_MASK | AR8X16_MASK_CTRL_REV_MASK)) {
|
||||
case 0x0101:
|
||||
chipname = "AR8216";
|
||||
|
Loading…
Reference in New Issue
Block a user