diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-05-10 07:42:31 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-05-21 21:47:31 -0400 |
commit | 61486e0f68d1f8966c09b734566a187d42d65c54 (patch) | |
tree | ba683a5dfe736f0b9754da2b2a67d799f3ff5594 /drivers/net/wireless/rt2x00/rt2x00dev.c | |
parent | fb55f4d1fa252ba1e479284b79da1049d658c371 (diff) |
rt2x00: Remove ieee80211_tx_control argument from write_tx_desc()
Move the last remaining information details read from ieee80211_tx_control
in the drivers to the txentry_desc structure. After this we can
remove ieee80211_tx_control from the argument list for the callback function,
which makes it easier when the control information is moved into skb->cb
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/rt2x00dev.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index 69da22cf085c..e1368f709858 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -664,7 +664,12 @@ void rt2x00lib_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
664 | tx_rate = control->rts_cts_rate->hw_value; | 664 | tx_rate = control->rts_cts_rate->hw_value; |
665 | } | 665 | } |
666 | 666 | ||
667 | rate = rt2x00_get_rate(tx_rate); | 667 | /* |
668 | * Determine retry information. | ||
669 | */ | ||
670 | txdesc.retry_limit = control->retry_limit; | ||
671 | if (control->flags & IEEE80211_TXCTL_LONG_RETRY_LIMIT) | ||
672 | __set_bit(ENTRY_TXD_RETRY_MODE, &txdesc.flags); | ||
668 | 673 | ||
669 | /* | 674 | /* |
670 | * Check if more fragments are pending | 675 | * Check if more fragments are pending |
@@ -686,16 +691,20 @@ void rt2x00lib_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
686 | * Set ifs to IFS_SIFS when the this is not the first fragment, | 691 | * Set ifs to IFS_SIFS when the this is not the first fragment, |
687 | * or this fragment came after RTS/CTS. | 692 | * or this fragment came after RTS/CTS. |
688 | */ | 693 | */ |
689 | if ((seq_ctrl & IEEE80211_SCTL_FRAG) > 0 || | 694 | if (test_bit(ENTRY_TXD_RTS_FRAME, &txdesc.flags)) { |
690 | test_bit(ENTRY_TXD_RTS_FRAME, &txdesc.flags)) | ||
691 | txdesc.ifs = IFS_SIFS; | 695 | txdesc.ifs = IFS_SIFS; |
692 | else | 696 | } else if (control->flags & IEEE80211_TXCTL_FIRST_FRAGMENT) { |
697 | __set_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc.flags); | ||
693 | txdesc.ifs = IFS_BACKOFF; | 698 | txdesc.ifs = IFS_BACKOFF; |
699 | } else { | ||
700 | txdesc.ifs = IFS_SIFS; | ||
701 | } | ||
694 | 702 | ||
695 | /* | 703 | /* |
696 | * PLCP setup | 704 | * PLCP setup |
697 | * Length calculation depends on OFDM/CCK rate. | 705 | * Length calculation depends on OFDM/CCK rate. |
698 | */ | 706 | */ |
707 | rate = rt2x00_get_rate(tx_rate); | ||
699 | txdesc.signal = rate->plcp; | 708 | txdesc.signal = rate->plcp; |
700 | txdesc.service = 0x04; | 709 | txdesc.service = 0x04; |
701 | 710 | ||
@@ -733,7 +742,7 @@ void rt2x00lib_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
733 | txdesc.signal |= 0x08; | 742 | txdesc.signal |= 0x08; |
734 | } | 743 | } |
735 | 744 | ||
736 | rt2x00dev->ops->lib->write_tx_desc(rt2x00dev, skb, &txdesc, control); | 745 | rt2x00dev->ops->lib->write_tx_desc(rt2x00dev, skb, &txdesc); |
737 | 746 | ||
738 | /* | 747 | /* |
739 | * Update queue entry. | 748 | * Update queue entry. |