2017-01-13 12:40:11

by Luca Coelho

[permalink] [raw]
Subject: [PATCH 0/6] iwlwifi: updates intended for v4.10 2017-01-13

From: Luca Coelho <[email protected]>

Hi,

Here are a few fixes that I intend to send for v4.10:

* fix suspend failure with unified firmware images
* fix a potential crash when dumping debug data
* fix a couple of mistakes in FW names exported by the modules
* small fix for PS-Poll enabling via debugfs
* fix for dynamic queue allocation offchannel data

I'll wait for kbuildbot results and then I'll send a pull-request for
them.

Cheers,
Luca.

Beni Lev (1):
iwlwifi: mvm: Use aux queue for offchannel frames in dqa

Emmanuel Grumbach (1):
iwlwifi: mvm: fix PS-Poll enablement

Johannes Berg (1):
iwlwifi: mvm: properly check for transport data in dump

Jürg Billeter (2):
iwlwifi: fix double hyphen in MODULE_FIRMWARE for 8000
iwlwifi: fix MODULE_FIRMWARE for 6030

Luca Coelho (1):
iwlwifi: mvm: don't restart HW if suspend fails with unified image

drivers/net/wireless/intel/iwlwifi/iwl-6000.c | 2 +-
drivers/net/wireless/intel/iwlwifi/iwl-8000.c | 2 +-
drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 13 ++++++++-----
drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c | 11 ++++++-----
drivers/net/wireless/intel/iwlwifi/mvm/power.c | 18 ++++++++----------
drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 10 ++++++----
6 files changed, 30 insertions(+), 26 deletions(-)

--
2.11.0


2017-01-13 12:40:11

by Luca Coelho

[permalink] [raw]
Subject: [PATCH 6/6] iwlwifi: mvm: Use aux queue for offchannel frames in dqa

From: Beni Lev <[email protected]>

Since offchannel activity doesn't always require a BSS, e.g. ANQP
sessions, offchannel frames should not use the BSS queue, because it
might not be initialized. Use the auxilary queue instead.

Fixes: e3118ad74d7e ("iwlwifi: mvm: support tdls in dqa mode")
Signed-off-by: Beni Lev <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
---
drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
index 66957ac12ca4..52ad6190a4b8 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
@@ -563,9 +563,10 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb)
* (this is not possible for unicast packets as a TLDS discovery
* response are sent without a station entry); otherwise use the
* AUX station.
- * In DQA mode, if vif is of type STATION and frames are not multicast,
- * they should be sent from the BSS queue. For example, TDLS setup
- * frames should be sent on this queue, as they go through the AP.
+ * In DQA mode, if vif is of type STATION and frames are not multicast
+ * or offchannel, they should be sent from the BSS queue.
+ * For example, TDLS setup frames should be sent on this queue,
+ * as they go through the AP.
*/
sta_id = mvm->aux_sta.sta_id;
if (info.control.vif) {
@@ -587,7 +588,8 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb)
if (ap_sta_id != IWL_MVM_STATION_COUNT)
sta_id = ap_sta_id;
} else if (iwl_mvm_is_dqa_supported(mvm) &&
- info.control.vif->type == NL80211_IFTYPE_STATION) {
+ info.control.vif->type == NL80211_IFTYPE_STATION &&
+ queue != mvm->aux_queue) {
queue = IWL_MVM_DQA_BSS_CLIENT_QUEUE;
}
}
--
2.11.0

2017-01-13 12:40:11

by Luca Coelho

[permalink] [raw]
Subject: [PATCH 3/6] iwlwifi: fix double hyphen in MODULE_FIRMWARE for 8000

From: Jürg Billeter <[email protected]>

There is only a single hyphen between iwlwifi-8000C and the API version
in the firmware filename.

Fixes: e1ba684f762b ("iwlwifi: 8000: fix MODULE_FIRMWARE input")
Signed-off-by: Jürg Billeter <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
---
drivers/net/wireless/intel/iwlwifi/iwl-8000.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-8000.c b/drivers/net/wireless/intel/iwlwifi/iwl-8000.c
index d02ca1491d16..8d3e53fac1da 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-8000.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-8000.c
@@ -91,7 +91,7 @@

#define IWL8000_FW_PRE "iwlwifi-8000C-"
#define IWL8000_MODULE_FIRMWARE(api) \
- IWL8000_FW_PRE "-" __stringify(api) ".ucode"
+ IWL8000_FW_PRE __stringify(api) ".ucode"

#define IWL8265_FW_PRE "iwlwifi-8265-"
#define IWL8265_MODULE_FIRMWARE(api) \
--
2.11.0

2017-01-23 11:00:46

by Luciano Coelho

[permalink] [raw]
Subject: Re: [PATCH 0/6] iwlwifi: updates intended for v4.10 2017-01-13

T24gRnJpLCAyMDE3LTAxLTEzIGF0IDE0OjM5ICswMjAwLCBMdWNhIENvZWxobyB3cm90ZToNCj4g
RnJvbTogTHVjYSBDb2VsaG8gPGx1Y2lhbm8uY29lbGhvQGludGVsLmNvbT4NCj4gDQo+IEhpLA0K
PiANCj4gSGVyZSBhcmUgYSBmZXcgZml4ZXMgdGhhdCBJIGludGVuZCB0byBzZW5kIGZvciB2NC4x
MDoNCj4gDQo+ICogZml4IHN1c3BlbmQgZmFpbHVyZSB3aXRoIHVuaWZpZWQgZmlybXdhcmUgaW1h
Z2VzDQo+ICogZml4IGEgcG90ZW50aWFsIGNyYXNoIHdoZW4gZHVtcGluZyBkZWJ1ZyBkYXRhDQo+
ICogZml4IGEgY291cGxlIG9mIG1pc3Rha2VzIGluIEZXIG5hbWVzIGV4cG9ydGVkIGJ5IHRoZSBt
b2R1bGVzDQo+ICogc21hbGwgZml4IGZvciBQUy1Qb2xsIGVuYWJsaW5nIHZpYSBkZWJ1Z2ZzDQo+
ICogZml4IGZvciBkeW5hbWljIHF1ZXVlIGFsbG9jYXRpb24gb2ZmY2hhbm5lbCBkYXRhDQoNCkFz
IGRpc2N1c3NlZCBvbiBJUkMsIGl0IGdvdCBhIGJpdCBsYXRlIGZvciBzb21lIG9mIHRoZXNlIHBh
dGNoZXMgKGR1ZSB0bw0KbXkgdHJpcCBsYXN0IHdlZWspLiAgU28sIGxldCdzIGlnbm9yZSB0aGlz
IGFuZCBJJ2xsIHNlbmQgYSBuZXcgdmVyc2lvbg0Kd2l0aCBsZXNzIHBhdGNoZXMgdG9kYXkuDQoN
Ci0tDQpMdWNhLg==

2017-01-13 12:40:11

by Luca Coelho

[permalink] [raw]
Subject: [PATCH 1/6] iwlwifi: mvm: don't restart HW if suspend fails with unified image

From: Luca Coelho <[email protected]>

For unified images, we shouldn't restart the HW if suspend fails. The
only reason for restarting the HW with non-unified images is to go
back to the D0 image.

Fixes: commit 23ae61282b88 ("iwlwifi: mvm: Do not switch to D3 image on suspend")
Signed-off-by: Luca Coelho <[email protected]>
---
drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
index b88e2048ae0b..207d8ae1e116 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
@@ -1262,12 +1262,15 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw,
iwl_trans_d3_suspend(mvm->trans, test, !unified_image);
out:
if (ret < 0) {
- iwl_mvm_ref(mvm, IWL_MVM_REF_UCODE_DOWN);
- if (mvm->restart_fw > 0) {
- mvm->restart_fw--;
- ieee80211_restart_hw(mvm->hw);
- }
iwl_mvm_free_nd(mvm);
+
+ if (!unified_image) {
+ iwl_mvm_ref(mvm, IWL_MVM_REF_UCODE_DOWN);
+ if (mvm->restart_fw > 0) {
+ mvm->restart_fw--;
+ ieee80211_restart_hw(mvm->hw);
+ }
+ }
}
out_noreset:
mutex_unlock(&mvm->mutex);
--
2.11.0

2017-01-13 14:21:20

by Luciano Coelho

[permalink] [raw]
Subject: Re: [PATCH 1/6] iwlwifi: mvm: don't restart HW if suspend fails with unified image

T24gRnJpLCAyMDE3LTAxLTEzIGF0IDE2OjEzICswMjAwLCBLYWxsZSBWYWxvIHdyb3RlOg0KPiBM
dWNhIENvZWxobyA8bHVjYUBjb2VsaG8uZmk+IHdyaXRlczoNCj4gDQo+ID4gRnJvbTogTHVjYSBD
b2VsaG8gPGx1Y2lhbm8uY29lbGhvQGludGVsLmNvbT4NCj4gPiANCj4gPiBGb3IgdW5pZmllZCBp
bWFnZXMsIHdlIHNob3VsZG4ndCByZXN0YXJ0IHRoZSBIVyBpZiBzdXNwZW5kIGZhaWxzLiAgVGhl
DQo+ID4gb25seSByZWFzb24gZm9yIHJlc3RhcnRpbmcgdGhlIEhXIHdpdGggbm9uLXVuaWZpZWQg
aW1hZ2VzIGlzIHRvIGdvDQo+ID4gYmFjayB0byB0aGUgRDAgaW1hZ2UuDQo+ID4gDQo+ID4gRml4
ZXM6IGNvbW1pdCAyM2FlNjEyODJiODggKCJpd2x3aWZpOiBtdm06IERvIG5vdCBzd2l0Y2ggdG8g
RDMgaW1hZ2Ugb24gc3VzcGVuZCIpDQo+IA0KPiBzL2NvbW1pdCAvLyA6KQ0KDQpBcmdoLCBkaWQg
SSBkbyBpdCBhZ2Fpbj8gSSB3YXMgc3BlY2lmaWNhbGx5IHRyeWluZyB0byByZW1lbWJlciB0aGlz
LCBidXQNCkkgZ3Vlc3MgaXQgd2FzIG5vdCBlbm91Z2guLi4NCg0KLS0NCkx1Y2Eu

2017-01-13 12:40:11

by Luca Coelho

[permalink] [raw]
Subject: [PATCH 5/6] iwlwifi: mvm: fix PS-Poll enablement

From: Emmanuel Grumbach <[email protected]>

We added the uAPSD enabled ACs and that made the
firmware choose to pull frames with uAPSD trigger
frames instead of PS-Poll.
Fix that.

Signed-off-by: Emmanuel Grumbach <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
---
drivers/net/wireless/intel/iwlwifi/mvm/power.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/power.c b/drivers/net/wireless/intel/iwlwifi/mvm/power.c
index af6d10c23e5a..3a8e9379da2f 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/power.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/power.c
@@ -174,6 +174,14 @@ static void iwl_mvm_power_configure_uapsd(struct iwl_mvm *mvm,
enum ieee80211_ac_numbers ac;
bool tid_found = false;

+#ifdef CONFIG_IWLWIFI_DEBUGFS
+ /* set advanced pm flag with no uapsd ACs to enable ps-poll */
+ if (mvmvif->dbgfs_pm.use_ps_poll) {
+ cmd->flags |= cpu_to_le16(POWER_FLAGS_ADVANCE_PM_ENA_MSK);
+ return;
+ }
+#endif
+
for (ac = IEEE80211_AC_VO; ac <= IEEE80211_AC_BK; ac++) {
if (!mvmvif->queue_params[ac].uapsd)
continue;
@@ -204,16 +212,6 @@ static void iwl_mvm_power_configure_uapsd(struct iwl_mvm *mvm,
}
}

- if (!(cmd->flags & cpu_to_le16(POWER_FLAGS_ADVANCE_PM_ENA_MSK))) {
-#ifdef CONFIG_IWLWIFI_DEBUGFS
- /* set advanced pm flag with no uapsd ACs to enable ps-poll */
- if (mvmvif->dbgfs_pm.use_ps_poll)
- cmd->flags |=
- cpu_to_le16(POWER_FLAGS_ADVANCE_PM_ENA_MSK);
-#endif
- return;
- }
-
cmd->flags |= cpu_to_le16(POWER_FLAGS_UAPSD_MISBEHAVING_ENA_MSK);

if (cmd->uapsd_ac_flags == (BIT(IEEE80211_AC_VO) |
--
2.11.0

2017-01-13 12:40:11

by Luca Coelho

[permalink] [raw]
Subject: [PATCH 4/6] iwlwifi: fix MODULE_FIRMWARE for 6030

From: Jürg Billeter <[email protected]>

IWL6000G2B_UCODE_API_MAX is not defined. ucode_api_max of
IWL_DEVICE_6030 uses IWL6000G2_UCODE_API_MAX. Use this also for
MODULE_FIRMWARE.

Fixes: 9d9b21d1b616 ("iwlwifi: remove IWL_*_UCODE_API_OK")
Signed-off-by: Jürg Billeter <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
---
drivers/net/wireless/intel/iwlwifi/iwl-6000.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-6000.c b/drivers/net/wireless/intel/iwlwifi/iwl-6000.c
index 0b9f6a7bc834..39335b7b0c16 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-6000.c
@@ -371,4 +371,4 @@ const struct iwl_cfg iwl6000_3agn_cfg = {
MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));
MODULE_FIRMWARE(IWL6005_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));
-MODULE_FIRMWARE(IWL6030_MODULE_FIRMWARE(IWL6000G2B_UCODE_API_MAX));
+MODULE_FIRMWARE(IWL6030_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));
--
2.11.0

2017-01-13 12:40:11

by Luca Coelho

[permalink] [raw]
Subject: [PATCH 2/6] iwlwifi: mvm: properly check for transport data in dump

From: Johannes Berg <[email protected]>

When copying from vmalloc'ed memory to the SG list, don't crash
if the transport didn't provide any data.

Fixes: 7e62a699aafb ("iwlwifi: mvm: use dev_coredumpsg()")
Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
---
drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c
index 2e8e3e8e30a3..067f67f74698 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c
@@ -816,11 +816,12 @@ void iwl_mvm_fw_error_dump(struct iwl_mvm *mvm)
sg_nents(sg_dump_data),
fw_error_dump->op_mode_ptr,
fw_error_dump->op_mode_len, 0);
- sg_pcopy_from_buffer(sg_dump_data,
- sg_nents(sg_dump_data),
- fw_error_dump->trans_ptr->data,
- fw_error_dump->trans_ptr->len,
- fw_error_dump->op_mode_len);
+ if (fw_error_dump->trans_ptr)
+ sg_pcopy_from_buffer(sg_dump_data,
+ sg_nents(sg_dump_data),
+ fw_error_dump->trans_ptr->data,
+ fw_error_dump->trans_ptr->len,
+ fw_error_dump->op_mode_len);
dev_coredumpsg(mvm->trans->dev, sg_dump_data, file_len,
GFP_KERNEL);
}
--
2.11.0

2017-01-13 14:13:26

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH 1/6] iwlwifi: mvm: don't restart HW if suspend fails with unified image

Luca Coelho <[email protected]> writes:

> From: Luca Coelho <[email protected]>
>
> For unified images, we shouldn't restart the HW if suspend fails. The
> only reason for restarting the HW with non-unified images is to go
> back to the D0 image.
>
> Fixes: commit 23ae61282b88 ("iwlwifi: mvm: Do not switch to D3 image on suspend")

s/commit // :)

--
Kalle Valo