2013-06-24 13:19:40

by Grumbach, Emmanuel

[permalink] [raw]
Subject: [PATCH 3.9 1/4] iwlwifi: mvm: adjust firmware D3 configuration API

From: Johannes Berg <[email protected]>

commit dfcb4c3aacedee6838e436fb575b31e138505203 upstream.

The D3 firmware API changed to include a new field, adjust
the driver to it to avoid getting an NMI when configuring.

Signed-off-by: Johannes Berg <[email protected]>
---
drivers/net/wireless/iwlwifi/mvm/fw-api-d3.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/iwlwifi/mvm/fw-api-d3.h b/drivers/net/wireless/iwlwifi/mvm/fw-api-d3.h
index cf6f9a0..937665f 100644
--- a/drivers/net/wireless/iwlwifi/mvm/fw-api-d3.h
+++ b/drivers/net/wireless/iwlwifi/mvm/fw-api-d3.h
@@ -75,13 +75,15 @@ enum iwl_d3_wakeup_flags {
* struct iwl_d3_manager_config - D3 manager configuration command
* @min_sleep_time: minimum sleep time (in usec)
* @wakeup_flags: wakeup flags, see &enum iwl_d3_wakeup_flags
+ * @wakeup_host_timer: force wakeup after this many seconds
*
* The structure is used for the D3_CONFIG_CMD command.
*/
struct iwl_d3_manager_config {
__le32 min_sleep_time;
__le32 wakeup_flags;
-} __packed; /* D3_MANAGER_CONFIG_CMD_S_VER_3 */
+ __le32 wakeup_host_timer;
+} __packed; /* D3_MANAGER_CONFIG_CMD_S_VER_4 */


/* TODO: OFFLOADS_QUERY_API_S_VER_1 */
--
1.7.10.4



2013-06-24 13:19:44

by Grumbach, Emmanuel

[permalink] [raw]
Subject: [PATCH 3.9 4/4] iwlwifi: mvm: reduce the number of supported interfaces

The driver in 3.9 can't support more than one interface
concurrently. The parameters given to cfg80211 were wrong.
Next versions are fixed by allowing concurrent interfaces.
This is why you won't see this patch upstream.

This patches fixes:

[ 76.711244] WARNING: at net/wireless/core.c:481 wiphy_register+0x646/0x710 [cfg80211]()
[ 76.711246] Hardware name: Latitude E6410
[ 76.711247] Modules linked in: iwlmvm(+) mac80211 iwlwifi cfg80211 i915 snd_hda_codec_hdmi binfmt_misc snd_hda_codec_idt snd_hda_intel snd_hda_codec snd_hwdep coretemp snd_pcm kvm_intel kvm snd_seq_midi drm_kms_helper joydev snd_rawmidi drm snd_seq_midi_event snd_seq ghash_clmulni_intel snd_timer aesni_intel snd_seq_device ablk_helper snd cryptd lrw aes_x86_64 xts psmouse gf128mul dell_laptop microcode dcdbas dell_wmi soundcore sparse_keymap serio_raw snd_page_alloc i2c_algo_bit lpc_ich video wmi firewire_ohci firewire_core sdhci_pci crc_itu_t sdhci e1000e ptp pps_core
[ 76.711303] Pid: 2533, comm: modprobe Not tainted 3.9.7+ #2
[ 76.711304] Call Trace:
[ 76.711310] [<ffffffff81060faf>] warn_slowpath_common+0x7f/0xc0
[ 76.711313] [<ffffffff8106100a>] warn_slowpath_null+0x1a/0x20
[ 76.711321] [<ffffffffa0460726>] wiphy_register+0x646/0x710 [cfg80211]
[ 76.711327] [<ffffffff811b9fb0>] ? __kmalloc+0x140/0x2c0
[ 76.711344] [<ffffffffa04f3505>] ? ieee80211_register_hw+0x1a5/0x840 [mac80211]
[ 76.711351] [<ffffffffa04f36eb>] ieee80211_register_hw+0x38b/0x840 [mac80211]
[ 76.711359] [<ffffffffa0402a55>] iwl_mvm_mac_setup_register+0x235/0x260 [iwlmvm]
[ 76.711365] [<ffffffffa0403bbc>] iwl_op_mode_mvm_start+0x3dc/0x4d0 [iwlmvm]
[ 76.711373] [<ffffffffa03ce11c>] iwl_opmode_register+0xcc/0xf0 [iwlwifi]
[ 76.711378] [<ffffffffa02cb000>] ? 0xffffffffa02cafff
[ 76.711383] [<ffffffffa02cb036>] iwl_mvm_init+0x36/0x1000 [iwlmvm]
[ 76.711388] [<ffffffff8100215a>] do_one_initcall+0x12a/0x180
[ 76.711393] [<ffffffff810e4c3b>] load_module+0x127b/0x1c50
[ 76.711397] [<ffffffff8139d110>] ? ddebug_proc_open+0xd0/0xd0
[ 76.711404] [<ffffffff81388e7e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
[ 76.711407] [<ffffffff810e56e7>] sys_init_module+0xd7/0x120
[ 76.711413] [<ffffffff81759d19>] system_call_fastpath+0x16/0x1b
[ 76.711415] ---[ end trace e19789dfc0454b26 ]---

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

diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
index 8572358..b048fd3 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
@@ -78,7 +78,7 @@

static const struct ieee80211_iface_limit iwl_mvm_limits[] = {
{
- .max = 1,
+ .max = 2,
.types = BIT(NL80211_IFTYPE_STATION) |
BIT(NL80211_IFTYPE_AP),
},
@@ -87,7 +87,7 @@ static const struct ieee80211_iface_limit iwl_mvm_limits[] = {
static const struct ieee80211_iface_combination iwl_mvm_iface_combinations[] = {
{
.num_different_channels = 1,
- .max_interfaces = 3,
+ .max_interfaces = 2,
.limits = iwl_mvm_limits,
.n_limits = ARRAY_SIZE(iwl_mvm_limits),
},
--
1.7.10.4


2013-06-24 15:25:49

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 3.9 4/4] iwlwifi: mvm: reduce the number of supported interfaces

On Mon, Jun 24, 2013 at 04:19:05PM +0300, Emmanuel Grumbach wrote:
> The driver in 3.9 can't support more than one interface
> concurrently. The parameters given to cfg80211 were wrong.
> Next versions are fixed by allowing concurrent interfaces.
> This is why you won't see this patch upstream.

So this isn't an issue in 3.10 at all?

thanks,

greg k-h

2013-06-24 13:19:43

by Grumbach, Emmanuel

[permalink] [raw]
Subject: [PATCH 3.9 3/4] iwlwifi: bump required firmware API version

From: Johannes Berg <[email protected]>

commit a2d0909a687b4d250cc2b7481072e361678745ba upstream.

As the firmware API has changed significantly and we don't
have support code for the old APIs, bump the version to be
able to release the version 7 API firmware. Unfortunately
this means that the driver in 3.9 and 3.10 can't work, but
that's still better than crashing the device/driver there.

3.9 note: this allows support for the new devices in 3.9.

Signed-off-by: Johannes Berg <[email protected]>
---
drivers/net/wireless/iwlwifi/pcie/7000.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/pcie/7000.c b/drivers/net/wireless/iwlwifi/pcie/7000.c
index 6e35b2b..25c33b0 100644
--- a/drivers/net/wireless/iwlwifi/pcie/7000.c
+++ b/drivers/net/wireless/iwlwifi/pcie/7000.c
@@ -31,16 +31,16 @@
#include "cfg.h"

/* Highest firmware API version supported */
-#define IWL7260_UCODE_API_MAX 6
-#define IWL3160_UCODE_API_MAX 6
+#define IWL7260_UCODE_API_MAX 7
+#define IWL3160_UCODE_API_MAX 7

/* Oldest version we won't warn about */
-#define IWL7260_UCODE_API_OK 6
-#define IWL3160_UCODE_API_OK 6
+#define IWL7260_UCODE_API_OK 7
+#define IWL3160_UCODE_API_OK 7

/* Lowest firmware API version supported */
-#define IWL7260_UCODE_API_MIN 6
-#define IWL3160_UCODE_API_MIN 6
+#define IWL7260_UCODE_API_MIN 7
+#define IWL3160_UCODE_API_MIN 7

/* NVM versions */
#define IWL7260_NVM_VERSION 0x0a1d
--
1.7.10.4


2013-06-24 13:19:42

by Grumbach, Emmanuel

[permalink] [raw]
Subject: [PATCH 3.9 2/4] iwlwifi: mvm: don't use cts to self

From: Dor Shaish <[email protected]>

commit cc7ee2bab3d90b0a09651dcfa2d0c9ec1a115bc8 upstream.

The current fw doesn't currently support cts to self. There
is a bug in the fw that prevents us from using cts to self.
Use full protection (including RTS) for now.

Signed-off-by: Dor Shaish <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
---
drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
index bf76b17..864cd6d 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
@@ -553,9 +553,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);

+ /* Don't use cts to self as the fw doesn't support it currently. */
if (vif->bss_conf.use_cts_prot)
- cmd->protection_flags |= cpu_to_le32(MAC_PROT_FLG_TGG_PROTECT |
- MAC_PROT_FLG_SELF_CTS_EN);
+ cmd->protection_flags |= cpu_to_le32(MAC_PROT_FLG_TGG_PROTECT);

/*
* I think that we should enable these 2 flags regardless the HT PROT
--
1.7.10.4


2013-06-24 15:45:40

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH 3.9 4/4] iwlwifi: mvm: reduce the number of supported interfaces

On Mon, 2013-06-24 at 08:26 -0700, Greg Kroah-Hartman wrote:
> On Mon, Jun 24, 2013 at 04:19:05PM +0300, Emmanuel Grumbach wrote:
> > The driver in 3.9 can't support more than one interface
> > concurrently. The parameters given to cfg80211 were wrong.
> > Next versions are fixed by allowing concurrent interfaces.
> > This is why you won't see this patch upstream.
>
> So this isn't an issue in 3.10 at all?

The dangers of stable-only patches ... I think this was actually
introduced into 3.9 only in my commit
2e8a935b639356f8397d39b118ac914d99b55871 ("iwlwifi: mvm: remove
P2P_DEVICE support"). Sorry about that.

johannes


2013-06-24 22:09:06

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 3.9 1/4] iwlwifi: mvm: adjust firmware D3 configuration API

On Mon, Jun 24, 2013 at 04:19:02PM +0300, Emmanuel Grumbach wrote:
> From: Johannes Berg <[email protected]>
>
> commit dfcb4c3aacedee6838e436fb575b31e138505203 upstream.

I don't see that git commit id in Linus's tree, so I can't accept this.

Come on people, you all know better...

thread now deleted, please redo this properly.

greg k-h