aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-05-15 06:55:29 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-05-21 21:48:11 -0400
commite039fa4a4195ac4ee895e6f3d1334beed63256fe (patch)
treecfd0762d73df96b73052378be7b157c4ac6e7035 /drivers/net/wireless/iwlwifi/iwl-3945-rs.c
parente24549485f859be6518929bb1c9c0257d79f033d (diff)
mac80211: move TX info into skb->cb
This patch converts mac80211 and all drivers to have transmit information and status in skb->cb rather than allocating extra memory for it and copying all the data around. To make it fit, a union is used where only data that is necessary for all steps is kept outside of the union. A number of fixes were done by Ivo, as well as the rt2x00 part of this patch. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945-rs.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945-rs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
index f3ca02fe9619..10c64bdb314c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
@@ -445,8 +445,7 @@ static int rs_adjust_next_rate(struct iwl3945_priv *priv, int rate)
445 */ 445 */
446static void rs_tx_status(void *priv_rate, 446static void rs_tx_status(void *priv_rate,
447 struct net_device *dev, 447 struct net_device *dev,
448 struct sk_buff *skb, 448 struct sk_buff *skb)
449 struct ieee80211_tx_status *tx_resp)
450{ 449{
451 u8 retries, current_count; 450 u8 retries, current_count;
452 int scale_rate_index, first_index, last_index; 451 int scale_rate_index, first_index, last_index;
@@ -457,14 +456,15 @@ static void rs_tx_status(void *priv_rate,
457 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); 456 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
458 struct iwl3945_rs_sta *rs_sta; 457 struct iwl3945_rs_sta *rs_sta;
459 struct ieee80211_supported_band *sband; 458 struct ieee80211_supported_band *sband;
459 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
460 460
461 IWL_DEBUG_RATE("enter\n"); 461 IWL_DEBUG_RATE("enter\n");
462 462
463 sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; 463 sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
464 464
465 465
466 retries = tx_resp->retry_count; 466 retries = info->status.retry_count;
467 first_index = sband->bitrates[tx_resp->control.tx_rate_idx].hw_value; 467 first_index = sband->bitrates[info->tx_rate_idx].hw_value;
468 if ((first_index < 0) || (first_index >= IWL_RATE_COUNT)) { 468 if ((first_index < 0) || (first_index >= IWL_RATE_COUNT)) {
469 IWL_DEBUG_RATE("leave: Rate out of bounds: %d\n", first_index); 469 IWL_DEBUG_RATE("leave: Rate out of bounds: %d\n", first_index);
470 return; 470 return;
@@ -525,11 +525,11 @@ static void rs_tx_status(void *priv_rate,
525 /* Update the last index window with success/failure based on ACK */ 525 /* Update the last index window with success/failure based on ACK */
526 IWL_DEBUG_RATE("Update rate %d with %s.\n", 526 IWL_DEBUG_RATE("Update rate %d with %s.\n",
527 last_index, 527 last_index,
528 (tx_resp->flags & IEEE80211_TX_STATUS_ACK) ? 528 (info->flags & IEEE80211_TX_STAT_ACK) ?
529 "success" : "failure"); 529 "success" : "failure");
530 iwl3945_collect_tx_data(rs_sta, 530 iwl3945_collect_tx_data(rs_sta,
531 &rs_sta->win[last_index], 531 &rs_sta->win[last_index],
532 tx_resp->flags & IEEE80211_TX_STATUS_ACK, 1); 532 info->flags & IEEE80211_TX_STAT_ACK, 1);
533 533
534 /* We updated the rate scale window -- if its been more than 534 /* We updated the rate scale window -- if its been more than
535 * flush_time since the last run, schedule the flush 535 * flush_time since the last run, schedule the flush