wl1271: Corrections to TX path
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>
Thu, 8 Oct 2009 18:56:26 +0000 (21:56 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 27 Oct 2009 20:47:50 +0000 (16:47 -0400)
Corrections to the TX path - use correct number of maximum descriptors
(32 instead of 16) and correct checking and setting of excessive retries
on completion.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/wl12xx/wl1271.h
drivers/net/wireless/wl12xx/wl1271_acx.h
drivers/net/wireless/wl12xx/wl1271_main.c
drivers/net/wireless/wl12xx/wl1271_tx.c

index 05eb29c847c6b804b43c677dacc58c4b8b0aa7d3..0b4744db22ef6acd94dba1f03a6593aff44834a6 100644 (file)
@@ -123,6 +123,8 @@ enum {
 #define WL1271_DEFAULT_BEACON_INT  100
 #define WL1271_DEFAULT_DTIM_PERIOD 1
 
+#define ACX_TX_DESCRIPTORS    32
+
 enum wl1271_state {
        WL1271_STATE_OFF,
        WL1271_STATE_ON,
@@ -346,7 +348,7 @@ struct wl1271 {
        struct work_struct filter_work;
 
        /* Pending TX frames */
-       struct sk_buff *tx_frames[16];
+       struct sk_buff *tx_frames[ACX_TX_DESCRIPTORS];
 
        /* Security sequence number counters */
        u8 tx_security_last_seq;
index 55850eb809ea579a32f48734de299881afdb74c3..c1773459bf55ecaa2de25fa6c1625dc221fd8dad 100644 (file)
@@ -170,7 +170,6 @@ enum {
 #define  DP_RX_PACKET_RING_CHUNK_NUM 2
 #define  DP_TX_PACKET_RING_CHUNK_NUM 2
 #define  DP_TX_COMPLETE_TIME_OUT 20
-#define  FW_TX_CMPLT_BLOCK_SIZE 16
 
 #define TX_MSDU_LIFETIME_MIN       0
 #define TX_MSDU_LIFETIME_MAX       3000
index 6e35fcf37e4f182396ff618bb96269957a7974e5..0a0f2eacf40031575ec38079703be39a683ff651 100644 (file)
@@ -1293,9 +1293,7 @@ static int __devinit wl1271_probe(struct spi_device *spi)
        wl->basic_rate_set = WL1271_DEFAULT_BASIC_RATE_SET;
        wl->band = IEEE80211_BAND_2GHZ;
 
-       /* We use the default power on sleep time until we know which chip
-        * we're using */
-       for (i = 0; i < FW_TX_CMPLT_BLOCK_SIZE; i++)
+       for (i = 0; i < ACX_TX_DESCRIPTORS; i++)
                wl->tx_frames[i] = NULL;
 
        spin_lock_init(&wl->wl_lock);
index 1ad1bc3f152ebc237ffe013e8e30b900d2ea29a4..5d3aa4b26cf3782c59e05aa47aa709029a7608e5 100644 (file)
@@ -33,8 +33,7 @@
 static int wl1271_tx_id(struct wl1271 *wl, struct sk_buff *skb)
 {
        int i;
-
-       for (i = 0; i < FW_TX_CMPLT_BLOCK_SIZE; i++)
+       for (i = 0; i < ACX_TX_DESCRIPTORS; i++)
                if (wl->tx_frames[i] == NULL) {
                        wl->tx_frames[i] = skb;
                        return i;
@@ -262,14 +261,13 @@ out:
 static void wl1271_tx_complete_packet(struct wl1271 *wl,
                                      struct wl1271_tx_hw_res_descr *result)
 {
-
        struct ieee80211_tx_info *info;
        struct sk_buff *skb;
        u16 seq;
        int id = result->id;
 
        /* check for id legality */
-       if (id >= TX_HW_RESULT_QUEUE_LEN || wl->tx_frames[id] == NULL) {
+       if (id >= ACX_TX_DESCRIPTORS || wl->tx_frames[id] == NULL) {
                wl1271_warning("TX result illegal id: %d", id);
                return;
        }
@@ -382,7 +380,7 @@ void wl1271_tx_flush(struct wl1271 *wl)
                ieee80211_tx_status(wl->hw, skb);
        }
 
-       for (i = 0; i < FW_TX_CMPLT_BLOCK_SIZE; i++)
+       for (i = 0; i < ACX_TX_DESCRIPTORS; i++)
                if (wl->tx_frames[i] != NULL) {
                        skb = wl->tx_frames[i];
                        info = IEEE80211_SKB_CB(skb);