linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org,
	Naftali Goldstein <naftali.goldstein@intel.com>,
	Luca Coelho <luciano.coelho@intel.com>
Subject: [PATCH 07/10] mac80211: add api to start ba session timer expired flow
Date: Sat,  5 Aug 2017 11:44:35 +0300	[thread overview]
Message-ID: <20170805084438.12550-8-luca@coelho.fi> (raw)
In-Reply-To: <20170805084438.12550-1-luca@coelho.fi>

From: Naftali Goldstein <naftali.goldstein@intel.com>

Some drivers handle rx buffer reordering internally (and by extension
handle also the rx ba session timer internally), but do not ofload the
addba/delba negotiation.
Add an api for these drivers to properly tear-down the ba session,
including sending a delba.

Signed-off-by: Naftali Goldstein <naftali.goldstein@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 include/net/mac80211.h | 15 +++++++++++++++
 net/mac80211/agg-rx.c  | 22 +++++++++++++++++++++-
 2 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index b2b5419467cc..64f5abb02030 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -5499,6 +5499,21 @@ static inline void ieee80211_stop_rx_ba_session_offl(struct ieee80211_vif *vif,
 	ieee80211_manage_rx_ba_offl(vif, addr, tid + IEEE80211_NUM_TIDS);
 }
 
+/**
+ * ieee80211_rx_ba_timer_expired - stop a Rx BA session due to timeout
+ *
+ * Some device drivers do not offload AddBa/DelBa negotiation, but handle rx
+ * buffer reording internally, and therefore also handle the session timer.
+ *
+ * Trigger the timeout flow, which sends a DelBa.
+ *
+ * @vif: &struct ieee80211_vif pointer from the add_interface callback
+ * @addr: station mac address
+ * @tid: the rx tid
+ */
+void ieee80211_rx_ba_timer_expired(struct ieee80211_vif *vif,
+				   const u8 *addr, unsigned int bit);
+
 /* Rate control API */
 
 /**
diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c
index 8708cbe8af5b..34599bd38991 100644
--- a/net/mac80211/agg-rx.c
+++ b/net/mac80211/agg-rx.c
@@ -7,7 +7,7 @@
  * Copyright 2006-2007	Jiri Benc <jbenc@suse.cz>
  * Copyright 2007, Michael Wu <flamingice@sourmilk.net>
  * Copyright 2007-2010, Intel Corporation
- * Copyright(c) 2015 Intel Deutschland GmbH
+ * Copyright(c) 2015-2017 Intel Deutschland GmbH
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -466,3 +466,23 @@ void ieee80211_manage_rx_ba_offl(struct ieee80211_vif *vif,
 	rcu_read_unlock();
 }
 EXPORT_SYMBOL(ieee80211_manage_rx_ba_offl);
+
+void ieee80211_rx_ba_timer_expired(struct ieee80211_vif *vif,
+				   const u8 *addr, unsigned int bit)
+{
+	struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
+	struct ieee80211_local *local = sdata->local;
+	struct sta_info *sta;
+
+	rcu_read_lock();
+	sta = sta_info_get_bss(sdata, addr);
+	if (!sta)
+		goto unlock;
+
+	set_bit(bit, sta->ampdu_mlme.tid_rx_timer_expired);
+	ieee80211_queue_work(&local->hw, &sta->ampdu_mlme.work);
+
+ unlock:
+	rcu_read_unlock();
+}
+EXPORT_SYMBOL(ieee80211_rx_ba_timer_expired);
-- 
2.13.2

  parent reply	other threads:[~2017-08-05  8:45 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-05  8:44 [PATCH 00/10] mac80211 patches from our internal tree 2017-08-05 Luca Coelho
2017-08-05  8:44 ` [PATCH 01/10] mac80211: add MESH IE in the correct order Luca Coelho
2017-08-05  8:44 ` [PATCH 02/10] mac80211: shorten debug prints using ht_dbg() to avoid warning Luca Coelho
2017-08-05  8:44 ` [PATCH 03/10] mac80211: extend ieee80211_ie_split to support EXTENSION Luca Coelho
2017-08-05  8:44 ` [PATCH 04/10] mac80211: simplify and clarify IE splitting Luca Coelho
2017-08-05  8:44 ` [PATCH 05/10] ieee80211: Add WFA TPC report element OUI type Luca Coelho
2017-09-06 10:29   ` Johannes Berg
2017-09-29 11:21     ` [PATCH v2] " Luca Coelho
2017-08-05  8:44 ` [PATCH 06/10] cfg80211: honor NL80211_RRF_NO_HT40{MINUS,PLUS} Luca Coelho
2017-09-05 14:30   ` Johannes Berg
2017-09-05 16:49     ` Grumbach, Emmanuel
2017-09-06  7:29       ` Johannes Berg
2017-09-06  7:51         ` Grumbach, Emmanuel
2017-09-06 10:45   ` [PATCH v2] " Emmanuel Grumbach
2017-08-05  8:44 ` Luca Coelho [this message]
2017-08-05 23:14   ` [PATCH 07/10] mac80211: add api to start ba session timer expired flow kbuild test robot
2017-08-06  7:15   ` [PATCH v2] " Luca Coelho
2017-08-05  8:44 ` [PATCH 08/10] mac80211: recalculate some sta parameters after insertion Luca Coelho
2017-08-05  8:44 ` [PATCH 09/10] mac80211_hwsim: Add command to control rx status RSSI Luca Coelho
2017-09-06 10:33   ` Johannes Berg
2017-09-29 11:24     ` Luca Coelho
2017-08-05  8:44 ` [PATCH 10/10] nl80211: return error for invalid center_freq in 40 MHz Luca Coelho
2017-08-07  9:06 ` [PATCH 00/10] mac80211 patches from our internal tree 2017-08-05 Kalle Valo
2017-08-07  9:31   ` Luca Coelho
2017-08-07 13:05     ` Kalle Valo
2017-09-05 14:29 ` 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=20170805084438.12550-8-luca@coelho.fi \
    --to=luca@coelho.fi \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luciano.coelho@intel.com \
    --cc=naftali.goldstein@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).