summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorloos <loos@FreeBSD.org>2014-07-01 14:49:46 +0000
committerloos <loos@FreeBSD.org>2014-07-01 14:49:46 +0000
commit6ca4962ff132b4993c68d01e31b8d06cf516bf66 (patch)
treec352d4485f07ef33ab03892573a67e52506a3d1b /sys/dev
parent2c297e6c2d89984b5c7256ec0575d594375ce5f0 (diff)
downloadFreeBSD-src-6ca4962ff132b4993c68d01e31b8d06cf516bf66.zip
FreeBSD-src-6ca4962ff132b4993c68d01e31b8d06cf516bf66.tar.gz
Fix the reported status for the switch CPU port which was (wrongly)
reporting half-duplex link. Tested on TP-Link WR1043ND.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/etherswitch/rtl8366/rtl8366rb.c2
-rw-r--r--sys/dev/etherswitch/rtl8366/rtl8366rbvar.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/etherswitch/rtl8366/rtl8366rb.c b/sys/dev/etherswitch/rtl8366/rtl8366rb.c
index 6fd3433..115fa62 100644
--- a/sys/dev/etherswitch/rtl8366/rtl8366rb.c
+++ b/sys/dev/etherswitch/rtl8366/rtl8366rb.c
@@ -268,7 +268,7 @@ rtl8366rb_update_ifmedia(int portstatus, u_int *media_status, u_int *media_activ
*media_active |= IFM_1000_T;
break;
}
- if ((portstatus & RTL8366RB_PLSR_FULLDUPLEX) == 0)
+ if ((portstatus & RTL8366RB_PLSR_FULLDUPLEX) != 0)
*media_active |= IFM_FDX;
else
*media_active |= IFM_HDX;
diff --git a/sys/dev/etherswitch/rtl8366/rtl8366rbvar.h b/sys/dev/etherswitch/rtl8366/rtl8366rbvar.h
index b582171..0903705 100644
--- a/sys/dev/etherswitch/rtl8366/rtl8366rbvar.h
+++ b/sys/dev/etherswitch/rtl8366/rtl8366rbvar.h
@@ -70,7 +70,7 @@
#define RTL8366RB_PLSR_SPEED_10 0x00
#define RTL8366RB_PLSR_SPEED_100 0x01
#define RTL8366RB_PLSR_SPEED_1000 0x02
-#define RTL8366RB_PLSR_FULLDUPLEX 0x08
+#define RTL8366RB_PLSR_FULLDUPLEX 0x04
#define RTL8366RB_PLSR_LINK 0x10
#define RTL8366RB_PLSR_TXPAUSE 0x20
#define RTL8366RB_PLSR_RXPAUSE 0x40
OpenPOWER on IntegriCloud