2010-06-25 22:43:22

by Reinette Chatre

[permalink] [raw]
Subject: [PATCH 0/2] iwlwifi fixes for 2.6.35

We include a much anticipated fix for an issue introduced that
broke multicast. This was particularly severe in 3945.
Some references about this issue:
https://bugzilla.kernel.org/show_bug.cgi?id=16235
http://marc.info/?l=linux-kernel&m=127653628301300&w=2
http://thread.gmane.org/gmane.linux.kernel.wireless.general/51614

The second fix is a required change to make all of our current RTS/CTS
settings take effect. Previously we would only modify the RXON setting, but
this setting would only be viewed by firmware if the TX flags have the
TX_CMD_FLAG_PROT_REQUIRE_MSK bit set, which we have not done until now.


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

Johannes Berg (1):
iwlwifi: fix multicast

Wey-Yi Guy (1):
iwlwifi: set TX_CMD_FLAG_PROT_REQUIRE_MSK in tx_flag

drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c | 6 +-----
drivers/net/wireless/iwlwifi/iwl-core.c | 7 ++++++-
2 files changed, 7 insertions(+), 6 deletions(-)



2010-06-25 22:43:22

by Reinette Chatre

[permalink] [raw]
Subject: [PATCH 2/2] iwlwifi: set TX_CMD_FLAG_PROT_REQUIRE_MSK in tx_flag

From: Wey-Yi Guy <[email protected]>

When building tx command, always set TX_CMD_FLAG_PROT_REQUIRE_MSK
for 5000 series and up.

Without setting this bit the firmware will not examine the RTS/CTS setting
and thus not send traffic with the appropriate protection. RTS/CTS is is
required for HT traffic in a noisy environment where, without this setting,
connections will stall on some hardware as documented in the patch that
initially attempted to address this:

commit 1152dcc28c66a74b5b3f1a3ede0aa6729bfd48e4
Author: Wey-Yi Guy <[email protected]>
Date: Fri Jan 15 13:42:58 2010 -0800

iwlwifi: Fix throughput stall issue in HT mode for 5000

Similar to 6000 and 1000 series, RTS/CTS is the recommended
protection mechanism for 5000 series in HT mode based on the HW design.
Using RTS/CTS will better protect the inner exchange from interference,
especially in highly-congested environment, it also prevent uCode encounter
TX FIFO underrun and other HT mode related performance issues.

For 3945 and 4965, different flags are used for RTS/CTS or CTS-to-Self
protection.

Signed-off-by: Wey-Yi Guy <[email protected]>
Signed-off-by: Reinette Chatre <[email protected]>
---
drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c
index 44ef5d9..01658cf 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c
@@ -212,11 +212,7 @@ static void iwlagn_chain_noise_reset(struct iwl_priv *priv)
static void iwlagn_rts_tx_cmd_flag(struct ieee80211_tx_info *info,
__le32 *tx_flags)
{
- if ((info->control.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS) ||
- (info->control.rates[0].flags & IEEE80211_TX_RC_USE_CTS_PROTECT))
- *tx_flags |= TX_CMD_FLG_RTS_CTS_MSK;
- else
- *tx_flags &= ~TX_CMD_FLG_RTS_CTS_MSK;
+ *tx_flags |= TX_CMD_FLG_RTS_CTS_MSK;
}

/* Calc max signal level (dBm) among 3 possible receivers */
--
1.7.0.4


2010-06-25 22:43:22

by Reinette Chatre

[permalink] [raw]
Subject: [PATCH 1/2] iwlwifi: fix multicast

From: Johannes Berg <[email protected]>

commit 3474ad635db371b0d8d0ee40086f15d223d5b6a4
Author: Johannes Berg <[email protected]>
Date: Thu Apr 29 04:43:05 2010 -0700

iwlwifi: apply filter flags directly

broke multicast. The reason, it turns out, is that
the code previously checked if ALLMULTI _changed_,
which the new code no longer did, and normally it
_never_ changes. Had somebody changed it manually,
the code prior to my patch there would have been
broken already.

The reason is that we always, unconditionally, ask
the device to pass up all multicast frames, but the
new code made it depend on ALLMULTI which broke it
since now we'd pass up multicast frames depending
on the default filter in the device, which isn't
necessarily what we want (since we don't program it
right now).

Fix this by simply not checking allmulti as we have
allmulti behaviour enabled already anyway.

Reported-by: Maxim Levitsky <[email protected]>
Tested-by: Maxim Levitsky <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
---
drivers/net/wireless/iwlwifi/iwl-core.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 426e955..5bbc529 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -1314,7 +1314,6 @@ void iwl_configure_filter(struct ieee80211_hw *hw,
changed_flags, *total_flags);

CHK(FIF_OTHER_BSS | FIF_PROMISC_IN_BSS, RXON_FILTER_PROMISC_MSK);
- CHK(FIF_ALLMULTI, RXON_FILTER_ACCEPT_GRP_MSK);
CHK(FIF_CONTROL, RXON_FILTER_CTL2HOST_MSK);
CHK(FIF_BCN_PRBRESP_PROMISC, RXON_FILTER_BCON_AWARE_MSK);

@@ -1329,6 +1328,12 @@ void iwl_configure_filter(struct ieee80211_hw *hw,

mutex_unlock(&priv->mutex);

+ /*
+ * Receiving all multicast frames is always enabled by the
+ * default flags setup in iwl_connection_init_rx_config()
+ * since we currently do not support programming multicast
+ * filters into the device.
+ */
*total_flags &= FIF_OTHER_BSS | FIF_ALLMULTI | FIF_PROMISC_IN_BSS |
FIF_BCN_PRBRESP_PROMISC | FIF_CONTROL;
}
--
1.7.0.4