diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/dvm/tx.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/tx.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/net/wireless/iwlwifi/dvm/tx.c b/drivers/net/wireless/iwlwifi/dvm/tx.c index 5971a23aa47d..f5ca73a89870 100644 --- a/drivers/net/wireless/iwlwifi/dvm/tx.c +++ b/drivers/net/wireless/iwlwifi/dvm/tx.c | |||
@@ -127,6 +127,7 @@ static void iwlagn_tx_cmd_build_basic(struct iwl_priv *priv, | |||
127 | static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv, | 127 | static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv, |
128 | struct iwl_tx_cmd *tx_cmd, | 128 | struct iwl_tx_cmd *tx_cmd, |
129 | struct ieee80211_tx_info *info, | 129 | struct ieee80211_tx_info *info, |
130 | struct ieee80211_sta *sta, | ||
130 | __le16 fc) | 131 | __le16 fc) |
131 | { | 132 | { |
132 | u32 rate_flags; | 133 | u32 rate_flags; |
@@ -187,8 +188,7 @@ static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv, | |||
187 | if (info->control.rates[0].flags & IEEE80211_TX_RC_MCS || | 188 | if (info->control.rates[0].flags & IEEE80211_TX_RC_MCS || |
188 | (rate_idx < 0) || (rate_idx > IWL_RATE_COUNT_LEGACY)) | 189 | (rate_idx < 0) || (rate_idx > IWL_RATE_COUNT_LEGACY)) |
189 | rate_idx = rate_lowest_index( | 190 | rate_idx = rate_lowest_index( |
190 | &priv->eeprom_data->bands[info->band], | 191 | &priv->eeprom_data->bands[info->band], sta); |
191 | info->control.sta); | ||
192 | /* For 5 GHZ band, remap mac80211 rate indices into driver indices */ | 192 | /* For 5 GHZ band, remap mac80211 rate indices into driver indices */ |
193 | if (info->band == IEEE80211_BAND_5GHZ) | 193 | if (info->band == IEEE80211_BAND_5GHZ) |
194 | rate_idx += IWL_FIRST_OFDM_RATE; | 194 | rate_idx += IWL_FIRST_OFDM_RATE; |
@@ -291,7 +291,9 @@ static int iwl_sta_id_or_broadcast(struct iwl_rxon_context *context, | |||
291 | /* | 291 | /* |
292 | * start REPLY_TX command process | 292 | * start REPLY_TX command process |
293 | */ | 293 | */ |
294 | int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | 294 | int iwlagn_tx_skb(struct iwl_priv *priv, |
295 | struct ieee80211_sta *sta, | ||
296 | struct sk_buff *skb) | ||
295 | { | 297 | { |
296 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; | 298 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; |
297 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | 299 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); |
@@ -345,7 +347,7 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
345 | sta_id = ctx->bcast_sta_id; | 347 | sta_id = ctx->bcast_sta_id; |
346 | else { | 348 | else { |
347 | /* Find index into station table for destination station */ | 349 | /* Find index into station table for destination station */ |
348 | sta_id = iwl_sta_id_or_broadcast(ctx, info->control.sta); | 350 | sta_id = iwl_sta_id_or_broadcast(ctx, sta); |
349 | if (sta_id == IWL_INVALID_STATION) { | 351 | if (sta_id == IWL_INVALID_STATION) { |
350 | IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n", | 352 | IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n", |
351 | hdr->addr1); | 353 | hdr->addr1); |
@@ -355,8 +357,8 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
355 | 357 | ||
356 | IWL_DEBUG_TX(priv, "station Id %d\n", sta_id); | 358 | IWL_DEBUG_TX(priv, "station Id %d\n", sta_id); |
357 | 359 | ||
358 | if (info->control.sta) | 360 | if (sta) |
359 | sta_priv = (void *)info->control.sta->drv_priv; | 361 | sta_priv = (void *)sta->drv_priv; |
360 | 362 | ||
361 | if (sta_priv && sta_priv->asleep && | 363 | if (sta_priv && sta_priv->asleep && |
362 | (info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER)) { | 364 | (info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER)) { |
@@ -397,7 +399,7 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
397 | /* TODO need this for burst mode later on */ | 399 | /* TODO need this for burst mode later on */ |
398 | iwlagn_tx_cmd_build_basic(priv, skb, tx_cmd, info, hdr, sta_id); | 400 | iwlagn_tx_cmd_build_basic(priv, skb, tx_cmd, info, hdr, sta_id); |
399 | 401 | ||
400 | iwlagn_tx_cmd_build_rate(priv, tx_cmd, info, fc); | 402 | iwlagn_tx_cmd_build_rate(priv, tx_cmd, info, sta, fc); |
401 | 403 | ||
402 | memset(&info->status, 0, sizeof(info->status)); | 404 | memset(&info->status, 0, sizeof(info->status)); |
403 | 405 | ||
@@ -431,7 +433,7 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
431 | * only. Check this here. | 433 | * only. Check this here. |
432 | */ | 434 | */ |
433 | if (WARN_ONCE(tid_data->agg.state != IWL_AGG_ON && | 435 | if (WARN_ONCE(tid_data->agg.state != IWL_AGG_ON && |
434 | tid_data->agg.state != IWL_AGG_OFF, | 436 | tid_data->agg.state != IWL_AGG_OFF, |
435 | "Tx while agg.state = %d", tid_data->agg.state)) | 437 | "Tx while agg.state = %d", tid_data->agg.state)) |
436 | goto drop_unlock_sta; | 438 | goto drop_unlock_sta; |
437 | 439 | ||