aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/smsc95xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/usb/smsc95xx.c')
-rw-r--r--drivers/net/usb/smsc95xx.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
index ee2eac3047b3..fed22ffedd57 100644
--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
@@ -435,28 +435,6 @@ static void smsc95xx_set_multicast(struct net_device *netdev)
435 smsc95xx_write_reg_async(dev, MAC_CR, &pdata->mac_cr); 435 smsc95xx_write_reg_async(dev, MAC_CR, &pdata->mac_cr);
436} 436}
437 437
438static u8 smsc95xx_resolve_flowctrl_fulldplx(u16 lcladv, u16 rmtadv)
439{
440 u8 cap = 0;
441
442 if (lcladv & ADVERTISE_PAUSE_CAP) {
443 if (lcladv & ADVERTISE_PAUSE_ASYM) {
444 if (rmtadv & LPA_PAUSE_CAP)
445 cap = FLOW_CTRL_TX | FLOW_CTRL_RX;
446 else if (rmtadv & LPA_PAUSE_ASYM)
447 cap = FLOW_CTRL_RX;
448 } else {
449 if (rmtadv & LPA_PAUSE_CAP)
450 cap = FLOW_CTRL_TX | FLOW_CTRL_RX;
451 }
452 } else if (lcladv & ADVERTISE_PAUSE_ASYM) {
453 if ((rmtadv & LPA_PAUSE_CAP) && (rmtadv & LPA_PAUSE_ASYM))
454 cap = FLOW_CTRL_TX;
455 }
456
457 return cap;
458}
459
460static void smsc95xx_phy_update_flowcontrol(struct usbnet *dev, u8 duplex, 438static void smsc95xx_phy_update_flowcontrol(struct usbnet *dev, u8 duplex,
461 u16 lcladv, u16 rmtadv) 439 u16 lcladv, u16 rmtadv)
462{ 440{
@@ -469,7 +447,7 @@ static void smsc95xx_phy_update_flowcontrol(struct usbnet *dev, u8 duplex,
469 } 447 }
470 448
471 if (duplex == DUPLEX_FULL) { 449 if (duplex == DUPLEX_FULL) {
472 u8 cap = smsc95xx_resolve_flowctrl_fulldplx(lcladv, rmtadv); 450 u8 cap = mii_resolve_flowctrl_fdx(lcladv, rmtadv);
473 451
474 if (cap & FLOW_CTRL_RX) 452 if (cap & FLOW_CTRL_RX)
475 flow = 0xFFFF0002; 453 flow = 0xFFFF0002;