Skip to contentSkip to conversation

update for 2.6.41

PATCH In review Wey-Yi Guy 4 participants 16 messages May 27, 2011 – Jun 2, 2011 Networking drivers (wireless)

lore
Share & tools
lore

Wey-Yi Guy

author
#0 lore raw

cover update for 2.6.41

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(-)
author
#1 lore raw

PATCH 1/10 iwlagn: send tx power command if defer cause by RXON not match

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.

---
 drivers/net/wireless/iwlwifi/iwl-agn-rxon.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/net/wireless/iwlwifi/iwl-agn-rxon.c +5 -0
index a95ad84..58c095c 100644
@@ -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;
 	}
 
Signature · 1 line
1.7.0.4
author
#2 lore raw

PATCH 2/10 iwlagn: remove un-necessary tx power ops

In reply to Wey-Yi Guy

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

---
 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(-)
drivers/net/wireless/iwlwifi/iwl-1000.c +0 -1
index 61d4a11..9940950 100644
@@ -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,
drivers/net/wireless/iwlwifi/iwl-2000.c +0 -1
index 86feec8..a37c41b 100644
@@ -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 = {
drivers/net/wireless/iwlwifi/iwl-5000.c +0 -2
index a70b8cf..a8dbbd0 100644
@@ -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 = {
drivers/net/wireless/iwlwifi/iwl-6000.c +0 -2
index f8c710d..eabf3b8 100644
@@ -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 = {
drivers/net/wireless/iwlwifi/iwl-core.c +1 -4
index 4653dea..52e9413 100644
@@ -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) {
drivers/net/wireless/iwlwifi/iwl-core.h +0 -1
index 3bb76f6..a87b54f 100644
@@ -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) */
Signature · 1 line
1.7.0.4
author
#3 lore raw

PATCH 3/10 iwlagn: fix dual-mode RXON

In reply to Wey-Yi Guy

From: Johannes Berg <[email protected]>

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.

---
 drivers/net/wireless/iwlwifi/iwl-agn-rxon.c |   52 ++++++++++++++++++++------
 1 files changed, 40 insertions(+), 12 deletions(-)
drivers/net/wireless/iwlwifi/iwl-agn-rxon.c +40 -12
index 58c095c..afb2f20 100644
@@ -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);
 
Signature · 1 line
1.7.0.4
author
#4 lore raw

PATCH 4/10 iwlagn: solve sparse warning

In reply to Wey-Yi Guy

From: Emmanuel Grumbach <[email protected]>

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

---
 drivers/net/wireless/iwlwifi/iwl-agn.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
drivers/net/wireless/iwlwifi/iwl-agn.c +0 -3
index e027f99..58ed9a0 100644
@@ -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),
Signature · 1 line
1.7.0.4
author
#5 lore raw

PATCH 5/10 iwlwifi: disambiguate invalid DMA index warnings

In reply to Wey-Yi Guy

From: Daniel Halperin <[email protected]>

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.

---
 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(-)
drivers/net/wireless/iwlwifi/iwl-agn-lib.c +3 -3
index f803fb6..4ab77c8 100644
@@ -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;
 	}
drivers/net/wireless/iwlwifi/iwl-agn-tx.c +3 -3
index 9acf0e9..631d0a5 100644
@@ -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;
 	}
 
drivers/net/wireless/iwlwifi/iwl-tx.c +3 -3
index 686e176..1084fe0 100644
@@ -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;
 	}
 
Signature · 1 line
1.7.0.4
author
#6 lore raw

PATCH 6/10 iwlagn: free the ICT ISR when the request_irq failed

In reply to Wey-Yi Guy

From: Emmanuel Grumbach <[email protected]>

Fix a memory leak in case request_irq fails.

---
 drivers/net/wireless/iwlwifi/iwl-agn.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/wireless/iwlwifi/iwl-agn.c +1 -1
index 58ed9a0..a90cb1b 100644
@@ -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:
Signature · 1 line
1.7.0.4
author
#7 lore raw

PATCH 7/10 iwlagn: advertise interface combinations

In reply to Wey-Yi Guy

From: Johannes Berg <[email protected]>

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

---
 drivers/net/wireless/iwlwifi/iwl-agn.c |   83 ++++++++++++++++++++++++++++++++
 1 files changed, 83 insertions(+), 0 deletions(-)
drivers/net/wireless/iwlwifi/iwl-agn.c +83 -0
index a90cb1b..1631c44 100644
@@ -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 |
Signature · 1 line
1.7.0.4
author
#13 lore raw

PATCH 8/10 iwlagn: change the logging level for aggregation enable check

In reply to 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.

---
 drivers/net/wireless/iwlwifi/iwl-agn-rs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/wireless/iwlwifi/iwl-agn-rs.c +1 -1
index 592b0cf..85e0828 100644
@@ -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;
Signature · 1 line
1.7.0.4
author
#14 lore raw

PATCH 9/10 iwlagn: change log to better represent the state of aggregation process

In reply to 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.

---
 drivers/net/wireless/iwlwifi/iwl-agn-tx.c |    4 ++--
 drivers/net/wireless/iwlwifi/iwl-agn.c    |    3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)
drivers/net/wireless/iwlwifi/iwl-agn-tx.c +2 -2
index 631d0a5..e459e62 100644
@@ -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) {
drivers/net/wireless/iwlwifi/iwl-agn.c +3 -0
index 1631c44..42a71e5 100644
@@ -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;
 	}
Signature · 1 line
1.7.0.4
author
#15 lore raw

PATCH 10/10 iwlagn: don't advertise interface combinations on device not support dualmode

In reply to Wey-Yi Guy

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

---
 drivers/net/wireless/iwlwifi/iwl-agn.c |   29 +++++++++++++++--------------
 1 files changed, 15 insertions(+), 14 deletions(-)
drivers/net/wireless/iwlwifi/iwl-agn.c +15 -14
index 42a71e5..683ceab 100644
@@ -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;
Signature · 1 line
1.7.0.4
#8 lore raw

Re: [PATCH 07/10] iwlagn: advertise interface combinations

In reply to Wey-Yi Guy
Quoted 4 lines · Wey-Yi Guy

From: Johannes Berg <[email protected]>

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

author
#9 lore raw

Re: [PATCH 07/10] iwlagn: advertise interface combinations

Quoted 41 lines · Stanislaw Gruszka
Quoted 4 lines · Wey-Yi Guy

From: Johannes Berg <[email protected]>

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 ]---
Quoted 1 line

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

maintainer
#10 lore raw

PATCH 1/1 iwlagn: fix interface combinations

From: Johannes Berg <[email protected]>

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.

---
Alternatively, this fixes it. Sorry.

 drivers/net/wireless/iwlwifi/iwl-agn.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/iwlwifi/iwl-agn.c +2 -2
@@ -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);
#11 lore raw

Re: [PATCH] iwlagn: fix interface combinations

Quoted 9 lines · Johannes Berg

From: Johannes Berg <[email protected]>

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.

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

Quoted 2 lines

---
Alternatively, this fixes it. Sorry.

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

Quoted 24 lines
 drivers/net/wireless/iwlwifi/iwl-agn.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/iwlwifi/iwl-agn.c +2 -2
@@ -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);
Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.
author
#12 lore raw

Re: [PATCH] iwlagn: fix interface combinations

Quoted 9 lines · John W. Linville
Quoted 8 lines · Johannes Berg

From: Johannes Berg <[email protected]>

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.

Quoted 8 lines
Quoted 1 line

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

Quoted 2 lines

---
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