Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 341741
b: refs/heads/master
c: cb64edb
h: refs/heads/master
i:
  341739: de3be2c
v: v3
  • Loading branch information
John Greene authored and David S. Miller committed Dec 3, 2012
1 parent 19160bc commit 9b6a37e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: eb0fb363f920e4d8c70d30b712f9dd433271218c
refs/heads/master: cb64edb6b89491edfdbae52ba7db9a8b8391d339
23 changes: 4 additions & 19 deletions trunk/drivers/net/ethernet/realtek/8139cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1226,12 +1226,9 @@ static void cp_tx_timeout(struct net_device *dev)
spin_unlock_irqrestore(&cp->lock, flags);
}

#ifdef BROKEN
static int cp_change_mtu(struct net_device *dev, int new_mtu)
{
struct cp_private *cp = netdev_priv(dev);
int rc;
unsigned long flags;

/* check for invalid MTU, according to hardware limits */
if (new_mtu < CP_MIN_MTU || new_mtu > CP_MAX_MTU)
Expand All @@ -1244,22 +1241,12 @@ static int cp_change_mtu(struct net_device *dev, int new_mtu)
return 0;
}

spin_lock_irqsave(&cp->lock, flags);

cp_stop_hw(cp); /* stop h/w and free rings */
cp_clean_rings(cp);

/* network IS up, close it, reset MTU, and come up again. */
cp_close(dev);
dev->mtu = new_mtu;
cp_set_rxbufsize(cp); /* set new rx buf size */

rc = cp_init_rings(cp); /* realloc and restart h/w */
cp_start_hw(cp);

spin_unlock_irqrestore(&cp->lock, flags);

return rc;
cp_set_rxbufsize(cp);
return cp_open(dev);
}
#endif /* BROKEN */

static const char mii_2_8139_map[8] = {
BasicModeCtrl,
Expand Down Expand Up @@ -1835,9 +1822,7 @@ static const struct net_device_ops cp_netdev_ops = {
.ndo_start_xmit = cp_start_xmit,
.ndo_tx_timeout = cp_tx_timeout,
.ndo_set_features = cp_set_features,
#ifdef BROKEN
.ndo_change_mtu = cp_change_mtu,
#endif

#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = cp_poll_controller,
Expand Down

0 comments on commit 9b6a37e

Please sign in to comment.