Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Unified Diff: chromeos/compat-wireless/net/mac80211/status.c

Issue 5326002: Update compat-wireless to 2.6.36-5-spn (Closed) Base URL: http://git.chromium.org/git/kernel.git@master
Patch Set: Fixes for !ACK handling, missing local changes, log message fixes Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chromeos/compat-wireless/net/mac80211/status.c
diff --git a/chromeos/compat-wireless/net/mac80211/status.c b/chromeos/compat-wireless/net/mac80211/status.c
index c5fc7551a568b871e0a76aa27f6f327dcc5c2b22..98145de43c82cb4f1f457a5bdd6920efbcc3a485 100644
--- a/chromeos/compat-wireless/net/mac80211/status.c
+++ b/chromeos/compat-wireless/net/mac80211/status.c
@@ -58,6 +58,7 @@ static void ieee80211_handle_filtered_frame(struct ieee80211_local *local,
info->control.vif = &sta->sdata->vif;
info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING |
IEEE80211_TX_INTFL_RETRANSMISSION;
+ info->flags &= ~IEEE80211_TX_TEMPORARY_FLAGS;
sta->tx_filtered_count++;
@@ -123,18 +124,14 @@ static void ieee80211_handle_filtered_frame(struct ieee80211_local *local,
dev_kfree_skb(skb);
}
-static void ieee80211_sta_tx_status(struct sta_info *sta, struct sk_buff *skb)
+static void ieee80211_frame_acked(struct sta_info *sta, struct sk_buff *skb)
{
struct ieee80211_mgmt *mgmt = (void *) skb->data;
struct ieee80211_local *local = sta->local;
struct ieee80211_sub_if_data *sdata = sta->sdata;
- struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
-
- if (sdata->vif.type != NL80211_IFTYPE_STATION)
- return;
if (ieee80211_is_action(mgmt->frame_control) &&
- (info->flags & IEEE80211_TX_STAT_ACK) &&
+ sdata->vif.type == NL80211_IFTYPE_STATION &&
mgmt->u.action.category == WLAN_CATEGORY_HT &&
mgmt->u.action.u.ht_smps.action == WLAN_HT_ACTION_SMPS) {
/*
@@ -158,18 +155,10 @@ static void ieee80211_sta_tx_status(struct sta_info *sta, struct sk_buff *skb)
}
ieee80211_queue_work(&local->hw, &local->recalc_smps);
- } else if (ieee80211_is_probe_req(mgmt->frame_control) ||
- ieee80211_is_nullfunc(mgmt->frame_control)) {
- struct ieee80211_if_managed *ifmgd = &sta->sdata->u.mgd;
-
- ifmgd->probe_acked =
- (info->flags & IEEE80211_TX_STAT_ACK) ? true : false;
-
- ieee80211_queue_work(&local->hw, &ifmgd->probe_status_work);
} else if (ieee80211_is_data(mgmt->frame_control) &&
- sdata->vif.type == NL80211_IFTYPE_STATION &&
- (info->flags & IEEE80211_TX_STAT_ACK)) {
- struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ sdata->vif.type == NL80211_IFTYPE_STATION) {
+ struct ieee80211_if_managed *ifmgd;
+ ifmgd = &sta->sdata->u.mgd;
if (ifmgd->cqm_bitrate_thold != 0 &&
(ifmgd->last_cqm_tx_rate.idx != sta->last_tx_rate.idx ||
(ifmgd->last_cqm_tx_rate.flags &
@@ -203,6 +192,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
int retry_count = -1, i;
int rates_idx = -1;
bool send_to_cooked;
+ bool acked;
for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) {
/* the HW cannot have attempted that rate */
@@ -228,8 +218,8 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
if (memcmp(hdr->addr2, sta->sdata->vif.addr, ETH_ALEN))
continue;
- if (!(info->flags & IEEE80211_TX_STAT_ACK) &&
- test_sta_flags(sta, WLAN_STA_PS_STA)) {
+ acked = !!(info->flags & IEEE80211_TX_STAT_ACK);
+ if (!acked && test_sta_flags(sta, WLAN_STA_PS_STA)) {
/*
* The STA is in power save mode, so assume
* that this TX packet failed because of that.
@@ -261,7 +251,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
rcu_read_unlock();
return;
} else {
- if (!(info->flags & IEEE80211_TX_STAT_ACK))
+ if (!acked)
sta->tx_retry_failed++;
sta->tx_retry_count += retry_count;
}
@@ -270,8 +260,12 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
if (ieee80211_vif_is_mesh(&sta->sdata->vif))
ieee80211s_update_metric(local, sta, skb);
- if (!(info->flags & IEEE80211_TX_CTL_INJECTED))
- ieee80211_sta_tx_status(sta, skb);
+ if (!(info->flags & IEEE80211_TX_CTL_INJECTED) && acked)
+ ieee80211_frame_acked(sta, skb);
+
+ if ((sta->sdata->vif.type == NL80211_IFTYPE_STATION) &&
+ (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS))
+ ieee80211_sta_tx_notify(sta->sdata, (void *) skb->data, acked);
}
rcu_read_unlock();
@@ -406,7 +400,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
skb2 = skb_clone(skb, GFP_ATOMIC);
if (skb2) {
skb2->dev = prev_dev;
- netif_receive_skb(skb2);
+ netif_rx(skb2);
}
}
@@ -415,7 +409,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
}
if (prev_dev) {
skb->dev = prev_dev;
- netif_receive_skb(skb);
+ netif_rx(skb);
skb = NULL;
}
rcu_read_unlock();

Powered by Google App Engine
This is Rietveld 408576698