rt2x00: Optimize TX descriptor handling
HT and no-HT rt2x00 devices use a partly different TX descriptor. Optimize the tx desciptor memory layout by putting the PLCP and HT substructs into a union and introduce a new driver flag to decide which TX desciptor format is used by the device. This saves us the expensive PLCP calculation fOr HT devices and the HT descriptor setup on no-HT devices. Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
7fe7ee7776
commit
26a1d07f41
12 changed files with 78 additions and 54 deletions
|
@ -1131,19 +1131,21 @@ static void rt2400pci_write_tx_desc(struct queue_entry *entry,
|
|||
rt2x00_desc_write(txd, 2, word);
|
||||
|
||||
rt2x00_desc_read(txd, 3, &word);
|
||||
rt2x00_set_field32(&word, TXD_W3_PLCP_SIGNAL, txdesc->signal);
|
||||
rt2x00_set_field32(&word, TXD_W3_PLCP_SIGNAL, txdesc->u.plcp.signal);
|
||||
rt2x00_set_field32(&word, TXD_W3_PLCP_SIGNAL_REGNUM, 5);
|
||||
rt2x00_set_field32(&word, TXD_W3_PLCP_SIGNAL_BUSY, 1);
|
||||
rt2x00_set_field32(&word, TXD_W3_PLCP_SERVICE, txdesc->service);
|
||||
rt2x00_set_field32(&word, TXD_W3_PLCP_SERVICE, txdesc->u.plcp.service);
|
||||
rt2x00_set_field32(&word, TXD_W3_PLCP_SERVICE_REGNUM, 6);
|
||||
rt2x00_set_field32(&word, TXD_W3_PLCP_SERVICE_BUSY, 1);
|
||||
rt2x00_desc_write(txd, 3, word);
|
||||
|
||||
rt2x00_desc_read(txd, 4, &word);
|
||||
rt2x00_set_field32(&word, TXD_W4_PLCP_LENGTH_LOW, txdesc->length_low);
|
||||
rt2x00_set_field32(&word, TXD_W4_PLCP_LENGTH_LOW,
|
||||
txdesc->u.plcp.length_low);
|
||||
rt2x00_set_field32(&word, TXD_W3_PLCP_LENGTH_LOW_REGNUM, 8);
|
||||
rt2x00_set_field32(&word, TXD_W3_PLCP_LENGTH_LOW_BUSY, 1);
|
||||
rt2x00_set_field32(&word, TXD_W4_PLCP_LENGTH_HIGH, txdesc->length_high);
|
||||
rt2x00_set_field32(&word, TXD_W4_PLCP_LENGTH_HIGH,
|
||||
txdesc->u.plcp.length_high);
|
||||
rt2x00_set_field32(&word, TXD_W3_PLCP_LENGTH_HIGH_REGNUM, 7);
|
||||
rt2x00_set_field32(&word, TXD_W3_PLCP_LENGTH_HIGH_BUSY, 1);
|
||||
rt2x00_desc_write(txd, 4, word);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue