All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 4/7] mac80211: remove ieee80211_sta_stop_rx_ba_session
Date: Tue, 06 Apr 2010 11:18:45 +0200	[thread overview]
Message-ID: <20100406092141.614607745@sipsolutions.net> (raw)
In-Reply-To: 20100406091841.549805267@sipsolutions.net

All callers of ieee80211_sta_stop_rx_ba_session can
just call __ieee80211_stop_rx_ba_session instead
because they already have the station struct, so do
that and remove ieee80211_sta_stop_rx_ba_session.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
 net/mac80211/agg-rx.c      |   24 ++----------------------
 net/mac80211/ht.c          |    3 +--
 net/mac80211/ieee80211_i.h |    2 --
 net/mac80211/rx.c          |    4 ++--
 4 files changed, 5 insertions(+), 28 deletions(-)

--- wireless-testing.orig/net/mac80211/agg-rx.c	2010-04-06 09:09:20.000000000 +0200
+++ wireless-testing/net/mac80211/agg-rx.c	2010-04-06 09:09:33.000000000 +0200
@@ -79,28 +79,9 @@ void __ieee80211_stop_rx_ba_session(stru
 	spin_unlock_bh(&sta->lock);
 }
 
-void ieee80211_sta_stop_rx_ba_session(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid,
-					u16 initiator, u16 reason)
-{
-	struct sta_info *sta;
-
-	rcu_read_lock();
-
-	sta = sta_info_get(sdata, ra);
-	if (!sta) {
-		rcu_read_unlock();
-		return;
-	}
-
-	__ieee80211_stop_rx_ba_session(sta, tid, initiator, reason);
-
-	rcu_read_unlock();
-}
-
 /*
  * 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.
  */
 static void sta_rx_agg_session_timer_expired(unsigned long data)
 {
@@ -116,9 +97,8 @@ static void sta_rx_agg_session_timer_exp
 #ifdef CONFIG_MAC80211_HT_DEBUG
 	printk(KERN_DEBUG "rx session timer expired on tid %d\n", (u16)*ptid);
 #endif
-	ieee80211_sta_stop_rx_ba_session(sta->sdata, sta->sta.addr,
-					 (u16)*ptid, WLAN_BACK_TIMER,
-					 WLAN_REASON_QSTA_TIMEOUT);
+	__ieee80211_stop_rx_ba_session(sta, *ptid, WLAN_BACK_RECIPIENT,
+				       WLAN_REASON_QSTA_TIMEOUT);
 }
 
 static void ieee80211_send_addba_resp(struct ieee80211_sub_if_data *sdata, u8 *da, u16 tid,
--- wireless-testing.orig/net/mac80211/ieee80211_i.h	2010-04-06 09:09:20.000000000 +0200
+++ wireless-testing/net/mac80211/ieee80211_i.h	2010-04-06 09:09:33.000000000 +0200
@@ -1098,8 +1098,6 @@ int ieee80211_send_smps_action(struct ie
 			       enum ieee80211_smps_mode smps, const u8 *da,
 			       const u8 *bssid);
 
-void ieee80211_sta_stop_rx_ba_session(struct ieee80211_sub_if_data *sdata, u8 *da,
-				u16 tid, u16 initiator, u16 reason);
 void __ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid,
 				    u16 initiator, u16 reason);
 void ieee80211_sta_tear_down_BA_sessions(struct sta_info *sta);
--- wireless-testing.orig/net/mac80211/rx.c	2010-04-06 09:09:32.000000000 +0200
+++ wireless-testing/net/mac80211/rx.c	2010-04-06 09:09:33.000000000 +0200
@@ -739,8 +739,8 @@ static void ieee80211_rx_reorder_ampdu(s
 	/* if this mpdu is fragmented - terminate rx aggregation session */
 	sc = le16_to_cpu(hdr->seq_ctrl);
 	if (sc & IEEE80211_SCTL_FRAG) {
-		ieee80211_sta_stop_rx_ba_session(sta->sdata, sta->sta.addr,
-			tid, 0, WLAN_REASON_QSTA_REQUIRE_SETUP);
+		__ieee80211_stop_rx_ba_session(sta, tid, WLAN_BACK_RECIPIENT,
+					       WLAN_REASON_QSTA_REQUIRE_SETUP);
 		dev_kfree_skb(skb);
 		return;
 	}
--- wireless-testing.orig/net/mac80211/ht.c	2010-04-06 09:09:20.000000000 +0200
+++ wireless-testing/net/mac80211/ht.c	2010-04-06 09:09:33.000000000 +0200
@@ -175,8 +175,7 @@ void ieee80211_process_delba(struct ieee
 #endif /* CONFIG_MAC80211_HT_DEBUG */
 
 	if (initiator == WLAN_BACK_INITIATOR)
-		ieee80211_sta_stop_rx_ba_session(sdata, sta->sta.addr, tid,
-						 WLAN_BACK_INITIATOR, 0);
+		__ieee80211_stop_rx_ba_session(sta, tid, WLAN_BACK_INITIATOR, 0);
 	else { /* WLAN_BACK_RECIPIENT */
 		spin_lock_bh(&sta->lock);
 		if (sta->ampdu_mlme.tid_state_tx[tid] & HT_ADDBA_REQUESTED_MSK)



  parent reply	other threads:[~2010-04-06  9:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-06  9:18 [PATCH 0/7] mac80211 fixes Johannes Berg
2010-04-06  9:18 ` [PATCH 1/7] mac80211: annotate station rcu dereferences Johannes Berg
2010-04-06  9:18 ` [PATCH 2/7] mac80211: fix station destruction problem Johannes Berg
2010-04-06  9:18 ` [PATCH 3/7] mac80211: remove irq disabling for sta lock Johannes Berg
2010-04-06  9:18 ` Johannes Berg [this message]
2010-04-06  9:18 ` [PATCH 5/7] mac80211: rename WLAN_STA_SUSPEND to WLAN_STA_BLOCK_BA Johannes Berg
2010-04-06  9:18 ` [PATCH 6/7] mac80211: clean up/fix aggregation code Johannes Berg
2010-04-06  9:18 ` [PATCH 7/7] mac80211: fix some RX aggregation locking Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100406092141.614607745@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.