diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-11-06 02:58:09 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-11-06 02:58:09 -0500 |
commit | 78eb77a9cc3af73e3cd86a197b7c1f28fd840978 (patch) | |
tree | 2cf5fb9935412e1a0fae2b25718aa84fc2e8412d /drivers | |
parent | a81c52a81d6dbe6a36bce18112da04f20b175192 (diff) | |
parent | df6d7c94b0c3ae6a1185c9e5fa8ee3368e4a5efb (diff) |
Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_leds.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_leds.h | 6 | ||||
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_main.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_plx.c | 4 |
4 files changed, 29 insertions, 4 deletions
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_leds.c b/drivers/net/wireless/bcm43xx/bcm43xx_leds.c index 2ddbec6bf15b..7d383a27b927 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_leds.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_leds.c | |||
@@ -189,20 +189,24 @@ void bcm43xx_leds_update(struct bcm43xx_private *bcm, int activity) | |||
189 | case BCM43xx_LED_INACTIVE: | 189 | case BCM43xx_LED_INACTIVE: |
190 | continue; | 190 | continue; |
191 | case BCM43xx_LED_OFF: | 191 | case BCM43xx_LED_OFF: |
192 | case BCM43xx_LED_BCM4303_3: | ||
192 | break; | 193 | break; |
193 | case BCM43xx_LED_ON: | 194 | case BCM43xx_LED_ON: |
194 | turn_on = 1; | 195 | turn_on = 1; |
195 | break; | 196 | break; |
196 | case BCM43xx_LED_ACTIVITY: | 197 | case BCM43xx_LED_ACTIVITY: |
198 | case BCM43xx_LED_BCM4303_0: | ||
197 | turn_on = activity; | 199 | turn_on = activity; |
198 | break; | 200 | break; |
199 | case BCM43xx_LED_RADIO_ALL: | 201 | case BCM43xx_LED_RADIO_ALL: |
200 | turn_on = radio->enabled; | 202 | turn_on = radio->enabled; |
201 | break; | 203 | break; |
202 | case BCM43xx_LED_RADIO_A: | 204 | case BCM43xx_LED_RADIO_A: |
205 | case BCM43xx_LED_BCM4303_2: | ||
203 | turn_on = (radio->enabled && phy->type == BCM43xx_PHYTYPE_A); | 206 | turn_on = (radio->enabled && phy->type == BCM43xx_PHYTYPE_A); |
204 | break; | 207 | break; |
205 | case BCM43xx_LED_RADIO_B: | 208 | case BCM43xx_LED_RADIO_B: |
209 | case BCM43xx_LED_BCM4303_1: | ||
206 | turn_on = (radio->enabled && | 210 | turn_on = (radio->enabled && |
207 | (phy->type == BCM43xx_PHYTYPE_B || | 211 | (phy->type == BCM43xx_PHYTYPE_B || |
208 | phy->type == BCM43xx_PHYTYPE_G)); | 212 | phy->type == BCM43xx_PHYTYPE_G)); |
@@ -257,7 +261,8 @@ void bcm43xx_leds_update(struct bcm43xx_private *bcm, int activity) | |||
257 | continue; | 261 | continue; |
258 | #endif /* CONFIG_BCM43XX_DEBUG */ | 262 | #endif /* CONFIG_BCM43XX_DEBUG */ |
259 | default: | 263 | default: |
260 | assert(0); | 264 | dprintkl(KERN_INFO PFX "Bad value in leds_update," |
265 | " led->behaviour: 0x%x\n", led->behaviour); | ||
261 | }; | 266 | }; |
262 | 267 | ||
263 | if (led->activelow) | 268 | if (led->activelow) |
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_leds.h b/drivers/net/wireless/bcm43xx/bcm43xx_leds.h index d3716cf3aebc..811e14a81198 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_leds.h +++ b/drivers/net/wireless/bcm43xx/bcm43xx_leds.h | |||
@@ -46,6 +46,12 @@ enum { /* LED behaviour values */ | |||
46 | BCM43xx_LED_TEST_BLINKSLOW, | 46 | BCM43xx_LED_TEST_BLINKSLOW, |
47 | BCM43xx_LED_TEST_BLINKMEDIUM, | 47 | BCM43xx_LED_TEST_BLINKMEDIUM, |
48 | BCM43xx_LED_TEST_BLINKFAST, | 48 | BCM43xx_LED_TEST_BLINKFAST, |
49 | |||
50 | /* Misc values for BCM4303 */ | ||
51 | BCM43xx_LED_BCM4303_0 = 0x2B, | ||
52 | BCM43xx_LED_BCM4303_1 = 0x78, | ||
53 | BCM43xx_LED_BCM4303_2 = 0x2E, | ||
54 | BCM43xx_LED_BCM4303_3 = 0x19, | ||
49 | }; | 55 | }; |
50 | 56 | ||
51 | int bcm43xx_leds_init(struct bcm43xx_private *bcm); | 57 | int bcm43xx_leds_init(struct bcm43xx_private *bcm); |
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c index a94c6d8826f8..65edb56107fd 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c | |||
@@ -3163,9 +3163,11 @@ static int estimate_periodic_work_badness(unsigned int state) | |||
3163 | static void bcm43xx_periodic_work_handler(void *d) | 3163 | static void bcm43xx_periodic_work_handler(void *d) |
3164 | { | 3164 | { |
3165 | struct bcm43xx_private *bcm = d; | 3165 | struct bcm43xx_private *bcm = d; |
3166 | struct net_device *net_dev = bcm->net_dev; | ||
3166 | unsigned long flags; | 3167 | unsigned long flags; |
3167 | u32 savedirqs = 0; | 3168 | u32 savedirqs = 0; |
3168 | int badness; | 3169 | int badness; |
3170 | unsigned long orig_trans_start = 0; | ||
3169 | 3171 | ||
3170 | mutex_lock(&bcm->mutex); | 3172 | mutex_lock(&bcm->mutex); |
3171 | badness = estimate_periodic_work_badness(bcm->periodic_state); | 3173 | badness = estimate_periodic_work_badness(bcm->periodic_state); |
@@ -3173,7 +3175,18 @@ static void bcm43xx_periodic_work_handler(void *d) | |||
3173 | /* Periodic work will take a long time, so we want it to | 3175 | /* Periodic work will take a long time, so we want it to |
3174 | * be preemtible. | 3176 | * be preemtible. |
3175 | */ | 3177 | */ |
3176 | netif_tx_disable(bcm->net_dev); | 3178 | |
3179 | netif_tx_lock_bh(net_dev); | ||
3180 | /* We must fake a started transmission here, as we are going to | ||
3181 | * disable TX. If we wouldn't fake a TX, it would be possible to | ||
3182 | * trigger the netdev watchdog, if the last real TX is already | ||
3183 | * some time on the past (slightly less than 5secs) | ||
3184 | */ | ||
3185 | orig_trans_start = net_dev->trans_start; | ||
3186 | net_dev->trans_start = jiffies; | ||
3187 | netif_stop_queue(net_dev); | ||
3188 | netif_tx_unlock_bh(net_dev); | ||
3189 | |||
3177 | spin_lock_irqsave(&bcm->irq_lock, flags); | 3190 | spin_lock_irqsave(&bcm->irq_lock, flags); |
3178 | bcm43xx_mac_suspend(bcm); | 3191 | bcm43xx_mac_suspend(bcm); |
3179 | if (bcm43xx_using_pio(bcm)) | 3192 | if (bcm43xx_using_pio(bcm)) |
@@ -3198,6 +3211,7 @@ static void bcm43xx_periodic_work_handler(void *d) | |||
3198 | bcm43xx_pio_thaw_txqueues(bcm); | 3211 | bcm43xx_pio_thaw_txqueues(bcm); |
3199 | bcm43xx_mac_enable(bcm); | 3212 | bcm43xx_mac_enable(bcm); |
3200 | netif_wake_queue(bcm->net_dev); | 3213 | netif_wake_queue(bcm->net_dev); |
3214 | net_dev->trans_start = orig_trans_start; | ||
3201 | } | 3215 | } |
3202 | mmiowb(); | 3216 | mmiowb(); |
3203 | spin_unlock_irqrestore(&bcm->irq_lock, flags); | 3217 | spin_unlock_irqrestore(&bcm->irq_lock, flags); |
diff --git a/drivers/net/wireless/hostap/hostap_plx.c b/drivers/net/wireless/hostap/hostap_plx.c index 6dfa041be66d..bc81b13a5a2a 100644 --- a/drivers/net/wireless/hostap/hostap_plx.c +++ b/drivers/net/wireless/hostap/hostap_plx.c | |||
@@ -364,7 +364,7 @@ static int prism2_plx_check_cis(void __iomem *attr_mem, int attr_len, | |||
364 | 364 | ||
365 | pos = 0; | 365 | pos = 0; |
366 | while (pos < CIS_MAX_LEN - 1 && cis[pos] != CISTPL_END) { | 366 | while (pos < CIS_MAX_LEN - 1 && cis[pos] != CISTPL_END) { |
367 | if (pos + cis[pos + 1] >= CIS_MAX_LEN) | 367 | if (pos + 2 + cis[pos + 1] > CIS_MAX_LEN) |
368 | goto cis_error; | 368 | goto cis_error; |
369 | 369 | ||
370 | switch (cis[pos]) { | 370 | switch (cis[pos]) { |
@@ -391,7 +391,7 @@ static int prism2_plx_check_cis(void __iomem *attr_mem, int attr_len, | |||
391 | break; | 391 | break; |
392 | 392 | ||
393 | case CISTPL_MANFID: | 393 | case CISTPL_MANFID: |
394 | if (cis[pos + 1] < 5) | 394 | if (cis[pos + 1] < 4) |
395 | goto cis_error; | 395 | goto cis_error; |
396 | manfid1 = cis[pos + 2] + (cis[pos + 3] << 8); | 396 | manfid1 = cis[pos + 2] + (cis[pos + 3] << 8); |
397 | manfid2 = cis[pos + 4] + (cis[pos + 5] << 8); | 397 | manfid2 = cis[pos + 4] + (cis[pos + 5] << 8); |