diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2008-06-11 21:47:11 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-06-14 12:18:08 -0400 |
commit | e7d326ac437e9e9425dcd79382f4e5f6ca31fb16 (patch) | |
tree | 82dad05f71fd368c98f30b39eb15921c17487a78 /drivers/net/wireless/iwlwifi/iwl-5000.c | |
parent | 2a421b91d6fe89e27ded7544a25449c0b050098f (diff) |
iwlwifi: move rate helpers to iwlcore
This patch moves rate helpers to iwlcore.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-5000.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index da8750b97eec..8c466b02bdff 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -1139,6 +1139,7 @@ static int iwl5000_tx_status_reply_tx(struct iwl_priv *priv, | |||
1139 | struct agg_tx_status *frame_status = &tx_resp->status; | 1139 | struct agg_tx_status *frame_status = &tx_resp->status; |
1140 | struct ieee80211_tx_info *info = NULL; | 1140 | struct ieee80211_tx_info *info = NULL; |
1141 | struct ieee80211_hdr *hdr = NULL; | 1141 | struct ieee80211_hdr *hdr = NULL; |
1142 | u32 rate_n_flags = le32_to_cpu(tx_resp->rate_n_flags); | ||
1142 | int i, sh, idx; | 1143 | int i, sh, idx; |
1143 | u16 seq; | 1144 | u16 seq; |
1144 | 1145 | ||
@@ -1147,7 +1148,7 @@ static int iwl5000_tx_status_reply_tx(struct iwl_priv *priv, | |||
1147 | 1148 | ||
1148 | agg->frame_count = tx_resp->frame_count; | 1149 | agg->frame_count = tx_resp->frame_count; |
1149 | agg->start_idx = start_idx; | 1150 | agg->start_idx = start_idx; |
1150 | agg->rate_n_flags = le32_to_cpu(tx_resp->rate_n_flags); | 1151 | agg->rate_n_flags = rate_n_flags; |
1151 | agg->bitmap = 0; | 1152 | agg->bitmap = 0; |
1152 | 1153 | ||
1153 | /* # frames attempted by Tx command */ | 1154 | /* # frames attempted by Tx command */ |
@@ -1165,15 +1166,13 @@ static int iwl5000_tx_status_reply_tx(struct iwl_priv *priv, | |||
1165 | info->flags &= ~IEEE80211_TX_CTL_AMPDU; | 1166 | info->flags &= ~IEEE80211_TX_CTL_AMPDU; |
1166 | info->flags |= iwl_is_tx_success(status)? | 1167 | info->flags |= iwl_is_tx_success(status)? |
1167 | IEEE80211_TX_STAT_ACK : 0; | 1168 | IEEE80211_TX_STAT_ACK : 0; |
1168 | iwl4965_hwrate_to_tx_control(priv, | 1169 | iwl_hwrate_to_tx_control(priv, rate_n_flags, info); |
1169 | le32_to_cpu(tx_resp->rate_n_flags), | 1170 | |
1170 | info); | ||
1171 | /* FIXME: code repetition end */ | 1171 | /* FIXME: code repetition end */ |
1172 | 1172 | ||
1173 | IWL_DEBUG_TX_REPLY("1 Frame 0x%x failure :%d\n", | 1173 | IWL_DEBUG_TX_REPLY("1 Frame 0x%x failure :%d\n", |
1174 | status & 0xff, tx_resp->failure_frame); | 1174 | status & 0xff, tx_resp->failure_frame); |
1175 | IWL_DEBUG_TX_REPLY("Rate Info rate_n_flags=%x\n", | 1175 | IWL_DEBUG_TX_REPLY("Rate Info rate_n_flags=%x\n", rate_n_flags); |
1176 | iwl4965_hw_get_rate_n_flags(tx_resp->rate_n_flags)); | ||
1177 | 1176 | ||
1178 | agg->wait_for_ba = 0; | 1177 | agg->wait_for_ba = 0; |
1179 | } else { | 1178 | } else { |
@@ -1231,7 +1230,6 @@ static int iwl5000_tx_status_reply_tx(struct iwl_priv *priv, | |||
1231 | 1230 | ||
1232 | agg->bitmap = bitmap; | 1231 | agg->bitmap = bitmap; |
1233 | agg->start_idx = start; | 1232 | agg->start_idx = start; |
1234 | agg->rate_n_flags = le32_to_cpu(tx_resp->rate_n_flags); | ||
1235 | IWL_DEBUG_TX_REPLY("Frames %d start_idx=%d bitmap=0x%llx\n", | 1233 | IWL_DEBUG_TX_REPLY("Frames %d start_idx=%d bitmap=0x%llx\n", |
1236 | agg->frame_count, agg->start_idx, | 1234 | agg->frame_count, agg->start_idx, |
1237 | (unsigned long long)agg->bitmap); | 1235 | (unsigned long long)agg->bitmap); |
@@ -1322,7 +1320,7 @@ static void iwl5000_rx_reply_tx(struct iwl_priv *priv, | |||
1322 | info->status.retry_count = tx_resp->failure_frame; | 1320 | info->status.retry_count = tx_resp->failure_frame; |
1323 | info->flags = | 1321 | info->flags = |
1324 | iwl_is_tx_success(status) ? IEEE80211_TX_STAT_ACK : 0; | 1322 | iwl_is_tx_success(status) ? IEEE80211_TX_STAT_ACK : 0; |
1325 | iwl4965_hwrate_to_tx_control(priv, | 1323 | iwl_hwrate_to_tx_control(priv, |
1326 | le32_to_cpu(tx_resp->rate_n_flags), | 1324 | le32_to_cpu(tx_resp->rate_n_flags), |
1327 | info); | 1325 | info); |
1328 | 1326 | ||