aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-10-31 03:17:34 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-31 03:17:34 -0400
commita1744d3bee19d3b9cbfb825ab316a101b9c9f109 (patch)
treec0e2324c09beca0eb5782eb5abf241ea2b7a4a11 /drivers/net
parent275f165fa970174f8a98205529750e8abb6c0a33 (diff)
parenta432226614c5616e3cfd211e0acffa0acfb4770c (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/wireless/p54/p54common.c
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/amd8111e.c23
-rw-r--r--drivers/net/arm/at91_ether.c6
-rw-r--r--drivers/net/atlx/atl1.c7
-rw-r--r--drivers/net/atlx/atl1.h2
-rw-r--r--drivers/net/bonding/bond_alb.c13
-rw-r--r--drivers/net/bonding/bond_main.c52
-rw-r--r--drivers/net/ehea/ehea.h2
-rw-r--r--drivers/net/ehea/ehea_qmr.c57
-rw-r--r--drivers/net/ehea/ehea_qmr.h3
-rw-r--r--drivers/net/gianfar.c16
-rw-r--r--drivers/net/gianfar_mii.c21
-rw-r--r--drivers/net/gianfar_mii.h3
-rw-r--r--drivers/net/ibm_newemac/core.c2
-rw-r--r--drivers/net/loopback.c9
-rw-r--r--drivers/net/mlx4/en_main.c1
-rw-r--r--drivers/net/mlx4/fw.c2
-rw-r--r--drivers/net/myri10ge/myri10ge.c4
-rw-r--r--drivers/net/pppoe.c6
-rw-r--r--drivers/net/smc91x.c2
-rw-r--r--drivers/net/tulip/dmfe.c12
-rw-r--r--drivers/net/usb/dm9601.c15
-rw-r--r--drivers/net/via-velocity.c11
-rw-r--r--drivers/net/wan/syncppp.c5
-rw-r--r--drivers/net/wan/z85230.c1
-rw-r--r--drivers/net/wireless/ath5k/base.c37
-rw-r--r--drivers/net/wireless/ath5k/debug.c2
-rw-r--r--drivers/net/wireless/ath5k/initvals.c2
-rw-r--r--drivers/net/wireless/ath5k/reset.c22
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c2
-rw-r--r--drivers/net/wireless/libertas/cmd.c4
-rw-r--r--drivers/net/wireless/libertas/scan.c4
-rw-r--r--drivers/net/wireless/p54/p54common.c5
-rw-r--r--drivers/net/wireless/p54/p54pci.c132
-rw-r--r--drivers/net/wireless/rt2x00/Kconfig2
34 files changed, 301 insertions, 186 deletions
diff --git a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c
index 20fcf0cdd801..4a2ef838fed6 100644
--- a/drivers/net/amd8111e.c
+++ b/drivers/net/amd8111e.c
@@ -644,10 +644,6 @@ This function frees the transmiter and receiver descriptor rings.
644*/ 644*/
645static void amd8111e_free_ring(struct amd8111e_priv* lp) 645static void amd8111e_free_ring(struct amd8111e_priv* lp)
646{ 646{
647
648 /* Free transmit and receive skbs */
649 amd8111e_free_skbs(lp->amd8111e_net_dev);
650
651 /* Free transmit and receive descriptor rings */ 647 /* Free transmit and receive descriptor rings */
652 if(lp->rx_ring){ 648 if(lp->rx_ring){
653 pci_free_consistent(lp->pci_dev, 649 pci_free_consistent(lp->pci_dev,
@@ -833,12 +829,14 @@ static int amd8111e_rx_poll(struct napi_struct *napi, int budget)
833 829
834 } while(intr0 & RINT0); 830 } while(intr0 & RINT0);
835 831
836 /* Receive descriptor is empty now */ 832 if (rx_pkt_limit > 0) {
837 spin_lock_irqsave(&lp->lock, flags); 833 /* Receive descriptor is empty now */
838 __netif_rx_complete(dev, napi); 834 spin_lock_irqsave(&lp->lock, flags);
839 writel(VAL0|RINTEN0, mmio + INTEN0); 835 __netif_rx_complete(dev, napi);
840 writel(VAL2 | RDMD0, mmio + CMD0); 836 writel(VAL0|RINTEN0, mmio + INTEN0);
841 spin_unlock_irqrestore(&lp->lock, flags); 837 writel(VAL2 | RDMD0, mmio + CMD0);
838 spin_unlock_irqrestore(&lp->lock, flags);
839 }
842 840
843rx_not_empty: 841rx_not_empty:
844 return num_rx_pkt; 842 return num_rx_pkt;
@@ -1231,7 +1229,9 @@ static int amd8111e_close(struct net_device * dev)
1231 1229
1232 amd8111e_disable_interrupt(lp); 1230 amd8111e_disable_interrupt(lp);
1233 amd8111e_stop_chip(lp); 1231 amd8111e_stop_chip(lp);
1234 amd8111e_free_ring(lp); 1232
1233 /* Free transmit and receive skbs */
1234 amd8111e_free_skbs(lp->amd8111e_net_dev);
1235 1235
1236 netif_carrier_off(lp->amd8111e_net_dev); 1236 netif_carrier_off(lp->amd8111e_net_dev);
1237 1237
@@ -1241,6 +1241,7 @@ static int amd8111e_close(struct net_device * dev)
1241 1241
1242 spin_unlock_irq(&lp->lock); 1242 spin_unlock_irq(&lp->lock);
1243 free_irq(dev->irq, dev); 1243 free_irq(dev->irq, dev);
1244 amd8111e_free_ring(lp);
1244 1245
1245 /* Update the statistics before closing */ 1246 /* Update the statistics before closing */
1246 amd8111e_get_stats(dev); 1247 amd8111e_get_stats(dev);
diff --git a/drivers/net/arm/at91_ether.c b/drivers/net/arm/at91_ether.c
index 65ce451ae961..e21dc2075ed8 100644
--- a/drivers/net/arm/at91_ether.c
+++ b/drivers/net/arm/at91_ether.c
@@ -1078,7 +1078,8 @@ static int __init at91ether_setup(unsigned long phy_type, unsigned short phy_add
1078 init_timer(&lp->check_timer); 1078 init_timer(&lp->check_timer);
1079 lp->check_timer.data = (unsigned long)dev; 1079 lp->check_timer.data = (unsigned long)dev;
1080 lp->check_timer.function = at91ether_check_link; 1080 lp->check_timer.function = at91ether_check_link;
1081 } 1081 } else if (lp->board_data.phy_irq_pin >= 32)
1082 gpio_request(lp->board_data.phy_irq_pin, "ethernet_phy");
1082 1083
1083 /* Display ethernet banner */ 1084 /* Display ethernet banner */
1084 printk(KERN_INFO "%s: AT91 ethernet at 0x%08x int=%d %s%s (%pM)\n", 1085 printk(KERN_INFO "%s: AT91 ethernet at 0x%08x int=%d %s%s (%pM)\n",
@@ -1165,6 +1166,9 @@ static int __devexit at91ether_remove(struct platform_device *pdev)
1165 struct net_device *dev = platform_get_drvdata(pdev); 1166 struct net_device *dev = platform_get_drvdata(pdev);
1166 struct at91_private *lp = netdev_priv(dev); 1167 struct at91_private *lp = netdev_priv(dev);
1167 1168
1169 if (lp->board_data.phy_irq_pin >= 32)
1170 gpio_free(lp->board_data.phy_irq_pin);
1171
1168 unregister_netdev(dev); 1172 unregister_netdev(dev);
1169 free_irq(dev->irq, dev); 1173 free_irq(dev->irq, dev);
1170 dma_free_coherent(NULL, sizeof(struct recv_desc_bufs), lp->dlist, (dma_addr_t)lp->dlist_phys); 1174 dma_free_coherent(NULL, sizeof(struct recv_desc_bufs), lp->dlist, (dma_addr_t)lp->dlist_phys);
diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
index 3cf59a7f5a1c..246d92b42636 100644
--- a/drivers/net/atlx/atl1.c
+++ b/drivers/net/atlx/atl1.c
@@ -2310,7 +2310,8 @@ static void atl1_tx_queue(struct atl1_adapter *adapter, u16 count,
2310 if (tpd != ptpd) 2310 if (tpd != ptpd)
2311 memcpy(tpd, ptpd, sizeof(struct tx_packet_desc)); 2311 memcpy(tpd, ptpd, sizeof(struct tx_packet_desc));
2312 tpd->buffer_addr = cpu_to_le64(buffer_info->dma); 2312 tpd->buffer_addr = cpu_to_le64(buffer_info->dma);
2313 tpd->word2 = (cpu_to_le16(buffer_info->length) & 2313 tpd->word2 &= ~(TPD_BUFLEN_MASK << TPD_BUFLEN_SHIFT);
2314 tpd->word2 |= (cpu_to_le16(buffer_info->length) &
2314 TPD_BUFLEN_MASK) << TPD_BUFLEN_SHIFT; 2315 TPD_BUFLEN_MASK) << TPD_BUFLEN_SHIFT;
2315 2316
2316 /* 2317 /*
@@ -2409,8 +2410,8 @@ static int atl1_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
2409 vlan_tag = (vlan_tag << 4) | (vlan_tag >> 13) | 2410 vlan_tag = (vlan_tag << 4) | (vlan_tag >> 13) |
2410 ((vlan_tag >> 9) & 0x8); 2411 ((vlan_tag >> 9) & 0x8);
2411 ptpd->word3 |= 1 << TPD_INS_VL_TAG_SHIFT; 2412 ptpd->word3 |= 1 << TPD_INS_VL_TAG_SHIFT;
2412 ptpd->word3 |= (vlan_tag & TPD_VL_TAGGED_MASK) << 2413 ptpd->word2 |= (vlan_tag & TPD_VLANTAG_MASK) <<
2413 TPD_VL_TAGGED_SHIFT; 2414 TPD_VLANTAG_SHIFT;
2414 } 2415 }
2415 2416
2416 tso = atl1_tso(adapter, skb, ptpd); 2417 tso = atl1_tso(adapter, skb, ptpd);
diff --git a/drivers/net/atlx/atl1.h b/drivers/net/atlx/atl1.h
index a5015b14a429..ffa73fc8d95e 100644
--- a/drivers/net/atlx/atl1.h
+++ b/drivers/net/atlx/atl1.h
@@ -504,7 +504,7 @@ struct rx_free_desc {
504#define TPD_PKTNT_MASK 0x0001 504#define TPD_PKTNT_MASK 0x0001
505#define TPD_PKTINT_SHIFT 15 505#define TPD_PKTINT_SHIFT 15
506#define TPD_VLANTAG_MASK 0xFFFF 506#define TPD_VLANTAG_MASK 0xFFFF
507#define TPD_VLAN_SHIFT 16 507#define TPD_VLANTAG_SHIFT 16
508 508
509/* tpd word 3 bits 0:13 */ 509/* tpd word 3 bits 0:13 */
510#define TPD_EOP_MASK 0x0001 510#define TPD_EOP_MASK 0x0001
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index ade5f3f6693b..87437c788476 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -169,11 +169,14 @@ static void tlb_clear_slave(struct bonding *bond, struct slave *slave, int save_
169 /* clear slave from tx_hashtbl */ 169 /* clear slave from tx_hashtbl */
170 tx_hash_table = BOND_ALB_INFO(bond).tx_hashtbl; 170 tx_hash_table = BOND_ALB_INFO(bond).tx_hashtbl;
171 171
172 index = SLAVE_TLB_INFO(slave).head; 172 /* skip this if we've already freed the tx hash table */
173 while (index != TLB_NULL_INDEX) { 173 if (tx_hash_table) {
174 u32 next_index = tx_hash_table[index].next; 174 index = SLAVE_TLB_INFO(slave).head;
175 tlb_init_table_entry(&tx_hash_table[index], save_load); 175 while (index != TLB_NULL_INDEX) {
176 index = next_index; 176 u32 next_index = tx_hash_table[index].next;
177 tlb_init_table_entry(&tx_hash_table[index], save_load);
178 index = next_index;
179 }
177 } 180 }
178 181
179 tlb_init_slave(slave); 182 tlb_init_slave(slave);
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index f2da031fd7ba..fd9028d7c06e 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1978,6 +1978,20 @@ void bond_destroy(struct bonding *bond)
1978 unregister_netdevice(bond->dev); 1978 unregister_netdevice(bond->dev);
1979} 1979}
1980 1980
1981static void bond_destructor(struct net_device *bond_dev)
1982{
1983 struct bonding *bond = bond_dev->priv;
1984
1985 if (bond->wq)
1986 destroy_workqueue(bond->wq);
1987
1988 netif_addr_lock_bh(bond_dev);
1989 bond_mc_list_destroy(bond);
1990 netif_addr_unlock_bh(bond_dev);
1991
1992 free_netdev(bond_dev);
1993}
1994
1981/* 1995/*
1982* First release a slave and than destroy the bond if no more slaves iare left. 1996* First release a slave and than destroy the bond if no more slaves iare left.
1983* Must be under rtnl_lock when this function is called. 1997* Must be under rtnl_lock when this function is called.
@@ -2375,6 +2389,9 @@ static void bond_miimon_commit(struct bonding *bond)
2375 continue; 2389 continue;
2376 2390
2377 case BOND_LINK_DOWN: 2391 case BOND_LINK_DOWN:
2392 if (slave->link_failure_count < UINT_MAX)
2393 slave->link_failure_count++;
2394
2378 slave->link = BOND_LINK_DOWN; 2395 slave->link = BOND_LINK_DOWN;
2379 2396
2380 if (bond->params.mode == BOND_MODE_ACTIVEBACKUP || 2397 if (bond->params.mode == BOND_MODE_ACTIVEBACKUP ||
@@ -4543,7 +4560,7 @@ static int bond_init(struct net_device *bond_dev, struct bond_params *params)
4543 4560
4544 bond_set_mode_ops(bond, bond->params.mode); 4561 bond_set_mode_ops(bond, bond->params.mode);
4545 4562
4546 bond_dev->destructor = free_netdev; 4563 bond_dev->destructor = bond_destructor;
4547 4564
4548 /* Initialize the device options */ 4565 /* Initialize the device options */
4549 bond_dev->tx_queue_len = 0; 4566 bond_dev->tx_queue_len = 0;
@@ -4582,20 +4599,6 @@ static int bond_init(struct net_device *bond_dev, struct bond_params *params)
4582 return 0; 4599 return 0;
4583} 4600}
4584 4601
4585/* De-initialize device specific data.
4586 * Caller must hold rtnl_lock.
4587 */
4588static void bond_deinit(struct net_device *bond_dev)
4589{
4590 struct bonding *bond = bond_dev->priv;
4591
4592 list_del(&bond->bond_list);
4593
4594#ifdef CONFIG_PROC_FS
4595 bond_remove_proc_entry(bond);
4596#endif
4597}
4598
4599static void bond_work_cancel_all(struct bonding *bond) 4602static void bond_work_cancel_all(struct bonding *bond)
4600{ 4603{
4601 write_lock_bh(&bond->lock); 4604 write_lock_bh(&bond->lock);
@@ -4617,6 +4620,22 @@ static void bond_work_cancel_all(struct bonding *bond)
4617 cancel_delayed_work(&bond->ad_work); 4620 cancel_delayed_work(&bond->ad_work);
4618} 4621}
4619 4622
4623/* De-initialize device specific data.
4624 * Caller must hold rtnl_lock.
4625 */
4626static void bond_deinit(struct net_device *bond_dev)
4627{
4628 struct bonding *bond = bond_dev->priv;
4629
4630 list_del(&bond->bond_list);
4631
4632 bond_work_cancel_all(bond);
4633
4634#ifdef CONFIG_PROC_FS
4635 bond_remove_proc_entry(bond);
4636#endif
4637}
4638
4620/* Unregister and free all bond devices. 4639/* Unregister and free all bond devices.
4621 * Caller must hold rtnl_lock. 4640 * Caller must hold rtnl_lock.
4622 */ 4641 */
@@ -4628,9 +4647,6 @@ static void bond_free_all(void)
4628 struct net_device *bond_dev = bond->dev; 4647 struct net_device *bond_dev = bond->dev;
4629 4648
4630 bond_work_cancel_all(bond); 4649 bond_work_cancel_all(bond);
4631 netif_addr_lock_bh(bond_dev);
4632 bond_mc_list_destroy(bond);
4633 netif_addr_unlock_bh(bond_dev);
4634 /* Release the bonded slaves */ 4650 /* Release the bonded slaves */
4635 bond_release_all(bond_dev); 4651 bond_release_all(bond_dev);
4636 bond_destroy(bond); 4652 bond_destroy(bond);
diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h
index 82dd1a891ce7..002d918fb4c7 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_0094" 43#define DRV_VERSION "EHEA_0095"
44 44
45/* eHEA capability flags */ 45/* eHEA capability flags */
46#define DLPAR_PORT_ADD_REM 1 46#define DLPAR_PORT_ADD_REM 1
diff --git a/drivers/net/ehea/ehea_qmr.c b/drivers/net/ehea/ehea_qmr.c
index 9b61dc9865d1..9d006878f045 100644
--- a/drivers/net/ehea/ehea_qmr.c
+++ b/drivers/net/ehea/ehea_qmr.c
@@ -632,10 +632,13 @@ static void ehea_rebuild_busmap(void)
632 } 632 }
633} 633}
634 634
635static int ehea_update_busmap(unsigned long pfn, unsigned long pgnum, int add) 635static int ehea_update_busmap(unsigned long pfn, unsigned long nr_pages, int add)
636{ 636{
637 unsigned long i, start_section, end_section; 637 unsigned long i, start_section, end_section;
638 638
639 if (!nr_pages)
640 return 0;
641
639 if (!ehea_bmap) { 642 if (!ehea_bmap) {
640 ehea_bmap = kzalloc(sizeof(struct ehea_bmap), GFP_KERNEL); 643 ehea_bmap = kzalloc(sizeof(struct ehea_bmap), GFP_KERNEL);
641 if (!ehea_bmap) 644 if (!ehea_bmap)
@@ -643,7 +646,7 @@ static int ehea_update_busmap(unsigned long pfn, unsigned long pgnum, int add)
643 } 646 }
644 647
645 start_section = (pfn * PAGE_SIZE) / EHEA_SECTSIZE; 648 start_section = (pfn * PAGE_SIZE) / EHEA_SECTSIZE;
646 end_section = start_section + ((pgnum * PAGE_SIZE) / EHEA_SECTSIZE); 649 end_section = start_section + ((nr_pages * PAGE_SIZE) / EHEA_SECTSIZE);
647 /* Mark entries as valid or invalid only; address is assigned later */ 650 /* Mark entries as valid or invalid only; address is assigned later */
648 for (i = start_section; i < end_section; i++) { 651 for (i = start_section; i < end_section; i++) {
649 u64 flag; 652 u64 flag;
@@ -692,10 +695,54 @@ int ehea_rem_sect_bmap(unsigned long pfn, unsigned long nr_pages)
692 return ret; 695 return ret;
693} 696}
694 697
695static int ehea_create_busmap_callback(unsigned long pfn, 698static int ehea_is_hugepage(unsigned long pfn)
696 unsigned long nr_pages, void *arg) 699{
700 int page_order;
701
702 if (pfn & EHEA_HUGEPAGE_PFN_MASK)
703 return 0;
704
705 page_order = compound_order(pfn_to_page(pfn));
706 if (page_order + PAGE_SHIFT != EHEA_HUGEPAGESHIFT)
707 return 0;
708
709 return 1;
710}
711
712static int ehea_create_busmap_callback(unsigned long initial_pfn,
713 unsigned long total_nr_pages, void *arg)
697{ 714{
698 return ehea_update_busmap(pfn, nr_pages, EHEA_BUSMAP_ADD_SECT); 715 int ret;
716 unsigned long pfn, start_pfn, end_pfn, nr_pages;
717
718 if ((total_nr_pages * PAGE_SIZE) < EHEA_HUGEPAGE_SIZE)
719 return ehea_update_busmap(initial_pfn, total_nr_pages,
720 EHEA_BUSMAP_ADD_SECT);
721
722 /* Given chunk is >= 16GB -> check for hugepages */
723 start_pfn = initial_pfn;
724 end_pfn = initial_pfn + total_nr_pages;
725 pfn = start_pfn;
726
727 while (pfn < end_pfn) {
728 if (ehea_is_hugepage(pfn)) {
729 /* Add mem found in front of the hugepage */
730 nr_pages = pfn - start_pfn;
731 ret = ehea_update_busmap(start_pfn, nr_pages,
732 EHEA_BUSMAP_ADD_SECT);
733 if (ret)
734 return ret;
735
736 /* Skip the hugepage */
737 pfn += (EHEA_HUGEPAGE_SIZE / PAGE_SIZE);
738 start_pfn = pfn;
739 } else
740 pfn += (EHEA_SECTSIZE / PAGE_SIZE);
741 }
742
743 /* Add mem found behind the hugepage(s) */
744 nr_pages = pfn - start_pfn;
745 return ehea_update_busmap(start_pfn, nr_pages, EHEA_BUSMAP_ADD_SECT);
699} 746}
700 747
701int ehea_create_busmap(void) 748int ehea_create_busmap(void)
diff --git a/drivers/net/ehea/ehea_qmr.h b/drivers/net/ehea/ehea_qmr.h
index 1e58dc06b7d2..0817c1e74a19 100644
--- a/drivers/net/ehea/ehea_qmr.h
+++ b/drivers/net/ehea/ehea_qmr.h
@@ -40,6 +40,9 @@
40#define EHEA_PAGESIZE (1UL << EHEA_PAGESHIFT) 40#define EHEA_PAGESIZE (1UL << EHEA_PAGESHIFT)
41#define EHEA_SECTSIZE (1UL << 24) 41#define EHEA_SECTSIZE (1UL << 24)
42#define EHEA_PAGES_PER_SECTION (EHEA_SECTSIZE >> EHEA_PAGESHIFT) 42#define EHEA_PAGES_PER_SECTION (EHEA_SECTSIZE >> EHEA_PAGESHIFT)
43#define EHEA_HUGEPAGESHIFT 34
44#define EHEA_HUGEPAGE_SIZE (1UL << EHEA_HUGEPAGESHIFT)
45#define EHEA_HUGEPAGE_PFN_MASK ((EHEA_HUGEPAGE_SIZE - 1) >> PAGE_SHIFT)
43 46
44#if ((1UL << SECTION_SIZE_BITS) < EHEA_SECTSIZE) 47#if ((1UL << SECTION_SIZE_BITS) < EHEA_SECTSIZE)
45#error eHEA module cannot work if kernel sectionsize < ehea sectionsize 48#error eHEA module cannot work if kernel sectionsize < ehea sectionsize
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 15c422387028..013525f3c3bd 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -584,6 +584,18 @@ static void gfar_configure_serdes(struct net_device *dev)
584 struct gfar_mii __iomem *regs = 584 struct gfar_mii __iomem *regs =
585 (void __iomem *)&priv->regs->gfar_mii_regs; 585 (void __iomem *)&priv->regs->gfar_mii_regs;
586 int tbipa = gfar_read(&priv->regs->tbipa); 586 int tbipa = gfar_read(&priv->regs->tbipa);
587 struct mii_bus *bus = gfar_get_miibus(priv);
588
589 if (bus)
590 mutex_lock(&bus->mdio_lock);
591
592 /* If the link is already up, we must already be ok, and don't need to
593 * configure and reset the TBI<->SerDes link. Maybe U-Boot configured
594 * everything for us? Resetting it takes the link down and requires
595 * several seconds for it to come back.
596 */
597 if (gfar_local_mdio_read(regs, tbipa, MII_BMSR) & BMSR_LSTATUS)
598 goto done;
587 599
588 /* Single clk mode, mii mode off(for serdes communication) */ 600 /* Single clk mode, mii mode off(for serdes communication) */
589 gfar_local_mdio_write(regs, tbipa, MII_TBICON, TBICON_CLK_SELECT); 601 gfar_local_mdio_write(regs, tbipa, MII_TBICON, TBICON_CLK_SELECT);
@@ -594,6 +606,10 @@ static void gfar_configure_serdes(struct net_device *dev)
594 606
595 gfar_local_mdio_write(regs, tbipa, MII_BMCR, BMCR_ANENABLE | 607 gfar_local_mdio_write(regs, tbipa, MII_BMCR, BMCR_ANENABLE |
596 BMCR_ANRESTART | BMCR_FULLDPLX | BMCR_SPEED1000); 608 BMCR_ANRESTART | BMCR_FULLDPLX | BMCR_SPEED1000);
609
610 done:
611 if (bus)
612 mutex_unlock(&bus->mdio_lock);
597} 613}
598 614
599static void init_registers(struct net_device *dev) 615static void init_registers(struct net_device *dev)
diff --git a/drivers/net/gianfar_mii.c b/drivers/net/gianfar_mii.c
index bf73eea98010..0e2595d24933 100644
--- a/drivers/net/gianfar_mii.c
+++ b/drivers/net/gianfar_mii.c
@@ -269,6 +269,27 @@ static struct device_driver gianfar_mdio_driver = {
269 .remove = gfar_mdio_remove, 269 .remove = gfar_mdio_remove,
270}; 270};
271 271
272static int match_mdio_bus(struct device *dev, void *data)
273{
274 const struct gfar_private *priv = data;
275 const struct platform_device *pdev = to_platform_device(dev);
276
277 return !strcmp(pdev->name, gianfar_mdio_driver.name) &&
278 pdev->id == priv->einfo->mdio_bus;
279}
280
281/* Given a gfar_priv structure, find the mii_bus controlled by this device (not
282 * necessarily the same as the bus the gfar's PHY is on), if one exists.
283 * Normally only the first gianfar controls a mii_bus. */
284struct mii_bus *gfar_get_miibus(const struct gfar_private *priv)
285{
286 /*const*/ struct device *d;
287
288 d = bus_find_device(gianfar_mdio_driver.bus, NULL, (void *)priv,
289 match_mdio_bus);
290 return d ? dev_get_drvdata(d) : NULL;
291}
292
272int __init gfar_mdio_init(void) 293int __init gfar_mdio_init(void)
273{ 294{
274 return driver_register(&gianfar_mdio_driver); 295 return driver_register(&gianfar_mdio_driver);
diff --git a/drivers/net/gianfar_mii.h b/drivers/net/gianfar_mii.h
index 2af28b16a0e2..02dc970ca1ff 100644
--- a/drivers/net/gianfar_mii.h
+++ b/drivers/net/gianfar_mii.h
@@ -18,6 +18,8 @@
18#ifndef __GIANFAR_MII_H 18#ifndef __GIANFAR_MII_H
19#define __GIANFAR_MII_H 19#define __GIANFAR_MII_H
20 20
21struct gfar_private; /* forward ref */
22
21#define MIIMIND_BUSY 0x00000001 23#define MIIMIND_BUSY 0x00000001
22#define MIIMIND_NOTVALID 0x00000004 24#define MIIMIND_NOTVALID 0x00000004
23 25
@@ -44,6 +46,7 @@ int gfar_mdio_write(struct mii_bus *bus, int mii_id, int regnum, u16 value);
44int gfar_local_mdio_write(struct gfar_mii __iomem *regs, int mii_id, 46int gfar_local_mdio_write(struct gfar_mii __iomem *regs, int mii_id,
45 int regnum, u16 value); 47 int regnum, u16 value);
46int gfar_local_mdio_read(struct gfar_mii __iomem *regs, int mii_id, int regnum); 48int gfar_local_mdio_read(struct gfar_mii __iomem *regs, int mii_id, int regnum);
49struct mii_bus *gfar_get_miibus(const struct gfar_private *priv);
47int __init gfar_mdio_init(void); 50int __init gfar_mdio_init(void);
48void gfar_mdio_exit(void); 51void gfar_mdio_exit(void);
49#endif /* GIANFAR_PHY_H */ 52#endif /* GIANFAR_PHY_H */
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c
index 1232ef9fb9ef..87a706694fb3 100644
--- a/drivers/net/ibm_newemac/core.c
+++ b/drivers/net/ibm_newemac/core.c
@@ -2603,7 +2603,7 @@ static int __devinit emac_init_config(struct emac_instance *dev)
2603 of_device_is_compatible(np, "ibm,emac-440gr")) 2603 of_device_is_compatible(np, "ibm,emac-440gr"))
2604 dev->features |= EMAC_FTR_440EP_PHY_CLK_FIX; 2604 dev->features |= EMAC_FTR_440EP_PHY_CLK_FIX;
2605 if (of_device_is_compatible(np, "ibm,emac-405ez")) { 2605 if (of_device_is_compatible(np, "ibm,emac-405ez")) {
2606#ifdef CONFIG_IBM_NEW_EMAC_NO_FLOW_CONTROL 2606#ifdef CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL
2607 dev->features |= EMAC_FTR_NO_FLOW_CONTROL_40x; 2607 dev->features |= EMAC_FTR_NO_FLOW_CONTROL_40x;
2608#else 2608#else
2609 printk(KERN_ERR "%s: Flow control not disabled!\n", 2609 printk(KERN_ERR "%s: Flow control not disabled!\n",
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c
index 3b43bfd85a0f..b1ac63ab8c16 100644
--- a/drivers/net/loopback.c
+++ b/drivers/net/loopback.c
@@ -76,15 +76,6 @@ static int loopback_xmit(struct sk_buff *skb, struct net_device *dev)
76 76
77 skb->protocol = eth_type_trans(skb,dev); 77 skb->protocol = eth_type_trans(skb,dev);
78 78
79#ifdef LOOPBACK_TSO
80 if (skb_is_gso(skb)) {
81 BUG_ON(skb->protocol != htons(ETH_P_IP));
82 BUG_ON(ip_hdr(skb)->protocol != IPPROTO_TCP);
83
84 emulate_large_send_offload(skb);
85 return 0;
86 }
87#endif
88 dev->last_rx = jiffies; 79 dev->last_rx = jiffies;
89 80
90 /* it's OK to use per_cpu_ptr() because BHs are off */ 81 /* it's OK to use per_cpu_ptr() because BHs are off */
diff --git a/drivers/net/mlx4/en_main.c b/drivers/net/mlx4/en_main.c
index 1b0eebf84f76..4b9794e97a79 100644
--- a/drivers/net/mlx4/en_main.c
+++ b/drivers/net/mlx4/en_main.c
@@ -35,7 +35,6 @@
35#include <linux/module.h> 35#include <linux/module.h>
36#include <linux/delay.h> 36#include <linux/delay.h>
37#include <linux/netdevice.h> 37#include <linux/netdevice.h>
38#include <linux/cpumask.h>
39 38
40#include <linux/mlx4/driver.h> 39#include <linux/mlx4/driver.h>
41#include <linux/mlx4/device.h> 40#include <linux/mlx4/device.h>
diff --git a/drivers/net/mlx4/fw.c b/drivers/net/mlx4/fw.c
index be09fdb79cb8..cee199ceba2f 100644
--- a/drivers/net/mlx4/fw.c
+++ b/drivers/net/mlx4/fw.c
@@ -360,9 +360,9 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)
360#define QUERY_PORT_ETH_MTU_OFFSET 0x02 360#define QUERY_PORT_ETH_MTU_OFFSET 0x02
361#define QUERY_PORT_WIDTH_OFFSET 0x06 361#define QUERY_PORT_WIDTH_OFFSET 0x06
362#define QUERY_PORT_MAX_GID_PKEY_OFFSET 0x07 362#define QUERY_PORT_MAX_GID_PKEY_OFFSET 0x07
363#define QUERY_PORT_MAC_OFFSET 0x08
364#define QUERY_PORT_MAX_MACVLAN_OFFSET 0x0a 363#define QUERY_PORT_MAX_MACVLAN_OFFSET 0x0a
365#define QUERY_PORT_MAX_VL_OFFSET 0x0b 364#define QUERY_PORT_MAX_VL_OFFSET 0x0b
365#define QUERY_PORT_MAC_OFFSET 0x10
366 366
367 for (i = 1; i <= dev_cap->num_ports; ++i) { 367 for (i = 1; i <= dev_cap->num_ports; ++i) {
368 err = mlx4_cmd_box(dev, 0, mailbox->dma, i, 0, MLX4_CMD_QUERY_PORT, 368 err = mlx4_cmd_box(dev, 0, mailbox->dma, i, 0, MLX4_CMD_QUERY_PORT,
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index 22e6292212f7..d2cbc7d55b10 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -75,7 +75,7 @@
75#include "myri10ge_mcp.h" 75#include "myri10ge_mcp.h"
76#include "myri10ge_mcp_gen_header.h" 76#include "myri10ge_mcp_gen_header.h"
77 77
78#define MYRI10GE_VERSION_STR "1.4.3-1.371" 78#define MYRI10GE_VERSION_STR "1.4.3-1.375"
79 79
80MODULE_DESCRIPTION("Myricom 10G driver (10GbE)"); 80MODULE_DESCRIPTION("Myricom 10G driver (10GbE)");
81MODULE_AUTHOR("Maintainer: help@myri.com"); 81MODULE_AUTHOR("Maintainer: help@myri.com");
@@ -1393,6 +1393,7 @@ myri10ge_tx_done(struct myri10ge_slice_state *ss, int mcp_index)
1393 if (tx->req == tx->done) { 1393 if (tx->req == tx->done) {
1394 tx->queue_active = 0; 1394 tx->queue_active = 0;
1395 put_be32(htonl(1), tx->send_stop); 1395 put_be32(htonl(1), tx->send_stop);
1396 mmiowb();
1396 } 1397 }
1397 __netif_tx_unlock(dev_queue); 1398 __netif_tx_unlock(dev_queue);
1398 } 1399 }
@@ -2864,6 +2865,7 @@ again:
2864 if ((mgp->dev->real_num_tx_queues > 1) && tx->queue_active == 0) { 2865 if ((mgp->dev->real_num_tx_queues > 1) && tx->queue_active == 0) {
2865 tx->queue_active = 1; 2866 tx->queue_active = 1;
2866 put_be32(htonl(1), tx->send_go); 2867 put_be32(htonl(1), tx->send_go);
2868 mmiowb();
2867 } 2869 }
2868 tx->pkt_start++; 2870 tx->pkt_start++;
2869 if ((avail - count) < MXGEFW_MAX_SEND_DESC) { 2871 if ((avail - count) < MXGEFW_MAX_SEND_DESC) {
diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c
index ff8fe2332d3f..c22b30533a14 100644
--- a/drivers/net/pppoe.c
+++ b/drivers/net/pppoe.c
@@ -399,11 +399,11 @@ static int pppoe_rcv(struct sk_buff *skb,
399 if (skb->len < len) 399 if (skb->len < len)
400 goto drop; 400 goto drop;
401 401
402 po = get_item(ph->sid, eth_hdr(skb)->h_source, dev->ifindex); 402 if (pskb_trim_rcsum(skb, len))
403 if (!po)
404 goto drop; 403 goto drop;
405 404
406 if (pskb_trim_rcsum(skb, len)) 405 po = get_item(ph->sid, eth_hdr(skb)->h_source, dev->ifindex);
406 if (!po)
407 goto drop; 407 goto drop;
408 408
409 return sk_receive_skb(sk_pppox(po), skb, 0); 409 return sk_receive_skb(sk_pppox(po), skb, 0);
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c
index 37ff94bdbc83..2d8bfa7bd9e9 100644
--- a/drivers/net/smc91x.c
+++ b/drivers/net/smc91x.c
@@ -2059,7 +2059,6 @@ static int smc_request_attrib(struct platform_device *pdev,
2059 struct net_device *ndev) 2059 struct net_device *ndev)
2060{ 2060{
2061 struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib"); 2061 struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib");
2062 struct smc_local *lp = netdev_priv(ndev);
2063 2062
2064 if (!res) 2063 if (!res)
2065 return 0; 2064 return 0;
@@ -2074,7 +2073,6 @@ static void smc_release_attrib(struct platform_device *pdev,
2074 struct net_device *ndev) 2073 struct net_device *ndev)
2075{ 2074{
2076 struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib"); 2075 struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib");
2077 struct smc_local *lp = netdev_priv(ndev);
2078 2076
2079 if (res) 2077 if (res)
2080 release_mem_region(res->start, ATTRIB_SIZE); 2078 release_mem_region(res->start, ATTRIB_SIZE);
diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c
index 194f1825718a..0ec3281529f9 100644
--- a/drivers/net/tulip/dmfe.c
+++ b/drivers/net/tulip/dmfe.c
@@ -419,9 +419,13 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev,
419 /* Allocate Tx/Rx descriptor memory */ 419 /* Allocate Tx/Rx descriptor memory */
420 db->desc_pool_ptr = pci_alloc_consistent(pdev, sizeof(struct tx_desc) * 420 db->desc_pool_ptr = pci_alloc_consistent(pdev, sizeof(struct tx_desc) *
421 DESC_ALL_CNT + 0x20, &db->desc_pool_dma_ptr); 421 DESC_ALL_CNT + 0x20, &db->desc_pool_dma_ptr);
422 if (!db->desc_pool_ptr)
423 goto err_out_res;
422 424
423 db->buf_pool_ptr = pci_alloc_consistent(pdev, TX_BUF_ALLOC * 425 db->buf_pool_ptr = pci_alloc_consistent(pdev, TX_BUF_ALLOC *
424 TX_DESC_CNT + 4, &db->buf_pool_dma_ptr); 426 TX_DESC_CNT + 4, &db->buf_pool_dma_ptr);
427 if (!db->buf_pool_ptr)
428 goto err_out_free_desc;
425 429
426 db->first_tx_desc = (struct tx_desc *) db->desc_pool_ptr; 430 db->first_tx_desc = (struct tx_desc *) db->desc_pool_ptr;
427 db->first_tx_desc_dma = db->desc_pool_dma_ptr; 431 db->first_tx_desc_dma = db->desc_pool_dma_ptr;
@@ -468,7 +472,7 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev,
468 472
469 err = register_netdev (dev); 473 err = register_netdev (dev);
470 if (err) 474 if (err)
471 goto err_out_res; 475 goto err_out_free_buf;
472 476
473 printk(KERN_INFO "%s: Davicom DM%04lx at pci%s, %pM, irq %d.\n", 477 printk(KERN_INFO "%s: Davicom DM%04lx at pci%s, %pM, irq %d.\n",
474 dev->name, 478 dev->name,
@@ -481,6 +485,12 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev,
481 485
482 return 0; 486 return 0;
483 487
488err_out_free_buf:
489 pci_free_consistent(pdev, TX_BUF_ALLOC * TX_DESC_CNT + 4,
490 db->buf_pool_ptr, db->buf_pool_dma_ptr);
491err_out_free_desc:
492 pci_free_consistent(pdev, sizeof(struct tx_desc) * DESC_ALL_CNT + 0x20,
493 db->desc_pool_ptr, db->desc_pool_dma_ptr);
484err_out_res: 494err_out_res:
485 pci_release_regions(pdev); 495 pci_release_regions(pdev);
486err_out_disable: 496err_out_disable:
diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c
index 78df2be8a728..db3377dae9d5 100644
--- a/drivers/net/usb/dm9601.c
+++ b/drivers/net/usb/dm9601.c
@@ -396,6 +396,20 @@ static void dm9601_set_multicast(struct net_device *net)
396 dm_write_reg_async(dev, DM_RX_CTRL, rx_ctl); 396 dm_write_reg_async(dev, DM_RX_CTRL, rx_ctl);
397} 397}
398 398
399static int dm9601_set_mac_address(struct net_device *net, void *p)
400{
401 struct sockaddr *addr = p;
402 struct usbnet *dev = netdev_priv(net);
403
404 if (!is_valid_ether_addr(addr->sa_data))
405 return -EINVAL;
406
407 memcpy(net->dev_addr, addr->sa_data, net->addr_len);
408 dm_write_async(dev, DM_PHY_ADDR, net->addr_len, net->dev_addr);
409
410 return 0;
411}
412
399static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf) 413static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf)
400{ 414{
401 int ret; 415 int ret;
@@ -406,6 +420,7 @@ static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf)
406 420
407 dev->net->do_ioctl = dm9601_ioctl; 421 dev->net->do_ioctl = dm9601_ioctl;
408 dev->net->set_multicast_list = dm9601_set_multicast; 422 dev->net->set_multicast_list = dm9601_set_multicast;
423 dev->net->set_mac_address = dm9601_set_mac_address;
409 dev->net->ethtool_ops = &dm9601_ethtool_ops; 424 dev->net->ethtool_ops = &dm9601_ethtool_ops;
410 dev->net->hard_header_len += DM_TX_OVERHEAD; 425 dev->net->hard_header_len += DM_TX_OVERHEAD;
411 dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len; 426 dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len;
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
index 2dced383bcfb..3590ea5a902d 100644
--- a/drivers/net/via-velocity.c
+++ b/drivers/net/via-velocity.c
@@ -521,7 +521,7 @@ static void __devexit velocity_remove1(struct pci_dev *pdev)
521 * we don't duplicate code for each option. 521 * we don't duplicate code for each option.
522 */ 522 */
523 523
524static void __devinit velocity_set_int_opt(int *opt, int val, int min, int max, int def, char *name, char *devname) 524static void __devinit velocity_set_int_opt(int *opt, int val, int min, int max, int def, char *name, const char *devname)
525{ 525{
526 if (val == -1) 526 if (val == -1)
527 *opt = def; 527 *opt = def;
@@ -550,7 +550,7 @@ static void __devinit velocity_set_int_opt(int *opt, int val, int min, int max,
550 * we don't duplicate code for each option. 550 * we don't duplicate code for each option.
551 */ 551 */
552 552
553static void __devinit velocity_set_bool_opt(u32 * opt, int val, int def, u32 flag, char *name, char *devname) 553static void __devinit velocity_set_bool_opt(u32 * opt, int val, int def, u32 flag, char *name, const char *devname)
554{ 554{
555 (*opt) &= (~flag); 555 (*opt) &= (~flag);
556 if (val == -1) 556 if (val == -1)
@@ -576,7 +576,7 @@ static void __devinit velocity_set_bool_opt(u32 * opt, int val, int def, u32 fla
576 * for the current device 576 * for the current device
577 */ 577 */
578 578
579static void __devinit velocity_get_options(struct velocity_opt *opts, int index, char *devname) 579static void __devinit velocity_get_options(struct velocity_opt *opts, int index, const char *devname)
580{ 580{
581 581
582 velocity_set_int_opt(&opts->rx_thresh, rx_thresh[index], RX_THRESH_MIN, RX_THRESH_MAX, RX_THRESH_DEF, "rx_thresh", devname); 582 velocity_set_int_opt(&opts->rx_thresh, rx_thresh[index], RX_THRESH_MIN, RX_THRESH_MAX, RX_THRESH_DEF, "rx_thresh", devname);
@@ -863,6 +863,7 @@ static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi
863 static int first = 1; 863 static int first = 1;
864 struct net_device *dev; 864 struct net_device *dev;
865 int i; 865 int i;
866 const char *drv_string;
866 const struct velocity_info_tbl *info = &chip_info_table[ent->driver_data]; 867 const struct velocity_info_tbl *info = &chip_info_table[ent->driver_data];
867 struct velocity_info *vptr; 868 struct velocity_info *vptr;
868 struct mac_regs __iomem * regs; 869 struct mac_regs __iomem * regs;
@@ -935,7 +936,9 @@ static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi
935 dev->dev_addr[i] = readb(&regs->PAR[i]); 936 dev->dev_addr[i] = readb(&regs->PAR[i]);
936 937
937 938
938 velocity_get_options(&vptr->options, velocity_nics, dev->name); 939 drv_string = dev_driver_string(&pdev->dev);
940
941 velocity_get_options(&vptr->options, velocity_nics, drv_string);
939 942
940 /* 943 /*
941 * Mask out the options cannot be set to the chip 944 * Mask out the options cannot be set to the chip
diff --git a/drivers/net/wan/syncppp.c b/drivers/net/wan/syncppp.c
index 327d58589e12..6e92f7b44b1a 100644
--- a/drivers/net/wan/syncppp.c
+++ b/drivers/net/wan/syncppp.c
@@ -756,10 +756,11 @@ static void sppp_cisco_input (struct sppp *sp, struct sk_buff *skb)
756 case CISCO_ADDR_REQ: 756 case CISCO_ADDR_REQ:
757 /* Stolen from net/ipv4/devinet.c -- SIOCGIFADDR ioctl */ 757 /* Stolen from net/ipv4/devinet.c -- SIOCGIFADDR ioctl */
758 { 758 {
759 struct in_device *in_dev;
760 struct in_ifaddr *ifa;
761 __be32 addr = 0, mask = htonl(~0U); /* FIXME: is the mask correct? */ 759 __be32 addr = 0, mask = htonl(~0U); /* FIXME: is the mask correct? */
762#ifdef CONFIG_INET 760#ifdef CONFIG_INET
761 struct in_device *in_dev;
762 struct in_ifaddr *ifa;
763
763 rcu_read_lock(); 764 rcu_read_lock();
764 if ((in_dev = __in_dev_get_rcu(dev)) != NULL) 765 if ((in_dev = __in_dev_get_rcu(dev)) != NULL)
765 { 766 {
diff --git a/drivers/net/wan/z85230.c b/drivers/net/wan/z85230.c
index ccd9cd35ecbe..5bf7e01ef0e9 100644
--- a/drivers/net/wan/z85230.c
+++ b/drivers/net/wan/z85230.c
@@ -695,7 +695,6 @@ EXPORT_SYMBOL(z8530_nop);
695 * z8530_interrupt - Handle an interrupt from a Z8530 695 * z8530_interrupt - Handle an interrupt from a Z8530
696 * @irq: Interrupt number 696 * @irq: Interrupt number
697 * @dev_id: The Z8530 device that is interrupting. 697 * @dev_id: The Z8530 device that is interrupting.
698 * @regs: unused
699 * 698 *
700 * A Z85[2]30 device has stuck its hand in the air for attention. 699 * A Z85[2]30 device has stuck its hand in the air for attention.
701 * We scan both the channels on the chip for events and then call 700 * We scan both the channels on the chip for events and then call
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
index 0f1d6bdd51a2..9e47d727e220 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -661,8 +661,7 @@ ath5k_pci_resume(struct pci_dev *pdev)
661{ 661{
662 struct ieee80211_hw *hw = pci_get_drvdata(pdev); 662 struct ieee80211_hw *hw = pci_get_drvdata(pdev);
663 struct ath5k_softc *sc = hw->priv; 663 struct ath5k_softc *sc = hw->priv;
664 struct ath5k_hw *ah = sc->ah; 664 int err;
665 int i, err;
666 665
667 pci_restore_state(pdev); 666 pci_restore_state(pdev);
668 667
@@ -688,16 +687,6 @@ ath5k_pci_resume(struct pci_dev *pdev)
688 goto err_irq; 687 goto err_irq;
689 ath5k_led_enable(sc); 688 ath5k_led_enable(sc);
690 689
691 /*
692 * Reset the key cache since some parts do not
693 * reset the contents on initial power up or resume.
694 *
695 * FIXME: This may need to be revisited when mac80211 becomes
696 * aware of suspend/resume.
697 */
698 for (i = 0; i < AR5K_KEYTABLE_SIZE; i++)
699 ath5k_hw_reset_key(ah, i);
700
701 return 0; 690 return 0;
702err_irq: 691err_irq:
703 free_irq(pdev->irq, sc); 692 free_irq(pdev->irq, sc);
@@ -718,7 +707,6 @@ ath5k_attach(struct pci_dev *pdev, struct ieee80211_hw *hw)
718 struct ath5k_softc *sc = hw->priv; 707 struct ath5k_softc *sc = hw->priv;
719 struct ath5k_hw *ah = sc->ah; 708 struct ath5k_hw *ah = sc->ah;
720 u8 mac[ETH_ALEN]; 709 u8 mac[ETH_ALEN];
721 unsigned int i;
722 int ret; 710 int ret;
723 711
724 ATH5K_DBG(sc, ATH5K_DEBUG_ANY, "devid 0x%x\n", pdev->device); 712 ATH5K_DBG(sc, ATH5K_DEBUG_ANY, "devid 0x%x\n", pdev->device);
@@ -737,13 +725,6 @@ ath5k_attach(struct pci_dev *pdev, struct ieee80211_hw *hw)
737 __set_bit(ATH_STAT_MRRETRY, sc->status); 725 __set_bit(ATH_STAT_MRRETRY, sc->status);
738 726
739 /* 727 /*
740 * Reset the key cache since some parts do not
741 * reset the contents on initial power up.
742 */
743 for (i = 0; i < AR5K_KEYTABLE_SIZE; i++)
744 ath5k_hw_reset_key(ah, i);
745
746 /*
747 * Collect the channel list. The 802.11 layer 728 * Collect the channel list. The 802.11 layer
748 * is resposible for filtering this list based 729 * is resposible for filtering this list based
749 * on settings like the phy mode and regulatory 730 * on settings like the phy mode and regulatory
@@ -2202,7 +2183,8 @@ ath5k_beacon_config(struct ath5k_softc *sc)
2202static int 2183static int
2203ath5k_init(struct ath5k_softc *sc, bool is_resume) 2184ath5k_init(struct ath5k_softc *sc, bool is_resume)
2204{ 2185{
2205 int ret; 2186 struct ath5k_hw *ah = sc->ah;
2187 int ret, i;
2206 2188
2207 mutex_lock(&sc->lock); 2189 mutex_lock(&sc->lock);
2208 2190
@@ -2235,10 +2217,17 @@ ath5k_init(struct ath5k_softc *sc, bool is_resume)
2235 if (ret) 2217 if (ret)
2236 goto done; 2218 goto done;
2237 2219
2220 /*
2221 * Reset the key cache since some parts do not reset the
2222 * contents on initial power up or resume from suspend.
2223 */
2224 for (i = 0; i < AR5K_KEYTABLE_SIZE; i++)
2225 ath5k_hw_reset_key(ah, i);
2226
2238 __set_bit(ATH_STAT_STARTED, sc->status); 2227 __set_bit(ATH_STAT_STARTED, sc->status);
2239 2228
2240 /* Set ack to be sent at low bit-rates */ 2229 /* Set ack to be sent at low bit-rates */
2241 ath5k_hw_set_ack_bitrate_high(sc->ah, false); 2230 ath5k_hw_set_ack_bitrate_high(ah, false);
2242 2231
2243 mod_timer(&sc->calib_tim, round_jiffies(jiffies + 2232 mod_timer(&sc->calib_tim, round_jiffies(jiffies +
2244 msecs_to_jiffies(ath5k_calinterval * 1000))); 2233 msecs_to_jiffies(ath5k_calinterval * 1000)));
@@ -2953,10 +2942,8 @@ static void ath5k_configure_filter(struct ieee80211_hw *hw,
2953 sc->opmode != NL80211_IFTYPE_MESH_POINT && 2942 sc->opmode != NL80211_IFTYPE_MESH_POINT &&
2954 test_bit(ATH_STAT_PROMISC, sc->status)) 2943 test_bit(ATH_STAT_PROMISC, sc->status))
2955 rfilt |= AR5K_RX_FILTER_PROM; 2944 rfilt |= AR5K_RX_FILTER_PROM;
2956 if (sc->opmode == NL80211_IFTYPE_STATION || 2945 if (sc->opmode == NL80211_IFTYPE_ADHOC)
2957 sc->opmode == NL80211_IFTYPE_ADHOC) {
2958 rfilt |= AR5K_RX_FILTER_BEACON; 2946 rfilt |= AR5K_RX_FILTER_BEACON;
2959 }
2960 2947
2961 /* Set filters */ 2948 /* Set filters */
2962 ath5k_hw_set_rx_filter(ah,rfilt); 2949 ath5k_hw_set_rx_filter(ah,rfilt);
diff --git a/drivers/net/wireless/ath5k/debug.c b/drivers/net/wireless/ath5k/debug.c
index 8f92d670f614..19980cbd5d5f 100644
--- a/drivers/net/wireless/ath5k/debug.c
+++ b/drivers/net/wireless/ath5k/debug.c
@@ -339,7 +339,7 @@ static struct {
339 { ATH5K_DEBUG_BEACON, "beacon", "beacon handling" }, 339 { ATH5K_DEBUG_BEACON, "beacon", "beacon handling" },
340 { ATH5K_DEBUG_CALIBRATE, "calib", "periodic calibration" }, 340 { ATH5K_DEBUG_CALIBRATE, "calib", "periodic calibration" },
341 { ATH5K_DEBUG_TXPOWER, "txpower", "transmit power setting" }, 341 { ATH5K_DEBUG_TXPOWER, "txpower", "transmit power setting" },
342 { ATH5K_DEBUG_LED, "led", "LED mamagement" }, 342 { ATH5K_DEBUG_LED, "led", "LED management" },
343 { ATH5K_DEBUG_DUMP_RX, "dumprx", "print received skb content" }, 343 { ATH5K_DEBUG_DUMP_RX, "dumprx", "print received skb content" },
344 { ATH5K_DEBUG_DUMP_TX, "dumptx", "print transmit skb content" }, 344 { ATH5K_DEBUG_DUMP_TX, "dumptx", "print transmit skb content" },
345 { ATH5K_DEBUG_DUMPBANDS, "dumpbands", "dump bands" }, 345 { ATH5K_DEBUG_DUMPBANDS, "dumpbands", "dump bands" },
diff --git a/drivers/net/wireless/ath5k/initvals.c b/drivers/net/wireless/ath5k/initvals.c
index ea2e1a20b499..ceaa6c475c06 100644
--- a/drivers/net/wireless/ath5k/initvals.c
+++ b/drivers/net/wireless/ath5k/initvals.c
@@ -806,6 +806,8 @@ static const struct ath5k_ini_mode ar5212_rf5111_ini_mode_end[] = {
806 { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } }, 806 { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
807 { AR5K_PHY(642), 807 { AR5K_PHY(642),
808 { 0xd03e6788, 0xd03e6788, 0xd03e6788, 0xd03e6788, 0xd03e6788 } }, 808 { 0xd03e6788, 0xd03e6788, 0xd03e6788, 0xd03e6788, 0xd03e6788 } },
809 { 0xa228,
810 { 0x000001b5, 0x000001b5, 0x000001b5, 0x000001b5, 0x000001b5 } },
809 { 0xa23c, 811 { 0xa23c,
810 { 0x13c889af, 0x13c889af, 0x13c889af, 0x13c889af, 0x13c889af } }, 812 { 0x13c889af, 0x13c889af, 0x13c889af, 0x13c889af, 0x13c889af } },
811}; 813};
diff --git a/drivers/net/wireless/ath5k/reset.c b/drivers/net/wireless/ath5k/reset.c
index 8f1886834e61..1b6d45b6772d 100644
--- a/drivers/net/wireless/ath5k/reset.c
+++ b/drivers/net/wireless/ath5k/reset.c
@@ -537,9 +537,10 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,
537 mdelay(1); 537 mdelay(1);
538 538
539 /* 539 /*
540 * Write some more initial register settings 540 * Write some more initial register settings for revised chips
541 */ 541 */
542 if (ah->ah_version == AR5K_AR5212) { 542 if (ah->ah_version == AR5K_AR5212 &&
543 ah->ah_phy_revision > 0x41) {
543 ath5k_hw_reg_write(ah, 0x0002a002, 0x982c); 544 ath5k_hw_reg_write(ah, 0x0002a002, 0x982c);
544 545
545 if (channel->hw_value == CHANNEL_G) 546 if (channel->hw_value == CHANNEL_G)
@@ -558,19 +559,10 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,
558 else 559 else
559 ath5k_hw_reg_write(ah, 0x00000000, 0x994c); 560 ath5k_hw_reg_write(ah, 0x00000000, 0x994c);
560 561
561 /* Some bits are disabled here, we know nothing about 562 /* Got this from legacy-hal */
562 * register 0xa228 yet, most of the times this ends up 563 AR5K_REG_DISABLE_BITS(ah, 0xa228, 0x200);
563 * with a value 0x9b5 -haven't seen any dump with 564
564 * a different value- */ 565 AR5K_REG_MASKED_BITS(ah, 0xa228, 0x800, 0xfffe03ff);
565 /* Got this from decompiling binary HAL */
566 data = ath5k_hw_reg_read(ah, 0xa228);
567 data &= 0xfffffdff;
568 ath5k_hw_reg_write(ah, data, 0xa228);
569
570 data = ath5k_hw_reg_read(ah, 0xa228);
571 data &= 0xfffe03ff;
572 ath5k_hw_reg_write(ah, data, 0xa228);
573 data = 0;
574 566
575 /* Just write 0x9b5 ? */ 567 /* Just write 0x9b5 ? */
576 /* ath5k_hw_reg_write(ah, 0x000009b5, 0xa228); */ 568 /* ath5k_hw_reg_write(ah, 0x000009b5, 0xa228); */
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 2af9a14446e4..fe9307424a91 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2086,7 +2086,6 @@ static void iwl_alive_start(struct iwl_priv *priv)
2086 iwl4965_error_recovery(priv); 2086 iwl4965_error_recovery(priv);
2087 2087
2088 iwl_power_update_mode(priv, 1); 2088 iwl_power_update_mode(priv, 1);
2089 ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC);
2090 2089
2091 if (test_and_clear_bit(STATUS_MODE_PENDING, &priv->status)) 2090 if (test_and_clear_bit(STATUS_MODE_PENDING, &priv->status))
2092 iwl4965_set_mode(priv, priv->iw_mode); 2091 iwl4965_set_mode(priv, priv->iw_mode);
@@ -2338,6 +2337,7 @@ static void iwl_bg_alive_start(struct work_struct *data)
2338 mutex_lock(&priv->mutex); 2337 mutex_lock(&priv->mutex);
2339 iwl_alive_start(priv); 2338 iwl_alive_start(priv);
2340 mutex_unlock(&priv->mutex); 2339 mutex_unlock(&priv->mutex);
2340 ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC);
2341} 2341}
2342 2342
2343static void iwl4965_bg_rf_kill(struct work_struct *work) 2343static void iwl4965_bg_rf_kill(struct work_struct *work)
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index 8542d85f36af..d45b07cf6a62 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -604,9 +604,9 @@ int lbs_get_tx_power(struct lbs_private *priv, s16 *curlevel, s16 *minlevel,
604 if (ret == 0) { 604 if (ret == 0) {
605 *curlevel = le16_to_cpu(cmd.curlevel); 605 *curlevel = le16_to_cpu(cmd.curlevel);
606 if (minlevel) 606 if (minlevel)
607 *minlevel = le16_to_cpu(cmd.minlevel); 607 *minlevel = cmd.minlevel;
608 if (maxlevel) 608 if (maxlevel)
609 *maxlevel = le16_to_cpu(cmd.maxlevel); 609 *maxlevel = cmd.maxlevel;
610 } 610 }
611 611
612 lbs_deb_leave(LBS_DEB_CMD); 612 lbs_deb_leave(LBS_DEB_CMD);
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c
index fcaef38d5df9..351b3f6e5664 100644
--- a/drivers/net/wireless/libertas/scan.c
+++ b/drivers/net/wireless/libertas/scan.c
@@ -596,8 +596,8 @@ static int lbs_process_bss(struct bss_descriptor *bss,
596 596
597 switch (elem->id) { 597 switch (elem->id) {
598 case MFIE_TYPE_SSID: 598 case MFIE_TYPE_SSID:
599 bss->ssid_len = elem->len; 599 bss->ssid_len = min_t(int, 32, elem->len);
600 memcpy(bss->ssid, elem->data, elem->len); 600 memcpy(bss->ssid, elem->data, bss->ssid_len);
601 lbs_deb_scan("got SSID IE: '%s', len %u\n", 601 lbs_deb_scan("got SSID IE: '%s', len %u\n",
602 escape_essid(bss->ssid, bss->ssid_len), 602 escape_essid(bss->ssid, bss->ssid_len),
603 bss->ssid_len); 603 bss->ssid_len);
diff --git a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c
index 72859decd907..6370c44c64d5 100644
--- a/drivers/net/wireless/p54/p54common.c
+++ b/drivers/net/wireless/p54/p54common.c
@@ -319,7 +319,7 @@ static int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len)
319 void *tmp; 319 void *tmp;
320 int err; 320 int err;
321 u8 *end = (u8 *)eeprom + len; 321 u8 *end = (u8 *)eeprom + len;
322 u16 synth; 322 u16 synth = 0;
323 323
324 wrap = (struct eeprom_pda_wrap *) eeprom; 324 wrap = (struct eeprom_pda_wrap *) eeprom;
325 entry = (void *)wrap->data + le16_to_cpu(wrap->len); 325 entry = (void *)wrap->data + le16_to_cpu(wrap->len);
@@ -421,7 +421,8 @@ static int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len)
421 entry = (void *)entry + (entry_len + 1)*2; 421 entry = (void *)entry + (entry_len + 1)*2;
422 } 422 }
423 423
424 if (!priv->iq_autocal || !priv->output_limit || !priv->curve_data) { 424 if (!synth || !priv->iq_autocal || !priv->output_limit ||
425 !priv->curve_data) {
425 printk(KERN_ERR "p54: not all required entries found in eeprom!\n"); 426 printk(KERN_ERR "p54: not all required entries found in eeprom!\n");
426 err = -EINVAL; 427 err = -EINVAL;
427 goto err; 428 goto err;
diff --git a/drivers/net/wireless/p54/p54pci.c b/drivers/net/wireless/p54/p54pci.c
index 194237b66424..bba2c90e533f 100644
--- a/drivers/net/wireless/p54/p54pci.c
+++ b/drivers/net/wireless/p54/p54pci.c
@@ -346,68 +346,6 @@ static void p54p_tx(struct ieee80211_hw *dev, struct p54_control_hdr *data,
346 printk(KERN_INFO "%s: tx overflow.\n", wiphy_name(dev->wiphy)); 346 printk(KERN_INFO "%s: tx overflow.\n", wiphy_name(dev->wiphy));
347} 347}
348 348
349static int p54p_open(struct ieee80211_hw *dev)
350{
351 struct p54p_priv *priv = dev->priv;
352 int err;
353
354 init_completion(&priv->boot_comp);
355 err = request_irq(priv->pdev->irq, &p54p_interrupt,
356 IRQF_SHARED, "p54pci", dev);
357 if (err) {
358 printk(KERN_ERR "%s: failed to register IRQ handler\n",
359 wiphy_name(dev->wiphy));
360 return err;
361 }
362
363 memset(priv->ring_control, 0, sizeof(*priv->ring_control));
364 err = p54p_upload_firmware(dev);
365 if (err) {
366 free_irq(priv->pdev->irq, dev);
367 return err;
368 }
369 priv->rx_idx_data = priv->tx_idx_data = 0;
370 priv->rx_idx_mgmt = priv->tx_idx_mgmt = 0;
371
372 p54p_refill_rx_ring(dev, 0, priv->ring_control->rx_data,
373 ARRAY_SIZE(priv->ring_control->rx_data), priv->rx_buf_data);
374
375 p54p_refill_rx_ring(dev, 2, priv->ring_control->rx_mgmt,
376 ARRAY_SIZE(priv->ring_control->rx_mgmt), priv->rx_buf_mgmt);
377
378 P54P_WRITE(ring_control_base, cpu_to_le32(priv->ring_control_dma));
379 P54P_READ(ring_control_base);
380 wmb();
381 udelay(10);
382
383 P54P_WRITE(int_enable, cpu_to_le32(ISL38XX_INT_IDENT_INIT));
384 P54P_READ(int_enable);
385 wmb();
386 udelay(10);
387
388 P54P_WRITE(dev_int, cpu_to_le32(ISL38XX_DEV_INT_RESET));
389 P54P_READ(dev_int);
390
391 if (!wait_for_completion_interruptible_timeout(&priv->boot_comp, HZ)) {
392 printk(KERN_ERR "%s: Cannot boot firmware!\n",
393 wiphy_name(dev->wiphy));
394 free_irq(priv->pdev->irq, dev);
395 return -ETIMEDOUT;
396 }
397
398 P54P_WRITE(int_enable, cpu_to_le32(ISL38XX_INT_IDENT_UPDATE));
399 P54P_READ(int_enable);
400 wmb();
401 udelay(10);
402
403 P54P_WRITE(dev_int, cpu_to_le32(ISL38XX_DEV_INT_UPDATE));
404 P54P_READ(dev_int);
405 wmb();
406 udelay(10);
407
408 return 0;
409}
410
411static void p54p_stop(struct ieee80211_hw *dev) 349static void p54p_stop(struct ieee80211_hw *dev)
412{ 350{
413 struct p54p_priv *priv = dev->priv; 351 struct p54p_priv *priv = dev->priv;
@@ -474,6 +412,68 @@ static void p54p_stop(struct ieee80211_hw *dev)
474 memset(ring_control, 0, sizeof(*ring_control)); 412 memset(ring_control, 0, sizeof(*ring_control));
475} 413}
476 414
415static int p54p_open(struct ieee80211_hw *dev)
416{
417 struct p54p_priv *priv = dev->priv;
418 int err;
419
420 init_completion(&priv->boot_comp);
421 err = request_irq(priv->pdev->irq, &p54p_interrupt,
422 IRQF_SHARED, "p54pci", dev);
423 if (err) {
424 printk(KERN_ERR "%s: failed to register IRQ handler\n",
425 wiphy_name(dev->wiphy));
426 return err;
427 }
428
429 memset(priv->ring_control, 0, sizeof(*priv->ring_control));
430 err = p54p_upload_firmware(dev);
431 if (err) {
432 free_irq(priv->pdev->irq, dev);
433 return err;
434 }
435 priv->rx_idx_data = priv->tx_idx_data = 0;
436 priv->rx_idx_mgmt = priv->tx_idx_mgmt = 0;
437
438 p54p_refill_rx_ring(dev, 0, priv->ring_control->rx_data,
439 ARRAY_SIZE(priv->ring_control->rx_data), priv->rx_buf_data);
440
441 p54p_refill_rx_ring(dev, 2, priv->ring_control->rx_mgmt,
442 ARRAY_SIZE(priv->ring_control->rx_mgmt), priv->rx_buf_mgmt);
443
444 P54P_WRITE(ring_control_base, cpu_to_le32(priv->ring_control_dma));
445 P54P_READ(ring_control_base);
446 wmb();
447 udelay(10);
448
449 P54P_WRITE(int_enable, cpu_to_le32(ISL38XX_INT_IDENT_INIT));
450 P54P_READ(int_enable);
451 wmb();
452 udelay(10);
453
454 P54P_WRITE(dev_int, cpu_to_le32(ISL38XX_DEV_INT_RESET));
455 P54P_READ(dev_int);
456
457 if (!wait_for_completion_interruptible_timeout(&priv->boot_comp, HZ)) {
458 printk(KERN_ERR "%s: Cannot boot firmware!\n",
459 wiphy_name(dev->wiphy));
460 p54p_stop(dev);
461 return -ETIMEDOUT;
462 }
463
464 P54P_WRITE(int_enable, cpu_to_le32(ISL38XX_INT_IDENT_UPDATE));
465 P54P_READ(int_enable);
466 wmb();
467 udelay(10);
468
469 P54P_WRITE(dev_int, cpu_to_le32(ISL38XX_DEV_INT_UPDATE));
470 P54P_READ(dev_int);
471 wmb();
472 udelay(10);
473
474 return 0;
475}
476
477static int __devinit p54p_probe(struct pci_dev *pdev, 477static int __devinit p54p_probe(struct pci_dev *pdev,
478 const struct pci_device_id *id) 478 const struct pci_device_id *id)
479{ 479{
@@ -555,11 +555,13 @@ static int __devinit p54p_probe(struct pci_dev *pdev,
555 spin_lock_init(&priv->lock); 555 spin_lock_init(&priv->lock);
556 tasklet_init(&priv->rx_tasklet, p54p_rx_tasklet, (unsigned long)dev); 556 tasklet_init(&priv->rx_tasklet, p54p_rx_tasklet, (unsigned long)dev);
557 557
558 p54p_open(dev); 558 err = p54p_open(dev);
559 if (err)
560 goto err_free_common;
559 err = p54_read_eeprom(dev); 561 err = p54_read_eeprom(dev);
560 p54p_stop(dev); 562 p54p_stop(dev);
561 if (err) 563 if (err)
562 goto err_free_desc; 564 goto err_free_common;
563 565
564 err = ieee80211_register_hw(dev); 566 err = ieee80211_register_hw(dev);
565 if (err) { 567 if (err) {
@@ -572,8 +574,6 @@ static int __devinit p54p_probe(struct pci_dev *pdev,
572 574
573 err_free_common: 575 err_free_common:
574 p54_free_common(dev); 576 p54_free_common(dev);
575
576 err_free_desc:
577 pci_free_consistent(pdev, sizeof(*priv->ring_control), 577 pci_free_consistent(pdev, sizeof(*priv->ring_control),
578 priv->ring_control, priv->ring_control_dma); 578 priv->ring_control, priv->ring_control_dma);
579 579
diff --git a/drivers/net/wireless/rt2x00/Kconfig b/drivers/net/wireless/rt2x00/Kconfig
index f839ce044afd..95511ac22470 100644
--- a/drivers/net/wireless/rt2x00/Kconfig
+++ b/drivers/net/wireless/rt2x00/Kconfig
@@ -1,5 +1,5 @@
1menuconfig RT2X00 1menuconfig RT2X00
2 bool "Ralink driver support" 2 tristate "Ralink driver support"
3 depends on MAC80211 && WLAN_80211 && EXPERIMENTAL 3 depends on MAC80211 && WLAN_80211 && EXPERIMENTAL
4 ---help--- 4 ---help---
5 This will enable the experimental support for the Ralink drivers, 5 This will enable the experimental support for the Ralink drivers,