aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-11-06 02:58:09 -0500
committerJeff Garzik <jeff@garzik.org>2006-11-06 02:58:09 -0500
commit78eb77a9cc3af73e3cd86a197b7c1f28fd840978 (patch)
tree2cf5fb9935412e1a0fae2b25718aa84fc2e8412d
parenta81c52a81d6dbe6a36bce18112da04f20b175192 (diff)
parentdf6d7c94b0c3ae6a1185c9e5fa8ee3368e4a5efb (diff)
Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes
-rw-r--r--drivers/net/wireless/bcm43xx/bcm43xx_leds.c7
-rw-r--r--drivers/net/wireless/bcm43xx/bcm43xx_leds.h6
-rw-r--r--drivers/net/wireless/bcm43xx/bcm43xx_main.c16
-rw-r--r--drivers/net/wireless/hostap/hostap_plx.c4
-rw-r--r--net/ieee80211/ieee80211_rx.c12
5 files changed, 35 insertions, 10 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
51int bcm43xx_leds_init(struct bcm43xx_private *bcm); 57int 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)
3163static void bcm43xx_periodic_work_handler(void *d) 3163static 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);
diff --git a/net/ieee80211/ieee80211_rx.c b/net/ieee80211/ieee80211_rx.c
index 770704183a1b..2759312a4204 100644
--- a/net/ieee80211/ieee80211_rx.c
+++ b/net/ieee80211/ieee80211_rx.c
@@ -1078,12 +1078,12 @@ static int ieee80211_parse_info_param(struct ieee80211_info_element
1078 1078
1079 while (length >= sizeof(*info_element)) { 1079 while (length >= sizeof(*info_element)) {
1080 if (sizeof(*info_element) + info_element->len > length) { 1080 if (sizeof(*info_element) + info_element->len > length) {
1081 IEEE80211_ERROR("Info elem: parse failed: " 1081 IEEE80211_DEBUG_MGMT("Info elem: parse failed: "
1082 "info_element->len + 2 > left : " 1082 "info_element->len + 2 > left : "
1083 "info_element->len+2=%zd left=%d, id=%d.\n", 1083 "info_element->len+2=%zd left=%d, id=%d.\n",
1084 info_element->len + 1084 info_element->len +
1085 sizeof(*info_element), 1085 sizeof(*info_element),
1086 length, info_element->id); 1086 length, info_element->id);
1087 /* We stop processing but don't return an error here 1087 /* We stop processing but don't return an error here
1088 * because some misbehaviour APs break this rule. ie. 1088 * because some misbehaviour APs break this rule. ie.
1089 * Orinoco AP1000. */ 1089 * Orinoco AP1000. */