All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] update for 2.6.41
@ 2011-05-27 15:40 Wey-Yi Guy
  2011-05-27 15:40 ` [PATCH 01/10] iwlagn: send tx power command if defer cause by RXON not match Wey-Yi Guy
                   ` (9 more replies)
  0 siblings, 10 replies; 16+ messages in thread
From: Wey-Yi Guy @ 2011-05-27 15:40 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Wey-Yi Guy

We add support to advertise the limits on concurrency of virtual interfaces
We also change the log level to better represent the aggregation status
Again, more driver cleanup works for driver split

Daniel Halperin (1):
  iwlwifi: disambiguate invalid DMA index warnings

Emmanuel Grumbach (2):
  iwlagn: solve sparse warning
  iwlagn: free the ICT ISR when the request_irq failed

Johannes Berg (2):
  iwlagn: fix dual-mode RXON
  iwlagn: advertise interface combinations

Wey-Yi Guy (5):
  iwlagn: send tx power command if defer cause by RXON not match
  iwlagn: remove un-necessary tx power ops
  iwlagn: change the logging level for aggregation enable check
  iwlagn: change log to better represent the state of aggregation
    process
  iwlagn: don't advertise interface combinations on device not support
    dualmode

these patches are also available from wireless-next-2.6 branch on
 git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6.git

 drivers/net/wireless/iwlwifi/iwl-1000.c     |    1 -
 drivers/net/wireless/iwlwifi/iwl-2000.c     |    1 -
 drivers/net/wireless/iwlwifi/iwl-5000.c     |    2 -
 drivers/net/wireless/iwlwifi/iwl-6000.c     |    2 -
 drivers/net/wireless/iwlwifi/iwl-agn-lib.c  |    6 +-
 drivers/net/wireless/iwlwifi/iwl-agn-rs.c   |    2 +-
 drivers/net/wireless/iwlwifi/iwl-agn-rxon.c |   57 ++++++++++++---
 drivers/net/wireless/iwlwifi/iwl-agn-tx.c   |   10 ++--
 drivers/net/wireless/iwlwifi/iwl-agn.c      |   98 +++++++++++++++++++++++++--
 drivers/net/wireless/iwlwifi/iwl-core.c     |    5 +-
 drivers/net/wireless/iwlwifi/iwl-core.h     |    1 -
 drivers/net/wireless/iwlwifi/iwl-tx.c       |    6 +-
 12 files changed, 149 insertions(+), 42 deletions(-)


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

* [PATCH 01/10] iwlagn: send tx power command if defer cause by RXON not match
  2011-05-27 15:40 [PATCH 00/10] update for 2.6.41 Wey-Yi Guy
@ 2011-05-27 15:40 ` Wey-Yi Guy
  2011-05-27 15:40 ` [PATCH 02/10] iwlagn: remove un-necessary tx power ops Wey-Yi Guy
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: Wey-Yi Guy @ 2011-05-27 15:40 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Wey-Yi Guy

During channge channel, tx power will not send to uCode, the tx power command
should send after scan complete. but should also can send after RXON command.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-agn-rxon.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
index a95ad84..58c095c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
@@ -362,6 +362,11 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
 		}
 
 		memcpy(active, &ctx->staging, sizeof(*active));
+		/*
+		 * We do not commit tx power settings while channel changing,
+		 * do it now if after settings changed.
+		 */
+		iwl_set_tx_power(priv, priv->tx_power_next, false);
 		return 0;
 	}
 
-- 
1.7.0.4


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

* [PATCH 02/10] iwlagn: remove un-necessary tx power ops
  2011-05-27 15:40 [PATCH 00/10] update for 2.6.41 Wey-Yi Guy
  2011-05-27 15:40 ` [PATCH 01/10] iwlagn: send tx power command if defer cause by RXON not match Wey-Yi Guy
@ 2011-05-27 15:40 ` Wey-Yi Guy
  2011-05-27 15:40 ` [PATCH 03/10] iwlagn: fix dual-mode RXON Wey-Yi Guy
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: Wey-Yi Guy @ 2011-05-27 15:40 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Wey-Yi Guy

All agn devices use the same tx power function, remove the ops

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-1000.c |    1 -
 drivers/net/wireless/iwlwifi/iwl-2000.c |    1 -
 drivers/net/wireless/iwlwifi/iwl-5000.c |    2 --
 drivers/net/wireless/iwlwifi/iwl-6000.c |    2 --
 drivers/net/wireless/iwlwifi/iwl-core.c |    5 +----
 drivers/net/wireless/iwlwifi/iwl-core.h |    1 -
 6 files changed, 1 insertions(+), 11 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c
index 61d4a11..9940950 100644
--- a/drivers/net/wireless/iwlwifi/iwl-1000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-1000.c
@@ -174,7 +174,6 @@ static struct iwl_lib_ops iwl1000_lib = {
 	.rx_handler_setup = iwlagn_rx_handler_setup,
 	.setup_deferred_work = iwlagn_setup_deferred_work,
 	.is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
-	.send_tx_power = iwlagn_send_tx_power,
 	.update_chain_flags = iwl_update_chain_flags,
 	.apm_ops = {
 		.init = iwl_apm_init,
diff --git a/drivers/net/wireless/iwlwifi/iwl-2000.c b/drivers/net/wireless/iwlwifi/iwl-2000.c
index 86feec8..a37c41b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-2000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-2000.c
@@ -256,7 +256,6 @@ static struct iwl_lib_ops iwl2000_lib = {
 	.setup_deferred_work = iwlagn_bt_setup_deferred_work,
 	.cancel_deferred_work = iwlagn_bt_cancel_deferred_work,
 	.is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
-	.send_tx_power = iwlagn_send_tx_power,
 	.update_chain_flags = iwl_update_chain_flags,
 	.set_channel_switch = iwl2030_hw_channel_switch,
 	.apm_ops = {
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index a70b8cf..a8dbbd0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -342,7 +342,6 @@ static struct iwl_lib_ops iwl5000_lib = {
 	.rx_handler_setup = iwlagn_rx_handler_setup,
 	.setup_deferred_work = iwlagn_setup_deferred_work,
 	.is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
-	.send_tx_power = iwlagn_send_tx_power,
 	.update_chain_flags = iwl_update_chain_flags,
 	.set_channel_switch = iwl5000_hw_channel_switch,
 	.apm_ops = {
@@ -373,7 +372,6 @@ static struct iwl_lib_ops iwl5150_lib = {
 	.rx_handler_setup = iwlagn_rx_handler_setup,
 	.setup_deferred_work = iwlagn_setup_deferred_work,
 	.is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
-	.send_tx_power = iwlagn_send_tx_power,
 	.update_chain_flags = iwl_update_chain_flags,
 	.set_channel_switch = iwl5000_hw_channel_switch,
 	.apm_ops = {
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index f8c710d..eabf3b8 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -281,7 +281,6 @@ static struct iwl_lib_ops iwl6000_lib = {
 	.rx_handler_setup = iwlagn_rx_handler_setup,
 	.setup_deferred_work = iwlagn_setup_deferred_work,
 	.is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
-	.send_tx_power = iwlagn_send_tx_power,
 	.update_chain_flags = iwl_update_chain_flags,
 	.set_channel_switch = iwl6000_hw_channel_switch,
 	.apm_ops = {
@@ -314,7 +313,6 @@ static struct iwl_lib_ops iwl6030_lib = {
 	.setup_deferred_work = iwlagn_bt_setup_deferred_work,
 	.cancel_deferred_work = iwlagn_bt_cancel_deferred_work,
 	.is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
-	.send_tx_power = iwlagn_send_tx_power,
 	.update_chain_flags = iwl_update_chain_flags,
 	.set_channel_switch = iwl6000_hw_channel_switch,
 	.apm_ops = {
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 4653dea..52e9413 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -1131,9 +1131,6 @@ int iwl_set_tx_power(struct iwl_priv *priv, s8 tx_power, bool force)
 	if (priv->tx_power_user_lmt == tx_power && !force)
 		return 0;
 
-	if (!priv->cfg->ops->lib->send_tx_power)
-		return -EOPNOTSUPP;
-
 	if (tx_power < IWLAGN_TX_POWER_TARGET_POWER_MIN) {
 		IWL_WARN(priv,
 			 "Requested user TXPOWER %d below lower limit %d.\n",
@@ -1167,7 +1164,7 @@ int iwl_set_tx_power(struct iwl_priv *priv, s8 tx_power, bool force)
 	prev_tx_power = priv->tx_power_user_lmt;
 	priv->tx_power_user_lmt = tx_power;
 
-	ret = priv->cfg->ops->lib->send_tx_power(priv);
+	ret = iwlagn_send_tx_power(priv);
 
 	/* if fail to set tx_power, restore the orig. tx power */
 	if (ret) {
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index 3bb76f6..a87b54f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -141,7 +141,6 @@ struct iwl_lib_ops {
 	struct iwl_apm_ops apm_ops;
 
 	/* power */
-	int (*send_tx_power) (struct iwl_priv *priv);
 	void (*update_chain_flags)(struct iwl_priv *priv);
 
 	/* eeprom operations (as defined in iwl-eeprom.h) */
-- 
1.7.0.4


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

* [PATCH 03/10] iwlagn: fix dual-mode RXON
  2011-05-27 15:40 [PATCH 00/10] update for 2.6.41 Wey-Yi Guy
  2011-05-27 15:40 ` [PATCH 01/10] iwlagn: send tx power command if defer cause by RXON not match Wey-Yi Guy
  2011-05-27 15:40 ` [PATCH 02/10] iwlagn: remove un-necessary tx power ops Wey-Yi Guy
@ 2011-05-27 15:40 ` Wey-Yi Guy
  2011-05-27 15:40 ` [PATCH 04/10] iwlagn: solve sparse warning Wey-Yi Guy
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: Wey-Yi Guy @ 2011-05-27 15:40 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Johannes Berg, Wey-Yi Guy

From: Johannes Berg <johannes.berg@intel.com>

 The PAN context has three states: disabled, disassociated
 and associated. It seems that wasn't quite as much of an
 issue in previous versions of the microcode, but now we
 really have to use all the three states properly. So add
 code to switch accordingly.

Additionally, PAN parameters need to be sent differently
and the timing for PAN RXON needs to be inbetween.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-agn-rxon.c |   52 ++++++++++++++++++++------
 1 files changed, 40 insertions(+), 12 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
index 58c095c..afb2f20 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
@@ -81,6 +81,21 @@ static int iwlagn_disable_pan(struct iwl_priv *priv,
 	return ret;
 }
 
+static int iwlagn_disconn_pan(struct iwl_priv *priv,
+			      struct iwl_rxon_context *ctx,
+			      struct iwl_rxon_cmd *send)
+{
+	__le32 old_filter = send->filter_flags;
+	int ret;
+
+	send->filter_flags &= ~RXON_FILTER_ASSOC_MSK;
+	ret = iwl_send_cmd_pdu(priv, ctx->rxon_cmd, sizeof(*send), send);
+
+	send->filter_flags = old_filter;
+
+	return ret;
+}
+
 static void iwlagn_update_qos(struct iwl_priv *priv,
 			      struct iwl_rxon_context *ctx)
 {
@@ -175,10 +190,21 @@ static int iwlagn_rxon_disconn(struct iwl_priv *priv,
 	int ret;
 	struct iwl_rxon_cmd *active = (void *)&ctx->active;
 
-	if (ctx->ctxid == IWL_RXON_CTX_BSS)
+	if (ctx->ctxid == IWL_RXON_CTX_BSS) {
 		ret = iwlagn_disable_bss(priv, ctx, &ctx->staging);
-	else
+	} else {
 		ret = iwlagn_disable_pan(priv, ctx, &ctx->staging);
+		if (ret)
+			return ret;
+		if (ctx->vif) {
+			ret = iwl_send_rxon_timing(priv, ctx);
+			if (ret) {
+				IWL_ERR(priv, "Failed to send timing (%d)!\n", ret);
+				return ret;
+			}
+			ret = iwlagn_disconn_pan(priv, ctx, &ctx->staging);
+		}
+	}
 	if (ret)
 		return ret;
 
@@ -205,10 +231,12 @@ static int iwlagn_rxon_connect(struct iwl_priv *priv,
 	struct iwl_rxon_cmd *active = (void *)&ctx->active;
 
 	/* RXON timing must be before associated RXON */
-	ret = iwl_send_rxon_timing(priv, ctx);
-	if (ret) {
-		IWL_ERR(priv, "Failed to send timing (%d)!\n", ret);
-		return ret;
+	if (ctx->ctxid == IWL_RXON_CTX_BSS) {
+		ret = iwl_send_rxon_timing(priv, ctx);
+		if (ret) {
+			IWL_ERR(priv, "Failed to send timing (%d)!\n", ret);
+			return ret;
+		}
 	}
 	/* QoS info may be cleared by previous un-assoc RXON */
 	iwlagn_update_qos(priv, ctx);
@@ -370,12 +398,6 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
 		return 0;
 	}
 
-	if (priv->cfg->ops->hcmd->set_pan_params) {
-		ret = priv->cfg->ops->hcmd->set_pan_params(priv);
-		if (ret)
-			return ret;
-	}
-
 	iwl_set_rxon_hwcrypto(priv, ctx, !iwlagn_mod_params.sw_crypto);
 
 	IWL_DEBUG_INFO(priv,
@@ -397,6 +419,12 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
 	if (ret)
 		return ret;
 
+	if (priv->cfg->ops->hcmd->set_pan_params) {
+		ret = priv->cfg->ops->hcmd->set_pan_params(priv);
+		if (ret)
+			return ret;
+	}
+
 	if (new_assoc)
 		return iwlagn_rxon_connect(priv, ctx);
 
-- 
1.7.0.4


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

* [PATCH 04/10] iwlagn: solve sparse warning
  2011-05-27 15:40 [PATCH 00/10] update for 2.6.41 Wey-Yi Guy
                   ` (2 preceding siblings ...)
  2011-05-27 15:40 ` [PATCH 03/10] iwlagn: fix dual-mode RXON Wey-Yi Guy
@ 2011-05-27 15:40 ` Wey-Yi Guy
  2011-05-27 15:40 ` [PATCH 05/10] iwlwifi: disambiguate invalid DMA index warnings Wey-Yi Guy
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: Wey-Yi Guy @ 2011-05-27 15:40 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Emmanuel Grumbach, Wey-Yi Guy

From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>

Remove local variable that was shadowing another one
sta_priv hasn't changed since the beginning of the function, so don't define
another pointer with the same name to the same variable

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-agn.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index e027f99..58ed9a0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2711,12 +2711,9 @@ static int iwlagn_mac_ampdu_action(struct ieee80211_hw *hw,
 			ret = 0;
 		if (priv->cfg->ht_params &&
 		    priv->cfg->ht_params->use_rts_for_aggregation) {
-			struct iwl_station_priv *sta_priv =
-				(void *) sta->drv_priv;
 			/*
 			 * switch off RTS/CTS if it was previously enabled
 			 */
-
 			sta_priv->lq_sta.lq.general_params.flags &=
 				~LINK_QUAL_FLAGS_SET_STA_TLC_RTS_MSK;
 			iwl_send_lq_cmd(priv, iwl_rxon_ctx_from_vif(vif),
-- 
1.7.0.4


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

* [PATCH 05/10] iwlwifi: disambiguate invalid DMA index warnings
  2011-05-27 15:40 [PATCH 00/10] update for 2.6.41 Wey-Yi Guy
                   ` (3 preceding siblings ...)
  2011-05-27 15:40 ` [PATCH 04/10] iwlagn: solve sparse warning Wey-Yi Guy
@ 2011-05-27 15:40 ` Wey-Yi Guy
  2011-05-27 15:40 ` [PATCH 06/10] iwlagn: free the ICT ISR when the request_irq failed Wey-Yi Guy
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: Wey-Yi Guy @ 2011-05-27 15:40 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Daniel Halperin, Wey-Yi Guy

From: Daniel Halperin <dhalperi@cs.washington.edu>

The exact same error message is used in three different functions in
iwlagn. Add the function name to the error string to disambiguate where
the error is coming from.

Signed-off-by: Daniel Halperin <dhalperi@cs.washington.edu>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-agn-lib.c |    6 +++---
 drivers/net/wireless/iwlwifi/iwl-agn-tx.c  |    6 +++---
 drivers/net/wireless/iwlwifi/iwl-tx.c      |    6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index f803fb6..4ab77c8 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -408,9 +408,9 @@ static void iwlagn_rx_reply_tx(struct iwl_priv *priv,
 	unsigned long flags;
 
 	if ((index >= txq->q.n_bd) || (iwl_queue_used(&txq->q, index) == 0)) {
-		IWL_ERR(priv, "Read index for DMA queue txq_id (%d) index %d "
-			  "is out of range [0-%d] %d %d\n", txq_id,
-			  index, txq->q.n_bd, txq->q.write_ptr,
+		IWL_ERR(priv, "%s: Read index for DMA queue txq_id (%d) "
+			  "index %d is out of range [0-%d] %d %d\n", __func__,
+			  txq_id, index, txq->q.n_bd, txq->q.write_ptr,
 			  txq->q.read_ptr);
 		return;
 	}
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
index 9acf0e9..631d0a5 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
@@ -1231,9 +1231,9 @@ int iwlagn_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index)
 	struct ieee80211_hdr *hdr;
 
 	if ((index >= q->n_bd) || (iwl_queue_used(q, index) == 0)) {
-		IWL_ERR(priv, "Read index for DMA queue txq id (%d), index %d, "
-			  "is out of range [0-%d] %d %d.\n", txq_id,
-			  index, q->n_bd, q->write_ptr, q->read_ptr);
+		IWL_ERR(priv, "%s: Read index for DMA queue txq id (%d), "
+			  "index %d is out of range [0-%d] %d %d.\n", __func__,
+			  txq_id, index, q->n_bd, q->write_ptr, q->read_ptr);
 		return 0;
 	}
 
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
index 686e176..1084fe0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -753,9 +753,9 @@ static void iwl_hcmd_queue_reclaim(struct iwl_priv *priv, int txq_id, int idx)
 	int nfreed = 0;
 
 	if ((idx >= q->n_bd) || (iwl_queue_used(q, idx) == 0)) {
-		IWL_ERR(priv, "Read index for DMA queue txq id (%d), index %d, "
-			  "is out of range [0-%d] %d %d.\n", txq_id,
-			  idx, q->n_bd, q->write_ptr, q->read_ptr);
+		IWL_ERR(priv, "%s: Read index for DMA queue txq id (%d), "
+			  "index %d is out of range [0-%d] %d %d.\n", __func__,
+			  txq_id, idx, q->n_bd, q->write_ptr, q->read_ptr);
 		return;
 	}
 
-- 
1.7.0.4


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

* [PATCH 06/10] iwlagn: free the ICT ISR when the request_irq failed
  2011-05-27 15:40 [PATCH 00/10] update for 2.6.41 Wey-Yi Guy
                   ` (4 preceding siblings ...)
  2011-05-27 15:40 ` [PATCH 05/10] iwlwifi: disambiguate invalid DMA index warnings Wey-Yi Guy
@ 2011-05-27 15:40 ` Wey-Yi Guy
  2011-05-27 15:40 ` [PATCH 07/10] iwlagn: advertise interface combinations Wey-Yi Guy
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: Wey-Yi Guy @ 2011-05-27 15:40 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Emmanuel Grumbach, Wey-Yi Guy

From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>

Fix a memory leak in case request_irq fails.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-agn.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 58ed9a0..a90cb1b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -3615,8 +3615,8 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	destroy_workqueue(priv->workqueue);
 	priv->workqueue = NULL;
 	free_irq(priv->pci_dev->irq, priv);
-	iwl_free_isr_ict(priv);
  out_disable_msi:
+	iwl_free_isr_ict(priv);
 	pci_disable_msi(priv->pci_dev);
 	iwl_uninit_drv(priv);
  out_free_eeprom:
-- 
1.7.0.4


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

* [PATCH 07/10] iwlagn: advertise interface combinations
  2011-05-27 15:40 [PATCH 00/10] update for 2.6.41 Wey-Yi Guy
                   ` (5 preceding siblings ...)
  2011-05-27 15:40 ` [PATCH 06/10] iwlagn: free the ICT ISR when the request_irq failed Wey-Yi Guy
@ 2011-05-27 15:40 ` Wey-Yi Guy
  2011-06-02 16:22   ` Stanislaw Gruszka
  2011-05-27 15:40 ` [PATCH 08/10] iwlagn: change the logging level for aggregation enable check Wey-Yi Guy
                   ` (2 subsequent siblings)
  9 siblings, 1 reply; 16+ messages in thread
From: Wey-Yi Guy @ 2011-05-27 15:40 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Johannes Berg, Wey-Yi Guy

From: Johannes Berg <johannes.berg@intel.com>

With this, iwlwifi will advertise the limits on
concurrency of virtual interfaces.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-agn.c |   83 ++++++++++++++++++++++++++++++++
 1 files changed, 83 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index a90cb1b..1631c44 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2420,6 +2420,77 @@ unlock:
  *
  *****************************************************************************/
 
+static const struct ieee80211_iface_limit iwlagn_sta_ap_limits[] = {
+	{
+		.max = 1,
+		.types = BIT(NL80211_IFTYPE_STATION),
+	},
+	{
+		.max = 1,
+		.types = BIT(NL80211_IFTYPE_AP),
+	},
+};
+
+static const struct ieee80211_iface_limit iwlagn_2sta_limits[] = {
+	{
+		.max = 2,
+		.types = BIT(NL80211_IFTYPE_STATION),
+	},
+};
+
+static const struct ieee80211_iface_limit iwlagn_p2p_sta_go_limits[] = {
+	{
+		.max = 1,
+		.types = BIT(NL80211_IFTYPE_STATION),
+	},
+	{
+		.max = 1,
+		.types = BIT(NL80211_IFTYPE_P2P_GO) |
+			 BIT(NL80211_IFTYPE_AP),
+	},
+};
+
+static const struct ieee80211_iface_limit iwlagn_p2p_2sta_limits[] = {
+	{
+		.max = 2,
+		.types = BIT(NL80211_IFTYPE_STATION),
+	},
+	{
+		.max = 1,
+		.types = BIT(NL80211_IFTYPE_P2P_CLIENT),
+	},
+};
+
+static const struct ieee80211_iface_combination
+iwlagn_iface_combinations_dualmode[] = {
+	{ .num_different_channels = 1,
+	  .max_interfaces = 2,
+	  .beacon_int_infra_match = true,
+	  .limits = iwlagn_sta_ap_limits,
+	  .n_limits = ARRAY_SIZE(iwlagn_sta_ap_limits),
+	},
+	{ .num_different_channels = 1,
+	  .max_interfaces = 2,
+	  .limits = iwlagn_2sta_limits,
+	  .n_limits = ARRAY_SIZE(iwlagn_2sta_limits),
+	},
+};
+
+static const struct ieee80211_iface_combination
+iwlagn_iface_combinations_p2p[] = {
+	{ .num_different_channels = 1,
+	  .max_interfaces = 2,
+	  .beacon_int_infra_match = true,
+	  .limits = iwlagn_p2p_sta_go_limits,
+	  .n_limits = ARRAY_SIZE(iwlagn_p2p_sta_go_limits),
+	},
+	{ .num_different_channels = 1,
+	  .max_interfaces = 2,
+	  .limits = iwlagn_p2p_2sta_limits,
+	  .n_limits = ARRAY_SIZE(iwlagn_p2p_2sta_limits),
+	},
+};
+
 /*
  * Not a mac80211 entry point function, but it fits in with all the
  * other mac80211 functions grouped here.
@@ -2460,6 +2531,18 @@ static int iwl_mac_setup_register(struct iwl_priv *priv,
 		hw->wiphy->interface_modes |= ctx->exclusive_interface_modes;
 	}
 
+	BUILD_BUG_ON(NUM_IWL_RXON_CTX != 2);
+
+	if (hw->wiphy->interface_modes & NL80211_IFTYPE_P2P_CLIENT) {
+		hw->wiphy->iface_combinations = iwlagn_iface_combinations_p2p;
+		hw->wiphy->n_iface_combinations =
+			ARRAY_SIZE(iwlagn_iface_combinations_p2p);
+	} else if (hw->wiphy->interface_modes & NL80211_IFTYPE_AP) {
+		hw->wiphy->iface_combinations = iwlagn_iface_combinations_dualmode;
+		hw->wiphy->n_iface_combinations =
+			ARRAY_SIZE(iwlagn_iface_combinations_dualmode);
+	}
+
 	hw->wiphy->max_remain_on_channel_duration = 1000;
 
 	hw->wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY |
-- 
1.7.0.4


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

* [PATCH 08/10] iwlagn: change the logging level for aggregation enable check
  2011-05-27 15:40 [PATCH 00/10] update for 2.6.41 Wey-Yi Guy
                   ` (6 preceding siblings ...)
  2011-05-27 15:40 ` [PATCH 07/10] iwlagn: advertise interface combinations Wey-Yi Guy
@ 2011-05-27 15:40 ` Wey-Yi Guy
  2011-05-27 15:40 ` [PATCH 09/10] iwlagn: change log to better represent the state of aggregation process Wey-Yi Guy
  2011-05-27 15:40 ` [PATCH 10/10] iwlagn: don't advertise interface combinations on device not support dualmode Wey-Yi Guy
  9 siblings, 0 replies; 16+ messages in thread
From: Wey-Yi Guy @ 2011-05-27 15:40 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Wey-Yi Guy

Aggregation will not enable if the traffic is lower than the threshold,
this is not an error condition, so change the logging level.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-agn-rs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index 592b0cf..85e0828 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -426,7 +426,7 @@ static int rs_tl_turn_on_agg_for_tid(struct iwl_priv *priv,
 			ieee80211_stop_tx_ba_session(sta, tid);
 		}
 	} else {
-		IWL_ERR(priv, "Aggregation not enabled for tid %d "
+		IWL_DEBUG_HT(priv, "Aggregation not enabled for tid %d "
 			"because load = %u\n", tid, load);
 	}
 	return ret;
-- 
1.7.0.4


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

* [PATCH 09/10] iwlagn: change log to better represent the state of aggregation process
  2011-05-27 15:40 [PATCH 00/10] update for 2.6.41 Wey-Yi Guy
                   ` (7 preceding siblings ...)
  2011-05-27 15:40 ` [PATCH 08/10] iwlagn: change the logging level for aggregation enable check Wey-Yi Guy
@ 2011-05-27 15:40 ` Wey-Yi Guy
  2011-05-27 15:40 ` [PATCH 10/10] iwlagn: don't advertise interface combinations on device not support dualmode Wey-Yi Guy
  9 siblings, 0 replies; 16+ messages in thread
From: Wey-Yi Guy @ 2011-05-27 15:40 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Wey-Yi Guy

Multiple A-MPDU actions will received from mac80211 while setting up the
aggregation queue, change the message log to better represent the states.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-agn-tx.c |    4 ++--
 drivers/net/wireless/iwlwifi/iwl-agn.c    |    3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
index 631d0a5..e459e62 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
@@ -1028,8 +1028,8 @@ int iwlagn_tx_agg_start(struct iwl_priv *priv, struct ieee80211_vif *vif,
 	if (unlikely(tx_fifo < 0))
 		return tx_fifo;
 
-	IWL_WARN(priv, "%s on ra = %pM tid = %d\n",
-			__func__, sta->addr, tid);
+	IWL_DEBUG_HT(priv, "TX AGG request on ra = %pM tid = %d\n",
+		     sta->addr, tid);
 
 	sta_id = iwl_sta_id(sta);
 	if (sta_id == IWL_INVALID_STATION) {
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 1631c44..42a71e5 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2844,6 +2844,9 @@ static int iwlagn_mac_ampdu_action(struct ieee80211_hw *hw,
 
 		iwl_send_lq_cmd(priv, iwl_rxon_ctx_from_vif(vif),
 				&sta_priv->lq_sta.lq, CMD_ASYNC, false);
+
+		IWL_INFO(priv, "Tx aggregation enabled on ra = %pM tid = %d\n",
+			 sta->addr, tid);
 		ret = 0;
 		break;
 	}
-- 
1.7.0.4


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

* [PATCH 10/10] iwlagn: don't advertise interface combinations on device not support dualmode
  2011-05-27 15:40 [PATCH 00/10] update for 2.6.41 Wey-Yi Guy
                   ` (8 preceding siblings ...)
  2011-05-27 15:40 ` [PATCH 09/10] iwlagn: change log to better represent the state of aggregation process Wey-Yi Guy
@ 2011-05-27 15:40 ` Wey-Yi Guy
  9 siblings, 0 replies; 16+ messages in thread
From: Wey-Yi Guy @ 2011-05-27 15:40 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Wey-Yi Guy

do not advertise the limits on concurrency of virtual interfaces
if no dual-mode supports.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-agn.c |   29 +++++++++++++++--------------
 1 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 42a71e5..683ceab 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2530,21 +2530,22 @@ static int iwl_mac_setup_register(struct iwl_priv *priv,
 		hw->wiphy->interface_modes |= ctx->interface_modes;
 		hw->wiphy->interface_modes |= ctx->exclusive_interface_modes;
 	}
-
-	BUILD_BUG_ON(NUM_IWL_RXON_CTX != 2);
-
-	if (hw->wiphy->interface_modes & NL80211_IFTYPE_P2P_CLIENT) {
-		hw->wiphy->iface_combinations = iwlagn_iface_combinations_p2p;
-		hw->wiphy->n_iface_combinations =
-			ARRAY_SIZE(iwlagn_iface_combinations_p2p);
-	} else if (hw->wiphy->interface_modes & NL80211_IFTYPE_AP) {
-		hw->wiphy->iface_combinations = iwlagn_iface_combinations_dualmode;
-		hw->wiphy->n_iface_combinations =
-			ARRAY_SIZE(iwlagn_iface_combinations_dualmode);
+	if (capa->flags & IWL_UCODE_TLV_FLAGS_PAN) {
+		BUILD_BUG_ON(NUM_IWL_RXON_CTX != 2);
+
+		if (hw->wiphy->interface_modes & NL80211_IFTYPE_P2P_CLIENT) {
+			hw->wiphy->iface_combinations =
+				iwlagn_iface_combinations_p2p;
+			hw->wiphy->n_iface_combinations =
+				ARRAY_SIZE(iwlagn_iface_combinations_p2p);
+		} else if (hw->wiphy->interface_modes & NL80211_IFTYPE_AP) {
+			hw->wiphy->iface_combinations =
+				iwlagn_iface_combinations_dualmode;
+			hw->wiphy->n_iface_combinations =
+				ARRAY_SIZE(iwlagn_iface_combinations_dualmode);
+		}
+		hw->wiphy->max_remain_on_channel_duration = 1000;
 	}
-
-	hw->wiphy->max_remain_on_channel_duration = 1000;
-
 	hw->wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY |
 			    WIPHY_FLAG_DISABLE_BEACON_HINTS |
 			    WIPHY_FLAG_IBSS_RSN;
-- 
1.7.0.4


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

* Re: [PATCH 07/10] iwlagn: advertise interface combinations
  2011-05-27 15:40 ` [PATCH 07/10] iwlagn: advertise interface combinations Wey-Yi Guy
@ 2011-06-02 16:22   ` Stanislaw Gruszka
  2011-06-02 16:59     ` wwguy
  0 siblings, 1 reply; 16+ messages in thread
From: Stanislaw Gruszka @ 2011-06-02 16:22 UTC (permalink / raw)
  To: Wey-Yi Guy, linville; +Cc: linux-wireless, ipw3945-devel, Johannes Berg

On Fri, May 27, 2011 at 08:40:30AM -0700, Wey-Yi Guy wrote:
> From: Johannes Berg <johannes.berg@intel.com>
> 
> With this, iwlwifi will advertise the limits on
> concurrency of virtual interfaces.

John, please revert this patch, it disallow to register new device
with below error. I believe, Wey already asked you to not a apply it.

WARNING: at net/wireless/core.c:468 wiphy_register+0x46e/0x5c0
[cfg80211]()
Hardware name: HP xw8600 Workstation
Modules linked in: iwlagn(+) mac80211 cfg80211 fuse cpufreq_ondemand
acpi_cpufreq freq_table mperf xt_physdev ipt_REJECT nf_conntrack_ipv4
nf_defrag_ipv4 iptable_filter ip_tables ip6t_REJECT nf_conntrack_ipv6
nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables ipv6
ext3 jbd dm_mirror dm_region_hash dm_log dm_mod uinput sg hp_wmi
sparse_keymap rfkill microcode serio_raw shpchp ext4 mbcache jbd2 sr_mod
cdrom sd_mod crc_t10dif firewire_ohci firewire_core crc_itu_t mptsas
mptscsih mptbase scsi_transport_sas ahci libahci pata_acpi ata_generic
ata_piix floppy nouveau ttm drm_kms_helper drm i2c_algo_bit i2c_core
mxm_wmi wmi video [last unloaded: scsi_wait_scan]
Pid: 7333, comm: firmware/iwlwif Not tainted 3.0.0-rc1-wl+ #82
Call Trace:
 [<ffffffff8106438f>] warn_slowpath_common+0x7f/0xc0
 [<ffffffff810643ea>] warn_slowpath_null+0x1a/0x20
 [<ffffffffa03ea65e>] wiphy_register+0x46e/0x5c0 [cfg80211]
 [<ffffffff8115ce73>] ? __kmalloc+0x1b3/0x2d0
 [<ffffffffa042732e>] ? ieee80211_register_hw+0xde/0x670 [mac80211]
 [<ffffffffa04274dc>] ieee80211_register_hw+0x28c/0x670 [mac80211]
 [<ffffffffa047b9ca>] iwl_ucode_callback+0xd3a/0x11d0 [iwlagn]
 [<ffffffff81220607>] ? kobject_release+0xa7/0x1d0
 [<ffffffff8130f160>] ? _request_firmware+0x4e0/0x4e0
 [<ffffffff8130f1a1>] request_firmware_work_func+0x41/0x80
 [<ffffffff81088376>] kthread+0xb6/0xc0
 [<ffffffff810a1575>] ? trace_hardirqs_on_caller+0x155/0x1a0
 [<ffffffff814ba404>] kernel_thread_helper+0x4/0x10
 [<ffffffff814b1454>] ? retint_restore_args+0x13/0x13
 [<ffffffff810882c0>] ? __init_kthread_worker+0x70/0x70
 [<ffffffff814ba400>] ? gs_change+0x13/0x13
---[ end trace 971e83aec02c096b ]---
iwlagn 0000:80:00.0: Failed to register hw (error -22)

Stanislaw

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

* Re: [PATCH 07/10] iwlagn: advertise interface combinations
  2011-06-02 16:22   ` Stanislaw Gruszka
@ 2011-06-02 16:59     ` wwguy
  2011-06-02 17:38       ` [PATCH] iwlagn: fix " Johannes Berg
  0 siblings, 1 reply; 16+ messages in thread
From: wwguy @ 2011-06-02 16:59 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: linville, linux-wireless, ipw3945-devel, Berg, Johannes

On Thu, 2011-06-02 at 09:22 -0700, Stanislaw Gruszka wrote:
> On Fri, May 27, 2011 at 08:40:30AM -0700, Wey-Yi Guy wrote:
> > From: Johannes Berg <johannes.berg@intel.com>
> > 
> > With this, iwlwifi will advertise the limits on
> > concurrency of virtual interfaces.
> 
> John, please revert this patch, it disallow to register new device
> with below error. I believe, Wey already asked you to not a apply it.
> 
> WARNING: at net/wireless/core.c:468 wiphy_register+0x46e/0x5c0
> [cfg80211]()
> Hardware name: HP xw8600 Workstation
> Modules linked in: iwlagn(+) mac80211 cfg80211 fuse cpufreq_ondemand
> acpi_cpufreq freq_table mperf xt_physdev ipt_REJECT nf_conntrack_ipv4
> nf_defrag_ipv4 iptable_filter ip_tables ip6t_REJECT nf_conntrack_ipv6
> nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables ipv6
> ext3 jbd dm_mirror dm_region_hash dm_log dm_mod uinput sg hp_wmi
> sparse_keymap rfkill microcode serio_raw shpchp ext4 mbcache jbd2 sr_mod
> cdrom sd_mod crc_t10dif firewire_ohci firewire_core crc_itu_t mptsas
> mptscsih mptbase scsi_transport_sas ahci libahci pata_acpi ata_generic
> ata_piix floppy nouveau ttm drm_kms_helper drm i2c_algo_bit i2c_core
> mxm_wmi wmi video [last unloaded: scsi_wait_scan]
> Pid: 7333, comm: firmware/iwlwif Not tainted 3.0.0-rc1-wl+ #82
> Call Trace:
>  [<ffffffff8106438f>] warn_slowpath_common+0x7f/0xc0
>  [<ffffffff810643ea>] warn_slowpath_null+0x1a/0x20
>  [<ffffffffa03ea65e>] wiphy_register+0x46e/0x5c0 [cfg80211]
>  [<ffffffff8115ce73>] ? __kmalloc+0x1b3/0x2d0
>  [<ffffffffa042732e>] ? ieee80211_register_hw+0xde/0x670 [mac80211]
>  [<ffffffffa04274dc>] ieee80211_register_hw+0x28c/0x670 [mac80211]
>  [<ffffffffa047b9ca>] iwl_ucode_callback+0xd3a/0x11d0 [iwlagn]
>  [<ffffffff81220607>] ? kobject_release+0xa7/0x1d0
>  [<ffffffff8130f160>] ? _request_firmware+0x4e0/0x4e0
>  [<ffffffff8130f1a1>] request_firmware_work_func+0x41/0x80
>  [<ffffffff81088376>] kthread+0xb6/0xc0
>  [<ffffffff810a1575>] ? trace_hardirqs_on_caller+0x155/0x1a0
>  [<ffffffff814ba404>] kernel_thread_helper+0x4/0x10
>  [<ffffffff814b1454>] ? retint_restore_args+0x13/0x13
>  [<ffffffff810882c0>] ? __init_kthread_worker+0x70/0x70
>  [<ffffffff814ba400>] ? gs_change+0x13/0x13
> ---[ end trace 971e83aec02c096b ]---
> iwlagn 0000:80:00.0: Failed to register hw (error -22)

hmm, 
I thought I ask John not to merge this patch, we also see the similar
problem. Johannes has the fix already.

John, Could you revert the patch, I will re-submit.

Thanks
Wey



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

* [PATCH] iwlagn: fix interface combinations
  2011-06-02 16:59     ` wwguy
@ 2011-06-02 17:38       ` Johannes Berg
  2011-06-02 19:49         ` John W. Linville
  0 siblings, 1 reply; 16+ messages in thread
From: Johannes Berg @ 2011-06-02 17:38 UTC (permalink / raw)
  To: wwguy; +Cc: Stanislaw Gruszka, linville, linux-wireless, ipw3945-devel

From: Johannes Berg <johannes.berg@intel.com>

My patch to advertise interface combinations
worked by pure luck in the P2P case, but all
other cases are broken. This is due to a dumb
mistake in the code that checks what should
be advertised, fix that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
Alternatively, this fixes it. Sorry.

 drivers/net/wireless/iwlwifi/iwl-agn.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/net/wireless/iwlwifi/iwl-agn.c	2011-06-02 19:36:58.000000000 +0200
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c	2011-06-02 19:37:09.000000000 +0200
@@ -2533,11 +2533,11 @@ static int iwl_mac_setup_register(struct
 
 	BUILD_BUG_ON(NUM_IWL_RXON_CTX != 2);
 
-	if (hw->wiphy->interface_modes & NL80211_IFTYPE_P2P_CLIENT) {
+	if (hw->wiphy->interface_modes & BIT(NL80211_IFTYPE_P2P_CLIENT)) {
 		hw->wiphy->iface_combinations = iwlagn_iface_combinations_p2p;
 		hw->wiphy->n_iface_combinations =
 			ARRAY_SIZE(iwlagn_iface_combinations_p2p);
-	} else if (hw->wiphy->interface_modes & NL80211_IFTYPE_AP) {
+	} else if (hw->wiphy->interface_modes & BIT(NL80211_IFTYPE_AP)) {
 		hw->wiphy->iface_combinations = iwlagn_iface_combinations_dualmode;
 		hw->wiphy->n_iface_combinations =
 			ARRAY_SIZE(iwlagn_iface_combinations_dualmode);




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

* Re: [PATCH] iwlagn: fix interface combinations
  2011-06-02 17:38       ` [PATCH] iwlagn: fix " Johannes Berg
@ 2011-06-02 19:49         ` John W. Linville
  2011-06-02 19:56           ` wwguy
  0 siblings, 1 reply; 16+ messages in thread
From: John W. Linville @ 2011-06-02 19:49 UTC (permalink / raw)
  To: Johannes Berg; +Cc: wwguy, Stanislaw Gruszka, linux-wireless, ipw3945-devel

On Thu, Jun 02, 2011 at 07:38:43PM +0200, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
> 
> My patch to advertise interface combinations
> worked by pure luck in the P2P case, but all
> other cases are broken. This is due to a dumb
> mistake in the code that checks what should
> be advertised, fix that.
> 
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>

I swear, I thought I had taken it out of my queue.  I'm getting old... :-(

> ---
> Alternatively, this fixes it. Sorry.

I'd rather just apply this -- any objections?

> 
>  drivers/net/wireless/iwlwifi/iwl-agn.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> --- a/drivers/net/wireless/iwlwifi/iwl-agn.c	2011-06-02 19:36:58.000000000 +0200
> +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c	2011-06-02 19:37:09.000000000 +0200
> @@ -2533,11 +2533,11 @@ static int iwl_mac_setup_register(struct
>  
>  	BUILD_BUG_ON(NUM_IWL_RXON_CTX != 2);
>  
> -	if (hw->wiphy->interface_modes & NL80211_IFTYPE_P2P_CLIENT) {
> +	if (hw->wiphy->interface_modes & BIT(NL80211_IFTYPE_P2P_CLIENT)) {
>  		hw->wiphy->iface_combinations = iwlagn_iface_combinations_p2p;
>  		hw->wiphy->n_iface_combinations =
>  			ARRAY_SIZE(iwlagn_iface_combinations_p2p);
> -	} else if (hw->wiphy->interface_modes & NL80211_IFTYPE_AP) {
> +	} else if (hw->wiphy->interface_modes & BIT(NL80211_IFTYPE_AP)) {
>  		hw->wiphy->iface_combinations = iwlagn_iface_combinations_dualmode;
>  		hw->wiphy->n_iface_combinations =
>  			ARRAY_SIZE(iwlagn_iface_combinations_dualmode);
> 
> 
> 
> 

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

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

* Re: [PATCH] iwlagn: fix interface combinations
  2011-06-02 19:49         ` John W. Linville
@ 2011-06-02 19:56           ` wwguy
  0 siblings, 0 replies; 16+ messages in thread
From: wwguy @ 2011-06-02 19:56 UTC (permalink / raw)
  To: John W. Linville
  Cc: Johannes Berg, Stanislaw Gruszka, linux-wireless, ipw3945-devel

On Thu, 2011-06-02 at 12:49 -0700, John W. Linville wrote:
> On Thu, Jun 02, 2011 at 07:38:43PM +0200, Johannes Berg wrote:
> > From: Johannes Berg <johannes.berg@intel.com>
> > 
> > My patch to advertise interface combinations
> > worked by pure luck in the P2P case, but all
> > other cases are broken. This is due to a dumb
> > mistake in the code that checks what should
> > be advertised, fix that.
> > 
> > Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> 
> I swear, I thought I had taken it out of my queue.  I'm getting old... :-(
> 
> > ---
> > Alternatively, this fixes it. Sorry.
> 
> I'd rather just apply this -- any objections?

It works, thanks
My mistake to push and ask revert at the first place, sorry :-(

Wey




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

end of thread, other threads:[~2011-06-02 20:00 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-27 15:40 [PATCH 00/10] update for 2.6.41 Wey-Yi Guy
2011-05-27 15:40 ` [PATCH 01/10] iwlagn: send tx power command if defer cause by RXON not match Wey-Yi Guy
2011-05-27 15:40 ` [PATCH 02/10] iwlagn: remove un-necessary tx power ops Wey-Yi Guy
2011-05-27 15:40 ` [PATCH 03/10] iwlagn: fix dual-mode RXON Wey-Yi Guy
2011-05-27 15:40 ` [PATCH 04/10] iwlagn: solve sparse warning Wey-Yi Guy
2011-05-27 15:40 ` [PATCH 05/10] iwlwifi: disambiguate invalid DMA index warnings Wey-Yi Guy
2011-05-27 15:40 ` [PATCH 06/10] iwlagn: free the ICT ISR when the request_irq failed Wey-Yi Guy
2011-05-27 15:40 ` [PATCH 07/10] iwlagn: advertise interface combinations Wey-Yi Guy
2011-06-02 16:22   ` Stanislaw Gruszka
2011-06-02 16:59     ` wwguy
2011-06-02 17:38       ` [PATCH] iwlagn: fix " Johannes Berg
2011-06-02 19:49         ` John W. Linville
2011-06-02 19:56           ` wwguy
2011-05-27 15:40 ` [PATCH 08/10] iwlagn: change the logging level for aggregation enable check Wey-Yi Guy
2011-05-27 15:40 ` [PATCH 09/10] iwlagn: change log to better represent the state of aggregation process Wey-Yi Guy
2011-05-27 15:40 ` [PATCH 10/10] iwlagn: don't advertise interface combinations on device not support dualmode Wey-Yi Guy

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.