aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/Kconfig41
-rw-r--r--drivers/net/dm9000.c6
-rw-r--r--drivers/net/phy/mdio-bitbang.c2
-rw-r--r--drivers/net/tsi108_eth.c2
-rw-r--r--drivers/net/tulip/Kconfig14
-rw-r--r--drivers/net/wireless/b43/main.c5
-rw-r--r--drivers/net/wireless/b43legacy/main.c2
-rw-r--r--drivers/net/wireless/ipw2100.c39
-rw-r--r--drivers/net/wireless/ipw2100.h4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945-rs.c3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.c1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965-rs.c13
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c44
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c52
-rw-r--r--drivers/net/wireless/iwlwifi/iwlwifi.h7
-rw-r--r--drivers/net/wireless/p54common.c2
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dev.c2
-rw-r--r--drivers/net/wireless/rt2x00/rt73usb.c1
-rw-r--r--drivers/net/wireless/rtl8187_dev.c35
-rw-r--r--drivers/net/wireless/zd1201.c4
-rw-r--r--drivers/net/wireless/zd1211rw/zd_usb.c7
-rw-r--r--drivers/s390/net/qeth_main.c3
23 files changed, 158 insertions, 133 deletions
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 83d52c8acab0..2cafa5c1783e 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -1293,9 +1293,6 @@ config PCNET32_NAPI
1293 deployed on potentially unfriendly networks (e.g. in a firewall), 1293 deployed on potentially unfriendly networks (e.g. in a firewall),
1294 then say Y here. 1294 then say Y here.
1295 1295
1296 See <file:Documentation/networking/NAPI_HOWTO.txt> for more
1297 information.
1298
1299 If in doubt, say N. 1296 If in doubt, say N.
1300 1297
1301config AMD8111_ETH 1298config AMD8111_ETH
@@ -1313,7 +1310,7 @@ config AMD8111_ETH
1313 will be called amd8111e. 1310 will be called amd8111e.
1314 1311
1315config AMD8111E_NAPI 1312config AMD8111E_NAPI
1316 bool "Enable NAPI support" 1313 bool "Use RX polling (NAPI)"
1317 depends on AMD8111_ETH 1314 depends on AMD8111_ETH
1318 help 1315 help
1319 NAPI is a new driver API designed to reduce CPU and interrupt load 1316 NAPI is a new driver API designed to reduce CPU and interrupt load
@@ -1324,9 +1321,6 @@ config AMD8111E_NAPI
1324 deployed on potentially unfriendly networks (e.g. in a firewall), 1321 deployed on potentially unfriendly networks (e.g. in a firewall),
1325 then say Y here. 1322 then say Y here.
1326 1323
1327 See <file:Documentation/networking/NAPI_HOWTO.txt> for more
1328 information.
1329
1330 If in doubt, say N. 1324 If in doubt, say N.
1331 1325
1332config ADAPTEC_STARFIRE 1326config ADAPTEC_STARFIRE
@@ -1355,9 +1349,6 @@ config ADAPTEC_STARFIRE_NAPI
1355 deployed on potentially unfriendly networks (e.g. in a firewall), 1349 deployed on potentially unfriendly networks (e.g. in a firewall),
1356 then say Y here. 1350 then say Y here.
1357 1351
1358 See <file:Documentation/networking/NAPI_HOWTO.txt> for more
1359 information.
1360
1361 If in doubt, say N. 1352 If in doubt, say N.
1362 1353
1363config AC3200 1354config AC3200
@@ -1431,7 +1422,7 @@ config FORCEDETH
1431 called forcedeth. 1422 called forcedeth.
1432 1423
1433config FORCEDETH_NAPI 1424config FORCEDETH_NAPI
1434 bool "Use Rx and Tx Polling (NAPI) (EXPERIMENTAL)" 1425 bool "Use Rx Polling (NAPI) (EXPERIMENTAL)"
1435 depends on FORCEDETH && EXPERIMENTAL 1426 depends on FORCEDETH && EXPERIMENTAL
1436 help 1427 help
1437 NAPI is a new driver API designed to reduce CPU and interrupt load 1428 NAPI is a new driver API designed to reduce CPU and interrupt load
@@ -1442,9 +1433,6 @@ config FORCEDETH_NAPI
1442 deployed on potentially unfriendly networks (e.g. in a firewall), 1433 deployed on potentially unfriendly networks (e.g. in a firewall),
1443 then say Y here. 1434 then say Y here.
1444 1435
1445 See <file:Documentation/networking/NAPI_HOWTO.txt> for more
1446 information.
1447
1448 If in doubt, say N. 1436 If in doubt, say N.
1449 1437
1450config CS89x0 1438config CS89x0
@@ -1756,9 +1744,6 @@ config VIA_RHINE_NAPI
1756 deployed on potentially unfriendly networks (e.g. in a firewall), 1744 deployed on potentially unfriendly networks (e.g. in a firewall),
1757 then say Y here. 1745 then say Y here.
1758 1746
1759 See <file:Documentation/networking/NAPI_HOWTO.txt> for more
1760 information.
1761
1762config LAN_SAA9730 1747config LAN_SAA9730
1763 bool "Philips SAA9730 Ethernet support" 1748 bool "Philips SAA9730 Ethernet support"
1764 depends on NET_PCI && PCI && MIPS_ATLAS 1749 depends on NET_PCI && PCI && MIPS_ATLAS
@@ -2003,9 +1988,6 @@ config E1000_NAPI
2003 deployed on potentially unfriendly networks (e.g. in a firewall), 1988 deployed on potentially unfriendly networks (e.g. in a firewall),
2004 then say Y here. 1989 then say Y here.
2005 1990
2006 See <file:Documentation/networking/NAPI_HOWTO.txt> for more
2007 information.
2008
2009 If in doubt, say N. 1991 If in doubt, say N.
2010 1992
2011config E1000_DISABLE_PACKET_SPLIT 1993config E1000_DISABLE_PACKET_SPLIT
@@ -2099,7 +2081,7 @@ config R8169
2099 will be called r8169. This is recommended. 2081 will be called r8169. This is recommended.
2100 2082
2101config R8169_NAPI 2083config R8169_NAPI
2102 bool "Use Rx and Tx Polling (NAPI) (EXPERIMENTAL)" 2084 bool "Use Rx Polling (NAPI) (EXPERIMENTAL)"
2103 depends on R8169 && EXPERIMENTAL 2085 depends on R8169 && EXPERIMENTAL
2104 help 2086 help
2105 NAPI is a new driver API designed to reduce CPU and interrupt load 2087 NAPI is a new driver API designed to reduce CPU and interrupt load
@@ -2110,9 +2092,6 @@ config R8169_NAPI
2110 deployed on potentially unfriendly networks (e.g. in a firewall), 2092 deployed on potentially unfriendly networks (e.g. in a firewall),
2111 then say Y here. 2093 then say Y here.
2112 2094
2113 See <file:Documentation/networking/NAPI_HOWTO.txt> for more
2114 information.
2115
2116 If in doubt, say N. 2095 If in doubt, say N.
2117 2096
2118config R8169_VLAN 2097config R8169_VLAN
@@ -2364,7 +2343,7 @@ config GIANFAR
2364 and MPC86xx family of chips, and the FEC on the 8540. 2343 and MPC86xx family of chips, and the FEC on the 8540.
2365 2344
2366config GFAR_NAPI 2345config GFAR_NAPI
2367 bool "NAPI Support" 2346 bool "Use Rx Polling (NAPI)"
2368 depends on GIANFAR 2347 depends on GIANFAR
2369 2348
2370config UCC_GETH 2349config UCC_GETH
@@ -2376,7 +2355,7 @@ config UCC_GETH
2376 which is available on some Freescale SOCs. 2355 which is available on some Freescale SOCs.
2377 2356
2378config UGETH_NAPI 2357config UGETH_NAPI
2379 bool "NAPI Support" 2358 bool "Use Rx Polling (NAPI)"
2380 depends on UCC_GETH 2359 depends on UCC_GETH
2381 2360
2382config UGETH_MAGIC_PACKET 2361config UGETH_MAGIC_PACKET
@@ -2494,7 +2473,7 @@ config CHELSIO_T3
2494 2473
2495config EHEA 2474config EHEA
2496 tristate "eHEA Ethernet support" 2475 tristate "eHEA Ethernet support"
2497 depends on IBMEBUS 2476 depends on IBMEBUS && INET
2498 select INET_LRO 2477 select INET_LRO
2499 ---help--- 2478 ---help---
2500 This driver supports the IBM pSeries eHEA ethernet adapter. 2479 This driver supports the IBM pSeries eHEA ethernet adapter.
@@ -2559,9 +2538,6 @@ config IXGB_NAPI
2559 deployed on potentially unfriendly networks (e.g. in a firewall), 2538 deployed on potentially unfriendly networks (e.g. in a firewall),
2560 then say Y here. 2539 then say Y here.
2561 2540
2562 See <file:Documentation/networking/NAPI_HOWTO.txt> for more
2563 information.
2564
2565 If in doubt, say N. 2541 If in doubt, say N.
2566 2542
2567config S2IO 2543config S2IO
@@ -2584,14 +2560,11 @@ config S2IO_NAPI
2584 deployed on potentially unfriendly networks (e.g. in a firewall), 2560 deployed on potentially unfriendly networks (e.g. in a firewall),
2585 then say Y here. 2561 then say Y here.
2586 2562
2587 See <file:Documentation/networking/NAPI_HOWTO.txt> for more
2588 information.
2589
2590 If in doubt, say N. 2563 If in doubt, say N.
2591 2564
2592config MYRI10GE 2565config MYRI10GE
2593 tristate "Myricom Myri-10G Ethernet support" 2566 tristate "Myricom Myri-10G Ethernet support"
2594 depends on PCI 2567 depends on PCI && INET
2595 select FW_LOADER 2568 select FW_LOADER
2596 select CRC32 2569 select CRC32
2597 select INET_LRO 2570 select INET_LRO
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
index 27ac010900ab..3286d2a0a870 100644
--- a/drivers/net/dm9000.c
+++ b/drivers/net/dm9000.c
@@ -542,7 +542,8 @@ dm9000_probe(struct platform_device *pdev)
542 542
543 if (id_val != DM9000_ID) { 543 if (id_val != DM9000_ID) {
544 printk("%s: wrong id: 0x%08x\n", CARDNAME, id_val); 544 printk("%s: wrong id: 0x%08x\n", CARDNAME, id_val);
545 goto release; 545 ret = -ENODEV;
546 goto out;
546 } 547 }
547 548
548 /* from this point we assume that we have found a DM9000 */ 549 /* from this point we assume that we have found a DM9000 */
@@ -602,8 +603,7 @@ dm9000_probe(struct platform_device *pdev)
602 } 603 }
603 return 0; 604 return 0;
604 605
605 release: 606out:
606 out:
607 printk("%s: not found (%d).\n", CARDNAME, ret); 607 printk("%s: not found (%d).\n", CARDNAME, ret);
608 608
609 dm9000_release_board(pdev, db); 609 dm9000_release_board(pdev, db);
diff --git a/drivers/net/phy/mdio-bitbang.c b/drivers/net/phy/mdio-bitbang.c
index 8cd243d92af3..2747b1f89ffe 100644
--- a/drivers/net/phy/mdio-bitbang.c
+++ b/drivers/net/phy/mdio-bitbang.c
@@ -185,3 +185,5 @@ void free_mdio_bitbang(struct mii_bus *bus)
185 module_put(ctrl->ops->owner); 185 module_put(ctrl->ops->owner);
186 kfree(bus); 186 kfree(bus);
187} 187}
188
189MODULE_LICENSE("GPL");
diff --git a/drivers/net/tsi108_eth.c b/drivers/net/tsi108_eth.c
index df10af7df7b8..35d15e850075 100644
--- a/drivers/net/tsi108_eth.c
+++ b/drivers/net/tsi108_eth.c
@@ -1629,7 +1629,7 @@ tsi108_init_one(struct platform_device *pdev)
1629 goto register_fail; 1629 goto register_fail;
1630 } 1630 }
1631 1631
1632 printk(KERN_INFO "%s: Tsi108 Gigabit Ethernet, MAC: %s\n" 1632 printk(KERN_INFO "%s: Tsi108 Gigabit Ethernet, MAC: %s\n",
1633 dev->name, print_mac(mac, dev->dev_addr)); 1633 dev->name, print_mac(mac, dev->dev_addr));
1634#ifdef DEBUG 1634#ifdef DEBUG
1635 data->msg_enable = DEBUG; 1635 data->msg_enable = DEBUG;
diff --git a/drivers/net/tulip/Kconfig b/drivers/net/tulip/Kconfig
index 1c537d5a3062..49d7a290dbbc 100644
--- a/drivers/net/tulip/Kconfig
+++ b/drivers/net/tulip/Kconfig
@@ -67,7 +67,7 @@ config TULIP_MMIO
67 If in doubt, say N. 67 If in doubt, say N.
68 68
69config TULIP_NAPI 69config TULIP_NAPI
70 bool "Use NAPI RX polling " 70 bool "Use RX polling (NAPI)"
71 depends on TULIP 71 depends on TULIP
72 help 72 help
73 NAPI is a new driver API designed to reduce CPU and interrupt load 73 NAPI is a new driver API designed to reduce CPU and interrupt load
@@ -78,18 +78,16 @@ config TULIP_NAPI
78 deployed on potentially unfriendly networks (e.g. in a firewall), 78 deployed on potentially unfriendly networks (e.g. in a firewall),
79 then say Y here. 79 then say Y here.
80 80
81 See <file:Documentation/networking/NAPI_HOWTO.txt> for more
82 information.
83
84 If in doubt, say N. 81 If in doubt, say N.
85 82
86config TULIP_NAPI_HW_MITIGATION 83config TULIP_NAPI_HW_MITIGATION
87 bool "Use Interrupt Mitigation " 84 bool "Use Interrupt Mitigation"
88 depends on TULIP_NAPI 85 depends on TULIP_NAPI
89 ---help--- 86 ---help---
90 Use HW to reduce RX interrupts. Not strict necessary since NAPI reduces 87 Use HW to reduce RX interrupts. Not strictly necessary since NAPI
91 RX interrupts but itself. Although this reduces RX interrupts even at 88 reduces RX interrupts by itself. Interrupt mitigation reduces RX
92 low levels traffic at the cost of a small latency. 89 interrupts even at low levels of traffic at the cost of a small
90 latency.
93 91
94 If in doubt, say Y. 92 If in doubt, say Y.
95 93
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index c141a264ac45..9d9ff76a9bc6 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -49,7 +49,6 @@
49#include "pio.h" 49#include "pio.h"
50#include "sysfs.h" 50#include "sysfs.h"
51#include "xmit.h" 51#include "xmit.h"
52#include "sysfs.h"
53#include "lo.h" 52#include "lo.h"
54#include "pcmcia.h" 53#include "pcmcia.h"
55 54
@@ -3495,7 +3494,7 @@ static int b43_start(struct ieee80211_hw *hw)
3495 struct b43_wl *wl = hw_to_b43_wl(hw); 3494 struct b43_wl *wl = hw_to_b43_wl(hw);
3496 struct b43_wldev *dev = wl->current_dev; 3495 struct b43_wldev *dev = wl->current_dev;
3497 int did_init = 0; 3496 int did_init = 0;
3498 int err; 3497 int err = 0;
3499 3498
3500 mutex_lock(&wl->mutex); 3499 mutex_lock(&wl->mutex);
3501 3500
@@ -3521,7 +3520,7 @@ static int b43_start(struct ieee80211_hw *hw)
3521 return err; 3520 return err;
3522} 3521}
3523 3522
3524void b43_stop(struct ieee80211_hw *hw) 3523static void b43_stop(struct ieee80211_hw *hw)
3525{ 3524{
3526 struct b43_wl *wl = hw_to_b43_wl(hw); 3525 struct b43_wl *wl = hw_to_b43_wl(hw);
3527 struct b43_wldev *dev = wl->current_dev; 3526 struct b43_wldev *dev = wl->current_dev;
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c
index f0749510bcd7..d09479e816cd 100644
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -3306,7 +3306,7 @@ static int b43legacy_start(struct ieee80211_hw *hw)
3306 struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); 3306 struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw);
3307 struct b43legacy_wldev *dev = wl->current_dev; 3307 struct b43legacy_wldev *dev = wl->current_dev;
3308 int did_init = 0; 3308 int did_init = 0;
3309 int err; 3309 int err = 0;
3310 3310
3311 mutex_lock(&wl->mutex); 3311 mutex_lock(&wl->mutex);
3312 3312
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c
index c144e3cdb890..7a7797560a23 100644
--- a/drivers/net/wireless/ipw2100.c
+++ b/drivers/net/wireless/ipw2100.c
@@ -2089,12 +2089,46 @@ static void isr_indicate_rf_kill(struct ipw2100_priv *priv, u32 status)
2089 queue_delayed_work(priv->workqueue, &priv->rf_kill, round_jiffies(HZ)); 2089 queue_delayed_work(priv->workqueue, &priv->rf_kill, round_jiffies(HZ));
2090} 2090}
2091 2091
2092static void send_scan_event(void *data)
2093{
2094 struct ipw2100_priv *priv = data;
2095 union iwreq_data wrqu;
2096
2097 wrqu.data.length = 0;
2098 wrqu.data.flags = 0;
2099 wireless_send_event(priv->net_dev, SIOCGIWSCAN, &wrqu, NULL);
2100}
2101
2102static void ipw2100_scan_event_later(struct work_struct *work)
2103{
2104 send_scan_event(container_of(work, struct ipw2100_priv,
2105 scan_event_later.work));
2106}
2107
2108static void ipw2100_scan_event_now(struct work_struct *work)
2109{
2110 send_scan_event(container_of(work, struct ipw2100_priv,
2111 scan_event_now));
2112}
2113
2092static void isr_scan_complete(struct ipw2100_priv *priv, u32 status) 2114static void isr_scan_complete(struct ipw2100_priv *priv, u32 status)
2093{ 2115{
2094 IPW_DEBUG_SCAN("scan complete\n"); 2116 IPW_DEBUG_SCAN("scan complete\n");
2095 /* Age the scan results... */ 2117 /* Age the scan results... */
2096 priv->ieee->scans++; 2118 priv->ieee->scans++;
2097 priv->status &= ~STATUS_SCANNING; 2119 priv->status &= ~STATUS_SCANNING;
2120
2121 /* Only userspace-requested scan completion events go out immediately */
2122 if (!priv->user_requested_scan) {
2123 if (!delayed_work_pending(&priv->scan_event_later))
2124 queue_delayed_work(priv->workqueue,
2125 &priv->scan_event_later,
2126 round_jiffies(msecs_to_jiffies(4000)));
2127 } else {
2128 priv->user_requested_scan = 0;
2129 cancel_delayed_work(&priv->scan_event_later);
2130 queue_work(priv->workqueue, &priv->scan_event_now);
2131 }
2098} 2132}
2099 2133
2100#ifdef CONFIG_IPW2100_DEBUG 2134#ifdef CONFIG_IPW2100_DEBUG
@@ -4349,6 +4383,7 @@ static void ipw2100_kill_workqueue(struct ipw2100_priv *priv)
4349 cancel_delayed_work(&priv->wx_event_work); 4383 cancel_delayed_work(&priv->wx_event_work);
4350 cancel_delayed_work(&priv->hang_check); 4384 cancel_delayed_work(&priv->hang_check);
4351 cancel_delayed_work(&priv->rf_kill); 4385 cancel_delayed_work(&priv->rf_kill);
4386 cancel_delayed_work(&priv->scan_event_later);
4352 destroy_workqueue(priv->workqueue); 4387 destroy_workqueue(priv->workqueue);
4353 priv->workqueue = NULL; 4388 priv->workqueue = NULL;
4354 } 4389 }
@@ -6092,6 +6127,8 @@ static struct net_device *ipw2100_alloc_device(struct pci_dev *pci_dev,
6092 INIT_DELAYED_WORK(&priv->wx_event_work, ipw2100_wx_event_work); 6127 INIT_DELAYED_WORK(&priv->wx_event_work, ipw2100_wx_event_work);
6093 INIT_DELAYED_WORK(&priv->hang_check, ipw2100_hang_check); 6128 INIT_DELAYED_WORK(&priv->hang_check, ipw2100_hang_check);
6094 INIT_DELAYED_WORK(&priv->rf_kill, ipw2100_rf_kill); 6129 INIT_DELAYED_WORK(&priv->rf_kill, ipw2100_rf_kill);
6130 INIT_WORK(&priv->scan_event_now, ipw2100_scan_event_now);
6131 INIT_DELAYED_WORK(&priv->scan_event_later, ipw2100_scan_event_later);
6095 6132
6096 tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long)) 6133 tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long))
6097 ipw2100_irq_tasklet, (unsigned long)priv); 6134 ipw2100_irq_tasklet, (unsigned long)priv);
@@ -7396,6 +7433,8 @@ static int ipw2100_wx_set_scan(struct net_device *dev,
7396 } 7433 }
7397 7434
7398 IPW_DEBUG_WX("Initiating scan...\n"); 7435 IPW_DEBUG_WX("Initiating scan...\n");
7436
7437 priv->user_requested_scan = 1;
7399 if (ipw2100_set_scan_options(priv) || ipw2100_start_scan(priv)) { 7438 if (ipw2100_set_scan_options(priv) || ipw2100_start_scan(priv)) {
7400 IPW_DEBUG_WX("Start scan failed.\n"); 7439 IPW_DEBUG_WX("Start scan failed.\n");
7401 7440
diff --git a/drivers/net/wireless/ipw2100.h b/drivers/net/wireless/ipw2100.h
index 2b8be2418fa7..bbf1ddcafba8 100644
--- a/drivers/net/wireless/ipw2100.h
+++ b/drivers/net/wireless/ipw2100.h
@@ -586,6 +586,10 @@ struct ipw2100_priv {
586 struct delayed_work wx_event_work; 586 struct delayed_work wx_event_work;
587 struct delayed_work hang_check; 587 struct delayed_work hang_check;
588 struct delayed_work rf_kill; 588 struct delayed_work rf_kill;
589 struct work_struct scan_event_now;
590 struct delayed_work scan_event_later;
591
592 int user_requested_scan;
589 593
590 u32 interrupts; 594 u32 interrupts;
591 int tx_interrupts; 595 int tx_interrupts;
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
index f4aabcf480e4..262ab0b55824 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
@@ -37,9 +37,6 @@
37 37
38#include <linux/workqueue.h> 38#include <linux/workqueue.h>
39 39
40#include <net/mac80211.h>
41#include <linux/wireless.h>
42
43#define IWL 3945 40#define IWL 3945
44 41
45#include "../net/mac80211/ieee80211_rate.h" 42#include "../net/mac80211/ieee80211_rate.h"
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index acb38750535f..19bcb01e2784 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -38,7 +38,6 @@
38#include <net/mac80211.h> 38#include <net/mac80211.h>
39 39
40#include <linux/etherdevice.h> 40#include <linux/etherdevice.h>
41#include <linux/delay.h>
42 41
43#define IWL 3945 42#define IWL 3945
44 43
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
index 287c75705c44..8dc78c0bf1ff 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
@@ -36,9 +36,6 @@
36 36
37#include <linux/workqueue.h> 37#include <linux/workqueue.h>
38 38
39#include <net/mac80211.h>
40#include <linux/wireless.h>
41
42#define IWL 4965 39#define IWL 4965
43 40
44#include "../net/mac80211/ieee80211_rate.h" 41#include "../net/mac80211/ieee80211_rate.h"
@@ -2024,12 +2021,18 @@ static int open_file_generic(struct inode *inode, struct file *file)
2024static void rs_dbgfs_set_mcs(struct iwl_rate_scale_priv *rs_priv, 2021static void rs_dbgfs_set_mcs(struct iwl_rate_scale_priv *rs_priv,
2025 struct iwl_rate *mcs, int index) 2022 struct iwl_rate *mcs, int index)
2026{ 2023{
2027 const u32 cck_rate = 0x820A; 2024 u32 base_rate;
2025
2026 if (rs_priv->phymode == (u8) MODE_IEEE80211A)
2027 base_rate = 0x800D;
2028 else
2029 base_rate = 0x820A;
2030
2028 if (rs_priv->dbg_fixed.rate_n_flags) { 2031 if (rs_priv->dbg_fixed.rate_n_flags) {
2029 if (index < 12) 2032 if (index < 12)
2030 mcs->rate_n_flags = rs_priv->dbg_fixed.rate_n_flags; 2033 mcs->rate_n_flags = rs_priv->dbg_fixed.rate_n_flags;
2031 else 2034 else
2032 mcs->rate_n_flags = cck_rate; 2035 mcs->rate_n_flags = base_rate;
2033 IWL_DEBUG_RATE("Fixed rate ON\n"); 2036 IWL_DEBUG_RATE("Fixed rate ON\n");
2034 return; 2037 return;
2035 } 2038 }
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index b50d20267c8a..557deebca1b9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -35,9 +35,7 @@
35#include <linux/netdevice.h> 35#include <linux/netdevice.h>
36#include <linux/wireless.h> 36#include <linux/wireless.h>
37#include <net/mac80211.h> 37#include <net/mac80211.h>
38#include <linux/netdevice.h>
39#include <linux/etherdevice.h> 38#include <linux/etherdevice.h>
40#include <linux/delay.h>
41 39
42#define IWL 4965 40#define IWL 4965
43 41
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 75e3b5c3f155..83019d1d7ccc 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -48,8 +48,6 @@
48#include <linux/netdevice.h> 48#include <linux/netdevice.h>
49#include <linux/wireless.h> 49#include <linux/wireless.h>
50#include <linux/firmware.h> 50#include <linux/firmware.h>
51#include <linux/skbuff.h>
52#include <linux/netdevice.h>
53#include <linux/etherdevice.h> 51#include <linux/etherdevice.h>
54#include <linux/if_arp.h> 52#include <linux/if_arp.h>
55 53
@@ -1749,21 +1747,22 @@ static void iwl_unset_hw_setting(struct iwl_priv *priv)
1749 * return : set the bit for each supported rate insert in ie 1747 * return : set the bit for each supported rate insert in ie
1750 */ 1748 */
1751static u16 iwl_supported_rate_to_ie(u8 *ie, u16 supported_rate, 1749static u16 iwl_supported_rate_to_ie(u8 *ie, u16 supported_rate,
1752 u16 basic_rate, int max_count) 1750 u16 basic_rate, int *left)
1753{ 1751{
1754 u16 ret_rates = 0, bit; 1752 u16 ret_rates = 0, bit;
1755 int i; 1753 int i;
1756 u8 *rates; 1754 u8 *cnt = ie;
1757 1755 u8 *rates = ie + 1;
1758 rates = &(ie[1]);
1759 1756
1760 for (bit = 1, i = 0; i < IWL_RATE_COUNT; i++, bit <<= 1) { 1757 for (bit = 1, i = 0; i < IWL_RATE_COUNT; i++, bit <<= 1) {
1761 if (bit & supported_rate) { 1758 if (bit & supported_rate) {
1762 ret_rates |= bit; 1759 ret_rates |= bit;
1763 rates[*ie] = iwl_rates[i].ieee | 1760 rates[*cnt] = iwl_rates[i].ieee |
1764 ((bit & basic_rate) ? 0x80 : 0x00); 1761 ((bit & basic_rate) ? 0x80 : 0x00);
1765 *ie = *ie + 1; 1762 (*cnt)++;
1766 if (*ie >= max_count) 1763 (*left)--;
1764 if ((*left <= 0) ||
1765 (*cnt >= IWL_SUPPORTED_RATES_IE_LEN))
1767 break; 1766 break;
1768 } 1767 }
1769 } 1768 }
@@ -1780,7 +1779,7 @@ static u16 iwl_fill_probe_req(struct iwl_priv *priv,
1780{ 1779{
1781 int len = 0; 1780 int len = 0;
1782 u8 *pos = NULL; 1781 u8 *pos = NULL;
1783 u16 ret_rates; 1782 u16 active_rates, ret_rates, cck_rates;
1784 1783
1785 /* Make sure there is enough space for the probe request, 1784 /* Make sure there is enough space for the probe request,
1786 * two mandatory IEs and the data */ 1785 * two mandatory IEs and the data */
@@ -1825,19 +1824,27 @@ static u16 iwl_fill_probe_req(struct iwl_priv *priv,
1825 left -= 2; 1824 left -= 2;
1826 if (left < 0) 1825 if (left < 0)
1827 return 0; 1826 return 0;
1827
1828 /* ... fill it in... */ 1828 /* ... fill it in... */
1829 *pos++ = WLAN_EID_SUPP_RATES; 1829 *pos++ = WLAN_EID_SUPP_RATES;
1830 *pos = 0; 1830 *pos = 0;
1831 ret_rates = priv->active_rate = priv->rates_mask; 1831
1832 priv->active_rate = priv->rates_mask;
1833 active_rates = priv->active_rate;
1832 priv->active_rate_basic = priv->rates_mask & IWL_BASIC_RATES_MASK; 1834 priv->active_rate_basic = priv->rates_mask & IWL_BASIC_RATES_MASK;
1833 1835
1834 iwl_supported_rate_to_ie(pos, priv->active_rate, 1836 cck_rates = IWL_CCK_RATES_MASK & active_rates;
1835 priv->active_rate_basic, left); 1837 ret_rates = iwl_supported_rate_to_ie(pos, cck_rates,
1838 priv->active_rate_basic, &left);
1839 active_rates &= ~ret_rates;
1840
1841 ret_rates = iwl_supported_rate_to_ie(pos, active_rates,
1842 priv->active_rate_basic, &left);
1843 active_rates &= ~ret_rates;
1844
1836 len += 2 + *pos; 1845 len += 2 + *pos;
1837 pos += (*pos) + 1; 1846 pos += (*pos) + 1;
1838 ret_rates = ~ret_rates & priv->active_rate; 1847 if (active_rates == 0)
1839
1840 if (ret_rates == 0)
1841 goto fill_end; 1848 goto fill_end;
1842 1849
1843 /* fill in supported extended rate */ 1850 /* fill in supported extended rate */
@@ -1848,7 +1855,8 @@ static u16 iwl_fill_probe_req(struct iwl_priv *priv,
1848 /* ... fill it in... */ 1855 /* ... fill it in... */
1849 *pos++ = WLAN_EID_EXT_SUPP_RATES; 1856 *pos++ = WLAN_EID_EXT_SUPP_RATES;
1850 *pos = 0; 1857 *pos = 0;
1851 iwl_supported_rate_to_ie(pos, ret_rates, priv->active_rate_basic, left); 1858 iwl_supported_rate_to_ie(pos, active_rates,
1859 priv->active_rate_basic, &left);
1852 if (*pos > 0) 1860 if (*pos > 0)
1853 len += 2 + *pos; 1861 len += 2 + *pos;
1854 1862
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index b1a6e39f7821..5e1279263b22 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -48,8 +48,6 @@
48#include <linux/netdevice.h> 48#include <linux/netdevice.h>
49#include <linux/wireless.h> 49#include <linux/wireless.h>
50#include <linux/firmware.h> 50#include <linux/firmware.h>
51#include <linux/skbuff.h>
52#include <linux/netdevice.h>
53#include <linux/etherdevice.h> 51#include <linux/etherdevice.h>
54#include <linux/if_arp.h> 52#include <linux/if_arp.h>
55 53
@@ -1802,21 +1800,22 @@ static void iwl_unset_hw_setting(struct iwl_priv *priv)
1802 * return : set the bit for each supported rate insert in ie 1800 * return : set the bit for each supported rate insert in ie
1803 */ 1801 */
1804static u16 iwl_supported_rate_to_ie(u8 *ie, u16 supported_rate, 1802static u16 iwl_supported_rate_to_ie(u8 *ie, u16 supported_rate,
1805 u16 basic_rate, int max_count) 1803 u16 basic_rate, int *left)
1806{ 1804{
1807 u16 ret_rates = 0, bit; 1805 u16 ret_rates = 0, bit;
1808 int i; 1806 int i;
1809 u8 *rates; 1807 u8 *cnt = ie;
1810 1808 u8 *rates = ie + 1;
1811 rates = &(ie[1]);
1812 1809
1813 for (bit = 1, i = 0; i < IWL_RATE_COUNT; i++, bit <<= 1) { 1810 for (bit = 1, i = 0; i < IWL_RATE_COUNT; i++, bit <<= 1) {
1814 if (bit & supported_rate) { 1811 if (bit & supported_rate) {
1815 ret_rates |= bit; 1812 ret_rates |= bit;
1816 rates[*ie] = iwl_rates[i].ieee | 1813 rates[*cnt] = iwl_rates[i].ieee |
1817 ((bit & basic_rate) ? 0x80 : 0x00); 1814 ((bit & basic_rate) ? 0x80 : 0x00);
1818 *ie = *ie + 1; 1815 (*cnt)++;
1819 if (*ie >= max_count) 1816 (*left)--;
1817 if ((*left <= 0) ||
1818 (*cnt >= IWL_SUPPORTED_RATES_IE_LEN))
1820 break; 1819 break;
1821 } 1820 }
1822 } 1821 }
@@ -1839,7 +1838,7 @@ static u16 iwl_fill_probe_req(struct iwl_priv *priv,
1839{ 1838{
1840 int len = 0; 1839 int len = 0;
1841 u8 *pos = NULL; 1840 u8 *pos = NULL;
1842 u16 ret_rates; 1841 u16 active_rates, ret_rates, cck_rates;
1843 1842
1844 /* Make sure there is enough space for the probe request, 1843 /* Make sure there is enough space for the probe request,
1845 * two mandatory IEs and the data */ 1844 * two mandatory IEs and the data */
@@ -1884,19 +1883,27 @@ static u16 iwl_fill_probe_req(struct iwl_priv *priv,
1884 left -= 2; 1883 left -= 2;
1885 if (left < 0) 1884 if (left < 0)
1886 return 0; 1885 return 0;
1886
1887 /* ... fill it in... */ 1887 /* ... fill it in... */
1888 *pos++ = WLAN_EID_SUPP_RATES; 1888 *pos++ = WLAN_EID_SUPP_RATES;
1889 *pos = 0; 1889 *pos = 0;
1890 ret_rates = priv->active_rate = priv->rates_mask; 1890
1891 priv->active_rate = priv->rates_mask;
1892 active_rates = priv->active_rate;
1891 priv->active_rate_basic = priv->rates_mask & IWL_BASIC_RATES_MASK; 1893 priv->active_rate_basic = priv->rates_mask & IWL_BASIC_RATES_MASK;
1892 1894
1893 iwl_supported_rate_to_ie(pos, priv->active_rate, 1895 cck_rates = IWL_CCK_RATES_MASK & active_rates;
1894 priv->active_rate_basic, left); 1896 ret_rates = iwl_supported_rate_to_ie(pos, cck_rates,
1897 priv->active_rate_basic, &left);
1898 active_rates &= ~ret_rates;
1899
1900 ret_rates = iwl_supported_rate_to_ie(pos, active_rates,
1901 priv->active_rate_basic, &left);
1902 active_rates &= ~ret_rates;
1903
1895 len += 2 + *pos; 1904 len += 2 + *pos;
1896 pos += (*pos) + 1; 1905 pos += (*pos) + 1;
1897 ret_rates = ~ret_rates & priv->active_rate; 1906 if (active_rates == 0)
1898
1899 if (ret_rates == 0)
1900 goto fill_end; 1907 goto fill_end;
1901 1908
1902 /* fill in supported extended rate */ 1909 /* fill in supported extended rate */
@@ -1907,7 +1914,8 @@ static u16 iwl_fill_probe_req(struct iwl_priv *priv,
1907 /* ... fill it in... */ 1914 /* ... fill it in... */
1908 *pos++ = WLAN_EID_EXT_SUPP_RATES; 1915 *pos++ = WLAN_EID_EXT_SUPP_RATES;
1909 *pos = 0; 1916 *pos = 0;
1910 iwl_supported_rate_to_ie(pos, ret_rates, priv->active_rate_basic, left); 1917 iwl_supported_rate_to_ie(pos, active_rates,
1918 priv->active_rate_basic, &left);
1911 if (*pos > 0) 1919 if (*pos > 0)
1912 len += 2 + *pos; 1920 len += 2 + *pos;
1913 1921
@@ -4494,13 +4502,13 @@ static u8 ratio2dB[100] = {
4494 * Conversion assumes that levels are voltages (20*log), not powers (10*log). */ 4502 * Conversion assumes that levels are voltages (20*log), not powers (10*log). */
4495int iwl_calc_db_from_ratio(int sig_ratio) 4503int iwl_calc_db_from_ratio(int sig_ratio)
4496{ 4504{
4497 /* Anything above 1000:1 just report as 60 dB */ 4505 /* 1000:1 or higher just report as 60 dB */
4498 if (sig_ratio > 1000) 4506 if (sig_ratio >= 1000)
4499 return 60; 4507 return 60;
4500 4508
4501 /* Above 100:1, divide by 10 and use table, 4509 /* 100:1 or higher, divide by 10 and use table,
4502 * add 20 dB to make up for divide by 10 */ 4510 * add 20 dB to make up for divide by 10 */
4503 if (sig_ratio > 100) 4511 if (sig_ratio >= 100)
4504 return (20 + (int)ratio2dB[sig_ratio/10]); 4512 return (20 + (int)ratio2dB[sig_ratio/10]);
4505 4513
4506 /* We shouldn't see this */ 4514 /* We shouldn't see this */
diff --git a/drivers/net/wireless/iwlwifi/iwlwifi.h b/drivers/net/wireless/iwlwifi/iwlwifi.h
index e0b97c341215..432ce887807f 100644
--- a/drivers/net/wireless/iwlwifi/iwlwifi.h
+++ b/drivers/net/wireless/iwlwifi/iwlwifi.h
@@ -39,18 +39,13 @@ struct iwl_priv;
39/* Hardware specific file defines the PCI IDs table for that hardware module */ 39/* Hardware specific file defines the PCI IDs table for that hardware module */
40extern struct pci_device_id iwl_hw_card_ids[]; 40extern struct pci_device_id iwl_hw_card_ids[];
41 41
42#include "iwl-hw.h"
42#if IWL == 3945 43#if IWL == 3945
43
44#define DRV_NAME "iwl3945" 44#define DRV_NAME "iwl3945"
45#include "iwl-hw.h"
46#include "iwl-3945-hw.h" 45#include "iwl-3945-hw.h"
47
48#elif IWL == 4965 46#elif IWL == 4965
49
50#define DRV_NAME "iwl4965" 47#define DRV_NAME "iwl4965"
51#include "iwl-hw.h"
52#include "iwl-4965-hw.h" 48#include "iwl-4965-hw.h"
53
54#endif 49#endif
55 50
56#include "iwl-prph.h" 51#include "iwl-prph.h"
diff --git a/drivers/net/wireless/p54common.c b/drivers/net/wireless/p54common.c
index 2c63cf0ad2cd..1437db0cf4b2 100644
--- a/drivers/net/wireless/p54common.c
+++ b/drivers/net/wireless/p54common.c
@@ -577,7 +577,7 @@ static int p54_set_filter(struct ieee80211_hw *dev, u16 filter_type,
577 struct p54_tx_control_filter *filter; 577 struct p54_tx_control_filter *filter;
578 578
579 hdr = kzalloc(sizeof(*hdr) + sizeof(*filter) + 579 hdr = kzalloc(sizeof(*hdr) + sizeof(*filter) +
580 priv->tx_hdr_len, GFP_KERNEL); 580 priv->tx_hdr_len, GFP_ATOMIC);
581 if (!hdr) 581 if (!hdr)
582 return -ENOMEM; 582 return -ENOMEM;
583 583
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index bb6f46cfbb9f..ff399f8083e9 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -550,7 +550,7 @@ void rt2x00lib_write_tx_desc(struct rt2x00_dev *rt2x00dev,
550 /* 550 /*
551 * Check if we need to set the Length Extension 551 * Check if we need to set the Length Extension
552 */ 552 */
553 if (bitrate == 110 && residual <= 3) 553 if (bitrate == 110 && residual <= 30)
554 desc.service |= 0x80; 554 desc.service |= 0x80;
555 } 555 }
556 556
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index 3e42759473c3..46c8c0840a65 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -2029,6 +2029,7 @@ static struct usb_device_id rt73usb_device_table[] = {
2029 { USB_DEVICE(0x050d, 0x7050), USB_DEVICE_DATA(&rt73usb_ops) }, 2029 { USB_DEVICE(0x050d, 0x7050), USB_DEVICE_DATA(&rt73usb_ops) },
2030 { USB_DEVICE(0x050d, 0x705a), USB_DEVICE_DATA(&rt73usb_ops) }, 2030 { USB_DEVICE(0x050d, 0x705a), USB_DEVICE_DATA(&rt73usb_ops) },
2031 { USB_DEVICE(0x050d, 0x905b), USB_DEVICE_DATA(&rt73usb_ops) }, 2031 { USB_DEVICE(0x050d, 0x905b), USB_DEVICE_DATA(&rt73usb_ops) },
2032 { USB_DEVICE(0x050d, 0x905c), USB_DEVICE_DATA(&rt73usb_ops) },
2032 /* Billionton */ 2033 /* Billionton */
2033 { USB_DEVICE(0x1631, 0xc019), USB_DEVICE_DATA(&rt73usb_ops) }, 2034 { USB_DEVICE(0x1631, 0xc019), USB_DEVICE_DATA(&rt73usb_ops) },
2034 /* Buffalo */ 2035 /* Buffalo */
diff --git a/drivers/net/wireless/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c
index 0ef887dd2867..de61c8fe6492 100644
--- a/drivers/net/wireless/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl8187_dev.c
@@ -131,7 +131,8 @@ static int rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb,
131 struct rtl8187_tx_hdr *hdr; 131 struct rtl8187_tx_hdr *hdr;
132 struct rtl8187_tx_info *info; 132 struct rtl8187_tx_info *info;
133 struct urb *urb; 133 struct urb *urb;
134 u32 tmp; 134 __le16 rts_dur = 0;
135 u32 flags;
135 136
136 urb = usb_alloc_urb(0, GFP_ATOMIC); 137 urb = usb_alloc_urb(0, GFP_ATOMIC);
137 if (!urb) { 138 if (!urb) {
@@ -139,24 +140,24 @@ static int rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb,
139 return 0; 140 return 0;
140 } 141 }
141 142
142 hdr = (struct rtl8187_tx_hdr *)skb_push(skb, sizeof(*hdr)); 143 flags = skb->len;
143 tmp = skb->len - sizeof(*hdr); 144 flags |= RTL8187_TX_FLAG_NO_ENCRYPT;
144 tmp |= RTL8187_TX_FLAG_NO_ENCRYPT; 145 flags |= control->rts_cts_rate << 19;
145 tmp |= control->rts_cts_rate << 19; 146 flags |= control->tx_rate << 24;
146 tmp |= control->tx_rate << 24; 147 if (ieee80211_get_morefrag((struct ieee80211_hdr *)skb->data))
147 if (ieee80211_get_morefrag((struct ieee80211_hdr *)skb)) 148 flags |= RTL8187_TX_FLAG_MORE_FRAG;
148 tmp |= RTL8187_TX_FLAG_MORE_FRAG;
149 if (control->flags & IEEE80211_TXCTL_USE_RTS_CTS) { 149 if (control->flags & IEEE80211_TXCTL_USE_RTS_CTS) {
150 tmp |= RTL8187_TX_FLAG_RTS; 150 flags |= RTL8187_TX_FLAG_RTS;
151 hdr->rts_duration = 151 rts_dur = ieee80211_rts_duration(dev, priv->if_id, skb->len, control);
152 ieee80211_rts_duration(dev, priv->if_id, skb->len, control);
153 } 152 }
154 if (control->flags & IEEE80211_TXCTL_USE_CTS_PROTECT) 153 if (control->flags & IEEE80211_TXCTL_USE_CTS_PROTECT)
155 tmp |= RTL8187_TX_FLAG_CTS; 154 flags |= RTL8187_TX_FLAG_CTS;
156 hdr->flags = cpu_to_le32(tmp); 155
156 hdr = (struct rtl8187_tx_hdr *)skb_push(skb, sizeof(*hdr));
157 hdr->flags = cpu_to_le32(flags);
157 hdr->len = 0; 158 hdr->len = 0;
158 tmp = control->retry_limit << 8; 159 hdr->rts_duration = rts_dur;
159 hdr->retry = cpu_to_le32(tmp); 160 hdr->retry = cpu_to_le32(control->retry_limit << 8);
160 161
161 info = (struct rtl8187_tx_info *)skb->cb; 162 info = (struct rtl8187_tx_info *)skb->cb;
162 info->control = kmemdup(control, sizeof(*control), GFP_ATOMIC); 163 info->control = kmemdup(control, sizeof(*control), GFP_ATOMIC);
@@ -587,8 +588,6 @@ static void rtl8187_configure_filter(struct ieee80211_hw *dev,
587 588
588 *total_flags = 0; 589 *total_flags = 0;
589 590
590 if (changed_flags & FIF_PROMISC_IN_BSS)
591 priv->rx_conf ^= RTL818X_RX_CONF_NICMAC;
592 if (changed_flags & FIF_ALLMULTI) 591 if (changed_flags & FIF_ALLMULTI)
593 priv->rx_conf ^= RTL818X_RX_CONF_MULTICAST; 592 priv->rx_conf ^= RTL818X_RX_CONF_MULTICAST;
594 if (changed_flags & FIF_FCSFAIL) 593 if (changed_flags & FIF_FCSFAIL)
@@ -601,8 +600,6 @@ static void rtl8187_configure_filter(struct ieee80211_hw *dev,
601 if (mc_count > 0) 600 if (mc_count > 0)
602 priv->rx_conf |= RTL818X_RX_CONF_MULTICAST; 601 priv->rx_conf |= RTL818X_RX_CONF_MULTICAST;
603 602
604 if (priv->rx_conf & RTL818X_RX_CONF_NICMAC)
605 *total_flags |= FIF_PROMISC_IN_BSS;
606 if (priv->rx_conf & RTL818X_RX_CONF_MULTICAST) 603 if (priv->rx_conf & RTL818X_RX_CONF_MULTICAST)
607 *total_flags |= FIF_ALLMULTI; 604 *total_flags |= FIF_ALLMULTI;
608 if (priv->rx_conf & RTL818X_RX_CONF_FCS) 605 if (priv->rx_conf & RTL818X_RX_CONF_FCS)
diff --git a/drivers/net/wireless/zd1201.c b/drivers/net/wireless/zd1201.c
index 935b144d9b56..d5c0c66188ca 100644
--- a/drivers/net/wireless/zd1201.c
+++ b/drivers/net/wireless/zd1201.c
@@ -327,8 +327,8 @@ static void zd1201_usbrx(struct urb *urb)
327 memcpy(skb_put(skb, 6), &data[datalen-8], 6); 327 memcpy(skb_put(skb, 6), &data[datalen-8], 6);
328 memcpy(skb_put(skb, 2), &data[datalen-24], 2); 328 memcpy(skb_put(skb, 2), &data[datalen-24], 2);
329 memcpy(skb_put(skb, len), data, len); 329 memcpy(skb_put(skb, len), data, len);
330 skb->dev->last_rx = jiffies;
331 skb->protocol = eth_type_trans(skb, zd->dev); 330 skb->protocol = eth_type_trans(skb, zd->dev);
331 skb->dev->last_rx = jiffies;
332 zd->stats.rx_packets++; 332 zd->stats.rx_packets++;
333 zd->stats.rx_bytes += skb->len; 333 zd->stats.rx_bytes += skb->len;
334 netif_rx(skb); 334 netif_rx(skb);
@@ -384,8 +384,8 @@ static void zd1201_usbrx(struct urb *urb)
384 memcpy(skb_put(skb, 2), &data[6], 2); 384 memcpy(skb_put(skb, 2), &data[6], 2);
385 memcpy(skb_put(skb, len), data+8, len); 385 memcpy(skb_put(skb, len), data+8, len);
386 } 386 }
387 skb->dev->last_rx = jiffies;
388 skb->protocol = eth_type_trans(skb, zd->dev); 387 skb->protocol = eth_type_trans(skb, zd->dev);
388 skb->dev->last_rx = jiffies;
389 zd->stats.rx_packets++; 389 zd->stats.rx_packets++;
390 zd->stats.rx_bytes += skb->len; 390 zd->stats.rx_bytes += skb->len;
391 netif_rx(skb); 391 netif_rx(skb);
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c
index b0684f965761..c755b6923812 100644
--- a/drivers/net/wireless/zd1211rw/zd_usb.c
+++ b/drivers/net/wireless/zd1211rw/zd_usb.c
@@ -1044,14 +1044,17 @@ error:
1044static void disconnect(struct usb_interface *intf) 1044static void disconnect(struct usb_interface *intf)
1045{ 1045{
1046 struct net_device *netdev = zd_intf_to_netdev(intf); 1046 struct net_device *netdev = zd_intf_to_netdev(intf);
1047 struct zd_mac *mac = zd_netdev_mac(netdev); 1047 struct zd_mac *mac;
1048 struct zd_usb *usb = &mac->chip.usb; 1048 struct zd_usb *usb;
1049 1049
1050 /* Either something really bad happened, or we're just dealing with 1050 /* Either something really bad happened, or we're just dealing with
1051 * a DEVICE_INSTALLER. */ 1051 * a DEVICE_INSTALLER. */
1052 if (netdev == NULL) 1052 if (netdev == NULL)
1053 return; 1053 return;
1054 1054
1055 mac = zd_netdev_mac(netdev);
1056 usb = &mac->chip.usb;
1057
1055 dev_dbg_f(zd_usb_dev(usb), "\n"); 1058 dev_dbg_f(zd_usb_dev(usb), "\n");
1056 1059
1057 zd_netdev_disconnect(netdev); 1060 zd_netdev_disconnect(netdev);
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c
index a2d08c9ba3c4..ff999ff0b627 100644
--- a/drivers/s390/net/qeth_main.c
+++ b/drivers/s390/net/qeth_main.c
@@ -6643,7 +6643,8 @@ qeth_netdev_init(struct net_device *dev)
6643 dev->vlan_rx_kill_vid = qeth_vlan_rx_kill_vid; 6643 dev->vlan_rx_kill_vid = qeth_vlan_rx_kill_vid;
6644 dev->vlan_rx_add_vid = qeth_vlan_rx_add_vid; 6644 dev->vlan_rx_add_vid = qeth_vlan_rx_add_vid;
6645#endif 6645#endif
6646 dev->header_ops = &qeth_null_ops; 6646 if (qeth_get_netdev_flags(card) & IFF_NOARP)
6647 dev->header_ops = &qeth_null_ops;
6647 6648
6648#ifdef CONFIG_QETH_IPV6 6649#ifdef CONFIG_QETH_IPV6
6649 /*IPv6 address autoconfiguration stuff*/ 6650 /*IPv6 address autoconfiguration stuff*/