]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
p54: minor fixes
authorChristian Lamparter <chunkeey@web.de>
Fri, 14 Nov 2008 18:41:22 +0000 (19:41 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 25 Nov 2008 21:41:38 +0000 (16:41 -0500)
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>
drivers/net/wireless/p54/p54common.c
drivers/net/wireless/p54/p54common.h

index e0066c4c0346d177fd5bb8aaf301985a66c37ee2..6bf5123c10b2f501975a3d988233cc06cb53dbef 100644 (file)
@@ -530,6 +530,8 @@ static int p54_rx_data(struct ieee80211_hw *dev, struct sk_buff *skb)
        rx_status.noise = priv->noise;
        /* XX correct? */
        rx_status.qual = (100 * hdr->rssi) / 127;
+       if (hdr->rate & 0x10)
+               rx_status.flag |= RX_FLAG_SHORTPRE;
        rx_status.rate_idx = (dev->conf.channel->band == IEEE80211_BAND_2GHZ ?
                        hdr->rate : (hdr->rate - 4)) & 0xf;
        rx_status.freq = freq;
@@ -576,7 +578,7 @@ void p54_free_skb(struct ieee80211_hw *dev, struct sk_buff *skb)
        unsigned long flags;
        u32 freed = 0, last_addr = priv->rx_start;
 
-       if (!skb || !dev)
+       if (unlikely(!skb || !dev || !skb_queue_len(&priv->tx_queue)))
                return;
 
        spin_lock_irqsave(&priv->tx_queue.lock, flags);
@@ -1199,7 +1201,10 @@ static int p54_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
        txhdr->key_type = 0;
        txhdr->key_len = 0;
        txhdr->hw_queue = queue;
-       txhdr->backlog = 32;
+       if (current_queue)
+               txhdr->backlog = current_queue->len;
+       else
+               txhdr->backlog = 0;
        memset(txhdr->durations, 0, sizeof(txhdr->durations));
        txhdr->tx_antenna = (info->antenna_sel_tx == 0) ?
                2 : info->antenna_sel_tx - 1;
@@ -1548,7 +1553,6 @@ static void p54_stop(struct ieee80211_hw *dev)
        while ((skb = skb_dequeue(&priv->tx_queue)))
                kfree_skb(skb);
 
-       kfree(priv->cached_beacon);
        priv->cached_beacon = NULL;
        priv->stop(dev);
        priv->tsf_high32 = priv->tsf_low32 = 0;
index 8c8793cb2d79744ab065ab9c957feb928615ac48..3419f16be938304694898ab6a1db66316feeb68e 100644 (file)
@@ -259,7 +259,7 @@ enum p54_rx_decrypt_status {
        P54_DECRYPT_NOCKIPMIC,
        P54_DECRYPT_FAIL_WEP,
        P54_DECRYPT_FAIL_TKIP,
-       P54_DECRYPT_FAIL_MICAHEL,
+       P54_DECRYPT_FAIL_MICHAEL,
        P54_DECRYPT_FAIL_CKIPKP,
        P54_DECRYPT_FAIL_CKIPMIC,
        P54_DECRYPT_FAIL_AESCCMP