2008-03-19 19:30:50

by Reinette Chatre

[permalink] [raw]
Subject: [PATCH 0/3] mac80211 updates

This series contains three updates specific to mac80211.

[PATCH 1/3] mac80211: fixing delba debug print
[PATCH 2/3] mac80211: fixing debug prints for AddBA request
[PATCH 3/3] mac80211: tear down of block ack sessions


Thanks

Reinette


2008-03-19 19:30:48

by Reinette Chatre

[permalink] [raw]
Subject: [PATCH 1/3] mac80211: fixing delba debug print

From: Ron Rindjunsky <[email protected]>

This patch fixes a wrong debug print when receiving delba

Signed-off-by: Ron Rindjunsky <[email protected]>
Signed-off-by: Tomas Winkler <[email protected]>
---
net/mac80211/ieee80211_sta.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index 8b991eb..6e673df 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -1427,7 +1427,7 @@ static void ieee80211_sta_process_delba(struct net_device *dev,
if (net_ratelimit())
printk(KERN_DEBUG "delba from %s (%s) tid %d reason code %d\n",
print_mac(mac, mgmt->sa),
- initiator ? "recipient" : "initiator", tid,
+ initiator ? "initiator" : "recipient", tid,
mgmt->u.action.u.delba.reason_code);
#endif /* CONFIG_MAC80211_HT_DEBUG */

--
1.5.3.4


2008-03-19 19:30:51

by Reinette Chatre

[permalink] [raw]
Subject: [PATCH 3/3] mac80211: tear down of block ack sessions

From: Ron Rindjunsky <[email protected]>

This patch adds a clean tear down for all block ack sessions if interface
goes down or if a deauthentication is done.

Signed-off-by: Ron Rindjunsky <[email protected]>
Signed-off-by: Tomas Winkler <[email protected]>
---
net/mac80211/ieee80211.c | 7 +------
net/mac80211/ieee80211_i.h | 2 ++
net/mac80211/ieee80211_sta.c | 15 ++++++++++++++-
3 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c
index 55b6371..616ce10 100644
--- a/net/mac80211/ieee80211.c
+++ b/net/mac80211/ieee80211.c
@@ -386,7 +386,6 @@ static int ieee80211_stop(struct net_device *dev)
struct ieee80211_local *local = sdata->local;
struct ieee80211_if_init_conf conf;
struct sta_info *sta;
- int i;

/*
* Stop TX on this interface first.
@@ -400,11 +399,7 @@ static int ieee80211_stop(struct net_device *dev)

list_for_each_entry_rcu(sta, &local->sta_list, list) {
if (sta->sdata == sdata)
- for (i = 0; i < STA_TID_NUM; i++)
- ieee80211_sta_stop_rx_ba_session(sdata->dev,
- sta->addr, i,
- WLAN_BACK_RECIPIENT,
- WLAN_REASON_QSTA_LEAVE_QBSS);
+ ieee80211_sta_tear_down_BA_sessions(dev, sta->addr);
}

rcu_read_unlock();
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 5c7b8e2..d4c5f65 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -930,10 +930,12 @@ void ieee80211_send_addba_request(struct net_device *dev, const u8 *da,
u16 agg_size, u16 timeout);
void ieee80211_send_delba(struct net_device *dev, const u8 *da, u16 tid,
u16 initiator, u16 reason_code);
+
void ieee80211_sta_stop_rx_ba_session(struct net_device *dev, u8 *da,
u16 tid, u16 initiator, u16 reason);
void sta_rx_agg_session_timer_expired(unsigned long data);
void sta_addba_resp_timer_expired(unsigned long data);
+void ieee80211_sta_tear_down_BA_sessions(struct net_device *dev, u8 *addr);
u64 ieee80211_sta_get_rates(struct ieee80211_local *local,
struct ieee802_11_elems *elems,
enum ieee80211_band band);
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index 8006c28..4255ec4 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -467,8 +467,8 @@ static void ieee80211_set_associated(struct net_device *dev,
memcpy(wrqu.ap_addr.sa_data, sdata->u.sta.bssid, ETH_ALEN);
ieee80211_sta_send_associnfo(dev, ifsta);
} else {
+ ieee80211_sta_tear_down_BA_sessions(dev, ifsta->bssid);
ifsta->flags &= ~IEEE80211_STA_ASSOCIATED;
-
netif_carrier_off(dev);
ieee80211_reset_erp_info(dev);
memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN);
@@ -1518,6 +1518,19 @@ void sta_rx_agg_session_timer_expired(unsigned long data)
WLAN_REASON_QSTA_TIMEOUT);
}

+void ieee80211_sta_tear_down_BA_sessions(struct net_device *dev, u8 *addr)
+{
+ struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
+ int i;
+
+ for (i = 0; i < STA_TID_NUM; i++) {
+ ieee80211_stop_tx_ba_session(&local->hw, addr, i,
+ WLAN_BACK_INITIATOR);
+ ieee80211_sta_stop_rx_ba_session(dev, addr, i,
+ WLAN_BACK_RECIPIENT,
+ WLAN_REASON_QSTA_LEAVE_QBSS);
+ }
+}

static void ieee80211_rx_mgmt_auth(struct net_device *dev,
struct ieee80211_if_sta *ifsta,
--
1.5.3.4


2008-03-19 19:30:51

by Reinette Chatre

[permalink] [raw]
Subject: [PATCH 2/3] mac80211: fixing debug prints for AddBA request

From: Ron Rindjunsky <[email protected]>

This patch also fixes the Rx timer's comments

Signed-off-by: Ron Rindjunsky <[email protected]>
Signed-off-by: Tomas Winkler <[email protected]>
---
net/mac80211/ieee80211_sta.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index 6e673df..8006c28 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -1145,7 +1145,7 @@ static void ieee80211_sta_process_addba_request(struct net_device *dev,
status = WLAN_STATUS_INVALID_QOS_PARAM;
#ifdef CONFIG_MAC80211_HT_DEBUG
if (net_ratelimit())
- printk(KERN_DEBUG "Block Ack Req with bad params from "
+ printk(KERN_DEBUG "AddBA Req with bad params from "
"%s on tid %u. policy %d, buffer size %d\n",
print_mac(mac, mgmt->sa), tid, ba_policy,
buf_size);
@@ -1169,7 +1169,7 @@ static void ieee80211_sta_process_addba_request(struct net_device *dev,
if (tid_agg_rx->state != HT_AGG_STATE_IDLE) {
#ifdef CONFIG_MAC80211_HT_DEBUG
if (net_ratelimit())
- printk(KERN_DEBUG "unexpected Block Ack Req from "
+ printk(KERN_DEBUG "unexpected AddBA Req from "
"%s on tid %u\n",
print_mac(mac, mgmt->sa), tid);
#endif /* CONFIG_MAC80211_HT_DEBUG */
@@ -1497,8 +1497,8 @@ timer_expired_exit:
}

/*
- * After receiving Block Ack Request (BAR) we activated a
- * timer after each frame arrives from the originator.
+ * After accepting the AddBA Request we activated a timer,
+ * resetting it after each frame that arrives from the originator.
* if this timer expires ieee80211_sta_stop_rx_ba_session will be executed.
*/
void sta_rx_agg_session_timer_expired(unsigned long data)
--
1.5.3.4