diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-4965.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index bb8f00272af3..05ad5a9a1a55 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -150,6 +150,35 @@ int iwl4965_hwrate_to_plcp_idx(u32 rate_n_flags) | |||
150 | return -1; | 150 | return -1; |
151 | } | 151 | } |
152 | 152 | ||
153 | /** | ||
154 | * translate ucode response to mac80211 tx status control values | ||
155 | */ | ||
156 | void iwl4965_hwrate_to_tx_control(struct iwl4965_priv *priv, u32 rate_n_flags, | ||
157 | struct ieee80211_tx_control *control) | ||
158 | { | ||
159 | int rate_index; | ||
160 | |||
161 | control->antenna_sel_tx = | ||
162 | ((rate_n_flags & RATE_MCS_ANT_AB_MSK) >> RATE_MCS_ANT_A_POS); | ||
163 | if (rate_n_flags & RATE_MCS_HT_MSK) | ||
164 | control->flags |= IEEE80211_TXCTL_OFDM_HT; | ||
165 | if (rate_n_flags & RATE_MCS_GF_MSK) | ||
166 | control->flags |= IEEE80211_TXCTL_GREEN_FIELD; | ||
167 | if (rate_n_flags & RATE_MCS_FAT_MSK) | ||
168 | control->flags |= IEEE80211_TXCTL_40_MHZ_WIDTH; | ||
169 | if (rate_n_flags & RATE_MCS_DUP_MSK) | ||
170 | control->flags |= IEEE80211_TXCTL_DUP_DATA; | ||
171 | if (rate_n_flags & RATE_MCS_SGI_MSK) | ||
172 | control->flags |= IEEE80211_TXCTL_SHORT_GI; | ||
173 | /* since iwl4965_hwrate_to_plcp_idx is band indifferent, we always use | ||
174 | * IEEE80211_BAND_2GHZ band as it contains all the rates */ | ||
175 | rate_index = iwl4965_hwrate_to_plcp_idx(rate_n_flags); | ||
176 | if (rate_index == -1) | ||
177 | control->tx_rate = NULL; | ||
178 | else | ||
179 | control->tx_rate = | ||
180 | &priv->bands[IEEE80211_BAND_2GHZ].bitrates[rate_index]; | ||
181 | } | ||
153 | 182 | ||
154 | /* | 183 | /* |
155 | * Determine how many receiver/antenna chains to use. | 184 | * Determine how many receiver/antenna chains to use. |
@@ -4084,9 +4113,8 @@ static int iwl4965_tx_status_reply_compressed_ba(struct iwl4965_priv *priv, | |||
4084 | tx_status->flags |= IEEE80211_TX_STATUS_AMPDU; | 4113 | tx_status->flags |= IEEE80211_TX_STATUS_AMPDU; |
4085 | tx_status->ampdu_ack_map = successes; | 4114 | tx_status->ampdu_ack_map = successes; |
4086 | tx_status->ampdu_ack_len = agg->frame_count; | 4115 | tx_status->ampdu_ack_len = agg->frame_count; |
4087 | /* FIXME Wrong rate | 4116 | iwl4965_hwrate_to_tx_control(priv, agg->rate_n_flags, |
4088 | tx_status->control.tx_rate = agg->rate_n_flags; | 4117 | &tx_status->control); |
4089 | */ | ||
4090 | 4118 | ||
4091 | IWL_DEBUG_TX_REPLY("Bitmap %llx\n", bitmap); | 4119 | IWL_DEBUG_TX_REPLY("Bitmap %llx\n", bitmap); |
4092 | 4120 | ||