Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH 01/20] iwlwifi: lib: Use struct_size() helper
From: Luca Coelho @ 2019-06-28  9:19 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, Gustavo A. R. Silva, Luca Coelho
In-Reply-To: <20190628092008.11049-1-luca@coelho.fi>

From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>

Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes, in particular in the
context in which this code is being used.

So, change the following form:

sizeof(*pattern_cmd) +
               wowlan->n_patterns * sizeof(struct iwlagn_wowlan_pattern)

 to :

struct_size(pattern_cmd, patterns, wowlan->n_patterns)

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/dvm/lib.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/lib.c b/drivers/net/wireless/intel/iwlwifi/dvm/lib.c
index b2f172d4f78a..cae9cd438697 100644
--- a/drivers/net/wireless/intel/iwlwifi/dvm/lib.c
+++ b/drivers/net/wireless/intel/iwlwifi/dvm/lib.c
@@ -1022,8 +1022,7 @@ int iwlagn_send_patterns(struct iwl_priv *priv,
 	if (!wowlan->n_patterns)
 		return 0;
 
-	cmd.len[0] = sizeof(*pattern_cmd) +
-		wowlan->n_patterns * sizeof(struct iwlagn_wowlan_pattern);
+	cmd.len[0] = struct_size(pattern_cmd, patterns, wowlan->n_patterns);
 
 	pattern_cmd = kmalloc(cmd.len[0], GFP_KERNEL);
 	if (!pattern_cmd)
-- 
2.20.1


^ permalink raw reply related

* [PATCH 02/20] iwlwifi: d3: Use struct_size() helper
From: Luca Coelho @ 2019-06-28  9:19 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, Gustavo A. R. Silva, Luca Coelho
In-Reply-To: <20190628092008.11049-1-luca@coelho.fi>

From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>

Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes, in particular in the
context in which this code is being used.

So, change the following form:

sizeof(*pattern_cmd) +
               wowlan->n_patterns * sizeof(struct iwlagn_wowlan_pattern)

 to :

struct_size(pattern_cmd, patterns, wowlan->n_patterns)

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
index 60f5d337f16d..363fd6127bb6 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
@@ -398,8 +398,7 @@ static int iwl_mvm_send_patterns_v1(struct iwl_mvm *mvm,
 	if (!wowlan->n_patterns)
 		return 0;
 
-	cmd.len[0] = sizeof(*pattern_cmd) +
-		wowlan->n_patterns * sizeof(struct iwl_wowlan_pattern_v1);
+	cmd.len[0] = struct_size(pattern_cmd, patterns, wowlan->n_patterns);
 
 	pattern_cmd = kmalloc(cmd.len[0], GFP_KERNEL);
 	if (!pattern_cmd)
-- 
2.20.1


^ permalink raw reply related

* [PATCH 00/20] iwlwifi: updates intended for v5.3 2019-06-28
From: Luca Coelho @ 2019-06-28  9:19 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, Luca Coelho

From: Luca Coelho <luciano.coelho@intel.com>

Hi,

Here's the second set of patches intended for v5.3.  It's the usual
development, new features, cleanups and bugfixes.

The changes are:

* Special SAR implementation for South Korea;
* Fixes in the module init error paths;
* Debugging infra work continues;
* A few clean-ups;
* Other small fixes and improvements;

As usual, I'm pushing this to a pending branch, for kbuild bot, and
will send a pull-request later.

Please review.

Cheers,
Luca.


Andrei Otcheretianski (1):
  iwlwifi: mvm: Drop large non sta frames

Dan Carpenter (1):
  iwlwifi: remove some unnecessary NULL checks

Emmanuel Grumbach (2):
  iwlwifi: support FSEQ TLV even when FMAC is not compiled
  iwlwifi: mvm: make the usage of TWT configurable

Gustavo A. R. Silva (2):
  iwlwifi: lib: Use struct_size() helper
  iwlwifi: d3: Use struct_size() helper

Haim Dreyfuss (2):
  iwlwifi: Add support for SAR South Korea limitation
  iwlwifi: mvm: Add log information about SAR status

Johannes Berg (1):
  iwlwifi: fix module init error paths

Luca Coelho (2):
  iwlwifi: pcie: increase the size of PCI dumps
  iwlwifi: mvm: remove MAC_FILTER_IN_11AX for AP mode

Naftali Goldstein (1):
  iwlwifi: mvm: correctly fill the ac array in the iwl_mac_ctx_cmd

Shahar S Matityahu (7):
  iwlwifi: dbg: fix debug monitor stop and restart delays
  iwlwifi: dbg_ini: enforce apply point early on buffer allocation tlv
  iwlwifi: dbg_ini: remove redundant checking of ini mode
  iwlwifi: dbg: move trans debug fields to a separate struct
  iwlwifi: dbg_ini: fix debug monitor stop and restart in ini mode
  iwlwifi: dbg: don't stop dbg recording before entering D3 from 9000
    devices
  iwlwifi: dbg: debug recording stop and restart command remove

Shaul Triebitz (1):
  iwlwifi: mvm: convert to FW AC when configuring MU EDCA

 drivers/net/wireless/intel/iwlwifi/dvm/lib.c  |   3 +-
 drivers/net/wireless/intel/iwlwifi/fw/acpi.c  |  28 +--
 drivers/net/wireless/intel/iwlwifi/fw/acpi.h  |   5 +-
 .../net/wireless/intel/iwlwifi/fw/api/power.h |  12 ++
 drivers/net/wireless/intel/iwlwifi/fw/dbg.c   | 100 ++++++-----
 drivers/net/wireless/intel/iwlwifi/fw/dbg.h   |  93 +++++-----
 drivers/net/wireless/intel/iwlwifi/fw/file.h  |   3 +
 .../net/wireless/intel/iwlwifi/iwl-dbg-tlv.c  |  32 ++--
 drivers/net/wireless/intel/iwlwifi/iwl-drv.c  |  34 +++-
 .../net/wireless/intel/iwlwifi/iwl-trans.h    |  75 ++++----
 .../wireless/intel/iwlwifi/mvm/constants.h    |   1 +
 drivers/net/wireless/intel/iwlwifi/mvm/d3.c   |  14 +-
 drivers/net/wireless/intel/iwlwifi/mvm/fw.c   |  62 +++++--
 .../net/wireless/intel/iwlwifi/mvm/mac-ctxt.c |  16 +-
 .../net/wireless/intel/iwlwifi/mvm/mac80211.c |  11 +-
 drivers/net/wireless/intel/iwlwifi/mvm/mvm.h  |   2 +
 drivers/net/wireless/intel/iwlwifi/mvm/nvm.c  |   9 +
 drivers/net/wireless/intel/iwlwifi/mvm/ops.c  |  10 +-
 .../net/wireless/intel/iwlwifi/mvm/rs-fw.c    |  23 ++-
 drivers/net/wireless/intel/iwlwifi/mvm/tx.c   |   3 +
 .../net/wireless/intel/iwlwifi/mvm/utils.c    |  20 ++-
 .../intel/iwlwifi/pcie/ctxt-info-gen3.c       |   8 +-
 .../wireless/intel/iwlwifi/pcie/internal.h    |   2 +-
 drivers/net/wireless/intel/iwlwifi/pcie/rx.c  |   2 +-
 .../wireless/intel/iwlwifi/pcie/trans-gen2.c  |   2 +-
 .../net/wireless/intel/iwlwifi/pcie/trans.c   | 166 +++++++++---------
 26 files changed, 433 insertions(+), 303 deletions(-)

-- 
2.20.1


^ permalink raw reply

* [PATCH] ath10k: check data ack rssi enabled/disabled in htt rx event
From: Balaji Pothunoori @ 2019-06-28  7:31 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Abhishek Ambure, Balaji Pothunoori

From: Abhishek Ambure <aambure@codeaurora.org>

For all data packets trasmmited, host gets htt tx completion event.

QCA9984 firmware gives data ack rssi values to host through
htt event of data tx completion. Data ack rssi values are valid
if A0 bit is set in HTT rx message.

Tested HW: QCA9984
Tested FW: 10.4-3.9.0.2-00044

Signed-off-by: Abhishek Ambure <aambure@codeaurora.org>
Signed-off-by: Balaji Pothunoori <bpothuno@codeaurora.org>
---
 drivers/net/wireless/ath/ath10k/hw.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/ath/ath10k/hw.c b/drivers/net/wireless/ath/ath10k/hw.c
index ad082b7..303f17d 100644
--- a/drivers/net/wireless/ath/ath10k/hw.c
+++ b/drivers/net/wireless/ath/ath10k/hw.c
@@ -1145,6 +1145,7 @@ static bool ath10k_qca99x0_rx_desc_msdu_limit_error(struct htt_rx_desc *rxd)
 const struct ath10k_hw_ops qca99x0_ops = {
 	.rx_desc_get_l3_pad_bytes = ath10k_qca99x0_rx_desc_get_l3_pad_bytes,
 	.rx_desc_get_msdu_limit_error = ath10k_qca99x0_rx_desc_msdu_limit_error,
+	.is_rssi_enable = ath10k_htt_tx_rssi_enable,
 };
 
 const struct ath10k_hw_ops qca6174_ops = {
-- 
2.7.4


^ permalink raw reply related

* pull-request: wireless-drivers 2019-06-28
From: Kalle Valo @ 2019-06-28  7:18 UTC (permalink / raw)
  To: David Miller; +Cc: linux-wireless, netdev, linux-kernel

Hi Dave,

here's a pull request to net tree for 5.2, more info below. Please let
me know if there are any problems.

Kalle

The following changes since commit c356dc4b540edd6c02b409dd8cf3208ba2804c38:

  Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (2019-06-21 22:23:35 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.git tags/wireless-drivers-for-davem-2019-06-28

for you to fetch changes up to 2a92b08b18553c101115423bd34963b1a59a45a3:

  mt76: usb: fix rx A-MSDU support (2019-06-27 19:48:36 +0300)

----------------------------------------------------------------
wireless-drivers fixes for 5.2

Hopefully the last set of fixes for 5.2. Nothing special this around,
only small fixes and support for new cards.

iwlwifi

* add new cards for 22000 series and smaller fixes

wl18xx

* fix a clang warning about unused variables

mwifiex

* properly handle small vendor IEs (a regression from the recent
  security fix)

ath

* fix few SPDX tags

mt76

* fix A-MSDU aggregation which got broken in v5.2-rc1

----------------------------------------------------------------
Brian Norris (1):
      mwifiex: Don't abort on small, spec-compliant vendor IEs

Ihab Zhaika (3):
      iwlwifi: add new cards for 22000 and fix struct name
      iwlwifi: add new cards for 22000 and change wrong structs
      iwlwifi: change 0x02F0 fw from qu to quz

Kalle Valo (1):
      ath: fix SPDX tags

Lorenzo Bianconi (1):
      mt76: usb: fix rx A-MSDU support

Nathan Huckleberry (1):
      wl18xx: Fix Wunused-const-variable

Oren Givon (1):
      iwlwifi: add support for hr1 RF ID

 drivers/net/wireless/ath/Kconfig                 |   2 +-
 drivers/net/wireless/ath/Makefile                |   2 +-
 drivers/net/wireless/ath/ar5523/Kconfig          |   2 +-
 drivers/net/wireless/ath/ar5523/Makefile         |   2 +-
 drivers/net/wireless/ath/ath10k/Kconfig          |   2 +-
 drivers/net/wireless/ath/ath5k/Kconfig           |   2 +-
 drivers/net/wireless/ath/ath5k/Makefile          |   2 +-
 drivers/net/wireless/ath/ath6kl/Kconfig          |   2 +-
 drivers/net/wireless/ath/ath6kl/trace.h          |   2 +-
 drivers/net/wireless/ath/ath9k/Kconfig           |   2 +-
 drivers/net/wireless/ath/ath9k/Makefile          |   2 +-
 drivers/net/wireless/ath/wcn36xx/Kconfig         |   2 +-
 drivers/net/wireless/ath/wcn36xx/Makefile        |   2 +-
 drivers/net/wireless/ath/wil6210/Kconfig         |   2 +-
 drivers/net/wireless/ath/wil6210/Makefile        |   2 +-
 drivers/net/wireless/intel/iwlwifi/cfg/22000.c   | 144 +++++++++++++-
 drivers/net/wireless/intel/iwlwifi/iwl-config.h  |  14 +-
 drivers/net/wireless/intel/iwlwifi/iwl-csr.h     |   1 +
 drivers/net/wireless/intel/iwlwifi/pcie/drv.c    | 241 ++++++++++++-----------
 drivers/net/wireless/intel/iwlwifi/pcie/trans.c  |  17 +-
 drivers/net/wireless/marvell/mwifiex/fw.h        |  12 +-
 drivers/net/wireless/marvell/mwifiex/scan.c      |  18 +-
 drivers/net/wireless/marvell/mwifiex/sta_ioctl.c |   4 +-
 drivers/net/wireless/marvell/mwifiex/wmm.c       |   2 +-
 drivers/net/wireless/mediatek/mt76/mt76.h        |   1 +
 drivers/net/wireless/mediatek/mt76/usb.c         |  46 ++++-
 drivers/net/wireless/ti/wl18xx/main.c            |  38 ----
 27 files changed, 364 insertions(+), 204 deletions(-)

^ permalink raw reply

* Re: [PATCH 2/2] ath10k: pci: remove unnecessary casts
From: Kalle Valo @ 2019-06-28  5:08 UTC (permalink / raw)
  To: Johannes Berg; +Cc: ath10k, linux-wireless
In-Reply-To: <a6c87741bc3e992bf61d2706834e069917018745.camel@sipsolutions.net>

Johannes Berg <johannes@sipsolutions.net> writes:

> On Thu, 2019-06-27 at 21:12 +0200, Johannes Berg wrote:
>> On Thu, 2019-06-27 at 21:47 +0300, Kalle Valo wrote:
>> > Fixes checkpatch warnings:
>> > 
>> > drivers/net/wireless/ath/ath10k/pci.c:926: unnecessary cast may
>> > hide bugs, see http://c-faq.com/malloc/ma
>> > drivers/net/wireless/ath/ath10k/pci.c:1072: unnecessary cast may
>> > hide bugs, see http://c-faq.com/malloc/m
>> 
>> I think you cut off the link there, did you mean
>> http://c-faq.com/malloc/mallocnocast.html perhaps?

Yes, thanks. Fixed now in the pending branch.

> Which I should've read before replying ... WHAT? We consider calling
> undeclared functions an *error* in the kernel, this is quite pointless.

Yeah, the link checkpatch provides is pointless. TBH I didn't even read
it until you commented on it :) But the patch is still good to have as
there's no point of use casting on void pointers, it's just extra cruft.
Right?

-- 
Kalle Valo

^ permalink raw reply

* Re: [PATCH 2/2] ath10k: pci: remove unnecessary casts
From: Johannes Berg @ 2019-06-27 19:15 UTC (permalink / raw)
  To: Kalle Valo, ath10k; +Cc: linux-wireless
In-Reply-To: <58e8952b87c8aa533c15fe5650f3f71288377f36.camel@sipsolutions.net>

On Thu, 2019-06-27 at 21:12 +0200, Johannes Berg wrote:
> On Thu, 2019-06-27 at 21:47 +0300, Kalle Valo wrote:
> > Fixes checkpatch warnings:
> > 
> > drivers/net/wireless/ath/ath10k/pci.c:926: unnecessary cast may hide bugs, see http://c-faq.com/malloc/ma
> > drivers/net/wireless/ath/ath10k/pci.c:1072: unnecessary cast may hide bugs, see http://c-faq.com/malloc/m
> 
> I think you cut off the link there, did you mean
> http://c-faq.com/malloc/mallocnocast.html perhaps?

Which I should've read before replying ... WHAT? We consider calling
undeclared functions an *error* in the kernel, this is quite pointless.

johannes


^ permalink raw reply

* Re: [PATCH 2/2] ath10k: pci: remove unnecessary casts
From: Johannes Berg @ 2019-06-27 19:12 UTC (permalink / raw)
  To: Kalle Valo, ath10k; +Cc: linux-wireless
In-Reply-To: <1561661250-30528-2-git-send-email-kvalo@codeaurora.org>

On Thu, 2019-06-27 at 21:47 +0300, Kalle Valo wrote:
> Fixes checkpatch warnings:
> 
> drivers/net/wireless/ath/ath10k/pci.c:926: unnecessary cast may hide bugs, see http://c-faq.com/malloc/ma
> drivers/net/wireless/ath/ath10k/pci.c:1072: unnecessary cast may hide bugs, see http://c-faq.com/malloc/m

I think you cut off the link there, did you mean
http://c-faq.com/malloc/mallocnocast.html perhaps?

johannes


^ permalink raw reply

* [PATCH 2/2] ath10k: pci: remove unnecessary casts
From: Kalle Valo @ 2019-06-27 18:47 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless
In-Reply-To: <1561661250-30528-1-git-send-email-kvalo@codeaurora.org>

Fixes checkpatch warnings:

drivers/net/wireless/ath/ath10k/pci.c:926: unnecessary cast may hide bugs, see http://c-faq.com/malloc/ma
drivers/net/wireless/ath/ath10k/pci.c:1072: unnecessary cast may hide bugs, see http://c-faq.com/malloc/m

While at it, also remove unnecessary initialisation of data_buf variable in both cases.

Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
---
 drivers/net/wireless/ath/ath10k/pci.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index 80bcb2ef5926..a0b4d265c6eb 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -909,7 +909,7 @@ static int ath10k_pci_diag_read_mem(struct ath10k *ar, u32 address, void *data,
 	/* Host buffer address in CE space */
 	u32 ce_data;
 	dma_addr_t ce_data_base = 0;
-	void *data_buf = NULL;
+	void *data_buf;
 	int i;
 
 	mutex_lock(&ar_pci->ce_diag_mutex);
@@ -923,10 +923,8 @@ static int ath10k_pci_diag_read_mem(struct ath10k *ar, u32 address, void *data,
 	 */
 	alloc_nbytes = min_t(unsigned int, nbytes, DIAG_TRANSFER_LIMIT);
 
-	data_buf = (unsigned char *)dma_alloc_coherent(ar->dev, alloc_nbytes,
-						       &ce_data_base,
-						       GFP_ATOMIC);
-
+	data_buf = dma_alloc_coherent(ar->dev, alloc_nbytes, &ce_data_base,
+				      GFP_ATOMIC);
 	if (!data_buf) {
 		ret = -ENOMEM;
 		goto done;
@@ -1054,7 +1052,7 @@ int ath10k_pci_diag_write_mem(struct ath10k *ar, u32 address,
 	u32 *buf;
 	unsigned int completed_nbytes, alloc_nbytes, remaining_bytes;
 	struct ath10k_ce_pipe *ce_diag;
-	void *data_buf = NULL;
+	void *data_buf;
 	dma_addr_t ce_data_base = 0;
 	int i;
 
@@ -1069,10 +1067,8 @@ int ath10k_pci_diag_write_mem(struct ath10k *ar, u32 address,
 	 */
 	alloc_nbytes = min_t(unsigned int, nbytes, DIAG_TRANSFER_LIMIT);
 
-	data_buf = (unsigned char *)dma_alloc_coherent(ar->dev,
-						       alloc_nbytes,
-						       &ce_data_base,
-						       GFP_ATOMIC);
+	data_buf = dma_alloc_coherent(ar->dev, alloc_nbytes, &ce_data_base,
+				      GFP_ATOMIC);
 	if (!data_buf) {
 		ret = -ENOMEM;
 		goto done;
-- 
2.7.4


^ permalink raw reply related

* [PATCH 1/2] ath10k: remove unnecessary 'out of memory' message
From: Kalle Valo @ 2019-06-27 18:47 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless

Fixes checkpatch warning:

drivers/net/wireless/ath/ath10k/swap.c:110: Possible unnecessary 'out of memory' message

Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
---
 drivers/net/wireless/ath/ath10k/swap.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/swap.c b/drivers/net/wireless/ath/ath10k/swap.c
index 4dddeee684b4..7198a386f2fb 100644
--- a/drivers/net/wireless/ath/ath10k/swap.c
+++ b/drivers/net/wireless/ath/ath10k/swap.c
@@ -106,10 +106,8 @@ ath10k_swap_code_seg_alloc(struct ath10k *ar, size_t swap_bin_len)
 
 	virt_addr = dma_alloc_coherent(ar->dev, swap_bin_len, &paddr,
 				       GFP_KERNEL);
-	if (!virt_addr) {
-		ath10k_err(ar, "failed to allocate dma coherent memory\n");
+	if (!virt_addr)
 		return NULL;
-	}
 
 	seg_info->seg_hw_info.bus_addr[0] = __cpu_to_le32(paddr);
 	seg_info->seg_hw_info.size = __cpu_to_le32(swap_bin_len);
-- 
2.7.4


^ permalink raw reply related

* Re: [PATCH v3] ath9k: add loader for AR92XX (and older) pci(e)
From: Kalle Valo @ 2019-06-27 18:13 UTC (permalink / raw)
  To: Christian Lamparter; +Cc: linux-wireless, QCA ath9k Development, Julian Calaby
In-Reply-To: <20190609203621.13015-1-chunkeey@gmail.com>

Christian Lamparter <chunkeey@gmail.com> writes:

> Atheros cards with a AR92XX generation (and older) chip usually
> store their pci(e) initialization vectors on an external eeprom chip.
> However these chips technically don't need the eeprom chip attached,
> the AR9280 Datasheet in section "6.1.2 DEVICE_ID" describes that
> "... if the EEPROM content is not valid, a value of 0xFF1C returns
> when read from the register". So, they will show up on the system's
> pci bus. However in that state, ath9k can't load, since it relies
> on having the correct pci-id, otherwise it doesn't know what chip it
> actually is. This happens on many embedded devices like routers
> and accesspoint since they want to keep the BOM low and store the
> pci(e) initialization vectors together with the calibration data
> on the system's FLASH, which is out of reach of the ath9k chip.
>
> Furthermore, Some devices (like the Cisco Meraki Z1 Cloud Managed
> Teleworker Gateway) need to be able to initialize the PCIe wifi device.
> Normally, this should be done as a pci quirk during the early stages of
> booting linux. However, this isn't possible for devices which have the
> init code for the Atheros chip stored on NAND in an UBI volume.
> Hence, this module can be used to initialize the chip when the
> user-space is ready to extract the init code.
>
> Martin Blumenstingl prodived the following fixes:
> owl-loader: add support for OWL emulation PCI devices
> owl-loader: don't re-scan the bus when ath9k_pci_fixup failed
> owl-loader: use dev_* instead of pr_* logging functions
> owl-loader: auto-generate the eeprom filename as fallback
> owl-loader: add a debug message when swapping the eeprom data
> owl-loader: add missing newlines in log messages
>
> Reviewed-by: Julian Calaby <julian.calaby@gmail.com>
> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

[...]

> --- /dev/null
> +++ b/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c
> @@ -0,0 +1,215 @@
> +// SPDX-License-Identifier: GPL-2.0

[...]

> +MODULE_LICENSE("GPL v2");

ath9k has ISC license, is there a specific reason why you chose GPLv2
here instead of ISC? I don't like mixing licenses within a driver,
that's why I'm asking.

-- 
Kalle Valo

^ permalink raw reply

* Re: [PATCH] ath10k: add new hw_ops for sdio chip
From: Kalle Valo @ 2019-06-27 17:59 UTC (permalink / raw)
  To: Wen Gong; +Cc: ath10k, linux-wireless
In-Reply-To: <1560757048-19223-1-git-send-email-wgong@codeaurora.org>

Wen Gong <wgong@codeaurora.org> wrote:

> It report error message while suspend/resume test.
> dmesg log:
> [  150.749962] ath10k_sdio mmc1:0001:1: hif read32 not supported
> [  150.755728] ath10k_sdio mmc1:0001:1: failed to set coverage class: expected integer microsecond value in register
> 
> Reason is sdio chip does not support set_coverage_class as well as
> pcie chip, remove the set_coverage_class handler will avoid it.
> 
> callstack of the error message:
> OUTLINED_FUNCTION_6+0xc/0x14 [ath10k_core]
> ath10k_mac_op_set_coverage_class+0x2c/0x40 [ath10k_core]
> ieee80211_reconfig+0x5d0/0x108c [mac80211]
> ieee80211_resume+0x34/0x6c [mac80211]
> wiphy_resume+0xbc/0x13c [cfg80211]
> dpm_run_callback+0xa4/0x168
> device_resume+0x1d4/0x200
> async_resume+0x1c/0x34
> async_run_entry_fn+0x48/0xf8
> process_one_work+0x178/0x2f8
> worker_thread+0x1d8/0x2cc
> kthread+0x11c/0x12c
> ret_from_fork+0x10/0x18
> 
> the error log will not happen after this patch applied.
> 
> Tested with QCA6174 SDIO with firmware
> WLAN.RMH.4.4.1-00007-QCARMSWP-1.
> 
> Signed-off-by: Wen Gong <wgong@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

6b4021deb03f ath10k: add new hw_ops for sdio chip

-- 
https://patchwork.kernel.org/patch/10998099/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply

* Re: [PATCH 01/11] wil6210: do not reset FW in STA to P2P client interface switch
From: Kalle Valo @ 2019-06-27 17:51 UTC (permalink / raw)
  To: Maya Erez; +Cc: Alexei Avshalom Lazar, linux-wireless, wil6210, Maya Erez
In-Reply-To: <1560669967-23706-2-git-send-email-merez@codeaurora.org>

Maya Erez <merez@codeaurora.org> wrote:

> Currently the FW is reset on every interface type change, because
> of various FW bugs.
> FW reset is not required when switching from STA to P2P client, hence
> can be skipped.
> 
> Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
> Signed-off-by: Maya Erez <merez@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

11 patches applied to ath-next branch of ath.git, thanks.

b913e33076c8 wil6210: do not reset FW in STA to P2P client interface switch
c903ece596cb wil6210: enlarge Tx status ring size
96b77bb04470 wil6210: increase the frequency of status ring hw tail update
c5b3a6582b1e wil6210: Add support for setting RBUFCAP configuration
dedec35b4019 wil6210: fix printout in wil_read_pmccfg
f2b6b46e483b wil6210: clear FW and ucode log address
c478ac9daae6 wil6210: update cid boundary check of wil_find_cid/_by_idx()
3e7ee09d36a6 wil6210: publish max_msdu_size to FW on BCAST ring
9b586118730e wil6210: add support for reading multiple RFs temperature via debugfs
2a32c20b76af wil6210: set WIL_WMI_CALL_GENERAL_TO_MS as wmi_call timeout
1a276003111c wil6210: drop old event after wmi_call timeout

-- 
https://patchwork.kernel.org/patch/10997287/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply

* Re: [PATCH] wireless: wil6210: no need to check return value of debugfs_create functions
From: Kalle Valo @ 2019-06-27 17:48 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Maya Erez, David S. Miller, linux-wireless, wil6210
In-Reply-To: <20190611191024.GA17227@kroah.com>

Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:

> When calling debugfs functions, there is no need to ever check the
> return value.  The function can work or not, but the code logic should
> never do something different based on this.
> 
> Cc: Maya Erez <merez@codeaurora.org>
> Cc: Kalle Valo <kvalo@codeaurora.org>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: linux-wireless@vger.kernel.org
> Cc: wil6210@qti.qualcomm.com
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Reviewed-by: Maya Erez <merez@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

ce564170dfe5 wil6210: no need to check return value of debugfs_create functions

-- 
https://patchwork.kernel.org/patch/10988197/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply

* Re: [PATCH] carl9170: remove dead branch in op_conf_tx callback
From: Kalle Valo @ 2019-06-27 17:48 UTC (permalink / raw)
  To: Christian Lamparter; +Cc: linux-wireless
In-Reply-To: <20190615100009.14654-1-chunkeey@gmail.com>

Christian Lamparter <chunkeey@gmail.com> wrote:

> This patch removes the error branch for (queue > ar->hw->queues).
> It is no longer needed anymore as the "queue" value is validated by
> cfg80211's parse_txq_params() before the driver code gets called.
> 
> Some background:
> In the old days (linux 2.6 and early 3.x), the parse_txq_params()
> function did not verify the "queue" value. That's why these drivers
> had to do it.
> 
> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

4ba641262b91 carl9170: remove dead branch in op_conf_tx callback

-- 
https://patchwork.kernel.org/patch/10997023/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply

* Re: [PATCH v2] carl9170: fix misuse of device driver API
From: Kalle Valo @ 2019-06-27 17:47 UTC (permalink / raw)
  To: Christian Lamparter; +Cc: linux-wireless, linux-usb, Alan Stern
In-Reply-To: <20190608144947.744-3-chunkeey@gmail.com>

Christian Lamparter <chunkeey@gmail.com> wrote:

> This patch follows Alan Stern's recent patch:
> "p54: Fix race between disconnect and firmware loading"
> 
> that overhauled carl9170 buggy firmware loading and driver
> unbinding procedures.
> 
> Since the carl9170 code was adapted from p54 it uses the
> same functions and is likely to have the same problem, but
> it's just that the syzbot hasn't reproduce them (yet).
> 
> a summary from the changes (copied from the p54 patch):
>  * Call usb_driver_release_interface() rather than
>    device_release_driver().
> 
>  * Lock udev (the interface's parent) before unbinding the
>    driver instead of locking udev->parent.
> 
>  * During the firmware loading process, take a reference
>    to the USB interface instead of the USB device.
> 
>  * Don't take an unnecessary reference to the device during
>    probe (and then don't drop it during disconnect).
> 
> and
> 
>  * Make sure to prevent use-after-free bugs by explicitly
>    setting the driver context to NULL after signaling the
>    completion.
> 
> Cc: <stable@vger.kernel.org>
> Cc: Alan Stern <stern@rowland.harvard.edu>
> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
> Acked-by: Alan Stern <stern@rowland.harvard.edu>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

feb09b293327 carl9170: fix misuse of device driver API

-- 
https://patchwork.kernel.org/patch/10983223/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply

* [PATCH 76/87] wireless: quantenna: pcie: remove memset after dmam_alloc_coherent
From: Fuqian Huang @ 2019-06-27 17:46 UTC (permalink / raw)
  Cc: Fuqian Huang, Igor Mitsyanko, Avinash Patil, Sergey Matyukevich,
	Kalle Valo, David S. Miller, Andrey Shevchenko, linux-wireless,
	netdev, linux-kernel

In commit af7ddd8a627c
("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"),
dmam_alloc_coherent has already zeroed the memory.
So memset is not needed.

Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>
---
 drivers/net/wireless/quantenna/qtnfmac/pcie/pearl_pcie.c | 2 --
 drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c | 2 --
 2 files changed, 4 deletions(-)

diff --git a/drivers/net/wireless/quantenna/qtnfmac/pcie/pearl_pcie.c b/drivers/net/wireless/quantenna/qtnfmac/pcie/pearl_pcie.c
index 3aa3714d4dfd..5ec1c9bc1612 100644
--- a/drivers/net/wireless/quantenna/qtnfmac/pcie/pearl_pcie.c
+++ b/drivers/net/wireless/quantenna/qtnfmac/pcie/pearl_pcie.c
@@ -244,8 +244,6 @@ static int pearl_alloc_bd_table(struct qtnf_pcie_pearl_state *ps)
 
 	/* tx bd */
 
-	memset(vaddr, 0, len);
-
 	ps->bd_table_vaddr = vaddr;
 	ps->bd_table_paddr = paddr;
 	ps->bd_table_len = len;
diff --git a/drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c b/drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
index 9a4380ed7f1b..1f91088e3dff 100644
--- a/drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
+++ b/drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
@@ -199,8 +199,6 @@ static int topaz_alloc_bd_table(struct qtnf_pcie_topaz_state *ts,
 	if (!vaddr)
 		return -ENOMEM;
 
-	memset(vaddr, 0, len);
-
 	/* tx bd */
 
 	ts->tx_bd_vbase = vaddr;
-- 
2.11.0


^ permalink raw reply related

* Re: [PATCH v2] ath9k: correctly handle short radar pulses (fixes 3c0efb745a)
From: Kalle Valo @ 2019-06-27 17:46 UTC (permalink / raw)
  To: Zefir Kurtisi; +Cc: linux-wireless, nbd
In-Reply-To: <20190611133656.16964-1-zefir.kurtisi@neratec.com>

Zefir Kurtisi <zefir.kurtisi@neratec.com> wrote:

> In commit 3c0efb745a17 ("ath9k: discard undersized packets")
> the lower bound of RX packets was set to 10 (min ACK size) to
> filter those that would otherwise be treated as invalid at
> mac80211.
> 
> Alas, short radar pulses are reported as PHY_ERROR frames
> with length set to 3. Therefore their detection stopped
> working after that commit.
> 
> NOTE: ath9k drivers built thereafter will not pass DFS
> certification.
> 
> This extends the criteria for short packets to explicitly
> handle PHY_ERROR frames.
> 
> Fixes: 3c0efb745a17 ("ath9k: discard undersized packets")
> Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

df5c4150501e ath9k: correctly handle short radar pulses

-- 
https://patchwork.kernel.org/patch/10986957/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply

* [PATCH 77/87] wireless: broadcom: remove memset after dma_alloc_coherent
From: Fuqian Huang @ 2019-06-27 17:45 UTC (permalink / raw)
  Cc: Fuqian Huang, Arend van Spriel, Franky Lin, Hante Meuleman,
	Chi-Hsien Lin, Wright Feng, Kalle Valo, David S. Miller,
	Rafał Miłecki, Hans de Goede, Luis Chamberlain,
	linux-wireless, brcm80211-dev-list.pdl, brcm80211-dev-list,
	netdev, linux-kernel

In commit af7ddd8a627c
("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"),
dma_alloc_coherent has already zeroed the memory.
So memset is not needed.

Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
index 83e4938527f4..3fc08fe7c3a2 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
@@ -1033,8 +1033,6 @@ brcmf_pcie_init_dmabuffer_for_device(struct brcmf_pciedev_info *devinfo,
 			       address & 0xffffffff);
 	brcmf_pcie_write_tcm32(devinfo, tcm_dma_phys_addr + 4, address >> 32);
 
-	memset(ring, 0, size);
-
 	return (ring);
 }
 
-- 
2.11.0


^ permalink raw reply related

* [PATCH 78/87] wireless: ath10k: remove memset after dma_alloc_coherent
From: Fuqian Huang @ 2019-06-27 17:45 UTC (permalink / raw)
  Cc: Fuqian Huang, Kalle Valo, David S. Miller, ath10k, linux-wireless,
	netdev, linux-kernel

In commit af7ddd8a627c
("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"),
dma_alloc_coherent has already zeroed the memory.
So memset is not needed.

Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>
---
 drivers/net/wireless/ath/ath10k/ce.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c
index eca87f7c5b6c..294fbc1e89ab 100644
--- a/drivers/net/wireless/ath/ath10k/ce.c
+++ b/drivers/net/wireless/ath/ath10k/ce.c
@@ -1704,9 +1704,6 @@ ath10k_ce_alloc_dest_ring_64(struct ath10k *ar, unsigned int ce_id,
 	/* Correctly initialize memory to 0 to prevent garbage
 	 * data crashing system when download firmware
 	 */
-	memset(dest_ring->base_addr_owner_space_unaligned, 0,
-	       nentries * sizeof(struct ce_desc_64) + CE_DESC_RING_ALIGN);
-
 	dest_ring->base_addr_owner_space =
 			PTR_ALIGN(dest_ring->base_addr_owner_space_unaligned,
 				  CE_DESC_RING_ALIGN);
@@ -2019,8 +2016,6 @@ void ath10k_ce_alloc_rri(struct ath10k *ar)
 		value |= ar->hw_ce_regs->upd->mask;
 		ath10k_ce_write32(ar, ce_base_addr + ctrl1_regs, value);
 	}
-
-	memset(ce->vaddr_rri, 0, CE_COUNT * sizeof(u32));
 }
 EXPORT_SYMBOL(ath10k_ce_alloc_rri);
 
-- 
2.11.0


^ permalink raw reply related

* Re: [PATCH 01/11] rtw88: resolve order of tx power setting routines
From: Kalle Valo @ 2019-06-27 17:27 UTC (permalink / raw)
  To: yhchuang; +Cc: linux-wireless
In-Reply-To: <1559116487-5244-2-git-send-email-yhchuang@realtek.com>

<yhchuang@realtek.com> wrote:

> From: Yan-Hsuan Chuang <yhchuang@realtek.com>
> 
> Some functions that should be static are unnecessarily exposed, remove
> their declaration in header file phy.h.
> 
> After resolving their declaration order, they can be declared as static.
> So this commit changes nothing except the order and marking them static.
> 
> Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>

10 patches applied to wireless-drivers-next.git, thanks.

fa6dfe6bff24 rtw88: resolve order of tx power setting routines
226746fd1201 rtw88: do not use (void *) as argument
43712199e05b rtw88: unify prefixes for tx power setting routine
522801493e7b rtw88: remove unused variable
764038160aea rtw88: fix incorrect tx power limit at 5G
adf3c676d1d2 rtw88: choose the lowest as world-wide power limit
93f68a865f11 rtw88: correct power limit selection
191c4257ba19 rtw88: update tx power limit table to RF v20
0d350f0a91f2 rtw88: remove all RTW_MAX_POWER_INDEX macro
b741422218ef rtw88: refine flow to get tx power index

-- 
https://patchwork.kernel.org/patch/10966415/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply

* Re: [PATCH v2 1/2] mwifiex: dispatch/rotate from reorder table atomically
From: Kalle Valo @ 2019-06-27 16:51 UTC (permalink / raw)
  To: Brian Norris
  Cc: Ganapathi Bhat, Nishant Sarmukadam, Amitkumar Karwar, Xinming Hu,
	linux-kernel, linux-wireless, Brian Norris
In-Reply-To: <20190625174045.125223-2-briannorris@chromium.org>

Brian Norris <briannorris@chromium.org> wrote:

> mwifiex_11n_scan_and_dispatch() and
> mwifiex_11n_dispatch_pkt_until_start_win() share similar patterns, where
> they perform a few different actions on the same table, using the same
> lock, but non-atomically. There have been other attempts to clean up
> this sort of behavior, but they have had problems (incomplete;
> introducing new deadlocks).
> 
> We can improve these functions' atomicity by queueing up our RX packets
> in a list, to dispatch at the end of the function. This avoids problems
> of another operation modifying the table in between our dispatch and
> rotation operations.
> 
> This was inspired by investigations around this:
> 
>   http://lkml.kernel.org/linux-wireless/20181130175957.167031-1-briannorris@chromium.org
>   Subject: [4.20 PATCH] Revert "mwifiex: restructure rx_reorder_tbl_lock usage"
> 
> While the original (now-reverted) patch had good intentions in
> restructuring some of the locking patterns in this driver, it missed an
> important detail: we cannot defer to softirq contexts while already in
> an atomic context. We can help avoid this sort of problem by separating
> the two steps of:
> (1) iterating / clearing the mwifiex reordering table
> (2) dispatching received packets to upper layers
> 
> This makes it much harder to make lock recursion mistakes, as these
> two steps no longer need to hold the same locks.
> 
> Testing: I've played with a variety of stress tests, including download
> stress tests on the same APs which caught regressions with commit
> 5188d5453bc9 ("mwifiex: restructure rx_reorder_tbl_lock usage"). I've
> primarily tested on Marvell 8997 / PCIe, although I've given 8897 / SDIO
> a quick spin as well.
> 
> Signed-off-by: Brian Norris <briannorris@chromium.org>
> Acked-by: Ganapathi Bhat <gbhat@marvell.com>

2 patches applied to wireless-drivers-next.git, thanks.

ce2e942e32e8 mwifiex: dispatch/rotate from reorder table atomically
8a7f9fd8a3e0 mwifiex: don't disable hardirqs; just softirqs

-- 
https://patchwork.kernel.org/patch/11016151/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply

* Re: [PATCH v4 wireless-drivers] mt76: usb: fix rx A-MSDU support
From: Kalle Valo @ 2019-06-27 16:49 UTC (permalink / raw)
  To: Lorenzo Bianconi; +Cc: nbd, lorenzo.bianconi, linux-wireless, sgruszka
In-Reply-To: <7d93cba766b5a0220c86fa900f9d29048d67e02c.1560607085.git.lorenzo@kernel.org>

Lorenzo Bianconi <lorenzo@kernel.org> wrote:

> Commit f8f527b16db5 ("mt76: usb: use EP max packet aligned buffer sizes
> for rx") breaks A-MSDU support. When A-MSDU is enable the device can
> receive frames up to q->buf_size but they will be discarded in
> mt76u_process_rx_entry since there is no enough room for
> skb_shared_info. Fix the issue reallocating the skb and copying in the
> linear area the first 128B of the received frames and in the frag_list
> the remaining part
> 
> Fixes: f8f527b16db5 ("mt76: usb: use EP max packet aligned buffer sizes for rx")
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>

Patch applied to wireless-drivers.git, thanks.

2a92b08b1855 mt76: usb: fix rx A-MSDU support

-- 
https://patchwork.kernel.org/patch/10997119/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply

* [PATCH] mt76: mt7615: fix sparse warnings: warning: restricted __le16 degrades to integer
From: Lorenzo Bianconi @ 2019-06-27 14:49 UTC (permalink / raw)
  To: nbd; +Cc: lorenzo.bianconi, linux-wireless, ryder.lee, royluo

Fix the following sparse warning in __mt7615_mcu_msg_send:
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:78:15: sparse: warning:
restricted __le16 degrades to integer
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:78:15: sparse: warning:
cast from restricted __le16

Fixes: 04b8e65922f6 ("mt76: add mac80211 driver for MT7615 PCIe-based chipsets")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
index beee25e69053..cc6da5145d12 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
@@ -75,7 +75,7 @@ static int __mt7615_mcu_msg_send(struct mt7615_dev *dev, struct sk_buff *skb,
 
 	txd = mcu_txd->txd;
 
-	val = FIELD_PREP(MT_TXD0_TX_BYTES, cpu_to_le16(skb->len)) |
+	val = FIELD_PREP(MT_TXD0_TX_BYTES, skb->len) |
 	      FIELD_PREP(MT_TXD0_P_IDX, MT_TX_PORT_IDX_MCU) |
 	      FIELD_PREP(MT_TXD0_Q_IDX, q_idx);
 	txd[0] = cpu_to_le32(val);
-- 
2.21.0


^ permalink raw reply related

* [PATCH] drivers: net: wireless: rsi: return explicit error values
From: Enrico Weigelt, metux IT consult @ 2019-06-27 14:30 UTC (permalink / raw)
  To: linux-kernel; +Cc: amitkarwar, siva8118, kvalo, linux-wireless, netdev

From: Enrico Weigelt <info@metux.net>

Explicitly return constants instead of variable (and rely on
it to be explicitly initialized), if the value is supposed
to be fixed anyways. Align it with the rest of the driver,
which does it the same way.

Signed-off-by: Enrico Weigelt <info@metux.net>
---
 drivers/net/wireless/rsi/rsi_91x_sdio.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio.c b/drivers/net/wireless/rsi/rsi_91x_sdio.c
index b42cd50..2a3577d 100644
--- a/drivers/net/wireless/rsi/rsi_91x_sdio.c
+++ b/drivers/net/wireless/rsi/rsi_91x_sdio.c
@@ -844,11 +844,11 @@ static int rsi_init_sdio_interface(struct rsi_hw *adapter,
 				   struct sdio_func *pfunction)
 {
 	struct rsi_91x_sdiodev *rsi_91x_dev;
-	int status = -ENOMEM;
+	int status;
 
 	rsi_91x_dev = kzalloc(sizeof(*rsi_91x_dev), GFP_KERNEL);
 	if (!rsi_91x_dev)
-		return status;
+		return -ENOMEM;
 
 	adapter->rsi_dev = rsi_91x_dev;
 
@@ -890,7 +890,7 @@ static int rsi_init_sdio_interface(struct rsi_hw *adapter,
 #ifdef CONFIG_RSI_DEBUGFS
 	adapter->num_debugfs_entries = MAX_DEBUGFS_ENTRIES;
 #endif
-	return status;
+	return 0;
 fail:
 	sdio_disable_func(pfunction);
 	sdio_release_host(pfunction);
-- 
1.9.1


^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox