Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 136136
b: refs/heads/master
c: 722f069
h: refs/heads/master
v: v3
  • Loading branch information
Sujith authored and John W. Linville committed Mar 28, 2009
1 parent 274c9e8 commit 16a9a81
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e23a9014fd4d502a419255a83e2479ab804c6f16
refs/heads/master: 722f069a6dc95d7c6c2cdfbe3413899a3b768f9c
8 changes: 8 additions & 0 deletions trunk/net/mac80211/agg-rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,14 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,

status = WLAN_STATUS_REQUEST_DECLINED;

if (test_sta_flags(sta, WLAN_STA_SUSPEND)) {
#ifdef CONFIG_MAC80211_HT_DEBUG
printk(KERN_DEBUG "Suspend in progress. "
"Denying ADDBA request\n");
#endif
goto end_no_lock;
}

/* sanity check for incoming parameters:
* check if configuration can support the BA policy
* and if buffer size does not exceeds max value */
Expand Down
9 changes: 9 additions & 0 deletions trunk/net/mac80211/agg-tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,15 @@ int ieee80211_start_tx_ba_session(struct ieee80211_hw *hw, u8 *ra, u16 tid)
goto unlock;
}

if (test_sta_flags(sta, WLAN_STA_SUSPEND)) {
#ifdef CONFIG_MAC80211_HT_DEBUG
printk(KERN_DEBUG "Suspend in progress. "
"Denying BA session request\n");
#endif
ret = -EINVAL;
goto unlock;
}

spin_lock_bh(&sta->lock);

sdata = sta->sdata;
Expand Down
25 changes: 25 additions & 0 deletions trunk/net/mac80211/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ int __ieee80211_suspend(struct ieee80211_hw *hw)
list_for_each_entry(sdata, &local->interfaces, list)
ieee80211_disable_keys(sdata);

/* Tear down aggregation sessions */

rcu_read_lock();

if (hw->flags & IEEE80211_HW_AMPDU_AGGREGATION) {
list_for_each_entry_rcu(sta, &local->sta_list, list) {
set_sta_flags(sta, WLAN_STA_SUSPEND);
ieee80211_sta_tear_down_BA_sessions(sta);
}
}

rcu_read_unlock();

/* remove STAs */
if (local->ops->sta_notify) {
spin_lock_irqsave(&local->sta_lock, flags);
Expand Down Expand Up @@ -102,6 +115,18 @@ int __ieee80211_resume(struct ieee80211_hw *hw)
spin_unlock_irqrestore(&local->sta_lock, flags);
}

/* Clear Suspend state so that ADDBA requests can be processed */

rcu_read_lock();

if (hw->flags & IEEE80211_HW_AMPDU_AGGREGATION) {
list_for_each_entry_rcu(sta, &local->sta_list, list) {
clear_sta_flags(sta, WLAN_STA_SUSPEND);
}
}

rcu_read_unlock();

/* add back keys */
list_for_each_entry(sdata, &local->interfaces, list)
if (netif_running(sdata->dev))
Expand Down
3 changes: 3 additions & 0 deletions trunk/net/mac80211/sta_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
* IEEE80211_TX_CTL_CLEAR_PS_FILT control flag) when the next
* frame to this station is transmitted.
* @WLAN_STA_MFP: Management frame protection is used with this STA.
* @WLAN_STA_SUSPEND: Set/cleared during a suspend/resume cycle.
* Used to deny ADDBA requests (both TX and RX).
*/
enum ieee80211_sta_info_flags {
WLAN_STA_AUTH = 1<<0,
Expand All @@ -48,6 +50,7 @@ enum ieee80211_sta_info_flags {
WLAN_STA_PSPOLL = 1<<8,
WLAN_STA_CLEAR_PS_FILT = 1<<9,
WLAN_STA_MFP = 1<<10,
WLAN_STA_SUSPEND = 1<<11
};

#define STA_TID_NUM 16
Expand Down

0 comments on commit 16a9a81

Please sign in to comment.