summaryrefslogtreecommitdiff
path: root/target/linux/adm5120-2.6/files/drivers/net/adm5120sw.c
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2007-03-24 21:31:13 +0000
committerFlorian Fainelli <florian@openwrt.org>2007-03-24 21:31:13 +0000
commit1f3c505ef6e7acc33bf0717463d72e8ff09b6759 (patch)
tree5fc7163ae7ba5e8819af0a73a6aa49a10412811e /target/linux/adm5120-2.6/files/drivers/net/adm5120sw.c
parentfe42382d1ca111de88a3be087f7ee217480482a5 (diff)
downloadmtk-20170518-1f3c505ef6e7acc33bf0717463d72e8ff09b6759.zip
mtk-20170518-1f3c505ef6e7acc33bf0717463d72e8ff09b6759.tar.gz
mtk-20170518-1f3c505ef6e7acc33bf0717463d72e8ff09b6759.tar.bz2
Do not register more than 2 ethernet porst for CFE based devices (i.e : Compex WP54G-wrt)
SVN-Revision: 6683
Diffstat (limited to 'target/linux/adm5120-2.6/files/drivers/net/adm5120sw.c')
-rw-r--r--target/linux/adm5120-2.6/files/drivers/net/adm5120sw.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/target/linux/adm5120-2.6/files/drivers/net/adm5120sw.c b/target/linux/adm5120-2.6/files/drivers/net/adm5120sw.c
index 935016c..e4a764f 100644
--- a/target/linux/adm5120-2.6/files/drivers/net/adm5120sw.c
+++ b/target/linux/adm5120-2.6/files/drivers/net/adm5120sw.c
@@ -390,6 +390,9 @@ static int __init adm5120_sw_init(void)
/* MII port? */
if (adm5120_get_reg(ADM5120_CODE) & ADM5120_CODE_PQFP)
adm5120_nrdevs = 5;
+ /* CFE based devices only have two enet ports */
+ else if (boot_loader_type == CFE)
+ adm5120_nrdevs = 2
else
adm5120_nrdevs = 6;