All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: "Luis R. Rodriguez" <lrodriguez@atheros.com>
Cc: Luis Rodriguez <Luis.Rodriguez@Atheros.com>,
	"John W. Linville" <linville@tuxdriver.com>,
	Srinivasa Duvvuri <Srinivasa.Duvvuri@Atheros.com>,
	Matt Smith <Matt.Smith@Atheros.com>,
	Bennyam Malavazi <Bennyam.Malavazi@Atheros.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] mac80211: Deny new BA agreements from being started during offchannel operation
Date: Wed, 06 Oct 2010 21:19:59 +0200	[thread overview]
Message-ID: <1286392799.3655.414.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <20101006191215.GM7070@tux>

On Wed, 2010-10-06 at 12:12 -0700, Luis R. Rodriguez wrote:

> Good question, will ieee80211_offchannel_ps_disable() possibly be
> called during suspend? I can imagine its possible. So how about we
> check for local->quiescing prior to lifting the flag only:

Or suspended? I'm not really sure .. this will probably interact badly
anyway. Hmm.

johannes

> From 374cbccafadc22ba261dd3bc5f68758106872448 Mon Sep 17 00:00:00 2001
> From: Luis R. Rodriguez <lrodriguez@atheros.com>
> Date: Tue, 21 Sep 2010 15:27:02 -0400
> Subject: [PATCH v3] mac80211: Deny new BA agreements from being started during offchannel operation
> 
> It only makes sense to allow BA agreements when we are going to
> spend some time on the operating channel. This blocks all new
> incoming ADDBA requests while we go offchannel, but keeps
> existing BA agreements alive.
> 
> Cc: srinivasa.duvvuri@atheros.com
> Cc: matt.smith@atheros.com
> Cc: bennyam.malavazi@atheros.com
> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
> ---
>  net/mac80211/agg-rx.c     |    8 ++++++--
>  net/mac80211/offchannel.c |   17 +++++++++++++++++
>  net/mac80211/sta_info.h   |    3 ++-
>  3 files changed, 25 insertions(+), 3 deletions(-)
> 
> diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c
> index 720b7a8..a21d120 100644
> --- a/net/mac80211/agg-rx.c
> +++ b/net/mac80211/agg-rx.c
> @@ -209,8 +209,12 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
>  
>  	if (test_sta_flags(sta, WLAN_STA_BLOCK_BA)) {
>  #ifdef CONFIG_MAC80211_HT_DEBUG
> -		printk(KERN_DEBUG "Suspend in progress. "
> -		       "Denying ADDBA request\n");
> +		if (local->quiescing)
> +			printk(KERN_DEBUG "Suspend in progress. "
> +			      "Denying ADDBA request\n");
> +		else
> +			printk(KERN_DEBUG "Offchannel operation in progress, "
> +			      "Denying ADDBA request\n");
>  #endif
>  		goto end_no_lock;
>  	}
> diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c
> index 4b56409..86e9b8d 100644
> --- a/net/mac80211/offchannel.c
> +++ b/net/mac80211/offchannel.c
> @@ -34,6 +34,14 @@ static void ieee80211_offchannel_ps_enable(struct ieee80211_sub_if_data *sdata)
>  
>  	cancel_work_sync(&local->dynamic_ps_enable_work);
>  
> +	if (local->hw.flags & IEEE80211_HW_AMPDU_AGGREGATION) {
> +		struct sta_info *sta;
> +		mutex_lock(&local->sta_mtx);
> +		list_for_each_entry(sta, &local->sta_list, list)
> +			set_sta_flags(sta, WLAN_STA_BLOCK_BA);
> +		mutex_unlock(&local->sta_mtx);
> +	}
> +
>  	if (local->hw.conf.flags & IEEE80211_CONF_PS) {
>  		local->offchannel_ps_enabled = true;
>  		local->hw.conf.flags &= ~IEEE80211_CONF_PS;
> @@ -92,6 +100,15 @@ static void ieee80211_offchannel_ps_disable(struct ieee80211_sub_if_data *sdata)
>  
>  	ieee80211_sta_reset_beacon_monitor(sdata);
>  	ieee80211_sta_reset_conn_monitor(sdata);
> +
> +	if (local->hw.flags & IEEE80211_HW_AMPDU_AGGREGATION &&
> +	    !local->quiescing) {
> +		struct sta_info *sta;
> +		mutex_lock(&local->sta_mtx);
> +		list_for_each_entry(sta, &local->sta_list, list)
> +			clear_sta_flags(sta, WLAN_STA_BLOCK_BA);
> +		mutex_unlock(&local->sta_mtx);
> +	}
>  }
>  
>  void ieee80211_offchannel_stop_beaconing(struct ieee80211_local *local)
> diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
> index cf21a2e..2439156 100644
> --- a/net/mac80211/sta_info.h
> +++ b/net/mac80211/sta_info.h
> @@ -36,7 +36,8 @@
>   *	frame to this station is transmitted.
>   * @WLAN_STA_MFP: Management frame protection is used with this STA.
>   * @WLAN_STA_BLOCK_BA: Used to deny ADDBA requests (both TX and RX)
> - *	during suspend/resume and station removal.
> + *	during suspend/resume, station removal, and when we go offchannel
> + *	when associated.
>   * @WLAN_STA_PS_DRIVER: driver requires keeping this station in
>   *	power-save mode logically to flush frames that might still
>   *	be in the queues



  reply	other threads:[~2010-10-06 19:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-06 18:50 [PATCH] mac80211: Deny new BA agreements from being started during offchannel operation Luis R. Rodriguez
2010-10-06 18:55 ` Johannes Berg
2010-10-06 19:12   ` Luis R. Rodriguez
2010-10-06 19:19     ` Johannes Berg [this message]
2010-10-06 20:48       ` Luis R. Rodriguez
2010-10-07  7:18         ` Johannes Berg
2010-10-07 17:21           ` Luis R. Rodriguez
2010-10-07 17:56             ` 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=1286392799.3655.414.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=Bennyam.Malavazi@Atheros.com \
    --cc=Luis.Rodriguez@Atheros.com \
    --cc=Matt.Smith@Atheros.com \
    --cc=Srinivasa.Duvvuri@Atheros.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=lrodriguez@atheros.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.