aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-12-17 22:29:41 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-12-17 22:29:41 -0500
commitc63a1190368771b8207d86c4217ae4afdf1cbd5e (patch)
treeb92409d027dbb1fdef33242b964d0105fc4ef4ad
parentededa4d396b15c282aa60d6aacddfc07f0142dbf (diff)
parent8085106a58366fb2c6c14d89e3d4395d2702d4a1 (diff)
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (23 commits) iwlwifi: fix rf_kill state inconsistent during suspend and resume b43: Fix rfkill radio LED bcm43xx_debugfs sscanf fix libertas: select WIRELESS_EXT iwlwifi3945/4965: fix rate control algo reference leak ieee80211_rate: missed unlock wireless/ipw2200.c: add __dev{init,exit} annotations zd1211rw: Fix alignment problems libertas: add Dan Williams as maintainer sis190 endianness ucc_geth: really fix section mismatch pcnet_cs: add new id ixgb: make sure jumbos stay enabled after reset Net: ibm_newemac, remove SPIN_LOCK_UNLOCKED net: smc911x: shut up compiler warnings ucc_geth: minor whitespace fix drivers/net/s2io.c section fixes drivers/net/sis190.c section fix hamachi endianness fixes e100: free IRQ to remove warningwhenrebooting ...
-rw-r--r--MAINTAINERS6
-rw-r--r--drivers/net/e100.c5
-rw-r--r--drivers/net/hamachi.c70
-rw-r--r--drivers/net/ibm_newemac/debug.c2
-rw-r--r--drivers/net/ixgb/ixgb_main.c16
-rw-r--r--drivers/net/pcmcia/pcnet_cs.c1
-rw-r--r--drivers/net/s2io.c4
-rw-r--r--drivers/net/sis190.c10
-rw-r--r--drivers/net/sky2.c9
-rw-r--r--drivers/net/smc911x.h2
-rw-r--r--drivers/net/starfire.c2
-rw-r--r--drivers/net/sundance.c34
-rw-r--r--drivers/net/ucc_geth.c2
-rw-r--r--drivers/net/ucc_geth_mii.h2
-rw-r--r--drivers/net/wireless/Kconfig1
-rw-r--r--drivers/net/wireless/b43/leds.c4
-rw-r--r--drivers/net/wireless/b43/main.c22
-rw-r--r--drivers/net/wireless/b43/rfkill.c37
-rw-r--r--drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c2
-rw-r--r--drivers/net/wireless/ipw2200.c7
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c5
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c5
-rw-r--r--drivers/net/wireless/zd1211rw/zd_mac.c10
-rw-r--r--net/mac80211/ieee80211_rate.c1
24 files changed, 168 insertions, 91 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index cdc2198db754..3c7db6222f86 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2489,6 +2489,12 @@ M: mtk.manpages@gmail.com
2489W: ftp://ftp.kernel.org/pub/linux/docs/manpages 2489W: ftp://ftp.kernel.org/pub/linux/docs/manpages
2490S: Maintained 2490S: Maintained
2491 2491
2492MARVELL LIBERTAS WIRELESS DRIVER
2493P: Dan Williams
2494M: dcbw@redhat.com
2495L: libertas-dev@lists.infradead.org
2496S: Maintained
2497
2492MARVELL MV643XX ETHERNET DRIVER 2498MARVELL MV643XX ETHERNET DRIVER
2493P: Dale Farnsworth 2499P: Dale Farnsworth
2494M: dale@farnsworth.org 2500M: dale@farnsworth.org
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index e1c8a0d023ea..2b06e4b4dabc 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -2737,8 +2737,9 @@ static int e100_suspend(struct pci_dev *pdev, pm_message_t state)
2737 pci_enable_wake(pdev, PCI_D3cold, 0); 2737 pci_enable_wake(pdev, PCI_D3cold, 0);
2738 } 2738 }
2739 2739
2740 pci_disable_device(pdev);
2741 free_irq(pdev->irq, netdev); 2740 free_irq(pdev->irq, netdev);
2741
2742 pci_disable_device(pdev);
2742 pci_set_power_state(pdev, PCI_D3hot); 2743 pci_set_power_state(pdev, PCI_D3hot);
2743 2744
2744 return 0; 2745 return 0;
@@ -2780,6 +2781,8 @@ static void e100_shutdown(struct pci_dev *pdev)
2780 pci_enable_wake(pdev, PCI_D3cold, 0); 2781 pci_enable_wake(pdev, PCI_D3cold, 0);
2781 } 2782 }
2782 2783
2784 free_irq(pdev->irq, netdev);
2785
2783 pci_disable_device(pdev); 2786 pci_disable_device(pdev);
2784 pci_set_power_state(pdev, PCI_D3hot); 2787 pci_set_power_state(pdev, PCI_D3hot);
2785} 2788}
diff --git a/drivers/net/hamachi.c b/drivers/net/hamachi.c
index ed407c85708f..b53f6b6491b3 100644
--- a/drivers/net/hamachi.c
+++ b/drivers/net/hamachi.c
@@ -204,8 +204,10 @@ KERN_INFO " Further modifications by Keith Underwood <keithu@parl.clemson.edu>
204/* Condensed bus+endian portability operations. */ 204/* Condensed bus+endian portability operations. */
205#if ADDRLEN == 64 205#if ADDRLEN == 64
206#define cpu_to_leXX(addr) cpu_to_le64(addr) 206#define cpu_to_leXX(addr) cpu_to_le64(addr)
207#define leXX_to_cpu(addr) le64_to_cpu(addr)
207#else 208#else
208#define cpu_to_leXX(addr) cpu_to_le32(addr) 209#define cpu_to_leXX(addr) cpu_to_le32(addr)
210#define leXX_to_cpu(addr) le32_to_cpu(addr)
209#endif 211#endif
210 212
211 213
@@ -465,12 +467,12 @@ enum intr_status_bits {
465 467
466/* The Hamachi Rx and Tx buffer descriptors. */ 468/* The Hamachi Rx and Tx buffer descriptors. */
467struct hamachi_desc { 469struct hamachi_desc {
468 u32 status_n_length; 470 __le32 status_n_length;
469#if ADDRLEN == 64 471#if ADDRLEN == 64
470 u32 pad; 472 u32 pad;
471 u64 addr; 473 __le64 addr;
472#else 474#else
473 u32 addr; 475 __le32 addr;
474#endif 476#endif
475}; 477};
476 478
@@ -874,13 +876,13 @@ static int hamachi_open(struct net_device *dev)
874 876
875#if ADDRLEN == 64 877#if ADDRLEN == 64
876 /* writellll anyone ? */ 878 /* writellll anyone ? */
877 writel(cpu_to_le64(hmp->rx_ring_dma), ioaddr + RxPtr); 879 writel(hmp->rx_ring_dma, ioaddr + RxPtr);
878 writel(cpu_to_le64(hmp->rx_ring_dma) >> 32, ioaddr + RxPtr + 4); 880 writel(hmp->rx_ring_dma >> 32, ioaddr + RxPtr + 4);
879 writel(cpu_to_le64(hmp->tx_ring_dma), ioaddr + TxPtr); 881 writel(hmp->tx_ring_dma, ioaddr + TxPtr);
880 writel(cpu_to_le64(hmp->tx_ring_dma) >> 32, ioaddr + TxPtr + 4); 882 writel(hmp->tx_ring_dma >> 32, ioaddr + TxPtr + 4);
881#else 883#else
882 writel(cpu_to_le32(hmp->rx_ring_dma), ioaddr + RxPtr); 884 writel(hmp->rx_ring_dma, ioaddr + RxPtr);
883 writel(cpu_to_le32(hmp->tx_ring_dma), ioaddr + TxPtr); 885 writel(hmp->tx_ring_dma, ioaddr + TxPtr);
884#endif 886#endif
885 887
886 /* TODO: It would make sense to organize this as words since the card 888 /* TODO: It would make sense to organize this as words since the card
@@ -1019,8 +1021,8 @@ static inline int hamachi_tx(struct net_device *dev)
1019 skb = hmp->tx_skbuff[entry]; 1021 skb = hmp->tx_skbuff[entry];
1020 if (skb) { 1022 if (skb) {
1021 pci_unmap_single(hmp->pci_dev, 1023 pci_unmap_single(hmp->pci_dev,
1022 hmp->tx_ring[entry].addr, skb->len, 1024 leXX_to_cpu(hmp->tx_ring[entry].addr),
1023 PCI_DMA_TODEVICE); 1025 skb->len, PCI_DMA_TODEVICE);
1024 dev_kfree_skb(skb); 1026 dev_kfree_skb(skb);
1025 hmp->tx_skbuff[entry] = NULL; 1027 hmp->tx_skbuff[entry] = NULL;
1026 } 1028 }
@@ -1071,10 +1073,10 @@ static void hamachi_tx_timeout(struct net_device *dev)
1071 { 1073 {
1072 printk(KERN_DEBUG " Rx ring %p: ", hmp->rx_ring); 1074 printk(KERN_DEBUG " Rx ring %p: ", hmp->rx_ring);
1073 for (i = 0; i < RX_RING_SIZE; i++) 1075 for (i = 0; i < RX_RING_SIZE; i++)
1074 printk(" %8.8x", (unsigned int)hmp->rx_ring[i].status_n_length); 1076 printk(" %8.8x", le32_to_cpu(hmp->rx_ring[i].status_n_length));
1075 printk("\n"KERN_DEBUG" Tx ring %p: ", hmp->tx_ring); 1077 printk("\n"KERN_DEBUG" Tx ring %p: ", hmp->tx_ring);
1076 for (i = 0; i < TX_RING_SIZE; i++) 1078 for (i = 0; i < TX_RING_SIZE; i++)
1077 printk(" %4.4x", hmp->tx_ring[i].status_n_length); 1079 printk(" %4.4x", le32_to_cpu(hmp->tx_ring[i].status_n_length));
1078 printk("\n"); 1080 printk("\n");
1079 } 1081 }
1080 1082
@@ -1099,14 +1101,15 @@ static void hamachi_tx_timeout(struct net_device *dev)
1099 struct sk_buff *skb; 1101 struct sk_buff *skb;
1100 1102
1101 if (i >= TX_RING_SIZE - 1) 1103 if (i >= TX_RING_SIZE - 1)
1102 hmp->tx_ring[i].status_n_length = cpu_to_le32( 1104 hmp->tx_ring[i].status_n_length =
1103 DescEndRing | 1105 cpu_to_le32(DescEndRing) |
1104 (hmp->tx_ring[i].status_n_length & 0x0000FFFF)); 1106 (hmp->tx_ring[i].status_n_length &
1107 cpu_to_le32(0x0000ffff));
1105 else 1108 else
1106 hmp->tx_ring[i].status_n_length &= 0x0000ffff; 1109 hmp->tx_ring[i].status_n_length &= cpu_to_le32(0x0000ffff);
1107 skb = hmp->tx_skbuff[i]; 1110 skb = hmp->tx_skbuff[i];
1108 if (skb){ 1111 if (skb){
1109 pci_unmap_single(hmp->pci_dev, hmp->tx_ring[i].addr, 1112 pci_unmap_single(hmp->pci_dev, leXX_to_cpu(hmp->tx_ring[i].addr),
1110 skb->len, PCI_DMA_TODEVICE); 1113 skb->len, PCI_DMA_TODEVICE);
1111 dev_kfree_skb(skb); 1114 dev_kfree_skb(skb);
1112 hmp->tx_skbuff[i] = NULL; 1115 hmp->tx_skbuff[i] = NULL;
@@ -1128,7 +1131,8 @@ static void hamachi_tx_timeout(struct net_device *dev)
1128 struct sk_buff *skb = hmp->rx_skbuff[i]; 1131 struct sk_buff *skb = hmp->rx_skbuff[i];
1129 1132
1130 if (skb){ 1133 if (skb){
1131 pci_unmap_single(hmp->pci_dev, hmp->rx_ring[i].addr, 1134 pci_unmap_single(hmp->pci_dev,
1135 leXX_to_cpu(hmp->rx_ring[i].addr),
1132 hmp->rx_buf_sz, PCI_DMA_FROMDEVICE); 1136 hmp->rx_buf_sz, PCI_DMA_FROMDEVICE);
1133 dev_kfree_skb(skb); 1137 dev_kfree_skb(skb);
1134 hmp->rx_skbuff[i] = NULL; 1138 hmp->rx_skbuff[i] = NULL;
@@ -1420,7 +1424,7 @@ static irqreturn_t hamachi_interrupt(int irq, void *dev_instance)
1420 /* Free the original skb. */ 1424 /* Free the original skb. */
1421 if (skb){ 1425 if (skb){
1422 pci_unmap_single(hmp->pci_dev, 1426 pci_unmap_single(hmp->pci_dev,
1423 hmp->tx_ring[entry].addr, 1427 leXX_to_cpu(hmp->tx_ring[entry].addr),
1424 skb->len, 1428 skb->len,
1425 PCI_DMA_TODEVICE); 1429 PCI_DMA_TODEVICE);
1426 dev_kfree_skb_irq(skb); 1430 dev_kfree_skb_irq(skb);
@@ -1500,11 +1504,11 @@ static int hamachi_rx(struct net_device *dev)
1500 if (desc_status & DescOwn) 1504 if (desc_status & DescOwn)
1501 break; 1505 break;
1502 pci_dma_sync_single_for_cpu(hmp->pci_dev, 1506 pci_dma_sync_single_for_cpu(hmp->pci_dev,
1503 desc->addr, 1507 leXX_to_cpu(desc->addr),
1504 hmp->rx_buf_sz, 1508 hmp->rx_buf_sz,
1505 PCI_DMA_FROMDEVICE); 1509 PCI_DMA_FROMDEVICE);
1506 buf_addr = (u8 *) hmp->rx_skbuff[entry]->data; 1510 buf_addr = (u8 *) hmp->rx_skbuff[entry]->data;
1507 frame_status = le32_to_cpu(get_unaligned((s32*)&(buf_addr[data_size - 12]))); 1511 frame_status = le32_to_cpu(get_unaligned((__le32*)&(buf_addr[data_size - 12])));
1508 if (hamachi_debug > 4) 1512 if (hamachi_debug > 4)
1509 printk(KERN_DEBUG " hamachi_rx() status was %8.8x.\n", 1513 printk(KERN_DEBUG " hamachi_rx() status was %8.8x.\n",
1510 frame_status); 1514 frame_status);
@@ -1518,9 +1522,9 @@ static int hamachi_rx(struct net_device *dev)
1518 dev->name, desc, &hmp->rx_ring[hmp->cur_rx % RX_RING_SIZE]); 1522 dev->name, desc, &hmp->rx_ring[hmp->cur_rx % RX_RING_SIZE]);
1519 printk(KERN_WARNING "%s: Oversized Ethernet frame -- next status %x/%x last status %x.\n", 1523 printk(KERN_WARNING "%s: Oversized Ethernet frame -- next status %x/%x last status %x.\n",
1520 dev->name, 1524 dev->name,
1521 hmp->rx_ring[(hmp->cur_rx+1) % RX_RING_SIZE].status_n_length & 0xffff0000, 1525 le32_to_cpu(hmp->rx_ring[(hmp->cur_rx+1) % RX_RING_SIZE].status_n_length) & 0xffff0000,
1522 hmp->rx_ring[(hmp->cur_rx+1) % RX_RING_SIZE].status_n_length & 0x0000ffff, 1526 le32_to_cpu(hmp->rx_ring[(hmp->cur_rx+1) % RX_RING_SIZE].status_n_length) & 0x0000ffff,
1523 hmp->rx_ring[(hmp->cur_rx-1) % RX_RING_SIZE].status_n_length); 1527 le32_to_cpu(hmp->rx_ring[(hmp->cur_rx-1) % RX_RING_SIZE].status_n_length));
1524 hmp->stats.rx_length_errors++; 1528 hmp->stats.rx_length_errors++;
1525 } /* else Omit for prototype errata??? */ 1529 } /* else Omit for prototype errata??? */
1526 if (frame_status & 0x00380000) { 1530 if (frame_status & 0x00380000) {
@@ -1566,7 +1570,7 @@ static int hamachi_rx(struct net_device *dev)
1566#endif 1570#endif
1567 skb_reserve(skb, 2); /* 16 byte align the IP header */ 1571 skb_reserve(skb, 2); /* 16 byte align the IP header */
1568 pci_dma_sync_single_for_cpu(hmp->pci_dev, 1572 pci_dma_sync_single_for_cpu(hmp->pci_dev,
1569 hmp->rx_ring[entry].addr, 1573 leXX_to_cpu(hmp->rx_ring[entry].addr),
1570 hmp->rx_buf_sz, 1574 hmp->rx_buf_sz,
1571 PCI_DMA_FROMDEVICE); 1575 PCI_DMA_FROMDEVICE);
1572 /* Call copy + cksum if available. */ 1576 /* Call copy + cksum if available. */
@@ -1579,12 +1583,12 @@ static int hamachi_rx(struct net_device *dev)
1579 + entry*sizeof(*desc), pkt_len); 1583 + entry*sizeof(*desc), pkt_len);
1580#endif 1584#endif
1581 pci_dma_sync_single_for_device(hmp->pci_dev, 1585 pci_dma_sync_single_for_device(hmp->pci_dev,
1582 hmp->rx_ring[entry].addr, 1586 leXX_to_cpu(hmp->rx_ring[entry].addr),
1583 hmp->rx_buf_sz, 1587 hmp->rx_buf_sz,
1584 PCI_DMA_FROMDEVICE); 1588 PCI_DMA_FROMDEVICE);
1585 } else { 1589 } else {
1586 pci_unmap_single(hmp->pci_dev, 1590 pci_unmap_single(hmp->pci_dev,
1587 hmp->rx_ring[entry].addr, 1591 leXX_to_cpu(hmp->rx_ring[entry].addr),
1588 hmp->rx_buf_sz, PCI_DMA_FROMDEVICE); 1592 hmp->rx_buf_sz, PCI_DMA_FROMDEVICE);
1589 skb_put(skb = hmp->rx_skbuff[entry], pkt_len); 1593 skb_put(skb = hmp->rx_skbuff[entry], pkt_len);
1590 hmp->rx_skbuff[entry] = NULL; 1594 hmp->rx_skbuff[entry] = NULL;
@@ -1787,21 +1791,21 @@ static int hamachi_close(struct net_device *dev)
1787 for (i = 0; i < RX_RING_SIZE; i++) { 1791 for (i = 0; i < RX_RING_SIZE; i++) {
1788 skb = hmp->rx_skbuff[i]; 1792 skb = hmp->rx_skbuff[i];
1789 hmp->rx_ring[i].status_n_length = 0; 1793 hmp->rx_ring[i].status_n_length = 0;
1790 hmp->rx_ring[i].addr = 0xBADF00D0; /* An invalid address. */
1791 if (skb) { 1794 if (skb) {
1792 pci_unmap_single(hmp->pci_dev, 1795 pci_unmap_single(hmp->pci_dev,
1793 hmp->rx_ring[i].addr, hmp->rx_buf_sz, 1796 leXX_to_cpu(hmp->rx_ring[i].addr),
1794 PCI_DMA_FROMDEVICE); 1797 hmp->rx_buf_sz, PCI_DMA_FROMDEVICE);
1795 dev_kfree_skb(skb); 1798 dev_kfree_skb(skb);
1796 hmp->rx_skbuff[i] = NULL; 1799 hmp->rx_skbuff[i] = NULL;
1797 } 1800 }
1801 hmp->rx_ring[i].addr = cpu_to_leXX(0xBADF00D0); /* An invalid address. */
1798 } 1802 }
1799 for (i = 0; i < TX_RING_SIZE; i++) { 1803 for (i = 0; i < TX_RING_SIZE; i++) {
1800 skb = hmp->tx_skbuff[i]; 1804 skb = hmp->tx_skbuff[i];
1801 if (skb) { 1805 if (skb) {
1802 pci_unmap_single(hmp->pci_dev, 1806 pci_unmap_single(hmp->pci_dev,
1803 hmp->tx_ring[i].addr, skb->len, 1807 leXX_to_cpu(hmp->tx_ring[i].addr),
1804 PCI_DMA_TODEVICE); 1808 skb->len, PCI_DMA_TODEVICE);
1805 dev_kfree_skb(skb); 1809 dev_kfree_skb(skb);
1806 hmp->tx_skbuff[i] = NULL; 1810 hmp->tx_skbuff[i] = NULL;
1807 } 1811 }
diff --git a/drivers/net/ibm_newemac/debug.c b/drivers/net/ibm_newemac/debug.c
index a2fc660ca5d4..86b756a30784 100644
--- a/drivers/net/ibm_newemac/debug.c
+++ b/drivers/net/ibm_newemac/debug.c
@@ -26,7 +26,7 @@
26 26
27#include "core.h" 27#include "core.h"
28 28
29static spinlock_t emac_dbg_lock = SPIN_LOCK_UNLOCKED; 29static DEFINE_SPINLOCK(emac_dbg_lock);
30 30
31static void emac_desc_dump(struct emac_instance *p) 31static void emac_desc_dump(struct emac_instance *p)
32{ 32{
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index 3021234b1e17..bf9085fe035a 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -320,10 +320,22 @@ ixgb_down(struct ixgb_adapter *adapter, boolean_t kill_watchdog)
320void 320void
321ixgb_reset(struct ixgb_adapter *adapter) 321ixgb_reset(struct ixgb_adapter *adapter)
322{ 322{
323 struct ixgb_hw *hw = &adapter->hw;
323 324
324 ixgb_adapter_stop(&adapter->hw); 325 ixgb_adapter_stop(hw);
325 if(!ixgb_init_hw(&adapter->hw)) 326 if (!ixgb_init_hw(hw))
326 DPRINTK(PROBE, ERR, "ixgb_init_hw failed.\n"); 327 DPRINTK(PROBE, ERR, "ixgb_init_hw failed.\n");
328
329 /* restore frame size information */
330 IXGB_WRITE_REG(hw, MFS, hw->max_frame_size << IXGB_MFS_SHIFT);
331 if (hw->max_frame_size >
332 IXGB_MAX_ENET_FRAME_SIZE_WITHOUT_FCS + ENET_FCS_LENGTH) {
333 u32 ctrl0 = IXGB_READ_REG(hw, CTRL0);
334 if (!(ctrl0 & IXGB_CTRL0_JFE)) {
335 ctrl0 |= IXGB_CTRL0_JFE;
336 IXGB_WRITE_REG(hw, CTRL0, ctrl0);
337 }
338 }
327} 339}
328 340
329/** 341/**
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c
index db6a97d1d7b1..51bbd582f16c 100644
--- a/drivers/net/pcmcia/pcnet_cs.c
+++ b/drivers/net/pcmcia/pcnet_cs.c
@@ -1746,6 +1746,7 @@ static struct pcmcia_device_id pcnet_ids[] = {
1746 PCMCIA_DEVICE_CIS_PROD_ID12("NDC", "Ethernet", 0x01c43ae1, 0x00b2e941, "NE2K.cis"), 1746 PCMCIA_DEVICE_CIS_PROD_ID12("NDC", "Ethernet", 0x01c43ae1, 0x00b2e941, "NE2K.cis"),
1747 PCMCIA_DEVICE_CIS_PROD_ID12("PMX ", "PE-200", 0x34f3f1c8, 0x10b59f8c, "PE-200.cis"), 1747 PCMCIA_DEVICE_CIS_PROD_ID12("PMX ", "PE-200", 0x34f3f1c8, 0x10b59f8c, "PE-200.cis"),
1748 PCMCIA_DEVICE_CIS_PROD_ID12("TAMARACK", "Ethernet", 0xcf434fba, 0x00b2e941, "tamarack.cis"), 1748 PCMCIA_DEVICE_CIS_PROD_ID12("TAMARACK", "Ethernet", 0xcf434fba, 0x00b2e941, "tamarack.cis"),
1749 PCMCIA_DEVICE_PROD_ID12("Ethernet", "CF Size PC Card", 0x00b2e941, 0x43ac239b),
1749 PCMCIA_DEVICE_PROD_ID123("Fast Ethernet", "CF Size PC Card", "1.0", 1750 PCMCIA_DEVICE_PROD_ID123("Fast Ethernet", "CF Size PC Card", "1.0",
1750 0xb4be14e3, 0x43ac239b, 0x0877b627), 1751 0xb4be14e3, 0x43ac239b, 0x0877b627),
1751 PCMCIA_DEVICE_NULL 1752 PCMCIA_DEVICE_NULL
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 121cb100f93a..9d80f1cf73ac 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -3737,7 +3737,7 @@ static int s2io_enable_msi_x(struct s2io_nic *nic)
3737} 3737}
3738 3738
3739/* Handle software interrupt used during MSI(X) test */ 3739/* Handle software interrupt used during MSI(X) test */
3740static irqreturn_t __devinit s2io_test_intr(int irq, void *dev_id) 3740static irqreturn_t s2io_test_intr(int irq, void *dev_id)
3741{ 3741{
3742 struct s2io_nic *sp = dev_id; 3742 struct s2io_nic *sp = dev_id;
3743 3743
@@ -3748,7 +3748,7 @@ static irqreturn_t __devinit s2io_test_intr(int irq, void *dev_id)
3748} 3748}
3749 3749
3750/* Test interrupt path by forcing a a software IRQ */ 3750/* Test interrupt path by forcing a a software IRQ */
3751static int __devinit s2io_test_msi(struct s2io_nic *sp) 3751static int s2io_test_msi(struct s2io_nic *sp)
3752{ 3752{
3753 struct pci_dev *pdev = sp->pdev; 3753 struct pci_dev *pdev = sp->pdev;
3754 struct XENA_dev_config __iomem *bar0 = sp->bar0; 3754 struct XENA_dev_config __iomem *bar0 = sp->bar0;
diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c
index 720088396bb9..7eab072ae792 100644
--- a/drivers/net/sis190.c
+++ b/drivers/net/sis190.c
@@ -474,7 +474,7 @@ static inline void sis190_map_to_asic(struct RxDesc *desc, dma_addr_t mapping,
474static inline void sis190_make_unusable_by_asic(struct RxDesc *desc) 474static inline void sis190_make_unusable_by_asic(struct RxDesc *desc)
475{ 475{
476 desc->PSize = 0x0; 476 desc->PSize = 0x0;
477 desc->addr = 0xdeadbeef; 477 desc->addr = cpu_to_le32(0xdeadbeef);
478 desc->size &= cpu_to_le32(RingEnd); 478 desc->size &= cpu_to_le32(RingEnd);
479 wmb(); 479 wmb();
480 desc->status = 0x0; 480 desc->status = 0x0;
@@ -580,7 +580,7 @@ static int sis190_rx_interrupt(struct net_device *dev,
580 struct RxDesc *desc = tp->RxDescRing + entry; 580 struct RxDesc *desc = tp->RxDescRing + entry;
581 u32 status; 581 u32 status;
582 582
583 if (desc->status & OWNbit) 583 if (le32_to_cpu(desc->status) & OWNbit)
584 break; 584 break;
585 585
586 status = le32_to_cpu(desc->PSize); 586 status = le32_to_cpu(desc->PSize);
@@ -1381,7 +1381,7 @@ out:
1381 return rc; 1381 return rc;
1382} 1382}
1383 1383
1384static void __devexit sis190_mii_remove(struct net_device *dev) 1384static void sis190_mii_remove(struct net_device *dev)
1385{ 1385{
1386 struct sis190_private *tp = netdev_priv(dev); 1386 struct sis190_private *tp = netdev_priv(dev);
1387 1387
@@ -1538,9 +1538,9 @@ static int __devinit sis190_get_mac_addr_from_eeprom(struct pci_dev *pdev,
1538 1538
1539 /* Get MAC address from EEPROM */ 1539 /* Get MAC address from EEPROM */
1540 for (i = 0; i < MAC_ADDR_LEN / 2; i++) { 1540 for (i = 0; i < MAC_ADDR_LEN / 2; i++) {
1541 __le16 w = sis190_read_eeprom(ioaddr, EEPROMMACAddr + i); 1541 u16 w = sis190_read_eeprom(ioaddr, EEPROMMACAddr + i);
1542 1542
1543 ((u16 *)dev->dev_addr)[i] = le16_to_cpu(w); 1543 ((__le16 *)dev->dev_addr)[i] = cpu_to_le16(w);
1544 } 1544 }
1545 1545
1546 sis190_set_rgmii(tp, sis190_read_eeprom(ioaddr, EEPROMInfo)); 1546 sis190_set_rgmii(tp, sis190_read_eeprom(ioaddr, EEPROMInfo));
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 6197afb3ed83..a74fc11a6482 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -822,8 +822,13 @@ static void sky2_mac_init(struct sky2_hw *hw, unsigned port)
822 822
823 sky2_write32(hw, SK_REG(port, RX_GMF_CTRL_T), rx_reg); 823 sky2_write32(hw, SK_REG(port, RX_GMF_CTRL_T), rx_reg);
824 824
825 /* Flush Rx MAC FIFO on any flow control or error */ 825 if (hw->chip_id == CHIP_ID_YUKON_XL) {
826 sky2_write16(hw, SK_REG(port, RX_GMF_FL_MSK), GMR_FS_ANY_ERR); 826 /* Hardware errata - clear flush mask */
827 sky2_write16(hw, SK_REG(port, RX_GMF_FL_MSK), 0);
828 } else {
829 /* Flush Rx MAC FIFO on any flow control or error */
830 sky2_write16(hw, SK_REG(port, RX_GMF_FL_MSK), GMR_FS_ANY_ERR);
831 }
827 832
828 /* Set threshold to 0xa (64 bytes) + 1 to workaround pause bug */ 833 /* Set threshold to 0xa (64 bytes) + 1 to workaround pause bug */
829 reg = RX_GMF_FL_THR_DEF + 1; 834 reg = RX_GMF_FL_THR_DEF + 1;
diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h
index d04e4fa35206..7defa63b9c74 100644
--- a/drivers/net/smc911x.h
+++ b/drivers/net/smc911x.h
@@ -76,7 +76,7 @@
76 76
77 77
78 78
79#if SMC_USE_PXA_DMA 79#ifdef SMC_USE_PXA_DMA
80#define SMC_USE_DMA 80#define SMC_USE_DMA
81 81
82/* 82/*
diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c
index bcc430bd9e49..6e00dc857afa 100644
--- a/drivers/net/starfire.c
+++ b/drivers/net/starfire.c
@@ -1742,7 +1742,7 @@ static void set_rx_mode(struct net_device *dev)
1742 if (vlan_group_get_device(np->vlgrp, i)) { 1742 if (vlan_group_get_device(np->vlgrp, i)) {
1743 if (vlan_count >= 32) 1743 if (vlan_count >= 32)
1744 break; 1744 break;
1745 writew(cpu_to_be16(i), filter_addr); 1745 writew(i, filter_addr);
1746 filter_addr += 16; 1746 filter_addr += 16;
1747 vlan_count++; 1747 vlan_count++;
1748 } 1748 }
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c
index ff98f5d597f1..0a6186d4a48e 100644
--- a/drivers/net/sundance.c
+++ b/drivers/net/sundance.c
@@ -340,9 +340,9 @@ enum mac_ctrl1_bits {
340/* Note that using only 32 bit fields simplifies conversion to big-endian 340/* Note that using only 32 bit fields simplifies conversion to big-endian
341 architectures. */ 341 architectures. */
342struct netdev_desc { 342struct netdev_desc {
343 u32 next_desc; 343 __le32 next_desc;
344 u32 status; 344 __le32 status;
345 struct desc_frag { u32 addr, length; } frag[1]; 345 struct desc_frag { __le32 addr, length; } frag[1];
346}; 346};
347 347
348/* Bits in netdev_desc.status */ 348/* Bits in netdev_desc.status */
@@ -495,8 +495,8 @@ static int __devinit sundance_probe1 (struct pci_dev *pdev,
495 goto err_out_res; 495 goto err_out_res;
496 496
497 for (i = 0; i < 3; i++) 497 for (i = 0; i < 3; i++)
498 ((u16 *)dev->dev_addr)[i] = 498 ((__le16 *)dev->dev_addr)[i] =
499 le16_to_cpu(eeprom_read(ioaddr, i + EEPROM_SA_OFFSET)); 499 cpu_to_le16(eeprom_read(ioaddr, i + EEPROM_SA_OFFSET));
500 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len); 500 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
501 501
502 dev->base_addr = (unsigned long)ioaddr; 502 dev->base_addr = (unsigned long)ioaddr;
@@ -1090,8 +1090,8 @@ reset_tx (struct net_device *dev)
1090 skb = np->tx_skbuff[i]; 1090 skb = np->tx_skbuff[i];
1091 if (skb) { 1091 if (skb) {
1092 pci_unmap_single(np->pci_dev, 1092 pci_unmap_single(np->pci_dev,
1093 np->tx_ring[i].frag[0].addr, skb->len, 1093 le32_to_cpu(np->tx_ring[i].frag[0].addr),
1094 PCI_DMA_TODEVICE); 1094 skb->len, PCI_DMA_TODEVICE);
1095 if (irq) 1095 if (irq)
1096 dev_kfree_skb_irq (skb); 1096 dev_kfree_skb_irq (skb);
1097 else 1097 else
@@ -1214,7 +1214,7 @@ static irqreturn_t intr_handler(int irq, void *dev_instance)
1214 skb = np->tx_skbuff[entry]; 1214 skb = np->tx_skbuff[entry];
1215 /* Free the original skb. */ 1215 /* Free the original skb. */
1216 pci_unmap_single(np->pci_dev, 1216 pci_unmap_single(np->pci_dev,
1217 np->tx_ring[entry].frag[0].addr, 1217 le32_to_cpu(np->tx_ring[entry].frag[0].addr),
1218 skb->len, PCI_DMA_TODEVICE); 1218 skb->len, PCI_DMA_TODEVICE);
1219 dev_kfree_skb_irq (np->tx_skbuff[entry]); 1219 dev_kfree_skb_irq (np->tx_skbuff[entry]);
1220 np->tx_skbuff[entry] = NULL; 1220 np->tx_skbuff[entry] = NULL;
@@ -1233,7 +1233,7 @@ static irqreturn_t intr_handler(int irq, void *dev_instance)
1233 skb = np->tx_skbuff[entry]; 1233 skb = np->tx_skbuff[entry];
1234 /* Free the original skb. */ 1234 /* Free the original skb. */
1235 pci_unmap_single(np->pci_dev, 1235 pci_unmap_single(np->pci_dev,
1236 np->tx_ring[entry].frag[0].addr, 1236 le32_to_cpu(np->tx_ring[entry].frag[0].addr),
1237 skb->len, PCI_DMA_TODEVICE); 1237 skb->len, PCI_DMA_TODEVICE);
1238 dev_kfree_skb_irq (np->tx_skbuff[entry]); 1238 dev_kfree_skb_irq (np->tx_skbuff[entry]);
1239 np->tx_skbuff[entry] = NULL; 1239 np->tx_skbuff[entry] = NULL;
@@ -1311,19 +1311,19 @@ static void rx_poll(unsigned long data)
1311 && (skb = dev_alloc_skb(pkt_len + 2)) != NULL) { 1311 && (skb = dev_alloc_skb(pkt_len + 2)) != NULL) {
1312 skb_reserve(skb, 2); /* 16 byte align the IP header */ 1312 skb_reserve(skb, 2); /* 16 byte align the IP header */
1313 pci_dma_sync_single_for_cpu(np->pci_dev, 1313 pci_dma_sync_single_for_cpu(np->pci_dev,
1314 desc->frag[0].addr, 1314 le32_to_cpu(desc->frag[0].addr),
1315 np->rx_buf_sz, 1315 np->rx_buf_sz,
1316 PCI_DMA_FROMDEVICE); 1316 PCI_DMA_FROMDEVICE);
1317 1317
1318 skb_copy_to_linear_data(skb, np->rx_skbuff[entry]->data, pkt_len); 1318 skb_copy_to_linear_data(skb, np->rx_skbuff[entry]->data, pkt_len);
1319 pci_dma_sync_single_for_device(np->pci_dev, 1319 pci_dma_sync_single_for_device(np->pci_dev,
1320 desc->frag[0].addr, 1320 le32_to_cpu(desc->frag[0].addr),
1321 np->rx_buf_sz, 1321 np->rx_buf_sz,
1322 PCI_DMA_FROMDEVICE); 1322 PCI_DMA_FROMDEVICE);
1323 skb_put(skb, pkt_len); 1323 skb_put(skb, pkt_len);
1324 } else { 1324 } else {
1325 pci_unmap_single(np->pci_dev, 1325 pci_unmap_single(np->pci_dev,
1326 desc->frag[0].addr, 1326 le32_to_cpu(desc->frag[0].addr),
1327 np->rx_buf_sz, 1327 np->rx_buf_sz,
1328 PCI_DMA_FROMDEVICE); 1328 PCI_DMA_FROMDEVICE);
1329 skb_put(skb = np->rx_skbuff[entry], pkt_len); 1329 skb_put(skb = np->rx_skbuff[entry], pkt_len);
@@ -1709,23 +1709,23 @@ static int netdev_close(struct net_device *dev)
1709 /* Free all the skbuffs in the Rx queue. */ 1709 /* Free all the skbuffs in the Rx queue. */
1710 for (i = 0; i < RX_RING_SIZE; i++) { 1710 for (i = 0; i < RX_RING_SIZE; i++) {
1711 np->rx_ring[i].status = 0; 1711 np->rx_ring[i].status = 0;
1712 np->rx_ring[i].frag[0].addr = 0xBADF00D0; /* An invalid address. */
1713 skb = np->rx_skbuff[i]; 1712 skb = np->rx_skbuff[i];
1714 if (skb) { 1713 if (skb) {
1715 pci_unmap_single(np->pci_dev, 1714 pci_unmap_single(np->pci_dev,
1716 np->rx_ring[i].frag[0].addr, np->rx_buf_sz, 1715 le32_to_cpu(np->rx_ring[i].frag[0].addr),
1717 PCI_DMA_FROMDEVICE); 1716 np->rx_buf_sz, PCI_DMA_FROMDEVICE);
1718 dev_kfree_skb(skb); 1717 dev_kfree_skb(skb);
1719 np->rx_skbuff[i] = NULL; 1718 np->rx_skbuff[i] = NULL;
1720 } 1719 }
1720 np->rx_ring[i].frag[0].addr = cpu_to_le32(0xBADF00D0); /* poison */
1721 } 1721 }
1722 for (i = 0; i < TX_RING_SIZE; i++) { 1722 for (i = 0; i < TX_RING_SIZE; i++) {
1723 np->tx_ring[i].next_desc = 0; 1723 np->tx_ring[i].next_desc = 0;
1724 skb = np->tx_skbuff[i]; 1724 skb = np->tx_skbuff[i];
1725 if (skb) { 1725 if (skb) {
1726 pci_unmap_single(np->pci_dev, 1726 pci_unmap_single(np->pci_dev,
1727 np->tx_ring[i].frag[0].addr, skb->len, 1727 le32_to_cpu(np->tx_ring[i].frag[0].addr),
1728 PCI_DMA_TODEVICE); 1728 skb->len, PCI_DMA_TODEVICE);
1729 dev_kfree_skb(skb); 1729 dev_kfree_skb(skb);
1730 np->tx_skbuff[i] = NULL; 1730 np->tx_skbuff[i] = NULL;
1731 } 1731 }
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index 7f689907ac28..abac7db3819e 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -3447,7 +3447,7 @@ static int ucc_geth_rx(struct ucc_geth_private *ugeth, u8 rxQ, int rx_work_limit
3447 u16 length, howmany = 0; 3447 u16 length, howmany = 0;
3448 u32 bd_status; 3448 u32 bd_status;
3449 u8 *bdBuffer; 3449 u8 *bdBuffer;
3450 struct net_device * dev; 3450 struct net_device *dev;
3451 3451
3452 ugeth_vdbg("%s: IN", __FUNCTION__); 3452 ugeth_vdbg("%s: IN", __FUNCTION__);
3453 3453
diff --git a/drivers/net/ucc_geth_mii.h b/drivers/net/ucc_geth_mii.h
index d83437039919..1e45b2028a50 100644
--- a/drivers/net/ucc_geth_mii.h
+++ b/drivers/net/ucc_geth_mii.h
@@ -96,5 +96,5 @@ enum enet_tbi_mii_reg {
96int uec_mdio_read(struct mii_bus *bus, int mii_id, int regnum); 96int uec_mdio_read(struct mii_bus *bus, int mii_id, int regnum);
97int uec_mdio_write(struct mii_bus *bus, int mii_id, int regnum, u16 value); 97int uec_mdio_write(struct mii_bus *bus, int mii_id, int regnum, u16 value);
98int __init uec_mdio_init(void); 98int __init uec_mdio_init(void);
99void __exit uec_mdio_exit(void); 99void uec_mdio_exit(void);
100#endif /* __UEC_MII_H */ 100#endif /* __UEC_MII_H */
diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig
index 2b733c582915..5583719a0dca 100644
--- a/drivers/net/wireless/Kconfig
+++ b/drivers/net/wireless/Kconfig
@@ -264,6 +264,7 @@ config IPW2200_DEBUG
264config LIBERTAS 264config LIBERTAS
265 tristate "Marvell 8xxx Libertas WLAN driver support" 265 tristate "Marvell 8xxx Libertas WLAN driver support"
266 depends on WLAN_80211 266 depends on WLAN_80211
267 select WIRELESS_EXT
267 select IEEE80211 268 select IEEE80211
268 select FW_LOADER 269 select FW_LOADER
269 ---help--- 270 ---help---
diff --git a/drivers/net/wireless/b43/leds.c b/drivers/net/wireless/b43/leds.c
index 19e588582c7c..6c0e2b9f7760 100644
--- a/drivers/net/wireless/b43/leds.c
+++ b/drivers/net/wireless/b43/leds.c
@@ -163,6 +163,9 @@ static void b43_map_led(struct b43_wldev *dev,
163 b43_register_led(dev, &dev->led_radio, name, 163 b43_register_led(dev, &dev->led_radio, name,
164 b43_rfkill_led_name(dev), 164 b43_rfkill_led_name(dev),
165 led_index, activelow); 165 led_index, activelow);
166 /* Sync the RF-kill LED state with the switch state. */
167 if (dev->radio_hw_enable)
168 b43_led_turn_on(dev, led_index, activelow);
166 break; 169 break;
167 case B43_LED_WEIRD: 170 case B43_LED_WEIRD:
168 case B43_LED_ASSOC: 171 case B43_LED_ASSOC:
@@ -232,4 +235,5 @@ void b43_leds_exit(struct b43_wldev *dev)
232 b43_unregister_led(&dev->led_tx); 235 b43_unregister_led(&dev->led_tx);
233 b43_unregister_led(&dev->led_rx); 236 b43_unregister_led(&dev->led_rx);
234 b43_unregister_led(&dev->led_assoc); 237 b43_unregister_led(&dev->led_assoc);
238 b43_unregister_led(&dev->led_radio);
235} 239}
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index b45eecc53c4a..1c93b4f4bfe3 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -2163,7 +2163,6 @@ static void b43_mgmtframe_txantenna(struct b43_wldev *dev, int antenna)
2163static void b43_chip_exit(struct b43_wldev *dev) 2163static void b43_chip_exit(struct b43_wldev *dev)
2164{ 2164{
2165 b43_radio_turn_off(dev, 1); 2165 b43_radio_turn_off(dev, 1);
2166 b43_leds_exit(dev);
2167 b43_gpio_cleanup(dev); 2166 b43_gpio_cleanup(dev);
2168 /* firmware is released later */ 2167 /* firmware is released later */
2169} 2168}
@@ -2191,11 +2190,10 @@ static int b43_chip_init(struct b43_wldev *dev)
2191 err = b43_gpio_init(dev); 2190 err = b43_gpio_init(dev);
2192 if (err) 2191 if (err)
2193 goto out; /* firmware is released later */ 2192 goto out; /* firmware is released later */
2194 b43_leds_init(dev);
2195 2193
2196 err = b43_upload_initvals(dev); 2194 err = b43_upload_initvals(dev);
2197 if (err) 2195 if (err)
2198 goto err_leds_exit; 2196 goto err_gpio_clean;
2199 b43_radio_turn_on(dev); 2197 b43_radio_turn_on(dev);
2200 2198
2201 b43_write16(dev, 0x03E6, 0x0000); 2199 b43_write16(dev, 0x03E6, 0x0000);
@@ -2271,8 +2269,7 @@ out:
2271 2269
2272err_radio_off: 2270err_radio_off:
2273 b43_radio_turn_off(dev, 1); 2271 b43_radio_turn_off(dev, 1);
2274err_leds_exit: 2272err_gpio_clean:
2275 b43_leds_exit(dev);
2276 b43_gpio_cleanup(dev); 2273 b43_gpio_cleanup(dev);
2277 return err; 2274 return err;
2278} 2275}
@@ -3273,10 +3270,7 @@ static void b43_wireless_core_exit(struct b43_wldev *dev)
3273 return; 3270 return;
3274 b43_set_status(dev, B43_STAT_UNINIT); 3271 b43_set_status(dev, B43_STAT_UNINIT);
3275 3272
3276 mutex_unlock(&dev->wl->mutex); 3273 b43_leds_exit(dev);
3277 b43_rfkill_exit(dev);
3278 mutex_lock(&dev->wl->mutex);
3279
3280 b43_rng_exit(dev->wl); 3274 b43_rng_exit(dev->wl);
3281 b43_pio_free(dev); 3275 b43_pio_free(dev);
3282 b43_dma_free(dev); 3276 b43_dma_free(dev);
@@ -3405,12 +3399,12 @@ static int b43_wireless_core_init(struct b43_wldev *dev)
3405 memset(wl->mac_addr, 0, ETH_ALEN); 3399 memset(wl->mac_addr, 0, ETH_ALEN);
3406 b43_upload_card_macaddress(dev); 3400 b43_upload_card_macaddress(dev);
3407 b43_security_init(dev); 3401 b43_security_init(dev);
3408 b43_rfkill_init(dev);
3409 b43_rng_init(wl); 3402 b43_rng_init(wl);
3410 3403
3411 b43_set_status(dev, B43_STAT_INITIALIZED); 3404 b43_set_status(dev, B43_STAT_INITIALIZED);
3412 3405
3413 out: 3406 b43_leds_init(dev);
3407out:
3414 return err; 3408 return err;
3415 3409
3416 err_chip_exit: 3410 err_chip_exit:
@@ -3499,6 +3493,10 @@ static int b43_start(struct ieee80211_hw *hw)
3499 int did_init = 0; 3493 int did_init = 0;
3500 int err = 0; 3494 int err = 0;
3501 3495
3496 /* First register RFkill.
3497 * LEDs that are registered later depend on it. */
3498 b43_rfkill_init(dev);
3499
3502 mutex_lock(&wl->mutex); 3500 mutex_lock(&wl->mutex);
3503 3501
3504 if (b43_status(dev) < B43_STAT_INITIALIZED) { 3502 if (b43_status(dev) < B43_STAT_INITIALIZED) {
@@ -3528,6 +3526,8 @@ static void b43_stop(struct ieee80211_hw *hw)
3528 struct b43_wl *wl = hw_to_b43_wl(hw); 3526 struct b43_wl *wl = hw_to_b43_wl(hw);
3529 struct b43_wldev *dev = wl->current_dev; 3527 struct b43_wldev *dev = wl->current_dev;
3530 3528
3529 b43_rfkill_exit(dev);
3530
3531 mutex_lock(&wl->mutex); 3531 mutex_lock(&wl->mutex);
3532 if (b43_status(dev) >= B43_STAT_STARTED) 3532 if (b43_status(dev) >= B43_STAT_STARTED)
3533 b43_wireless_core_stop(dev); 3533 b43_wireless_core_stop(dev);
diff --git a/drivers/net/wireless/b43/rfkill.c b/drivers/net/wireless/b43/rfkill.c
index 9b1f905ffbf4..98cf70c5fd47 100644
--- a/drivers/net/wireless/b43/rfkill.c
+++ b/drivers/net/wireless/b43/rfkill.c
@@ -25,6 +25,8 @@
25#include "rfkill.h" 25#include "rfkill.h"
26#include "b43.h" 26#include "b43.h"
27 27
28#include <linux/kmod.h>
29
28 30
29/* Returns TRUE, if the radio is enabled in hardware. */ 31/* Returns TRUE, if the radio is enabled in hardware. */
30static bool b43_is_hw_radio_enabled(struct b43_wldev *dev) 32static bool b43_is_hw_radio_enabled(struct b43_wldev *dev)
@@ -50,7 +52,10 @@ static void b43_rfkill_poll(struct input_polled_dev *poll_dev)
50 bool report_change = 0; 52 bool report_change = 0;
51 53
52 mutex_lock(&wl->mutex); 54 mutex_lock(&wl->mutex);
53 B43_WARN_ON(b43_status(dev) < B43_STAT_INITIALIZED); 55 if (unlikely(b43_status(dev) < B43_STAT_INITIALIZED)) {
56 mutex_unlock(&wl->mutex);
57 return;
58 }
54 enabled = b43_is_hw_radio_enabled(dev); 59 enabled = b43_is_hw_radio_enabled(dev);
55 if (unlikely(enabled != dev->radio_hw_enable)) { 60 if (unlikely(enabled != dev->radio_hw_enable)) {
56 dev->radio_hw_enable = enabled; 61 dev->radio_hw_enable = enabled;
@@ -60,8 +65,12 @@ static void b43_rfkill_poll(struct input_polled_dev *poll_dev)
60 } 65 }
61 mutex_unlock(&wl->mutex); 66 mutex_unlock(&wl->mutex);
62 67
63 if (unlikely(report_change)) 68 /* send the radio switch event to the system - note both a key press
64 input_report_key(poll_dev->input, KEY_WLAN, enabled); 69 * and a release are required */
70 if (unlikely(report_change)) {
71 input_report_key(poll_dev->input, KEY_WLAN, 1);
72 input_report_key(poll_dev->input, KEY_WLAN, 0);
73 }
65} 74}
66 75
67/* Called when the RFKILL toggled in software. */ 76/* Called when the RFKILL toggled in software. */
@@ -69,13 +78,15 @@ static int b43_rfkill_soft_toggle(void *data, enum rfkill_state state)
69{ 78{
70 struct b43_wldev *dev = data; 79 struct b43_wldev *dev = data;
71 struct b43_wl *wl = dev->wl; 80 struct b43_wl *wl = dev->wl;
72 int err = 0; 81 int err = -EBUSY;
73 82
74 if (!wl->rfkill.registered) 83 if (!wl->rfkill.registered)
75 return 0; 84 return 0;
76 85
77 mutex_lock(&wl->mutex); 86 mutex_lock(&wl->mutex);
78 B43_WARN_ON(b43_status(dev) < B43_STAT_INITIALIZED); 87 if (b43_status(dev) < B43_STAT_INITIALIZED)
88 goto out_unlock;
89 err = 0;
79 switch (state) { 90 switch (state) {
80 case RFKILL_STATE_ON: 91 case RFKILL_STATE_ON:
81 if (!dev->radio_hw_enable) { 92 if (!dev->radio_hw_enable) {
@@ -133,9 +144,25 @@ void b43_rfkill_init(struct b43_wldev *dev)
133 rfk->poll_dev->poll = b43_rfkill_poll; 144 rfk->poll_dev->poll = b43_rfkill_poll;
134 rfk->poll_dev->poll_interval = 1000; /* msecs */ 145 rfk->poll_dev->poll_interval = 1000; /* msecs */
135 146
147 rfk->poll_dev->input->name = rfk->name;
148 rfk->poll_dev->input->id.bustype = BUS_HOST;
149 rfk->poll_dev->input->id.vendor = dev->dev->bus->boardinfo.vendor;
150 rfk->poll_dev->input->evbit[0] = BIT(EV_KEY);
151 set_bit(KEY_WLAN, rfk->poll_dev->input->keybit);
152
136 err = rfkill_register(rfk->rfkill); 153 err = rfkill_register(rfk->rfkill);
137 if (err) 154 if (err)
138 goto err_free_polldev; 155 goto err_free_polldev;
156
157#ifdef CONFIG_RFKILL_INPUT_MODULE
158 /* B43 RF-kill isn't useful without the rfkill-input subsystem.
159 * Try to load the module. */
160 err = request_module("rfkill-input");
161 if (err)
162 b43warn(wl, "Failed to load the rfkill-input module. "
163 "The built-in radio LED will not work.\n");
164#endif /* CONFIG_RFKILL_INPUT */
165
139 err = input_register_polled_device(rfk->poll_dev); 166 err = input_register_polled_device(rfk->poll_dev);
140 if (err) 167 if (err)
141 goto err_unreg_rfk; 168 goto err_unreg_rfk;
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c b/drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c
index 35dbe4554513..76e9dd843faa 100644
--- a/drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c
+++ b/drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c
@@ -219,7 +219,7 @@ static ssize_t tsf_write_file(struct file *file, const char __user *user_buf,
219 ssize_t buf_size; 219 ssize_t buf_size;
220 ssize_t res; 220 ssize_t res;
221 unsigned long flags; 221 unsigned long flags;
222 u64 tsf; 222 unsigned long long tsf;
223 223
224 buf_size = min(count, sizeof (really_big_buffer) - 1); 224 buf_size = min(count, sizeof (really_big_buffer) - 1);
225 down(&big_buffer_sem); 225 down(&big_buffer_sem);
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c
index 54f44e5473c0..da51f477e9df 100644
--- a/drivers/net/wireless/ipw2200.c
+++ b/drivers/net/wireless/ipw2200.c
@@ -10751,7 +10751,7 @@ static void ipw_bg_link_down(struct work_struct *work)
10751 mutex_unlock(&priv->mutex); 10751 mutex_unlock(&priv->mutex);
10752} 10752}
10753 10753
10754static int ipw_setup_deferred_work(struct ipw_priv *priv) 10754static int __devinit ipw_setup_deferred_work(struct ipw_priv *priv)
10755{ 10755{
10756 int ret = 0; 10756 int ret = 0;
10757 10757
@@ -11600,7 +11600,8 @@ static void ipw_prom_free(struct ipw_priv *priv)
11600#endif 11600#endif
11601 11601
11602 11602
11603static int ipw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 11603static int __devinit ipw_pci_probe(struct pci_dev *pdev,
11604 const struct pci_device_id *ent)
11604{ 11605{
11605 int err = 0; 11606 int err = 0;
11606 struct net_device *net_dev; 11607 struct net_device *net_dev;
@@ -11767,7 +11768,7 @@ static int ipw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
11767 return err; 11768 return err;
11768} 11769}
11769 11770
11770static void ipw_pci_remove(struct pci_dev *pdev) 11771static void __devexit ipw_pci_remove(struct pci_dev *pdev)
11771{ 11772{
11772 struct ipw_priv *priv = pci_get_drvdata(pdev); 11773 struct ipw_priv *priv = pci_get_drvdata(pdev);
11773 struct list_head *p, *q; 11774 struct list_head *p, *q;
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 4bdf237f6adc..3d1da0759b97 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -4743,8 +4743,10 @@ static void iwl_irq_tasklet(struct iwl_priv *priv)
4743 * when we loaded driver, and is now set to "enable". 4743 * when we loaded driver, and is now set to "enable".
4744 * After we're Alive, RF_KILL gets handled by 4744 * After we're Alive, RF_KILL gets handled by
4745 * iwl_rx_card_state_notif() */ 4745 * iwl_rx_card_state_notif() */
4746 if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status)) 4746 if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status)) {
4747 clear_bit(STATUS_RF_KILL_HW, &priv->status);
4747 queue_work(priv->workqueue, &priv->restart); 4748 queue_work(priv->workqueue, &priv->restart);
4749 }
4748 4750
4749 handled |= CSR_INT_BIT_RF_KILL; 4751 handled |= CSR_INT_BIT_RF_KILL;
4750 } 4752 }
@@ -6171,6 +6173,7 @@ static void iwl_alive_start(struct iwl_priv *priv)
6171 mutex_lock(&priv->mutex); 6173 mutex_lock(&priv->mutex);
6172 6174
6173 if (rc) { 6175 if (rc) {
6176 iwl_rate_control_unregister(priv->hw);
6174 IWL_ERROR("Failed to register network " 6177 IWL_ERROR("Failed to register network "
6175 "device (error %d)\n", rc); 6178 "device (error %d)\n", rc);
6176 return; 6179 return;
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index 8f85564ec6fa..b54fe5e6d529 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -5059,8 +5059,10 @@ static void iwl_irq_tasklet(struct iwl_priv *priv)
5059 * when we loaded driver, and is now set to "enable". 5059 * when we loaded driver, and is now set to "enable".
5060 * After we're Alive, RF_KILL gets handled by 5060 * After we're Alive, RF_KILL gets handled by
5061 * iwl_rx_card_state_notif() */ 5061 * iwl_rx_card_state_notif() */
5062 if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status)) 5062 if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status)) {
5063 clear_bit(STATUS_RF_KILL_HW, &priv->status);
5063 queue_work(priv->workqueue, &priv->restart); 5064 queue_work(priv->workqueue, &priv->restart);
5065 }
5064 5066
5065 handled |= CSR_INT_BIT_RF_KILL; 5067 handled |= CSR_INT_BIT_RF_KILL;
5066 } 5068 }
@@ -6527,6 +6529,7 @@ static void iwl_alive_start(struct iwl_priv *priv)
6527 mutex_lock(&priv->mutex); 6529 mutex_lock(&priv->mutex);
6528 6530
6529 if (rc) { 6531 if (rc) {
6532 iwl_rate_control_unregister(priv->hw);
6530 IWL_ERROR("Failed to register network " 6533 IWL_ERROR("Failed to register network "
6531 "device (error %d)\n", rc); 6534 "device (error %d)\n", rc);
6532 return; 6535 return;
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c
index a903645e157a..5298a8bf1129 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c
@@ -1130,6 +1130,8 @@ static void zd_mac_rx(struct zd_mac *mac, struct sk_buff *skb)
1130 __skb_trim(skb, skb->len - 1130 __skb_trim(skb, skb->len -
1131 (IEEE80211_FCS_LEN + sizeof(struct rx_status))); 1131 (IEEE80211_FCS_LEN + sizeof(struct rx_status)));
1132 1132
1133 ZD_ASSERT(IS_ALIGNED((unsigned long)skb->data, 4));
1134
1133 update_qual_rssi(mac, skb->data, skb->len, stats.signal, 1135 update_qual_rssi(mac, skb->data, skb->len, stats.signal,
1134 status->signal_strength); 1136 status->signal_strength);
1135 1137
@@ -1166,15 +1168,19 @@ static void do_rx(unsigned long mac_ptr)
1166int zd_mac_rx_irq(struct zd_mac *mac, const u8 *buffer, unsigned int length) 1168int zd_mac_rx_irq(struct zd_mac *mac, const u8 *buffer, unsigned int length)
1167{ 1169{
1168 struct sk_buff *skb; 1170 struct sk_buff *skb;
1171 unsigned int reserved =
1172 ALIGN(max_t(unsigned int,
1173 sizeof(struct zd_rt_hdr), ZD_PLCP_HEADER_SIZE), 4) -
1174 ZD_PLCP_HEADER_SIZE;
1169 1175
1170 skb = dev_alloc_skb(sizeof(struct zd_rt_hdr) + length); 1176 skb = dev_alloc_skb(reserved + length);
1171 if (!skb) { 1177 if (!skb) {
1172 struct ieee80211_device *ieee = zd_mac_to_ieee80211(mac); 1178 struct ieee80211_device *ieee = zd_mac_to_ieee80211(mac);
1173 dev_warn(zd_mac_dev(mac), "Could not allocate skb.\n"); 1179 dev_warn(zd_mac_dev(mac), "Could not allocate skb.\n");
1174 ieee->stats.rx_dropped++; 1180 ieee->stats.rx_dropped++;
1175 return -ENOMEM; 1181 return -ENOMEM;
1176 } 1182 }
1177 skb_reserve(skb, sizeof(struct zd_rt_hdr)); 1183 skb_reserve(skb, reserved);
1178 memcpy(__skb_put(skb, length), buffer, length); 1184 memcpy(__skb_put(skb, length), buffer, length);
1179 skb_queue_tail(&mac->rx_queue, skb); 1185 skb_queue_tail(&mac->rx_queue, skb);
1180 tasklet_schedule(&mac->rx_tasklet); 1186 tasklet_schedule(&mac->rx_tasklet);
diff --git a/net/mac80211/ieee80211_rate.c b/net/mac80211/ieee80211_rate.c
index 7254bd609839..3260a4a0ecc5 100644
--- a/net/mac80211/ieee80211_rate.c
+++ b/net/mac80211/ieee80211_rate.c
@@ -33,6 +33,7 @@ int ieee80211_rate_control_register(struct rate_control_ops *ops)
33 if (!strcmp(alg->ops->name, ops->name)) { 33 if (!strcmp(alg->ops->name, ops->name)) {
34 /* don't register an algorithm twice */ 34 /* don't register an algorithm twice */
35 WARN_ON(1); 35 WARN_ON(1);
36 mutex_unlock(&rate_ctrl_mutex);
36 return -EALREADY; 37 return -EALREADY;
37 } 38 }
38 } 39 }