diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/bonding/bond_alb.c | 3 | ||||
-rw-r--r-- | drivers/net/bonding/bond_main.c | 33 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 17 | ||||
-rw-r--r-- | drivers/net/ll_temac_main.c | 18 | ||||
-rw-r--r-- | drivers/net/mv643xx_eth.c | 9 | ||||
-rw-r--r-- | drivers/net/ne.c | 4 | ||||
-rw-r--r-- | drivers/net/qlge/qlge_main.c | 11 | ||||
-rw-r--r-- | drivers/net/s2io.c | 101 | ||||
-rw-r--r-- | drivers/net/s2io.h | 4 | ||||
-rw-r--r-- | drivers/net/sb1250-mac.c | 1 | ||||
-rw-r--r-- | drivers/net/usb/rndis_host.c | 18 | ||||
-rw-r--r-- | drivers/net/usb/usbnet.c | 5 | ||||
-rw-r--r-- | drivers/net/virtio_net.c | 28 | ||||
-rw-r--r-- | drivers/net/vxge/vxge-main.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ath9k.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 7 |
18 files changed, 172 insertions, 109 deletions
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c index 40fdc41446cc..df483076eda6 100644 --- a/drivers/net/bonding/bond_alb.c +++ b/drivers/net/bonding/bond_alb.c | |||
@@ -340,7 +340,8 @@ static void rlb_update_entry_from_arp(struct bonding *bond, struct arp_pkt *arp) | |||
340 | 340 | ||
341 | if ((client_info->assigned) && | 341 | if ((client_info->assigned) && |
342 | (client_info->ip_src == arp->ip_dst) && | 342 | (client_info->ip_src == arp->ip_dst) && |
343 | (client_info->ip_dst == arp->ip_src)) { | 343 | (client_info->ip_dst == arp->ip_src) && |
344 | (compare_ether_addr_64bits(client_info->mac_dst, arp->mac_src))) { | ||
344 | /* update the clients MAC address */ | 345 | /* update the clients MAC address */ |
345 | memcpy(client_info->mac_dst, arp->mac_src, ETH_ALEN); | 346 | memcpy(client_info->mac_dst, arp->mac_src, ETH_ALEN); |
346 | client_info->ntt = 1; | 347 | client_info->ntt = 1; |
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 5e12462a9d5e..c3d98dde2f86 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -168,7 +168,7 @@ static int arp_ip_count; | |||
168 | static int bond_mode = BOND_MODE_ROUNDROBIN; | 168 | static int bond_mode = BOND_MODE_ROUNDROBIN; |
169 | static int xmit_hashtype = BOND_XMIT_POLICY_LAYER2; | 169 | static int xmit_hashtype = BOND_XMIT_POLICY_LAYER2; |
170 | static int lacp_fast; | 170 | static int lacp_fast; |
171 | 171 | static int disable_netpoll = 1; | |
172 | 172 | ||
173 | const struct bond_parm_tbl bond_lacp_tbl[] = { | 173 | const struct bond_parm_tbl bond_lacp_tbl[] = { |
174 | { "slow", AD_LACP_SLOW}, | 174 | { "slow", AD_LACP_SLOW}, |
@@ -1742,15 +1742,23 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev) | |||
1742 | bond_set_carrier(bond); | 1742 | bond_set_carrier(bond); |
1743 | 1743 | ||
1744 | #ifdef CONFIG_NET_POLL_CONTROLLER | 1744 | #ifdef CONFIG_NET_POLL_CONTROLLER |
1745 | if (slaves_support_netpoll(bond_dev)) { | 1745 | /* |
1746 | bond_dev->priv_flags &= ~IFF_DISABLE_NETPOLL; | 1746 | * Netpoll and bonding is broken, make sure it is not initialized |
1747 | if (bond_dev->npinfo) | 1747 | * until it is fixed. |
1748 | slave_dev->npinfo = bond_dev->npinfo; | 1748 | */ |
1749 | } else if (!(bond_dev->priv_flags & IFF_DISABLE_NETPOLL)) { | 1749 | if (disable_netpoll) { |
1750 | bond_dev->priv_flags |= IFF_DISABLE_NETPOLL; | 1750 | bond_dev->priv_flags |= IFF_DISABLE_NETPOLL; |
1751 | pr_info("New slave device %s does not support netpoll\n", | 1751 | } else { |
1752 | slave_dev->name); | 1752 | if (slaves_support_netpoll(bond_dev)) { |
1753 | pr_info("Disabling netpoll support for %s\n", bond_dev->name); | 1753 | bond_dev->priv_flags &= ~IFF_DISABLE_NETPOLL; |
1754 | if (bond_dev->npinfo) | ||
1755 | slave_dev->npinfo = bond_dev->npinfo; | ||
1756 | } else if (!(bond_dev->priv_flags & IFF_DISABLE_NETPOLL)) { | ||
1757 | bond_dev->priv_flags |= IFF_DISABLE_NETPOLL; | ||
1758 | pr_info("New slave device %s does not support netpoll\n", | ||
1759 | slave_dev->name); | ||
1760 | pr_info("Disabling netpoll support for %s\n", bond_dev->name); | ||
1761 | } | ||
1754 | } | 1762 | } |
1755 | #endif | 1763 | #endif |
1756 | read_unlock(&bond->lock); | 1764 | read_unlock(&bond->lock); |
@@ -1950,8 +1958,11 @@ int bond_release(struct net_device *bond_dev, struct net_device *slave_dev) | |||
1950 | 1958 | ||
1951 | #ifdef CONFIG_NET_POLL_CONTROLLER | 1959 | #ifdef CONFIG_NET_POLL_CONTROLLER |
1952 | read_lock_bh(&bond->lock); | 1960 | read_lock_bh(&bond->lock); |
1953 | if (slaves_support_netpoll(bond_dev)) | 1961 | |
1954 | bond_dev->priv_flags &= ~IFF_DISABLE_NETPOLL; | 1962 | /* Make sure netpoll over stays disabled until fixed. */ |
1963 | if (!disable_netpoll) | ||
1964 | if (slaves_support_netpoll(bond_dev)) | ||
1965 | bond_dev->priv_flags &= ~IFF_DISABLE_NETPOLL; | ||
1955 | read_unlock_bh(&bond->lock); | 1966 | read_unlock_bh(&bond->lock); |
1956 | if (slave_dev->netdev_ops->ndo_netpoll_cleanup) | 1967 | if (slave_dev->netdev_ops->ndo_netpoll_cleanup) |
1957 | slave_dev->netdev_ops->ndo_netpoll_cleanup(slave_dev); | 1968 | slave_dev->netdev_ops->ndo_netpoll_cleanup(slave_dev); |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index ce30c62a97f7..7b5d9764f317 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -3684,10 +3684,6 @@ void ixgbe_down(struct ixgbe_adapter *adapter) | |||
3684 | /* signal that we are down to the interrupt handler */ | 3684 | /* signal that we are down to the interrupt handler */ |
3685 | set_bit(__IXGBE_DOWN, &adapter->state); | 3685 | set_bit(__IXGBE_DOWN, &adapter->state); |
3686 | 3686 | ||
3687 | /* power down the optics */ | ||
3688 | if (hw->phy.multispeed_fiber) | ||
3689 | hw->mac.ops.disable_tx_laser(hw); | ||
3690 | |||
3691 | /* disable receive for all VFs and wait one second */ | 3687 | /* disable receive for all VFs and wait one second */ |
3692 | if (adapter->num_vfs) { | 3688 | if (adapter->num_vfs) { |
3693 | /* ping all the active vfs to let them know we are going down */ | 3689 | /* ping all the active vfs to let them know we are going down */ |
@@ -3742,6 +3738,10 @@ void ixgbe_down(struct ixgbe_adapter *adapter) | |||
3742 | (IXGBE_READ_REG(hw, IXGBE_DMATXCTL) & | 3738 | (IXGBE_READ_REG(hw, IXGBE_DMATXCTL) & |
3743 | ~IXGBE_DMATXCTL_TE)); | 3739 | ~IXGBE_DMATXCTL_TE)); |
3744 | 3740 | ||
3741 | /* power down the optics */ | ||
3742 | if (hw->phy.multispeed_fiber) | ||
3743 | hw->mac.ops.disable_tx_laser(hw); | ||
3744 | |||
3745 | /* clear n-tuple filters that are cached */ | 3745 | /* clear n-tuple filters that are cached */ |
3746 | ethtool_ntuple_flush(netdev); | 3746 | ethtool_ntuple_flush(netdev); |
3747 | 3747 | ||
@@ -4001,7 +4001,7 @@ static void ixgbe_set_num_queues(struct ixgbe_adapter *adapter) | |||
4001 | 4001 | ||
4002 | done: | 4002 | done: |
4003 | /* Notify the stack of the (possibly) reduced Tx Queue count. */ | 4003 | /* Notify the stack of the (possibly) reduced Tx Queue count. */ |
4004 | adapter->netdev->real_num_tx_queues = adapter->num_tx_queues; | 4004 | netif_set_real_num_tx_queues(adapter->netdev, adapter->num_tx_queues); |
4005 | } | 4005 | } |
4006 | 4006 | ||
4007 | static void ixgbe_acquire_msix_vectors(struct ixgbe_adapter *adapter, | 4007 | static void ixgbe_acquire_msix_vectors(struct ixgbe_adapter *adapter, |
@@ -5195,7 +5195,6 @@ static int __ixgbe_shutdown(struct pci_dev *pdev, bool *enable_wake) | |||
5195 | ixgbe_free_all_tx_resources(adapter); | 5195 | ixgbe_free_all_tx_resources(adapter); |
5196 | ixgbe_free_all_rx_resources(adapter); | 5196 | ixgbe_free_all_rx_resources(adapter); |
5197 | } | 5197 | } |
5198 | ixgbe_clear_interrupt_scheme(adapter); | ||
5199 | 5198 | ||
5200 | #ifdef CONFIG_PM | 5199 | #ifdef CONFIG_PM |
5201 | retval = pci_save_state(pdev); | 5200 | retval = pci_save_state(pdev); |
@@ -5230,6 +5229,8 @@ static int __ixgbe_shutdown(struct pci_dev *pdev, bool *enable_wake) | |||
5230 | 5229 | ||
5231 | *enable_wake = !!wufc; | 5230 | *enable_wake = !!wufc; |
5232 | 5231 | ||
5232 | ixgbe_clear_interrupt_scheme(adapter); | ||
5233 | |||
5233 | ixgbe_release_hw_control(adapter); | 5234 | ixgbe_release_hw_control(adapter); |
5234 | 5235 | ||
5235 | pci_disable_device(pdev); | 5236 | pci_disable_device(pdev); |
@@ -6023,7 +6024,6 @@ static void ixgbe_tx_queue(struct ixgbe_adapter *adapter, | |||
6023 | static void ixgbe_atr(struct ixgbe_adapter *adapter, struct sk_buff *skb, | 6024 | static void ixgbe_atr(struct ixgbe_adapter *adapter, struct sk_buff *skb, |
6024 | int queue, u32 tx_flags) | 6025 | int queue, u32 tx_flags) |
6025 | { | 6026 | { |
6026 | /* Right now, we support IPv4 only */ | ||
6027 | struct ixgbe_atr_input atr_input; | 6027 | struct ixgbe_atr_input atr_input; |
6028 | struct tcphdr *th; | 6028 | struct tcphdr *th; |
6029 | struct iphdr *iph = ip_hdr(skb); | 6029 | struct iphdr *iph = ip_hdr(skb); |
@@ -6032,6 +6032,9 @@ static void ixgbe_atr(struct ixgbe_adapter *adapter, struct sk_buff *skb, | |||
6032 | u32 src_ipv4_addr, dst_ipv4_addr; | 6032 | u32 src_ipv4_addr, dst_ipv4_addr; |
6033 | u8 l4type = 0; | 6033 | u8 l4type = 0; |
6034 | 6034 | ||
6035 | /* Right now, we support IPv4 only */ | ||
6036 | if (skb->protocol != htons(ETH_P_IP)) | ||
6037 | return; | ||
6035 | /* check if we're UDP or TCP */ | 6038 | /* check if we're UDP or TCP */ |
6036 | if (iph->protocol == IPPROTO_TCP) { | 6039 | if (iph->protocol == IPPROTO_TCP) { |
6037 | th = tcp_hdr(skb); | 6040 | th = tcp_hdr(skb); |
diff --git a/drivers/net/ll_temac_main.c b/drivers/net/ll_temac_main.c index 52dcc8495647..6474c4973d3a 100644 --- a/drivers/net/ll_temac_main.c +++ b/drivers/net/ll_temac_main.c | |||
@@ -964,7 +964,7 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match) | |||
964 | np = of_parse_phandle(op->dev.of_node, "llink-connected", 0); | 964 | np = of_parse_phandle(op->dev.of_node, "llink-connected", 0); |
965 | if (!np) { | 965 | if (!np) { |
966 | dev_err(&op->dev, "could not find DMA node\n"); | 966 | dev_err(&op->dev, "could not find DMA node\n"); |
967 | goto nodev; | 967 | goto err_iounmap; |
968 | } | 968 | } |
969 | 969 | ||
970 | /* Setup the DMA register accesses, could be DCR or memory mapped */ | 970 | /* Setup the DMA register accesses, could be DCR or memory mapped */ |
@@ -978,7 +978,7 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match) | |||
978 | dev_dbg(&op->dev, "MEM base: %p\n", lp->sdma_regs); | 978 | dev_dbg(&op->dev, "MEM base: %p\n", lp->sdma_regs); |
979 | } else { | 979 | } else { |
980 | dev_err(&op->dev, "unable to map DMA registers\n"); | 980 | dev_err(&op->dev, "unable to map DMA registers\n"); |
981 | goto nodev; | 981 | goto err_iounmap; |
982 | } | 982 | } |
983 | } | 983 | } |
984 | 984 | ||
@@ -987,7 +987,7 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match) | |||
987 | if ((lp->rx_irq == NO_IRQ) || (lp->tx_irq == NO_IRQ)) { | 987 | if ((lp->rx_irq == NO_IRQ) || (lp->tx_irq == NO_IRQ)) { |
988 | dev_err(&op->dev, "could not determine irqs\n"); | 988 | dev_err(&op->dev, "could not determine irqs\n"); |
989 | rc = -ENOMEM; | 989 | rc = -ENOMEM; |
990 | goto nodev; | 990 | goto err_iounmap_2; |
991 | } | 991 | } |
992 | 992 | ||
993 | of_node_put(np); /* Finished with the DMA node; drop the reference */ | 993 | of_node_put(np); /* Finished with the DMA node; drop the reference */ |
@@ -997,7 +997,7 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match) | |||
997 | if ((!addr) || (size != 6)) { | 997 | if ((!addr) || (size != 6)) { |
998 | dev_err(&op->dev, "could not find MAC address\n"); | 998 | dev_err(&op->dev, "could not find MAC address\n"); |
999 | rc = -ENODEV; | 999 | rc = -ENODEV; |
1000 | goto nodev; | 1000 | goto err_iounmap_2; |
1001 | } | 1001 | } |
1002 | temac_set_mac_address(ndev, (void *)addr); | 1002 | temac_set_mac_address(ndev, (void *)addr); |
1003 | 1003 | ||
@@ -1013,7 +1013,7 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match) | |||
1013 | rc = sysfs_create_group(&lp->dev->kobj, &temac_attr_group); | 1013 | rc = sysfs_create_group(&lp->dev->kobj, &temac_attr_group); |
1014 | if (rc) { | 1014 | if (rc) { |
1015 | dev_err(lp->dev, "Error creating sysfs files\n"); | 1015 | dev_err(lp->dev, "Error creating sysfs files\n"); |
1016 | goto nodev; | 1016 | goto err_iounmap_2; |
1017 | } | 1017 | } |
1018 | 1018 | ||
1019 | rc = register_netdev(lp->ndev); | 1019 | rc = register_netdev(lp->ndev); |
@@ -1026,6 +1026,11 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match) | |||
1026 | 1026 | ||
1027 | err_register_ndev: | 1027 | err_register_ndev: |
1028 | sysfs_remove_group(&lp->dev->kobj, &temac_attr_group); | 1028 | sysfs_remove_group(&lp->dev->kobj, &temac_attr_group); |
1029 | err_iounmap_2: | ||
1030 | if (lp->sdma_regs) | ||
1031 | iounmap(lp->sdma_regs); | ||
1032 | err_iounmap: | ||
1033 | iounmap(lp->regs); | ||
1029 | nodev: | 1034 | nodev: |
1030 | free_netdev(ndev); | 1035 | free_netdev(ndev); |
1031 | ndev = NULL; | 1036 | ndev = NULL; |
@@ -1044,6 +1049,9 @@ static int __devexit temac_of_remove(struct of_device *op) | |||
1044 | of_node_put(lp->phy_node); | 1049 | of_node_put(lp->phy_node); |
1045 | lp->phy_node = NULL; | 1050 | lp->phy_node = NULL; |
1046 | dev_set_drvdata(&op->dev, NULL); | 1051 | dev_set_drvdata(&op->dev, NULL); |
1052 | iounmap(lp->regs); | ||
1053 | if (lp->sdma_regs) | ||
1054 | iounmap(lp->sdma_regs); | ||
1047 | free_netdev(ndev); | 1055 | free_netdev(ndev); |
1048 | return 0; | 1056 | return 0; |
1049 | } | 1057 | } |
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index e345ec8cb473..73bb8ea6f54a 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c | |||
@@ -289,6 +289,7 @@ struct mv643xx_eth_shared_private { | |||
289 | unsigned int t_clk; | 289 | unsigned int t_clk; |
290 | int extended_rx_coal_limit; | 290 | int extended_rx_coal_limit; |
291 | int tx_bw_control; | 291 | int tx_bw_control; |
292 | int tx_csum_limit; | ||
292 | }; | 293 | }; |
293 | 294 | ||
294 | #define TX_BW_CONTROL_ABSENT 0 | 295 | #define TX_BW_CONTROL_ABSENT 0 |
@@ -776,13 +777,16 @@ static int txq_submit_skb(struct tx_queue *txq, struct sk_buff *skb) | |||
776 | l4i_chk = 0; | 777 | l4i_chk = 0; |
777 | 778 | ||
778 | if (skb->ip_summed == CHECKSUM_PARTIAL) { | 779 | if (skb->ip_summed == CHECKSUM_PARTIAL) { |
780 | int hdr_len; | ||
779 | int tag_bytes; | 781 | int tag_bytes; |
780 | 782 | ||
781 | BUG_ON(skb->protocol != htons(ETH_P_IP) && | 783 | BUG_ON(skb->protocol != htons(ETH_P_IP) && |
782 | skb->protocol != htons(ETH_P_8021Q)); | 784 | skb->protocol != htons(ETH_P_8021Q)); |
783 | 785 | ||
784 | tag_bytes = (void *)ip_hdr(skb) - (void *)skb->data - ETH_HLEN; | 786 | hdr_len = (void *)ip_hdr(skb) - (void *)skb->data; |
785 | if (unlikely(tag_bytes & ~12)) { | 787 | tag_bytes = hdr_len - ETH_HLEN; |
788 | if (skb->len - hdr_len > mp->shared->tx_csum_limit || | ||
789 | unlikely(tag_bytes & ~12)) { | ||
786 | if (skb_checksum_help(skb) == 0) | 790 | if (skb_checksum_help(skb) == 0) |
787 | goto no_csum; | 791 | goto no_csum; |
788 | kfree_skb(skb); | 792 | kfree_skb(skb); |
@@ -2666,6 +2670,7 @@ static int mv643xx_eth_shared_probe(struct platform_device *pdev) | |||
2666 | * Detect hardware parameters. | 2670 | * Detect hardware parameters. |
2667 | */ | 2671 | */ |
2668 | msp->t_clk = (pd != NULL && pd->t_clk != 0) ? pd->t_clk : 133000000; | 2672 | msp->t_clk = (pd != NULL && pd->t_clk != 0) ? pd->t_clk : 133000000; |
2673 | msp->tx_csum_limit = pd->tx_csum_limit ? pd->tx_csum_limit : 9 * 1024; | ||
2669 | infer_hw_params(msp); | 2674 | infer_hw_params(msp); |
2670 | 2675 | ||
2671 | platform_set_drvdata(pdev, msp); | 2676 | platform_set_drvdata(pdev, msp); |
diff --git a/drivers/net/ne.c b/drivers/net/ne.c index b8e2923a1d69..1063093b3afc 100644 --- a/drivers/net/ne.c +++ b/drivers/net/ne.c | |||
@@ -806,8 +806,10 @@ static int __init ne_drv_probe(struct platform_device *pdev) | |||
806 | dev->base_addr = res->start; | 806 | dev->base_addr = res->start; |
807 | dev->irq = platform_get_irq(pdev, 0); | 807 | dev->irq = platform_get_irq(pdev, 0); |
808 | } else { | 808 | } else { |
809 | if (this_dev < 0 || this_dev >= MAX_NE_CARDS) | 809 | if (this_dev < 0 || this_dev >= MAX_NE_CARDS) { |
810 | free_netdev(dev); | ||
810 | return -EINVAL; | 811 | return -EINVAL; |
812 | } | ||
811 | dev->base_addr = io[this_dev]; | 813 | dev->base_addr = io[this_dev]; |
812 | dev->irq = irq[this_dev]; | 814 | dev->irq = irq[this_dev]; |
813 | dev->mem_end = bad[this_dev]; | 815 | dev->mem_end = bad[this_dev]; |
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index fa4b24c49f42..d10bcefc0e45 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c | |||
@@ -4611,8 +4611,7 @@ static void ql_timer(unsigned long data) | |||
4611 | return; | 4611 | return; |
4612 | } | 4612 | } |
4613 | 4613 | ||
4614 | qdev->timer.expires = jiffies + (5*HZ); | 4614 | mod_timer(&qdev->timer, jiffies + (5*HZ)); |
4615 | add_timer(&qdev->timer); | ||
4616 | } | 4615 | } |
4617 | 4616 | ||
4618 | static int __devinit qlge_probe(struct pci_dev *pdev, | 4617 | static int __devinit qlge_probe(struct pci_dev *pdev, |
@@ -4713,6 +4712,8 @@ static void ql_eeh_close(struct net_device *ndev) | |||
4713 | netif_stop_queue(ndev); | 4712 | netif_stop_queue(ndev); |
4714 | } | 4713 | } |
4715 | 4714 | ||
4715 | /* Disabling the timer */ | ||
4716 | del_timer_sync(&qdev->timer); | ||
4716 | if (test_bit(QL_ADAPTER_UP, &qdev->flags)) | 4717 | if (test_bit(QL_ADAPTER_UP, &qdev->flags)) |
4717 | cancel_delayed_work_sync(&qdev->asic_reset_work); | 4718 | cancel_delayed_work_sync(&qdev->asic_reset_work); |
4718 | cancel_delayed_work_sync(&qdev->mpi_reset_work); | 4719 | cancel_delayed_work_sync(&qdev->mpi_reset_work); |
@@ -4808,8 +4809,7 @@ static void qlge_io_resume(struct pci_dev *pdev) | |||
4808 | netif_err(qdev, ifup, qdev->ndev, | 4809 | netif_err(qdev, ifup, qdev->ndev, |
4809 | "Device was not running prior to EEH.\n"); | 4810 | "Device was not running prior to EEH.\n"); |
4810 | } | 4811 | } |
4811 | qdev->timer.expires = jiffies + (5*HZ); | 4812 | mod_timer(&qdev->timer, jiffies + (5*HZ)); |
4812 | add_timer(&qdev->timer); | ||
4813 | netif_device_attach(ndev); | 4813 | netif_device_attach(ndev); |
4814 | } | 4814 | } |
4815 | 4815 | ||
@@ -4871,8 +4871,7 @@ static int qlge_resume(struct pci_dev *pdev) | |||
4871 | return err; | 4871 | return err; |
4872 | } | 4872 | } |
4873 | 4873 | ||
4874 | qdev->timer.expires = jiffies + (5*HZ); | 4874 | mod_timer(&qdev->timer, jiffies + (5*HZ)); |
4875 | add_timer(&qdev->timer); | ||
4876 | netif_device_attach(ndev); | 4875 | netif_device_attach(ndev); |
4877 | 4876 | ||
4878 | return 0; | 4877 | return 0; |
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index 668327ccd8d0..1d37f0c310ca 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c | |||
@@ -3130,7 +3130,6 @@ static void tx_intr_handler(struct fifo_info *fifo_data) | |||
3130 | pkt_cnt++; | 3130 | pkt_cnt++; |
3131 | 3131 | ||
3132 | /* Updating the statistics block */ | 3132 | /* Updating the statistics block */ |
3133 | nic->dev->stats.tx_bytes += skb->len; | ||
3134 | swstats->mem_freed += skb->truesize; | 3133 | swstats->mem_freed += skb->truesize; |
3135 | dev_kfree_skb_irq(skb); | 3134 | dev_kfree_skb_irq(skb); |
3136 | 3135 | ||
@@ -4901,48 +4900,81 @@ static void s2io_updt_stats(struct s2io_nic *sp) | |||
4901 | * Return value: | 4900 | * Return value: |
4902 | * pointer to the updated net_device_stats structure. | 4901 | * pointer to the updated net_device_stats structure. |
4903 | */ | 4902 | */ |
4904 | |||
4905 | static struct net_device_stats *s2io_get_stats(struct net_device *dev) | 4903 | static struct net_device_stats *s2io_get_stats(struct net_device *dev) |
4906 | { | 4904 | { |
4907 | struct s2io_nic *sp = netdev_priv(dev); | 4905 | struct s2io_nic *sp = netdev_priv(dev); |
4908 | struct config_param *config = &sp->config; | ||
4909 | struct mac_info *mac_control = &sp->mac_control; | 4906 | struct mac_info *mac_control = &sp->mac_control; |
4910 | struct stat_block *stats = mac_control->stats_info; | 4907 | struct stat_block *stats = mac_control->stats_info; |
4911 | int i; | 4908 | u64 delta; |
4912 | 4909 | ||
4913 | /* Configure Stats for immediate updt */ | 4910 | /* Configure Stats for immediate updt */ |
4914 | s2io_updt_stats(sp); | 4911 | s2io_updt_stats(sp); |
4915 | 4912 | ||
4916 | /* Using sp->stats as a staging area, because reset (due to mtu | 4913 | /* A device reset will cause the on-adapter statistics to be zero'ed. |
4917 | change, for example) will clear some hardware counters */ | 4914 | * This can be done while running by changing the MTU. To prevent the |
4918 | dev->stats.tx_packets += le32_to_cpu(stats->tmac_frms) - | 4915 | * system from having the stats zero'ed, the driver keeps a copy of the |
4919 | sp->stats.tx_packets; | 4916 | * last update to the system (which is also zero'ed on reset). This |
4920 | sp->stats.tx_packets = le32_to_cpu(stats->tmac_frms); | 4917 | * enables the driver to accurately know the delta between the last |
4921 | 4918 | * update and the current update. | |
4922 | dev->stats.tx_errors += le32_to_cpu(stats->tmac_any_err_frms) - | 4919 | */ |
4923 | sp->stats.tx_errors; | 4920 | delta = ((u64) le32_to_cpu(stats->rmac_vld_frms_oflow) << 32 | |
4924 | sp->stats.tx_errors = le32_to_cpu(stats->tmac_any_err_frms); | 4921 | le32_to_cpu(stats->rmac_vld_frms)) - sp->stats.rx_packets; |
4925 | 4922 | sp->stats.rx_packets += delta; | |
4926 | dev->stats.rx_errors += le64_to_cpu(stats->rmac_drop_frms) - | 4923 | dev->stats.rx_packets += delta; |
4927 | sp->stats.rx_errors; | 4924 | |
4928 | sp->stats.rx_errors = le64_to_cpu(stats->rmac_drop_frms); | 4925 | delta = ((u64) le32_to_cpu(stats->tmac_frms_oflow) << 32 | |
4929 | 4926 | le32_to_cpu(stats->tmac_frms)) - sp->stats.tx_packets; | |
4930 | dev->stats.multicast = le32_to_cpu(stats->rmac_vld_mcst_frms) - | 4927 | sp->stats.tx_packets += delta; |
4931 | sp->stats.multicast; | 4928 | dev->stats.tx_packets += delta; |
4932 | sp->stats.multicast = le32_to_cpu(stats->rmac_vld_mcst_frms); | 4929 | |
4933 | 4930 | delta = ((u64) le32_to_cpu(stats->rmac_data_octets_oflow) << 32 | | |
4934 | dev->stats.rx_length_errors = le64_to_cpu(stats->rmac_long_frms) - | 4931 | le32_to_cpu(stats->rmac_data_octets)) - sp->stats.rx_bytes; |
4935 | sp->stats.rx_length_errors; | 4932 | sp->stats.rx_bytes += delta; |
4936 | sp->stats.rx_length_errors = le64_to_cpu(stats->rmac_long_frms); | 4933 | dev->stats.rx_bytes += delta; |
4934 | |||
4935 | delta = ((u64) le32_to_cpu(stats->tmac_data_octets_oflow) << 32 | | ||
4936 | le32_to_cpu(stats->tmac_data_octets)) - sp->stats.tx_bytes; | ||
4937 | sp->stats.tx_bytes += delta; | ||
4938 | dev->stats.tx_bytes += delta; | ||
4939 | |||
4940 | delta = le64_to_cpu(stats->rmac_drop_frms) - sp->stats.rx_errors; | ||
4941 | sp->stats.rx_errors += delta; | ||
4942 | dev->stats.rx_errors += delta; | ||
4943 | |||
4944 | delta = ((u64) le32_to_cpu(stats->tmac_any_err_frms_oflow) << 32 | | ||
4945 | le32_to_cpu(stats->tmac_any_err_frms)) - sp->stats.tx_errors; | ||
4946 | sp->stats.tx_errors += delta; | ||
4947 | dev->stats.tx_errors += delta; | ||
4948 | |||
4949 | delta = le64_to_cpu(stats->rmac_drop_frms) - sp->stats.rx_dropped; | ||
4950 | sp->stats.rx_dropped += delta; | ||
4951 | dev->stats.rx_dropped += delta; | ||
4952 | |||
4953 | delta = le64_to_cpu(stats->tmac_drop_frms) - sp->stats.tx_dropped; | ||
4954 | sp->stats.tx_dropped += delta; | ||
4955 | dev->stats.tx_dropped += delta; | ||
4956 | |||
4957 | /* The adapter MAC interprets pause frames as multicast packets, but | ||
4958 | * does not pass them up. This erroneously increases the multicast | ||
4959 | * packet count and needs to be deducted when the multicast frame count | ||
4960 | * is queried. | ||
4961 | */ | ||
4962 | delta = (u64) le32_to_cpu(stats->rmac_vld_mcst_frms_oflow) << 32 | | ||
4963 | le32_to_cpu(stats->rmac_vld_mcst_frms); | ||
4964 | delta -= le64_to_cpu(stats->rmac_pause_ctrl_frms); | ||
4965 | delta -= sp->stats.multicast; | ||
4966 | sp->stats.multicast += delta; | ||
4967 | dev->stats.multicast += delta; | ||
4937 | 4968 | ||
4938 | /* collect per-ring rx_packets and rx_bytes */ | 4969 | delta = ((u64) le32_to_cpu(stats->rmac_usized_frms_oflow) << 32 | |
4939 | dev->stats.rx_packets = dev->stats.rx_bytes = 0; | 4970 | le32_to_cpu(stats->rmac_usized_frms)) + |
4940 | for (i = 0; i < config->rx_ring_num; i++) { | 4971 | le64_to_cpu(stats->rmac_long_frms) - sp->stats.rx_length_errors; |
4941 | struct ring_info *ring = &mac_control->rings[i]; | 4972 | sp->stats.rx_length_errors += delta; |
4973 | dev->stats.rx_length_errors += delta; | ||
4942 | 4974 | ||
4943 | dev->stats.rx_packets += ring->rx_packets; | 4975 | delta = le64_to_cpu(stats->rmac_fcs_err_frms) - sp->stats.rx_crc_errors; |
4944 | dev->stats.rx_bytes += ring->rx_bytes; | 4976 | sp->stats.rx_crc_errors += delta; |
4945 | } | 4977 | dev->stats.rx_crc_errors += delta; |
4946 | 4978 | ||
4947 | return &dev->stats; | 4979 | return &dev->stats; |
4948 | } | 4980 | } |
@@ -7455,15 +7487,11 @@ static int rx_osm_handler(struct ring_info *ring_data, struct RxD_t * rxdp) | |||
7455 | } | 7487 | } |
7456 | } | 7488 | } |
7457 | 7489 | ||
7458 | /* Updating statistics */ | ||
7459 | ring_data->rx_packets++; | ||
7460 | rxdp->Host_Control = 0; | 7490 | rxdp->Host_Control = 0; |
7461 | if (sp->rxd_mode == RXD_MODE_1) { | 7491 | if (sp->rxd_mode == RXD_MODE_1) { |
7462 | int len = RXD_GET_BUFFER0_SIZE_1(rxdp->Control_2); | 7492 | int len = RXD_GET_BUFFER0_SIZE_1(rxdp->Control_2); |
7463 | 7493 | ||
7464 | ring_data->rx_bytes += len; | ||
7465 | skb_put(skb, len); | 7494 | skb_put(skb, len); |
7466 | |||
7467 | } else if (sp->rxd_mode == RXD_MODE_3B) { | 7495 | } else if (sp->rxd_mode == RXD_MODE_3B) { |
7468 | int get_block = ring_data->rx_curr_get_info.block_index; | 7496 | int get_block = ring_data->rx_curr_get_info.block_index; |
7469 | int get_off = ring_data->rx_curr_get_info.offset; | 7497 | int get_off = ring_data->rx_curr_get_info.offset; |
@@ -7472,7 +7500,6 @@ static int rx_osm_handler(struct ring_info *ring_data, struct RxD_t * rxdp) | |||
7472 | unsigned char *buff = skb_push(skb, buf0_len); | 7500 | unsigned char *buff = skb_push(skb, buf0_len); |
7473 | 7501 | ||
7474 | struct buffAdd *ba = &ring_data->ba[get_block][get_off]; | 7502 | struct buffAdd *ba = &ring_data->ba[get_block][get_off]; |
7475 | ring_data->rx_bytes += buf0_len + buf2_len; | ||
7476 | memcpy(buff, ba->ba_0, buf0_len); | 7503 | memcpy(buff, ba->ba_0, buf0_len); |
7477 | skb_put(skb, buf2_len); | 7504 | skb_put(skb, buf2_len); |
7478 | } | 7505 | } |
diff --git a/drivers/net/s2io.h b/drivers/net/s2io.h index 47c36e0994f5..5e52c75892df 100644 --- a/drivers/net/s2io.h +++ b/drivers/net/s2io.h | |||
@@ -745,10 +745,6 @@ struct ring_info { | |||
745 | 745 | ||
746 | /* Buffer Address store. */ | 746 | /* Buffer Address store. */ |
747 | struct buffAdd **ba; | 747 | struct buffAdd **ba; |
748 | |||
749 | /* per-Ring statistics */ | ||
750 | unsigned long rx_packets; | ||
751 | unsigned long rx_bytes; | ||
752 | } ____cacheline_aligned; | 748 | } ____cacheline_aligned; |
753 | 749 | ||
754 | /* Fifo specific structure */ | 750 | /* Fifo specific structure */ |
diff --git a/drivers/net/sb1250-mac.c b/drivers/net/sb1250-mac.c index 1f3acc3a5dfd..79eee3062083 100644 --- a/drivers/net/sb1250-mac.c +++ b/drivers/net/sb1250-mac.c | |||
@@ -2671,6 +2671,7 @@ static struct platform_driver sbmac_driver = { | |||
2671 | .remove = __exit_p(sbmac_remove), | 2671 | .remove = __exit_p(sbmac_remove), |
2672 | .driver = { | 2672 | .driver = { |
2673 | .name = sbmac_string, | 2673 | .name = sbmac_string, |
2674 | .owner = THIS_MODULE, | ||
2674 | }, | 2675 | }, |
2675 | }; | 2676 | }; |
2676 | 2677 | ||
diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c index 28d3ee175e7b..dd8a4adf48ca 100644 --- a/drivers/net/usb/rndis_host.c +++ b/drivers/net/usb/rndis_host.c | |||
@@ -104,10 +104,8 @@ static void rndis_msg_indicate(struct usbnet *dev, struct rndis_indicate *msg, | |||
104 | int rndis_command(struct usbnet *dev, struct rndis_msg_hdr *buf, int buflen) | 104 | int rndis_command(struct usbnet *dev, struct rndis_msg_hdr *buf, int buflen) |
105 | { | 105 | { |
106 | struct cdc_state *info = (void *) &dev->data; | 106 | struct cdc_state *info = (void *) &dev->data; |
107 | struct usb_cdc_notification notification; | ||
108 | int master_ifnum; | 107 | int master_ifnum; |
109 | int retval; | 108 | int retval; |
110 | int partial; | ||
111 | unsigned count; | 109 | unsigned count; |
112 | __le32 rsp; | 110 | __le32 rsp; |
113 | u32 xid = 0, msg_len, request_id; | 111 | u32 xid = 0, msg_len, request_id; |
@@ -135,17 +133,13 @@ int rndis_command(struct usbnet *dev, struct rndis_msg_hdr *buf, int buflen) | |||
135 | if (unlikely(retval < 0 || xid == 0)) | 133 | if (unlikely(retval < 0 || xid == 0)) |
136 | return retval; | 134 | return retval; |
137 | 135 | ||
138 | /* Some devices don't respond on the control channel until | 136 | // FIXME Seems like some devices discard responses when |
139 | * polled on the status channel, so do that first. */ | 137 | // we time out and cancel our "get response" requests... |
140 | retval = usb_interrupt_msg( | 138 | // so, this is fragile. Probably need to poll for status. |
141 | dev->udev, | ||
142 | usb_rcvintpipe(dev->udev, dev->status->desc.bEndpointAddress), | ||
143 | ¬ification, sizeof(notification), &partial, | ||
144 | RNDIS_CONTROL_TIMEOUT_MS); | ||
145 | if (unlikely(retval < 0)) | ||
146 | return retval; | ||
147 | 139 | ||
148 | /* Poll the control channel; the request probably completed immediately */ | 140 | /* ignore status endpoint, just poll the control channel; |
141 | * the request probably completed immediately | ||
142 | */ | ||
149 | rsp = buf->msg_type | RNDIS_MSG_COMPLETION; | 143 | rsp = buf->msg_type | RNDIS_MSG_COMPLETION; |
150 | for (count = 0; count < 10; count++) { | 144 | for (count = 0; count < 10; count++) { |
151 | memset(buf, 0, CONTROL_BUFFER_SIZE); | 145 | memset(buf, 0, CONTROL_BUFFER_SIZE); |
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index a95c73de5824..81c76ada8e56 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c | |||
@@ -1293,6 +1293,9 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) | |||
1293 | goto out; | 1293 | goto out; |
1294 | } | 1294 | } |
1295 | 1295 | ||
1296 | /* netdev_printk() needs this so do it as early as possible */ | ||
1297 | SET_NETDEV_DEV(net, &udev->dev); | ||
1298 | |||
1296 | dev = netdev_priv(net); | 1299 | dev = netdev_priv(net); |
1297 | dev->udev = xdev; | 1300 | dev->udev = xdev; |
1298 | dev->intf = udev; | 1301 | dev->intf = udev; |
@@ -1377,8 +1380,6 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) | |||
1377 | dev->rx_urb_size = dev->hard_mtu; | 1380 | dev->rx_urb_size = dev->hard_mtu; |
1378 | dev->maxpacket = usb_maxpacket (dev->udev, dev->out, 1); | 1381 | dev->maxpacket = usb_maxpacket (dev->udev, dev->out, 1); |
1379 | 1382 | ||
1380 | SET_NETDEV_DEV(net, &udev->dev); | ||
1381 | |||
1382 | if ((dev->driver_info->flags & FLAG_WLAN) != 0) | 1383 | if ((dev->driver_info->flags & FLAG_WLAN) != 0) |
1383 | SET_NETDEV_DEVTYPE(net, &wlan_type); | 1384 | SET_NETDEV_DEVTYPE(net, &wlan_type); |
1384 | if ((dev->driver_info->flags & FLAG_WWAN) != 0) | 1385 | if ((dev->driver_info->flags & FLAG_WWAN) != 0) |
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 1edb7a61983c..bb6b67f6b0cc 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c | |||
@@ -415,7 +415,7 @@ static int add_recvbuf_mergeable(struct virtnet_info *vi, gfp_t gfp) | |||
415 | static bool try_fill_recv(struct virtnet_info *vi, gfp_t gfp) | 415 | static bool try_fill_recv(struct virtnet_info *vi, gfp_t gfp) |
416 | { | 416 | { |
417 | int err; | 417 | int err; |
418 | bool oom = false; | 418 | bool oom; |
419 | 419 | ||
420 | do { | 420 | do { |
421 | if (vi->mergeable_rx_bufs) | 421 | if (vi->mergeable_rx_bufs) |
@@ -425,10 +425,9 @@ static bool try_fill_recv(struct virtnet_info *vi, gfp_t gfp) | |||
425 | else | 425 | else |
426 | err = add_recvbuf_small(vi, gfp); | 426 | err = add_recvbuf_small(vi, gfp); |
427 | 427 | ||
428 | if (err < 0) { | 428 | oom = err == -ENOMEM; |
429 | oom = true; | 429 | if (err < 0) |
430 | break; | 430 | break; |
431 | } | ||
432 | ++vi->num; | 431 | ++vi->num; |
433 | } while (err > 0); | 432 | } while (err > 0); |
434 | if (unlikely(vi->num > vi->max)) | 433 | if (unlikely(vi->num > vi->max)) |
@@ -563,7 +562,6 @@ static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
563 | struct virtnet_info *vi = netdev_priv(dev); | 562 | struct virtnet_info *vi = netdev_priv(dev); |
564 | int capacity; | 563 | int capacity; |
565 | 564 | ||
566 | again: | ||
567 | /* Free up any pending old buffers before queueing new ones. */ | 565 | /* Free up any pending old buffers before queueing new ones. */ |
568 | free_old_xmit_skbs(vi); | 566 | free_old_xmit_skbs(vi); |
569 | 567 | ||
@@ -572,14 +570,20 @@ again: | |||
572 | 570 | ||
573 | /* This can happen with OOM and indirect buffers. */ | 571 | /* This can happen with OOM and indirect buffers. */ |
574 | if (unlikely(capacity < 0)) { | 572 | if (unlikely(capacity < 0)) { |
575 | netif_stop_queue(dev); | 573 | if (net_ratelimit()) { |
576 | dev_warn(&dev->dev, "Unexpected full queue\n"); | 574 | if (likely(capacity == -ENOMEM)) { |
577 | if (unlikely(!virtqueue_enable_cb(vi->svq))) { | 575 | dev_warn(&dev->dev, |
578 | virtqueue_disable_cb(vi->svq); | 576 | "TX queue failure: out of memory\n"); |
579 | netif_start_queue(dev); | 577 | } else { |
580 | goto again; | 578 | dev->stats.tx_fifo_errors++; |
579 | dev_warn(&dev->dev, | ||
580 | "Unexpected TX queue failure: %d\n", | ||
581 | capacity); | ||
582 | } | ||
581 | } | 583 | } |
582 | return NETDEV_TX_BUSY; | 584 | dev->stats.tx_dropped++; |
585 | kfree_skb(skb); | ||
586 | return NETDEV_TX_OK; | ||
583 | } | 587 | } |
584 | virtqueue_kick(vi->svq); | 588 | virtqueue_kick(vi->svq); |
585 | 589 | ||
diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c index d14e207de1df..fc8b2d7a0919 100644 --- a/drivers/net/vxge/vxge-main.c +++ b/drivers/net/vxge/vxge-main.c | |||
@@ -4517,9 +4517,9 @@ vxge_starter(void) | |||
4517 | char version[32]; | 4517 | char version[32]; |
4518 | snprintf(version, 32, "%s", DRV_VERSION); | 4518 | snprintf(version, 32, "%s", DRV_VERSION); |
4519 | 4519 | ||
4520 | printk(KERN_CRIT "%s: Copyright(c) 2002-2009 Neterion Inc\n", | 4520 | printk(KERN_INFO "%s: Copyright(c) 2002-2009 Neterion Inc\n", |
4521 | VXGE_DRIVER_NAME); | 4521 | VXGE_DRIVER_NAME); |
4522 | printk(KERN_CRIT "%s: Driver version: %s\n", | 4522 | printk(KERN_INFO "%s: Driver version: %s\n", |
4523 | VXGE_DRIVER_NAME, version); | 4523 | VXGE_DRIVER_NAME, version); |
4524 | 4524 | ||
4525 | verify_bandwidth(); | 4525 | verify_bandwidth(); |
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index fbb7dec6ddeb..5ea87736a6ae 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h | |||
@@ -445,6 +445,7 @@ void ath_deinit_leds(struct ath_softc *sc); | |||
445 | #define SC_OP_TSF_RESET BIT(11) | 445 | #define SC_OP_TSF_RESET BIT(11) |
446 | #define SC_OP_BT_PRIORITY_DETECTED BIT(12) | 446 | #define SC_OP_BT_PRIORITY_DETECTED BIT(12) |
447 | #define SC_OP_BT_SCAN BIT(13) | 447 | #define SC_OP_BT_SCAN BIT(13) |
448 | #define SC_OP_ANI_RUN BIT(14) | ||
448 | 449 | ||
449 | /* Powersave flags */ | 450 | /* Powersave flags */ |
450 | #define PS_WAIT_FOR_BEACON BIT(0) | 451 | #define PS_WAIT_FOR_BEACON BIT(0) |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index abfa0493236f..1e2a68ea9355 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -336,6 +336,10 @@ set_timer: | |||
336 | static void ath_start_ani(struct ath_common *common) | 336 | static void ath_start_ani(struct ath_common *common) |
337 | { | 337 | { |
338 | unsigned long timestamp = jiffies_to_msecs(jiffies); | 338 | unsigned long timestamp = jiffies_to_msecs(jiffies); |
339 | struct ath_softc *sc = (struct ath_softc *) common->priv; | ||
340 | |||
341 | if (!(sc->sc_flags & SC_OP_ANI_RUN)) | ||
342 | return; | ||
339 | 343 | ||
340 | common->ani.longcal_timer = timestamp; | 344 | common->ani.longcal_timer = timestamp; |
341 | common->ani.shortcal_timer = timestamp; | 345 | common->ani.shortcal_timer = timestamp; |
@@ -872,11 +876,13 @@ static void ath9k_bss_assoc_info(struct ath_softc *sc, | |||
872 | /* Reset rssi stats */ | 876 | /* Reset rssi stats */ |
873 | sc->sc_ah->stats.avgbrssi = ATH_RSSI_DUMMY_MARKER; | 877 | sc->sc_ah->stats.avgbrssi = ATH_RSSI_DUMMY_MARKER; |
874 | 878 | ||
879 | sc->sc_flags |= SC_OP_ANI_RUN; | ||
875 | ath_start_ani(common); | 880 | ath_start_ani(common); |
876 | } else { | 881 | } else { |
877 | ath_print(common, ATH_DBG_CONFIG, "Bss Info DISASSOC\n"); | 882 | ath_print(common, ATH_DBG_CONFIG, "Bss Info DISASSOC\n"); |
878 | common->curaid = 0; | 883 | common->curaid = 0; |
879 | /* Stop ANI */ | 884 | /* Stop ANI */ |
885 | sc->sc_flags &= ~SC_OP_ANI_RUN; | ||
880 | del_timer_sync(&common->ani.timer); | 886 | del_timer_sync(&common->ani.timer); |
881 | } | 887 | } |
882 | } | 888 | } |
@@ -1478,8 +1484,10 @@ static int ath9k_add_interface(struct ieee80211_hw *hw, | |||
1478 | 1484 | ||
1479 | if (vif->type == NL80211_IFTYPE_AP || | 1485 | if (vif->type == NL80211_IFTYPE_AP || |
1480 | vif->type == NL80211_IFTYPE_ADHOC || | 1486 | vif->type == NL80211_IFTYPE_ADHOC || |
1481 | vif->type == NL80211_IFTYPE_MONITOR) | 1487 | vif->type == NL80211_IFTYPE_MONITOR) { |
1488 | sc->sc_flags |= SC_OP_ANI_RUN; | ||
1482 | ath_start_ani(common); | 1489 | ath_start_ani(common); |
1490 | } | ||
1483 | 1491 | ||
1484 | out: | 1492 | out: |
1485 | mutex_unlock(&sc->mutex); | 1493 | mutex_unlock(&sc->mutex); |
@@ -1500,6 +1508,7 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw, | |||
1500 | mutex_lock(&sc->mutex); | 1508 | mutex_lock(&sc->mutex); |
1501 | 1509 | ||
1502 | /* Stop ANI */ | 1510 | /* Stop ANI */ |
1511 | sc->sc_flags &= ~SC_OP_ANI_RUN; | ||
1503 | del_timer_sync(&common->ani.timer); | 1512 | del_timer_sync(&common->ani.timer); |
1504 | 1513 | ||
1505 | /* Reclaim beacon resources */ | 1514 | /* Reclaim beacon resources */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c index 44ef5d93befc..01658cf82d39 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c | |||
@@ -212,11 +212,7 @@ static void iwlagn_chain_noise_reset(struct iwl_priv *priv) | |||
212 | static void iwlagn_rts_tx_cmd_flag(struct ieee80211_tx_info *info, | 212 | static void iwlagn_rts_tx_cmd_flag(struct ieee80211_tx_info *info, |
213 | __le32 *tx_flags) | 213 | __le32 *tx_flags) |
214 | { | 214 | { |
215 | if ((info->control.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS) || | 215 | *tx_flags |= TX_CMD_FLG_RTS_CTS_MSK; |
216 | (info->control.rates[0].flags & IEEE80211_TX_RC_USE_CTS_PROTECT)) | ||
217 | *tx_flags |= TX_CMD_FLG_RTS_CTS_MSK; | ||
218 | else | ||
219 | *tx_flags &= ~TX_CMD_FLG_RTS_CTS_MSK; | ||
220 | } | 216 | } |
221 | 217 | ||
222 | /* Calc max signal level (dBm) among 3 possible receivers */ | 218 | /* Calc max signal level (dBm) among 3 possible receivers */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 426e95567de3..5bbc5298ef96 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -1314,7 +1314,6 @@ void iwl_configure_filter(struct ieee80211_hw *hw, | |||
1314 | changed_flags, *total_flags); | 1314 | changed_flags, *total_flags); |
1315 | 1315 | ||
1316 | CHK(FIF_OTHER_BSS | FIF_PROMISC_IN_BSS, RXON_FILTER_PROMISC_MSK); | 1316 | CHK(FIF_OTHER_BSS | FIF_PROMISC_IN_BSS, RXON_FILTER_PROMISC_MSK); |
1317 | CHK(FIF_ALLMULTI, RXON_FILTER_ACCEPT_GRP_MSK); | ||
1318 | CHK(FIF_CONTROL, RXON_FILTER_CTL2HOST_MSK); | 1317 | CHK(FIF_CONTROL, RXON_FILTER_CTL2HOST_MSK); |
1319 | CHK(FIF_BCN_PRBRESP_PROMISC, RXON_FILTER_BCON_AWARE_MSK); | 1318 | CHK(FIF_BCN_PRBRESP_PROMISC, RXON_FILTER_BCON_AWARE_MSK); |
1320 | 1319 | ||
@@ -1329,6 +1328,12 @@ void iwl_configure_filter(struct ieee80211_hw *hw, | |||
1329 | 1328 | ||
1330 | mutex_unlock(&priv->mutex); | 1329 | mutex_unlock(&priv->mutex); |
1331 | 1330 | ||
1331 | /* | ||
1332 | * Receiving all multicast frames is always enabled by the | ||
1333 | * default flags setup in iwl_connection_init_rx_config() | ||
1334 | * since we currently do not support programming multicast | ||
1335 | * filters into the device. | ||
1336 | */ | ||
1332 | *total_flags &= FIF_OTHER_BSS | FIF_ALLMULTI | FIF_PROMISC_IN_BSS | | 1337 | *total_flags &= FIF_OTHER_BSS | FIF_ALLMULTI | FIF_PROMISC_IN_BSS | |
1333 | FIF_BCN_PRBRESP_PROMISC | FIF_CONTROL; | 1338 | FIF_BCN_PRBRESP_PROMISC | FIF_CONTROL; |
1334 | } | 1339 | } |