aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/p54
diff options
context:
space:
mode:
authorChristian Lamparter <chunkeey@web.de>2008-11-14 13:41:22 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-11-25 16:41:38 -0500
commitffed785898a6dfd5f80d069bcb607b8cd5613c76 (patch)
tree746f119433ddbb57ff7a290d0df664efe735f0b4 /drivers/net/wireless/p54
parentd131bb59c142585c389b5284d93743e4e065e393 (diff)
p54: minor fixes
This patch contains only contains a one-liner fixes and enhancements Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/p54')
-rw-r--r--drivers/net/wireless/p54/p54common.c10
-rw-r--r--drivers/net/wireless/p54/p54common.h2
2 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c
index e0066c4c0346..6bf5123c10b2 100644
--- a/drivers/net/wireless/p54/p54common.c
+++ b/drivers/net/wireless/p54/p54common.c
@@ -530,6 +530,8 @@ static int p54_rx_data(struct ieee80211_hw *dev, struct sk_buff *skb)
530 rx_status.noise = priv->noise; 530 rx_status.noise = priv->noise;
531 /* XX correct? */ 531 /* XX correct? */
532 rx_status.qual = (100 * hdr->rssi) / 127; 532 rx_status.qual = (100 * hdr->rssi) / 127;
533 if (hdr->rate & 0x10)
534 rx_status.flag |= RX_FLAG_SHORTPRE;
533 rx_status.rate_idx = (dev->conf.channel->band == IEEE80211_BAND_2GHZ ? 535 rx_status.rate_idx = (dev->conf.channel->band == IEEE80211_BAND_2GHZ ?
534 hdr->rate : (hdr->rate - 4)) & 0xf; 536 hdr->rate : (hdr->rate - 4)) & 0xf;
535 rx_status.freq = freq; 537 rx_status.freq = freq;
@@ -576,7 +578,7 @@ void p54_free_skb(struct ieee80211_hw *dev, struct sk_buff *skb)
576 unsigned long flags; 578 unsigned long flags;
577 u32 freed = 0, last_addr = priv->rx_start; 579 u32 freed = 0, last_addr = priv->rx_start;
578 580
579 if (!skb || !dev) 581 if (unlikely(!skb || !dev || !skb_queue_len(&priv->tx_queue)))
580 return; 582 return;
581 583
582 spin_lock_irqsave(&priv->tx_queue.lock, flags); 584 spin_lock_irqsave(&priv->tx_queue.lock, flags);
@@ -1199,7 +1201,10 @@ static int p54_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
1199 txhdr->key_type = 0; 1201 txhdr->key_type = 0;
1200 txhdr->key_len = 0; 1202 txhdr->key_len = 0;
1201 txhdr->hw_queue = queue; 1203 txhdr->hw_queue = queue;
1202 txhdr->backlog = 32; 1204 if (current_queue)
1205 txhdr->backlog = current_queue->len;
1206 else
1207 txhdr->backlog = 0;
1203 memset(txhdr->durations, 0, sizeof(txhdr->durations)); 1208 memset(txhdr->durations, 0, sizeof(txhdr->durations));
1204 txhdr->tx_antenna = (info->antenna_sel_tx == 0) ? 1209 txhdr->tx_antenna = (info->antenna_sel_tx == 0) ?
1205 2 : info->antenna_sel_tx - 1; 1210 2 : info->antenna_sel_tx - 1;
@@ -1548,7 +1553,6 @@ static void p54_stop(struct ieee80211_hw *dev)
1548 while ((skb = skb_dequeue(&priv->tx_queue))) 1553 while ((skb = skb_dequeue(&priv->tx_queue)))
1549 kfree_skb(skb); 1554 kfree_skb(skb);
1550 1555
1551 kfree(priv->cached_beacon);
1552 priv->cached_beacon = NULL; 1556 priv->cached_beacon = NULL;
1553 priv->stop(dev); 1557 priv->stop(dev);
1554 priv->tsf_high32 = priv->tsf_low32 = 0; 1558 priv->tsf_high32 = priv->tsf_low32 = 0;
diff --git a/drivers/net/wireless/p54/p54common.h b/drivers/net/wireless/p54/p54common.h
index 8c8793cb2d79..3419f16be938 100644
--- a/drivers/net/wireless/p54/p54common.h
+++ b/drivers/net/wireless/p54/p54common.h
@@ -259,7 +259,7 @@ enum p54_rx_decrypt_status {
259 P54_DECRYPT_NOCKIPMIC, 259 P54_DECRYPT_NOCKIPMIC,
260 P54_DECRYPT_FAIL_WEP, 260 P54_DECRYPT_FAIL_WEP,
261 P54_DECRYPT_FAIL_TKIP, 261 P54_DECRYPT_FAIL_TKIP,
262 P54_DECRYPT_FAIL_MICAHEL, 262 P54_DECRYPT_FAIL_MICHAEL,
263 P54_DECRYPT_FAIL_CKIPKP, 263 P54_DECRYPT_FAIL_CKIPKP,
264 P54_DECRYPT_FAIL_CKIPMIC, 264 P54_DECRYPT_FAIL_CKIPMIC,
265 P54_DECRYPT_FAIL_AESCCMP 265 P54_DECRYPT_FAIL_AESCCMP