linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Guy, Wey-Yi" <wey-yi.w.guy@intel.com>
To: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Intel Linux Wireless <ilw@linux.intel.com>,
	Johannes Berg <johannes@sipsolutions.net>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] iwlagn: fix scan tx antenna setting on 5Ghz band
Date: Wed, 22 Dec 2010 08:57:47 -0800	[thread overview]
Message-ID: <1293037067.3997.42.camel@wwguy-huron> (raw)
In-Reply-To: <20101222131515.GA2242@redhat.com>

Stanislaw,

On Wed, 2010-12-22 at 05:15 -0800, Stanislaw Gruszka wrote:
> Hi Wey
> 
> > > > If its is 2.4, we need to use the correct tx antenna, I think we can
> > > > remove this block of code all together since check already done above.
> > > > 
> > > >   if (priv->cfg->scan_tx_antennas[band])
> > > >   	scan_tx_antennas = priv->cfg->scan_tx_antennas[band];
> > > 
> > > Is correct to use all antennas on 5GHz when blutooth is enabled?
> > > For me, more logical would be limiting to one antenna no matter of band,
> > > since antennas are used anyway, only frequencies differ.
> > > 
> > > For rx_ant, we do not check the band, only limit to first one
> > > when bluetooth is used.
> > 
> > there is no BT coex if 5GHz is used because there is not interference
> > between 2.4 and 5GHz, so both antenna can be used. WiFi should operated
> > in normal condition.
> > 
> > For 2.4GHz, we also can use both antenna if there is not high traffic
> > load on BT side.
> > 
> > but you have a good catch, driver need to check band before use it
> > (scan_tx_antenna[band])
> 
> So how about this patch (rfc only):
> 
> From 26d0570ed5cd85097702d0fedb2c3f831dce9714 Mon Sep 17 00:00:00 2001
> From: Stanislaw Gruszka <sgruszka@redhat.com>
> Date: Wed, 22 Dec 2010 13:03:31 +0100
> Subject: [RFC PATCH] iwlagn: fix scan tx antenna setting on 5Ghz band
> 
> Looks that we do not set correctly antennas when scanning
> on 5Ghz band and when bluetooth is enabled, because
> priv->cfg->scan_tx_antennas[band] is only defined for
> IEEE80211_BAND_2GHZ.
> 
> To fix we check band before limiting antennas to first one.
> This allow to remove hard coded cfg->scan_tx_antennas[band].
> 
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> ---
>  drivers/net/wireless/iwlwifi/iwl-6000.c    |    7 +------
>  drivers/net/wireless/iwlwifi/iwl-agn-lib.c |    9 +++------
>  drivers/net/wireless/iwlwifi/iwl-core.h    |    1 -
>  3 files changed, 4 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
> index f4bec32..af505bc 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-6000.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
> @@ -596,12 +596,7 @@ struct iwl_cfg iwl6005_2bg_cfg = {
>  	.need_dc_calib = true,					\
>  	.need_temp_offset_calib = true,				\
>  	.led_mode = IWL_LED_RF_STATE,				\
> -	.adv_pm = true,						\
> -	/*							\
> -	 *Due to bluetooth, we transmit 2.4 GHz probes		\
> -	 * only on antenna A					\
> -	 */							\
> -	.scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A
> +	.adv_pm = true						\
>  
>  struct iwl_cfg iwl6030_2agn_cfg = {
>  	.name = "Intel(R) Centrino(R) Advanced-N 6230 AGN",
> diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
> index 4bc82fc..322a2bd 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
> @@ -1492,15 +1492,12 @@ int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
>  	if (priv->cfg->scan_rx_antennas[band])
>  		rx_ant = priv->cfg->scan_rx_antennas[band];
>  
> -	if (priv->cfg->scan_tx_antennas[band])
> -		scan_tx_antennas = priv->cfg->scan_tx_antennas[band];
> -
> -	if (priv->cfg->bt_params &&
> +	if (band == IEEE80211_BAND_2GHZ &&
> +	    priv->cfg->bt_params &&
>  	    priv->cfg->bt_params->advanced_bt_coexist &&
>  	    priv->bt_full_concurrent) {
>  		/* operated as 1x1 in full concurrency mode */
> -		scan_tx_antennas = first_antenna(
> -			priv->cfg->scan_tx_antennas[band]);
> +		scan_tx_antennas = first_antenna(scan_tx_antennas);
>  	}

Please remove the checking for priv->bt_full_concurrent, so the checking
will apply to all  scan request if BT coex is there.

otherwise, the patch looks ok

thanks
Wey




      reply	other threads:[~2010-12-22 17:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-20 17:05 [PATCH] iwlagn: fix scan tx antenna setting on 5Ghz band Stanislaw Gruszka
2010-12-20 18:13 ` Guy, Wey-Yi
2010-12-21 12:05   ` Stanislaw Gruszka
2010-12-21 17:21     ` Guy, Wey-Yi
2010-12-22 13:15       ` Stanislaw Gruszka
2010-12-22 16:57         ` Guy, Wey-Yi [this message]

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=1293037067.3997.42.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;
as well as URLs for NNTP newsgroup(s).