Chromium Code Reviews| 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..55f2e43f9221d790b451c7494e87d8a3af1fc69b 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 & |
| @@ -185,6 +174,10 @@ static void ieee80211_sta_tx_status(struct sta_info *sta, struct sk_buff *skb) |
| &ifmgd->bitrate_notify_work); |
| } |
| } |
| + |
| + if ((sdata->vif.type == NL80211_IFTYPE_STATION) && |
| + (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)) |
| + ieee80211_sta_tx_notify(sdata, (void *) skb->data); |
| } |
| void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) |
| @@ -270,8 +263,9 @@ 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) && |
| + (info->flags & IEEE80211_TX_STAT_ACK)) |
| + ieee80211_frame_acked(sta, skb); |
|
Sam Leffler
2010/12/01 00:23:44
these changes are wrong; you don't notify when tx
|
| } |
| 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(); |