Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202995
b: refs/heads/master
c: 2a41905
h: refs/heads/master
i:
  202993: dd0091c
  202991: 71c0051
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jun 14, 2010
1 parent af03ac9 commit f53c663
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 57 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9d38d85de0270e3927bffab94973a9c78d1dc800
refs/heads/master: 2a419056c15478d2df3f3e9d4fa64e34eb1faa7d
10 changes: 1 addition & 9 deletions trunk/net/mac80211/agg-tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,17 +239,9 @@ int ieee80211_start_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid)
sdata->vif.type != NL80211_IFTYPE_AP)
return -EINVAL;

if (test_sta_flags(sta, WLAN_STA_DISASSOC)) {
#ifdef CONFIG_MAC80211_HT_DEBUG
printk(KERN_DEBUG "Disassociation is in progress. "
"Denying BA session request\n");
#endif
return -EINVAL;
}

if (test_sta_flags(sta, WLAN_STA_BLOCK_BA)) {
#ifdef CONFIG_MAC80211_HT_DEBUG
printk(KERN_DEBUG "Suspend in progress. "
printk(KERN_DEBUG "BA sessions blocked. "
"Denying BA session request\n");
#endif
return -EINVAL;
Expand Down
13 changes: 0 additions & 13 deletions trunk/net/mac80211/iface.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,6 @@ static int ieee80211_stop(struct net_device *dev)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct ieee80211_local *local = sdata->local;
struct sta_info *sta;
unsigned long flags;
struct sk_buff *skb, *tmp;
u32 hw_reconf_flags = 0;
Expand All @@ -355,18 +354,6 @@ static int ieee80211_stop(struct net_device *dev)
*/
ieee80211_work_purge(sdata);

/*
* Now delete all active aggregation sessions.
*/
rcu_read_lock();

list_for_each_entry_rcu(sta, &local->sta_list, list) {
if (sta->sdata == sdata)
ieee80211_sta_tear_down_BA_sessions(sta);
}

rcu_read_unlock();

/*
* Remove all stations associated with this interface.
*
Expand Down
6 changes: 3 additions & 3 deletions trunk/net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -898,13 +898,13 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
netif_tx_stop_all_queues(sdata->dev);
netif_carrier_off(sdata->dev);

rcu_read_lock();
mutex_lock(&local->sta_mtx);
sta = sta_info_get(sdata, bssid);
if (sta) {
set_sta_flags(sta, WLAN_STA_DISASSOC);
set_sta_flags(sta, WLAN_STA_BLOCK_BA);
ieee80211_sta_tear_down_BA_sessions(sta);
}
rcu_read_unlock();
mutex_unlock(&local->sta_mtx);

changed |= ieee80211_reset_erp_info(sdata);

Expand Down
16 changes: 4 additions & 12 deletions trunk/net/mac80211/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,14 @@ 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) {
/* tear down aggregation sessions and remove STAs */
mutex_lock(&local->sta_mtx);
list_for_each_entry(sta, &local->sta_list, list) {
if (hw->flags & IEEE80211_HW_AMPDU_AGGREGATION) {
set_sta_flags(sta, WLAN_STA_BLOCK_BA);
ieee80211_sta_tear_down_BA_sessions(sta);
}
}

rcu_read_unlock();

/* remove STAs */
mutex_lock(&local->sta_mtx);
list_for_each_entry(sta, &local->sta_list, list) {
if (sta->uploaded) {
sdata = sta->sdata;
if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
Expand Down
4 changes: 0 additions & 4 deletions trunk/net/mac80211/sta_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@
* be in the queues
* @WLAN_STA_PSPOLL: Station sent PS-poll while driver was keeping
* station in power-save mode, reply when the driver unblocks.
* @WLAN_STA_DISASSOC: Disassociation in progress.
* This is used to reject TX BA session requests when disassociation
* is in progress.
*/
enum ieee80211_sta_info_flags {
WLAN_STA_AUTH = 1<<0,
Expand All @@ -60,7 +57,6 @@ enum ieee80211_sta_info_flags {
WLAN_STA_BLOCK_BA = 1<<11,
WLAN_STA_PS_DRIVER = 1<<12,
WLAN_STA_PSPOLL = 1<<13,
WLAN_STA_DISASSOC = 1<<14,
};

#define STA_TID_NUM 16
Expand Down
31 changes: 16 additions & 15 deletions trunk/net/mac80211/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1138,18 +1138,6 @@ int ieee80211_reconfig(struct ieee80211_local *local)
}
mutex_unlock(&local->sta_mtx);

/* 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_BLOCK_BA);
}
}

rcu_read_unlock();

/* setup RTS threshold */
drv_set_rts_threshold(local, hw->wiphy->rts_threshold);

Expand Down Expand Up @@ -1202,13 +1190,26 @@ int ieee80211_reconfig(struct ieee80211_local *local)
}
}

rcu_read_lock();
/*
* Clear the WLAN_STA_BLOCK_BA flag so new aggregation
* sessions can be established after a resume.
*
* Also tear down aggregation sessions since reconfiguring
* them in a hardware restart scenario is not easily done
* right now, and the hardware will have lost information
* about the sessions, but we and the AP still think they
* are active. This is really a workaround though.
*/
if (hw->flags & IEEE80211_HW_AMPDU_AGGREGATION) {
list_for_each_entry_rcu(sta, &local->sta_list, list) {
mutex_lock(&local->sta_mtx);

list_for_each_entry(sta, &local->sta_list, list) {
ieee80211_sta_tear_down_BA_sessions(sta);
clear_sta_flags(sta, WLAN_STA_BLOCK_BA);
}

mutex_unlock(&local->sta_mtx);
}
rcu_read_unlock();

/* add back keys */
list_for_each_entry(sdata, &local->interfaces, list)
Expand Down

0 comments on commit f53c663

Please sign in to comment.