aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorFrancois Romieu <romieu@fr.zoreil.com>2011-03-11 14:30:24 -0500
committerFrancois romieu <romieu@fr.zoreil.com>2011-05-09 15:03:01 -0400
commit826e6cbdadfa51495c7189641df2514cc48e23da (patch)
tree41f572c46c0c07e001f7fb07538f1751271bdb7b /drivers/net
parent6f43adc88f49cb8164fbd665e968de4de380dc35 (diff)
r8169: rtl8169_set_speed_xmii cleanup.
Shorten chipset version test. No functional change. Careful readers will notice that the 'supports_gmii' flag is deduced from the device PCI id. Though less specific than the chipset related RTL_GIGA_MAC_VER_XY, it is good enough to detect a GMII deprieved 810x. Some features push for a device specific configuration (improved jumbo frame support for instance). 'supports_gmii' will follow this path if / when the device PCI id test stops working. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Cc: Realtek linux nic maintainers <nic_swsd@realtek.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/r8169.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 976bb31b2092..182c79474434 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -1258,16 +1258,7 @@ static int rtl8169_set_speed_xmii(struct net_device *dev,
1258 giga_ctrl &= ~(ADVERTISE_1000FULL | ADVERTISE_1000HALF); 1258 giga_ctrl &= ~(ADVERTISE_1000FULL | ADVERTISE_1000HALF);
1259 1259
1260 /* The 8100e/8101e/8102e do Fast Ethernet only. */ 1260 /* The 8100e/8101e/8102e do Fast Ethernet only. */
1261 if (tp->mac_version != RTL_GIGA_MAC_VER_07 && 1261 if (tp->mii.supports_gmii) {
1262 tp->mac_version != RTL_GIGA_MAC_VER_08 &&
1263 tp->mac_version != RTL_GIGA_MAC_VER_09 &&
1264 tp->mac_version != RTL_GIGA_MAC_VER_10 &&
1265 tp->mac_version != RTL_GIGA_MAC_VER_13 &&
1266 tp->mac_version != RTL_GIGA_MAC_VER_14 &&
1267 tp->mac_version != RTL_GIGA_MAC_VER_15 &&
1268 tp->mac_version != RTL_GIGA_MAC_VER_16 &&
1269 tp->mac_version != RTL_GIGA_MAC_VER_29 &&
1270 tp->mac_version != RTL_GIGA_MAC_VER_30) {
1271 if (adv & ADVERTISED_1000baseT_Half) 1262 if (adv & ADVERTISED_1000baseT_Half)
1272 giga_ctrl |= ADVERTISE_1000HALF; 1263 giga_ctrl |= ADVERTISE_1000HALF;
1273 if (adv & ADVERTISED_1000baseT_Full) 1264 if (adv & ADVERTISED_1000baseT_Full)