2014-07-05 19:32:43

by Emmanuel Grumbach

[permalink] [raw]
Subject: pull request: iwlwifi 2014-07-05

Hi John,

This pull request is intended for 3.a16.

I have here 2 patches that disable the usage of CTS to self. This keeps making trouble to the firmware and is not a really reliable protection anyway. We may re-enable it in the future, but in rarer cases. Along with this, I have a fix from Ilan that prevents a firmware assertion.

Please pull.

The following changes since commit a42c9fcc4a88cdd246fab3bcf06c4487afee3d88:

Revert "iwlwifi: remove IWL_UCODE_TLV_FLAGS_UAPSD_SUPPORT flag" (2014-06-24 22:01:46 +0300)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes.git for-john

for you to fetch changes up to dc271ee0d04d12d6bfabacbec803289a7072fbd9:

iwlwifi: mvm: disable CTS to Self (2014-07-03 20:55:18 +0300)

----------------------------------------------------------------
Emmanuel Grumbach (2):
iwlwifi: dvm: don't enable CTS to self
iwlwifi: mvm: disable CTS to Self

Ilan Peer (1):
iwlwifi: mvm: Fix broadcast filtering

drivers/net/wireless/iwlwifi/dvm/rxon.c | 12 ------------
drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c | 5 ++---
drivers/net/wireless/iwlwifi/mvm/mac80211.c | 12 ++++++------
3 files changed, 8 insertions(+), 21 deletions(-)


Attachments:
signature.asc (901.00 B)
OpenPGP digital signature

2014-07-07 19:15:12

by John W. Linville

[permalink] [raw]
Subject: Re: pull request: iwlwifi 2014-07-05

On Sat, Jul 05, 2014 at 10:32:36PM +0300, Emmanuel Grumbach wrote:
> Hi John,
>
> This pull request is intended for 3.a16.
>
> I have here 2 patches that disable the usage of CTS to self. This keeps making trouble to the firmware and is not a really reliable protection anyway. We may re-enable it in the future, but in rarer cases. Along with this, I have a fix from Ilan that prevents a firmware assertion.
>
> Please pull.
>
> The following changes since commit a42c9fcc4a88cdd246fab3bcf06c4487afee3d88:
>
> Revert "iwlwifi: remove IWL_UCODE_TLV_FLAGS_UAPSD_SUPPORT flag" (2014-06-24 22:01:46 +0300)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes.git for-john
>
> for you to fetch changes up to dc271ee0d04d12d6bfabacbec803289a7072fbd9:
>
> iwlwifi: mvm: disable CTS to Self (2014-07-03 20:55:18 +0300)

Pulling now...

--
John W. Linville Someday the world will need a hero, and you
[email protected] might be all we have. Be ready.

2014-07-05 19:33:58

by Emmanuel Grumbach

[permalink] [raw]
Subject: [PATCH 2/3] iwlwifi: dvm: don't enable CTS to self

From: Emmanuel Grumbach <[email protected]>

We should always prefer to use full RTS protection. Using
CTS to self gives a meaningless improvement, but this flow
is much harder for the firmware which is likely to have
issues with it.

CC: <[email protected]>
Signed-off-by: Emmanuel Grumbach <[email protected]>
---
drivers/net/wireless/iwlwifi/dvm/rxon.c | 12 ------------
1 file changed, 12 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/dvm/rxon.c b/drivers/net/wireless/iwlwifi/dvm/rxon.c
index ed50de6..6dc5dd3 100644
--- a/drivers/net/wireless/iwlwifi/dvm/rxon.c
+++ b/drivers/net/wireless/iwlwifi/dvm/rxon.c
@@ -1068,13 +1068,6 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
/* recalculate basic rates */
iwl_calc_basic_rates(priv, ctx);

- /*
- * force CTS-to-self frames protection if RTS-CTS is not preferred
- * one aggregation protection method
- */
- if (!priv->hw_params.use_rts_for_aggregation)
- ctx->staging.flags |= RXON_FLG_SELF_CTS_EN;
-
if ((ctx->vif && ctx->vif->bss_conf.use_short_slot) ||
!(ctx->staging.flags & RXON_FLG_BAND_24G_MSK))
ctx->staging.flags |= RXON_FLG_SHORT_SLOT_MSK;
@@ -1480,11 +1473,6 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw,
else
ctx->staging.flags &= ~RXON_FLG_TGG_PROTECT_MSK;

- if (bss_conf->use_cts_prot)
- ctx->staging.flags |= RXON_FLG_SELF_CTS_EN;
- else
- ctx->staging.flags &= ~RXON_FLG_SELF_CTS_EN;
-
memcpy(ctx->staging.bssid_addr, bss_conf->bssid, ETH_ALEN);

if (vif->type == NL80211_IFTYPE_AP ||
--
1.8.3.2


2014-07-05 19:33:56

by Emmanuel Grumbach

[permalink] [raw]
Subject: [PATCH 1/3] iwlwifi: mvm: Fix broadcast filtering

From: Ilan Peer <[email protected]>

Current code did not allow sending the broadcast filtering command
for P2P Client interfaces. However, this was not enough, since once
broadcast filtering command was issued over the station interface
after the P2P Client connected, the command also attached the filters
to the P2P Client MAC which is not allowed (FW ASSERT 1063).

Fix this skipping P2P Client interfaces when constructing the broadcast
filtering command

Signed-off-by: Ilan Peer <[email protected]>
Reviewed-by: ArikX Nemtsov <[email protected]>
Signed-off-by: Emmanuel Grumbach <[email protected]>
---
drivers/net/wireless/iwlwifi/mvm/mac80211.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
index 1cef708..9bfb906 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
@@ -1166,8 +1166,12 @@ static void iwl_mvm_bcast_filter_iterator(void *_data, u8 *mac,

bcast_mac = &cmd->macs[mvmvif->id];

- /* enable filtering only for associated stations */
- if (vif->type != NL80211_IFTYPE_STATION || !vif->bss_conf.assoc)
+ /*
+ * enable filtering only for associated stations, but not for P2P
+ * Clients
+ */
+ if (vif->type != NL80211_IFTYPE_STATION || vif->p2p ||
+ !vif->bss_conf.assoc)
return;

bcast_mac->default_discard = 1;
@@ -1244,10 +1248,6 @@ static int iwl_mvm_configure_bcast_filter(struct iwl_mvm *mvm,
if (!(mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_BCAST_FILTERING))
return 0;

- /* bcast filtering isn't supported for P2P client */
- if (vif->p2p)
- return 0;
-
if (!iwl_mvm_bcast_filter_build_cmd(mvm, &cmd))
return 0;

--
1.8.3.2


2014-07-05 19:33:59

by Emmanuel Grumbach

[permalink] [raw]
Subject: [PATCH 3/3] iwlwifi: mvm: disable CTS to Self

From: Emmanuel Grumbach <[email protected]>

Firmware folks seem say that this flag can make trouble.
Drop it. The advantage of CTS to self is that it slightly
reduces the cost of the protection, but make the protection
less reliable.

Cc: <[email protected]> [3.13+]
Signed-off-by: Emmanuel Grumbach <[email protected]>
---
drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
index 8b53027..725ba49 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
@@ -667,10 +667,9 @@ static void iwl_mvm_mac_ctxt_cmd_common(struct iwl_mvm *mvm,
if (vif->bss_conf.qos)
cmd->qos_flags |= cpu_to_le32(MAC_QOS_FLG_UPDATE_EDCA);

- if (vif->bss_conf.use_cts_prot) {
+ if (vif->bss_conf.use_cts_prot)
cmd->protection_flags |= cpu_to_le32(MAC_PROT_FLG_TGG_PROTECT);
- cmd->protection_flags |= cpu_to_le32(MAC_PROT_FLG_SELF_CTS_EN);
- }
+
IWL_DEBUG_RATE(mvm, "use_cts_prot %d, ht_operation_mode %d\n",
vif->bss_conf.use_cts_prot,
vif->bss_conf.ht_operation_mode);
--
1.8.3.2