Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes

This commit is contained in:
Jeff Garzik 2006-11-06 02:58:09 -05:00
commit 78eb77a9cc
5 changed files with 35 additions and 10 deletions

View File

@ -189,20 +189,24 @@ void bcm43xx_leds_update(struct bcm43xx_private *bcm, int activity)
case BCM43xx_LED_INACTIVE: case BCM43xx_LED_INACTIVE:
continue; continue;
case BCM43xx_LED_OFF: case BCM43xx_LED_OFF:
case BCM43xx_LED_BCM4303_3:
break; break;
case BCM43xx_LED_ON: case BCM43xx_LED_ON:
turn_on = 1; turn_on = 1;
break; break;
case BCM43xx_LED_ACTIVITY: case BCM43xx_LED_ACTIVITY:
case BCM43xx_LED_BCM4303_0:
turn_on = activity; turn_on = activity;
break; break;
case BCM43xx_LED_RADIO_ALL: case BCM43xx_LED_RADIO_ALL:
turn_on = radio->enabled; turn_on = radio->enabled;
break; break;
case BCM43xx_LED_RADIO_A: case BCM43xx_LED_RADIO_A:
case BCM43xx_LED_BCM4303_2:
turn_on = (radio->enabled && phy->type == BCM43xx_PHYTYPE_A); turn_on = (radio->enabled && phy->type == BCM43xx_PHYTYPE_A);
break; break;
case BCM43xx_LED_RADIO_B: case BCM43xx_LED_RADIO_B:
case BCM43xx_LED_BCM4303_1:
turn_on = (radio->enabled && turn_on = (radio->enabled &&
(phy->type == BCM43xx_PHYTYPE_B || (phy->type == BCM43xx_PHYTYPE_B ||
phy->type == BCM43xx_PHYTYPE_G)); phy->type == BCM43xx_PHYTYPE_G));
@ -257,7 +261,8 @@ void bcm43xx_leds_update(struct bcm43xx_private *bcm, int activity)
continue; continue;
#endif /* CONFIG_BCM43XX_DEBUG */ #endif /* CONFIG_BCM43XX_DEBUG */
default: default:
assert(0); dprintkl(KERN_INFO PFX "Bad value in leds_update,"
" led->behaviour: 0x%x\n", led->behaviour);
}; };
if (led->activelow) if (led->activelow)

View File

@ -46,6 +46,12 @@ enum { /* LED behaviour values */
BCM43xx_LED_TEST_BLINKSLOW, BCM43xx_LED_TEST_BLINKSLOW,
BCM43xx_LED_TEST_BLINKMEDIUM, BCM43xx_LED_TEST_BLINKMEDIUM,
BCM43xx_LED_TEST_BLINKFAST, BCM43xx_LED_TEST_BLINKFAST,
/* Misc values for BCM4303 */
BCM43xx_LED_BCM4303_0 = 0x2B,
BCM43xx_LED_BCM4303_1 = 0x78,
BCM43xx_LED_BCM4303_2 = 0x2E,
BCM43xx_LED_BCM4303_3 = 0x19,
}; };
int bcm43xx_leds_init(struct bcm43xx_private *bcm); int bcm43xx_leds_init(struct bcm43xx_private *bcm);

View File

@ -3163,9 +3163,11 @@ static int estimate_periodic_work_badness(unsigned int state)
static void bcm43xx_periodic_work_handler(void *d) static void bcm43xx_periodic_work_handler(void *d)
{ {
struct bcm43xx_private *bcm = d; struct bcm43xx_private *bcm = d;
struct net_device *net_dev = bcm->net_dev;
unsigned long flags; unsigned long flags;
u32 savedirqs = 0; u32 savedirqs = 0;
int badness; int badness;
unsigned long orig_trans_start = 0;
mutex_lock(&bcm->mutex); mutex_lock(&bcm->mutex);
badness = estimate_periodic_work_badness(bcm->periodic_state); badness = estimate_periodic_work_badness(bcm->periodic_state);
@ -3173,7 +3175,18 @@ static void bcm43xx_periodic_work_handler(void *d)
/* Periodic work will take a long time, so we want it to /* Periodic work will take a long time, so we want it to
* be preemtible. * be preemtible.
*/ */
netif_tx_disable(bcm->net_dev);
netif_tx_lock_bh(net_dev);
/* We must fake a started transmission here, as we are going to
* disable TX. If we wouldn't fake a TX, it would be possible to
* trigger the netdev watchdog, if the last real TX is already
* some time on the past (slightly less than 5secs)
*/
orig_trans_start = net_dev->trans_start;
net_dev->trans_start = jiffies;
netif_stop_queue(net_dev);
netif_tx_unlock_bh(net_dev);
spin_lock_irqsave(&bcm->irq_lock, flags); spin_lock_irqsave(&bcm->irq_lock, flags);
bcm43xx_mac_suspend(bcm); bcm43xx_mac_suspend(bcm);
if (bcm43xx_using_pio(bcm)) if (bcm43xx_using_pio(bcm))
@ -3198,6 +3211,7 @@ static void bcm43xx_periodic_work_handler(void *d)
bcm43xx_pio_thaw_txqueues(bcm); bcm43xx_pio_thaw_txqueues(bcm);
bcm43xx_mac_enable(bcm); bcm43xx_mac_enable(bcm);
netif_wake_queue(bcm->net_dev); netif_wake_queue(bcm->net_dev);
net_dev->trans_start = orig_trans_start;
} }
mmiowb(); mmiowb();
spin_unlock_irqrestore(&bcm->irq_lock, flags); spin_unlock_irqrestore(&bcm->irq_lock, flags);

View File

@ -364,7 +364,7 @@ static int prism2_plx_check_cis(void __iomem *attr_mem, int attr_len,
pos = 0; pos = 0;
while (pos < CIS_MAX_LEN - 1 && cis[pos] != CISTPL_END) { while (pos < CIS_MAX_LEN - 1 && cis[pos] != CISTPL_END) {
if (pos + cis[pos + 1] >= CIS_MAX_LEN) if (pos + 2 + cis[pos + 1] > CIS_MAX_LEN)
goto cis_error; goto cis_error;
switch (cis[pos]) { switch (cis[pos]) {
@ -391,7 +391,7 @@ static int prism2_plx_check_cis(void __iomem *attr_mem, int attr_len,
break; break;
case CISTPL_MANFID: case CISTPL_MANFID:
if (cis[pos + 1] < 5) if (cis[pos + 1] < 4)
goto cis_error; goto cis_error;
manfid1 = cis[pos + 2] + (cis[pos + 3] << 8); manfid1 = cis[pos + 2] + (cis[pos + 3] << 8);
manfid2 = cis[pos + 4] + (cis[pos + 5] << 8); manfid2 = cis[pos + 4] + (cis[pos + 5] << 8);

View File

@ -1078,12 +1078,12 @@ static int ieee80211_parse_info_param(struct ieee80211_info_element
while (length >= sizeof(*info_element)) { while (length >= sizeof(*info_element)) {
if (sizeof(*info_element) + info_element->len > length) { if (sizeof(*info_element) + info_element->len > length) {
IEEE80211_ERROR("Info elem: parse failed: " IEEE80211_DEBUG_MGMT("Info elem: parse failed: "
"info_element->len + 2 > left : " "info_element->len + 2 > left : "
"info_element->len+2=%zd left=%d, id=%d.\n", "info_element->len+2=%zd left=%d, id=%d.\n",
info_element->len + info_element->len +
sizeof(*info_element), sizeof(*info_element),
length, info_element->id); length, info_element->id);
/* We stop processing but don't return an error here /* We stop processing but don't return an error here
* because some misbehaviour APs break this rule. ie. * because some misbehaviour APs break this rule. ie.
* Orinoco AP1000. */ * Orinoco AP1000. */