diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/Kconfig | 6 | ||||
-rw-r--r-- | drivers/net/bonding/bond_alb.c | 4 | ||||
-rw-r--r-- | drivers/net/bonding/bonding.h | 4 | ||||
-rw-r--r-- | drivers/net/cassini.c | 4 | ||||
-rw-r--r-- | drivers/net/cs89x0.c | 77 | ||||
-rw-r--r-- | drivers/net/e100.c | 50 | ||||
-rw-r--r-- | drivers/net/gianfar.c | 6 | ||||
-rw-r--r-- | drivers/net/gianfar_mii.c | 5 | ||||
-rw-r--r-- | drivers/net/phy/mdio_bus.c | 2 | ||||
-rw-r--r-- | drivers/net/phy/phy.c | 2 | ||||
-rw-r--r-- | drivers/net/sb1000.c | 4 | ||||
-rw-r--r-- | drivers/net/tg3.c | 82 | ||||
-rw-r--r-- | drivers/net/tg3.h | 1 | ||||
-rw-r--r-- | drivers/net/tulip/uli526x.c | 6 | ||||
-rw-r--r-- | drivers/net/via-velocity.c | 2 | ||||
-rw-r--r-- | drivers/net/wan/lmc/lmc_main.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/Kconfig | 10 | ||||
-rw-r--r-- | drivers/net/wireless/atmel.c | 227 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_80211_rx.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_hw.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2100.c | 26 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2200.c | 42 | ||||
-rw-r--r-- | drivers/net/wireless/wavelan.c | 38 |
23 files changed, 456 insertions, 162 deletions
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 5c15f3e9ea07..1421941487c4 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig | |||
@@ -1387,7 +1387,7 @@ config FORCEDETH | |||
1387 | 1387 | ||
1388 | config CS89x0 | 1388 | config CS89x0 |
1389 | tristate "CS89x0 support" | 1389 | tristate "CS89x0 support" |
1390 | depends on NET_PCI && (ISA || ARCH_IXDP2X01 || ARCH_PNX010X) | 1390 | depends on NET_PCI && (ISA || MACH_IXDP2351 || ARCH_IXDP2X01 || ARCH_PNX010X) |
1391 | ---help--- | 1391 | ---help--- |
1392 | Support for CS89x0 chipset based Ethernet cards. If you have a | 1392 | Support for CS89x0 chipset based Ethernet cards. If you have a |
1393 | network (Ethernet) card of this type, say Y and read the | 1393 | network (Ethernet) card of this type, say Y and read the |
@@ -2676,10 +2676,6 @@ config SHAPER | |||
2676 | Class-Based Queueing (CBQ) scheduling support which you get if you | 2676 | Class-Based Queueing (CBQ) scheduling support which you get if you |
2677 | say Y to "QoS and/or fair queueing" above. | 2677 | say Y to "QoS and/or fair queueing" above. |
2678 | 2678 | ||
2679 | To set up and configure shaper devices, you need the shapecfg | ||
2680 | program, available from <ftp://shadow.cabi.net/pub/Linux/> in the | ||
2681 | shaper package. | ||
2682 | |||
2683 | To compile this driver as a module, choose M here: the module | 2679 | To compile this driver as a module, choose M here: the module |
2684 | will be called shaper. If unsure, say N. | 2680 | will be called shaper. If unsure, say N. |
2685 | 2681 | ||
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c index 854ddfb90da1..f2a63186ae05 100644 --- a/drivers/net/bonding/bond_alb.c +++ b/drivers/net/bonding/bond_alb.c | |||
@@ -169,9 +169,9 @@ static void tlb_clear_slave(struct bonding *bond, struct slave *slave, int save_ | |||
169 | index = next_index; | 169 | index = next_index; |
170 | } | 170 | } |
171 | 171 | ||
172 | _unlock_tx_hashtbl(bond); | ||
173 | |||
174 | tlb_init_slave(slave); | 172 | tlb_init_slave(slave); |
173 | |||
174 | _unlock_tx_hashtbl(bond); | ||
175 | } | 175 | } |
176 | 176 | ||
177 | /* Must be called before starting the monitor timer */ | 177 | /* Must be called before starting the monitor timer */ |
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h index f20bb85c1ea5..3dd78d048c3e 100644 --- a/drivers/net/bonding/bonding.h +++ b/drivers/net/bonding/bonding.h | |||
@@ -22,8 +22,8 @@ | |||
22 | #include "bond_3ad.h" | 22 | #include "bond_3ad.h" |
23 | #include "bond_alb.h" | 23 | #include "bond_alb.h" |
24 | 24 | ||
25 | #define DRV_VERSION "3.0.0" | 25 | #define DRV_VERSION "3.0.1" |
26 | #define DRV_RELDATE "November 8, 2005" | 26 | #define DRV_RELDATE "January 9, 2006" |
27 | #define DRV_NAME "bonding" | 27 | #define DRV_NAME "bonding" |
28 | #define DRV_DESCRIPTION "Ethernet Channel Bonding Driver" | 28 | #define DRV_DESCRIPTION "Ethernet Channel Bonding Driver" |
29 | 29 | ||
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c index 1f7ca453bb4a..dde631f8f685 100644 --- a/drivers/net/cassini.c +++ b/drivers/net/cassini.c | |||
@@ -1925,8 +1925,8 @@ static void cas_tx(struct net_device *dev, struct cas *cp, | |||
1925 | u64 compwb = le64_to_cpu(cp->init_block->tx_compwb); | 1925 | u64 compwb = le64_to_cpu(cp->init_block->tx_compwb); |
1926 | #endif | 1926 | #endif |
1927 | if (netif_msg_intr(cp)) | 1927 | if (netif_msg_intr(cp)) |
1928 | printk(KERN_DEBUG "%s: tx interrupt, status: 0x%x, %lx\n", | 1928 | printk(KERN_DEBUG "%s: tx interrupt, status: 0x%x, %llx\n", |
1929 | cp->dev->name, status, compwb); | 1929 | cp->dev->name, status, (unsigned long long)compwb); |
1930 | /* process all the rings */ | 1930 | /* process all the rings */ |
1931 | for (ring = 0; ring < N_TX_RINGS; ring++) { | 1931 | for (ring = 0; ring < N_TX_RINGS; ring++) { |
1932 | #ifdef USE_TX_COMPWB | 1932 | #ifdef USE_TX_COMPWB |
diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c index e2cfde7e31ec..ef54ebeb29b8 100644 --- a/drivers/net/cs89x0.c +++ b/drivers/net/cs89x0.c | |||
@@ -87,6 +87,15 @@ | |||
87 | Deepak Saxena : dsaxena@plexity.net | 87 | Deepak Saxena : dsaxena@plexity.net |
88 | : Intel IXDP2x01 (XScale ixp2x00 NPU) platform support | 88 | : Intel IXDP2x01 (XScale ixp2x00 NPU) platform support |
89 | 89 | ||
90 | Dmitry Pervushin : dpervushin@ru.mvista.com | ||
91 | : PNX010X platform support | ||
92 | |||
93 | Deepak Saxena : dsaxena@plexity.net | ||
94 | : Intel IXDP2351 platform support | ||
95 | |||
96 | Dmitry Pervushin : dpervushin@ru.mvista.com | ||
97 | : PNX010X platform support | ||
98 | |||
90 | */ | 99 | */ |
91 | 100 | ||
92 | /* Always include 'config.h' first in case the user wants to turn on | 101 | /* Always include 'config.h' first in case the user wants to turn on |
@@ -171,6 +180,10 @@ static unsigned int cs8900_irq_map[] = {12,0,0,0}; | |||
171 | static unsigned int netcard_portlist[] __initdata = | 180 | static unsigned int netcard_portlist[] __initdata = |
172 | { 0x0300, 0}; | 181 | { 0x0300, 0}; |
173 | static unsigned int cs8900_irq_map[] = {1,0,0,0}; | 182 | static unsigned int cs8900_irq_map[] = {1,0,0,0}; |
183 | #elif defined(CONFIG_MACH_IXDP2351) | ||
184 | static unsigned int netcard_portlist[] __initdata = {IXDP2351_VIRT_CS8900_BASE, 0}; | ||
185 | static unsigned int cs8900_irq_map[] = {IRQ_IXDP2351_CS8900, 0, 0, 0}; | ||
186 | #include <asm/irq.h> | ||
174 | #elif defined(CONFIG_ARCH_IXDP2X01) | 187 | #elif defined(CONFIG_ARCH_IXDP2X01) |
175 | #include <asm/irq.h> | 188 | #include <asm/irq.h> |
176 | static unsigned int netcard_portlist[] __initdata = {IXDP2X01_CS8900_VIRT_BASE, 0}; | 189 | static unsigned int netcard_portlist[] __initdata = {IXDP2X01_CS8900_VIRT_BASE, 0}; |
@@ -338,45 +351,55 @@ out: | |||
338 | } | 351 | } |
339 | #endif | 352 | #endif |
340 | 353 | ||
341 | #if defined(CONFIG_ARCH_IXDP2X01) | 354 | #if defined(CONFIG_MACH_IXDP2351) |
342 | static int | 355 | static u16 |
343 | readword(unsigned long base_addr, int portno) | 356 | readword(unsigned long base_addr, int portno) |
344 | { | 357 | { |
345 | return (u16)__raw_readl(base_addr + (portno << 1)); | 358 | return __raw_readw(base_addr + (portno << 1)); |
346 | } | 359 | } |
347 | 360 | ||
348 | static void | 361 | static void |
349 | writeword(unsigned long base_addr, int portno, int value) | 362 | writeword(unsigned long base_addr, int portno, u16 value) |
350 | { | 363 | { |
351 | __raw_writel((u16)value, base_addr + (portno << 1)); | 364 | __raw_writew(value, base_addr + (portno << 1)); |
352 | } | 365 | } |
353 | #else | 366 | #elif defined(CONFIG_ARCH_IXDP2X01) |
354 | #if defined(CONFIG_ARCH_PNX010X) | 367 | static u16 |
355 | static int | 368 | readword(unsigned long base_addr, int portno) |
369 | { | ||
370 | return __raw_readl(base_addr + (portno << 1)); | ||
371 | } | ||
372 | |||
373 | static void | ||
374 | writeword(unsigned long base_addr, int portno, u16 value) | ||
375 | { | ||
376 | __raw_writel(value, base_addr + (portno << 1)); | ||
377 | } | ||
378 | #elif defined(CONFIG_ARCH_PNX010X) | ||
379 | static u16 | ||
356 | readword(unsigned long base_addr, int portno) | 380 | readword(unsigned long base_addr, int portno) |
357 | { | 381 | { |
358 | return inw(base_addr + (portno << 1)); | 382 | return inw(base_addr + (portno << 1)); |
359 | } | 383 | } |
360 | 384 | ||
361 | static void | 385 | static void |
362 | writeword(unsigned long base_addr, int portno, int value) | 386 | writeword(unsigned long base_addr, int portno, u16 value) |
363 | { | 387 | { |
364 | outw(value, base_addr + (portno << 1)); | 388 | outw(value, base_addr + (portno << 1)); |
365 | } | 389 | } |
366 | #else | 390 | #else |
367 | static int | 391 | static u16 |
368 | readword(unsigned long base_addr, int portno) | 392 | readword(unsigned long base_addr, int portno) |
369 | { | 393 | { |
370 | return inw(base_addr + portno); | 394 | return inw(base_addr + portno); |
371 | } | 395 | } |
372 | 396 | ||
373 | static void | 397 | static void |
374 | writeword(unsigned long base_addr, int portno, int value) | 398 | writeword(unsigned long base_addr, int portno, u16 value) |
375 | { | 399 | { |
376 | outw(value, base_addr + portno); | 400 | outw(value, base_addr + portno); |
377 | } | 401 | } |
378 | #endif | 402 | #endif |
379 | #endif | ||
380 | 403 | ||
381 | static void | 404 | static void |
382 | readwords(unsigned long base_addr, int portno, void *buf, int length) | 405 | readwords(unsigned long base_addr, int portno, void *buf, int length) |
@@ -384,11 +407,11 @@ readwords(unsigned long base_addr, int portno, void *buf, int length) | |||
384 | u8 *buf8 = (u8 *)buf; | 407 | u8 *buf8 = (u8 *)buf; |
385 | 408 | ||
386 | do { | 409 | do { |
387 | u32 tmp32; | 410 | u16 tmp16; |
388 | 411 | ||
389 | tmp32 = readword(base_addr, portno); | 412 | tmp16 = readword(base_addr, portno); |
390 | *buf8++ = (u8)tmp32; | 413 | *buf8++ = (u8)tmp16; |
391 | *buf8++ = (u8)(tmp32 >> 8); | 414 | *buf8++ = (u8)(tmp16 >> 8); |
392 | } while (--length); | 415 | } while (--length); |
393 | } | 416 | } |
394 | 417 | ||
@@ -398,23 +421,23 @@ writewords(unsigned long base_addr, int portno, void *buf, int length) | |||
398 | u8 *buf8 = (u8 *)buf; | 421 | u8 *buf8 = (u8 *)buf; |
399 | 422 | ||
400 | do { | 423 | do { |
401 | u32 tmp32; | 424 | u16 tmp16; |
402 | 425 | ||
403 | tmp32 = *buf8++; | 426 | tmp16 = *buf8++; |
404 | tmp32 |= (*buf8++) << 8; | 427 | tmp16 |= (*buf8++) << 8; |
405 | writeword(base_addr, portno, tmp32); | 428 | writeword(base_addr, portno, tmp16); |
406 | } while (--length); | 429 | } while (--length); |
407 | } | 430 | } |
408 | 431 | ||
409 | static int | 432 | static u16 |
410 | readreg(struct net_device *dev, int regno) | 433 | readreg(struct net_device *dev, u16 regno) |
411 | { | 434 | { |
412 | writeword(dev->base_addr, ADD_PORT, regno); | 435 | writeword(dev->base_addr, ADD_PORT, regno); |
413 | return readword(dev->base_addr, DATA_PORT); | 436 | return readword(dev->base_addr, DATA_PORT); |
414 | } | 437 | } |
415 | 438 | ||
416 | static void | 439 | static void |
417 | writereg(struct net_device *dev, int regno, int value) | 440 | writereg(struct net_device *dev, u16 regno, u16 value) |
418 | { | 441 | { |
419 | writeword(dev->base_addr, ADD_PORT, regno); | 442 | writeword(dev->base_addr, ADD_PORT, regno); |
420 | writeword(dev->base_addr, DATA_PORT, value); | 443 | writeword(dev->base_addr, DATA_PORT, value); |
@@ -780,7 +803,7 @@ cs89x0_probe1(struct net_device *dev, int ioaddr, int modular) | |||
780 | } else { | 803 | } else { |
781 | i = lp->isa_config & INT_NO_MASK; | 804 | i = lp->isa_config & INT_NO_MASK; |
782 | if (lp->chip_type == CS8900) { | 805 | if (lp->chip_type == CS8900) { |
783 | #if defined(CONFIG_ARCH_IXDP2X01) || defined(CONFIG_ARCH_PNX010X) | 806 | #if defined(CONFIG_MACH_IXDP2351) || defined(CONFIG_ARCH_IXDP2X01) || defined(CONFIG_ARCH_PNX010X) |
784 | i = cs8900_irq_map[0]; | 807 | i = cs8900_irq_map[0]; |
785 | #else | 808 | #else |
786 | /* Translate the IRQ using the IRQ mapping table. */ | 809 | /* Translate the IRQ using the IRQ mapping table. */ |
@@ -1012,7 +1035,7 @@ skip_this_frame: | |||
1012 | 1035 | ||
1013 | void __init reset_chip(struct net_device *dev) | 1036 | void __init reset_chip(struct net_device *dev) |
1014 | { | 1037 | { |
1015 | #ifndef CONFIG_ARCH_IXDP2X01 | 1038 | #if !defined(CONFIG_MACH_IXDP2351) && !defined(CONFIG_ARCH_IXDP2X01) |
1016 | struct net_local *lp = netdev_priv(dev); | 1039 | struct net_local *lp = netdev_priv(dev); |
1017 | int ioaddr = dev->base_addr; | 1040 | int ioaddr = dev->base_addr; |
1018 | #endif | 1041 | #endif |
@@ -1023,7 +1046,7 @@ void __init reset_chip(struct net_device *dev) | |||
1023 | /* wait 30 ms */ | 1046 | /* wait 30 ms */ |
1024 | msleep(30); | 1047 | msleep(30); |
1025 | 1048 | ||
1026 | #ifndef CONFIG_ARCH_IXDP2X01 | 1049 | #if !defined(CONFIG_MACH_IXDP2351) && !defined(CONFIG_ARCH_IXDP2X01) |
1027 | if (lp->chip_type != CS8900) { | 1050 | if (lp->chip_type != CS8900) { |
1028 | /* Hardware problem requires PNP registers to be reconfigured after a reset */ | 1051 | /* Hardware problem requires PNP registers to be reconfigured after a reset */ |
1029 | writeword(ioaddr, ADD_PORT, PP_CS8920_ISAINT); | 1052 | writeword(ioaddr, ADD_PORT, PP_CS8920_ISAINT); |
@@ -1287,7 +1310,7 @@ net_open(struct net_device *dev) | |||
1287 | else | 1310 | else |
1288 | #endif | 1311 | #endif |
1289 | { | 1312 | { |
1290 | #if !defined(CONFIG_ARCH_IXDP2X01) && !defined(CONFIG_ARCH_PNX010X) | 1313 | #if !defined(CONFIG_MACH_IXDP2351) && !defined(CONFIG_ARCH_IXDP2X01) && !defined(CONFIG_ARCH_PNX010X) |
1291 | if (((1 << dev->irq) & lp->irq_map) == 0) { | 1314 | if (((1 << dev->irq) & lp->irq_map) == 0) { |
1292 | printk(KERN_ERR "%s: IRQ %d is not in our map of allowable IRQs, which is %x\n", | 1315 | printk(KERN_ERR "%s: IRQ %d is not in our map of allowable IRQs, which is %x\n", |
1293 | dev->name, dev->irq, lp->irq_map); | 1316 | dev->name, dev->irq, lp->irq_map); |
diff --git a/drivers/net/e100.c b/drivers/net/e100.c index 22cd04556707..4726722a0635 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c | |||
@@ -132,6 +132,10 @@ | |||
132 | * TODO: | 132 | * TODO: |
133 | * o several entry points race with dev->close | 133 | * o several entry points race with dev->close |
134 | * o check for tx-no-resources/stop Q races with tx clean/wake Q | 134 | * o check for tx-no-resources/stop Q races with tx clean/wake Q |
135 | * | ||
136 | * FIXES: | ||
137 | * 2005/12/02 - Michael O'Donnell <Michael.ODonnell at stratus dot com> | ||
138 | * - Stratus87247: protect MDI control register manipulations | ||
135 | */ | 139 | */ |
136 | 140 | ||
137 | #include <linux/config.h> | 141 | #include <linux/config.h> |
@@ -578,6 +582,7 @@ struct nic { | |||
578 | u16 leds; | 582 | u16 leds; |
579 | u16 eeprom_wc; | 583 | u16 eeprom_wc; |
580 | u16 eeprom[256]; | 584 | u16 eeprom[256]; |
585 | spinlock_t mdio_lock; | ||
581 | }; | 586 | }; |
582 | 587 | ||
583 | static inline void e100_write_flush(struct nic *nic) | 588 | static inline void e100_write_flush(struct nic *nic) |
@@ -587,7 +592,7 @@ static inline void e100_write_flush(struct nic *nic) | |||
587 | (void)readb(&nic->csr->scb.status); | 592 | (void)readb(&nic->csr->scb.status); |
588 | } | 593 | } |
589 | 594 | ||
590 | static inline void e100_enable_irq(struct nic *nic) | 595 | static void e100_enable_irq(struct nic *nic) |
591 | { | 596 | { |
592 | unsigned long flags; | 597 | unsigned long flags; |
593 | 598 | ||
@@ -597,7 +602,7 @@ static inline void e100_enable_irq(struct nic *nic) | |||
597 | e100_write_flush(nic); | 602 | e100_write_flush(nic); |
598 | } | 603 | } |
599 | 604 | ||
600 | static inline void e100_disable_irq(struct nic *nic) | 605 | static void e100_disable_irq(struct nic *nic) |
601 | { | 606 | { |
602 | unsigned long flags; | 607 | unsigned long flags; |
603 | 608 | ||
@@ -786,7 +791,7 @@ static int e100_eeprom_save(struct nic *nic, u16 start, u16 count) | |||
786 | 791 | ||
787 | #define E100_WAIT_SCB_TIMEOUT 20000 /* we might have to wait 100ms!!! */ | 792 | #define E100_WAIT_SCB_TIMEOUT 20000 /* we might have to wait 100ms!!! */ |
788 | #define E100_WAIT_SCB_FAST 20 /* delay like the old code */ | 793 | #define E100_WAIT_SCB_FAST 20 /* delay like the old code */ |
789 | static inline int e100_exec_cmd(struct nic *nic, u8 cmd, dma_addr_t dma_addr) | 794 | static int e100_exec_cmd(struct nic *nic, u8 cmd, dma_addr_t dma_addr) |
790 | { | 795 | { |
791 | unsigned long flags; | 796 | unsigned long flags; |
792 | unsigned int i; | 797 | unsigned int i; |
@@ -817,7 +822,7 @@ err_unlock: | |||
817 | return err; | 822 | return err; |
818 | } | 823 | } |
819 | 824 | ||
820 | static inline int e100_exec_cb(struct nic *nic, struct sk_buff *skb, | 825 | static int e100_exec_cb(struct nic *nic, struct sk_buff *skb, |
821 | void (*cb_prepare)(struct nic *, struct cb *, struct sk_buff *)) | 826 | void (*cb_prepare)(struct nic *, struct cb *, struct sk_buff *)) |
822 | { | 827 | { |
823 | struct cb *cb; | 828 | struct cb *cb; |
@@ -876,15 +881,35 @@ static u16 mdio_ctrl(struct nic *nic, u32 addr, u32 dir, u32 reg, u16 data) | |||
876 | { | 881 | { |
877 | u32 data_out = 0; | 882 | u32 data_out = 0; |
878 | unsigned int i; | 883 | unsigned int i; |
884 | unsigned long flags; | ||
879 | 885 | ||
886 | |||
887 | /* | ||
888 | * Stratus87247: we shouldn't be writing the MDI control | ||
889 | * register until the Ready bit shows True. Also, since | ||
890 | * manipulation of the MDI control registers is a multi-step | ||
891 | * procedure it should be done under lock. | ||
892 | */ | ||
893 | spin_lock_irqsave(&nic->mdio_lock, flags); | ||
894 | for (i = 100; i; --i) { | ||
895 | if (readl(&nic->csr->mdi_ctrl) & mdi_ready) | ||
896 | break; | ||
897 | udelay(20); | ||
898 | } | ||
899 | if (unlikely(!i)) { | ||
900 | printk("e100.mdio_ctrl(%s) won't go Ready\n", | ||
901 | nic->netdev->name ); | ||
902 | spin_unlock_irqrestore(&nic->mdio_lock, flags); | ||
903 | return 0; /* No way to indicate timeout error */ | ||
904 | } | ||
880 | writel((reg << 16) | (addr << 21) | dir | data, &nic->csr->mdi_ctrl); | 905 | writel((reg << 16) | (addr << 21) | dir | data, &nic->csr->mdi_ctrl); |
881 | 906 | ||
882 | for(i = 0; i < 100; i++) { | 907 | for (i = 0; i < 100; i++) { |
883 | udelay(20); | 908 | udelay(20); |
884 | if((data_out = readl(&nic->csr->mdi_ctrl)) & mdi_ready) | 909 | if ((data_out = readl(&nic->csr->mdi_ctrl)) & mdi_ready) |
885 | break; | 910 | break; |
886 | } | 911 | } |
887 | 912 | spin_unlock_irqrestore(&nic->mdio_lock, flags); | |
888 | DPRINTK(HW, DEBUG, | 913 | DPRINTK(HW, DEBUG, |
889 | "%s:addr=%d, reg=%d, data_in=0x%04X, data_out=0x%04X\n", | 914 | "%s:addr=%d, reg=%d, data_in=0x%04X, data_out=0x%04X\n", |
890 | dir == mdi_read ? "READ" : "WRITE", addr, reg, data, data_out); | 915 | dir == mdi_read ? "READ" : "WRITE", addr, reg, data, data_out); |
@@ -1542,7 +1567,7 @@ static void e100_watchdog(unsigned long data) | |||
1542 | mod_timer(&nic->watchdog, jiffies + E100_WATCHDOG_PERIOD); | 1567 | mod_timer(&nic->watchdog, jiffies + E100_WATCHDOG_PERIOD); |
1543 | } | 1568 | } |
1544 | 1569 | ||
1545 | static inline void e100_xmit_prepare(struct nic *nic, struct cb *cb, | 1570 | static void e100_xmit_prepare(struct nic *nic, struct cb *cb, |
1546 | struct sk_buff *skb) | 1571 | struct sk_buff *skb) |
1547 | { | 1572 | { |
1548 | cb->command = nic->tx_command; | 1573 | cb->command = nic->tx_command; |
@@ -1592,7 +1617,7 @@ static int e100_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
1592 | return 0; | 1617 | return 0; |
1593 | } | 1618 | } |
1594 | 1619 | ||
1595 | static inline int e100_tx_clean(struct nic *nic) | 1620 | static int e100_tx_clean(struct nic *nic) |
1596 | { | 1621 | { |
1597 | struct cb *cb; | 1622 | struct cb *cb; |
1598 | int tx_cleaned = 0; | 1623 | int tx_cleaned = 0; |
@@ -1703,7 +1728,7 @@ static inline void e100_start_receiver(struct nic *nic, struct rx *rx) | |||
1703 | } | 1728 | } |
1704 | 1729 | ||
1705 | #define RFD_BUF_LEN (sizeof(struct rfd) + VLAN_ETH_FRAME_LEN) | 1730 | #define RFD_BUF_LEN (sizeof(struct rfd) + VLAN_ETH_FRAME_LEN) |
1706 | static inline int e100_rx_alloc_skb(struct nic *nic, struct rx *rx) | 1731 | static int e100_rx_alloc_skb(struct nic *nic, struct rx *rx) |
1707 | { | 1732 | { |
1708 | if(!(rx->skb = dev_alloc_skb(RFD_BUF_LEN + NET_IP_ALIGN))) | 1733 | if(!(rx->skb = dev_alloc_skb(RFD_BUF_LEN + NET_IP_ALIGN))) |
1709 | return -ENOMEM; | 1734 | return -ENOMEM; |
@@ -1737,7 +1762,7 @@ static inline int e100_rx_alloc_skb(struct nic *nic, struct rx *rx) | |||
1737 | return 0; | 1762 | return 0; |
1738 | } | 1763 | } |
1739 | 1764 | ||
1740 | static inline int e100_rx_indicate(struct nic *nic, struct rx *rx, | 1765 | static int e100_rx_indicate(struct nic *nic, struct rx *rx, |
1741 | unsigned int *work_done, unsigned int work_to_do) | 1766 | unsigned int *work_done, unsigned int work_to_do) |
1742 | { | 1767 | { |
1743 | struct sk_buff *skb = rx->skb; | 1768 | struct sk_buff *skb = rx->skb; |
@@ -1797,7 +1822,7 @@ static inline int e100_rx_indicate(struct nic *nic, struct rx *rx, | |||
1797 | return 0; | 1822 | return 0; |
1798 | } | 1823 | } |
1799 | 1824 | ||
1800 | static inline void e100_rx_clean(struct nic *nic, unsigned int *work_done, | 1825 | static void e100_rx_clean(struct nic *nic, unsigned int *work_done, |
1801 | unsigned int work_to_do) | 1826 | unsigned int work_to_do) |
1802 | { | 1827 | { |
1803 | struct rx *rx; | 1828 | struct rx *rx; |
@@ -2562,6 +2587,7 @@ static int __devinit e100_probe(struct pci_dev *pdev, | |||
2562 | /* locks must be initialized before calling hw_reset */ | 2587 | /* locks must be initialized before calling hw_reset */ |
2563 | spin_lock_init(&nic->cb_lock); | 2588 | spin_lock_init(&nic->cb_lock); |
2564 | spin_lock_init(&nic->cmd_lock); | 2589 | spin_lock_init(&nic->cmd_lock); |
2590 | spin_lock_init(&nic->mdio_lock); | ||
2565 | 2591 | ||
2566 | /* Reset the device before pci_set_master() in case device is in some | 2592 | /* Reset the device before pci_set_master() in case device is in some |
2567 | * funky state and has an interrupt pending - hint: we don't have the | 2593 | * funky state and has an interrupt pending - hint: we don't have the |
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index 146f9513aea5..0c18dbd67d3b 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
@@ -84,6 +84,7 @@ | |||
84 | #include <linux/ip.h> | 84 | #include <linux/ip.h> |
85 | #include <linux/tcp.h> | 85 | #include <linux/tcp.h> |
86 | #include <linux/udp.h> | 86 | #include <linux/udp.h> |
87 | #include <linux/in.h> | ||
87 | 88 | ||
88 | #include <asm/io.h> | 89 | #include <asm/io.h> |
89 | #include <asm/irq.h> | 90 | #include <asm/irq.h> |
@@ -398,12 +399,15 @@ static int init_phy(struct net_device *dev) | |||
398 | priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_GIGABIT ? | 399 | priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_GIGABIT ? |
399 | SUPPORTED_1000baseT_Full : 0; | 400 | SUPPORTED_1000baseT_Full : 0; |
400 | struct phy_device *phydev; | 401 | struct phy_device *phydev; |
402 | char phy_id[BUS_ID_SIZE]; | ||
401 | 403 | ||
402 | priv->oldlink = 0; | 404 | priv->oldlink = 0; |
403 | priv->oldspeed = 0; | 405 | priv->oldspeed = 0; |
404 | priv->oldduplex = -1; | 406 | priv->oldduplex = -1; |
405 | 407 | ||
406 | phydev = phy_connect(dev, priv->einfo->bus_id, &adjust_link, 0); | 408 | snprintf(phy_id, BUS_ID_SIZE, PHY_ID_FMT, priv->einfo->bus_id, priv->einfo->phy_id); |
409 | |||
410 | phydev = phy_connect(dev, phy_id, &adjust_link, 0); | ||
407 | 411 | ||
408 | if (IS_ERR(phydev)) { | 412 | if (IS_ERR(phydev)) { |
409 | printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name); | 413 | printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name); |
diff --git a/drivers/net/gianfar_mii.c b/drivers/net/gianfar_mii.c index 04a462c2a5b7..74e52fcbf806 100644 --- a/drivers/net/gianfar_mii.c +++ b/drivers/net/gianfar_mii.c | |||
@@ -128,6 +128,7 @@ int gfar_mdio_probe(struct device *dev) | |||
128 | struct gianfar_mdio_data *pdata; | 128 | struct gianfar_mdio_data *pdata; |
129 | struct gfar_mii *regs; | 129 | struct gfar_mii *regs; |
130 | struct mii_bus *new_bus; | 130 | struct mii_bus *new_bus; |
131 | struct resource *r; | ||
131 | int err = 0; | 132 | int err = 0; |
132 | 133 | ||
133 | if (NULL == dev) | 134 | if (NULL == dev) |
@@ -151,8 +152,10 @@ int gfar_mdio_probe(struct device *dev) | |||
151 | return -ENODEV; | 152 | return -ENODEV; |
152 | } | 153 | } |
153 | 154 | ||
155 | r = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
156 | |||
154 | /* Set the PHY base address */ | 157 | /* Set the PHY base address */ |
155 | regs = (struct gfar_mii *) ioremap(pdata->paddr, | 158 | regs = (struct gfar_mii *) ioremap(r->start, |
156 | sizeof (struct gfar_mii)); | 159 | sizeof (struct gfar_mii)); |
157 | 160 | ||
158 | if (NULL == regs) { | 161 | if (NULL == regs) { |
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index 02940c0fef68..459443b572ce 100644 --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c | |||
@@ -81,7 +81,7 @@ int mdiobus_register(struct mii_bus *bus) | |||
81 | 81 | ||
82 | phydev->dev.parent = bus->dev; | 82 | phydev->dev.parent = bus->dev; |
83 | phydev->dev.bus = &mdio_bus_type; | 83 | phydev->dev.bus = &mdio_bus_type; |
84 | sprintf(phydev->dev.bus_id, "phy%d:%d", bus->id, i); | 84 | snprintf(phydev->dev.bus_id, BUS_ID_SIZE, PHY_ID_FMT, bus->id, i); |
85 | 85 | ||
86 | phydev->bus = bus; | 86 | phydev->bus = bus; |
87 | 87 | ||
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index b8686e47f899..1474b7c5ac0b 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c | |||
@@ -42,7 +42,7 @@ | |||
42 | */ | 42 | */ |
43 | void phy_print_status(struct phy_device *phydev) | 43 | void phy_print_status(struct phy_device *phydev) |
44 | { | 44 | { |
45 | pr_info("%s: Link is %s", phydev->dev.bus_id, | 45 | pr_info("PHY: %s - Link is %s", phydev->dev.bus_id, |
46 | phydev->link ? "Up" : "Down"); | 46 | phydev->link ? "Up" : "Down"); |
47 | if (phydev->link) | 47 | if (phydev->link) |
48 | printk(" - %d/%s", phydev->speed, | 48 | printk(" - %d/%s", phydev->speed, |
diff --git a/drivers/net/sb1000.c b/drivers/net/sb1000.c index d6388e1533f0..76139478c3df 100644 --- a/drivers/net/sb1000.c +++ b/drivers/net/sb1000.c | |||
@@ -94,7 +94,7 @@ static inline int card_wait_for_busy_clear(const int ioaddr[], | |||
94 | const char* name); | 94 | const char* name); |
95 | static inline int card_wait_for_ready(const int ioaddr[], const char* name, | 95 | static inline int card_wait_for_ready(const int ioaddr[], const char* name, |
96 | unsigned char in[]); | 96 | unsigned char in[]); |
97 | static inline int card_send_command(const int ioaddr[], const char* name, | 97 | static int card_send_command(const int ioaddr[], const char* name, |
98 | const unsigned char out[], unsigned char in[]); | 98 | const unsigned char out[], unsigned char in[]); |
99 | 99 | ||
100 | /* SB1000 hardware routines to be used during frame rx interrupt */ | 100 | /* SB1000 hardware routines to be used during frame rx interrupt */ |
@@ -309,7 +309,7 @@ card_wait_for_ready(const int ioaddr[], const char* name, unsigned char in[]) | |||
309 | } | 309 | } |
310 | 310 | ||
311 | /* Card Send Command (cannot be used during an interrupt) */ | 311 | /* Card Send Command (cannot be used during an interrupt) */ |
312 | static inline int | 312 | static int |
313 | card_send_command(const int ioaddr[], const char* name, | 313 | card_send_command(const int ioaddr[], const char* name, |
314 | const unsigned char out[], unsigned char in[]) | 314 | const unsigned char out[], unsigned char in[]) |
315 | { | 315 | { |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index eb86b059809b..f2d1dafde087 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -69,8 +69,8 @@ | |||
69 | 69 | ||
70 | #define DRV_MODULE_NAME "tg3" | 70 | #define DRV_MODULE_NAME "tg3" |
71 | #define PFX DRV_MODULE_NAME ": " | 71 | #define PFX DRV_MODULE_NAME ": " |
72 | #define DRV_MODULE_VERSION "3.47" | 72 | #define DRV_MODULE_VERSION "3.48" |
73 | #define DRV_MODULE_RELDATE "Dec 28, 2005" | 73 | #define DRV_MODULE_RELDATE "Jan 16, 2006" |
74 | 74 | ||
75 | #define TG3_DEF_MAC_MODE 0 | 75 | #define TG3_DEF_MAC_MODE 0 |
76 | #define TG3_DEF_RX_MODE 0 | 76 | #define TG3_DEF_RX_MODE 0 |
@@ -1325,10 +1325,12 @@ static int tg3_set_power_state(struct tg3 *tp, int state) | |||
1325 | val &= ~((1 << 16) | (1 << 4) | (1 << 2) | (1 << 1) | 1); | 1325 | val &= ~((1 << 16) | (1 << 4) | (1 << 2) | (1 << 1) | 1); |
1326 | tw32(0x7d00, val); | 1326 | tw32(0x7d00, val); |
1327 | if (!(tp->tg3_flags & TG3_FLAG_ENABLE_ASF)) { | 1327 | if (!(tp->tg3_flags & TG3_FLAG_ENABLE_ASF)) { |
1328 | tg3_nvram_lock(tp); | 1328 | int err; |
1329 | |||
1330 | err = tg3_nvram_lock(tp); | ||
1329 | tg3_halt_cpu(tp, RX_CPU_BASE); | 1331 | tg3_halt_cpu(tp, RX_CPU_BASE); |
1330 | tw32_f(NVRAM_SWARB, SWARB_REQ_CLR0); | 1332 | if (!err) |
1331 | tg3_nvram_unlock(tp); | 1333 | tg3_nvram_unlock(tp); |
1332 | } | 1334 | } |
1333 | } | 1335 | } |
1334 | 1336 | ||
@@ -4193,14 +4195,19 @@ static int tg3_nvram_lock(struct tg3 *tp) | |||
4193 | if (tp->tg3_flags & TG3_FLAG_NVRAM) { | 4195 | if (tp->tg3_flags & TG3_FLAG_NVRAM) { |
4194 | int i; | 4196 | int i; |
4195 | 4197 | ||
4196 | tw32(NVRAM_SWARB, SWARB_REQ_SET1); | 4198 | if (tp->nvram_lock_cnt == 0) { |
4197 | for (i = 0; i < 8000; i++) { | 4199 | tw32(NVRAM_SWARB, SWARB_REQ_SET1); |
4198 | if (tr32(NVRAM_SWARB) & SWARB_GNT1) | 4200 | for (i = 0; i < 8000; i++) { |
4199 | break; | 4201 | if (tr32(NVRAM_SWARB) & SWARB_GNT1) |
4200 | udelay(20); | 4202 | break; |
4203 | udelay(20); | ||
4204 | } | ||
4205 | if (i == 8000) { | ||
4206 | tw32(NVRAM_SWARB, SWARB_REQ_CLR1); | ||
4207 | return -ENODEV; | ||
4208 | } | ||
4201 | } | 4209 | } |
4202 | if (i == 8000) | 4210 | tp->nvram_lock_cnt++; |
4203 | return -ENODEV; | ||
4204 | } | 4211 | } |
4205 | return 0; | 4212 | return 0; |
4206 | } | 4213 | } |
@@ -4208,8 +4215,12 @@ static int tg3_nvram_lock(struct tg3 *tp) | |||
4208 | /* tp->lock is held. */ | 4215 | /* tp->lock is held. */ |
4209 | static void tg3_nvram_unlock(struct tg3 *tp) | 4216 | static void tg3_nvram_unlock(struct tg3 *tp) |
4210 | { | 4217 | { |
4211 | if (tp->tg3_flags & TG3_FLAG_NVRAM) | 4218 | if (tp->tg3_flags & TG3_FLAG_NVRAM) { |
4212 | tw32_f(NVRAM_SWARB, SWARB_REQ_CLR1); | 4219 | if (tp->nvram_lock_cnt > 0) |
4220 | tp->nvram_lock_cnt--; | ||
4221 | if (tp->nvram_lock_cnt == 0) | ||
4222 | tw32_f(NVRAM_SWARB, SWARB_REQ_CLR1); | ||
4223 | } | ||
4213 | } | 4224 | } |
4214 | 4225 | ||
4215 | /* tp->lock is held. */ | 4226 | /* tp->lock is held. */ |
@@ -4320,8 +4331,13 @@ static int tg3_chip_reset(struct tg3 *tp) | |||
4320 | void (*write_op)(struct tg3 *, u32, u32); | 4331 | void (*write_op)(struct tg3 *, u32, u32); |
4321 | int i; | 4332 | int i; |
4322 | 4333 | ||
4323 | if (!(tp->tg3_flags2 & TG3_FLG2_SUN_570X)) | 4334 | if (!(tp->tg3_flags2 & TG3_FLG2_SUN_570X)) { |
4324 | tg3_nvram_lock(tp); | 4335 | tg3_nvram_lock(tp); |
4336 | /* No matching tg3_nvram_unlock() after this because | ||
4337 | * chip reset below will undo the nvram lock. | ||
4338 | */ | ||
4339 | tp->nvram_lock_cnt = 0; | ||
4340 | } | ||
4325 | 4341 | ||
4326 | /* | 4342 | /* |
4327 | * We must avoid the readl() that normally takes place. | 4343 | * We must avoid the readl() that normally takes place. |
@@ -4717,6 +4733,10 @@ static int tg3_halt_cpu(struct tg3 *tp, u32 offset) | |||
4717 | (offset == RX_CPU_BASE ? "RX" : "TX")); | 4733 | (offset == RX_CPU_BASE ? "RX" : "TX")); |
4718 | return -ENODEV; | 4734 | return -ENODEV; |
4719 | } | 4735 | } |
4736 | |||
4737 | /* Clear firmware's nvram arbitration. */ | ||
4738 | if (tp->tg3_flags & TG3_FLAG_NVRAM) | ||
4739 | tw32(NVRAM_SWARB, SWARB_REQ_CLR0); | ||
4720 | return 0; | 4740 | return 0; |
4721 | } | 4741 | } |
4722 | 4742 | ||
@@ -4736,7 +4756,7 @@ struct fw_info { | |||
4736 | static int tg3_load_firmware_cpu(struct tg3 *tp, u32 cpu_base, u32 cpu_scratch_base, | 4756 | static int tg3_load_firmware_cpu(struct tg3 *tp, u32 cpu_base, u32 cpu_scratch_base, |
4737 | int cpu_scratch_size, struct fw_info *info) | 4757 | int cpu_scratch_size, struct fw_info *info) |
4738 | { | 4758 | { |
4739 | int err, i; | 4759 | int err, lock_err, i; |
4740 | void (*write_op)(struct tg3 *, u32, u32); | 4760 | void (*write_op)(struct tg3 *, u32, u32); |
4741 | 4761 | ||
4742 | if (cpu_base == TX_CPU_BASE && | 4762 | if (cpu_base == TX_CPU_BASE && |
@@ -4755,9 +4775,10 @@ static int tg3_load_firmware_cpu(struct tg3 *tp, u32 cpu_base, u32 cpu_scratch_b | |||
4755 | /* It is possible that bootcode is still loading at this point. | 4775 | /* It is possible that bootcode is still loading at this point. |
4756 | * Get the nvram lock first before halting the cpu. | 4776 | * Get the nvram lock first before halting the cpu. |
4757 | */ | 4777 | */ |
4758 | tg3_nvram_lock(tp); | 4778 | lock_err = tg3_nvram_lock(tp); |
4759 | err = tg3_halt_cpu(tp, cpu_base); | 4779 | err = tg3_halt_cpu(tp, cpu_base); |
4760 | tg3_nvram_unlock(tp); | 4780 | if (!lock_err) |
4781 | tg3_nvram_unlock(tp); | ||
4761 | if (err) | 4782 | if (err) |
4762 | goto out; | 4783 | goto out; |
4763 | 4784 | ||
@@ -8182,7 +8203,7 @@ static void tg3_self_test(struct net_device *dev, struct ethtool_test *etest, | |||
8182 | data[1] = 1; | 8203 | data[1] = 1; |
8183 | } | 8204 | } |
8184 | if (etest->flags & ETH_TEST_FL_OFFLINE) { | 8205 | if (etest->flags & ETH_TEST_FL_OFFLINE) { |
8185 | int irq_sync = 0; | 8206 | int err, irq_sync = 0; |
8186 | 8207 | ||
8187 | if (netif_running(dev)) { | 8208 | if (netif_running(dev)) { |
8188 | tg3_netif_stop(tp); | 8209 | tg3_netif_stop(tp); |
@@ -8192,11 +8213,12 @@ static void tg3_self_test(struct net_device *dev, struct ethtool_test *etest, | |||
8192 | tg3_full_lock(tp, irq_sync); | 8213 | tg3_full_lock(tp, irq_sync); |
8193 | 8214 | ||
8194 | tg3_halt(tp, RESET_KIND_SUSPEND, 1); | 8215 | tg3_halt(tp, RESET_KIND_SUSPEND, 1); |
8195 | tg3_nvram_lock(tp); | 8216 | err = tg3_nvram_lock(tp); |
8196 | tg3_halt_cpu(tp, RX_CPU_BASE); | 8217 | tg3_halt_cpu(tp, RX_CPU_BASE); |
8197 | if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) | 8218 | if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) |
8198 | tg3_halt_cpu(tp, TX_CPU_BASE); | 8219 | tg3_halt_cpu(tp, TX_CPU_BASE); |
8199 | tg3_nvram_unlock(tp); | 8220 | if (!err) |
8221 | tg3_nvram_unlock(tp); | ||
8200 | 8222 | ||
8201 | if (tg3_test_registers(tp) != 0) { | 8223 | if (tg3_test_registers(tp) != 0) { |
8202 | etest->flags |= ETH_TEST_FL_FAILED; | 8224 | etest->flags |= ETH_TEST_FL_FAILED; |
@@ -8588,7 +8610,11 @@ static void __devinit tg3_nvram_init(struct tg3 *tp) | |||
8588 | GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5701) { | 8610 | GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5701) { |
8589 | tp->tg3_flags |= TG3_FLAG_NVRAM; | 8611 | tp->tg3_flags |= TG3_FLAG_NVRAM; |
8590 | 8612 | ||
8591 | tg3_nvram_lock(tp); | 8613 | if (tg3_nvram_lock(tp)) { |
8614 | printk(KERN_WARNING PFX "%s: Cannot get nvarm lock, " | ||
8615 | "tg3_nvram_init failed.\n", tp->dev->name); | ||
8616 | return; | ||
8617 | } | ||
8592 | tg3_enable_nvram_access(tp); | 8618 | tg3_enable_nvram_access(tp); |
8593 | 8619 | ||
8594 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5752) | 8620 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5752) |
@@ -8686,7 +8712,9 @@ static int tg3_nvram_read(struct tg3 *tp, u32 offset, u32 *val) | |||
8686 | if (offset > NVRAM_ADDR_MSK) | 8712 | if (offset > NVRAM_ADDR_MSK) |
8687 | return -EINVAL; | 8713 | return -EINVAL; |
8688 | 8714 | ||
8689 | tg3_nvram_lock(tp); | 8715 | ret = tg3_nvram_lock(tp); |
8716 | if (ret) | ||
8717 | return ret; | ||
8690 | 8718 | ||
8691 | tg3_enable_nvram_access(tp); | 8719 | tg3_enable_nvram_access(tp); |
8692 | 8720 | ||
@@ -8785,10 +8813,6 @@ static int tg3_nvram_write_block_unbuffered(struct tg3 *tp, u32 offset, u32 len, | |||
8785 | 8813 | ||
8786 | offset = offset + (pagesize - page_off); | 8814 | offset = offset + (pagesize - page_off); |
8787 | 8815 | ||
8788 | /* Nvram lock released by tg3_nvram_read() above, | ||
8789 | * so need to get it again. | ||
8790 | */ | ||
8791 | tg3_nvram_lock(tp); | ||
8792 | tg3_enable_nvram_access(tp); | 8816 | tg3_enable_nvram_access(tp); |
8793 | 8817 | ||
8794 | /* | 8818 | /* |
@@ -8925,7 +8949,9 @@ static int tg3_nvram_write_block(struct tg3 *tp, u32 offset, u32 len, u8 *buf) | |||
8925 | else { | 8949 | else { |
8926 | u32 grc_mode; | 8950 | u32 grc_mode; |
8927 | 8951 | ||
8928 | tg3_nvram_lock(tp); | 8952 | ret = tg3_nvram_lock(tp); |
8953 | if (ret) | ||
8954 | return ret; | ||
8929 | 8955 | ||
8930 | tg3_enable_nvram_access(tp); | 8956 | tg3_enable_nvram_access(tp); |
8931 | if ((tp->tg3_flags2 & TG3_FLG2_5750_PLUS) && | 8957 | if ((tp->tg3_flags2 & TG3_FLG2_5750_PLUS) && |
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index 890e1635996b..e8243305f0e8 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h | |||
@@ -2275,6 +2275,7 @@ struct tg3 { | |||
2275 | dma_addr_t stats_mapping; | 2275 | dma_addr_t stats_mapping; |
2276 | struct work_struct reset_task; | 2276 | struct work_struct reset_task; |
2277 | 2277 | ||
2278 | int nvram_lock_cnt; | ||
2278 | u32 nvram_size; | 2279 | u32 nvram_size; |
2279 | u32 nvram_pagesize; | 2280 | u32 nvram_pagesize; |
2280 | u32 nvram_jedecnum; | 2281 | u32 nvram_jedecnum; |
diff --git a/drivers/net/tulip/uli526x.c b/drivers/net/tulip/uli526x.c index 1a4316336256..983981666800 100644 --- a/drivers/net/tulip/uli526x.c +++ b/drivers/net/tulip/uli526x.c | |||
@@ -1689,9 +1689,9 @@ MODULE_AUTHOR("Peer Chen, peer.chen@uli.com.tw"); | |||
1689 | MODULE_DESCRIPTION("ULi M5261/M5263 fast ethernet driver"); | 1689 | MODULE_DESCRIPTION("ULi M5261/M5263 fast ethernet driver"); |
1690 | MODULE_LICENSE("GPL"); | 1690 | MODULE_LICENSE("GPL"); |
1691 | 1691 | ||
1692 | MODULE_PARM(debug, "i"); | 1692 | module_param(debug, int, 0644); |
1693 | MODULE_PARM(mode, "i"); | 1693 | module_param(mode, int, 0); |
1694 | MODULE_PARM(cr6set, "i"); | 1694 | module_param(cr6set, int, 0); |
1695 | MODULE_PARM_DESC(debug, "ULi M5261/M5263 enable debugging (0-1)"); | 1695 | MODULE_PARM_DESC(debug, "ULi M5261/M5263 enable debugging (0-1)"); |
1696 | MODULE_PARM_DESC(mode, "ULi M5261/M5263: Bit 0: 10/100Mbps, bit 2: duplex, bit 8: HomePNA"); | 1696 | MODULE_PARM_DESC(mode, "ULi M5261/M5263: Bit 0: 10/100Mbps, bit 2: duplex, bit 8: HomePNA"); |
1697 | 1697 | ||
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c index 82c6b757d306..c2d5907dc8e0 100644 --- a/drivers/net/via-velocity.c +++ b/drivers/net/via-velocity.c | |||
@@ -791,7 +791,7 @@ static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi | |||
791 | #endif | 791 | #endif |
792 | 792 | ||
793 | if (vptr->flags & VELOCITY_FLAGS_TX_CSUM) { | 793 | if (vptr->flags & VELOCITY_FLAGS_TX_CSUM) { |
794 | dev->features |= NETIF_F_HW_CSUM; | 794 | dev->features |= NETIF_F_IP_CSUM; |
795 | } | 795 | } |
796 | 796 | ||
797 | ret = register_netdev(dev); | 797 | ret = register_netdev(dev); |
diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c index 2b948ea397d5..40926d779161 100644 --- a/drivers/net/wan/lmc/lmc_main.c +++ b/drivers/net/wan/lmc/lmc_main.c | |||
@@ -641,7 +641,7 @@ static void lmc_watchdog (unsigned long data) /*fold00*/ | |||
641 | spin_lock_irqsave(&sc->lmc_lock, flags); | 641 | spin_lock_irqsave(&sc->lmc_lock, flags); |
642 | 642 | ||
643 | if(sc->check != 0xBEAFCAFE){ | 643 | if(sc->check != 0xBEAFCAFE){ |
644 | printk("LMC: Corrupt net_device stuct, breaking out\n"); | 644 | printk("LMC: Corrupt net_device struct, breaking out\n"); |
645 | spin_unlock_irqrestore(&sc->lmc_lock, flags); | 645 | spin_unlock_irqrestore(&sc->lmc_lock, flags); |
646 | return; | 646 | return; |
647 | } | 647 | } |
diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig index 24f7967aab67..233a4f608084 100644 --- a/drivers/net/wireless/Kconfig +++ b/drivers/net/wireless/Kconfig | |||
@@ -24,10 +24,6 @@ config NET_RADIO | |||
24 | the tools from | 24 | the tools from |
25 | <http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html>. | 25 | <http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html>. |
26 | 26 | ||
27 | Some user-level drivers for scarab devices which don't require | ||
28 | special kernel support are available from | ||
29 | <ftp://shadow.cabi.net/pub/Linux/>. | ||
30 | |||
31 | # Note : the cards are obsolete (can't buy them anymore), but the drivers | 27 | # Note : the cards are obsolete (can't buy them anymore), but the drivers |
32 | # are not, as people are still using them... | 28 | # are not, as people are still using them... |
33 | comment "Obsolete Wireless cards support (pre-802.11)" | 29 | comment "Obsolete Wireless cards support (pre-802.11)" |
@@ -160,7 +156,7 @@ config IPW2100 | |||
160 | <http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html>. | 156 | <http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html>. |
161 | 157 | ||
162 | If you want to compile the driver as a module ( = code which can be | 158 | If you want to compile the driver as a module ( = code which can be |
163 | inserted in and remvoed from the running kernel whenever you want), | 159 | inserted in and removed from the running kernel whenever you want), |
164 | say M here and read <file:Documentation/modules.txt>. The module | 160 | say M here and read <file:Documentation/modules.txt>. The module |
165 | will be called ipw2100.ko. | 161 | will be called ipw2100.ko. |
166 | 162 | ||
@@ -213,7 +209,7 @@ config IPW2200 | |||
213 | <http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html>. | 209 | <http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html>. |
214 | 210 | ||
215 | If you want to compile the driver as a module ( = code which can be | 211 | If you want to compile the driver as a module ( = code which can be |
216 | inserted in and remvoed from the running kernel whenever you want), | 212 | inserted in and removed from the running kernel whenever you want), |
217 | say M here and read <file:Documentation/modules.txt>. The module | 213 | say M here and read <file:Documentation/modules.txt>. The module |
218 | will be called ipw2200.ko. | 214 | will be called ipw2200.ko. |
219 | 215 | ||
@@ -243,7 +239,7 @@ config IPW2200_DEBUG | |||
243 | 239 | ||
244 | config AIRO | 240 | config AIRO |
245 | tristate "Cisco/Aironet 34X/35X/4500/4800 ISA and PCI cards" | 241 | tristate "Cisco/Aironet 34X/35X/4500/4800 ISA and PCI cards" |
246 | depends on NET_RADIO && ISA_DMA_API && (PCI || BROKEN) | 242 | depends on NET_RADIO && ISA_DMA_API && CRYPTO && (PCI || BROKEN) |
247 | ---help--- | 243 | ---help--- |
248 | This is the standard Linux driver to support Cisco/Aironet ISA and | 244 | This is the standard Linux driver to support Cisco/Aironet ISA and |
249 | PCI 802.11 wireless cards. | 245 | PCI 802.11 wireless cards. |
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c index e4729ddf29fd..f0ccfef66445 100644 --- a/drivers/net/wireless/atmel.c +++ b/drivers/net/wireless/atmel.c | |||
@@ -1407,6 +1407,17 @@ static int atmel_close(struct net_device *dev) | |||
1407 | { | 1407 | { |
1408 | struct atmel_private *priv = netdev_priv(dev); | 1408 | struct atmel_private *priv = netdev_priv(dev); |
1409 | 1409 | ||
1410 | /* Send event to userspace that we are disassociating */ | ||
1411 | if (priv->station_state == STATION_STATE_READY) { | ||
1412 | union iwreq_data wrqu; | ||
1413 | |||
1414 | wrqu.data.length = 0; | ||
1415 | wrqu.data.flags = 0; | ||
1416 | wrqu.ap_addr.sa_family = ARPHRD_ETHER; | ||
1417 | memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN); | ||
1418 | wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL); | ||
1419 | } | ||
1420 | |||
1410 | atmel_enter_state(priv, STATION_STATE_DOWN); | 1421 | atmel_enter_state(priv, STATION_STATE_DOWN); |
1411 | 1422 | ||
1412 | if (priv->bus_type == BUS_TYPE_PCCARD) | 1423 | if (priv->bus_type == BUS_TYPE_PCCARD) |
@@ -1780,10 +1791,10 @@ static int atmel_set_encode(struct net_device *dev, | |||
1780 | priv->wep_is_on = 1; | 1791 | priv->wep_is_on = 1; |
1781 | priv->exclude_unencrypted = 1; | 1792 | priv->exclude_unencrypted = 1; |
1782 | if (priv->wep_key_len[index] > 5) { | 1793 | if (priv->wep_key_len[index] > 5) { |
1783 | priv->pairwise_cipher_suite = CIPHER_SUITE_WEP_64; | 1794 | priv->pairwise_cipher_suite = CIPHER_SUITE_WEP_128; |
1784 | priv->encryption_level = 2; | 1795 | priv->encryption_level = 2; |
1785 | } else { | 1796 | } else { |
1786 | priv->pairwise_cipher_suite = CIPHER_SUITE_WEP_128; | 1797 | priv->pairwise_cipher_suite = CIPHER_SUITE_WEP_64; |
1787 | priv->encryption_level = 1; | 1798 | priv->encryption_level = 1; |
1788 | } | 1799 | } |
1789 | } | 1800 | } |
@@ -1853,6 +1864,181 @@ static int atmel_get_encode(struct net_device *dev, | |||
1853 | return 0; | 1864 | return 0; |
1854 | } | 1865 | } |
1855 | 1866 | ||
1867 | static int atmel_set_encodeext(struct net_device *dev, | ||
1868 | struct iw_request_info *info, | ||
1869 | union iwreq_data *wrqu, | ||
1870 | char *extra) | ||
1871 | { | ||
1872 | struct atmel_private *priv = netdev_priv(dev); | ||
1873 | struct iw_point *encoding = &wrqu->encoding; | ||
1874 | struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; | ||
1875 | int idx, key_len; | ||
1876 | |||
1877 | /* Determine and validate the key index */ | ||
1878 | idx = encoding->flags & IW_ENCODE_INDEX; | ||
1879 | if (idx) { | ||
1880 | if (idx < 1 || idx > WEP_KEYS) | ||
1881 | return -EINVAL; | ||
1882 | idx--; | ||
1883 | } else | ||
1884 | idx = priv->default_key; | ||
1885 | |||
1886 | if ((encoding->flags & IW_ENCODE_DISABLED) || | ||
1887 | ext->alg == IW_ENCODE_ALG_NONE) { | ||
1888 | priv->wep_is_on = 0; | ||
1889 | priv->encryption_level = 0; | ||
1890 | priv->pairwise_cipher_suite = CIPHER_SUITE_NONE; | ||
1891 | } | ||
1892 | |||
1893 | if (ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY) | ||
1894 | priv->default_key = idx; | ||
1895 | |||
1896 | /* Set the requested key */ | ||
1897 | switch (ext->alg) { | ||
1898 | case IW_ENCODE_ALG_NONE: | ||
1899 | break; | ||
1900 | case IW_ENCODE_ALG_WEP: | ||
1901 | if (ext->key_len > 5) { | ||
1902 | priv->wep_key_len[idx] = 13; | ||
1903 | priv->pairwise_cipher_suite = CIPHER_SUITE_WEP_128; | ||
1904 | priv->encryption_level = 2; | ||
1905 | } else if (ext->key_len > 0) { | ||
1906 | priv->wep_key_len[idx] = 5; | ||
1907 | priv->pairwise_cipher_suite = CIPHER_SUITE_WEP_64; | ||
1908 | priv->encryption_level = 1; | ||
1909 | } else { | ||
1910 | return -EINVAL; | ||
1911 | } | ||
1912 | priv->wep_is_on = 1; | ||
1913 | memset(priv->wep_keys[idx], 0, 13); | ||
1914 | key_len = min ((int)ext->key_len, priv->wep_key_len[idx]); | ||
1915 | memcpy(priv->wep_keys[idx], ext->key, key_len); | ||
1916 | break; | ||
1917 | default: | ||
1918 | return -EINVAL; | ||
1919 | } | ||
1920 | |||
1921 | return -EINPROGRESS; | ||
1922 | } | ||
1923 | |||
1924 | static int atmel_get_encodeext(struct net_device *dev, | ||
1925 | struct iw_request_info *info, | ||
1926 | union iwreq_data *wrqu, | ||
1927 | char *extra) | ||
1928 | { | ||
1929 | struct atmel_private *priv = netdev_priv(dev); | ||
1930 | struct iw_point *encoding = &wrqu->encoding; | ||
1931 | struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; | ||
1932 | int idx, max_key_len; | ||
1933 | |||
1934 | max_key_len = encoding->length - sizeof(*ext); | ||
1935 | if (max_key_len < 0) | ||
1936 | return -EINVAL; | ||
1937 | |||
1938 | idx = encoding->flags & IW_ENCODE_INDEX; | ||
1939 | if (idx) { | ||
1940 | if (idx < 1 || idx > WEP_KEYS) | ||
1941 | return -EINVAL; | ||
1942 | idx--; | ||
1943 | } else | ||
1944 | idx = priv->default_key; | ||
1945 | |||
1946 | encoding->flags = idx + 1; | ||
1947 | memset(ext, 0, sizeof(*ext)); | ||
1948 | |||
1949 | if (!priv->wep_is_on) { | ||
1950 | ext->alg = IW_ENCODE_ALG_NONE; | ||
1951 | ext->key_len = 0; | ||
1952 | encoding->flags |= IW_ENCODE_DISABLED; | ||
1953 | } else { | ||
1954 | if (priv->encryption_level > 0) | ||
1955 | ext->alg = IW_ENCODE_ALG_WEP; | ||
1956 | else | ||
1957 | return -EINVAL; | ||
1958 | |||
1959 | ext->key_len = priv->wep_key_len[idx]; | ||
1960 | memcpy(ext->key, priv->wep_keys[idx], ext->key_len); | ||
1961 | encoding->flags |= IW_ENCODE_ENABLED; | ||
1962 | } | ||
1963 | |||
1964 | return 0; | ||
1965 | } | ||
1966 | |||
1967 | static int atmel_set_auth(struct net_device *dev, | ||
1968 | struct iw_request_info *info, | ||
1969 | union iwreq_data *wrqu, char *extra) | ||
1970 | { | ||
1971 | struct atmel_private *priv = netdev_priv(dev); | ||
1972 | struct iw_param *param = &wrqu->param; | ||
1973 | |||
1974 | switch (param->flags & IW_AUTH_INDEX) { | ||
1975 | case IW_AUTH_WPA_VERSION: | ||
1976 | case IW_AUTH_CIPHER_PAIRWISE: | ||
1977 | case IW_AUTH_CIPHER_GROUP: | ||
1978 | case IW_AUTH_KEY_MGMT: | ||
1979 | case IW_AUTH_RX_UNENCRYPTED_EAPOL: | ||
1980 | case IW_AUTH_PRIVACY_INVOKED: | ||
1981 | /* | ||
1982 | * atmel does not use these parameters | ||
1983 | */ | ||
1984 | break; | ||
1985 | |||
1986 | case IW_AUTH_DROP_UNENCRYPTED: | ||
1987 | priv->exclude_unencrypted = param->value ? 1 : 0; | ||
1988 | break; | ||
1989 | |||
1990 | case IW_AUTH_80211_AUTH_ALG: { | ||
1991 | if (param->value & IW_AUTH_ALG_SHARED_KEY) { | ||
1992 | priv->exclude_unencrypted = 1; | ||
1993 | } else if (param->value & IW_AUTH_ALG_OPEN_SYSTEM) { | ||
1994 | priv->exclude_unencrypted = 0; | ||
1995 | } else | ||
1996 | return -EINVAL; | ||
1997 | break; | ||
1998 | } | ||
1999 | |||
2000 | case IW_AUTH_WPA_ENABLED: | ||
2001 | /* Silently accept disable of WPA */ | ||
2002 | if (param->value > 0) | ||
2003 | return -EOPNOTSUPP; | ||
2004 | break; | ||
2005 | |||
2006 | default: | ||
2007 | return -EOPNOTSUPP; | ||
2008 | } | ||
2009 | return -EINPROGRESS; | ||
2010 | } | ||
2011 | |||
2012 | static int atmel_get_auth(struct net_device *dev, | ||
2013 | struct iw_request_info *info, | ||
2014 | union iwreq_data *wrqu, char *extra) | ||
2015 | { | ||
2016 | struct atmel_private *priv = netdev_priv(dev); | ||
2017 | struct iw_param *param = &wrqu->param; | ||
2018 | |||
2019 | switch (param->flags & IW_AUTH_INDEX) { | ||
2020 | case IW_AUTH_DROP_UNENCRYPTED: | ||
2021 | param->value = priv->exclude_unencrypted; | ||
2022 | break; | ||
2023 | |||
2024 | case IW_AUTH_80211_AUTH_ALG: | ||
2025 | if (priv->exclude_unencrypted == 1) | ||
2026 | param->value = IW_AUTH_ALG_SHARED_KEY; | ||
2027 | else | ||
2028 | param->value = IW_AUTH_ALG_OPEN_SYSTEM; | ||
2029 | break; | ||
2030 | |||
2031 | case IW_AUTH_WPA_ENABLED: | ||
2032 | param->value = 0; | ||
2033 | break; | ||
2034 | |||
2035 | default: | ||
2036 | return -EOPNOTSUPP; | ||
2037 | } | ||
2038 | return 0; | ||
2039 | } | ||
2040 | |||
2041 | |||
1856 | static int atmel_get_name(struct net_device *dev, | 2042 | static int atmel_get_name(struct net_device *dev, |
1857 | struct iw_request_info *info, | 2043 | struct iw_request_info *info, |
1858 | char *cwrq, | 2044 | char *cwrq, |
@@ -2289,13 +2475,15 @@ static int atmel_set_wap(struct net_device *dev, | |||
2289 | { | 2475 | { |
2290 | struct atmel_private *priv = netdev_priv(dev); | 2476 | struct atmel_private *priv = netdev_priv(dev); |
2291 | int i; | 2477 | int i; |
2292 | static const u8 bcast[] = { 255, 255, 255, 255, 255, 255 }; | 2478 | static const u8 any[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; |
2479 | static const u8 off[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; | ||
2293 | unsigned long flags; | 2480 | unsigned long flags; |
2294 | 2481 | ||
2295 | if (awrq->sa_family != ARPHRD_ETHER) | 2482 | if (awrq->sa_family != ARPHRD_ETHER) |
2296 | return -EINVAL; | 2483 | return -EINVAL; |
2297 | 2484 | ||
2298 | if (memcmp(bcast, awrq->sa_data, 6) == 0) { | 2485 | if (!memcmp(any, awrq->sa_data, 6) || |
2486 | !memcmp(off, awrq->sa_data, 6)) { | ||
2299 | del_timer_sync(&priv->management_timer); | 2487 | del_timer_sync(&priv->management_timer); |
2300 | spin_lock_irqsave(&priv->irqlock, flags); | 2488 | spin_lock_irqsave(&priv->irqlock, flags); |
2301 | atmel_scan(priv, 1); | 2489 | atmel_scan(priv, 1); |
@@ -2378,6 +2566,15 @@ static const iw_handler atmel_handler[] = | |||
2378 | (iw_handler) atmel_get_encode, /* SIOCGIWENCODE */ | 2566 | (iw_handler) atmel_get_encode, /* SIOCGIWENCODE */ |
2379 | (iw_handler) atmel_set_power, /* SIOCSIWPOWER */ | 2567 | (iw_handler) atmel_set_power, /* SIOCSIWPOWER */ |
2380 | (iw_handler) atmel_get_power, /* SIOCGIWPOWER */ | 2568 | (iw_handler) atmel_get_power, /* SIOCGIWPOWER */ |
2569 | (iw_handler) NULL, /* -- hole -- */ | ||
2570 | (iw_handler) NULL, /* -- hole -- */ | ||
2571 | (iw_handler) NULL, /* SIOCSIWGENIE */ | ||
2572 | (iw_handler) NULL, /* SIOCGIWGENIE */ | ||
2573 | (iw_handler) atmel_set_auth, /* SIOCSIWAUTH */ | ||
2574 | (iw_handler) atmel_get_auth, /* SIOCGIWAUTH */ | ||
2575 | (iw_handler) atmel_set_encodeext, /* SIOCSIWENCODEEXT */ | ||
2576 | (iw_handler) atmel_get_encodeext, /* SIOCGIWENCODEEXT */ | ||
2577 | (iw_handler) NULL, /* SIOCSIWPMKSA */ | ||
2381 | }; | 2578 | }; |
2382 | 2579 | ||
2383 | static const iw_handler atmel_private_handler[] = | 2580 | static const iw_handler atmel_private_handler[] = |
@@ -2924,6 +3121,8 @@ static void associate(struct atmel_private *priv, u16 frame_len, u16 subtype) | |||
2924 | u16 ass_id = le16_to_cpu(ass_resp->ass_id); | 3121 | u16 ass_id = le16_to_cpu(ass_resp->ass_id); |
2925 | u16 rates_len = ass_resp->length > 4 ? 4 : ass_resp->length; | 3122 | u16 rates_len = ass_resp->length > 4 ? 4 : ass_resp->length; |
2926 | 3123 | ||
3124 | union iwreq_data wrqu; | ||
3125 | |||
2927 | if (frame_len < 8 + rates_len) | 3126 | if (frame_len < 8 + rates_len) |
2928 | return; | 3127 | return; |
2929 | 3128 | ||
@@ -2954,6 +3153,14 @@ static void associate(struct atmel_private *priv, u16 frame_len, u16 subtype) | |||
2954 | priv->station_is_associated = 1; | 3153 | priv->station_is_associated = 1; |
2955 | priv->station_was_associated = 1; | 3154 | priv->station_was_associated = 1; |
2956 | atmel_enter_state(priv, STATION_STATE_READY); | 3155 | atmel_enter_state(priv, STATION_STATE_READY); |
3156 | |||
3157 | /* Send association event to userspace */ | ||
3158 | wrqu.data.length = 0; | ||
3159 | wrqu.data.flags = 0; | ||
3160 | memcpy(wrqu.ap_addr.sa_data, priv->CurrentBSSID, ETH_ALEN); | ||
3161 | wrqu.ap_addr.sa_family = ARPHRD_ETHER; | ||
3162 | wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL); | ||
3163 | |||
2957 | return; | 3164 | return; |
2958 | } | 3165 | } |
2959 | 3166 | ||
@@ -3632,6 +3839,7 @@ static int reset_atmel_card(struct net_device *dev) | |||
3632 | 3839 | ||
3633 | struct atmel_private *priv = netdev_priv(dev); | 3840 | struct atmel_private *priv = netdev_priv(dev); |
3634 | u8 configuration; | 3841 | u8 configuration; |
3842 | int old_state = priv->station_state; | ||
3635 | 3843 | ||
3636 | /* data to add to the firmware names, in priority order | 3844 | /* data to add to the firmware names, in priority order |
3637 | this implemenents firmware versioning */ | 3845 | this implemenents firmware versioning */ |
@@ -3792,6 +4000,17 @@ static int reset_atmel_card(struct net_device *dev) | |||
3792 | else | 4000 | else |
3793 | build_wep_mib(priv); | 4001 | build_wep_mib(priv); |
3794 | 4002 | ||
4003 | if (old_state == STATION_STATE_READY) | ||
4004 | { | ||
4005 | union iwreq_data wrqu; | ||
4006 | |||
4007 | wrqu.data.length = 0; | ||
4008 | wrqu.data.flags = 0; | ||
4009 | wrqu.ap_addr.sa_family = ARPHRD_ETHER; | ||
4010 | memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN); | ||
4011 | wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL); | ||
4012 | } | ||
4013 | |||
3795 | return 1; | 4014 | return 1; |
3796 | } | 4015 | } |
3797 | 4016 | ||
diff --git a/drivers/net/wireless/hostap/hostap_80211_rx.c b/drivers/net/wireless/hostap/hostap_80211_rx.c index ffac50899454..4b13b76425c1 100644 --- a/drivers/net/wireless/hostap/hostap_80211_rx.c +++ b/drivers/net/wireless/hostap/hostap_80211_rx.c | |||
@@ -435,7 +435,7 @@ static void hostap_rx_sta_beacon(local_info_t *local, struct sk_buff *skb, | |||
435 | } | 435 | } |
436 | 436 | ||
437 | 437 | ||
438 | static inline int | 438 | static int |
439 | hostap_rx_frame_mgmt(local_info_t *local, struct sk_buff *skb, | 439 | hostap_rx_frame_mgmt(local_info_t *local, struct sk_buff *skb, |
440 | struct hostap_80211_rx_status *rx_stats, u16 type, | 440 | struct hostap_80211_rx_status *rx_stats, u16 type, |
441 | u16 stype) | 441 | u16 stype) |
@@ -499,7 +499,7 @@ hostap_rx_frame_mgmt(local_info_t *local, struct sk_buff *skb, | |||
499 | 499 | ||
500 | 500 | ||
501 | /* Called only as a tasklet (software IRQ) */ | 501 | /* Called only as a tasklet (software IRQ) */ |
502 | static inline struct net_device *prism2_rx_get_wds(local_info_t *local, | 502 | static struct net_device *prism2_rx_get_wds(local_info_t *local, |
503 | u8 *addr) | 503 | u8 *addr) |
504 | { | 504 | { |
505 | struct hostap_interface *iface = NULL; | 505 | struct hostap_interface *iface = NULL; |
@@ -519,7 +519,7 @@ static inline struct net_device *prism2_rx_get_wds(local_info_t *local, | |||
519 | } | 519 | } |
520 | 520 | ||
521 | 521 | ||
522 | static inline int | 522 | static int |
523 | hostap_rx_frame_wds(local_info_t *local, struct ieee80211_hdr_4addr *hdr, | 523 | hostap_rx_frame_wds(local_info_t *local, struct ieee80211_hdr_4addr *hdr, |
524 | u16 fc, struct net_device **wds) | 524 | u16 fc, struct net_device **wds) |
525 | { | 525 | { |
@@ -615,7 +615,7 @@ static int hostap_is_eapol_frame(local_info_t *local, struct sk_buff *skb) | |||
615 | 615 | ||
616 | 616 | ||
617 | /* Called only as a tasklet (software IRQ) */ | 617 | /* Called only as a tasklet (software IRQ) */ |
618 | static inline int | 618 | static int |
619 | hostap_rx_frame_decrypt(local_info_t *local, struct sk_buff *skb, | 619 | hostap_rx_frame_decrypt(local_info_t *local, struct sk_buff *skb, |
620 | struct ieee80211_crypt_data *crypt) | 620 | struct ieee80211_crypt_data *crypt) |
621 | { | 621 | { |
@@ -654,7 +654,7 @@ hostap_rx_frame_decrypt(local_info_t *local, struct sk_buff *skb, | |||
654 | 654 | ||
655 | 655 | ||
656 | /* Called only as a tasklet (software IRQ) */ | 656 | /* Called only as a tasklet (software IRQ) */ |
657 | static inline int | 657 | static int |
658 | hostap_rx_frame_decrypt_msdu(local_info_t *local, struct sk_buff *skb, | 658 | hostap_rx_frame_decrypt_msdu(local_info_t *local, struct sk_buff *skb, |
659 | int keyidx, struct ieee80211_crypt_data *crypt) | 659 | int keyidx, struct ieee80211_crypt_data *crypt) |
660 | { | 660 | { |
diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c index abfae7fedebc..b1f142d9e232 100644 --- a/drivers/net/wireless/hostap/hostap_hw.c +++ b/drivers/net/wireless/hostap/hostap_hw.c | |||
@@ -253,7 +253,7 @@ static void prism2_clear_cmd_queue(local_info_t *local) | |||
253 | * @dev: pointer to net_device | 253 | * @dev: pointer to net_device |
254 | * @entry: Prism2 command queue entry to be issued | 254 | * @entry: Prism2 command queue entry to be issued |
255 | */ | 255 | */ |
256 | static inline int hfa384x_cmd_issue(struct net_device *dev, | 256 | static int hfa384x_cmd_issue(struct net_device *dev, |
257 | struct hostap_cmd_queue *entry) | 257 | struct hostap_cmd_queue *entry) |
258 | { | 258 | { |
259 | struct hostap_interface *iface; | 259 | struct hostap_interface *iface; |
@@ -743,7 +743,7 @@ static void prism2_cmd_ev(struct net_device *dev) | |||
743 | } | 743 | } |
744 | 744 | ||
745 | 745 | ||
746 | static inline int hfa384x_wait_offset(struct net_device *dev, u16 o_off) | 746 | static int hfa384x_wait_offset(struct net_device *dev, u16 o_off) |
747 | { | 747 | { |
748 | int tries = HFA384X_BAP_BUSY_TIMEOUT; | 748 | int tries = HFA384X_BAP_BUSY_TIMEOUT; |
749 | int res = HFA384X_INW(o_off) & HFA384X_OFFSET_BUSY; | 749 | int res = HFA384X_INW(o_off) & HFA384X_OFFSET_BUSY; |
@@ -1904,7 +1904,7 @@ fail: | |||
1904 | * and will try to get the correct fid eventually. */ | 1904 | * and will try to get the correct fid eventually. */ |
1905 | #define EXTRA_FID_READ_TESTS | 1905 | #define EXTRA_FID_READ_TESTS |
1906 | 1906 | ||
1907 | static inline u16 prism2_read_fid_reg(struct net_device *dev, u16 reg) | 1907 | static u16 prism2_read_fid_reg(struct net_device *dev, u16 reg) |
1908 | { | 1908 | { |
1909 | #ifdef EXTRA_FID_READ_TESTS | 1909 | #ifdef EXTRA_FID_READ_TESTS |
1910 | u16 val, val2, val3; | 1910 | u16 val, val2, val3; |
@@ -2581,7 +2581,7 @@ static void prism2_ev_tick(struct net_device *dev) | |||
2581 | 2581 | ||
2582 | 2582 | ||
2583 | /* Called only from hardware IRQ */ | 2583 | /* Called only from hardware IRQ */ |
2584 | static inline void prism2_check_magic(local_info_t *local) | 2584 | static void prism2_check_magic(local_info_t *local) |
2585 | { | 2585 | { |
2586 | /* at least PCI Prism2.5 with bus mastering seems to sometimes | 2586 | /* at least PCI Prism2.5 with bus mastering seems to sometimes |
2587 | * return 0x0000 in SWSUPPORT0 for unknown reason, but re-reading the | 2587 | * return 0x0000 in SWSUPPORT0 for unknown reason, but re-reading the |
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c index cf05661fb1bd..7518384f34d9 100644 --- a/drivers/net/wireless/ipw2100.c +++ b/drivers/net/wireless/ipw2100.c | |||
@@ -411,7 +411,7 @@ static inline void write_nic_dword_auto_inc(struct net_device *dev, u32 val) | |||
411 | write_register(dev, IPW_REG_AUTOINCREMENT_DATA, val); | 411 | write_register(dev, IPW_REG_AUTOINCREMENT_DATA, val); |
412 | } | 412 | } |
413 | 413 | ||
414 | static inline void write_nic_memory(struct net_device *dev, u32 addr, u32 len, | 414 | static void write_nic_memory(struct net_device *dev, u32 addr, u32 len, |
415 | const u8 * buf) | 415 | const u8 * buf) |
416 | { | 416 | { |
417 | u32 aligned_addr; | 417 | u32 aligned_addr; |
@@ -449,7 +449,7 @@ static inline void write_nic_memory(struct net_device *dev, u32 addr, u32 len, | |||
449 | *buf); | 449 | *buf); |
450 | } | 450 | } |
451 | 451 | ||
452 | static inline void read_nic_memory(struct net_device *dev, u32 addr, u32 len, | 452 | static void read_nic_memory(struct net_device *dev, u32 addr, u32 len, |
453 | u8 * buf) | 453 | u8 * buf) |
454 | { | 454 | { |
455 | u32 aligned_addr; | 455 | u32 aligned_addr; |
@@ -657,7 +657,7 @@ static void printk_buf(int level, const u8 * data, u32 len) | |||
657 | 657 | ||
658 | #define MAX_RESET_BACKOFF 10 | 658 | #define MAX_RESET_BACKOFF 10 |
659 | 659 | ||
660 | static inline void schedule_reset(struct ipw2100_priv *priv) | 660 | static void schedule_reset(struct ipw2100_priv *priv) |
661 | { | 661 | { |
662 | unsigned long now = get_seconds(); | 662 | unsigned long now = get_seconds(); |
663 | 663 | ||
@@ -1130,7 +1130,7 @@ static inline void ipw2100_hw_set_gpio(struct ipw2100_priv *priv) | |||
1130 | write_register(priv->net_dev, IPW_REG_GPIO, reg); | 1130 | write_register(priv->net_dev, IPW_REG_GPIO, reg); |
1131 | } | 1131 | } |
1132 | 1132 | ||
1133 | static inline int rf_kill_active(struct ipw2100_priv *priv) | 1133 | static int rf_kill_active(struct ipw2100_priv *priv) |
1134 | { | 1134 | { |
1135 | #define MAX_RF_KILL_CHECKS 5 | 1135 | #define MAX_RF_KILL_CHECKS 5 |
1136 | #define RF_KILL_CHECK_DELAY 40 | 1136 | #define RF_KILL_CHECK_DELAY 40 |
@@ -2177,7 +2177,7 @@ static const char *frame_types[] = { | |||
2177 | }; | 2177 | }; |
2178 | #endif | 2178 | #endif |
2179 | 2179 | ||
2180 | static inline int ipw2100_alloc_skb(struct ipw2100_priv *priv, | 2180 | static int ipw2100_alloc_skb(struct ipw2100_priv *priv, |
2181 | struct ipw2100_rx_packet *packet) | 2181 | struct ipw2100_rx_packet *packet) |
2182 | { | 2182 | { |
2183 | packet->skb = dev_alloc_skb(sizeof(struct ipw2100_rx)); | 2183 | packet->skb = dev_alloc_skb(sizeof(struct ipw2100_rx)); |
@@ -2201,7 +2201,7 @@ static inline int ipw2100_alloc_skb(struct ipw2100_priv *priv, | |||
2201 | #define SEARCH_SNAPSHOT 1 | 2201 | #define SEARCH_SNAPSHOT 1 |
2202 | 2202 | ||
2203 | #define SNAPSHOT_ADDR(ofs) (priv->snapshot[((ofs) >> 12) & 0xff] + ((ofs) & 0xfff)) | 2203 | #define SNAPSHOT_ADDR(ofs) (priv->snapshot[((ofs) >> 12) & 0xff] + ((ofs) & 0xfff)) |
2204 | static inline int ipw2100_snapshot_alloc(struct ipw2100_priv *priv) | 2204 | static int ipw2100_snapshot_alloc(struct ipw2100_priv *priv) |
2205 | { | 2205 | { |
2206 | int i; | 2206 | int i; |
2207 | if (priv->snapshot[0]) | 2207 | if (priv->snapshot[0]) |
@@ -2221,7 +2221,7 @@ static inline int ipw2100_snapshot_alloc(struct ipw2100_priv *priv) | |||
2221 | return 1; | 2221 | return 1; |
2222 | } | 2222 | } |
2223 | 2223 | ||
2224 | static inline void ipw2100_snapshot_free(struct ipw2100_priv *priv) | 2224 | static void ipw2100_snapshot_free(struct ipw2100_priv *priv) |
2225 | { | 2225 | { |
2226 | int i; | 2226 | int i; |
2227 | if (!priv->snapshot[0]) | 2227 | if (!priv->snapshot[0]) |
@@ -2231,7 +2231,7 @@ static inline void ipw2100_snapshot_free(struct ipw2100_priv *priv) | |||
2231 | priv->snapshot[0] = NULL; | 2231 | priv->snapshot[0] = NULL; |
2232 | } | 2232 | } |
2233 | 2233 | ||
2234 | static inline u32 ipw2100_match_buf(struct ipw2100_priv *priv, u8 * in_buf, | 2234 | static u32 ipw2100_match_buf(struct ipw2100_priv *priv, u8 * in_buf, |
2235 | size_t len, int mode) | 2235 | size_t len, int mode) |
2236 | { | 2236 | { |
2237 | u32 i, j; | 2237 | u32 i, j; |
@@ -2288,7 +2288,7 @@ static inline u32 ipw2100_match_buf(struct ipw2100_priv *priv, u8 * in_buf, | |||
2288 | static u8 packet_data[IPW_RX_NIC_BUFFER_LENGTH]; | 2288 | static u8 packet_data[IPW_RX_NIC_BUFFER_LENGTH]; |
2289 | #endif | 2289 | #endif |
2290 | 2290 | ||
2291 | static inline void ipw2100_corruption_detected(struct ipw2100_priv *priv, int i) | 2291 | static void ipw2100_corruption_detected(struct ipw2100_priv *priv, int i) |
2292 | { | 2292 | { |
2293 | #ifdef CONFIG_IPW2100_DEBUG_C3 | 2293 | #ifdef CONFIG_IPW2100_DEBUG_C3 |
2294 | struct ipw2100_status *status = &priv->status_queue.drv[i]; | 2294 | struct ipw2100_status *status = &priv->status_queue.drv[i]; |
@@ -2346,7 +2346,7 @@ static inline void ipw2100_corruption_detected(struct ipw2100_priv *priv, int i) | |||
2346 | schedule_reset(priv); | 2346 | schedule_reset(priv); |
2347 | } | 2347 | } |
2348 | 2348 | ||
2349 | static inline void isr_rx(struct ipw2100_priv *priv, int i, | 2349 | static void isr_rx(struct ipw2100_priv *priv, int i, |
2350 | struct ieee80211_rx_stats *stats) | 2350 | struct ieee80211_rx_stats *stats) |
2351 | { | 2351 | { |
2352 | struct ipw2100_status *status = &priv->status_queue.drv[i]; | 2352 | struct ipw2100_status *status = &priv->status_queue.drv[i]; |
@@ -2425,7 +2425,7 @@ static inline void isr_rx(struct ipw2100_priv *priv, int i, | |||
2425 | priv->rx_queue.drv[i].host_addr = packet->dma_addr; | 2425 | priv->rx_queue.drv[i].host_addr = packet->dma_addr; |
2426 | } | 2426 | } |
2427 | 2427 | ||
2428 | static inline int ipw2100_corruption_check(struct ipw2100_priv *priv, int i) | 2428 | static int ipw2100_corruption_check(struct ipw2100_priv *priv, int i) |
2429 | { | 2429 | { |
2430 | struct ipw2100_status *status = &priv->status_queue.drv[i]; | 2430 | struct ipw2100_status *status = &priv->status_queue.drv[i]; |
2431 | struct ipw2100_rx *u = priv->rx_buffers[i].rxp; | 2431 | struct ipw2100_rx *u = priv->rx_buffers[i].rxp; |
@@ -2481,7 +2481,7 @@ static inline int ipw2100_corruption_check(struct ipw2100_priv *priv, int i) | |||
2481 | * The WRITE index is cached in the variable 'priv->rx_queue.next'. | 2481 | * The WRITE index is cached in the variable 'priv->rx_queue.next'. |
2482 | * | 2482 | * |
2483 | */ | 2483 | */ |
2484 | static inline void __ipw2100_rx_process(struct ipw2100_priv *priv) | 2484 | static void __ipw2100_rx_process(struct ipw2100_priv *priv) |
2485 | { | 2485 | { |
2486 | struct ipw2100_bd_queue *rxq = &priv->rx_queue; | 2486 | struct ipw2100_bd_queue *rxq = &priv->rx_queue; |
2487 | struct ipw2100_status_queue *sq = &priv->status_queue; | 2487 | struct ipw2100_status_queue *sq = &priv->status_queue; |
@@ -2634,7 +2634,7 @@ static inline void __ipw2100_rx_process(struct ipw2100_priv *priv) | |||
2634 | * for use by future command and data packets. | 2634 | * for use by future command and data packets. |
2635 | * | 2635 | * |
2636 | */ | 2636 | */ |
2637 | static inline int __ipw2100_tx_process(struct ipw2100_priv *priv) | 2637 | static int __ipw2100_tx_process(struct ipw2100_priv *priv) |
2638 | { | 2638 | { |
2639 | struct ipw2100_bd_queue *txq = &priv->tx_queue; | 2639 | struct ipw2100_bd_queue *txq = &priv->tx_queue; |
2640 | struct ipw2100_bd *tbd; | 2640 | struct ipw2100_bd *tbd; |
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index cdfe50207757..819be2b6b7df 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c | |||
@@ -813,7 +813,7 @@ static void ipw_bg_led_link_off(void *data) | |||
813 | up(&priv->sem); | 813 | up(&priv->sem); |
814 | } | 814 | } |
815 | 815 | ||
816 | static inline void __ipw_led_activity_on(struct ipw_priv *priv) | 816 | static void __ipw_led_activity_on(struct ipw_priv *priv) |
817 | { | 817 | { |
818 | u32 led; | 818 | u32 led; |
819 | 819 | ||
@@ -1508,7 +1508,7 @@ static ssize_t store_direct_dword(struct device *d, | |||
1508 | static DEVICE_ATTR(direct_dword, S_IWUSR | S_IRUGO, | 1508 | static DEVICE_ATTR(direct_dword, S_IWUSR | S_IRUGO, |
1509 | show_direct_dword, store_direct_dword); | 1509 | show_direct_dword, store_direct_dword); |
1510 | 1510 | ||
1511 | static inline int rf_kill_active(struct ipw_priv *priv) | 1511 | static int rf_kill_active(struct ipw_priv *priv) |
1512 | { | 1512 | { |
1513 | if (0 == (ipw_read32(priv, 0x30) & 0x10000)) | 1513 | if (0 == (ipw_read32(priv, 0x30) & 0x10000)) |
1514 | priv->status |= STATUS_RF_KILL_HW; | 1514 | priv->status |= STATUS_RF_KILL_HW; |
@@ -2359,7 +2359,7 @@ static inline void eeprom_write_reg(struct ipw_priv *p, u32 data) | |||
2359 | } | 2359 | } |
2360 | 2360 | ||
2361 | /* perform a chip select operation */ | 2361 | /* perform a chip select operation */ |
2362 | static inline void eeprom_cs(struct ipw_priv *priv) | 2362 | static void eeprom_cs(struct ipw_priv *priv) |
2363 | { | 2363 | { |
2364 | eeprom_write_reg(priv, 0); | 2364 | eeprom_write_reg(priv, 0); |
2365 | eeprom_write_reg(priv, EEPROM_BIT_CS); | 2365 | eeprom_write_reg(priv, EEPROM_BIT_CS); |
@@ -2368,7 +2368,7 @@ static inline void eeprom_cs(struct ipw_priv *priv) | |||
2368 | } | 2368 | } |
2369 | 2369 | ||
2370 | /* perform a chip select operation */ | 2370 | /* perform a chip select operation */ |
2371 | static inline void eeprom_disable_cs(struct ipw_priv *priv) | 2371 | static void eeprom_disable_cs(struct ipw_priv *priv) |
2372 | { | 2372 | { |
2373 | eeprom_write_reg(priv, EEPROM_BIT_CS); | 2373 | eeprom_write_reg(priv, EEPROM_BIT_CS); |
2374 | eeprom_write_reg(priv, 0); | 2374 | eeprom_write_reg(priv, 0); |
@@ -2475,7 +2475,7 @@ static void ipw_eeprom_init_sram(struct ipw_priv *priv) | |||
2475 | IPW_DEBUG_TRACE("<<\n"); | 2475 | IPW_DEBUG_TRACE("<<\n"); |
2476 | } | 2476 | } |
2477 | 2477 | ||
2478 | static inline void ipw_zero_memory(struct ipw_priv *priv, u32 start, u32 count) | 2478 | static void ipw_zero_memory(struct ipw_priv *priv, u32 start, u32 count) |
2479 | { | 2479 | { |
2480 | count >>= 2; | 2480 | count >>= 2; |
2481 | if (!count) | 2481 | if (!count) |
@@ -2772,7 +2772,7 @@ static inline int ipw_alive(struct ipw_priv *priv) | |||
2772 | return ipw_read32(priv, 0x90) == 0xd55555d5; | 2772 | return ipw_read32(priv, 0x90) == 0xd55555d5; |
2773 | } | 2773 | } |
2774 | 2774 | ||
2775 | static inline int ipw_poll_bit(struct ipw_priv *priv, u32 addr, u32 mask, | 2775 | static int ipw_poll_bit(struct ipw_priv *priv, u32 addr, u32 mask, |
2776 | int timeout) | 2776 | int timeout) |
2777 | { | 2777 | { |
2778 | int i = 0; | 2778 | int i = 0; |
@@ -3150,7 +3150,7 @@ static int ipw_get_fw(struct ipw_priv *priv, | |||
3150 | 3150 | ||
3151 | #define IPW_RX_BUF_SIZE (3000) | 3151 | #define IPW_RX_BUF_SIZE (3000) |
3152 | 3152 | ||
3153 | static inline void ipw_rx_queue_reset(struct ipw_priv *priv, | 3153 | static void ipw_rx_queue_reset(struct ipw_priv *priv, |
3154 | struct ipw_rx_queue *rxq) | 3154 | struct ipw_rx_queue *rxq) |
3155 | { | 3155 | { |
3156 | unsigned long flags; | 3156 | unsigned long flags; |
@@ -3608,7 +3608,7 @@ static void ipw_tx_queue_free(struct ipw_priv *priv) | |||
3608 | ipw_queue_tx_free(priv, &priv->txq[3]); | 3608 | ipw_queue_tx_free(priv, &priv->txq[3]); |
3609 | } | 3609 | } |
3610 | 3610 | ||
3611 | static inline void ipw_create_bssid(struct ipw_priv *priv, u8 * bssid) | 3611 | static void ipw_create_bssid(struct ipw_priv *priv, u8 * bssid) |
3612 | { | 3612 | { |
3613 | /* First 3 bytes are manufacturer */ | 3613 | /* First 3 bytes are manufacturer */ |
3614 | bssid[0] = priv->mac_addr[0]; | 3614 | bssid[0] = priv->mac_addr[0]; |
@@ -3622,7 +3622,7 @@ static inline void ipw_create_bssid(struct ipw_priv *priv, u8 * bssid) | |||
3622 | bssid[0] |= 0x02; /* set local assignment bit (IEEE802) */ | 3622 | bssid[0] |= 0x02; /* set local assignment bit (IEEE802) */ |
3623 | } | 3623 | } |
3624 | 3624 | ||
3625 | static inline u8 ipw_add_station(struct ipw_priv *priv, u8 * bssid) | 3625 | static u8 ipw_add_station(struct ipw_priv *priv, u8 * bssid) |
3626 | { | 3626 | { |
3627 | struct ipw_station_entry entry; | 3627 | struct ipw_station_entry entry; |
3628 | int i; | 3628 | int i; |
@@ -3655,7 +3655,7 @@ static inline u8 ipw_add_station(struct ipw_priv *priv, u8 * bssid) | |||
3655 | return i; | 3655 | return i; |
3656 | } | 3656 | } |
3657 | 3657 | ||
3658 | static inline u8 ipw_find_station(struct ipw_priv *priv, u8 * bssid) | 3658 | static u8 ipw_find_station(struct ipw_priv *priv, u8 * bssid) |
3659 | { | 3659 | { |
3660 | int i; | 3660 | int i; |
3661 | 3661 | ||
@@ -3794,7 +3794,7 @@ static void inline average_init(struct average *avg) | |||
3794 | memset(avg, 0, sizeof(*avg)); | 3794 | memset(avg, 0, sizeof(*avg)); |
3795 | } | 3795 | } |
3796 | 3796 | ||
3797 | static void inline average_add(struct average *avg, s16 val) | 3797 | static void average_add(struct average *avg, s16 val) |
3798 | { | 3798 | { |
3799 | avg->sum -= avg->entries[avg->pos]; | 3799 | avg->sum -= avg->entries[avg->pos]; |
3800 | avg->sum += val; | 3800 | avg->sum += val; |
@@ -3805,7 +3805,7 @@ static void inline average_add(struct average *avg, s16 val) | |||
3805 | } | 3805 | } |
3806 | } | 3806 | } |
3807 | 3807 | ||
3808 | static s16 inline average_value(struct average *avg) | 3808 | static s16 average_value(struct average *avg) |
3809 | { | 3809 | { |
3810 | if (!unlikely(avg->init)) { | 3810 | if (!unlikely(avg->init)) { |
3811 | if (avg->pos) | 3811 | if (avg->pos) |
@@ -3847,7 +3847,7 @@ static void ipw_reset_stats(struct ipw_priv *priv) | |||
3847 | 3847 | ||
3848 | } | 3848 | } |
3849 | 3849 | ||
3850 | static inline u32 ipw_get_max_rate(struct ipw_priv *priv) | 3850 | static u32 ipw_get_max_rate(struct ipw_priv *priv) |
3851 | { | 3851 | { |
3852 | u32 i = 0x80000000; | 3852 | u32 i = 0x80000000; |
3853 | u32 mask = priv->rates_mask; | 3853 | u32 mask = priv->rates_mask; |
@@ -4087,7 +4087,7 @@ static void ipw_bg_gather_stats(void *data) | |||
4087 | * roaming_threshold -> disassociate_threshold, scan and roam for better signal. | 4087 | * roaming_threshold -> disassociate_threshold, scan and roam for better signal. |
4088 | * Above disassociate threshold, give up and stop scanning. | 4088 | * Above disassociate threshold, give up and stop scanning. |
4089 | * Roaming is disabled if disassociate_threshold <= roaming_threshold */ | 4089 | * Roaming is disabled if disassociate_threshold <= roaming_threshold */ |
4090 | static inline void ipw_handle_missed_beacon(struct ipw_priv *priv, | 4090 | static void ipw_handle_missed_beacon(struct ipw_priv *priv, |
4091 | int missed_count) | 4091 | int missed_count) |
4092 | { | 4092 | { |
4093 | priv->notif_missed_beacons = missed_count; | 4093 | priv->notif_missed_beacons = missed_count; |
@@ -4157,7 +4157,7 @@ static inline void ipw_handle_missed_beacon(struct ipw_priv *priv, | |||
4157 | * Handle host notification packet. | 4157 | * Handle host notification packet. |
4158 | * Called from interrupt routine | 4158 | * Called from interrupt routine |
4159 | */ | 4159 | */ |
4160 | static inline void ipw_rx_notification(struct ipw_priv *priv, | 4160 | static void ipw_rx_notification(struct ipw_priv *priv, |
4161 | struct ipw_rx_notification *notif) | 4161 | struct ipw_rx_notification *notif) |
4162 | { | 4162 | { |
4163 | notif->size = le16_to_cpu(notif->size); | 4163 | notif->size = le16_to_cpu(notif->size); |
@@ -5095,7 +5095,7 @@ static int ipw_compatible_rates(struct ipw_priv *priv, | |||
5095 | return 1; | 5095 | return 1; |
5096 | } | 5096 | } |
5097 | 5097 | ||
5098 | static inline void ipw_copy_rates(struct ipw_supported_rates *dest, | 5098 | static void ipw_copy_rates(struct ipw_supported_rates *dest, |
5099 | const struct ipw_supported_rates *src) | 5099 | const struct ipw_supported_rates *src) |
5100 | { | 5100 | { |
5101 | u8 i; | 5101 | u8 i; |
@@ -5856,7 +5856,7 @@ static void ipw_debug_config(struct ipw_priv *priv) | |||
5856 | #define ipw_debug_config(x) do {} while (0) | 5856 | #define ipw_debug_config(x) do {} while (0) |
5857 | #endif | 5857 | #endif |
5858 | 5858 | ||
5859 | static inline void ipw_set_fixed_rate(struct ipw_priv *priv, int mode) | 5859 | static void ipw_set_fixed_rate(struct ipw_priv *priv, int mode) |
5860 | { | 5860 | { |
5861 | /* TODO: Verify that this works... */ | 5861 | /* TODO: Verify that this works... */ |
5862 | struct ipw_fixed_rate fr = { | 5862 | struct ipw_fixed_rate fr = { |
@@ -7634,7 +7634,7 @@ static void ipw_handle_data_packet_monitor(struct ipw_priv *priv, | |||
7634 | } | 7634 | } |
7635 | #endif | 7635 | #endif |
7636 | 7636 | ||
7637 | static inline int is_network_packet(struct ipw_priv *priv, | 7637 | static int is_network_packet(struct ipw_priv *priv, |
7638 | struct ieee80211_hdr_4addr *header) | 7638 | struct ieee80211_hdr_4addr *header) |
7639 | { | 7639 | { |
7640 | /* Filter incoming packets to determine if they are targetted toward | 7640 | /* Filter incoming packets to determine if they are targetted toward |
@@ -7672,7 +7672,7 @@ static inline int is_network_packet(struct ipw_priv *priv, | |||
7672 | 7672 | ||
7673 | #define IPW_PACKET_RETRY_TIME HZ | 7673 | #define IPW_PACKET_RETRY_TIME HZ |
7674 | 7674 | ||
7675 | static inline int is_duplicate_packet(struct ipw_priv *priv, | 7675 | static int is_duplicate_packet(struct ipw_priv *priv, |
7676 | struct ieee80211_hdr_4addr *header) | 7676 | struct ieee80211_hdr_4addr *header) |
7677 | { | 7677 | { |
7678 | u16 sc = le16_to_cpu(header->seq_ctl); | 7678 | u16 sc = le16_to_cpu(header->seq_ctl); |
@@ -9581,7 +9581,7 @@ static struct iw_statistics *ipw_get_wireless_stats(struct net_device *dev) | |||
9581 | 9581 | ||
9582 | /* net device stuff */ | 9582 | /* net device stuff */ |
9583 | 9583 | ||
9584 | static inline void init_sys_config(struct ipw_sys_config *sys_config) | 9584 | static void init_sys_config(struct ipw_sys_config *sys_config) |
9585 | { | 9585 | { |
9586 | memset(sys_config, 0, sizeof(struct ipw_sys_config)); | 9586 | memset(sys_config, 0, sizeof(struct ipw_sys_config)); |
9587 | sys_config->bt_coexistence = 1; /* We may need to look into prvStaBtConfig */ | 9587 | sys_config->bt_coexistence = 1; /* We may need to look into prvStaBtConfig */ |
@@ -9627,7 +9627,7 @@ modify to send one tfd per fragment instead of using chunking. otherwise | |||
9627 | we need to heavily modify the ieee80211_skb_to_txb. | 9627 | we need to heavily modify the ieee80211_skb_to_txb. |
9628 | */ | 9628 | */ |
9629 | 9629 | ||
9630 | static inline int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb, | 9630 | static int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb, |
9631 | int pri) | 9631 | int pri) |
9632 | { | 9632 | { |
9633 | struct ieee80211_hdr_3addr *hdr = (struct ieee80211_hdr_3addr *) | 9633 | struct ieee80211_hdr_3addr *hdr = (struct ieee80211_hdr_3addr *) |
diff --git a/drivers/net/wireless/wavelan.c b/drivers/net/wireless/wavelan.c index b0d8b5b03152..ff192e96268a 100644 --- a/drivers/net/wireless/wavelan.c +++ b/drivers/net/wireless/wavelan.c | |||
@@ -102,7 +102,7 @@ static inline void hacr_write(unsigned long ioaddr, u16 hacr) | |||
102 | * Write to card's Host Adapter Command Register. Include a delay for | 102 | * Write to card's Host Adapter Command Register. Include a delay for |
103 | * those times when it is needed. | 103 | * those times when it is needed. |
104 | */ | 104 | */ |
105 | static inline void hacr_write_slow(unsigned long ioaddr, u16 hacr) | 105 | static void hacr_write_slow(unsigned long ioaddr, u16 hacr) |
106 | { | 106 | { |
107 | hacr_write(ioaddr, hacr); | 107 | hacr_write(ioaddr, hacr); |
108 | /* delay might only be needed sometimes */ | 108 | /* delay might only be needed sometimes */ |
@@ -242,7 +242,7 @@ static void psa_write(unsigned long ioaddr, u16 hacr, int o, /* Offset in PSA */ | |||
242 | * The Windows drivers don't use the CRC, but the AP and the PtP tool | 242 | * The Windows drivers don't use the CRC, but the AP and the PtP tool |
243 | * depend on it. | 243 | * depend on it. |
244 | */ | 244 | */ |
245 | static inline u16 psa_crc(u8 * psa, /* The PSA */ | 245 | static u16 psa_crc(u8 * psa, /* The PSA */ |
246 | int size) | 246 | int size) |
247 | { /* Number of short for CRC */ | 247 | { /* Number of short for CRC */ |
248 | int byte_cnt; /* Loop on the PSA */ | 248 | int byte_cnt; /* Loop on the PSA */ |
@@ -310,7 +310,7 @@ static void update_psa_checksum(struct net_device * dev, unsigned long ioaddr, u | |||
310 | /* | 310 | /* |
311 | * Write 1 byte to the MMC. | 311 | * Write 1 byte to the MMC. |
312 | */ | 312 | */ |
313 | static inline void mmc_out(unsigned long ioaddr, u16 o, u8 d) | 313 | static void mmc_out(unsigned long ioaddr, u16 o, u8 d) |
314 | { | 314 | { |
315 | int count = 0; | 315 | int count = 0; |
316 | 316 | ||
@@ -326,7 +326,7 @@ static inline void mmc_out(unsigned long ioaddr, u16 o, u8 d) | |||
326 | * Routine to write bytes to the Modem Management Controller. | 326 | * Routine to write bytes to the Modem Management Controller. |
327 | * We start at the end because it is the way it should be! | 327 | * We start at the end because it is the way it should be! |
328 | */ | 328 | */ |
329 | static inline void mmc_write(unsigned long ioaddr, u8 o, u8 * b, int n) | 329 | static void mmc_write(unsigned long ioaddr, u8 o, u8 * b, int n) |
330 | { | 330 | { |
331 | o += n; | 331 | o += n; |
332 | b += n; | 332 | b += n; |
@@ -340,7 +340,7 @@ static inline void mmc_write(unsigned long ioaddr, u8 o, u8 * b, int n) | |||
340 | * Read a byte from the MMC. | 340 | * Read a byte from the MMC. |
341 | * Optimised version for 1 byte, avoid using memory. | 341 | * Optimised version for 1 byte, avoid using memory. |
342 | */ | 342 | */ |
343 | static inline u8 mmc_in(unsigned long ioaddr, u16 o) | 343 | static u8 mmc_in(unsigned long ioaddr, u16 o) |
344 | { | 344 | { |
345 | int count = 0; | 345 | int count = 0; |
346 | 346 | ||
@@ -587,7 +587,7 @@ static void wv_ack(struct net_device * dev) | |||
587 | * Set channel attention bit and busy wait until command has | 587 | * Set channel attention bit and busy wait until command has |
588 | * completed, then acknowledge completion of the command. | 588 | * completed, then acknowledge completion of the command. |
589 | */ | 589 | */ |
590 | static inline int wv_synchronous_cmd(struct net_device * dev, const char *str) | 590 | static int wv_synchronous_cmd(struct net_device * dev, const char *str) |
591 | { | 591 | { |
592 | net_local *lp = (net_local *) dev->priv; | 592 | net_local *lp = (net_local *) dev->priv; |
593 | unsigned long ioaddr = dev->base_addr; | 593 | unsigned long ioaddr = dev->base_addr; |
@@ -633,7 +633,7 @@ static inline int wv_synchronous_cmd(struct net_device * dev, const char *str) | |||
633 | * Configuration commands completion interrupt. | 633 | * Configuration commands completion interrupt. |
634 | * Check if done, and if OK. | 634 | * Check if done, and if OK. |
635 | */ | 635 | */ |
636 | static inline int | 636 | static int |
637 | wv_config_complete(struct net_device * dev, unsigned long ioaddr, net_local * lp) | 637 | wv_config_complete(struct net_device * dev, unsigned long ioaddr, net_local * lp) |
638 | { | 638 | { |
639 | unsigned short mcs_addr; | 639 | unsigned short mcs_addr; |
@@ -843,7 +843,7 @@ if (lp->tx_n_in_use > 0) | |||
843 | * wavelan_interrupt is not an option), so you may experience | 843 | * wavelan_interrupt is not an option), so you may experience |
844 | * delays sometimes. | 844 | * delays sometimes. |
845 | */ | 845 | */ |
846 | static inline void wv_82586_reconfig(struct net_device * dev) | 846 | static void wv_82586_reconfig(struct net_device * dev) |
847 | { | 847 | { |
848 | net_local *lp = (net_local *) dev->priv; | 848 | net_local *lp = (net_local *) dev->priv; |
849 | unsigned long flags; | 849 | unsigned long flags; |
@@ -1281,7 +1281,7 @@ static inline void wv_packet_info(u8 * p, /* Packet to dump */ | |||
1281 | * This is the information which is displayed by the driver at startup. | 1281 | * This is the information which is displayed by the driver at startup. |
1282 | * There are lots of flags for configuring it to your liking. | 1282 | * There are lots of flags for configuring it to your liking. |
1283 | */ | 1283 | */ |
1284 | static inline void wv_init_info(struct net_device * dev) | 1284 | static void wv_init_info(struct net_device * dev) |
1285 | { | 1285 | { |
1286 | short ioaddr = dev->base_addr; | 1286 | short ioaddr = dev->base_addr; |
1287 | net_local *lp = (net_local *) dev->priv; | 1287 | net_local *lp = (net_local *) dev->priv; |
@@ -1502,7 +1502,7 @@ static int wavelan_set_mac_address(struct net_device * dev, void *addr) | |||
1502 | * It's a bit complicated and you don't really want to look into it. | 1502 | * It's a bit complicated and you don't really want to look into it. |
1503 | * (called in wavelan_ioctl) | 1503 | * (called in wavelan_ioctl) |
1504 | */ | 1504 | */ |
1505 | static inline int wv_set_frequency(unsigned long ioaddr, /* I/O port of the card */ | 1505 | static int wv_set_frequency(unsigned long ioaddr, /* I/O port of the card */ |
1506 | iw_freq * frequency) | 1506 | iw_freq * frequency) |
1507 | { | 1507 | { |
1508 | const int BAND_NUM = 10; /* Number of bands */ | 1508 | const int BAND_NUM = 10; /* Number of bands */ |
@@ -1677,7 +1677,7 @@ static inline int wv_set_frequency(unsigned long ioaddr, /* I/O port of the card | |||
1677 | /* | 1677 | /* |
1678 | * Give the list of available frequencies. | 1678 | * Give the list of available frequencies. |
1679 | */ | 1679 | */ |
1680 | static inline int wv_frequency_list(unsigned long ioaddr, /* I/O port of the card */ | 1680 | static int wv_frequency_list(unsigned long ioaddr, /* I/O port of the card */ |
1681 | iw_freq * list, /* List of frequencies to fill */ | 1681 | iw_freq * list, /* List of frequencies to fill */ |
1682 | int max) | 1682 | int max) |
1683 | { /* Maximum number of frequencies */ | 1683 | { /* Maximum number of frequencies */ |
@@ -2489,7 +2489,7 @@ static iw_stats *wavelan_get_wireless_stats(struct net_device * dev) | |||
2489 | * Note: if any errors occur, the packet is "dropped on the floor". | 2489 | * Note: if any errors occur, the packet is "dropped on the floor". |
2490 | * (called by wv_packet_rcv()) | 2490 | * (called by wv_packet_rcv()) |
2491 | */ | 2491 | */ |
2492 | static inline void | 2492 | static void |
2493 | wv_packet_read(struct net_device * dev, u16 buf_off, int sksize) | 2493 | wv_packet_read(struct net_device * dev, u16 buf_off, int sksize) |
2494 | { | 2494 | { |
2495 | net_local *lp = (net_local *) dev->priv; | 2495 | net_local *lp = (net_local *) dev->priv; |
@@ -2585,7 +2585,7 @@ wv_packet_read(struct net_device * dev, u16 buf_off, int sksize) | |||
2585 | * (called in wavelan_interrupt()). | 2585 | * (called in wavelan_interrupt()). |
2586 | * Note : the spinlock is already grabbed for us. | 2586 | * Note : the spinlock is already grabbed for us. |
2587 | */ | 2587 | */ |
2588 | static inline void wv_receive(struct net_device * dev) | 2588 | static void wv_receive(struct net_device * dev) |
2589 | { | 2589 | { |
2590 | unsigned long ioaddr = dev->base_addr; | 2590 | unsigned long ioaddr = dev->base_addr; |
2591 | net_local *lp = (net_local *) dev->priv; | 2591 | net_local *lp = (net_local *) dev->priv; |
@@ -2768,7 +2768,7 @@ static inline void wv_receive(struct net_device * dev) | |||
2768 | * | 2768 | * |
2769 | * (called in wavelan_packet_xmit()) | 2769 | * (called in wavelan_packet_xmit()) |
2770 | */ | 2770 | */ |
2771 | static inline int wv_packet_write(struct net_device * dev, void *buf, short length) | 2771 | static int wv_packet_write(struct net_device * dev, void *buf, short length) |
2772 | { | 2772 | { |
2773 | net_local *lp = (net_local *) dev->priv; | 2773 | net_local *lp = (net_local *) dev->priv; |
2774 | unsigned long ioaddr = dev->base_addr; | 2774 | unsigned long ioaddr = dev->base_addr; |
@@ -2964,7 +2964,7 @@ static int wavelan_packet_xmit(struct sk_buff *skb, struct net_device * dev) | |||
2964 | * Routine to initialize the Modem Management Controller. | 2964 | * Routine to initialize the Modem Management Controller. |
2965 | * (called by wv_hw_reset()) | 2965 | * (called by wv_hw_reset()) |
2966 | */ | 2966 | */ |
2967 | static inline int wv_mmc_init(struct net_device * dev) | 2967 | static int wv_mmc_init(struct net_device * dev) |
2968 | { | 2968 | { |
2969 | unsigned long ioaddr = dev->base_addr; | 2969 | unsigned long ioaddr = dev->base_addr; |
2970 | net_local *lp = (net_local *) dev->priv; | 2970 | net_local *lp = (net_local *) dev->priv; |
@@ -3136,7 +3136,7 @@ static inline int wv_mmc_init(struct net_device * dev) | |||
3136 | * Start the receive unit. | 3136 | * Start the receive unit. |
3137 | * (called by wv_hw_reset()) | 3137 | * (called by wv_hw_reset()) |
3138 | */ | 3138 | */ |
3139 | static inline int wv_ru_start(struct net_device * dev) | 3139 | static int wv_ru_start(struct net_device * dev) |
3140 | { | 3140 | { |
3141 | net_local *lp = (net_local *) dev->priv; | 3141 | net_local *lp = (net_local *) dev->priv; |
3142 | unsigned long ioaddr = dev->base_addr; | 3142 | unsigned long ioaddr = dev->base_addr; |
@@ -3228,7 +3228,7 @@ static inline int wv_ru_start(struct net_device * dev) | |||
3228 | * | 3228 | * |
3229 | * (called by wv_hw_reset()) | 3229 | * (called by wv_hw_reset()) |
3230 | */ | 3230 | */ |
3231 | static inline int wv_cu_start(struct net_device * dev) | 3231 | static int wv_cu_start(struct net_device * dev) |
3232 | { | 3232 | { |
3233 | net_local *lp = (net_local *) dev->priv; | 3233 | net_local *lp = (net_local *) dev->priv; |
3234 | unsigned long ioaddr = dev->base_addr; | 3234 | unsigned long ioaddr = dev->base_addr; |
@@ -3329,7 +3329,7 @@ static inline int wv_cu_start(struct net_device * dev) | |||
3329 | * | 3329 | * |
3330 | * (called by wv_hw_reset()) | 3330 | * (called by wv_hw_reset()) |
3331 | */ | 3331 | */ |
3332 | static inline int wv_82586_start(struct net_device * dev) | 3332 | static int wv_82586_start(struct net_device * dev) |
3333 | { | 3333 | { |
3334 | net_local *lp = (net_local *) dev->priv; | 3334 | net_local *lp = (net_local *) dev->priv; |
3335 | unsigned long ioaddr = dev->base_addr; | 3335 | unsigned long ioaddr = dev->base_addr; |
@@ -3641,7 +3641,7 @@ static void wv_82586_config(struct net_device * dev) | |||
3641 | * WaveLAN controller (i82586). | 3641 | * WaveLAN controller (i82586). |
3642 | * (called by wavelan_close()) | 3642 | * (called by wavelan_close()) |
3643 | */ | 3643 | */ |
3644 | static inline void wv_82586_stop(struct net_device * dev) | 3644 | static void wv_82586_stop(struct net_device * dev) |
3645 | { | 3645 | { |
3646 | net_local *lp = (net_local *) dev->priv; | 3646 | net_local *lp = (net_local *) dev->priv; |
3647 | unsigned long ioaddr = dev->base_addr; | 3647 | unsigned long ioaddr = dev->base_addr; |