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 | |
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>
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2400pci.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500pci.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500usb.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00queue.c | 20 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00queue.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt61pci.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt73usb.c | 2 |
7 files changed, 17 insertions, 15 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c index 60d75962b805..9016c00f2946 100644 --- a/drivers/net/wireless/rt2x00/rt2400pci.c +++ b/drivers/net/wireless/rt2x00/rt2400pci.c | |||
@@ -1166,7 +1166,7 @@ static void rt2400pci_write_tx_desc(struct queue_entry *entry, | |||
1166 | test_bit(ENTRY_TXD_REQ_TIMESTAMP, &txdesc->flags)); | 1166 | test_bit(ENTRY_TXD_REQ_TIMESTAMP, &txdesc->flags)); |
1167 | rt2x00_set_field32(&word, TXD_W0_RTS, | 1167 | rt2x00_set_field32(&word, TXD_W0_RTS, |
1168 | test_bit(ENTRY_TXD_RTS_FRAME, &txdesc->flags)); | 1168 | test_bit(ENTRY_TXD_RTS_FRAME, &txdesc->flags)); |
1169 | rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs); | 1169 | rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->u.plcp.ifs); |
1170 | rt2x00_set_field32(&word, TXD_W0_RETRY_MODE, | 1170 | rt2x00_set_field32(&word, TXD_W0_RETRY_MODE, |
1171 | test_bit(ENTRY_TXD_RETRY_MODE, &txdesc->flags)); | 1171 | test_bit(ENTRY_TXD_RETRY_MODE, &txdesc->flags)); |
1172 | rt2x00_desc_write(txd, 0, word); | 1172 | rt2x00_desc_write(txd, 0, word); |
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c index 53ff64e19648..0fbc18cb7304 100644 --- a/drivers/net/wireless/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/rt2x00/rt2500pci.c | |||
@@ -1317,7 +1317,7 @@ static void rt2500pci_write_tx_desc(struct queue_entry *entry, | |||
1317 | rt2x00_set_field32(&word, TXD_W0_OFDM, | 1317 | rt2x00_set_field32(&word, TXD_W0_OFDM, |
1318 | (txdesc->rate_mode == RATE_MODE_OFDM)); | 1318 | (txdesc->rate_mode == RATE_MODE_OFDM)); |
1319 | rt2x00_set_field32(&word, TXD_W0_CIPHER_OWNER, 1); | 1319 | rt2x00_set_field32(&word, TXD_W0_CIPHER_OWNER, 1); |
1320 | rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs); | 1320 | rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->u.plcp.ifs); |
1321 | rt2x00_set_field32(&word, TXD_W0_RETRY_MODE, | 1321 | rt2x00_set_field32(&word, TXD_W0_RETRY_MODE, |
1322 | test_bit(ENTRY_TXD_RETRY_MODE, &txdesc->flags)); | 1322 | test_bit(ENTRY_TXD_RETRY_MODE, &txdesc->flags)); |
1323 | rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, txdesc->length); | 1323 | rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, txdesc->length); |
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index ed5bc9c6224f..979fe6596a2d 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -1100,7 +1100,7 @@ static void rt2500usb_write_tx_desc(struct queue_entry *entry, | |||
1100 | (txdesc->rate_mode == RATE_MODE_OFDM)); | 1100 | (txdesc->rate_mode == RATE_MODE_OFDM)); |
1101 | rt2x00_set_field32(&word, TXD_W0_NEW_SEQ, | 1101 | rt2x00_set_field32(&word, TXD_W0_NEW_SEQ, |
1102 | test_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags)); | 1102 | test_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags)); |
1103 | rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs); | 1103 | rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->u.plcp.ifs); |
1104 | rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, txdesc->length); | 1104 | rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, txdesc->length); |
1105 | rt2x00_set_field32(&word, TXD_W0_CIPHER, !!txdesc->cipher); | 1105 | rt2x00_set_field32(&word, TXD_W0_CIPHER, !!txdesc->cipher); |
1106 | rt2x00_set_field32(&word, TXD_W0_KEY_ID, txdesc->key_idx); | 1106 | rt2x00_set_field32(&word, TXD_W0_KEY_ID, txdesc->key_idx); |
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. |
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h index 3fa2406af700..7f8528da03e4 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.h +++ b/drivers/net/wireless/rt2x00/rt2x00queue.h | |||
@@ -311,6 +311,7 @@ struct txentry_desc { | |||
311 | u16 length_low; | 311 | u16 length_low; |
312 | u16 signal; | 312 | u16 signal; |
313 | u16 service; | 313 | u16 service; |
314 | enum ifs ifs; | ||
314 | } plcp; | 315 | } plcp; |
315 | 316 | ||
316 | struct { | 317 | struct { |
@@ -325,7 +326,6 @@ struct txentry_desc { | |||
325 | u16 rate_mode; | 326 | u16 rate_mode; |
326 | 327 | ||
327 | short retry_limit; | 328 | short retry_limit; |
328 | enum ifs ifs; | ||
329 | 329 | ||
330 | enum cipher cipher; | 330 | enum cipher cipher; |
331 | u16 key_idx; | 331 | u16 key_idx; |
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index c01b811a50d5..a014c64f4275 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c | |||
@@ -1948,7 +1948,7 @@ static void rt61pci_write_tx_desc(struct queue_entry *entry, | |||
1948 | test_bit(ENTRY_TXD_REQ_TIMESTAMP, &txdesc->flags)); | 1948 | test_bit(ENTRY_TXD_REQ_TIMESTAMP, &txdesc->flags)); |
1949 | rt2x00_set_field32(&word, TXD_W0_OFDM, | 1949 | rt2x00_set_field32(&word, TXD_W0_OFDM, |
1950 | (txdesc->rate_mode == RATE_MODE_OFDM)); | 1950 | (txdesc->rate_mode == RATE_MODE_OFDM)); |
1951 | rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs); | 1951 | rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->u.plcp.ifs); |
1952 | rt2x00_set_field32(&word, TXD_W0_RETRY_MODE, | 1952 | rt2x00_set_field32(&word, TXD_W0_RETRY_MODE, |
1953 | test_bit(ENTRY_TXD_RETRY_MODE, &txdesc->flags)); | 1953 | test_bit(ENTRY_TXD_RETRY_MODE, &txdesc->flags)); |
1954 | rt2x00_set_field32(&word, TXD_W0_TKIP_MIC, | 1954 | rt2x00_set_field32(&word, TXD_W0_TKIP_MIC, |
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index a4c9a3e20ec4..02f1148c577e 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -1474,7 +1474,7 @@ static void rt73usb_write_tx_desc(struct queue_entry *entry, | |||
1474 | test_bit(ENTRY_TXD_REQ_TIMESTAMP, &txdesc->flags)); | 1474 | test_bit(ENTRY_TXD_REQ_TIMESTAMP, &txdesc->flags)); |
1475 | rt2x00_set_field32(&word, TXD_W0_OFDM, | 1475 | rt2x00_set_field32(&word, TXD_W0_OFDM, |
1476 | (txdesc->rate_mode == RATE_MODE_OFDM)); | 1476 | (txdesc->rate_mode == RATE_MODE_OFDM)); |
1477 | rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs); | 1477 | rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->u.plcp.ifs); |
1478 | rt2x00_set_field32(&word, TXD_W0_RETRY_MODE, | 1478 | rt2x00_set_field32(&word, TXD_W0_RETRY_MODE, |
1479 | test_bit(ENTRY_TXD_RETRY_MODE, &txdesc->flags)); | 1479 | test_bit(ENTRY_TXD_RETRY_MODE, &txdesc->flags)); |
1480 | rt2x00_set_field32(&word, TXD_W0_TKIP_MIC, | 1480 | rt2x00_set_field32(&word, TXD_W0_TKIP_MIC, |