diff options
| author | Juuso Oikarinen <juuso.oikarinen@nokia.com> | 2009-10-08 14:56:26 -0400 |
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2009-10-27 16:47:50 -0400 |
| commit | be7078c21d826fbaab77f88440958019aab969af (patch) | |
| tree | c47e20373f34507044858aa43713107390879885 | |
| parent | d94cd297e58b55bb272fdfd51ff0de7acbc1941b (diff) | |
wl1271: Corrections to TX path
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>
| -rw-r--r-- | drivers/net/wireless/wl12xx/wl1271.h | 4 | ||||
| -rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_acx.h | 1 | ||||
| -rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_main.c | 4 | ||||
| -rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_tx.c | 8 |
4 files changed, 7 insertions, 10 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271.h b/drivers/net/wireless/wl12xx/wl1271.h index 05eb29c847c6..0b4744db22ef 100644 --- a/drivers/net/wireless/wl12xx/wl1271.h +++ b/drivers/net/wireless/wl12xx/wl1271.h | |||
| @@ -123,6 +123,8 @@ enum { | |||
| 123 | #define WL1271_DEFAULT_BEACON_INT 100 | 123 | #define WL1271_DEFAULT_BEACON_INT 100 |
| 124 | #define WL1271_DEFAULT_DTIM_PERIOD 1 | 124 | #define WL1271_DEFAULT_DTIM_PERIOD 1 |
| 125 | 125 | ||
| 126 | #define ACX_TX_DESCRIPTORS 32 | ||
| 127 | |||
| 126 | enum wl1271_state { | 128 | enum wl1271_state { |
| 127 | WL1271_STATE_OFF, | 129 | WL1271_STATE_OFF, |
| 128 | WL1271_STATE_ON, | 130 | WL1271_STATE_ON, |
| @@ -346,7 +348,7 @@ struct wl1271 { | |||
| 346 | struct work_struct filter_work; | 348 | struct work_struct filter_work; |
| 347 | 349 | ||
| 348 | /* Pending TX frames */ | 350 | /* Pending TX frames */ |
| 349 | struct sk_buff *tx_frames[16]; | 351 | struct sk_buff *tx_frames[ACX_TX_DESCRIPTORS]; |
| 350 | 352 | ||
| 351 | /* Security sequence number counters */ | 353 | /* Security sequence number counters */ |
| 352 | u8 tx_security_last_seq; | 354 | u8 tx_security_last_seq; |
diff --git a/drivers/net/wireless/wl12xx/wl1271_acx.h b/drivers/net/wireless/wl12xx/wl1271_acx.h index 55850eb809ea..c1773459bf55 100644 --- a/drivers/net/wireless/wl12xx/wl1271_acx.h +++ b/drivers/net/wireless/wl12xx/wl1271_acx.h | |||
| @@ -170,7 +170,6 @@ enum { | |||
| 170 | #define DP_RX_PACKET_RING_CHUNK_NUM 2 | 170 | #define DP_RX_PACKET_RING_CHUNK_NUM 2 |
| 171 | #define DP_TX_PACKET_RING_CHUNK_NUM 2 | 171 | #define DP_TX_PACKET_RING_CHUNK_NUM 2 |
| 172 | #define DP_TX_COMPLETE_TIME_OUT 20 | 172 | #define DP_TX_COMPLETE_TIME_OUT 20 |
| 173 | #define FW_TX_CMPLT_BLOCK_SIZE 16 | ||
| 174 | 173 | ||
| 175 | #define TX_MSDU_LIFETIME_MIN 0 | 174 | #define TX_MSDU_LIFETIME_MIN 0 |
| 176 | #define TX_MSDU_LIFETIME_MAX 3000 | 175 | #define TX_MSDU_LIFETIME_MAX 3000 |
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c index 6e35fcf37e4f..0a0f2eacf400 100644 --- a/drivers/net/wireless/wl12xx/wl1271_main.c +++ b/drivers/net/wireless/wl12xx/wl1271_main.c | |||
| @@ -1293,9 +1293,7 @@ static int __devinit wl1271_probe(struct spi_device *spi) | |||
| 1293 | wl->basic_rate_set = WL1271_DEFAULT_BASIC_RATE_SET; | 1293 | wl->basic_rate_set = WL1271_DEFAULT_BASIC_RATE_SET; |
| 1294 | wl->band = IEEE80211_BAND_2GHZ; | 1294 | wl->band = IEEE80211_BAND_2GHZ; |
| 1295 | 1295 | ||
| 1296 | /* We use the default power on sleep time until we know which chip | 1296 | for (i = 0; i < ACX_TX_DESCRIPTORS; i++) |
| 1297 | * we're using */ | ||
| 1298 | for (i = 0; i < FW_TX_CMPLT_BLOCK_SIZE; i++) | ||
| 1299 | wl->tx_frames[i] = NULL; | 1297 | wl->tx_frames[i] = NULL; |
| 1300 | 1298 | ||
| 1301 | spin_lock_init(&wl->wl_lock); | 1299 | spin_lock_init(&wl->wl_lock); |
diff --git a/drivers/net/wireless/wl12xx/wl1271_tx.c b/drivers/net/wireless/wl12xx/wl1271_tx.c index 1ad1bc3f152e..5d3aa4b26cf3 100644 --- a/drivers/net/wireless/wl12xx/wl1271_tx.c +++ b/drivers/net/wireless/wl12xx/wl1271_tx.c | |||
| @@ -33,8 +33,7 @@ | |||
| 33 | static int wl1271_tx_id(struct wl1271 *wl, struct sk_buff *skb) | 33 | static int wl1271_tx_id(struct wl1271 *wl, struct sk_buff *skb) |
| 34 | { | 34 | { |
| 35 | int i; | 35 | int i; |
| 36 | 36 | for (i = 0; i < ACX_TX_DESCRIPTORS; i++) | |
| 37 | for (i = 0; i < FW_TX_CMPLT_BLOCK_SIZE; i++) | ||
| 38 | if (wl->tx_frames[i] == NULL) { | 37 | if (wl->tx_frames[i] == NULL) { |
| 39 | wl->tx_frames[i] = skb; | 38 | wl->tx_frames[i] = skb; |
| 40 | return i; | 39 | return i; |
| @@ -262,14 +261,13 @@ out: | |||
| 262 | static void wl1271_tx_complete_packet(struct wl1271 *wl, | 261 | static void wl1271_tx_complete_packet(struct wl1271 *wl, |
| 263 | struct wl1271_tx_hw_res_descr *result) | 262 | struct wl1271_tx_hw_res_descr *result) |
| 264 | { | 263 | { |
| 265 | |||
| 266 | struct ieee80211_tx_info *info; | 264 | struct ieee80211_tx_info *info; |
| 267 | struct sk_buff *skb; | 265 | struct sk_buff *skb; |
| 268 | u16 seq; | 266 | u16 seq; |
| 269 | int id = result->id; | 267 | int id = result->id; |
| 270 | 268 | ||
| 271 | /* check for id legality */ | 269 | /* check for id legality */ |
| 272 | if (id >= TX_HW_RESULT_QUEUE_LEN || wl->tx_frames[id] == NULL) { | 270 | if (id >= ACX_TX_DESCRIPTORS || wl->tx_frames[id] == NULL) { |
| 273 | wl1271_warning("TX result illegal id: %d", id); | 271 | wl1271_warning("TX result illegal id: %d", id); |
| 274 | return; | 272 | return; |
| 275 | } | 273 | } |
| @@ -382,7 +380,7 @@ void wl1271_tx_flush(struct wl1271 *wl) | |||
| 382 | ieee80211_tx_status(wl->hw, skb); | 380 | ieee80211_tx_status(wl->hw, skb); |
| 383 | } | 381 | } |
| 384 | 382 | ||
| 385 | for (i = 0; i < FW_TX_CMPLT_BLOCK_SIZE; i++) | 383 | for (i = 0; i < ACX_TX_DESCRIPTORS; i++) |
| 386 | if (wl->tx_frames[i] != NULL) { | 384 | if (wl->tx_frames[i] != NULL) { |
| 387 | skb = wl->tx_frames[i]; | 385 | skb = wl->tx_frames[i]; |
| 388 | info = IEEE80211_SKB_CB(skb); | 386 | info = IEEE80211_SKB_CB(skb); |
