Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH 1/2] iwlwifi: don't delay scan in IBSS mode
@ 2008-09-16  6:01 Zhu Yi
  2008-09-16  6:01 ` [PATCH 2/2] iwlwifi: make PS use named constants Zhu Yi
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Zhu Yi @ 2008-09-16  6:01 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Tomas Winkler, Zhu Yi

From: Tomas Winkler <tomas.winkler@intel.com>

Scan need to be delayed only after association to allow EAPOL
exchange. We don't need the delay for IBSS mode.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-agn.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 2737627..2652672 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2568,8 +2568,6 @@ static void iwl4965_post_associate(struct iwl_priv *priv)
 	iwl_chain_noise_reset(priv);
 	priv->start_calib = 1;
 
-	/* we have just associated, don't start scan too early */
-	priv->next_scan_jiffies = jiffies + IWL_DELAY_NEXT_SCAN;
 }
 
 static int iwl4965_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *conf);
@@ -3171,6 +3169,10 @@ static void iwl4965_bss_info_changed(struct ieee80211_hw *hw,
 			priv->power_data.dtim_period = bss_conf->dtim_period;
 			priv->timestamp = bss_conf->timestamp;
 			priv->assoc_capability = bss_conf->assoc_capability;
+
+			/* we have just associated, don't start scan too early
+			 * leave time for EAPOL echange complete
+			 */
 			priv->next_scan_jiffies = jiffies +
 					IWL_DELAY_NEXT_SCAN_AFTER_ASSOC;
 			mutex_lock(&priv->mutex);
-- 
1.5.3.6


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] iwlwifi: make PS use named constants
  2008-09-16  6:01 [PATCH 1/2] iwlwifi: don't delay scan in IBSS mode Zhu Yi
@ 2008-09-16  6:01 ` Zhu Yi
  2008-09-16  6:53 ` [PATCH 1/2] iwlwifi: don't delay scan in IBSS mode Johannes Berg
  2008-09-16  9:30 ` Tomas Winkler
  2 siblings, 0 replies; 5+ messages in thread
From: Zhu Yi @ 2008-09-16  6:01 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Tomas Winkler, Zhu Yi

From: Tomas Winkler <tomas.winkler@intel.com>

This patch adds named constants for configuring MIMO power save
chain settings.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-core.c |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index d80184e..8203887 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -697,8 +697,12 @@ void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_info *ht_info)
 }
 EXPORT_SYMBOL(iwl_set_rxon_ht);
 
-/*
- * Determine how many receiver/antenna chains to use.
+#define IWL_NUM_RX_CHAINS_MULTIPLE	3
+#define IWL_NUM_RX_CHAINS_SINGLE	2
+#define IWL_NUM_IDLE_CHAINS_DUAL	2
+#define IWL_NUM_IDLE_CHAINS_SINGLE	1
+
+/* Determine how many receiver/antenna chains to use.
  * More provides better reception via diversity.  Fewer saves power.
  * MIMO (dual stream) requires at least 2, but works better with 3.
  * This does not determine *which* chains to use, just how many.
@@ -711,9 +715,9 @@ static int iwl_get_active_rx_chain_count(struct iwl_priv *priv)
 	/* # of Rx chains to use when expecting MIMO. */
 	if (is_single || (!is_cam && (priv->current_ht_config.sm_ps ==
 						 WLAN_HT_CAP_SM_PS_STATIC)))
-		return 2;
+		return IWL_NUM_RX_CHAINS_SINGLE;
 	else
-		return 3;
+		return IWL_NUM_RX_CHAINS_MULTIPLE;
 }
 
 static int iwl_get_idle_rx_chain_count(struct iwl_priv *priv, int active_cnt)
@@ -724,10 +728,11 @@ static int iwl_get_idle_rx_chain_count(struct iwl_priv *priv, int active_cnt)
 	switch (priv->current_ht_config.sm_ps) {
 	case WLAN_HT_CAP_SM_PS_STATIC:
 	case WLAN_HT_CAP_SM_PS_DYNAMIC:
-		idle_cnt = (is_cam) ? 2 : 1;
+		idle_cnt = (is_cam) ? IWL_NUM_IDLE_CHAINS_DUAL :
+					IWL_NUM_IDLE_CHAINS_SINGLE;
 		break;
 	case WLAN_HT_CAP_SM_PS_DISABLED:
-		idle_cnt = (is_cam) ? active_cnt : 1;
+		idle_cnt = (is_cam) ? active_cnt : IWL_NUM_IDLE_CHAINS_SINGLE;
 		break;
 	case WLAN_HT_CAP_SM_PS_INVALID:
 	default:
@@ -796,7 +801,7 @@ void iwl_set_rxon_chain(struct iwl_priv *priv)
 
 	priv->staging_rxon.rx_chain = cpu_to_le16(rx_chain);
 
-	if (!is_single && (active_rx_cnt >= 2) && is_cam)
+	if (!is_single && (active_rx_cnt >= IWL_NUM_RX_CHAINS_SINGLE) && is_cam)
 		priv->staging_rxon.rx_chain |= RXON_RX_CHAIN_MIMO_FORCE_MSK;
 	else
 		priv->staging_rxon.rx_chain &= ~RXON_RX_CHAIN_MIMO_FORCE_MSK;
-- 
1.5.3.6


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] iwlwifi: don't delay scan in IBSS mode
  2008-09-16  6:01 [PATCH 1/2] iwlwifi: don't delay scan in IBSS mode Zhu Yi
  2008-09-16  6:01 ` [PATCH 2/2] iwlwifi: make PS use named constants Zhu Yi
@ 2008-09-16  6:53 ` Johannes Berg
  2008-09-16  9:00   ` Tomas Winkler
  2008-09-16  9:30 ` Tomas Winkler
  2 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2008-09-16  6:53 UTC (permalink / raw)
  To: Zhu Yi; +Cc: linville, linux-wireless, Tomas Winkler

[-- Attachment #1: Type: text/plain, Size: 295 bytes --]

On Tue, 2008-09-16 at 14:01 +0800, Zhu Yi wrote:
> From: Tomas Winkler <tomas.winkler@intel.com>
> 
> Scan need to be delayed only after association to allow EAPOL
> exchange. We don't need the delay for IBSS mode.

FWIW, I'd love to see that delay thing moved into mac80211.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] iwlwifi: don't delay scan in IBSS mode
  2008-09-16  6:53 ` [PATCH 1/2] iwlwifi: don't delay scan in IBSS mode Johannes Berg
@ 2008-09-16  9:00   ` Tomas Winkler
  0 siblings, 0 replies; 5+ messages in thread
From: Tomas Winkler @ 2008-09-16  9:00 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Zhu Yi, linville, linux-wireless

On Tue, Sep 16, 2008 at 9:53 AM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Tue, 2008-09-16 at 14:01 +0800, Zhu Yi wrote:
>> From: Tomas Winkler <tomas.winkler@intel.com>
>>
>> Scan need to be delayed only after association to allow EAPOL
>> exchange. We don't need the delay for IBSS mode.
>
> FWIW, I'd love to see that delay thing moved into mac80211.

I'm just looking into this new scan proposals.
Tomas

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] iwlwifi: don't delay scan in IBSS mode
  2008-09-16  6:01 [PATCH 1/2] iwlwifi: don't delay scan in IBSS mode Zhu Yi
  2008-09-16  6:01 ` [PATCH 2/2] iwlwifi: make PS use named constants Zhu Yi
  2008-09-16  6:53 ` [PATCH 1/2] iwlwifi: don't delay scan in IBSS mode Johannes Berg
@ 2008-09-16  9:30 ` Tomas Winkler
  2 siblings, 0 replies; 5+ messages in thread
From: Tomas Winkler @ 2008-09-16  9:30 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Zhu Yi

> +                       /* we have just associated, don't start scan too early
> +                        * leave time for EAPOL echange complete
> +                        */
John please fix this little typo when applying (echange complete ->
exchange to complete )
Thanks
Tomas

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-09-16  9:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-16  6:01 [PATCH 1/2] iwlwifi: don't delay scan in IBSS mode Zhu Yi
2008-09-16  6:01 ` [PATCH 2/2] iwlwifi: make PS use named constants Zhu Yi
2008-09-16  6:53 ` [PATCH 1/2] iwlwifi: don't delay scan in IBSS mode Johannes Berg
2008-09-16  9:00   ` Tomas Winkler
2008-09-16  9:30 ` Tomas Winkler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox