~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to net/mac80211/status.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
         *  (b) always process RX events before TX status events if ordering
99
99
         *      can be unknown, for example with different interrupt status
100
100
         *      bits.
 
101
         *  (c) if PS mode transitions are manual (i.e. the flag
 
102
         *      %IEEE80211_HW_AP_LINK_PS is set), always process PS state
 
103
         *      changes before calling TX status events if ordering can be
 
104
         *      unknown.
101
105
         */
102
106
        if (test_sta_flags(sta, WLAN_STA_PS_STA) &&
103
107
            skb_queue_len(&sta->tx_filtered) < STA_MAX_TX_BUFFER) {
185
189
        bool acked;
186
190
 
187
191
        for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) {
188
 
                /* the HW cannot have attempted that rate */
189
 
                if (i >= hw->max_report_rates) {
 
192
                if (info->status.rates[i].idx < 0) {
 
193
                        break;
 
194
                } else if (i >= hw->max_report_rates) {
 
195
                        /* the HW cannot have attempted that rate */
190
196
                        info->status.rates[i].idx = -1;
191
197
                        info->status.rates[i].count = 0;
192
 
                } else if (info->status.rates[i].idx >= 0) {
193
 
                        rates_idx = i;
 
198
                        break;
194
199
                }
195
200
 
196
201
                retry_count += info->status.rates[i].count;
197
202
        }
 
203
        rates_idx = i - 1;
 
204
 
198
205
        if (retry_count < 0)
199
206
                retry_count = 0;
200
207
 
314
321
                if (info->flags & IEEE80211_TX_STAT_ACK) {
315
322
                        local->ps_sdata->u.mgd.flags |=
316
323
                                        IEEE80211_STA_NULLFUNC_ACKED;
317
 
                        ieee80211_queue_work(&local->hw,
318
 
                                        &local->dynamic_ps_enable_work);
319
324
                } else
320
325
                        mod_timer(&local->dynamic_ps_timer, jiffies +
321
326
                                        msecs_to_jiffies(10));
339
344
                        cookie = local->hw_roc_cookie ^ 2;
340
345
                        local->hw_roc_skb_for_status = NULL;
341
346
                }
 
347
 
 
348
                if (cookie == local->hw_offchan_tx_cookie)
 
349
                        local->hw_offchan_tx_cookie = 0;
 
350
 
342
351
                cfg80211_mgmt_tx_status(
343
352
                        skb->dev, cookie, skb->data, skb->len,
344
353
                        !!(info->flags & IEEE80211_TX_STAT_ACK), GFP_ATOMIC);
437
446
        dev_kfree_skb(skb);
438
447
}
439
448
EXPORT_SYMBOL(ieee80211_tx_status);
 
449
 
 
450
void ieee80211_report_low_ack(struct ieee80211_sta *pubsta, u32 num_packets)
 
451
{
 
452
        struct sta_info *sta = container_of(pubsta, struct sta_info, sta);
 
453
        cfg80211_cqm_pktloss_notify(sta->sdata->dev, sta->sta.addr,
 
454
                                    num_packets, GFP_ATOMIC);
 
455
}
 
456
EXPORT_SYMBOL(ieee80211_report_low_ack);