Fix the reported status for the switch CPU port which was (wrongly)

reporting half-duplex link.

Tested on TP-Link WR1043ND.
This commit is contained in:
Luiz Otavio O Souza 2014-07-01 14:49:46 +00:00
parent dddab08921
commit b0bb5bfaec
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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