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>
Dieser Commit ist enthalten in:

committet von
John W. Linville

Ursprung
e24549485f
Commit
e039fa4a41
@@ -445,8 +445,7 @@ static int rs_adjust_next_rate(struct iwl3945_priv *priv, int rate)
|
||||
*/
|
||||
static void rs_tx_status(void *priv_rate,
|
||||
struct net_device *dev,
|
||||
struct sk_buff *skb,
|
||||
struct ieee80211_tx_status *tx_resp)
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
u8 retries, current_count;
|
||||
int scale_rate_index, first_index, last_index;
|
||||
@@ -457,14 +456,15 @@ static void rs_tx_status(void *priv_rate,
|
||||
struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
|
||||
struct iwl3945_rs_sta *rs_sta;
|
||||
struct ieee80211_supported_band *sband;
|
||||
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
|
||||
|
||||
IWL_DEBUG_RATE("enter\n");
|
||||
|
||||
sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
|
||||
|
||||
|
||||
retries = tx_resp->retry_count;
|
||||
first_index = sband->bitrates[tx_resp->control.tx_rate_idx].hw_value;
|
||||
retries = info->status.retry_count;
|
||||
first_index = sband->bitrates[info->tx_rate_idx].hw_value;
|
||||
if ((first_index < 0) || (first_index >= IWL_RATE_COUNT)) {
|
||||
IWL_DEBUG_RATE("leave: Rate out of bounds: %d\n", first_index);
|
||||
return;
|
||||
@@ -525,11 +525,11 @@ static void rs_tx_status(void *priv_rate,
|
||||
/* Update the last index window with success/failure based on ACK */
|
||||
IWL_DEBUG_RATE("Update rate %d with %s.\n",
|
||||
last_index,
|
||||
(tx_resp->flags & IEEE80211_TX_STATUS_ACK) ?
|
||||
(info->flags & IEEE80211_TX_STAT_ACK) ?
|
||||
"success" : "failure");
|
||||
iwl3945_collect_tx_data(rs_sta,
|
||||
&rs_sta->win[last_index],
|
||||
tx_resp->flags & IEEE80211_TX_STATUS_ACK, 1);
|
||||
info->flags & IEEE80211_TX_STAT_ACK, 1);
|
||||
|
||||
/* We updated the rate scale window -- if its been more than
|
||||
* flush_time since the last run, schedule the flush
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren