Skip to content

Commit f18b95c

Browse files
author
Jeff Garzik
committed
Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
2 parents 17c281a + 848ef85 commit f18b95c

24 files changed

Lines changed: 288 additions & 170 deletions

‎drivers/net/wireless/Kconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ menu "Wireless LAN (non-hamradio)"
66
depends on NETDEVICES
77

88
config NET_RADIO
9-
bool "Wireless LAN drivers (non-hamradio)"
9+
bool "Wireless LAN drivers (non-hamradio) & Wireless Extensions"
1010
select WIRELESS_EXT
1111
---help---
1212
Support for wireless LANs and everything having to do with radio,

‎drivers/net/wireless/airo.c‎

Lines changed: 17 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3139,6 +3139,7 @@ static irqreturn_t airo_interrupt ( int irq, void* dev_id, struct pt_regs *regs)
31393139
}
31403140
if ( status & EV_LINK ) {
31413141
union iwreq_data wrqu;
3142+
int scan_forceloss = 0;
31423143
/* The link status has changed, if you want to put a
31433144
monitor hook in, do it here. (Remember that
31443145
interrupts are still disabled!)
@@ -3157,7 +3158,8 @@ static irqreturn_t airo_interrupt ( int irq, void* dev_id, struct pt_regs *regs)
31573158
code) */
31583159
#define AUTHFAIL 0x0300 /* Authentication failure (low byte is reason
31593160
code) */
3160-
#define ASSOCIATED 0x0400 /* Assocatied */
3161+
#define ASSOCIATED 0x0400 /* Associated */
3162+
#define REASSOCIATED 0x0600 /* Reassociated? Only on firmware >= 5.30.17 */
31613163
#define RC_RESERVED 0 /* Reserved return code */
31623164
#define RC_NOREASON 1 /* Unspecified reason */
31633165
#define RC_AUTHINV 2 /* Previous authentication invalid */
@@ -3174,44 +3176,30 @@ static irqreturn_t airo_interrupt ( int irq, void* dev_id, struct pt_regs *regs)
31743176
leaving BSS */
31753177
#define RC_NOAUTH 9 /* Station requesting (Re)Association is not
31763178
Authenticated with the responding station */
3177-
if (newStatus != ASSOCIATED) {
3178-
if (auto_wep && !apriv->expires) {
3179-
apriv->expires = RUN_AT(3*HZ);
3180-
wake_up_interruptible(&apriv->thr_wait);
3181-
}
3182-
} else {
3183-
struct task_struct *task = apriv->task;
3179+
if (newStatus == FORCELOSS && apriv->scan_timeout > 0)
3180+
scan_forceloss = 1;
3181+
if(newStatus == ASSOCIATED || newStatus == REASSOCIATED) {
31843182
if (auto_wep)
31853183
apriv->expires = 0;
3186-
if (task)
3187-
wake_up_process (task);
3184+
if (apriv->task)
3185+
wake_up_process (apriv->task);
31883186
set_bit(FLAG_UPDATE_UNI, &apriv->flags);
31893187
set_bit(FLAG_UPDATE_MULTI, &apriv->flags);
3190-
}
3191-
/* Question : is ASSOCIATED the only status
3192-
* that is valid ? We want to catch handover
3193-
* and reassociations as valid status
3194-
* Jean II */
3195-
if(newStatus == ASSOCIATED) {
3196-
#if 0
3197-
/* FIXME: Grabbing scan results here
3198-
* seems to be too early??? Just wait for
3199-
* timeout instead. */
3200-
if (apriv->scan_timeout > 0) {
3201-
set_bit(JOB_SCAN_RESULTS, &apriv->flags);
3202-
wake_up_interruptible(&apriv->thr_wait);
3203-
}
3204-
#endif
3188+
32053189
if (down_trylock(&apriv->sem) != 0) {
32063190
set_bit(JOB_EVENT, &apriv->flags);
32073191
wake_up_interruptible(&apriv->thr_wait);
32083192
} else
32093193
airo_send_event(dev);
3210-
} else {
3211-
memset(wrqu.ap_addr.sa_data, '\0', ETH_ALEN);
3212-
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
3194+
} else if (!scan_forceloss) {
3195+
if (auto_wep && !apriv->expires) {
3196+
apriv->expires = RUN_AT(3*HZ);
3197+
wake_up_interruptible(&apriv->thr_wait);
3198+
}
32133199

32143200
/* Send event to user space */
3201+
memset(wrqu.ap_addr.sa_data, '\0', ETH_ALEN);
3202+
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
32153203
wireless_send_event(dev, SIOCGIWAP, &wrqu,NULL);
32163204
}
32173205
}
@@ -7136,10 +7124,10 @@ static int airo_set_scan(struct net_device *dev,
71367124
goto out;
71377125

71387126
/* Initiate a scan command */
7127+
ai->scan_timeout = RUN_AT(3*HZ);
71397128
memset(&cmd, 0, sizeof(cmd));
71407129
cmd.cmd=CMD_LISTBSS;
71417130
issuecommand(ai, &cmd, &rsp);
7142-
ai->scan_timeout = RUN_AT(3*HZ);
71437131
wake = 1;
71447132

71457133
out:

‎drivers/net/wireless/atmel.c‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3463,6 +3463,7 @@ static void atmel_command_irq(struct atmel_private *priv)
34633463
u8 status = atmel_rmem8(priv, atmel_co(priv, CMD_BLOCK_STATUS_OFFSET));
34643464
u8 command = atmel_rmem8(priv, atmel_co(priv, CMD_BLOCK_COMMAND_OFFSET));
34653465
int fast_scan;
3466+
union iwreq_data wrqu;
34663467

34673468
if (status == CMD_STATUS_IDLE ||
34683469
status == CMD_STATUS_IN_PROGRESS)
@@ -3487,6 +3488,7 @@ static void atmel_command_irq(struct atmel_private *priv)
34873488
atmel_scan(priv, 1);
34883489
} else {
34893490
int bss_index = retrieve_bss(priv);
3491+
int notify_scan_complete = 1;
34903492
if (bss_index != -1) {
34913493
atmel_join_bss(priv, bss_index);
34923494
} else if (priv->operating_mode == IW_MODE_ADHOC &&
@@ -3495,8 +3497,14 @@ static void atmel_command_irq(struct atmel_private *priv)
34953497
} else {
34963498
priv->fast_scan = !fast_scan;
34973499
atmel_scan(priv, 1);
3500+
notify_scan_complete = 0;
34983501
}
34993502
priv->site_survey_state = SITE_SURVEY_COMPLETED;
3503+
if (notify_scan_complete) {
3504+
wrqu.data.length = 0;
3505+
wrqu.data.flags = 0;
3506+
wireless_send_event(priv->dev, SIOCGIWSCAN, &wrqu, NULL);
3507+
}
35003508
}
35013509
break;
35023510

@@ -3509,6 +3517,9 @@ static void atmel_command_irq(struct atmel_private *priv)
35093517
priv->site_survey_state = SITE_SURVEY_COMPLETED;
35103518
if (priv->station_is_associated) {
35113519
atmel_enter_state(priv, STATION_STATE_READY);
3520+
wrqu.data.length = 0;
3521+
wrqu.data.flags = 0;
3522+
wireless_send_event(priv->dev, SIOCGIWSCAN, &wrqu, NULL);
35123523
} else {
35133524
atmel_scan(priv, 1);
35143525
}

‎drivers/net/wireless/bcm43xx/Kconfig‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ config BCM43XX_DEBUG
1717

1818
config BCM43XX_DMA
1919
bool
20+
depends on BCM43XX
21+
2022
config BCM43XX_PIO
2123
bool
24+
depends on BCM43XX
2225

2326
choice
2427
prompt "BCM43xx data transfer mode"

‎drivers/net/wireless/bcm43xx/bcm43xx.h‎

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
#include "bcm43xx_debugfs.h"
1717
#include "bcm43xx_leds.h"
18-
#include "bcm43xx_sysfs.h"
1918

2019

2120
#define PFX KBUILD_MODNAME ": "
@@ -638,8 +637,6 @@ struct bcm43xx_key {
638637
};
639638

640639
struct bcm43xx_private {
641-
struct bcm43xx_sysfs sysfs;
642-
643640
struct ieee80211_device *ieee;
644641
struct ieee80211softmac_device *softmac;
645642

@@ -772,6 +769,20 @@ struct bcm43xx_private * bcm43xx_priv(struct net_device *dev)
772769
return ieee80211softmac_priv(dev);
773770
}
774771

772+
struct device;
773+
774+
static inline
775+
struct bcm43xx_private * dev_to_bcm(struct device *dev)
776+
{
777+
struct net_device *net_dev;
778+
struct bcm43xx_private *bcm;
779+
780+
net_dev = dev_get_drvdata(dev);
781+
bcm = bcm43xx_priv(net_dev);
782+
783+
return bcm;
784+
}
785+
775786

776787
/* Helper function, which returns a boolean.
777788
* TRUE, if PIO is used; FALSE, if DMA is used.

‎drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -452,12 +452,12 @@ void bcm43xx_printk_dump(const char *data,
452452
size_t i;
453453
char c;
454454

455-
printk(KERN_INFO PFX "Data dump (%s, %u bytes):",
455+
printk(KERN_INFO PFX "Data dump (%s, %zd bytes):",
456456
description, size);
457457
for (i = 0; i < size; i++) {
458458
c = data[i];
459459
if (i % 8 == 0)
460-
printk("\n" KERN_INFO PFX "0x%08x: 0x%02x, ", i, c & 0xff);
460+
printk("\n" KERN_INFO PFX "0x%08zx: 0x%02x, ", i, c & 0xff);
461461
else
462462
printk("0x%02x, ", c & 0xff);
463463
}
@@ -472,12 +472,12 @@ void bcm43xx_printk_bitdump(const unsigned char *data,
472472
int j;
473473
const unsigned char *d;
474474

475-
printk(KERN_INFO PFX "*** Bitdump (%s, %u bytes, %s) ***",
475+
printk(KERN_INFO PFX "*** Bitdump (%s, %zd bytes, %s) ***",
476476
description, bytes, msb_to_lsb ? "MSB to LSB" : "LSB to MSB");
477477
for (i = 0; i < bytes; i++) {
478478
d = data + i;
479479
if (i % 8 == 0)
480-
printk("\n" KERN_INFO PFX "0x%08x: ", i);
480+
printk("\n" KERN_INFO PFX "0x%08zx: ", i);
481481
if (msb_to_lsb) {
482482
for (j = 7; j >= 0; j--) {
483483
if (*d & (1 << j))

‎drivers/net/wireless/bcm43xx/bcm43xx_dma.c‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,9 @@ static int alloc_ringmemory(struct bcm43xx_dmaring *ring)
196196
}
197197
if (ring->dmabase + BCM43xx_DMA_RINGMEMSIZE > BCM43xx_DMA_BUSADDRMAX) {
198198
printk(KERN_ERR PFX ">>>FATAL ERROR<<< DMA RINGMEMORY >1G "
199-
"(0x%08x, len: %lu)\n",
200-
ring->dmabase, BCM43xx_DMA_RINGMEMSIZE);
199+
"(0x%llx, len: %lu)\n",
200+
(unsigned long long)ring->dmabase,
201+
BCM43xx_DMA_RINGMEMSIZE);
201202
dma_free_coherent(dev, BCM43xx_DMA_RINGMEMSIZE,
202203
ring->vbase, ring->dmabase);
203204
return -ENOMEM;
@@ -307,8 +308,8 @@ static int setup_rx_descbuffer(struct bcm43xx_dmaring *ring,
307308
unmap_descbuffer(ring, dmaaddr, ring->rx_buffersize, 0);
308309
dev_kfree_skb_any(skb);
309310
printk(KERN_ERR PFX ">>>FATAL ERROR<<< DMA RX SKB >1G "
310-
"(0x%08x, len: %u)\n",
311-
dmaaddr, ring->rx_buffersize);
311+
"(0x%llx, len: %u)\n",
312+
(unsigned long long)dmaaddr, ring->rx_buffersize);
312313
return -ENOMEM;
313314
}
314315
meta->skb = skb;
@@ -729,8 +730,8 @@ static int dma_tx_fragment(struct bcm43xx_dmaring *ring,
729730
if (unlikely(meta->dmaaddr + skb->len > BCM43xx_DMA_BUSADDRMAX)) {
730731
return_slot(ring, slot);
731732
printk(KERN_ERR PFX ">>>FATAL ERROR<<< DMA TX SKB >1G "
732-
"(0x%08x, len: %u)\n",
733-
meta->dmaaddr, skb->len);
733+
"(0x%llx, len: %u)\n",
734+
(unsigned long long)meta->dmaaddr, skb->len);
734735
return -ENOMEM;
735736
}
736737

‎drivers/net/wireless/bcm43xx/bcm43xx_main.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
#include "bcm43xx_wx.h"
5353
#include "bcm43xx_ethtool.h"
5454
#include "bcm43xx_xmit.h"
55+
#include "bcm43xx_sysfs.h"
5556

5657

5758
MODULE_DESCRIPTION("Broadcom BCM43xx wireless driver");
@@ -3522,6 +3523,7 @@ static inline int bcm43xx_tx(struct bcm43xx_private *bcm,
35223523
err = bcm43xx_pio_tx(bcm, txb);
35233524
else
35243525
err = bcm43xx_dma_tx(bcm, txb);
3526+
bcm->net_dev->trans_start = jiffies;
35253527

35263528
return err;
35273529
}

‎drivers/net/wireless/bcm43xx/bcm43xx_phy.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2151,6 +2151,7 @@ int bcm43xx_phy_init_tssi2dbm_table(struct bcm43xx_private *bcm)
21512151
phy->tssi2dbm = NULL;
21522152
printk(KERN_ERR PFX "Could not generate "
21532153
"tssi2dBm table\n");
2154+
kfree(dyn_tssi2dbm);
21542155
return -ENODEV;
21552156
}
21562157
phy->tssi2dbm = dyn_tssi2dbm;

0 commit comments

Comments
 (0)