aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2010-03-17 16:34:36 -0400
committerReinette Chatre <reinette.chatre@intel.com>2010-03-25 14:19:54 -0400
commit8d801080dd8d28bf7d85cacba131f18b7653ee49 (patch)
treedbc76a2a17d979695dfdfde95698c4eb72c95cfe /drivers/net/wireless/iwlwifi/iwl-agn-tx.c
parent54b81550dd674466fe7d01629d2aab015c545a1e (diff)
iwlwifi: more clean up to move agn only rx functions from iwlcore to iwlagn
Move more functions only used by agn driver from iwlcore to iwlagn. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-tx.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-tx.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
index 4e4b70d10804..257e4aff3d96 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
@@ -38,6 +38,7 @@
38#include "iwl-io.h" 38#include "iwl-io.h"
39#include "iwl-helpers.h" 39#include "iwl-helpers.h"
40#include "iwl-agn-hw.h" 40#include "iwl-agn-hw.h"
41#include "iwl-agn.h"
41 42
42/* 43/*
43 * mac80211 queues, ACs, hardware queues, FIFOs. 44 * mac80211 queues, ACs, hardware queues, FIFOs.
@@ -1206,7 +1207,7 @@ static int iwlagn_tx_status_reply_compressed_ba(struct iwl_priv *priv,
1206 info->flags |= IEEE80211_TX_STAT_AMPDU; 1207 info->flags |= IEEE80211_TX_STAT_AMPDU;
1207 info->status.ampdu_ack_map = successes; 1208 info->status.ampdu_ack_map = successes;
1208 info->status.ampdu_ack_len = agg->frame_count; 1209 info->status.ampdu_ack_len = agg->frame_count;
1209 iwl_hwrate_to_tx_control(priv, agg->rate_n_flags, info); 1210 iwlagn_hwrate_to_tx_control(priv, agg->rate_n_flags, info);
1210 1211
1211 IWL_DEBUG_TX_REPLY(priv, "Bitmap %llx\n", (unsigned long long)bitmap); 1212 IWL_DEBUG_TX_REPLY(priv, "Bitmap %llx\n", (unsigned long long)bitmap);
1212 1213
@@ -1214,6 +1215,29 @@ static int iwlagn_tx_status_reply_compressed_ba(struct iwl_priv *priv,
1214} 1215}
1215 1216
1216/** 1217/**
1218 * translate ucode response to mac80211 tx status control values
1219 */
1220void iwlagn_hwrate_to_tx_control(struct iwl_priv *priv, u32 rate_n_flags,
1221 struct ieee80211_tx_info *info)
1222{
1223 struct ieee80211_tx_rate *r = &info->control.rates[0];
1224
1225 info->antenna_sel_tx =
1226 ((rate_n_flags & RATE_MCS_ANT_ABC_MSK) >> RATE_MCS_ANT_POS);
1227 if (rate_n_flags & RATE_MCS_HT_MSK)
1228 r->flags |= IEEE80211_TX_RC_MCS;
1229 if (rate_n_flags & RATE_MCS_GF_MSK)
1230 r->flags |= IEEE80211_TX_RC_GREEN_FIELD;
1231 if (rate_n_flags & RATE_MCS_HT40_MSK)
1232 r->flags |= IEEE80211_TX_RC_40_MHZ_WIDTH;
1233 if (rate_n_flags & RATE_MCS_DUP_MSK)
1234 r->flags |= IEEE80211_TX_RC_DUP_DATA;
1235 if (rate_n_flags & RATE_MCS_SGI_MSK)
1236 r->flags |= IEEE80211_TX_RC_SHORT_GI;
1237 r->idx = iwlagn_hwrate_to_mac80211_idx(rate_n_flags, info->band);
1238}
1239
1240/**
1217 * iwlagn_rx_reply_compressed_ba - Handler for REPLY_COMPRESSED_BA 1241 * iwlagn_rx_reply_compressed_ba - Handler for REPLY_COMPRESSED_BA
1218 * 1242 *
1219 * Handles block-acknowledge notification from device, which reports success 1243 * Handles block-acknowledge notification from device, which reports success