aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdrivers/net/qla3xxx.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c
index df18aada17a7..c25a1f728715 100755
--- a/drivers/net/qla3xxx.c
+++ b/drivers/net/qla3xxx.c
@@ -3354,27 +3354,6 @@ static struct net_device_stats *ql3xxx_get_stats(struct net_device *dev)
3354 return &qdev->stats; 3354 return &qdev->stats;
3355} 3355}
3356 3356
3357static int ql3xxx_change_mtu(struct net_device *ndev, int new_mtu)
3358{
3359 struct ql3_adapter *qdev = netdev_priv(ndev);
3360 printk(KERN_ERR PFX "%s: new mtu size = %d.\n", ndev->name, new_mtu);
3361 if (new_mtu != NORMAL_MTU_SIZE && new_mtu != JUMBO_MTU_SIZE) {
3362 printk(KERN_ERR PFX
3363 "%s: mtu size of %d is not valid. Use exactly %d or "
3364 "%d.\n", ndev->name, new_mtu, NORMAL_MTU_SIZE,
3365 JUMBO_MTU_SIZE);
3366 return -EINVAL;
3367 }
3368
3369 if (!netif_running(ndev)) {
3370 ndev->mtu = new_mtu;
3371 return 0;
3372 }
3373
3374 ndev->mtu = new_mtu;
3375 return ql_cycle_adapter(qdev,QL_DO_RESET);
3376}
3377
3378static void ql3xxx_set_multicast_list(struct net_device *ndev) 3357static void ql3xxx_set_multicast_list(struct net_device *ndev)
3379{ 3358{
3380 /* 3359 /*
@@ -3666,7 +3645,6 @@ static int __devinit ql3xxx_probe(struct pci_dev *pdev,
3666 ndev->hard_start_xmit = ql3xxx_send; 3645 ndev->hard_start_xmit = ql3xxx_send;
3667 ndev->stop = ql3xxx_close; 3646 ndev->stop = ql3xxx_close;
3668 ndev->get_stats = ql3xxx_get_stats; 3647 ndev->get_stats = ql3xxx_get_stats;
3669 ndev->change_mtu = ql3xxx_change_mtu;
3670 ndev->set_multicast_list = ql3xxx_set_multicast_list; 3648 ndev->set_multicast_list = ql3xxx_set_multicast_list;
3671 SET_ETHTOOL_OPS(ndev, &ql3xxx_ethtool_ops); 3649 SET_ETHTOOL_OPS(ndev, &ql3xxx_ethtool_ops);
3672 ndev->set_mac_address = ql3xxx_set_mac_address; 3650 ndev->set_mac_address = ql3xxx_set_mac_address;
@@ -3691,9 +3669,11 @@ static int __devinit ql3xxx_probe(struct pci_dev *pdev,
3691 3669
3692 /* Validate and set parameters */ 3670 /* Validate and set parameters */
3693 if (qdev->mac_index) { 3671 if (qdev->mac_index) {
3672 ndev->mtu = qdev->nvram_data.macCfg_port1.etherMtu_mac ;
3694 memcpy(ndev->dev_addr, &qdev->nvram_data.funcCfg_fn2.macAddress, 3673 memcpy(ndev->dev_addr, &qdev->nvram_data.funcCfg_fn2.macAddress,
3695 ETH_ALEN); 3674 ETH_ALEN);
3696 } else { 3675 } else {
3676 ndev->mtu = qdev->nvram_data.macCfg_port0.etherMtu_mac ;
3697 memcpy(ndev->dev_addr, &qdev->nvram_data.funcCfg_fn0.macAddress, 3677 memcpy(ndev->dev_addr, &qdev->nvram_data.funcCfg_fn0.macAddress,
3698 ETH_ALEN); 3678 ETH_ALEN);
3699 } 3679 }