Skip to content

Commit

Permalink
Merge branch 'upstream-fixes'
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Garzik committed Apr 20, 2006
2 parents 18e37f2 + f18b95c commit a7bb131
Show file tree
Hide file tree
Showing 25 changed files with 289 additions and 171 deletions.
2 changes: 1 addition & 1 deletion drivers/net/ne.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ struct net_device * __init ne_probe(int unit)
netdev_boot_setup_check(dev);

#ifdef CONFIG_TOSHIBA_RBTX4938
dev->base_addr = 0x07f20280;
dev->base_addr = RBTX4938_RTL_8019_BASE;
dev->irq = RBTX4938_RTL_8019_IRQ;
#endif
err = do_ne_probe(dev);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ menu "Wireless LAN (non-hamradio)"
depends on NETDEVICES

config NET_RADIO
bool "Wireless LAN drivers (non-hamradio)"
bool "Wireless LAN drivers (non-hamradio) & Wireless Extensions"
select WIRELESS_EXT
---help---
Support for wireless LANs and everything having to do with radio,
Expand Down
46 changes: 17 additions & 29 deletions drivers/net/wireless/airo.c
Original file line number Diff line number Diff line change
Expand Up @@ -3139,6 +3139,7 @@ static irqreturn_t airo_interrupt ( int irq, void* dev_id, struct pt_regs *regs)
}
if ( status & EV_LINK ) {
union iwreq_data wrqu;
int scan_forceloss = 0;
/* The link status has changed, if you want to put a
monitor hook in, do it here. (Remember that
interrupts are still disabled!)
Expand All @@ -3157,7 +3158,8 @@ static irqreturn_t airo_interrupt ( int irq, void* dev_id, struct pt_regs *regs)
code) */
#define AUTHFAIL 0x0300 /* Authentication failure (low byte is reason
code) */
#define ASSOCIATED 0x0400 /* Assocatied */
#define ASSOCIATED 0x0400 /* Associated */
#define REASSOCIATED 0x0600 /* Reassociated? Only on firmware >= 5.30.17 */
#define RC_RESERVED 0 /* Reserved return code */
#define RC_NOREASON 1 /* Unspecified reason */
#define RC_AUTHINV 2 /* Previous authentication invalid */
Expand All @@ -3174,44 +3176,30 @@ static irqreturn_t airo_interrupt ( int irq, void* dev_id, struct pt_regs *regs)
leaving BSS */
#define RC_NOAUTH 9 /* Station requesting (Re)Association is not
Authenticated with the responding station */
if (newStatus != ASSOCIATED) {
if (auto_wep && !apriv->expires) {
apriv->expires = RUN_AT(3*HZ);
wake_up_interruptible(&apriv->thr_wait);
}
} else {
struct task_struct *task = apriv->task;
if (newStatus == FORCELOSS && apriv->scan_timeout > 0)
scan_forceloss = 1;
if(newStatus == ASSOCIATED || newStatus == REASSOCIATED) {
if (auto_wep)
apriv->expires = 0;
if (task)
wake_up_process (task);
if (apriv->task)
wake_up_process (apriv->task);
set_bit(FLAG_UPDATE_UNI, &apriv->flags);
set_bit(FLAG_UPDATE_MULTI, &apriv->flags);
}
/* Question : is ASSOCIATED the only status
* that is valid ? We want to catch handover
* and reassociations as valid status
* Jean II */
if(newStatus == ASSOCIATED) {
#if 0
/* FIXME: Grabbing scan results here
* seems to be too early??? Just wait for
* timeout instead. */
if (apriv->scan_timeout > 0) {
set_bit(JOB_SCAN_RESULTS, &apriv->flags);
wake_up_interruptible(&apriv->thr_wait);
}
#endif

if (down_trylock(&apriv->sem) != 0) {
set_bit(JOB_EVENT, &apriv->flags);
wake_up_interruptible(&apriv->thr_wait);
} else
airo_send_event(dev);
} else {
memset(wrqu.ap_addr.sa_data, '\0', ETH_ALEN);
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
} else if (!scan_forceloss) {
if (auto_wep && !apriv->expires) {
apriv->expires = RUN_AT(3*HZ);
wake_up_interruptible(&apriv->thr_wait);
}

/* Send event to user space */
memset(wrqu.ap_addr.sa_data, '\0', ETH_ALEN);
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
wireless_send_event(dev, SIOCGIWAP, &wrqu,NULL);
}
}
Expand Down Expand Up @@ -7136,10 +7124,10 @@ static int airo_set_scan(struct net_device *dev,
goto out;

/* Initiate a scan command */
ai->scan_timeout = RUN_AT(3*HZ);
memset(&cmd, 0, sizeof(cmd));
cmd.cmd=CMD_LISTBSS;
issuecommand(ai, &cmd, &rsp);
ai->scan_timeout = RUN_AT(3*HZ);
wake = 1;

out:
Expand Down
11 changes: 11 additions & 0 deletions drivers/net/wireless/atmel.c
Original file line number Diff line number Diff line change
Expand Up @@ -3463,6 +3463,7 @@ static void atmel_command_irq(struct atmel_private *priv)
u8 status = atmel_rmem8(priv, atmel_co(priv, CMD_BLOCK_STATUS_OFFSET));
u8 command = atmel_rmem8(priv, atmel_co(priv, CMD_BLOCK_COMMAND_OFFSET));
int fast_scan;
union iwreq_data wrqu;

if (status == CMD_STATUS_IDLE ||
status == CMD_STATUS_IN_PROGRESS)
Expand All @@ -3487,6 +3488,7 @@ static void atmel_command_irq(struct atmel_private *priv)
atmel_scan(priv, 1);
} else {
int bss_index = retrieve_bss(priv);
int notify_scan_complete = 1;
if (bss_index != -1) {
atmel_join_bss(priv, bss_index);
} else if (priv->operating_mode == IW_MODE_ADHOC &&
Expand All @@ -3495,8 +3497,14 @@ static void atmel_command_irq(struct atmel_private *priv)
} else {
priv->fast_scan = !fast_scan;
atmel_scan(priv, 1);
notify_scan_complete = 0;
}
priv->site_survey_state = SITE_SURVEY_COMPLETED;
if (notify_scan_complete) {
wrqu.data.length = 0;
wrqu.data.flags = 0;
wireless_send_event(priv->dev, SIOCGIWSCAN, &wrqu, NULL);
}
}
break;

Expand All @@ -3509,6 +3517,9 @@ static void atmel_command_irq(struct atmel_private *priv)
priv->site_survey_state = SITE_SURVEY_COMPLETED;
if (priv->station_is_associated) {
atmel_enter_state(priv, STATION_STATE_READY);
wrqu.data.length = 0;
wrqu.data.flags = 0;
wireless_send_event(priv->dev, SIOCGIWSCAN, &wrqu, NULL);
} else {
atmel_scan(priv, 1);
}
Expand Down
3 changes: 3 additions & 0 deletions drivers/net/wireless/bcm43xx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ config BCM43XX_DEBUG

config BCM43XX_DMA
bool
depends on BCM43XX

config BCM43XX_PIO
bool
depends on BCM43XX

choice
prompt "BCM43xx data transfer mode"
Expand Down
17 changes: 14 additions & 3 deletions drivers/net/wireless/bcm43xx/bcm43xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

#include "bcm43xx_debugfs.h"
#include "bcm43xx_leds.h"
#include "bcm43xx_sysfs.h"


#define PFX KBUILD_MODNAME ": "
Expand Down Expand Up @@ -638,8 +637,6 @@ struct bcm43xx_key {
};

struct bcm43xx_private {
struct bcm43xx_sysfs sysfs;

struct ieee80211_device *ieee;
struct ieee80211softmac_device *softmac;

Expand Down Expand Up @@ -772,6 +769,20 @@ struct bcm43xx_private * bcm43xx_priv(struct net_device *dev)
return ieee80211softmac_priv(dev);
}

struct device;

static inline
struct bcm43xx_private * dev_to_bcm(struct device *dev)
{
struct net_device *net_dev;
struct bcm43xx_private *bcm;

net_dev = dev_get_drvdata(dev);
bcm = bcm43xx_priv(net_dev);

return bcm;
}


/* Helper function, which returns a boolean.
* TRUE, if PIO is used; FALSE, if DMA is used.
Expand Down
8 changes: 4 additions & 4 deletions drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,12 +452,12 @@ void bcm43xx_printk_dump(const char *data,
size_t i;
char c;

printk(KERN_INFO PFX "Data dump (%s, %u bytes):",
printk(KERN_INFO PFX "Data dump (%s, %zd bytes):",
description, size);
for (i = 0; i < size; i++) {
c = data[i];
if (i % 8 == 0)
printk("\n" KERN_INFO PFX "0x%08x: 0x%02x, ", i, c & 0xff);
printk("\n" KERN_INFO PFX "0x%08zx: 0x%02x, ", i, c & 0xff);
else
printk("0x%02x, ", c & 0xff);
}
Expand All @@ -472,12 +472,12 @@ void bcm43xx_printk_bitdump(const unsigned char *data,
int j;
const unsigned char *d;

printk(KERN_INFO PFX "*** Bitdump (%s, %u bytes, %s) ***",
printk(KERN_INFO PFX "*** Bitdump (%s, %zd bytes, %s) ***",
description, bytes, msb_to_lsb ? "MSB to LSB" : "LSB to MSB");
for (i = 0; i < bytes; i++) {
d = data + i;
if (i % 8 == 0)
printk("\n" KERN_INFO PFX "0x%08x: ", i);
printk("\n" KERN_INFO PFX "0x%08zx: ", i);
if (msb_to_lsb) {
for (j = 7; j >= 0; j--) {
if (*d & (1 << j))
Expand Down
13 changes: 7 additions & 6 deletions drivers/net/wireless/bcm43xx/bcm43xx_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,9 @@ static int alloc_ringmemory(struct bcm43xx_dmaring *ring)
}
if (ring->dmabase + BCM43xx_DMA_RINGMEMSIZE > BCM43xx_DMA_BUSADDRMAX) {
printk(KERN_ERR PFX ">>>FATAL ERROR<<< DMA RINGMEMORY >1G "
"(0x%08x, len: %lu)\n",
ring->dmabase, BCM43xx_DMA_RINGMEMSIZE);
"(0x%llx, len: %lu)\n",
(unsigned long long)ring->dmabase,
BCM43xx_DMA_RINGMEMSIZE);
dma_free_coherent(dev, BCM43xx_DMA_RINGMEMSIZE,
ring->vbase, ring->dmabase);
return -ENOMEM;
Expand Down Expand Up @@ -307,8 +308,8 @@ static int setup_rx_descbuffer(struct bcm43xx_dmaring *ring,
unmap_descbuffer(ring, dmaaddr, ring->rx_buffersize, 0);
dev_kfree_skb_any(skb);
printk(KERN_ERR PFX ">>>FATAL ERROR<<< DMA RX SKB >1G "
"(0x%08x, len: %u)\n",
dmaaddr, ring->rx_buffersize);
"(0x%llx, len: %u)\n",
(unsigned long long)dmaaddr, ring->rx_buffersize);
return -ENOMEM;
}
meta->skb = skb;
Expand Down Expand Up @@ -729,8 +730,8 @@ static int dma_tx_fragment(struct bcm43xx_dmaring *ring,
if (unlikely(meta->dmaaddr + skb->len > BCM43xx_DMA_BUSADDRMAX)) {
return_slot(ring, slot);
printk(KERN_ERR PFX ">>>FATAL ERROR<<< DMA TX SKB >1G "
"(0x%08x, len: %u)\n",
meta->dmaaddr, skb->len);
"(0x%llx, len: %u)\n",
(unsigned long long)meta->dmaaddr, skb->len);
return -ENOMEM;
}

Expand Down
2 changes: 2 additions & 0 deletions drivers/net/wireless/bcm43xx/bcm43xx_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
#include "bcm43xx_wx.h"
#include "bcm43xx_ethtool.h"
#include "bcm43xx_xmit.h"
#include "bcm43xx_sysfs.h"


MODULE_DESCRIPTION("Broadcom BCM43xx wireless driver");
Expand Down Expand Up @@ -3522,6 +3523,7 @@ static inline int bcm43xx_tx(struct bcm43xx_private *bcm,
err = bcm43xx_pio_tx(bcm, txb);
else
err = bcm43xx_dma_tx(bcm, txb);
bcm->net_dev->trans_start = jiffies;

return err;
}
Expand Down
1 change: 1 addition & 0 deletions drivers/net/wireless/bcm43xx/bcm43xx_phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -2151,6 +2151,7 @@ int bcm43xx_phy_init_tssi2dbm_table(struct bcm43xx_private *bcm)
phy->tssi2dbm = NULL;
printk(KERN_ERR PFX "Could not generate "
"tssi2dBm table\n");
kfree(dyn_tssi2dbm);
return -ENODEV;
}
phy->tssi2dbm = dyn_tssi2dbm;
Expand Down
Loading

0 comments on commit a7bb131

Please sign in to comment.