mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-31 16:57:10 +00:00
Fix a totally bone-headed, last minute bounds check snafu that somehow
I must've missed when booting a test kernel. This has been validated on the AR7161.
This commit is contained in:
parent
8df8e26adc
commit
ce3c177ff8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=234941
@ -192,21 +192,23 @@ ar71xx_chip_set_mii_if(uint32_t unit, uint32_t mii_mode)
|
||||
mii_if = MII0_CTRL_IF_RGMII;
|
||||
else if (mii_mode == AR71XX_MII_MODE_RMII)
|
||||
mii_if = MII0_CTRL_IF_RMII;
|
||||
else
|
||||
else {
|
||||
printf("%s: invalid MII mode (%d) for unit %d\n",
|
||||
__func__, mii_mode, unit);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
reg = AR71XX_MII1_CTRL;
|
||||
if (mii_mode == AR71XX_MII_MODE_RGMII)
|
||||
mii_if = MII1_CTRL_IF_RGMII;
|
||||
if (mii_mode == AR71XX_MII_MODE_RMII)
|
||||
else if (mii_mode == AR71XX_MII_MODE_RMII)
|
||||
mii_if = MII1_CTRL_IF_RMII;
|
||||
else
|
||||
else {
|
||||
printf("%s: invalid MII mode (%d) for unit %d\n",
|
||||
__func__, mii_mode, unit);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
printf("%s: invalid MII unit set for arge unit: %d\n",
|
||||
|
Loading…
Reference in New Issue
Block a user