diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ehea/ehea.h | 8 | ||||
-rw-r--r-- | drivers/net/ehea/ehea_main.c | 42 | ||||
-rw-r--r-- | drivers/net/forcedeth.c | 15 | ||||
-rw-r--r-- | drivers/net/fs_enet/mac-fcc.c | 3 | ||||
-rw-r--r-- | drivers/net/ibm_newemac/core.c | 8 | ||||
-rw-r--r-- | drivers/net/pasemi_mac.c | 2 | ||||
-rw-r--r-- | drivers/net/wan/hdlc_fr.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_80211_rx.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_ap.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_cs.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_hw.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_main.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/if_usb.c | 1 |
16 files changed, 86 insertions, 42 deletions
diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h index fe872fbd671e..e01926b7b5b7 100644 --- a/drivers/net/ehea/ehea.h +++ b/drivers/net/ehea/ehea.h | |||
@@ -40,7 +40,7 @@ | |||
40 | #include <asm/io.h> | 40 | #include <asm/io.h> |
41 | 41 | ||
42 | #define DRV_NAME "ehea" | 42 | #define DRV_NAME "ehea" |
43 | #define DRV_VERSION "EHEA_0091" | 43 | #define DRV_VERSION "EHEA_0092" |
44 | 44 | ||
45 | /* eHEA capability flags */ | 45 | /* eHEA capability flags */ |
46 | #define DLPAR_PORT_ADD_REM 1 | 46 | #define DLPAR_PORT_ADD_REM 1 |
@@ -452,7 +452,7 @@ struct ehea_bcmc_reg_entry { | |||
452 | struct ehea_bcmc_reg_array { | 452 | struct ehea_bcmc_reg_array { |
453 | struct ehea_bcmc_reg_entry *arr; | 453 | struct ehea_bcmc_reg_entry *arr; |
454 | int num_entries; | 454 | int num_entries; |
455 | struct mutex lock; | 455 | spinlock_t lock; |
456 | }; | 456 | }; |
457 | 457 | ||
458 | #define EHEA_PORT_UP 1 | 458 | #define EHEA_PORT_UP 1 |
@@ -478,6 +478,7 @@ struct ehea_port { | |||
478 | int num_add_tx_qps; | 478 | int num_add_tx_qps; |
479 | int num_mcs; | 479 | int num_mcs; |
480 | int resets; | 480 | int resets; |
481 | u64 flags; | ||
481 | u64 mac_addr; | 482 | u64 mac_addr; |
482 | u32 logical_port_id; | 483 | u32 logical_port_id; |
483 | u32 port_speed; | 484 | u32 port_speed; |
@@ -501,7 +502,8 @@ struct port_res_cfg { | |||
501 | }; | 502 | }; |
502 | 503 | ||
503 | enum ehea_flag_bits { | 504 | enum ehea_flag_bits { |
504 | __EHEA_STOP_XFER | 505 | __EHEA_STOP_XFER, |
506 | __EHEA_DISABLE_PORT_RESET | ||
505 | }; | 507 | }; |
506 | 508 | ||
507 | void ehea_set_ethtool_ops(struct net_device *netdev); | 509 | void ehea_set_ethtool_ops(struct net_device *netdev); |
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index 075fd547421e..0920b796bd78 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
@@ -118,6 +118,7 @@ static struct of_device_id ehea_device_table[] = { | |||
118 | }, | 118 | }, |
119 | {}, | 119 | {}, |
120 | }; | 120 | }; |
121 | MODULE_DEVICE_TABLE(of, ehea_device_table); | ||
121 | 122 | ||
122 | static struct of_platform_driver ehea_driver = { | 123 | static struct of_platform_driver ehea_driver = { |
123 | .name = "ehea", | 124 | .name = "ehea", |
@@ -137,6 +138,12 @@ void ehea_dump(void *adr, int len, char *msg) | |||
137 | } | 138 | } |
138 | } | 139 | } |
139 | 140 | ||
141 | void ehea_schedule_port_reset(struct ehea_port *port) | ||
142 | { | ||
143 | if (!test_bit(__EHEA_DISABLE_PORT_RESET, &port->flags)) | ||
144 | schedule_work(&port->reset_task); | ||
145 | } | ||
146 | |||
140 | static void ehea_update_firmware_handles(void) | 147 | static void ehea_update_firmware_handles(void) |
141 | { | 148 | { |
142 | struct ehea_fw_handle_entry *arr = NULL; | 149 | struct ehea_fw_handle_entry *arr = NULL; |
@@ -241,7 +248,7 @@ static void ehea_update_bcmc_registrations(void) | |||
241 | } | 248 | } |
242 | 249 | ||
243 | if (num_registrations) { | 250 | if (num_registrations) { |
244 | arr = kzalloc(num_registrations * sizeof(*arr), GFP_KERNEL); | 251 | arr = kzalloc(num_registrations * sizeof(*arr), GFP_ATOMIC); |
245 | if (!arr) | 252 | if (!arr) |
246 | return; /* Keep the existing array */ | 253 | return; /* Keep the existing array */ |
247 | } else | 254 | } else |
@@ -301,7 +308,7 @@ static struct net_device_stats *ehea_get_stats(struct net_device *dev) | |||
301 | 308 | ||
302 | memset(stats, 0, sizeof(*stats)); | 309 | memset(stats, 0, sizeof(*stats)); |
303 | 310 | ||
304 | cb2 = kzalloc(PAGE_SIZE, GFP_KERNEL); | 311 | cb2 = kzalloc(PAGE_SIZE, GFP_ATOMIC); |
305 | if (!cb2) { | 312 | if (!cb2) { |
306 | ehea_error("no mem for cb2"); | 313 | ehea_error("no mem for cb2"); |
307 | goto out; | 314 | goto out; |
@@ -587,7 +594,7 @@ static int ehea_treat_poll_error(struct ehea_port_res *pr, int rq, | |||
587 | "Resetting port.", pr->qp->init_attr.qp_nr); | 594 | "Resetting port.", pr->qp->init_attr.qp_nr); |
588 | ehea_dump(cqe, sizeof(*cqe), "CQE"); | 595 | ehea_dump(cqe, sizeof(*cqe), "CQE"); |
589 | } | 596 | } |
590 | schedule_work(&pr->port->reset_task); | 597 | ehea_schedule_port_reset(pr->port); |
591 | return 1; | 598 | return 1; |
592 | } | 599 | } |
593 | 600 | ||
@@ -616,7 +623,7 @@ static int get_skb_hdr(struct sk_buff *skb, void **iphdr, | |||
616 | *tcph = tcp_hdr(skb); | 623 | *tcph = tcp_hdr(skb); |
617 | 624 | ||
618 | /* check if ip header and tcp header are complete */ | 625 | /* check if ip header and tcp header are complete */ |
619 | if (iph->tot_len < ip_len + tcp_hdrlen(skb)) | 626 | if (ntohs(iph->tot_len) < ip_len + tcp_hdrlen(skb)) |
620 | return -1; | 627 | return -1; |
621 | 628 | ||
622 | *hdr_flags = LRO_IPV4 | LRO_TCP; | 629 | *hdr_flags = LRO_IPV4 | LRO_TCP; |
@@ -765,7 +772,7 @@ static struct ehea_cqe *ehea_proc_cqes(struct ehea_port_res *pr, int my_quota) | |||
765 | ehea_error("Send Completion Error: Resetting port"); | 772 | ehea_error("Send Completion Error: Resetting port"); |
766 | if (netif_msg_tx_err(pr->port)) | 773 | if (netif_msg_tx_err(pr->port)) |
767 | ehea_dump(cqe, sizeof(*cqe), "Send CQE"); | 774 | ehea_dump(cqe, sizeof(*cqe), "Send CQE"); |
768 | schedule_work(&pr->port->reset_task); | 775 | ehea_schedule_port_reset(pr->port); |
769 | break; | 776 | break; |
770 | } | 777 | } |
771 | 778 | ||
@@ -885,7 +892,7 @@ static irqreturn_t ehea_qp_aff_irq_handler(int irq, void *param) | |||
885 | eqe = ehea_poll_eq(port->qp_eq); | 892 | eqe = ehea_poll_eq(port->qp_eq); |
886 | } | 893 | } |
887 | 894 | ||
888 | schedule_work(&port->reset_task); | 895 | ehea_schedule_port_reset(port); |
889 | 896 | ||
890 | return IRQ_HANDLED; | 897 | return IRQ_HANDLED; |
891 | } | 898 | } |
@@ -1763,7 +1770,7 @@ static int ehea_set_mac_addr(struct net_device *dev, void *sa) | |||
1763 | 1770 | ||
1764 | memcpy(dev->dev_addr, mac_addr->sa_data, dev->addr_len); | 1771 | memcpy(dev->dev_addr, mac_addr->sa_data, dev->addr_len); |
1765 | 1772 | ||
1766 | mutex_lock(&ehea_bcmc_regs.lock); | 1773 | spin_lock(&ehea_bcmc_regs.lock); |
1767 | 1774 | ||
1768 | /* Deregister old MAC in pHYP */ | 1775 | /* Deregister old MAC in pHYP */ |
1769 | if (port->state == EHEA_PORT_UP) { | 1776 | if (port->state == EHEA_PORT_UP) { |
@@ -1785,7 +1792,7 @@ static int ehea_set_mac_addr(struct net_device *dev, void *sa) | |||
1785 | 1792 | ||
1786 | out_upregs: | 1793 | out_upregs: |
1787 | ehea_update_bcmc_registrations(); | 1794 | ehea_update_bcmc_registrations(); |
1788 | mutex_unlock(&ehea_bcmc_regs.lock); | 1795 | spin_unlock(&ehea_bcmc_regs.lock); |
1789 | out_free: | 1796 | out_free: |
1790 | kfree(cb0); | 1797 | kfree(cb0); |
1791 | out: | 1798 | out: |
@@ -1947,7 +1954,7 @@ static void ehea_set_multicast_list(struct net_device *dev) | |||
1947 | } | 1954 | } |
1948 | ehea_promiscuous(dev, 0); | 1955 | ehea_promiscuous(dev, 0); |
1949 | 1956 | ||
1950 | mutex_lock(&ehea_bcmc_regs.lock); | 1957 | spin_lock(&ehea_bcmc_regs.lock); |
1951 | 1958 | ||
1952 | if (dev->flags & IFF_ALLMULTI) { | 1959 | if (dev->flags & IFF_ALLMULTI) { |
1953 | ehea_allmulti(dev, 1); | 1960 | ehea_allmulti(dev, 1); |
@@ -1978,7 +1985,7 @@ static void ehea_set_multicast_list(struct net_device *dev) | |||
1978 | } | 1985 | } |
1979 | out: | 1986 | out: |
1980 | ehea_update_bcmc_registrations(); | 1987 | ehea_update_bcmc_registrations(); |
1981 | mutex_unlock(&ehea_bcmc_regs.lock); | 1988 | spin_unlock(&ehea_bcmc_regs.lock); |
1982 | return; | 1989 | return; |
1983 | } | 1990 | } |
1984 | 1991 | ||
@@ -2497,7 +2504,7 @@ static int ehea_up(struct net_device *dev) | |||
2497 | } | 2504 | } |
2498 | } | 2505 | } |
2499 | 2506 | ||
2500 | mutex_lock(&ehea_bcmc_regs.lock); | 2507 | spin_lock(&ehea_bcmc_regs.lock); |
2501 | 2508 | ||
2502 | ret = ehea_broadcast_reg_helper(port, H_REG_BCMC); | 2509 | ret = ehea_broadcast_reg_helper(port, H_REG_BCMC); |
2503 | if (ret) { | 2510 | if (ret) { |
@@ -2520,7 +2527,7 @@ out: | |||
2520 | ehea_info("Failed starting %s. ret=%i", dev->name, ret); | 2527 | ehea_info("Failed starting %s. ret=%i", dev->name, ret); |
2521 | 2528 | ||
2522 | ehea_update_bcmc_registrations(); | 2529 | ehea_update_bcmc_registrations(); |
2523 | mutex_unlock(&ehea_bcmc_regs.lock); | 2530 | spin_unlock(&ehea_bcmc_regs.lock); |
2524 | 2531 | ||
2525 | ehea_update_firmware_handles(); | 2532 | ehea_update_firmware_handles(); |
2526 | mutex_unlock(&ehea_fw_handles.lock); | 2533 | mutex_unlock(&ehea_fw_handles.lock); |
@@ -2575,7 +2582,7 @@ static int ehea_down(struct net_device *dev) | |||
2575 | 2582 | ||
2576 | mutex_lock(&ehea_fw_handles.lock); | 2583 | mutex_lock(&ehea_fw_handles.lock); |
2577 | 2584 | ||
2578 | mutex_lock(&ehea_bcmc_regs.lock); | 2585 | spin_lock(&ehea_bcmc_regs.lock); |
2579 | ehea_drop_multicast_list(dev); | 2586 | ehea_drop_multicast_list(dev); |
2580 | ehea_broadcast_reg_helper(port, H_DEREG_BCMC); | 2587 | ehea_broadcast_reg_helper(port, H_DEREG_BCMC); |
2581 | 2588 | ||
@@ -2584,7 +2591,7 @@ static int ehea_down(struct net_device *dev) | |||
2584 | port->state = EHEA_PORT_DOWN; | 2591 | port->state = EHEA_PORT_DOWN; |
2585 | 2592 | ||
2586 | ehea_update_bcmc_registrations(); | 2593 | ehea_update_bcmc_registrations(); |
2587 | mutex_unlock(&ehea_bcmc_regs.lock); | 2594 | spin_unlock(&ehea_bcmc_regs.lock); |
2588 | 2595 | ||
2589 | ret = ehea_clean_all_portres(port); | 2596 | ret = ehea_clean_all_portres(port); |
2590 | if (ret) | 2597 | if (ret) |
@@ -2605,13 +2612,14 @@ static int ehea_stop(struct net_device *dev) | |||
2605 | if (netif_msg_ifdown(port)) | 2612 | if (netif_msg_ifdown(port)) |
2606 | ehea_info("disabling port %s", dev->name); | 2613 | ehea_info("disabling port %s", dev->name); |
2607 | 2614 | ||
2615 | set_bit(__EHEA_DISABLE_PORT_RESET, &port->flags); | ||
2608 | cancel_work_sync(&port->reset_task); | 2616 | cancel_work_sync(&port->reset_task); |
2609 | |||
2610 | mutex_lock(&port->port_lock); | 2617 | mutex_lock(&port->port_lock); |
2611 | netif_stop_queue(dev); | 2618 | netif_stop_queue(dev); |
2612 | port_napi_disable(port); | 2619 | port_napi_disable(port); |
2613 | ret = ehea_down(dev); | 2620 | ret = ehea_down(dev); |
2614 | mutex_unlock(&port->port_lock); | 2621 | mutex_unlock(&port->port_lock); |
2622 | clear_bit(__EHEA_DISABLE_PORT_RESET, &port->flags); | ||
2615 | return ret; | 2623 | return ret; |
2616 | } | 2624 | } |
2617 | 2625 | ||
@@ -2941,7 +2949,7 @@ static void ehea_tx_watchdog(struct net_device *dev) | |||
2941 | 2949 | ||
2942 | if (netif_carrier_ok(dev) && | 2950 | if (netif_carrier_ok(dev) && |
2943 | !test_bit(__EHEA_STOP_XFER, &ehea_driver_flags)) | 2951 | !test_bit(__EHEA_STOP_XFER, &ehea_driver_flags)) |
2944 | schedule_work(&port->reset_task); | 2952 | ehea_schedule_port_reset(port); |
2945 | } | 2953 | } |
2946 | 2954 | ||
2947 | int ehea_sense_adapter_attr(struct ehea_adapter *adapter) | 2955 | int ehea_sense_adapter_attr(struct ehea_adapter *adapter) |
@@ -3590,7 +3598,7 @@ int __init ehea_module_init(void) | |||
3590 | memset(&ehea_bcmc_regs, 0, sizeof(ehea_bcmc_regs)); | 3598 | memset(&ehea_bcmc_regs, 0, sizeof(ehea_bcmc_regs)); |
3591 | 3599 | ||
3592 | mutex_init(&ehea_fw_handles.lock); | 3600 | mutex_init(&ehea_fw_handles.lock); |
3593 | mutex_init(&ehea_bcmc_regs.lock); | 3601 | spin_lock_init(&ehea_bcmc_regs.lock); |
3594 | 3602 | ||
3595 | ret = check_module_parm(); | 3603 | ret = check_module_parm(); |
3596 | if (ret) | 3604 | if (ret) |
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index afd063fe11af..786d668c612e 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -4198,12 +4198,23 @@ static int nv_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) | |||
4198 | 4198 | ||
4199 | netif_carrier_off(dev); | 4199 | netif_carrier_off(dev); |
4200 | if (netif_running(dev)) { | 4200 | if (netif_running(dev)) { |
4201 | unsigned long flags; | ||
4202 | |||
4201 | nv_disable_irq(dev); | 4203 | nv_disable_irq(dev); |
4202 | netif_tx_lock_bh(dev); | 4204 | netif_tx_lock_bh(dev); |
4203 | spin_lock(&np->lock); | 4205 | /* with plain spinlock lockdep complains */ |
4206 | spin_lock_irqsave(&np->lock, flags); | ||
4204 | /* stop engines */ | 4207 | /* stop engines */ |
4208 | /* FIXME: | ||
4209 | * this can take some time, and interrupts are disabled | ||
4210 | * due to spin_lock_irqsave, but let's hope no daemon | ||
4211 | * is going to change the settings very often... | ||
4212 | * Worst case: | ||
4213 | * NV_RXSTOP_DELAY1MAX + NV_TXSTOP_DELAY1MAX | ||
4214 | * + some minor delays, which is up to a second approximately | ||
4215 | */ | ||
4205 | nv_stop_rxtx(dev); | 4216 | nv_stop_rxtx(dev); |
4206 | spin_unlock(&np->lock); | 4217 | spin_unlock_irqrestore(&np->lock, flags); |
4207 | netif_tx_unlock_bh(dev); | 4218 | netif_tx_unlock_bh(dev); |
4208 | } | 4219 | } |
4209 | 4220 | ||
diff --git a/drivers/net/fs_enet/mac-fcc.c b/drivers/net/fs_enet/mac-fcc.c index e36321152d50..8268b3535b30 100644 --- a/drivers/net/fs_enet/mac-fcc.c +++ b/drivers/net/fs_enet/mac-fcc.c | |||
@@ -463,6 +463,9 @@ static void restart(struct net_device *dev) | |||
463 | else | 463 | else |
464 | C32(fccp, fcc_fpsmr, FCC_PSMR_FDE | FCC_PSMR_LPB); | 464 | C32(fccp, fcc_fpsmr, FCC_PSMR_FDE | FCC_PSMR_LPB); |
465 | 465 | ||
466 | /* Restore multicast and promiscuous settings */ | ||
467 | set_multicast_list(dev); | ||
468 | |||
466 | S32(fccp, fcc_gfmr, FCC_GFMR_ENR | FCC_GFMR_ENT); | 469 | S32(fccp, fcc_gfmr, FCC_GFMR_ENR | FCC_GFMR_ENT); |
467 | } | 470 | } |
468 | 471 | ||
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c index 5d2108c5ac7c..babc79ad490b 100644 --- a/drivers/net/ibm_newemac/core.c +++ b/drivers/net/ibm_newemac/core.c | |||
@@ -1636,6 +1636,12 @@ static int emac_poll_rx(void *param, int budget) | |||
1636 | goto next; | 1636 | goto next; |
1637 | } | 1637 | } |
1638 | 1638 | ||
1639 | if (len < ETH_HLEN) { | ||
1640 | ++dev->estats.rx_dropped_stack; | ||
1641 | emac_recycle_rx_skb(dev, slot, len); | ||
1642 | goto next; | ||
1643 | } | ||
1644 | |||
1639 | if (len && len < EMAC_RX_COPY_THRESH) { | 1645 | if (len && len < EMAC_RX_COPY_THRESH) { |
1640 | struct sk_buff *copy_skb = | 1646 | struct sk_buff *copy_skb = |
1641 | alloc_skb(len + EMAC_RX_SKB_HEADROOM + 2, GFP_ATOMIC); | 1647 | alloc_skb(len + EMAC_RX_SKB_HEADROOM + 2, GFP_ATOMIC); |
@@ -2719,6 +2725,8 @@ static int __devinit emac_probe(struct of_device *ofdev, | |||
2719 | /* Clean rings */ | 2725 | /* Clean rings */ |
2720 | memset(dev->tx_desc, 0, NUM_TX_BUFF * sizeof(struct mal_descriptor)); | 2726 | memset(dev->tx_desc, 0, NUM_TX_BUFF * sizeof(struct mal_descriptor)); |
2721 | memset(dev->rx_desc, 0, NUM_RX_BUFF * sizeof(struct mal_descriptor)); | 2727 | memset(dev->rx_desc, 0, NUM_RX_BUFF * sizeof(struct mal_descriptor)); |
2728 | memset(dev->tx_skb, 0, NUM_TX_BUFF * sizeof(struct sk_buff *)); | ||
2729 | memset(dev->rx_skb, 0, NUM_RX_BUFF * sizeof(struct sk_buff *)); | ||
2722 | 2730 | ||
2723 | /* Attach to ZMII, if needed */ | 2731 | /* Attach to ZMII, if needed */ |
2724 | if (emac_has_feature(dev, EMAC_FTR_HAS_ZMII) && | 2732 | if (emac_has_feature(dev, EMAC_FTR_HAS_ZMII) && |
diff --git a/drivers/net/pasemi_mac.c b/drivers/net/pasemi_mac.c index 3b2a6c598088..993d87c9296f 100644 --- a/drivers/net/pasemi_mac.c +++ b/drivers/net/pasemi_mac.c | |||
@@ -277,7 +277,7 @@ static int get_skb_hdr(struct sk_buff *skb, void **iphdr, | |||
277 | *tcph = tcp_hdr(skb); | 277 | *tcph = tcp_hdr(skb); |
278 | 278 | ||
279 | /* check if ip header and tcp header are complete */ | 279 | /* check if ip header and tcp header are complete */ |
280 | if (iph->tot_len < ip_len + tcp_hdrlen(skb)) | 280 | if (ntohs(iph->tot_len) < ip_len + tcp_hdrlen(skb)) |
281 | return -1; | 281 | return -1; |
282 | 282 | ||
283 | *hdr_flags = LRO_IPV4 | LRO_TCP; | 283 | *hdr_flags = LRO_IPV4 | LRO_TCP; |
diff --git a/drivers/net/wan/hdlc_fr.c b/drivers/net/wan/hdlc_fr.c index 109bab34094d..62e93dac6b13 100644 --- a/drivers/net/wan/hdlc_fr.c +++ b/drivers/net/wan/hdlc_fr.c | |||
@@ -992,6 +992,7 @@ static int fr_rx(struct sk_buff *skb) | |||
992 | dev->stats.rx_bytes += skb->len; | 992 | dev->stats.rx_bytes += skb->len; |
993 | if (pvc->state.becn) | 993 | if (pvc->state.becn) |
994 | dev->stats.rx_compressed++; | 994 | dev->stats.rx_compressed++; |
995 | skb->dev = dev; | ||
995 | netif_rx(skb); | 996 | netif_rx(skb); |
996 | return NET_RX_SUCCESS; | 997 | return NET_RX_SUCCESS; |
997 | } else { | 998 | } else { |
diff --git a/drivers/net/wireless/hostap/hostap_80211_rx.c b/drivers/net/wireless/hostap/hostap_80211_rx.c index d669e5956ce7..f106bc1585a4 100644 --- a/drivers/net/wireless/hostap/hostap_80211_rx.c +++ b/drivers/net/wireless/hostap/hostap_80211_rx.c | |||
@@ -64,7 +64,7 @@ int prism2_rx_80211(struct net_device *dev, struct sk_buff *skb, | |||
64 | int hdrlen, phdrlen, head_need, tail_need; | 64 | int hdrlen, phdrlen, head_need, tail_need; |
65 | u16 fc; | 65 | u16 fc; |
66 | int prism_header, ret; | 66 | int prism_header, ret; |
67 | struct ieee80211_hdr_4addr *hdr; | 67 | struct ieee80211_hdr_4addr *fhdr; |
68 | 68 | ||
69 | iface = netdev_priv(dev); | 69 | iface = netdev_priv(dev); |
70 | local = iface->local; | 70 | local = iface->local; |
@@ -86,8 +86,8 @@ int prism2_rx_80211(struct net_device *dev, struct sk_buff *skb, | |||
86 | phdrlen = 0; | 86 | phdrlen = 0; |
87 | } | 87 | } |
88 | 88 | ||
89 | hdr = (struct ieee80211_hdr_4addr *) skb->data; | 89 | fhdr = (struct ieee80211_hdr_4addr *) skb->data; |
90 | fc = le16_to_cpu(hdr->frame_ctl); | 90 | fc = le16_to_cpu(fhdr->frame_ctl); |
91 | 91 | ||
92 | if (type == PRISM2_RX_MGMT && (fc & IEEE80211_FCTL_VERS)) { | 92 | if (type == PRISM2_RX_MGMT && (fc & IEEE80211_FCTL_VERS)) { |
93 | printk(KERN_DEBUG "%s: dropped management frame with header " | 93 | printk(KERN_DEBUG "%s: dropped management frame with header " |
@@ -572,7 +572,7 @@ hostap_rx_frame_wds(local_info_t *local, struct ieee80211_hdr_4addr *hdr, | |||
572 | hdr->addr1[2] != 0xff || hdr->addr1[3] != 0xff || | 572 | hdr->addr1[2] != 0xff || hdr->addr1[3] != 0xff || |
573 | hdr->addr1[4] != 0xff || hdr->addr1[5] != 0xff)) { | 573 | hdr->addr1[4] != 0xff || hdr->addr1[5] != 0xff)) { |
574 | /* RA (or BSSID) is not ours - drop */ | 574 | /* RA (or BSSID) is not ours - drop */ |
575 | PDEBUG(DEBUG_EXTRA, "%s: received WDS frame with " | 575 | PDEBUG(DEBUG_EXTRA2, "%s: received WDS frame with " |
576 | "not own or broadcast %s=%s\n", | 576 | "not own or broadcast %s=%s\n", |
577 | local->dev->name, | 577 | local->dev->name, |
578 | fc & IEEE80211_FCTL_FROMDS ? "RA" : "BSSID", | 578 | fc & IEEE80211_FCTL_FROMDS ? "RA" : "BSSID", |
diff --git a/drivers/net/wireless/hostap/hostap_ap.c b/drivers/net/wireless/hostap/hostap_ap.c index 06b23df8f69b..af3d4ef2a80b 100644 --- a/drivers/net/wireless/hostap/hostap_ap.c +++ b/drivers/net/wireless/hostap/hostap_ap.c | |||
@@ -1930,7 +1930,7 @@ static void handle_pspoll(local_info_t *local, | |||
1930 | PDEBUG(DEBUG_PS, " PSPOLL and AID[15:14] not set\n"); | 1930 | PDEBUG(DEBUG_PS, " PSPOLL and AID[15:14] not set\n"); |
1931 | return; | 1931 | return; |
1932 | } | 1932 | } |
1933 | aid &= ~BIT(15) & ~BIT(14); | 1933 | aid &= ~(BIT(15) | BIT(14)); |
1934 | if (aid == 0 || aid > MAX_AID_TABLE_SIZE) { | 1934 | if (aid == 0 || aid > MAX_AID_TABLE_SIZE) { |
1935 | PDEBUG(DEBUG_PS, " invalid aid=%d\n", aid); | 1935 | PDEBUG(DEBUG_PS, " invalid aid=%d\n", aid); |
1936 | return; | 1936 | return; |
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c index ed4317a17cbb..80039a0ae027 100644 --- a/drivers/net/wireless/hostap/hostap_cs.c +++ b/drivers/net/wireless/hostap/hostap_cs.c | |||
@@ -533,10 +533,10 @@ static void prism2_detach(struct pcmcia_device *link) | |||
533 | do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) | 533 | do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) |
534 | 534 | ||
535 | #define CFG_CHECK2(fn, retf) \ | 535 | #define CFG_CHECK2(fn, retf) \ |
536 | do { int ret = (retf); \ | 536 | do { int _ret = (retf); \ |
537 | if (ret != 0) { \ | 537 | if (_ret != 0) { \ |
538 | PDEBUG(DEBUG_EXTRA, "CardServices(" #fn ") returned %d\n", ret); \ | 538 | PDEBUG(DEBUG_EXTRA, "CardServices(" #fn ") returned %d\n", _ret); \ |
539 | cs_error(link, fn, ret); \ | 539 | cs_error(link, fn, _ret); \ |
540 | goto next_entry; \ | 540 | goto next_entry; \ |
541 | } \ | 541 | } \ |
542 | } while (0) | 542 | } while (0) |
diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c index 79a9bc95d2a7..6c158a569485 100644 --- a/drivers/net/wireless/hostap/hostap_hw.c +++ b/drivers/net/wireless/hostap/hostap_hw.c | |||
@@ -2835,7 +2835,7 @@ static void hostap_passive_scan(unsigned long data) | |||
2835 | { | 2835 | { |
2836 | local_info_t *local = (local_info_t *) data; | 2836 | local_info_t *local = (local_info_t *) data; |
2837 | struct net_device *dev = local->dev; | 2837 | struct net_device *dev = local->dev; |
2838 | u16 channel; | 2838 | u16 chan; |
2839 | 2839 | ||
2840 | if (local->passive_scan_interval <= 0) | 2840 | if (local->passive_scan_interval <= 0) |
2841 | return; | 2841 | return; |
@@ -2872,11 +2872,11 @@ static void hostap_passive_scan(unsigned long data) | |||
2872 | 2872 | ||
2873 | printk(KERN_DEBUG "%s: passive scan channel %d\n", | 2873 | printk(KERN_DEBUG "%s: passive scan channel %d\n", |
2874 | dev->name, local->passive_scan_channel); | 2874 | dev->name, local->passive_scan_channel); |
2875 | channel = local->passive_scan_channel; | 2875 | chan = local->passive_scan_channel; |
2876 | local->passive_scan_state = PASSIVE_SCAN_WAIT; | 2876 | local->passive_scan_state = PASSIVE_SCAN_WAIT; |
2877 | local->passive_scan_timer.expires = jiffies + HZ / 10; | 2877 | local->passive_scan_timer.expires = jiffies + HZ / 10; |
2878 | } else { | 2878 | } else { |
2879 | channel = local->channel; | 2879 | chan = local->channel; |
2880 | local->passive_scan_state = PASSIVE_SCAN_LISTEN; | 2880 | local->passive_scan_state = PASSIVE_SCAN_LISTEN; |
2881 | local->passive_scan_timer.expires = jiffies + | 2881 | local->passive_scan_timer.expires = jiffies + |
2882 | local->passive_scan_interval * HZ; | 2882 | local->passive_scan_interval * HZ; |
@@ -2884,9 +2884,9 @@ static void hostap_passive_scan(unsigned long data) | |||
2884 | 2884 | ||
2885 | if (hfa384x_cmd_callback(dev, HFA384X_CMDCODE_TEST | | 2885 | if (hfa384x_cmd_callback(dev, HFA384X_CMDCODE_TEST | |
2886 | (HFA384X_TEST_CHANGE_CHANNEL << 8), | 2886 | (HFA384X_TEST_CHANGE_CHANNEL << 8), |
2887 | channel, NULL, 0)) | 2887 | chan, NULL, 0)) |
2888 | printk(KERN_ERR "%s: passive scan channel set %d " | 2888 | printk(KERN_ERR "%s: passive scan channel set %d " |
2889 | "failed\n", dev->name, channel); | 2889 | "failed\n", dev->name, chan); |
2890 | 2890 | ||
2891 | add_timer(&local->passive_scan_timer); | 2891 | add_timer(&local->passive_scan_timer); |
2892 | } | 2892 | } |
diff --git a/drivers/net/wireless/hostap/hostap_main.c b/drivers/net/wireless/hostap/hostap_main.c index b5213f61fb0b..756ab56c1f40 100644 --- a/drivers/net/wireless/hostap/hostap_main.c +++ b/drivers/net/wireless/hostap/hostap_main.c | |||
@@ -594,7 +594,8 @@ void hostap_dump_tx_header(const char *name, const struct hfa384x_tx_frame *tx) | |||
594 | } | 594 | } |
595 | 595 | ||
596 | 596 | ||
597 | int hostap_80211_header_parse(const struct sk_buff *skb, unsigned char *haddr) | 597 | static int hostap_80211_header_parse(const struct sk_buff *skb, |
598 | unsigned char *haddr) | ||
598 | { | 599 | { |
599 | memcpy(haddr, skb_mac_header(skb) + 10, ETH_ALEN); /* addr2 */ | 600 | memcpy(haddr, skb_mac_header(skb) + 10, ETH_ALEN); /* addr2 */ |
600 | return ETH_ALEN; | 601 | return ETH_ALEN; |
@@ -839,7 +840,6 @@ const struct header_ops hostap_80211_ops = { | |||
839 | .rebuild = eth_rebuild_header, | 840 | .rebuild = eth_rebuild_header, |
840 | .cache = eth_header_cache, | 841 | .cache = eth_header_cache, |
841 | .cache_update = eth_header_cache_update, | 842 | .cache_update = eth_header_cache_update, |
842 | |||
843 | .parse = hostap_80211_header_parse, | 843 | .parse = hostap_80211_header_parse, |
844 | }; | 844 | }; |
845 | EXPORT_SYMBOL(hostap_80211_ops); | 845 | EXPORT_SYMBOL(hostap_80211_ops); |
@@ -1132,7 +1132,6 @@ EXPORT_SYMBOL(hostap_set_roaming); | |||
1132 | EXPORT_SYMBOL(hostap_set_auth_algs); | 1132 | EXPORT_SYMBOL(hostap_set_auth_algs); |
1133 | EXPORT_SYMBOL(hostap_dump_rx_header); | 1133 | EXPORT_SYMBOL(hostap_dump_rx_header); |
1134 | EXPORT_SYMBOL(hostap_dump_tx_header); | 1134 | EXPORT_SYMBOL(hostap_dump_tx_header); |
1135 | EXPORT_SYMBOL(hostap_80211_header_parse); | ||
1136 | EXPORT_SYMBOL(hostap_80211_get_hdrlen); | 1135 | EXPORT_SYMBOL(hostap_80211_get_hdrlen); |
1137 | EXPORT_SYMBOL(hostap_get_stats); | 1136 | EXPORT_SYMBOL(hostap_get_stats); |
1138 | EXPORT_SYMBOL(hostap_setup_dev); | 1137 | EXPORT_SYMBOL(hostap_setup_dev); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index 63f20370032d..38866ab0040f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -590,8 +590,12 @@ static void iwl3945_add_radiotap(struct iwl3945_priv *priv, | |||
590 | 590 | ||
591 | if (rate == -1) | 591 | if (rate == -1) |
592 | iwl3945_rt->rt_rate = 0; | 592 | iwl3945_rt->rt_rate = 0; |
593 | else | 593 | else { |
594 | if (stats->band == IEEE80211_BAND_5GHZ) | ||
595 | rate += IWL_FIRST_OFDM_RATE; | ||
596 | |||
594 | iwl3945_rt->rt_rate = iwl3945_rates[rate].ieee; | 597 | iwl3945_rt->rt_rate = iwl3945_rates[rate].ieee; |
598 | } | ||
595 | 599 | ||
596 | /* antenna number */ | 600 | /* antenna number */ |
597 | antenna = phy_flags_hw & RX_RES_PHY_FLAGS_ANTENNA_MSK; | 601 | antenna = phy_flags_hw & RX_RES_PHY_FLAGS_ANTENNA_MSK; |
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 3bc2644039f0..baa1abd5a14d 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -6694,6 +6694,12 @@ static int iwl3945_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
6694 | 6694 | ||
6695 | IWL_DEBUG_MAC80211("enter\n"); | 6695 | IWL_DEBUG_MAC80211("enter\n"); |
6696 | 6696 | ||
6697 | if (priv->iw_mode == IEEE80211_IF_TYPE_MNTR) { | ||
6698 | IWL_DEBUG_MAC80211("leave - monitor\n"); | ||
6699 | dev_kfree_skb_any(skb); | ||
6700 | return 0; | ||
6701 | } | ||
6702 | |||
6697 | IWL_DEBUG_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len, | 6703 | IWL_DEBUG_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len, |
6698 | ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate); | 6704 | ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate); |
6699 | 6705 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index ba0f28945eb1..60b7a6498fe8 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -2682,7 +2682,8 @@ static int iwl4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
2682 | 2682 | ||
2683 | if (priv->iw_mode == IEEE80211_IF_TYPE_MNTR) { | 2683 | if (priv->iw_mode == IEEE80211_IF_TYPE_MNTR) { |
2684 | IWL_DEBUG_MAC80211("leave - monitor\n"); | 2684 | IWL_DEBUG_MAC80211("leave - monitor\n"); |
2685 | return -1; | 2685 | dev_kfree_skb_any(skb); |
2686 | return 0; | ||
2686 | } | 2687 | } |
2687 | 2688 | ||
2688 | IWL_DEBUG_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len, | 2689 | IWL_DEBUG_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len, |
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c index 24783103a7dd..a8b4abce5bfa 100644 --- a/drivers/net/wireless/libertas/if_usb.c +++ b/drivers/net/wireless/libertas/if_usb.c | |||
@@ -947,6 +947,7 @@ static struct usb_driver if_usb_driver = { | |||
947 | .id_table = if_usb_table, | 947 | .id_table = if_usb_table, |
948 | .suspend = if_usb_suspend, | 948 | .suspend = if_usb_suspend, |
949 | .resume = if_usb_resume, | 949 | .resume = if_usb_resume, |
950 | .reset_resume = if_usb_resume, | ||
950 | }; | 951 | }; |
951 | 952 | ||
952 | static int __init if_usb_init_module(void) | 953 | static int __init if_usb_init_module(void) |