Linux wireless drivers development
 help / color / mirror / Atom feed
From: "Guy, Wey-Yi" <wey-yi.w.guy@intel.com>
To: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
	Intel Linux Wireless <ilw@linux.intel.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 1/2] iwlagn: fix channel switch locking
Date: Thu, 02 Jun 2011 07:27:22 -0700	[thread overview]
Message-ID: <1307024842.13397.2.camel@wwguy-huron> (raw)
In-Reply-To: <20110602144424.GA4580@redhat.com>

Hi Stanislaw,

On Thu, 2011-06-02 at 07:44 -0700, Stanislaw Gruszka wrote:
> We use priv->mutex to avoid race condtions between iwl_chswitch_done()
> and iwlagn_mac_channel_switch(), when marking channel switch in
> progress. But iwl_chswitch_dane() can be called in atomic context
> from iwl_rx_csa() or with mutex already taken from iwlagn_commit_rxon().
> 
> These bugs were introduced by:
> 
> commit 79d07325502e73508f917475bc1617b60979dd94
> Author: Wey-Yi Guy <wey-yi.w.guy@intel.com>
> Date:   Thu May 6 08:54:11 2010 -0700
> 
>     iwlwifi: support channel switch offload in driver
> 
> To fix remove mutex from iwl_chswitch_done() and use atomic bitops for
> marking channel switch pending.
> 
> Cc: stable@kernel.org # 2.6.36+
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> ---
>  drivers/net/wireless/iwlwifi/iwl-2000.c     |    2 --
>  drivers/net/wireless/iwlwifi/iwl-5000.c     |    2 --
>  drivers/net/wireless/iwlwifi/iwl-6000.c     |    2 --
>  drivers/net/wireless/iwlwifi/iwl-agn-rxon.c |    6 +++---
>  drivers/net/wireless/iwlwifi/iwl-agn.c      |   19 ++++++++++---------
>  drivers/net/wireless/iwlwifi/iwl-core.c     |    6 +-----
>  drivers/net/wireless/iwlwifi/iwl-core.h     |    1 +
>  drivers/net/wireless/iwlwifi/iwl-dev.h      |   13 +------------
>  drivers/net/wireless/iwlwifi/iwl-rx.c       |   24 ++++++++++++------------
>  9 files changed, 28 insertions(+), 47 deletions(-)
> 
> diff --git a/drivers/net/wireless/iwlwifi/iwl-2000.c b/drivers/net/wireless/iwlwifi/iwl-2000.c
> index a37c41b..33f0ad9 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-2000.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-2000.c
> @@ -244,8 +244,6 @@ static int iwl2030_hw_channel_switch(struct iwl_priv *priv,
>  			ctx->active.channel, ch);
>  		return -EFAULT;
>  	}
> -	priv->switch_rxon.channel = cmd.channel;
> -	priv->switch_rxon.switch_in_progress = true;
>  
>  	return iwl_send_cmd_sync(priv, &hcmd);
>  }
Thank you for fix my mistake.
Could you please remove the channel switch from iwl-2000.c all together.
2000 series are 2.4 GHz only 

Thanks
Wey


  reply	other threads:[~2011-06-02 14:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-02 14:44 [PATCH 1/2] iwlagn: fix channel switch locking Stanislaw Gruszka
2011-06-02 14:27 ` Guy, Wey-Yi [this message]
2011-06-02 16:17   ` [PATCH 1/2 v2] " Stanislaw Gruszka
2011-06-02 16:56     ` wwguy
2011-06-02 14:46 ` [PATCH 2/2] iwlagn: refactor iwlagn_mac_channel_switch Stanislaw Gruszka
2011-06-02 14:29   ` Guy, Wey-Yi

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=1307024842.13397.2.camel@wwguy-huron \
    --to=wey-yi.w.guy@intel.com \
    --cc=ilw@linux.intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=sgruszka@redhat.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