diff options
author | David S. Miller <davem@davemloft.net> | 2009-07-30 22:22:43 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-07-30 22:22:43 -0400 |
commit | df597efb5737063497f1a4f7c996cc9aec294230 (patch) | |
tree | 17bb60f68ee299d9717038197a932501625f1621 | |
parent | a33bc5c15154c835aae26f16e6a3a7d9ad4acb45 (diff) | |
parent | 0a924578bc4a2823a95c151f56975c71f5c156bb (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/wireless/iwlwifi/iwl-3945.h
drivers/net/wireless/iwlwifi/iwl-tx.c
drivers/net/wireless/iwlwifi/iwl3945-base.c
34 files changed, 185 insertions, 104 deletions
diff --git a/Documentation/DocBook/kernel-hacking.tmpl b/Documentation/DocBook/kernel-hacking.tmpl index a50d6cd58573..992e67e6be7f 100644 --- a/Documentation/DocBook/kernel-hacking.tmpl +++ b/Documentation/DocBook/kernel-hacking.tmpl | |||
@@ -449,8 +449,8 @@ printk(KERN_INFO "i = %u\n", i); | |||
449 | </para> | 449 | </para> |
450 | 450 | ||
451 | <programlisting> | 451 | <programlisting> |
452 | __u32 ipaddress; | 452 | __be32 ipaddress; |
453 | printk(KERN_INFO "my ip: %d.%d.%d.%d\n", NIPQUAD(ipaddress)); | 453 | printk(KERN_INFO "my ip: %pI4\n", &ipaddress); |
454 | </programlisting> | 454 | </programlisting> |
455 | 455 | ||
456 | <para> | 456 | <para> |
diff --git a/drivers/net/3c515.c b/drivers/net/3c515.c index 85ffd132bada..3116410b3499 100644 --- a/drivers/net/3c515.c +++ b/drivers/net/3c515.c | |||
@@ -832,7 +832,9 @@ static int corkscrew_open(struct net_device *dev) | |||
832 | skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */ | 832 | skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */ |
833 | vp->rx_ring[i].addr = isa_virt_to_bus(skb->data); | 833 | vp->rx_ring[i].addr = isa_virt_to_bus(skb->data); |
834 | } | 834 | } |
835 | vp->rx_ring[i - 1].next = isa_virt_to_bus(&vp->rx_ring[0]); /* Wrap the ring. */ | 835 | if (i != 0) |
836 | vp->rx_ring[i - 1].next = | ||
837 | isa_virt_to_bus(&vp->rx_ring[0]); /* Wrap the ring. */ | ||
836 | outl(isa_virt_to_bus(&vp->rx_ring[0]), ioaddr + UpListPtr); | 838 | outl(isa_virt_to_bus(&vp->rx_ring[0]), ioaddr + UpListPtr); |
837 | } | 839 | } |
838 | if (vp->full_bus_master_tx) { /* Boomerang bus master Tx. */ | 840 | if (vp->full_bus_master_tx) { /* Boomerang bus master Tx. */ |
diff --git a/drivers/net/at1700.c b/drivers/net/at1700.c index c2227d79673a..5349c58d1fae 100644 --- a/drivers/net/at1700.c +++ b/drivers/net/at1700.c | |||
@@ -318,7 +318,7 @@ static int __init at1700_probe1(struct net_device *dev, int ioaddr) | |||
318 | pos3 = mca_read_stored_pos( slot, 3 ); | 318 | pos3 = mca_read_stored_pos( slot, 3 ); |
319 | pos4 = mca_read_stored_pos( slot, 4 ); | 319 | pos4 = mca_read_stored_pos( slot, 4 ); |
320 | 320 | ||
321 | for (l_i = 0; l_i < 0x09; l_i++) | 321 | for (l_i = 0; l_i < 8; l_i++) |
322 | if (( pos3 & 0x07) == at1700_ioaddr_pattern[l_i]) | 322 | if (( pos3 & 0x07) == at1700_ioaddr_pattern[l_i]) |
323 | break; | 323 | break; |
324 | ioaddr = at1700_mca_probe_list[l_i]; | 324 | ioaddr = at1700_mca_probe_list[l_i]; |
diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c index 4d1515f45ba2..4869d77cbe91 100644 --- a/drivers/net/cnic.c +++ b/drivers/net/cnic.c | |||
@@ -227,7 +227,7 @@ static int cnic_send_nlmsg(struct cnic_local *cp, u32 type, | |||
227 | } | 227 | } |
228 | 228 | ||
229 | rcu_read_lock(); | 229 | rcu_read_lock(); |
230 | ulp_ops = rcu_dereference(cp->ulp_ops[CNIC_ULP_ISCSI]); | 230 | ulp_ops = rcu_dereference(cnic_ulp_tbl[CNIC_ULP_ISCSI]); |
231 | if (ulp_ops) | 231 | if (ulp_ops) |
232 | ulp_ops->iscsi_nl_send_msg(cp->dev, msg_type, buf, len); | 232 | ulp_ops->iscsi_nl_send_msg(cp->dev, msg_type, buf, len); |
233 | rcu_read_unlock(); | 233 | rcu_read_unlock(); |
@@ -319,6 +319,20 @@ static int cnic_abort_prep(struct cnic_sock *csk) | |||
319 | return 0; | 319 | return 0; |
320 | } | 320 | } |
321 | 321 | ||
322 | static void cnic_uio_stop(void) | ||
323 | { | ||
324 | struct cnic_dev *dev; | ||
325 | |||
326 | read_lock(&cnic_dev_lock); | ||
327 | list_for_each_entry(dev, &cnic_dev_list, list) { | ||
328 | struct cnic_local *cp = dev->cnic_priv; | ||
329 | |||
330 | if (cp->cnic_uinfo) | ||
331 | cnic_send_nlmsg(cp, ISCSI_KEVENT_IF_DOWN, NULL); | ||
332 | } | ||
333 | read_unlock(&cnic_dev_lock); | ||
334 | } | ||
335 | |||
322 | int cnic_register_driver(int ulp_type, struct cnic_ulp_ops *ulp_ops) | 336 | int cnic_register_driver(int ulp_type, struct cnic_ulp_ops *ulp_ops) |
323 | { | 337 | { |
324 | struct cnic_dev *dev; | 338 | struct cnic_dev *dev; |
@@ -390,6 +404,9 @@ int cnic_unregister_driver(int ulp_type) | |||
390 | } | 404 | } |
391 | read_unlock(&cnic_dev_lock); | 405 | read_unlock(&cnic_dev_lock); |
392 | 406 | ||
407 | if (ulp_type == CNIC_ULP_ISCSI) | ||
408 | cnic_uio_stop(); | ||
409 | |||
393 | rcu_assign_pointer(cnic_ulp_tbl[ulp_type], NULL); | 410 | rcu_assign_pointer(cnic_ulp_tbl[ulp_type], NULL); |
394 | 411 | ||
395 | mutex_unlock(&cnic_lock); | 412 | mutex_unlock(&cnic_lock); |
@@ -632,7 +649,6 @@ static void cnic_free_resc(struct cnic_dev *dev) | |||
632 | int i = 0; | 649 | int i = 0; |
633 | 650 | ||
634 | if (cp->cnic_uinfo) { | 651 | if (cp->cnic_uinfo) { |
635 | cnic_send_nlmsg(cp, ISCSI_KEVENT_IF_DOWN, NULL); | ||
636 | while (cp->uio_dev != -1 && i < 15) { | 652 | while (cp->uio_dev != -1 && i < 15) { |
637 | msleep(100); | 653 | msleep(100); |
638 | i++; | 654 | i++; |
@@ -1057,6 +1073,9 @@ static void cnic_ulp_stop(struct cnic_dev *dev) | |||
1057 | struct cnic_local *cp = dev->cnic_priv; | 1073 | struct cnic_local *cp = dev->cnic_priv; |
1058 | int if_type; | 1074 | int if_type; |
1059 | 1075 | ||
1076 | if (cp->cnic_uinfo) | ||
1077 | cnic_send_nlmsg(cp, ISCSI_KEVENT_IF_DOWN, NULL); | ||
1078 | |||
1060 | rcu_read_lock(); | 1079 | rcu_read_lock(); |
1061 | for (if_type = 0; if_type < MAX_CNIC_ULP_TYPE; if_type++) { | 1080 | for (if_type = 0; if_type < MAX_CNIC_ULP_TYPE; if_type++) { |
1062 | struct cnic_ulp_ops *ulp_ops; | 1081 | struct cnic_ulp_ops *ulp_ops; |
diff --git a/drivers/net/eepro.c b/drivers/net/eepro.c index 71605d63708c..53317a83857a 100644 --- a/drivers/net/eepro.c +++ b/drivers/net/eepro.c | |||
@@ -1784,7 +1784,7 @@ int __init init_module(void) | |||
1784 | printk(KERN_INFO "eepro_init_module: Auto-detecting boards (May God protect us...)\n"); | 1784 | printk(KERN_INFO "eepro_init_module: Auto-detecting boards (May God protect us...)\n"); |
1785 | } | 1785 | } |
1786 | 1786 | ||
1787 | for (i = 0; io[i] != -1 && i < MAX_EEPRO; i++) { | 1787 | for (i = 0; i < MAX_EEPRO && io[i] != -1; i++) { |
1788 | dev = alloc_etherdev(sizeof(struct eepro_local)); | 1788 | dev = alloc_etherdev(sizeof(struct eepro_local)); |
1789 | if (!dev) | 1789 | if (!dev) |
1790 | break; | 1790 | break; |
diff --git a/drivers/net/eexpress.c b/drivers/net/eexpress.c index 8c44ef4ba357..d1b6368faacd 100644 --- a/drivers/net/eexpress.c +++ b/drivers/net/eexpress.c | |||
@@ -1474,13 +1474,13 @@ static void eexp_hw_init586(struct net_device *dev) | |||
1474 | outw(0x0000, ioaddr + 0x800c); | 1474 | outw(0x0000, ioaddr + 0x800c); |
1475 | outw(0x0000, ioaddr + 0x800e); | 1475 | outw(0x0000, ioaddr + 0x800e); |
1476 | 1476 | ||
1477 | for (i = 0; i < (sizeof(start_code)); i+=32) { | 1477 | for (i = 0; i < ARRAY_SIZE(start_code) * 2; i+=32) { |
1478 | int j; | 1478 | int j; |
1479 | outw(i, ioaddr + SM_PTR); | 1479 | outw(i, ioaddr + SM_PTR); |
1480 | for (j = 0; j < 16; j+=2) | 1480 | for (j = 0; j < 16 && (i+j)/2 < ARRAY_SIZE(start_code); j+=2) |
1481 | outw(start_code[(i+j)/2], | 1481 | outw(start_code[(i+j)/2], |
1482 | ioaddr+0x4000+j); | 1482 | ioaddr+0x4000+j); |
1483 | for (j = 0; j < 16; j+=2) | 1483 | for (j = 0; j < 16 && (i+j+16)/2 < ARRAY_SIZE(start_code); j+=2) |
1484 | outw(start_code[(i+j+16)/2], | 1484 | outw(start_code[(i+j+16)/2], |
1485 | ioaddr+0x8000+j); | 1485 | ioaddr+0x8000+j); |
1486 | } | 1486 | } |
diff --git a/drivers/net/fealnx.c b/drivers/net/fealnx.c index 75e5fe5153d9..b2d617206bd9 100644 --- a/drivers/net/fealnx.c +++ b/drivers/net/fealnx.c | |||
@@ -584,7 +584,8 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev, | |||
584 | if (np->flags == HAS_MII_XCVR) { | 584 | if (np->flags == HAS_MII_XCVR) { |
585 | int phy, phy_idx = 0; | 585 | int phy, phy_idx = 0; |
586 | 586 | ||
587 | for (phy = 1; phy < 32 && phy_idx < 4; phy++) { | 587 | for (phy = 1; phy < 32 && phy_idx < ARRAY_SIZE(np->phys); |
588 | phy++) { | ||
588 | int mii_status = mdio_read(dev, phy, 1); | 589 | int mii_status = mdio_read(dev, phy, 1); |
589 | 590 | ||
590 | if (mii_status != 0xffff && mii_status != 0x0000) { | 591 | if (mii_status != 0xffff && mii_status != 0x0000) { |
diff --git a/drivers/net/gianfar_ethtool.c b/drivers/net/gianfar_ethtool.c index dbf06e9313cc..2234118eedbb 100644 --- a/drivers/net/gianfar_ethtool.c +++ b/drivers/net/gianfar_ethtool.c | |||
@@ -366,9 +366,8 @@ static int gfar_scoalesce(struct net_device *dev, struct ethtool_coalesce *cvals | |||
366 | return -EINVAL; | 366 | return -EINVAL; |
367 | } | 367 | } |
368 | 368 | ||
369 | priv->rxic = mk_ic_value( | 369 | priv->rxic = mk_ic_value(cvals->rx_max_coalesced_frames, |
370 | gfar_usecs2ticks(priv, cvals->rx_coalesce_usecs), | 370 | gfar_usecs2ticks(priv, cvals->rx_coalesce_usecs)); |
371 | cvals->rx_max_coalesced_frames); | ||
372 | 371 | ||
373 | /* Set up tx coalescing */ | 372 | /* Set up tx coalescing */ |
374 | if ((cvals->tx_coalesce_usecs == 0) || | 373 | if ((cvals->tx_coalesce_usecs == 0) || |
@@ -390,9 +389,8 @@ static int gfar_scoalesce(struct net_device *dev, struct ethtool_coalesce *cvals | |||
390 | return -EINVAL; | 389 | return -EINVAL; |
391 | } | 390 | } |
392 | 391 | ||
393 | priv->txic = mk_ic_value( | 392 | priv->txic = mk_ic_value(cvals->tx_max_coalesced_frames, |
394 | gfar_usecs2ticks(priv, cvals->tx_coalesce_usecs), | 393 | gfar_usecs2ticks(priv, cvals->tx_coalesce_usecs)); |
395 | cvals->tx_max_coalesced_frames); | ||
396 | 394 | ||
397 | gfar_write(&priv->regs->rxic, 0); | 395 | gfar_write(&priv->regs->rxic, 0); |
398 | if (priv->rxcoalescing) | 396 | if (priv->rxcoalescing) |
diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h index dc3cc4348d1d..62b6c028ae81 100644 --- a/drivers/net/ixgbe/ixgbe.h +++ b/drivers/net/ixgbe/ixgbe.h | |||
@@ -96,6 +96,8 @@ | |||
96 | #define IXGBE_TX_FLAGS_VLAN_PRIO_MASK 0x0000e000 | 96 | #define IXGBE_TX_FLAGS_VLAN_PRIO_MASK 0x0000e000 |
97 | #define IXGBE_TX_FLAGS_VLAN_SHIFT 16 | 97 | #define IXGBE_TX_FLAGS_VLAN_SHIFT 16 |
98 | 98 | ||
99 | #define IXGBE_MAX_RSC_INT_RATE 162760 | ||
100 | |||
99 | /* wrapper around a pointer to a socket buffer, | 101 | /* wrapper around a pointer to a socket buffer, |
100 | * so a DMA handle can be stored along with the buffer */ | 102 | * so a DMA handle can be stored along with the buffer */ |
101 | struct ixgbe_tx_buffer { | 103 | struct ixgbe_tx_buffer { |
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c index 1464b33f1b8e..c6db9a04187d 100644 --- a/drivers/net/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ixgbe/ixgbe_ethtool.c | |||
@@ -1980,7 +1980,10 @@ static int ixgbe_set_coalesce(struct net_device *netdev, | |||
1980 | * any other value means disable eitr, which is best | 1980 | * any other value means disable eitr, which is best |
1981 | * served by setting the interrupt rate very high | 1981 | * served by setting the interrupt rate very high |
1982 | */ | 1982 | */ |
1983 | adapter->eitr_param = IXGBE_MAX_INT_RATE; | 1983 | if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) |
1984 | adapter->eitr_param = IXGBE_MAX_RSC_INT_RATE; | ||
1985 | else | ||
1986 | adapter->eitr_param = IXGBE_MAX_INT_RATE; | ||
1984 | adapter->itr_setting = 0; | 1987 | adapter->itr_setting = 0; |
1985 | } | 1988 | } |
1986 | 1989 | ||
@@ -2004,13 +2007,13 @@ static int ixgbe_set_flags(struct net_device *netdev, u32 data) | |||
2004 | 2007 | ||
2005 | ethtool_op_set_flags(netdev, data); | 2008 | ethtool_op_set_flags(netdev, data); |
2006 | 2009 | ||
2007 | if (!(adapter->flags & IXGBE_FLAG2_RSC_CAPABLE)) | 2010 | if (!(adapter->flags2 & IXGBE_FLAG2_RSC_CAPABLE)) |
2008 | return 0; | 2011 | return 0; |
2009 | 2012 | ||
2010 | /* if state changes we need to update adapter->flags and reset */ | 2013 | /* if state changes we need to update adapter->flags and reset */ |
2011 | if ((!!(data & ETH_FLAG_LRO)) != | 2014 | if ((!!(data & ETH_FLAG_LRO)) != |
2012 | (!!(adapter->flags & IXGBE_FLAG2_RSC_ENABLED))) { | 2015 | (!!(adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED))) { |
2013 | adapter->flags ^= IXGBE_FLAG2_RSC_ENABLED; | 2016 | adapter->flags2 ^= IXGBE_FLAG2_RSC_ENABLED; |
2014 | if (netif_running(netdev)) | 2017 | if (netif_running(netdev)) |
2015 | ixgbe_reinit_locked(adapter); | 2018 | ixgbe_reinit_locked(adapter); |
2016 | else | 2019 | else |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 50709da922c7..44adc9862826 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -513,8 +513,11 @@ static void ixgbe_receive_skb(struct ixgbe_q_vector *q_vector, | |||
513 | * @skb: skb currently being received and modified | 513 | * @skb: skb currently being received and modified |
514 | **/ | 514 | **/ |
515 | static inline void ixgbe_rx_checksum(struct ixgbe_adapter *adapter, | 515 | static inline void ixgbe_rx_checksum(struct ixgbe_adapter *adapter, |
516 | u32 status_err, struct sk_buff *skb) | 516 | union ixgbe_adv_rx_desc *rx_desc, |
517 | struct sk_buff *skb) | ||
517 | { | 518 | { |
519 | u32 status_err = le32_to_cpu(rx_desc->wb.upper.status_error); | ||
520 | |||
518 | skb->ip_summed = CHECKSUM_NONE; | 521 | skb->ip_summed = CHECKSUM_NONE; |
519 | 522 | ||
520 | /* Rx csum disabled */ | 523 | /* Rx csum disabled */ |
@@ -532,6 +535,16 @@ static inline void ixgbe_rx_checksum(struct ixgbe_adapter *adapter, | |||
532 | return; | 535 | return; |
533 | 536 | ||
534 | if (status_err & IXGBE_RXDADV_ERR_TCPE) { | 537 | if (status_err & IXGBE_RXDADV_ERR_TCPE) { |
538 | u16 pkt_info = rx_desc->wb.lower.lo_dword.hs_rss.pkt_info; | ||
539 | |||
540 | /* | ||
541 | * 82599 errata, UDP frames with a 0 checksum can be marked as | ||
542 | * checksum errors. | ||
543 | */ | ||
544 | if ((pkt_info & IXGBE_RXDADV_PKTTYPE_UDP) && | ||
545 | (adapter->hw.mac.type == ixgbe_mac_82599EB)) | ||
546 | return; | ||
547 | |||
535 | adapter->hw_csum_rx_error++; | 548 | adapter->hw_csum_rx_error++; |
536 | return; | 549 | return; |
537 | } | 550 | } |
@@ -769,7 +782,7 @@ static bool ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector, | |||
769 | prefetch(next_rxd); | 782 | prefetch(next_rxd); |
770 | cleaned_count++; | 783 | cleaned_count++; |
771 | 784 | ||
772 | if (adapter->flags & IXGBE_FLAG2_RSC_CAPABLE) | 785 | if (adapter->flags2 & IXGBE_FLAG2_RSC_CAPABLE) |
773 | rsc_count = ixgbe_get_rsc_count(rx_desc); | 786 | rsc_count = ixgbe_get_rsc_count(rx_desc); |
774 | 787 | ||
775 | if (rsc_count) { | 788 | if (rsc_count) { |
@@ -805,7 +818,7 @@ static bool ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector, | |||
805 | goto next_desc; | 818 | goto next_desc; |
806 | } | 819 | } |
807 | 820 | ||
808 | ixgbe_rx_checksum(adapter, staterr, skb); | 821 | ixgbe_rx_checksum(adapter, rx_desc, skb); |
809 | 822 | ||
810 | /* probably a little skewed due to removing CRC */ | 823 | /* probably a little skewed due to removing CRC */ |
811 | total_rx_bytes += skb->len; | 824 | total_rx_bytes += skb->len; |
@@ -2025,7 +2038,7 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter) | |||
2025 | IXGBE_WRITE_REG(hw, IXGBE_PSRTYPE(0), psrtype); | 2038 | IXGBE_WRITE_REG(hw, IXGBE_PSRTYPE(0), psrtype); |
2026 | } | 2039 | } |
2027 | } else { | 2040 | } else { |
2028 | if (!(adapter->flags & IXGBE_FLAG2_RSC_ENABLED) && | 2041 | if (!(adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) && |
2029 | (netdev->mtu <= ETH_DATA_LEN)) | 2042 | (netdev->mtu <= ETH_DATA_LEN)) |
2030 | rx_buf_len = MAXIMUM_ETHERNET_VLAN_SIZE; | 2043 | rx_buf_len = MAXIMUM_ETHERNET_VLAN_SIZE; |
2031 | else | 2044 | else |
@@ -2154,7 +2167,7 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter) | |||
2154 | IXGBE_WRITE_REG(hw, IXGBE_RDRXCTL, rdrxctl); | 2167 | IXGBE_WRITE_REG(hw, IXGBE_RDRXCTL, rdrxctl); |
2155 | } | 2168 | } |
2156 | 2169 | ||
2157 | if (adapter->flags & IXGBE_FLAG2_RSC_ENABLED) { | 2170 | if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) { |
2158 | /* Enable 82599 HW-RSC */ | 2171 | /* Enable 82599 HW-RSC */ |
2159 | for (i = 0; i < adapter->num_rx_queues; i++) { | 2172 | for (i = 0; i < adapter->num_rx_queues; i++) { |
2160 | j = adapter->rx_ring[i].reg_idx; | 2173 | j = adapter->rx_ring[i].reg_idx; |
@@ -3801,8 +3814,8 @@ static int __devinit ixgbe_sw_init(struct ixgbe_adapter *adapter) | |||
3801 | adapter->max_msix_q_vectors = MAX_MSIX_Q_VECTORS_82598; | 3814 | adapter->max_msix_q_vectors = MAX_MSIX_Q_VECTORS_82598; |
3802 | } else if (hw->mac.type == ixgbe_mac_82599EB) { | 3815 | } else if (hw->mac.type == ixgbe_mac_82599EB) { |
3803 | adapter->max_msix_q_vectors = MAX_MSIX_Q_VECTORS_82599; | 3816 | adapter->max_msix_q_vectors = MAX_MSIX_Q_VECTORS_82599; |
3804 | adapter->flags |= IXGBE_FLAG2_RSC_CAPABLE; | 3817 | adapter->flags2 |= IXGBE_FLAG2_RSC_CAPABLE; |
3805 | adapter->flags |= IXGBE_FLAG2_RSC_ENABLED; | 3818 | adapter->flags2 |= IXGBE_FLAG2_RSC_ENABLED; |
3806 | adapter->flags |= IXGBE_FLAG_FDIR_HASH_CAPABLE; | 3819 | adapter->flags |= IXGBE_FLAG_FDIR_HASH_CAPABLE; |
3807 | adapter->ring_feature[RING_F_FDIR].indices = | 3820 | adapter->ring_feature[RING_F_FDIR].indices = |
3808 | IXGBE_MAX_FDIR_INDICES; | 3821 | IXGBE_MAX_FDIR_INDICES; |
@@ -5349,12 +5362,19 @@ static int ixgbe_del_sanmac_netdev(struct net_device *dev) | |||
5349 | static void ixgbe_netpoll(struct net_device *netdev) | 5362 | static void ixgbe_netpoll(struct net_device *netdev) |
5350 | { | 5363 | { |
5351 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | 5364 | struct ixgbe_adapter *adapter = netdev_priv(netdev); |
5365 | int i; | ||
5352 | 5366 | ||
5353 | disable_irq(adapter->pdev->irq); | ||
5354 | adapter->flags |= IXGBE_FLAG_IN_NETPOLL; | 5367 | adapter->flags |= IXGBE_FLAG_IN_NETPOLL; |
5355 | ixgbe_intr(adapter->pdev->irq, netdev); | 5368 | if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) { |
5369 | int num_q_vectors = adapter->num_msix_vectors - NON_Q_VECTORS; | ||
5370 | for (i = 0; i < num_q_vectors; i++) { | ||
5371 | struct ixgbe_q_vector *q_vector = adapter->q_vector[i]; | ||
5372 | ixgbe_msix_clean_many(0, q_vector); | ||
5373 | } | ||
5374 | } else { | ||
5375 | ixgbe_intr(adapter->pdev->irq, netdev); | ||
5376 | } | ||
5356 | adapter->flags &= ~IXGBE_FLAG_IN_NETPOLL; | 5377 | adapter->flags &= ~IXGBE_FLAG_IN_NETPOLL; |
5357 | enable_irq(adapter->pdev->irq); | ||
5358 | } | 5378 | } |
5359 | #endif | 5379 | #endif |
5360 | 5380 | ||
@@ -5600,7 +5620,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
5600 | if (pci_using_dac) | 5620 | if (pci_using_dac) |
5601 | netdev->features |= NETIF_F_HIGHDMA; | 5621 | netdev->features |= NETIF_F_HIGHDMA; |
5602 | 5622 | ||
5603 | if (adapter->flags & IXGBE_FLAG2_RSC_ENABLED) | 5623 | if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) |
5604 | netdev->features |= NETIF_F_LRO; | 5624 | netdev->features |= NETIF_F_LRO; |
5605 | 5625 | ||
5606 | /* make sure the EEPROM is good */ | 5626 | /* make sure the EEPROM is good */ |
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c index a6b244a9f4a1..81253abbfa34 100644 --- a/drivers/net/netxen/netxen_nic_init.c +++ b/drivers/net/netxen/netxen_nic_init.c | |||
@@ -184,6 +184,13 @@ void netxen_free_sw_resources(struct netxen_adapter *adapter) | |||
184 | kfree(recv_ctx->rds_rings); | 184 | kfree(recv_ctx->rds_rings); |
185 | 185 | ||
186 | skip_rds: | 186 | skip_rds: |
187 | if (recv_ctx->sds_rings == NULL) | ||
188 | goto skip_sds; | ||
189 | |||
190 | for(ring = 0; ring < adapter->max_sds_rings; ring++) | ||
191 | recv_ctx->sds_rings[ring].consumer = 0; | ||
192 | |||
193 | skip_sds: | ||
187 | if (adapter->tx_ring == NULL) | 194 | if (adapter->tx_ring == NULL) |
188 | return; | 195 | return; |
189 | 196 | ||
diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c index f0031f1f97e5..5f2090233d7b 100644 --- a/drivers/net/pppoe.c +++ b/drivers/net/pppoe.c | |||
@@ -1063,6 +1063,7 @@ static void *pppoe_seq_next(struct seq_file *seq, void *v, loff_t *pos) | |||
1063 | else { | 1063 | else { |
1064 | int hash = hash_item(po->pppoe_pa.sid, po->pppoe_pa.remote); | 1064 | int hash = hash_item(po->pppoe_pa.sid, po->pppoe_pa.remote); |
1065 | 1065 | ||
1066 | po = NULL; | ||
1066 | while (++hash < PPPOE_HASH_SIZE) { | 1067 | while (++hash < PPPOE_HASH_SIZE) { |
1067 | po = pn->hash_table[hash]; | 1068 | po = pn->hash_table[hash]; |
1068 | if (po) | 1069 | if (po) |
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 4b53b58d75fc..b82780d805f5 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -2060,8 +2060,6 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2060 | } | 2060 | } |
2061 | } | 2061 | } |
2062 | 2062 | ||
2063 | pci_set_master(pdev); | ||
2064 | |||
2065 | /* ioremap MMIO region */ | 2063 | /* ioremap MMIO region */ |
2066 | ioaddr = ioremap(pci_resource_start(pdev, region), R8169_REGS_SIZE); | 2064 | ioaddr = ioremap(pci_resource_start(pdev, region), R8169_REGS_SIZE); |
2067 | if (!ioaddr) { | 2065 | if (!ioaddr) { |
@@ -2089,6 +2087,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2089 | 2087 | ||
2090 | RTL_W16(IntrStatus, 0xffff); | 2088 | RTL_W16(IntrStatus, 0xffff); |
2091 | 2089 | ||
2090 | pci_set_master(pdev); | ||
2091 | |||
2092 | /* Identify chip attached to board */ | 2092 | /* Identify chip attached to board */ |
2093 | rtl8169_get_mac_version(tp, ioaddr); | 2093 | rtl8169_get_mac_version(tp, ioaddr); |
2094 | 2094 | ||
@@ -3874,6 +3874,15 @@ static void rtl_shutdown(struct pci_dev *pdev) | |||
3874 | spin_unlock_irq(&tp->lock); | 3874 | spin_unlock_irq(&tp->lock); |
3875 | 3875 | ||
3876 | if (system_state == SYSTEM_POWER_OFF) { | 3876 | if (system_state == SYSTEM_POWER_OFF) { |
3877 | /* WoL fails with some 8168 when the receiver is disabled. */ | ||
3878 | if (tp->features & RTL_FEATURE_WOL) { | ||
3879 | pci_clear_master(pdev); | ||
3880 | |||
3881 | RTL_W8(ChipCmd, CmdRxEnb); | ||
3882 | /* PCI commit */ | ||
3883 | RTL_R8(ChipCmd); | ||
3884 | } | ||
3885 | |||
3877 | pci_wake_from_d3(pdev, true); | 3886 | pci_wake_from_d3(pdev, true); |
3878 | pci_set_power_state(pdev, PCI_D3hot); | 3887 | pci_set_power_state(pdev, PCI_D3hot); |
3879 | } | 3888 | } |
diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h index f1f773b17fe1..57a159fac99f 100644 --- a/drivers/net/smc91x.h +++ b/drivers/net/smc91x.h | |||
@@ -186,7 +186,8 @@ static inline void SMC_outw(u16 val, void __iomem *ioaddr, int reg) | |||
186 | #define SMC_outsb(a, r, p, l) writesb((a) + (r), p, (l)) | 186 | #define SMC_outsb(a, r, p, l) writesb((a) + (r), p, (l)) |
187 | #define SMC_IRQ_FLAGS (-1) /* from resource */ | 187 | #define SMC_IRQ_FLAGS (-1) /* from resource */ |
188 | 188 | ||
189 | #elif defined(CONFIG_MACH_LOGICPD_PXA270) | 189 | #elif defined(CONFIG_MACH_LOGICPD_PXA270) \ |
190 | || defined(CONFIG_MACH_NOMADIK_8815NHK) | ||
190 | 191 | ||
191 | #define SMC_CAN_USE_8BIT 0 | 192 | #define SMC_CAN_USE_8BIT 0 |
192 | #define SMC_CAN_USE_16BIT 1 | 193 | #define SMC_CAN_USE_16BIT 1 |
diff --git a/drivers/net/tokenring/ibmtr.c b/drivers/net/tokenring/ibmtr.c index 6472ba5cfc5e..96d00c8f8d3e 100644 --- a/drivers/net/tokenring/ibmtr.c +++ b/drivers/net/tokenring/ibmtr.c | |||
@@ -1912,7 +1912,7 @@ static int __init ibmtr_init(void) | |||
1912 | 1912 | ||
1913 | find_turbo_adapters(io); | 1913 | find_turbo_adapters(io); |
1914 | 1914 | ||
1915 | for (i = 0; io[i] && (i < IBMTR_MAX_ADAPTERS); i++) { | 1915 | for (i = 0; i < IBMTR_MAX_ADAPTERS && io[i]; i++) { |
1916 | struct net_device *dev; | 1916 | struct net_device *dev; |
1917 | irq[i] = 0; | 1917 | irq[i] = 0; |
1918 | mem[i] = 0; | 1918 | mem[i] = 0; |
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 49f3139a3fe7..c150c4858576 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
@@ -5918,20 +5918,19 @@ static int airo_set_essid(struct net_device *dev, | |||
5918 | readSsidRid(local, &SSID_rid); | 5918 | readSsidRid(local, &SSID_rid); |
5919 | 5919 | ||
5920 | /* Check if we asked for `any' */ | 5920 | /* Check if we asked for `any' */ |
5921 | if(dwrq->flags == 0) { | 5921 | if (dwrq->flags == 0) { |
5922 | /* Just send an empty SSID list */ | 5922 | /* Just send an empty SSID list */ |
5923 | memset(&SSID_rid, 0, sizeof(SSID_rid)); | 5923 | memset(&SSID_rid, 0, sizeof(SSID_rid)); |
5924 | } else { | 5924 | } else { |
5925 | int index = (dwrq->flags & IW_ENCODE_INDEX) - 1; | 5925 | unsigned index = (dwrq->flags & IW_ENCODE_INDEX) - 1; |
5926 | 5926 | ||
5927 | /* Check the size of the string */ | 5927 | /* Check the size of the string */ |
5928 | if(dwrq->length > IW_ESSID_MAX_SIZE) { | 5928 | if (dwrq->length > IW_ESSID_MAX_SIZE) |
5929 | return -E2BIG ; | 5929 | return -E2BIG ; |
5930 | } | 5930 | |
5931 | /* Check if index is valid */ | 5931 | /* Check if index is valid */ |
5932 | if((index < 0) || (index >= 4)) { | 5932 | if (index >= ARRAY_SIZE(SSID_rid.ssids)) |
5933 | return -EINVAL; | 5933 | return -EINVAL; |
5934 | } | ||
5935 | 5934 | ||
5936 | /* Set the SSID */ | 5935 | /* Set the SSID */ |
5937 | memset(SSID_rid.ssids[index].ssid, 0, | 5936 | memset(SSID_rid.ssids[index].ssid, 0, |
@@ -6819,7 +6818,7 @@ static int airo_set_txpow(struct net_device *dev, | |||
6819 | return -EINVAL; | 6818 | return -EINVAL; |
6820 | } | 6819 | } |
6821 | clear_bit (FLAG_RADIO_OFF, &local->flags); | 6820 | clear_bit (FLAG_RADIO_OFF, &local->flags); |
6822 | for (i = 0; cap_rid.txPowerLevels[i] && (i < 8); i++) | 6821 | for (i = 0; i < 8 && cap_rid.txPowerLevels[i]; i++) |
6823 | if (v == cap_rid.txPowerLevels[i]) { | 6822 | if (v == cap_rid.txPowerLevels[i]) { |
6824 | readConfigRid(local, 1); | 6823 | readConfigRid(local, 1); |
6825 | local->config.txPower = v; | 6824 | local->config.txPower = v; |
diff --git a/drivers/net/wireless/ath/ath9k/eeprom.c b/drivers/net/wireless/ath/ath9k/eeprom.c index df41ed5fd7c4..93e8ce0598a4 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom.c +++ b/drivers/net/wireless/ath/ath9k/eeprom.c | |||
@@ -460,7 +460,7 @@ static int ath9k_hw_4k_check_eeprom(struct ath_hw *ah) | |||
460 | integer = swab32(eep->modalHeader.antCtrlCommon); | 460 | integer = swab32(eep->modalHeader.antCtrlCommon); |
461 | eep->modalHeader.antCtrlCommon = integer; | 461 | eep->modalHeader.antCtrlCommon = integer; |
462 | 462 | ||
463 | for (i = 0; i < AR5416_MAX_CHAINS; i++) { | 463 | for (i = 0; i < AR5416_EEP4K_MAX_CHAINS; i++) { |
464 | integer = swab32(eep->modalHeader.antCtrlChain[i]); | 464 | integer = swab32(eep->modalHeader.antCtrlChain[i]); |
465 | eep->modalHeader.antCtrlChain[i] = integer; | 465 | eep->modalHeader.antCtrlChain[i] = integer; |
466 | } | 466 | } |
@@ -914,7 +914,7 @@ static void ath9k_hw_set_4k_power_per_rate_table(struct ath_hw *ah, | |||
914 | ctlMode, numCtlModes, isHt40CtlMode, | 914 | ctlMode, numCtlModes, isHt40CtlMode, |
915 | (pCtlMode[ctlMode] & EXT_ADDITIVE)); | 915 | (pCtlMode[ctlMode] & EXT_ADDITIVE)); |
916 | 916 | ||
917 | for (i = 0; (i < AR5416_NUM_CTLS) && | 917 | for (i = 0; (i < AR5416_EEP4K_NUM_CTLS) && |
918 | pEepData->ctlIndex[i]; i++) { | 918 | pEepData->ctlIndex[i]; i++) { |
919 | DPRINTF(ah->ah_sc, ATH_DBG_EEPROM, | 919 | DPRINTF(ah->ah_sc, ATH_DBG_EEPROM, |
920 | " LOOP-Ctlidx %d: cfgCtl 0x%2.2x " | 920 | " LOOP-Ctlidx %d: cfgCtl 0x%2.2x " |
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c index 0912987af603..c7100b9dcede 100644 --- a/drivers/net/wireless/iwlwifi/iwl-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-tx.c | |||
@@ -724,8 +724,6 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
724 | goto drop_unlock; | 724 | goto drop_unlock; |
725 | } | 725 | } |
726 | 726 | ||
727 | spin_unlock_irqrestore(&priv->lock, flags); | ||
728 | |||
729 | hdr_len = ieee80211_hdrlen(fc); | 727 | hdr_len = ieee80211_hdrlen(fc); |
730 | 728 | ||
731 | /* Find (or create) index into station table for destination station */ | 729 | /* Find (or create) index into station table for destination station */ |
@@ -733,7 +731,7 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
733 | if (sta_id == IWL_INVALID_STATION) { | 731 | if (sta_id == IWL_INVALID_STATION) { |
734 | IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n", | 732 | IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n", |
735 | hdr->addr1); | 733 | hdr->addr1); |
736 | goto drop; | 734 | goto drop_unlock; |
737 | } | 735 | } |
738 | 736 | ||
739 | IWL_DEBUG_TX(priv, "station Id %d\n", sta_id); | 737 | IWL_DEBUG_TX(priv, "station Id %d\n", sta_id); |
@@ -751,14 +749,17 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
751 | /* aggregation is on for this <sta,tid> */ | 749 | /* aggregation is on for this <sta,tid> */ |
752 | if (info->flags & IEEE80211_TX_CTL_AMPDU) | 750 | if (info->flags & IEEE80211_TX_CTL_AMPDU) |
753 | txq_id = priv->stations[sta_id].tid[tid].agg.txq_id; | 751 | txq_id = priv->stations[sta_id].tid[tid].agg.txq_id; |
754 | priv->stations[sta_id].tid[tid].tfds_in_queue++; | ||
755 | } | 752 | } |
756 | 753 | ||
757 | txq = &priv->txq[txq_id]; | 754 | txq = &priv->txq[txq_id]; |
758 | swq_id = txq->swq_id; | 755 | swq_id = txq->swq_id; |
759 | q = &txq->q; | 756 | q = &txq->q; |
760 | 757 | ||
761 | spin_lock_irqsave(&priv->lock, flags); | 758 | if (unlikely(iwl_queue_space(q) < q->high_mark)) |
759 | goto drop_unlock; | ||
760 | |||
761 | if (ieee80211_is_data_qos(fc)) | ||
762 | priv->stations[sta_id].tid[tid].tfds_in_queue++; | ||
762 | 763 | ||
763 | /* Set up driver data for this TFD */ | 764 | /* Set up driver data for this TFD */ |
764 | memset(&(txq->txb[q->write_ptr]), 0, sizeof(struct iwl_tx_info)); | 765 | memset(&(txq->txb[q->write_ptr]), 0, sizeof(struct iwl_tx_info)); |
@@ -903,7 +904,6 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
903 | 904 | ||
904 | drop_unlock: | 905 | drop_unlock: |
905 | spin_unlock_irqrestore(&priv->lock, flags); | 906 | spin_unlock_irqrestore(&priv->lock, flags); |
906 | drop: | ||
907 | return -1; | 907 | return -1; |
908 | } | 908 | } |
909 | EXPORT_SYMBOL(iwl_tx_skb); | 909 | EXPORT_SYMBOL(iwl_tx_skb); |
@@ -1172,6 +1172,8 @@ int iwl_tx_agg_start(struct iwl_priv *priv, const u8 *ra, u16 tid, u16 *ssn) | |||
1172 | IWL_ERR(priv, "Start AGG on invalid station\n"); | 1172 | IWL_ERR(priv, "Start AGG on invalid station\n"); |
1173 | return -ENXIO; | 1173 | return -ENXIO; |
1174 | } | 1174 | } |
1175 | if (unlikely(tid >= MAX_TID_COUNT)) | ||
1176 | return -EINVAL; | ||
1175 | 1177 | ||
1176 | if (priv->stations[sta_id].tid[tid].agg.state != IWL_AGG_OFF) { | 1178 | if (priv->stations[sta_id].tid[tid].agg.state != IWL_AGG_OFF) { |
1177 | IWL_ERR(priv, "Start AGG when state is not IWL_AGG_OFF !\n"); | 1179 | IWL_ERR(priv, "Start AGG when state is not IWL_AGG_OFF !\n"); |
diff --git a/drivers/net/wireless/iwmc3200wifi/netdev.c b/drivers/net/wireless/iwmc3200wifi/netdev.c index 092d28ae56a0..93cc1b3e7f48 100644 --- a/drivers/net/wireless/iwmc3200wifi/netdev.c +++ b/drivers/net/wireless/iwmc3200wifi/netdev.c | |||
@@ -99,10 +99,8 @@ void *iwm_if_alloc(int sizeof_bus, struct device *dev, | |||
99 | int ret = 0; | 99 | int ret = 0; |
100 | 100 | ||
101 | wdev = iwm_wdev_alloc(sizeof_bus, dev); | 101 | wdev = iwm_wdev_alloc(sizeof_bus, dev); |
102 | if (!wdev) { | 102 | if (IS_ERR(wdev)) |
103 | dev_err(dev, "no memory for wireless device instance\n"); | 103 | return wdev; |
104 | return ERR_PTR(-ENOMEM); | ||
105 | } | ||
106 | 104 | ||
107 | iwm = wdev_to_iwm(wdev); | 105 | iwm = wdev_to_iwm(wdev); |
108 | iwm->bus_ops = if_ops; | 106 | iwm->bus_ops = if_ops; |
diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wireless/libertas/assoc.c index 385b50f4b105..1902b6f0b78c 100644 --- a/drivers/net/wireless/libertas/assoc.c +++ b/drivers/net/wireless/libertas/assoc.c | |||
@@ -1,6 +1,7 @@ | |||
1 | /* Copyright (C) 2006, Red Hat, Inc. */ | 1 | /* Copyright (C) 2006, Red Hat, Inc. */ |
2 | 2 | ||
3 | #include <linux/types.h> | 3 | #include <linux/types.h> |
4 | #include <linux/kernel.h> | ||
4 | #include <linux/etherdevice.h> | 5 | #include <linux/etherdevice.h> |
5 | #include <linux/ieee80211.h> | 6 | #include <linux/ieee80211.h> |
6 | #include <linux/if_arp.h> | 7 | #include <linux/if_arp.h> |
@@ -43,21 +44,21 @@ static int get_common_rates(struct lbs_private *priv, | |||
43 | u16 *rates_size) | 44 | u16 *rates_size) |
44 | { | 45 | { |
45 | u8 *card_rates = lbs_bg_rates; | 46 | u8 *card_rates = lbs_bg_rates; |
46 | size_t num_card_rates = sizeof(lbs_bg_rates); | ||
47 | int ret = 0, i, j; | 47 | int ret = 0, i, j; |
48 | u8 tmp[30]; | 48 | u8 tmp[(ARRAY_SIZE(lbs_bg_rates) - 1) * (*rates_size - 1)]; |
49 | size_t tmp_size = 0; | 49 | size_t tmp_size = 0; |
50 | 50 | ||
51 | /* For each rate in card_rates that exists in rate1, copy to tmp */ | 51 | /* For each rate in card_rates that exists in rate1, copy to tmp */ |
52 | for (i = 0; card_rates[i] && (i < num_card_rates); i++) { | 52 | for (i = 0; i < ARRAY_SIZE(lbs_bg_rates) && card_rates[i]; i++) { |
53 | for (j = 0; rates[j] && (j < *rates_size); j++) { | 53 | for (j = 0; j < *rates_size && rates[j]; j++) { |
54 | if (rates[j] == card_rates[i]) | 54 | if (rates[j] == card_rates[i]) |
55 | tmp[tmp_size++] = card_rates[i]; | 55 | tmp[tmp_size++] = card_rates[i]; |
56 | } | 56 | } |
57 | } | 57 | } |
58 | 58 | ||
59 | lbs_deb_hex(LBS_DEB_JOIN, "AP rates ", rates, *rates_size); | 59 | lbs_deb_hex(LBS_DEB_JOIN, "AP rates ", rates, *rates_size); |
60 | lbs_deb_hex(LBS_DEB_JOIN, "card rates ", card_rates, num_card_rates); | 60 | lbs_deb_hex(LBS_DEB_JOIN, "card rates ", card_rates, |
61 | ARRAY_SIZE(lbs_bg_rates)); | ||
61 | lbs_deb_hex(LBS_DEB_JOIN, "common rates", tmp, tmp_size); | 62 | lbs_deb_hex(LBS_DEB_JOIN, "common rates", tmp, tmp_size); |
62 | lbs_deb_join("TX data rate 0x%02x\n", priv->cur_rate); | 63 | lbs_deb_join("TX data rate 0x%02x\n", priv->cur_rate); |
63 | 64 | ||
@@ -69,10 +70,7 @@ static int get_common_rates(struct lbs_private *priv, | |||
69 | lbs_pr_alert("Previously set fixed data rate %#x isn't " | 70 | lbs_pr_alert("Previously set fixed data rate %#x isn't " |
70 | "compatible with the network.\n", priv->cur_rate); | 71 | "compatible with the network.\n", priv->cur_rate); |
71 | ret = -1; | 72 | ret = -1; |
72 | goto done; | ||
73 | } | 73 | } |
74 | ret = 0; | ||
75 | |||
76 | done: | 74 | done: |
77 | memset(rates, 0, *rates_size); | 75 | memset(rates, 0, *rates_size); |
78 | *rates_size = min_t(int, tmp_size, *rates_size); | 76 | *rates_size = min_t(int, tmp_size, *rates_size); |
@@ -320,7 +318,7 @@ static int lbs_associate(struct lbs_private *priv, | |||
320 | rates = (struct mrvl_ie_rates_param_set *) pos; | 318 | rates = (struct mrvl_ie_rates_param_set *) pos; |
321 | rates->header.type = cpu_to_le16(TLV_TYPE_RATES); | 319 | rates->header.type = cpu_to_le16(TLV_TYPE_RATES); |
322 | memcpy(&rates->rates, &bss->rates, MAX_RATES); | 320 | memcpy(&rates->rates, &bss->rates, MAX_RATES); |
323 | tmplen = MAX_RATES; | 321 | tmplen = min_t(u16, ARRAY_SIZE(rates->rates), MAX_RATES); |
324 | if (get_common_rates(priv, rates->rates, &tmplen)) { | 322 | if (get_common_rates(priv, rates->rates, &tmplen)) { |
325 | ret = -1; | 323 | ret = -1; |
326 | goto done; | 324 | goto done; |
@@ -594,7 +592,7 @@ static int lbs_adhoc_join(struct lbs_private *priv, | |||
594 | 592 | ||
595 | /* Copy Data rates from the rates recorded in scan response */ | 593 | /* Copy Data rates from the rates recorded in scan response */ |
596 | memset(cmd.bss.rates, 0, sizeof(cmd.bss.rates)); | 594 | memset(cmd.bss.rates, 0, sizeof(cmd.bss.rates)); |
597 | ratesize = min_t(u16, sizeof(cmd.bss.rates), MAX_RATES); | 595 | ratesize = min_t(u16, ARRAY_SIZE(cmd.bss.rates), MAX_RATES); |
598 | memcpy(cmd.bss.rates, bss->rates, ratesize); | 596 | memcpy(cmd.bss.rates, bss->rates, ratesize); |
599 | if (get_common_rates(priv, cmd.bss.rates, &ratesize)) { | 597 | if (get_common_rates(priv, cmd.bss.rates, &ratesize)) { |
600 | lbs_deb_join("ADHOC_JOIN: get_common_rates returned error.\n"); | 598 | lbs_deb_join("ADHOC_JOIN: get_common_rates returned error.\n"); |
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c index 601b54249677..6c95af3023cc 100644 --- a/drivers/net/wireless/libertas/scan.c +++ b/drivers/net/wireless/libertas/scan.c | |||
@@ -5,6 +5,7 @@ | |||
5 | * for sending scan commands to the firmware. | 5 | * for sending scan commands to the firmware. |
6 | */ | 6 | */ |
7 | #include <linux/types.h> | 7 | #include <linux/types.h> |
8 | #include <linux/kernel.h> | ||
8 | #include <linux/etherdevice.h> | 9 | #include <linux/etherdevice.h> |
9 | #include <linux/if_arp.h> | 10 | #include <linux/if_arp.h> |
10 | #include <asm/unaligned.h> | 11 | #include <asm/unaligned.h> |
@@ -876,7 +877,7 @@ static inline char *lbs_translate_scan(struct lbs_private *priv, | |||
876 | iwe.u.bitrate.disabled = 0; | 877 | iwe.u.bitrate.disabled = 0; |
877 | iwe.u.bitrate.value = 0; | 878 | iwe.u.bitrate.value = 0; |
878 | 879 | ||
879 | for (j = 0; bss->rates[j] && (j < sizeof(bss->rates)); j++) { | 880 | for (j = 0; j < ARRAY_SIZE(bss->rates) && bss->rates[j]; j++) { |
880 | /* Bit rate given in 500 kb/s units */ | 881 | /* Bit rate given in 500 kb/s units */ |
881 | iwe.u.bitrate.value = bss->rates[j] * 500000; | 882 | iwe.u.bitrate.value = bss->rates[j] * 500000; |
882 | current_val = iwe_stream_add_value(info, start, current_val, | 883 | current_val = iwe_stream_add_value(info, start, current_val, |
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index 783e33c65eb7..b47240ca4b19 100644 --- a/drivers/scsi/scsi_transport_iscsi.c +++ b/drivers/scsi/scsi_transport_iscsi.c | |||
@@ -990,7 +990,7 @@ int iscsi_offload_mesg(struct Scsi_Host *shost, | |||
990 | struct iscsi_uevent *ev; | 990 | struct iscsi_uevent *ev; |
991 | int len = NLMSG_SPACE(sizeof(*ev) + data_size); | 991 | int len = NLMSG_SPACE(sizeof(*ev) + data_size); |
992 | 992 | ||
993 | skb = alloc_skb(len, GFP_NOIO); | 993 | skb = alloc_skb(len, GFP_ATOMIC); |
994 | if (!skb) { | 994 | if (!skb) { |
995 | printk(KERN_ERR "can not deliver iscsi offload message:OOM\n"); | 995 | printk(KERN_ERR "can not deliver iscsi offload message:OOM\n"); |
996 | return -ENOMEM; | 996 | return -ENOMEM; |
@@ -1012,7 +1012,7 @@ int iscsi_offload_mesg(struct Scsi_Host *shost, | |||
1012 | 1012 | ||
1013 | memcpy((char *)ev + sizeof(*ev), data, data_size); | 1013 | memcpy((char *)ev + sizeof(*ev), data, data_size); |
1014 | 1014 | ||
1015 | return iscsi_multicast_skb(skb, ISCSI_NL_GRP_UIP, GFP_NOIO); | 1015 | return iscsi_multicast_skb(skb, ISCSI_NL_GRP_UIP, GFP_ATOMIC); |
1016 | } | 1016 | } |
1017 | EXPORT_SYMBOL_GPL(iscsi_offload_mesg); | 1017 | EXPORT_SYMBOL_GPL(iscsi_offload_mesg); |
1018 | 1018 | ||
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index acef2a770b6b..ad27c7da8798 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
@@ -82,7 +82,7 @@ static inline void ipv4_devconf_setall(struct in_device *in_dev) | |||
82 | 82 | ||
83 | #define IN_DEV_FORWARD(in_dev) IN_DEV_CONF_GET((in_dev), FORWARDING) | 83 | #define IN_DEV_FORWARD(in_dev) IN_DEV_CONF_GET((in_dev), FORWARDING) |
84 | #define IN_DEV_MFORWARD(in_dev) IN_DEV_ANDCONF((in_dev), MC_FORWARDING) | 84 | #define IN_DEV_MFORWARD(in_dev) IN_DEV_ANDCONF((in_dev), MC_FORWARDING) |
85 | #define IN_DEV_RPFILTER(in_dev) IN_DEV_ANDCONF((in_dev), RP_FILTER) | 85 | #define IN_DEV_RPFILTER(in_dev) IN_DEV_MAXCONF((in_dev), RP_FILTER) |
86 | #define IN_DEV_SOURCE_ROUTE(in_dev) IN_DEV_ANDCONF((in_dev), \ | 86 | #define IN_DEV_SOURCE_ROUTE(in_dev) IN_DEV_ANDCONF((in_dev), \ |
87 | ACCEPT_SOURCE_ROUTE) | 87 | ACCEPT_SOURCE_ROUTE) |
88 | #define IN_DEV_BOOTP_RELAY(in_dev) IN_DEV_ANDCONF((in_dev), BOOTP_RELAY) | 88 | #define IN_DEV_BOOTP_RELAY(in_dev) IN_DEV_ANDCONF((in_dev), BOOTP_RELAY) |
diff --git a/include/net/rose.h b/include/net/rose.h index cbd5364b2c8a..5ba9f02731eb 100644 --- a/include/net/rose.h +++ b/include/net/rose.h | |||
@@ -156,7 +156,7 @@ extern int sysctl_rose_maximum_vcs; | |||
156 | extern int sysctl_rose_window_size; | 156 | extern int sysctl_rose_window_size; |
157 | extern int rosecmp(rose_address *, rose_address *); | 157 | extern int rosecmp(rose_address *, rose_address *); |
158 | extern int rosecmpm(rose_address *, rose_address *, unsigned short); | 158 | extern int rosecmpm(rose_address *, rose_address *, unsigned short); |
159 | extern const char *rose2asc(const rose_address *); | 159 | extern char *rose2asc(char *buf, const rose_address *); |
160 | extern struct sock *rose_find_socket(unsigned int, struct rose_neigh *); | 160 | extern struct sock *rose_find_socket(unsigned int, struct rose_neigh *); |
161 | extern void rose_kill_by_neigh(struct rose_neigh *); | 161 | extern void rose_kill_by_neigh(struct rose_neigh *); |
162 | extern unsigned int rose_new_lci(struct rose_neigh *); | 162 | extern unsigned int rose_new_lci(struct rose_neigh *); |
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index 8a96672e2c5c..eb404dc3ed6e 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c | |||
@@ -424,7 +424,7 @@ int br_add_if(struct net_bridge *br, struct net_device *dev) | |||
424 | err2: | 424 | err2: |
425 | br_fdb_delete_by_port(br, p, 1); | 425 | br_fdb_delete_by_port(br, p, 1); |
426 | err1: | 426 | err1: |
427 | kobject_del(&p->kobj); | 427 | kobject_put(&p->kobj); |
428 | err0: | 428 | err0: |
429 | dev_set_promiscuity(dev, -1); | 429 | dev_set_promiscuity(dev, -1); |
430 | put_back: | 430 | put_back: |
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index c29d75d8f1b1..090e9991ac2a 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c | |||
@@ -1304,7 +1304,9 @@ static void arp_format_neigh_entry(struct seq_file *seq, | |||
1304 | hbuffer[k++] = hex_asc_lo(n->ha[j]); | 1304 | hbuffer[k++] = hex_asc_lo(n->ha[j]); |
1305 | hbuffer[k++] = ':'; | 1305 | hbuffer[k++] = ':'; |
1306 | } | 1306 | } |
1307 | hbuffer[--k] = 0; | 1307 | if (k != 0) |
1308 | --k; | ||
1309 | hbuffer[k] = 0; | ||
1308 | #if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) | 1310 | #if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) |
1309 | } | 1311 | } |
1310 | #endif | 1312 | #endif |
diff --git a/net/irda/irttp.c b/net/irda/irttp.c index ecf4eb2717cb..9cb79f95bf63 100644 --- a/net/irda/irttp.c +++ b/net/irda/irttp.c | |||
@@ -1453,6 +1453,7 @@ struct tsap_cb *irttp_dup(struct tsap_cb *orig, void *instance) | |||
1453 | } | 1453 | } |
1454 | /* Dup */ | 1454 | /* Dup */ |
1455 | memcpy(new, orig, sizeof(struct tsap_cb)); | 1455 | memcpy(new, orig, sizeof(struct tsap_cb)); |
1456 | spin_lock_init(&new->lock); | ||
1456 | 1457 | ||
1457 | /* We don't need the old instance any more */ | 1458 | /* We don't need the old instance any more */ |
1458 | spin_unlock_irqrestore(&irttp->tsaps->hb_spinlock, flags); | 1459 | spin_unlock_irqrestore(&irttp->tsaps->hb_spinlock, flags); |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 523c0d994d15..0b3551da8f43 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -760,7 +760,7 @@ void ieee80211_dynamic_ps_timer(unsigned long data) | |||
760 | { | 760 | { |
761 | struct ieee80211_local *local = (void *) data; | 761 | struct ieee80211_local *local = (void *) data; |
762 | 762 | ||
763 | if (local->quiescing) | 763 | if (local->quiescing || local->suspended) |
764 | return; | 764 | return; |
765 | 765 | ||
766 | queue_work(local->hw.workqueue, &local->dynamic_ps_enable_work); | 766 | queue_work(local->hw.workqueue, &local->dynamic_ps_enable_work); |
diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c index 7a549f9deb96..5e3d476972f9 100644 --- a/net/mac80211/pm.c +++ b/net/mac80211/pm.c | |||
@@ -55,15 +55,6 @@ int __ieee80211_suspend(struct ieee80211_hw *hw) | |||
55 | 55 | ||
56 | rcu_read_unlock(); | 56 | rcu_read_unlock(); |
57 | 57 | ||
58 | /* flush again, in case driver queued work */ | ||
59 | flush_workqueue(local->hw.workqueue); | ||
60 | |||
61 | /* stop hardware - this must stop RX */ | ||
62 | if (local->open_count) { | ||
63 | ieee80211_led_radio(local, false); | ||
64 | drv_stop(local); | ||
65 | } | ||
66 | |||
67 | /* remove STAs */ | 58 | /* remove STAs */ |
68 | spin_lock_irqsave(&local->sta_lock, flags); | 59 | spin_lock_irqsave(&local->sta_lock, flags); |
69 | list_for_each_entry(sta, &local->sta_list, list) { | 60 | list_for_each_entry(sta, &local->sta_list, list) { |
@@ -111,7 +102,22 @@ int __ieee80211_suspend(struct ieee80211_hw *hw) | |||
111 | drv_remove_interface(local, &conf); | 102 | drv_remove_interface(local, &conf); |
112 | } | 103 | } |
113 | 104 | ||
105 | /* stop hardware - this must stop RX */ | ||
106 | if (local->open_count) { | ||
107 | ieee80211_led_radio(local, false); | ||
108 | drv_stop(local); | ||
109 | } | ||
110 | |||
111 | /* | ||
112 | * flush again, in case driver queued work -- it | ||
113 | * shouldn't be doing (or cancel everything in the | ||
114 | * stop callback) that but better safe than sorry. | ||
115 | */ | ||
116 | flush_workqueue(local->hw.workqueue); | ||
117 | |||
114 | local->suspended = true; | 118 | local->suspended = true; |
119 | /* need suspended to be visible before quiescing is false */ | ||
120 | barrier(); | ||
115 | local->quiescing = false; | 121 | local->quiescing = false; |
116 | 122 | ||
117 | return 0; | 123 | return 0; |
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 66c797cc85ce..b6ddde3848fb 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -2439,6 +2439,18 @@ void __ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
2439 | return; | 2439 | return; |
2440 | } | 2440 | } |
2441 | 2441 | ||
2442 | /* | ||
2443 | * If we're suspending, it is possible although not too likely | ||
2444 | * that we'd be receiving frames after having already partially | ||
2445 | * quiesced the stack. We can't process such frames then since | ||
2446 | * that might, for example, cause stations to be added or other | ||
2447 | * driver callbacks be invoked. | ||
2448 | */ | ||
2449 | if (unlikely(local->quiescing || local->suspended)) { | ||
2450 | kfree_skb(skb); | ||
2451 | return; | ||
2452 | } | ||
2453 | |||
2442 | if (status->flag & RX_FLAG_HT) { | 2454 | if (status->flag & RX_FLAG_HT) { |
2443 | /* rate_idx is MCS index */ | 2455 | /* rate_idx is MCS index */ |
2444 | if (WARN_ON(status->rate_idx < 0 || | 2456 | if (WARN_ON(status->rate_idx < 0 || |
diff --git a/net/netlabel/netlabel_kapi.c b/net/netlabel/netlabel_kapi.c index 3ff6f325be3f..6ce00205f342 100644 --- a/net/netlabel/netlabel_kapi.c +++ b/net/netlabel/netlabel_kapi.c | |||
@@ -151,7 +151,7 @@ int netlbl_cfg_unlbl_map_add(const char *domain, | |||
151 | addr6 = addr; | 151 | addr6 = addr; |
152 | mask6 = mask; | 152 | mask6 = mask; |
153 | map6 = kzalloc(sizeof(*map6), GFP_ATOMIC); | 153 | map6 = kzalloc(sizeof(*map6), GFP_ATOMIC); |
154 | if (map4 == NULL) | 154 | if (map6 == NULL) |
155 | goto cfg_unlbl_map_add_failure; | 155 | goto cfg_unlbl_map_add_failure; |
156 | map6->type = NETLBL_NLTYPE_UNLABELED; | 156 | map6->type = NETLBL_NLTYPE_UNLABELED; |
157 | ipv6_addr_copy(&map6->list.addr, addr6); | 157 | ipv6_addr_copy(&map6->list.addr, addr6); |
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index 6bd8e93869ed..f0a76f6bca71 100644 --- a/net/rose/af_rose.c +++ b/net/rose/af_rose.c | |||
@@ -92,23 +92,21 @@ static void rose_set_lockdep_key(struct net_device *dev) | |||
92 | /* | 92 | /* |
93 | * Convert a ROSE address into text. | 93 | * Convert a ROSE address into text. |
94 | */ | 94 | */ |
95 | const char *rose2asc(const rose_address *addr) | 95 | char *rose2asc(char *buf, const rose_address *addr) |
96 | { | 96 | { |
97 | static char buffer[11]; | ||
98 | |||
99 | if (addr->rose_addr[0] == 0x00 && addr->rose_addr[1] == 0x00 && | 97 | if (addr->rose_addr[0] == 0x00 && addr->rose_addr[1] == 0x00 && |
100 | addr->rose_addr[2] == 0x00 && addr->rose_addr[3] == 0x00 && | 98 | addr->rose_addr[2] == 0x00 && addr->rose_addr[3] == 0x00 && |
101 | addr->rose_addr[4] == 0x00) { | 99 | addr->rose_addr[4] == 0x00) { |
102 | strcpy(buffer, "*"); | 100 | strcpy(buf, "*"); |
103 | } else { | 101 | } else { |
104 | sprintf(buffer, "%02X%02X%02X%02X%02X", addr->rose_addr[0] & 0xFF, | 102 | sprintf(buf, "%02X%02X%02X%02X%02X", addr->rose_addr[0] & 0xFF, |
105 | addr->rose_addr[1] & 0xFF, | 103 | addr->rose_addr[1] & 0xFF, |
106 | addr->rose_addr[2] & 0xFF, | 104 | addr->rose_addr[2] & 0xFF, |
107 | addr->rose_addr[3] & 0xFF, | 105 | addr->rose_addr[3] & 0xFF, |
108 | addr->rose_addr[4] & 0xFF); | 106 | addr->rose_addr[4] & 0xFF); |
109 | } | 107 | } |
110 | 108 | ||
111 | return buffer; | 109 | return buf; |
112 | } | 110 | } |
113 | 111 | ||
114 | /* | 112 | /* |
@@ -1437,7 +1435,7 @@ static void rose_info_stop(struct seq_file *seq, void *v) | |||
1437 | 1435 | ||
1438 | static int rose_info_show(struct seq_file *seq, void *v) | 1436 | static int rose_info_show(struct seq_file *seq, void *v) |
1439 | { | 1437 | { |
1440 | char buf[11]; | 1438 | char buf[11], rsbuf[11]; |
1441 | 1439 | ||
1442 | if (v == SEQ_START_TOKEN) | 1440 | if (v == SEQ_START_TOKEN) |
1443 | seq_puts(seq, | 1441 | seq_puts(seq, |
@@ -1455,8 +1453,8 @@ static int rose_info_show(struct seq_file *seq, void *v) | |||
1455 | devname = dev->name; | 1453 | devname = dev->name; |
1456 | 1454 | ||
1457 | seq_printf(seq, "%-10s %-9s ", | 1455 | seq_printf(seq, "%-10s %-9s ", |
1458 | rose2asc(&rose->dest_addr), | 1456 | rose2asc(rsbuf, &rose->dest_addr), |
1459 | ax2asc(buf, &rose->dest_call)); | 1457 | ax2asc(buf, &rose->dest_call)); |
1460 | 1458 | ||
1461 | if (ax25cmp(&rose->source_call, &null_ax25_address) == 0) | 1459 | if (ax25cmp(&rose->source_call, &null_ax25_address) == 0) |
1462 | callsign = "??????-?"; | 1460 | callsign = "??????-?"; |
@@ -1465,7 +1463,7 @@ static int rose_info_show(struct seq_file *seq, void *v) | |||
1465 | 1463 | ||
1466 | seq_printf(seq, | 1464 | seq_printf(seq, |
1467 | "%-10s %-9s %-5s %3.3X %05d %d %d %d %d %3lu %3lu %3lu %3lu %3lu %3lu/%03lu %5d %5d %ld\n", | 1465 | "%-10s %-9s %-5s %3.3X %05d %d %d %d %d %3lu %3lu %3lu %3lu %3lu %3lu/%03lu %5d %5d %ld\n", |
1468 | rose2asc(&rose->source_addr), | 1466 | rose2asc(rsbuf, &rose->source_addr), |
1469 | callsign, | 1467 | callsign, |
1470 | devname, | 1468 | devname, |
1471 | rose->lci & 0x0FFF, | 1469 | rose->lci & 0x0FFF, |
diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c index a81066a1010a..9478d9b3d977 100644 --- a/net/rose/rose_route.c +++ b/net/rose/rose_route.c | |||
@@ -1104,6 +1104,7 @@ static void rose_node_stop(struct seq_file *seq, void *v) | |||
1104 | 1104 | ||
1105 | static int rose_node_show(struct seq_file *seq, void *v) | 1105 | static int rose_node_show(struct seq_file *seq, void *v) |
1106 | { | 1106 | { |
1107 | char rsbuf[11]; | ||
1107 | int i; | 1108 | int i; |
1108 | 1109 | ||
1109 | if (v == SEQ_START_TOKEN) | 1110 | if (v == SEQ_START_TOKEN) |
@@ -1112,13 +1113,13 @@ static int rose_node_show(struct seq_file *seq, void *v) | |||
1112 | const struct rose_node *rose_node = v; | 1113 | const struct rose_node *rose_node = v; |
1113 | /* if (rose_node->loopback) { | 1114 | /* if (rose_node->loopback) { |
1114 | seq_printf(seq, "%-10s %04d 1 loopback\n", | 1115 | seq_printf(seq, "%-10s %04d 1 loopback\n", |
1115 | rose2asc(&rose_node->address), | 1116 | rose2asc(rsbuf, &rose_node->address), |
1116 | rose_node->mask); | 1117 | rose_node->mask); |
1117 | } else { */ | 1118 | } else { */ |
1118 | seq_printf(seq, "%-10s %04d %d", | 1119 | seq_printf(seq, "%-10s %04d %d", |
1119 | rose2asc(&rose_node->address), | 1120 | rose2asc(rsbuf, &rose_node->address), |
1120 | rose_node->mask, | 1121 | rose_node->mask, |
1121 | rose_node->count); | 1122 | rose_node->count); |
1122 | 1123 | ||
1123 | for (i = 0; i < rose_node->count; i++) | 1124 | for (i = 0; i < rose_node->count; i++) |
1124 | seq_printf(seq, " %05d", | 1125 | seq_printf(seq, " %05d", |
@@ -1267,7 +1268,7 @@ static void rose_route_stop(struct seq_file *seq, void *v) | |||
1267 | 1268 | ||
1268 | static int rose_route_show(struct seq_file *seq, void *v) | 1269 | static int rose_route_show(struct seq_file *seq, void *v) |
1269 | { | 1270 | { |
1270 | char buf[11]; | 1271 | char buf[11], rsbuf[11]; |
1271 | 1272 | ||
1272 | if (v == SEQ_START_TOKEN) | 1273 | if (v == SEQ_START_TOKEN) |
1273 | seq_puts(seq, | 1274 | seq_puts(seq, |
@@ -1279,7 +1280,7 @@ static int rose_route_show(struct seq_file *seq, void *v) | |||
1279 | seq_printf(seq, | 1280 | seq_printf(seq, |
1280 | "%3.3X %-10s %-9s %05d ", | 1281 | "%3.3X %-10s %-9s %05d ", |
1281 | rose_route->lci1, | 1282 | rose_route->lci1, |
1282 | rose2asc(&rose_route->src_addr), | 1283 | rose2asc(rsbuf, &rose_route->src_addr), |
1283 | ax2asc(buf, &rose_route->src_call), | 1284 | ax2asc(buf, &rose_route->src_call), |
1284 | rose_route->neigh1->number); | 1285 | rose_route->neigh1->number); |
1285 | else | 1286 | else |
@@ -1289,10 +1290,10 @@ static int rose_route_show(struct seq_file *seq, void *v) | |||
1289 | if (rose_route->neigh2) | 1290 | if (rose_route->neigh2) |
1290 | seq_printf(seq, | 1291 | seq_printf(seq, |
1291 | "%3.3X %-10s %-9s %05d\n", | 1292 | "%3.3X %-10s %-9s %05d\n", |
1292 | rose_route->lci2, | 1293 | rose_route->lci2, |
1293 | rose2asc(&rose_route->dest_addr), | 1294 | rose2asc(rsbuf, &rose_route->dest_addr), |
1294 | ax2asc(buf, &rose_route->dest_call), | 1295 | ax2asc(buf, &rose_route->dest_call), |
1295 | rose_route->neigh2->number); | 1296 | rose_route->neigh2->number); |
1296 | else | 1297 | else |
1297 | seq_puts(seq, | 1298 | seq_puts(seq, |
1298 | "000 * * 00000\n"); | 1299 | "000 * * 00000\n"); |