diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-05-15 06:55:27 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-05-21 21:48:09 -0400 |
commit | 2e92e6f2c50b4baf85cca968f0e6f1b5c0df7d39 (patch) | |
tree | e845c2f3af6d29c807c540366b97b1d886b92c91 /drivers/net/wireless/iwlwifi/iwl-tx.c | |
parent | 36d6825b91bc492b65b6333c369cd96a2fc8c903 (diff) |
mac80211: use rate index in TX control
This patch modifies struct ieee80211_tx_control to give band
info and the rate index (instead of rate pointers) to drivers.
This mostly serves to reduce the TX control structure size to
make it fit into skb->cb so that the fragmentation code can
put it there and we can think about passing it to drivers that
way in the future.
The rt2x00 driver update was done by Ivo, thanks.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-tx.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-tx.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c index f32cddabdf64..4b5149c8c32e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-tx.c | |||
@@ -578,7 +578,10 @@ static void iwl_tx_cmd_build_rate(struct iwl_priv *priv, | |||
578 | u8 data_retry_limit = 0; | 578 | u8 data_retry_limit = 0; |
579 | u8 rate_plcp; | 579 | u8 rate_plcp; |
580 | u16 rate_flags = 0; | 580 | u16 rate_flags = 0; |
581 | int rate_idx = min(ctrl->tx_rate->hw_value & 0xffff, IWL_RATE_COUNT - 1); | 581 | int rate_idx; |
582 | |||
583 | rate_idx = min(ieee80211_get_tx_rate(priv->hw, ctrl)->hw_value & 0xffff, | ||
584 | IWL_RATE_COUNT - 1); | ||
582 | 585 | ||
583 | rate_plcp = iwl_rates[rate_idx].plcp; | 586 | rate_plcp = iwl_rates[rate_idx].plcp; |
584 | 587 | ||
@@ -723,7 +726,8 @@ int iwl_tx_skb(struct iwl_priv *priv, | |||
723 | goto drop_unlock; | 726 | goto drop_unlock; |
724 | } | 727 | } |
725 | 728 | ||
726 | if ((ctl->tx_rate->hw_value & 0xFF) == IWL_INVALID_RATE) { | 729 | if ((ieee80211_get_tx_rate(priv->hw, ctl)->hw_value & 0xFF) == |
730 | IWL_INVALID_RATE) { | ||
727 | IWL_ERROR("ERROR: No TX rate available.\n"); | 731 | IWL_ERROR("ERROR: No TX rate available.\n"); |
728 | goto drop_unlock; | 732 | goto drop_unlock; |
729 | } | 733 | } |