diff options
author | Helmut Schaa <helmut.schaa@googlemail.com> | 2011-03-03 13:43:25 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-03-04 14:06:47 -0500 |
commit | 2517794b702cf62bb049e57c0825fc4573f8a6a3 (patch) | |
tree | 5ebca999bdba2bd5467e7bb7c93ff696c2218d53 /drivers/net/wireless/rt2x00/rt2x00queue.c | |
parent | fe107a5234de1f1576df466b2ea8d01868f6ee77 (diff) |
rt2x00: Move TX descriptor field "ifs" into plcp substruct
"ifs" is only used by no-HT devices. Move it into the plcp substruct and
fill in the value only for no-HT devices.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00queue.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00queue.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c index 7816c1c39d6e..6300cf309872 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c | |||
@@ -262,6 +262,16 @@ static void rt2x00queue_create_tx_descriptor_plcp(struct queue_entry *entry, | |||
262 | unsigned int duration; | 262 | unsigned int duration; |
263 | unsigned int residual; | 263 | unsigned int residual; |
264 | 264 | ||
265 | /* | ||
266 | * Determine with what IFS priority this frame should be send. | ||
267 | * Set ifs to IFS_SIFS when the this is not the first fragment, | ||
268 | * or this fragment came after RTS/CTS. | ||
269 | */ | ||
270 | if (test_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags)) | ||
271 | txdesc->u.plcp.ifs = IFS_BACKOFF; | ||
272 | else | ||
273 | txdesc->u.plcp.ifs = IFS_SIFS; | ||
274 | |||
265 | /* Data length + CRC + Crypto overhead (IV/EIV/ICV/MIC) */ | 275 | /* Data length + CRC + Crypto overhead (IV/EIV/ICV/MIC) */ |
266 | data_length = entry->skb->len + 4; | 276 | data_length = entry->skb->len + 4; |
267 | data_length += rt2x00crypto_tx_overhead(rt2x00dev, entry->skb); | 277 | data_length += rt2x00crypto_tx_overhead(rt2x00dev, entry->skb); |
@@ -373,17 +383,9 @@ static void rt2x00queue_create_tx_descriptor(struct queue_entry *entry, | |||
373 | ieee80211_is_probe_resp(hdr->frame_control)) | 383 | ieee80211_is_probe_resp(hdr->frame_control)) |
374 | __set_bit(ENTRY_TXD_REQ_TIMESTAMP, &txdesc->flags); | 384 | __set_bit(ENTRY_TXD_REQ_TIMESTAMP, &txdesc->flags); |
375 | 385 | ||
376 | /* | ||
377 | * Determine with what IFS priority this frame should be send. | ||
378 | * Set ifs to IFS_SIFS when the this is not the first fragment, | ||
379 | * or this fragment came after RTS/CTS. | ||
380 | */ | ||
381 | if ((tx_info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT) && | 386 | if ((tx_info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT) && |
382 | !test_bit(ENTRY_TXD_RTS_FRAME, &txdesc->flags)) { | 387 | !test_bit(ENTRY_TXD_RTS_FRAME, &txdesc->flags)) |
383 | __set_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags); | 388 | __set_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags); |
384 | txdesc->ifs = IFS_BACKOFF; | ||
385 | } else | ||
386 | txdesc->ifs = IFS_SIFS; | ||
387 | 389 | ||
388 | /* | 390 | /* |
389 | * Determine rate modulation. | 391 | * Determine rate modulation. |