diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 93 | ||||
-rw-r--r-- | drivers/net/bonding/bond_sysfs.c | 36 | ||||
-rw-r--r-- | drivers/net/can/usb/peak_usb/pcan_usb.c | 8 | ||||
-rw-r--r-- | drivers/net/can/usb/peak_usb/pcan_usb_pro.c | 8 | ||||
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/realtek/8139cp.c | 11 | ||||
-rw-r--r-- | drivers/net/team/team.c | 4 | ||||
-rw-r--r-- | drivers/net/usb/qmi_wwan.c | 1 | ||||
-rw-r--r-- | drivers/net/wan/ixp4xx_hss.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/rxon.c | 12 |
10 files changed, 73 insertions, 104 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 5f5b69f37d2e..a7d47350ea4b 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -3459,6 +3459,28 @@ static int bond_xmit_hash_policy_l34(struct sk_buff *skb, int count) | |||
3459 | 3459 | ||
3460 | /*-------------------------- Device entry points ----------------------------*/ | 3460 | /*-------------------------- Device entry points ----------------------------*/ |
3461 | 3461 | ||
3462 | static void bond_work_init_all(struct bonding *bond) | ||
3463 | { | ||
3464 | INIT_DELAYED_WORK(&bond->mcast_work, | ||
3465 | bond_resend_igmp_join_requests_delayed); | ||
3466 | INIT_DELAYED_WORK(&bond->alb_work, bond_alb_monitor); | ||
3467 | INIT_DELAYED_WORK(&bond->mii_work, bond_mii_monitor); | ||
3468 | if (bond->params.mode == BOND_MODE_ACTIVEBACKUP) | ||
3469 | INIT_DELAYED_WORK(&bond->arp_work, bond_activebackup_arp_mon); | ||
3470 | else | ||
3471 | INIT_DELAYED_WORK(&bond->arp_work, bond_loadbalance_arp_mon); | ||
3472 | INIT_DELAYED_WORK(&bond->ad_work, bond_3ad_state_machine_handler); | ||
3473 | } | ||
3474 | |||
3475 | static void bond_work_cancel_all(struct bonding *bond) | ||
3476 | { | ||
3477 | cancel_delayed_work_sync(&bond->mii_work); | ||
3478 | cancel_delayed_work_sync(&bond->arp_work); | ||
3479 | cancel_delayed_work_sync(&bond->alb_work); | ||
3480 | cancel_delayed_work_sync(&bond->ad_work); | ||
3481 | cancel_delayed_work_sync(&bond->mcast_work); | ||
3482 | } | ||
3483 | |||
3462 | static int bond_open(struct net_device *bond_dev) | 3484 | static int bond_open(struct net_device *bond_dev) |
3463 | { | 3485 | { |
3464 | struct bonding *bond = netdev_priv(bond_dev); | 3486 | struct bonding *bond = netdev_priv(bond_dev); |
@@ -3481,41 +3503,27 @@ static int bond_open(struct net_device *bond_dev) | |||
3481 | } | 3503 | } |
3482 | read_unlock(&bond->lock); | 3504 | read_unlock(&bond->lock); |
3483 | 3505 | ||
3484 | INIT_DELAYED_WORK(&bond->mcast_work, bond_resend_igmp_join_requests_delayed); | 3506 | bond_work_init_all(bond); |
3485 | 3507 | ||
3486 | if (bond_is_lb(bond)) { | 3508 | if (bond_is_lb(bond)) { |
3487 | /* bond_alb_initialize must be called before the timer | 3509 | /* bond_alb_initialize must be called before the timer |
3488 | * is started. | 3510 | * is started. |
3489 | */ | 3511 | */ |
3490 | if (bond_alb_initialize(bond, (bond->params.mode == BOND_MODE_ALB))) { | 3512 | if (bond_alb_initialize(bond, (bond->params.mode == BOND_MODE_ALB))) |
3491 | /* something went wrong - fail the open operation */ | ||
3492 | return -ENOMEM; | 3513 | return -ENOMEM; |
3493 | } | ||
3494 | |||
3495 | INIT_DELAYED_WORK(&bond->alb_work, bond_alb_monitor); | ||
3496 | queue_delayed_work(bond->wq, &bond->alb_work, 0); | 3514 | queue_delayed_work(bond->wq, &bond->alb_work, 0); |
3497 | } | 3515 | } |
3498 | 3516 | ||
3499 | if (bond->params.miimon) { /* link check interval, in milliseconds. */ | 3517 | if (bond->params.miimon) /* link check interval, in milliseconds. */ |
3500 | INIT_DELAYED_WORK(&bond->mii_work, bond_mii_monitor); | ||
3501 | queue_delayed_work(bond->wq, &bond->mii_work, 0); | 3518 | queue_delayed_work(bond->wq, &bond->mii_work, 0); |
3502 | } | ||
3503 | 3519 | ||
3504 | if (bond->params.arp_interval) { /* arp interval, in milliseconds. */ | 3520 | if (bond->params.arp_interval) { /* arp interval, in milliseconds. */ |
3505 | if (bond->params.mode == BOND_MODE_ACTIVEBACKUP) | ||
3506 | INIT_DELAYED_WORK(&bond->arp_work, | ||
3507 | bond_activebackup_arp_mon); | ||
3508 | else | ||
3509 | INIT_DELAYED_WORK(&bond->arp_work, | ||
3510 | bond_loadbalance_arp_mon); | ||
3511 | |||
3512 | queue_delayed_work(bond->wq, &bond->arp_work, 0); | 3521 | queue_delayed_work(bond->wq, &bond->arp_work, 0); |
3513 | if (bond->params.arp_validate) | 3522 | if (bond->params.arp_validate) |
3514 | bond->recv_probe = bond_arp_rcv; | 3523 | bond->recv_probe = bond_arp_rcv; |
3515 | } | 3524 | } |
3516 | 3525 | ||
3517 | if (bond->params.mode == BOND_MODE_8023AD) { | 3526 | if (bond->params.mode == BOND_MODE_8023AD) { |
3518 | INIT_DELAYED_WORK(&bond->ad_work, bond_3ad_state_machine_handler); | ||
3519 | queue_delayed_work(bond->wq, &bond->ad_work, 0); | 3527 | queue_delayed_work(bond->wq, &bond->ad_work, 0); |
3520 | /* register to receive LACPDUs */ | 3528 | /* register to receive LACPDUs */ |
3521 | bond->recv_probe = bond_3ad_lacpdu_recv; | 3529 | bond->recv_probe = bond_3ad_lacpdu_recv; |
@@ -3530,34 +3538,10 @@ static int bond_close(struct net_device *bond_dev) | |||
3530 | struct bonding *bond = netdev_priv(bond_dev); | 3538 | struct bonding *bond = netdev_priv(bond_dev); |
3531 | 3539 | ||
3532 | write_lock_bh(&bond->lock); | 3540 | write_lock_bh(&bond->lock); |
3533 | |||
3534 | bond->send_peer_notif = 0; | 3541 | bond->send_peer_notif = 0; |
3535 | |||
3536 | write_unlock_bh(&bond->lock); | 3542 | write_unlock_bh(&bond->lock); |
3537 | 3543 | ||
3538 | if (bond->params.miimon) { /* link check interval, in milliseconds. */ | 3544 | bond_work_cancel_all(bond); |
3539 | cancel_delayed_work_sync(&bond->mii_work); | ||
3540 | } | ||
3541 | |||
3542 | if (bond->params.arp_interval) { /* arp interval, in milliseconds. */ | ||
3543 | cancel_delayed_work_sync(&bond->arp_work); | ||
3544 | } | ||
3545 | |||
3546 | switch (bond->params.mode) { | ||
3547 | case BOND_MODE_8023AD: | ||
3548 | cancel_delayed_work_sync(&bond->ad_work); | ||
3549 | break; | ||
3550 | case BOND_MODE_TLB: | ||
3551 | case BOND_MODE_ALB: | ||
3552 | cancel_delayed_work_sync(&bond->alb_work); | ||
3553 | break; | ||
3554 | default: | ||
3555 | break; | ||
3556 | } | ||
3557 | |||
3558 | if (delayed_work_pending(&bond->mcast_work)) | ||
3559 | cancel_delayed_work_sync(&bond->mcast_work); | ||
3560 | |||
3561 | if (bond_is_lb(bond)) { | 3545 | if (bond_is_lb(bond)) { |
3562 | /* Must be called only after all | 3546 | /* Must be called only after all |
3563 | * slaves have been released | 3547 | * slaves have been released |
@@ -4436,26 +4420,6 @@ static void bond_setup(struct net_device *bond_dev) | |||
4436 | bond_dev->features |= bond_dev->hw_features; | 4420 | bond_dev->features |= bond_dev->hw_features; |
4437 | } | 4421 | } |
4438 | 4422 | ||
4439 | static void bond_work_cancel_all(struct bonding *bond) | ||
4440 | { | ||
4441 | if (bond->params.miimon && delayed_work_pending(&bond->mii_work)) | ||
4442 | cancel_delayed_work_sync(&bond->mii_work); | ||
4443 | |||
4444 | if (bond->params.arp_interval && delayed_work_pending(&bond->arp_work)) | ||
4445 | cancel_delayed_work_sync(&bond->arp_work); | ||
4446 | |||
4447 | if (bond->params.mode == BOND_MODE_ALB && | ||
4448 | delayed_work_pending(&bond->alb_work)) | ||
4449 | cancel_delayed_work_sync(&bond->alb_work); | ||
4450 | |||
4451 | if (bond->params.mode == BOND_MODE_8023AD && | ||
4452 | delayed_work_pending(&bond->ad_work)) | ||
4453 | cancel_delayed_work_sync(&bond->ad_work); | ||
4454 | |||
4455 | if (delayed_work_pending(&bond->mcast_work)) | ||
4456 | cancel_delayed_work_sync(&bond->mcast_work); | ||
4457 | } | ||
4458 | |||
4459 | /* | 4423 | /* |
4460 | * Destroy a bonding device. | 4424 | * Destroy a bonding device. |
4461 | * Must be under rtnl_lock when this function is called. | 4425 | * Must be under rtnl_lock when this function is called. |
@@ -4706,12 +4670,13 @@ static int bond_check_params(struct bond_params *params) | |||
4706 | arp_ip_count++) { | 4670 | arp_ip_count++) { |
4707 | /* not complete check, but should be good enough to | 4671 | /* not complete check, but should be good enough to |
4708 | catch mistakes */ | 4672 | catch mistakes */ |
4709 | if (!isdigit(arp_ip_target[arp_ip_count][0])) { | 4673 | __be32 ip = in_aton(arp_ip_target[arp_ip_count]); |
4674 | if (!isdigit(arp_ip_target[arp_ip_count][0]) || | ||
4675 | ip == 0 || ip == htonl(INADDR_BROADCAST)) { | ||
4710 | pr_warning("Warning: bad arp_ip_target module parameter (%s), ARP monitoring will not be performed\n", | 4676 | pr_warning("Warning: bad arp_ip_target module parameter (%s), ARP monitoring will not be performed\n", |
4711 | arp_ip_target[arp_ip_count]); | 4677 | arp_ip_target[arp_ip_count]); |
4712 | arp_interval = 0; | 4678 | arp_interval = 0; |
4713 | } else { | 4679 | } else { |
4714 | __be32 ip = in_aton(arp_ip_target[arp_ip_count]); | ||
4715 | arp_target[arp_ip_count] = ip; | 4680 | arp_target[arp_ip_count] = ip; |
4716 | } | 4681 | } |
4717 | } | 4682 | } |
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c index ef8d2a080d17..1877ed7ca086 100644 --- a/drivers/net/bonding/bond_sysfs.c +++ b/drivers/net/bonding/bond_sysfs.c | |||
@@ -513,6 +513,8 @@ static ssize_t bonding_store_arp_interval(struct device *d, | |||
513 | int new_value, ret = count; | 513 | int new_value, ret = count; |
514 | struct bonding *bond = to_bond(d); | 514 | struct bonding *bond = to_bond(d); |
515 | 515 | ||
516 | if (!rtnl_trylock()) | ||
517 | return restart_syscall(); | ||
516 | if (sscanf(buf, "%d", &new_value) != 1) { | 518 | if (sscanf(buf, "%d", &new_value) != 1) { |
517 | pr_err("%s: no arp_interval value specified.\n", | 519 | pr_err("%s: no arp_interval value specified.\n", |
518 | bond->dev->name); | 520 | bond->dev->name); |
@@ -539,10 +541,6 @@ static ssize_t bonding_store_arp_interval(struct device *d, | |||
539 | pr_info("%s: ARP monitoring cannot be used with MII monitoring. %s Disabling MII monitoring.\n", | 541 | pr_info("%s: ARP monitoring cannot be used with MII monitoring. %s Disabling MII monitoring.\n", |
540 | bond->dev->name, bond->dev->name); | 542 | bond->dev->name, bond->dev->name); |
541 | bond->params.miimon = 0; | 543 | bond->params.miimon = 0; |
542 | if (delayed_work_pending(&bond->mii_work)) { | ||
543 | cancel_delayed_work(&bond->mii_work); | ||
544 | flush_workqueue(bond->wq); | ||
545 | } | ||
546 | } | 544 | } |
547 | if (!bond->params.arp_targets[0]) { | 545 | if (!bond->params.arp_targets[0]) { |
548 | pr_info("%s: ARP monitoring has been set up, but no ARP targets have been specified.\n", | 546 | pr_info("%s: ARP monitoring has been set up, but no ARP targets have been specified.\n", |
@@ -554,19 +552,12 @@ static ssize_t bonding_store_arp_interval(struct device *d, | |||
554 | * timer will get fired off when the open function | 552 | * timer will get fired off when the open function |
555 | * is called. | 553 | * is called. |
556 | */ | 554 | */ |
557 | if (!delayed_work_pending(&bond->arp_work)) { | 555 | cancel_delayed_work_sync(&bond->mii_work); |
558 | if (bond->params.mode == BOND_MODE_ACTIVEBACKUP) | 556 | queue_delayed_work(bond->wq, &bond->arp_work, 0); |
559 | INIT_DELAYED_WORK(&bond->arp_work, | ||
560 | bond_activebackup_arp_mon); | ||
561 | else | ||
562 | INIT_DELAYED_WORK(&bond->arp_work, | ||
563 | bond_loadbalance_arp_mon); | ||
564 | |||
565 | queue_delayed_work(bond->wq, &bond->arp_work, 0); | ||
566 | } | ||
567 | } | 557 | } |
568 | 558 | ||
569 | out: | 559 | out: |
560 | rtnl_unlock(); | ||
570 | return ret; | 561 | return ret; |
571 | } | 562 | } |
572 | static DEVICE_ATTR(arp_interval, S_IRUGO | S_IWUSR, | 563 | static DEVICE_ATTR(arp_interval, S_IRUGO | S_IWUSR, |
@@ -962,6 +953,8 @@ static ssize_t bonding_store_miimon(struct device *d, | |||
962 | int new_value, ret = count; | 953 | int new_value, ret = count; |
963 | struct bonding *bond = to_bond(d); | 954 | struct bonding *bond = to_bond(d); |
964 | 955 | ||
956 | if (!rtnl_trylock()) | ||
957 | return restart_syscall(); | ||
965 | if (sscanf(buf, "%d", &new_value) != 1) { | 958 | if (sscanf(buf, "%d", &new_value) != 1) { |
966 | pr_err("%s: no miimon value specified.\n", | 959 | pr_err("%s: no miimon value specified.\n", |
967 | bond->dev->name); | 960 | bond->dev->name); |
@@ -993,10 +986,6 @@ static ssize_t bonding_store_miimon(struct device *d, | |||
993 | bond->params.arp_validate = | 986 | bond->params.arp_validate = |
994 | BOND_ARP_VALIDATE_NONE; | 987 | BOND_ARP_VALIDATE_NONE; |
995 | } | 988 | } |
996 | if (delayed_work_pending(&bond->arp_work)) { | ||
997 | cancel_delayed_work(&bond->arp_work); | ||
998 | flush_workqueue(bond->wq); | ||
999 | } | ||
1000 | } | 989 | } |
1001 | 990 | ||
1002 | if (bond->dev->flags & IFF_UP) { | 991 | if (bond->dev->flags & IFF_UP) { |
@@ -1005,15 +994,12 @@ static ssize_t bonding_store_miimon(struct device *d, | |||
1005 | * timer will get fired off when the open function | 994 | * timer will get fired off when the open function |
1006 | * is called. | 995 | * is called. |
1007 | */ | 996 | */ |
1008 | if (!delayed_work_pending(&bond->mii_work)) { | 997 | cancel_delayed_work_sync(&bond->arp_work); |
1009 | INIT_DELAYED_WORK(&bond->mii_work, | 998 | queue_delayed_work(bond->wq, &bond->mii_work, 0); |
1010 | bond_mii_monitor); | ||
1011 | queue_delayed_work(bond->wq, | ||
1012 | &bond->mii_work, 0); | ||
1013 | } | ||
1014 | } | 999 | } |
1015 | } | 1000 | } |
1016 | out: | 1001 | out: |
1002 | rtnl_unlock(); | ||
1017 | return ret; | 1003 | return ret; |
1018 | } | 1004 | } |
1019 | static DEVICE_ATTR(miimon, S_IRUGO | S_IWUSR, | 1005 | static DEVICE_ATTR(miimon, S_IRUGO | S_IWUSR, |
@@ -1582,6 +1568,7 @@ static ssize_t bonding_store_slaves_active(struct device *d, | |||
1582 | goto out; | 1568 | goto out; |
1583 | } | 1569 | } |
1584 | 1570 | ||
1571 | read_lock(&bond->lock); | ||
1585 | bond_for_each_slave(bond, slave, i) { | 1572 | bond_for_each_slave(bond, slave, i) { |
1586 | if (!bond_is_active_slave(slave)) { | 1573 | if (!bond_is_active_slave(slave)) { |
1587 | if (new_value) | 1574 | if (new_value) |
@@ -1590,6 +1577,7 @@ static ssize_t bonding_store_slaves_active(struct device *d, | |||
1590 | slave->inactive = 1; | 1577 | slave->inactive = 1; |
1591 | } | 1578 | } |
1592 | } | 1579 | } |
1580 | read_unlock(&bond->lock); | ||
1593 | out: | 1581 | out: |
1594 | return ret; | 1582 | return ret; |
1595 | } | 1583 | } |
diff --git a/drivers/net/can/usb/peak_usb/pcan_usb.c b/drivers/net/can/usb/peak_usb/pcan_usb.c index 86f26a1ede4c..25723d8ee201 100644 --- a/drivers/net/can/usb/peak_usb/pcan_usb.c +++ b/drivers/net/can/usb/peak_usb/pcan_usb.c | |||
@@ -519,8 +519,10 @@ static int pcan_usb_decode_error(struct pcan_usb_msg_context *mc, u8 n, | |||
519 | mc->pdev->dev.can.state = new_state; | 519 | mc->pdev->dev.can.state = new_state; |
520 | 520 | ||
521 | if (status_len & PCAN_USB_STATUSLEN_TIMESTAMP) { | 521 | if (status_len & PCAN_USB_STATUSLEN_TIMESTAMP) { |
522 | struct skb_shared_hwtstamps *hwts = skb_hwtstamps(skb); | ||
523 | |||
522 | peak_usb_get_ts_tv(&mc->pdev->time_ref, mc->ts16, &tv); | 524 | peak_usb_get_ts_tv(&mc->pdev->time_ref, mc->ts16, &tv); |
523 | skb->tstamp = timeval_to_ktime(tv); | 525 | hwts->hwtstamp = timeval_to_ktime(tv); |
524 | } | 526 | } |
525 | 527 | ||
526 | netif_rx(skb); | 528 | netif_rx(skb); |
@@ -605,6 +607,7 @@ static int pcan_usb_decode_data(struct pcan_usb_msg_context *mc, u8 status_len) | |||
605 | struct sk_buff *skb; | 607 | struct sk_buff *skb; |
606 | struct can_frame *cf; | 608 | struct can_frame *cf; |
607 | struct timeval tv; | 609 | struct timeval tv; |
610 | struct skb_shared_hwtstamps *hwts; | ||
608 | 611 | ||
609 | skb = alloc_can_skb(mc->netdev, &cf); | 612 | skb = alloc_can_skb(mc->netdev, &cf); |
610 | if (!skb) | 613 | if (!skb) |
@@ -652,7 +655,8 @@ static int pcan_usb_decode_data(struct pcan_usb_msg_context *mc, u8 status_len) | |||
652 | 655 | ||
653 | /* convert timestamp into kernel time */ | 656 | /* convert timestamp into kernel time */ |
654 | peak_usb_get_ts_tv(&mc->pdev->time_ref, mc->ts16, &tv); | 657 | peak_usb_get_ts_tv(&mc->pdev->time_ref, mc->ts16, &tv); |
655 | skb->tstamp = timeval_to_ktime(tv); | 658 | hwts = skb_hwtstamps(skb); |
659 | hwts->hwtstamp = timeval_to_ktime(tv); | ||
656 | 660 | ||
657 | /* push the skb */ | 661 | /* push the skb */ |
658 | netif_rx(skb); | 662 | netif_rx(skb); |
diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_pro.c b/drivers/net/can/usb/peak_usb/pcan_usb_pro.c index e1626d92511a..30d79bfa5b10 100644 --- a/drivers/net/can/usb/peak_usb/pcan_usb_pro.c +++ b/drivers/net/can/usb/peak_usb/pcan_usb_pro.c | |||
@@ -532,6 +532,7 @@ static int pcan_usb_pro_handle_canmsg(struct pcan_usb_pro_interface *usb_if, | |||
532 | struct can_frame *can_frame; | 532 | struct can_frame *can_frame; |
533 | struct sk_buff *skb; | 533 | struct sk_buff *skb; |
534 | struct timeval tv; | 534 | struct timeval tv; |
535 | struct skb_shared_hwtstamps *hwts; | ||
535 | 536 | ||
536 | skb = alloc_can_skb(netdev, &can_frame); | 537 | skb = alloc_can_skb(netdev, &can_frame); |
537 | if (!skb) | 538 | if (!skb) |
@@ -549,7 +550,8 @@ static int pcan_usb_pro_handle_canmsg(struct pcan_usb_pro_interface *usb_if, | |||
549 | memcpy(can_frame->data, rx->data, can_frame->can_dlc); | 550 | memcpy(can_frame->data, rx->data, can_frame->can_dlc); |
550 | 551 | ||
551 | peak_usb_get_ts_tv(&usb_if->time_ref, le32_to_cpu(rx->ts32), &tv); | 552 | peak_usb_get_ts_tv(&usb_if->time_ref, le32_to_cpu(rx->ts32), &tv); |
552 | skb->tstamp = timeval_to_ktime(tv); | 553 | hwts = skb_hwtstamps(skb); |
554 | hwts->hwtstamp = timeval_to_ktime(tv); | ||
553 | 555 | ||
554 | netif_rx(skb); | 556 | netif_rx(skb); |
555 | netdev->stats.rx_packets++; | 557 | netdev->stats.rx_packets++; |
@@ -570,6 +572,7 @@ static int pcan_usb_pro_handle_error(struct pcan_usb_pro_interface *usb_if, | |||
570 | u8 err_mask = 0; | 572 | u8 err_mask = 0; |
571 | struct sk_buff *skb; | 573 | struct sk_buff *skb; |
572 | struct timeval tv; | 574 | struct timeval tv; |
575 | struct skb_shared_hwtstamps *hwts; | ||
573 | 576 | ||
574 | /* nothing should be sent while in BUS_OFF state */ | 577 | /* nothing should be sent while in BUS_OFF state */ |
575 | if (dev->can.state == CAN_STATE_BUS_OFF) | 578 | if (dev->can.state == CAN_STATE_BUS_OFF) |
@@ -664,7 +667,8 @@ static int pcan_usb_pro_handle_error(struct pcan_usb_pro_interface *usb_if, | |||
664 | dev->can.state = new_state; | 667 | dev->can.state = new_state; |
665 | 668 | ||
666 | peak_usb_get_ts_tv(&usb_if->time_ref, le32_to_cpu(er->ts32), &tv); | 669 | peak_usb_get_ts_tv(&usb_if->time_ref, le32_to_cpu(er->ts32), &tv); |
667 | skb->tstamp = timeval_to_ktime(tv); | 670 | hwts = skb_hwtstamps(skb); |
671 | hwts->hwtstamp = timeval_to_ktime(tv); | ||
668 | netif_rx(skb); | 672 | netif_rx(skb); |
669 | netdev->stats.rx_packets++; | 673 | netdev->stats.rx_packets++; |
670 | netdev->stats.rx_bytes += can_frame->can_dlc; | 674 | netdev->stats.rx_bytes += can_frame->can_dlc; |
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c b/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c index 5d36795877cb..b799ab12a291 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c | |||
@@ -237,7 +237,7 @@ static int mlx4_en_dcbnl_ieee_setmaxrate(struct net_device *dev, | |||
237 | if (err) | 237 | if (err) |
238 | return err; | 238 | return err; |
239 | 239 | ||
240 | memcpy(priv->maxrate, tmp, sizeof(*priv->maxrate)); | 240 | memcpy(priv->maxrate, tmp, sizeof(priv->maxrate)); |
241 | 241 | ||
242 | return 0; | 242 | return 0; |
243 | } | 243 | } |
diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c index b01f83a044c4..609125a249d9 100644 --- a/drivers/net/ethernet/realtek/8139cp.c +++ b/drivers/net/ethernet/realtek/8139cp.c | |||
@@ -1060,17 +1060,22 @@ static int cp_init_rings (struct cp_private *cp) | |||
1060 | 1060 | ||
1061 | static int cp_alloc_rings (struct cp_private *cp) | 1061 | static int cp_alloc_rings (struct cp_private *cp) |
1062 | { | 1062 | { |
1063 | struct device *d = &cp->pdev->dev; | ||
1063 | void *mem; | 1064 | void *mem; |
1065 | int rc; | ||
1064 | 1066 | ||
1065 | mem = dma_alloc_coherent(&cp->pdev->dev, CP_RING_BYTES, | 1067 | mem = dma_alloc_coherent(d, CP_RING_BYTES, &cp->ring_dma, GFP_KERNEL); |
1066 | &cp->ring_dma, GFP_KERNEL); | ||
1067 | if (!mem) | 1068 | if (!mem) |
1068 | return -ENOMEM; | 1069 | return -ENOMEM; |
1069 | 1070 | ||
1070 | cp->rx_ring = mem; | 1071 | cp->rx_ring = mem; |
1071 | cp->tx_ring = &cp->rx_ring[CP_RX_RING_SIZE]; | 1072 | cp->tx_ring = &cp->rx_ring[CP_RX_RING_SIZE]; |
1072 | 1073 | ||
1073 | return cp_init_rings(cp); | 1074 | rc = cp_init_rings(cp); |
1075 | if (rc < 0) | ||
1076 | dma_free_coherent(d, CP_RING_BYTES, cp->rx_ring, cp->ring_dma); | ||
1077 | |||
1078 | return rc; | ||
1074 | } | 1079 | } |
1075 | 1080 | ||
1076 | static void cp_clean_rings (struct cp_private *cp) | 1081 | static void cp_clean_rings (struct cp_private *cp) |
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c index d44cca327588..ad86660fb8f9 100644 --- a/drivers/net/team/team.c +++ b/drivers/net/team/team.c | |||
@@ -1794,10 +1794,12 @@ static void team_setup(struct net_device *dev) | |||
1794 | 1794 | ||
1795 | dev->features |= NETIF_F_LLTX; | 1795 | dev->features |= NETIF_F_LLTX; |
1796 | dev->features |= NETIF_F_GRO; | 1796 | dev->features |= NETIF_F_GRO; |
1797 | dev->hw_features = NETIF_F_HW_VLAN_TX | | 1797 | dev->hw_features = TEAM_VLAN_FEATURES | |
1798 | NETIF_F_HW_VLAN_TX | | ||
1798 | NETIF_F_HW_VLAN_RX | | 1799 | NETIF_F_HW_VLAN_RX | |
1799 | NETIF_F_HW_VLAN_FILTER; | 1800 | NETIF_F_HW_VLAN_FILTER; |
1800 | 1801 | ||
1802 | dev->hw_features &= ~(NETIF_F_ALL_CSUM & ~NETIF_F_HW_CSUM); | ||
1801 | dev->features |= dev->hw_features; | 1803 | dev->features |= dev->hw_features; |
1802 | } | 1804 | } |
1803 | 1805 | ||
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index 3b566fa0f8e6..1ea91f4237f0 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c | |||
@@ -385,6 +385,7 @@ static const struct usb_device_id products[] = { | |||
385 | }, | 385 | }, |
386 | 386 | ||
387 | /* 3. Combined interface devices matching on interface number */ | 387 | /* 3. Combined interface devices matching on interface number */ |
388 | {QMI_FIXED_INTF(0x12d1, 0x140c, 1)}, /* Huawei E173 */ | ||
388 | {QMI_FIXED_INTF(0x19d2, 0x0002, 1)}, | 389 | {QMI_FIXED_INTF(0x19d2, 0x0002, 1)}, |
389 | {QMI_FIXED_INTF(0x19d2, 0x0012, 1)}, | 390 | {QMI_FIXED_INTF(0x19d2, 0x0012, 1)}, |
390 | {QMI_FIXED_INTF(0x19d2, 0x0017, 3)}, | 391 | {QMI_FIXED_INTF(0x19d2, 0x0017, 3)}, |
diff --git a/drivers/net/wan/ixp4xx_hss.c b/drivers/net/wan/ixp4xx_hss.c index e9a3da588e95..760776b3d66c 100644 --- a/drivers/net/wan/ixp4xx_hss.c +++ b/drivers/net/wan/ixp4xx_hss.c | |||
@@ -1365,7 +1365,7 @@ static int __devinit hss_init_one(struct platform_device *pdev) | |||
1365 | 1365 | ||
1366 | platform_set_drvdata(pdev, port); | 1366 | platform_set_drvdata(pdev, port); |
1367 | 1367 | ||
1368 | netdev_info(dev, "HSS-%i\n", port->id); | 1368 | netdev_info(dev, "initialized\n"); |
1369 | return 0; | 1369 | return 0; |
1370 | 1370 | ||
1371 | err_free_netdev: | 1371 | err_free_netdev: |
diff --git a/drivers/net/wireless/iwlwifi/dvm/rxon.c b/drivers/net/wireless/iwlwifi/dvm/rxon.c index 10896393e5a0..2830ea290502 100644 --- a/drivers/net/wireless/iwlwifi/dvm/rxon.c +++ b/drivers/net/wireless/iwlwifi/dvm/rxon.c | |||
@@ -1012,12 +1012,12 @@ static void iwl_calc_basic_rates(struct iwl_priv *priv, | |||
1012 | * As a consequence, it's not as complicated as it sounds, just add | 1012 | * As a consequence, it's not as complicated as it sounds, just add |
1013 | * any lower rates to the ACK rate bitmap. | 1013 | * any lower rates to the ACK rate bitmap. |
1014 | */ | 1014 | */ |
1015 | if (IWL_RATE_11M_INDEX < lowest_present_ofdm) | 1015 | if (IWL_RATE_11M_INDEX < lowest_present_cck) |
1016 | ofdm |= IWL_RATE_11M_MASK >> IWL_FIRST_CCK_RATE; | 1016 | cck |= IWL_RATE_11M_MASK >> IWL_FIRST_CCK_RATE; |
1017 | if (IWL_RATE_5M_INDEX < lowest_present_ofdm) | 1017 | if (IWL_RATE_5M_INDEX < lowest_present_cck) |
1018 | ofdm |= IWL_RATE_5M_MASK >> IWL_FIRST_CCK_RATE; | 1018 | cck |= IWL_RATE_5M_MASK >> IWL_FIRST_CCK_RATE; |
1019 | if (IWL_RATE_2M_INDEX < lowest_present_ofdm) | 1019 | if (IWL_RATE_2M_INDEX < lowest_present_cck) |
1020 | ofdm |= IWL_RATE_2M_MASK >> IWL_FIRST_CCK_RATE; | 1020 | cck |= IWL_RATE_2M_MASK >> IWL_FIRST_CCK_RATE; |
1021 | /* 1M already there or needed so always add */ | 1021 | /* 1M already there or needed so always add */ |
1022 | cck |= IWL_RATE_1M_MASK >> IWL_FIRST_CCK_RATE; | 1022 | cck |= IWL_RATE_1M_MASK >> IWL_FIRST_CCK_RATE; |
1023 | 1023 | ||