Linux wireless drivers development
 help / color / mirror / Atom feed
* [mac80211-next:master 25/27] net/ipv6/ila/ila_xlat.c:420 ila_xlat_nl_cmd_flush() error: uninitialized symbol 'ret'.
From: Dan Carpenter @ 2019-02-23  4:27 UTC (permalink / raw)
  To: kbuild, Herbert Xu; +Cc: kbuild-all, linux-wireless, Johannes Berg

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
head:   db0342b20f32f584aedff27c9c09e0a4bbe5beff
commit: 6c4128f658571b2dc7e01058ad09a8e947bc0159 [25/27] rhashtable: Remove obsolete rhashtable_walk_init function

smatch warnings:
net/ipv6/ila/ila_xlat.c:420 ila_xlat_nl_cmd_flush() error: uninitialized symbol 'ret'.

# https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git/commit/?id=6c4128f658571b2dc7e01058ad09a8e947bc0159
git remote add mac80211-next https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
git remote update mac80211-next
git checkout 6c4128f658571b2dc7e01058ad09a8e947bc0159
vim +/ret +420 net/ipv6/ila/ila_xlat.c

b6e71bde Tom Herbert 2018-06-27  378  
b6e71bde Tom Herbert 2018-06-27  379  int ila_xlat_nl_cmd_flush(struct sk_buff *skb, struct genl_info *info)
b6e71bde Tom Herbert 2018-06-27  380  {
b6e71bde Tom Herbert 2018-06-27  381  	struct net *net = genl_info_net(info);
b6e71bde Tom Herbert 2018-06-27  382  	struct ila_net *ilan = net_generic(net, ila_net_id);
b6e71bde Tom Herbert 2018-06-27  383  	struct rhashtable_iter iter;
b6e71bde Tom Herbert 2018-06-27  384  	struct ila_map *ila;
b6e71bde Tom Herbert 2018-06-27  385  	spinlock_t *lock;
b6e71bde Tom Herbert 2018-06-27  386  	int ret;
b6e71bde Tom Herbert 2018-06-27  387  
6c4128f6 Herbert Xu  2019-02-14  388  	rhashtable_walk_enter(&ilan->xlat.rhash_table, &iter);
b6e71bde Tom Herbert 2018-06-27  389  	rhashtable_walk_start(&iter);
b6e71bde Tom Herbert 2018-06-27  390  
b6e71bde Tom Herbert 2018-06-27  391  	for (;;) {
b6e71bde Tom Herbert 2018-06-27  392  		ila = rhashtable_walk_next(&iter);
b6e71bde Tom Herbert 2018-06-27  393  
b6e71bde Tom Herbert 2018-06-27  394  		if (IS_ERR(ila)) {
b6e71bde Tom Herbert 2018-06-27  395  			if (PTR_ERR(ila) == -EAGAIN)
b6e71bde Tom Herbert 2018-06-27  396  				continue;
b6e71bde Tom Herbert 2018-06-27  397  			ret = PTR_ERR(ila);
b6e71bde Tom Herbert 2018-06-27  398  			goto done;
b6e71bde Tom Herbert 2018-06-27  399  		} else if (!ila) {
b6e71bde Tom Herbert 2018-06-27  400  			break;

Set "ret" on this error path?

b6e71bde Tom Herbert 2018-06-27  401  		}
b6e71bde Tom Herbert 2018-06-27  402  
b6e71bde Tom Herbert 2018-06-27  403  		lock = lock_from_ila_map(ilan, ila);
b6e71bde Tom Herbert 2018-06-27  404  
b6e71bde Tom Herbert 2018-06-27  405  		spin_lock(lock);
b6e71bde Tom Herbert 2018-06-27  406  
b6e71bde Tom Herbert 2018-06-27  407  		ret = rhashtable_remove_fast(&ilan->xlat.rhash_table,
b6e71bde Tom Herbert 2018-06-27  408  					     &ila->node, rht_params);
b6e71bde Tom Herbert 2018-06-27  409  		if (!ret)
b6e71bde Tom Herbert 2018-06-27  410  			ila_free_node(ila);
b6e71bde Tom Herbert 2018-06-27  411  
b6e71bde Tom Herbert 2018-06-27  412  		spin_unlock(lock);
b6e71bde Tom Herbert 2018-06-27  413  
b6e71bde Tom Herbert 2018-06-27  414  		if (ret)
b6e71bde Tom Herbert 2018-06-27  415  			break;
b6e71bde Tom Herbert 2018-06-27  416  	}
b6e71bde Tom Herbert 2018-06-27  417  
b6e71bde Tom Herbert 2018-06-27  418  done:
b6e71bde Tom Herbert 2018-06-27  419  	rhashtable_walk_stop(&iter);
b6e71bde Tom Herbert 2018-06-27 @420  	return ret;
b6e71bde Tom Herbert 2018-06-27  421  }
b6e71bde Tom Herbert 2018-06-27  422  

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

^ permalink raw reply

* Re: [PATCH] brcmfmac: run firmware state watchdog on the host machine
From: Arend Van Spriel @ 2019-02-22 23:06 UTC (permalink / raw)
  To: Rafał Miłecki, Kalle Valo
  Cc: linux-wireless, brcm80211-dev-list.pdl, brcm80211-dev-list,
	Rafał Miłecki
In-Reply-To: <20190222170739.14266-1-zajec5@gmail.com>

On 2/22/2019 6:07 PM, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> FullMAC firmware may happen to crash due to some potential bugs exposed
> by e.g. a specific traffic or host-requested setup. It usually results
> in various timeouts & running our of resources (e.g. ring slots).
> 
> Monitoring firmware state allows handling such a situation more
> gracefully. At this point the watchdog:
> 1) Prints a clear error message about a firmware crash
> 2) Tries to dump a crash info data

Hi Rafał,

I like the idea of having firmware crashes detected, but not sure I am a 
big fan of the watchdog mechanism.

> That should be helpful for users & should allow providing a valuable
> reports for the Broadcom developers. It obviously doesn't really fix
> anything.

Agree on the value of it and it is new functionality indeed and not a fix.

> This watchdog is important for USB & SDIO devices which don't have
> anything alike implemented yet. It's also there to complement PCIe with
> its FWHALT signal which does not work in all situations.

Actually, SDIO does already have a watchdog, but it serves different 
purpose (get firmware console, idle detect). There is also a 
brcmf_sdio_checkdied() function to detect a firmware crash. It is being 
called in brcmf_sdio_bus_rxctl() when firwmare does not respond as 
expected [1]. Similar thing can be done for PCIE and I actually started 
working on that last week. USB is a bit different as it will switch to 
bootloader image when firmware crashes.

Regards,
Arend

[1] 
https://elixir.bootlin.com/linux/latest/source/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c#L3144

^ permalink raw reply

* Re: [RFC PATCH v3 02/12] nl80211/cfg80211: Extended Key ID support
From: Alexander Wetzel @ 2019-02-22 23:04 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless
In-Reply-To: <7377d6a44d9238e90f9bde55bc96cdecb3a4e25a.camel@sipsolutions.net>



Am 22.02.19 um 09:30 schrieb Johannes Berg:

>> With Extended Key ID we stick to a similar approach: NL80211_CMD_NEW_KEY
>> is called to install the new key and nl80211_key_install_mode allows to
>> select between a "legacy" or "extended" key install: NL80211_KEY_RX_TX
>> for "legacy" or NL80211_KEY_RX_ONLY for "extended".
> 
> Ah. That's where the "EXT" came from in the mac80211 names :-) FWIW, I'm
> not sure that makes sense. Yes, we think of it as an "extension" or
> being "extended" now while we work on it, but ultimately it'll be a
> simple part of the API. But I digress.

"EXT" is only intended to be the short form for "Extended Key ID for 
Individually Addressed Frames" from IEEE 802.11 - 2016 and not as 
"extension for nl80211/mac80211".

>> NL80211_KEY_SWITCH_TX is only allowed with NL80211_CMD_SET_KEY and is
>> the only Extended Key ID action allowed for that function.
> 
> Yes, but what does it *do*? Your documentation said:
> 
> 	Switch Tx to a Rx only, referenced by sta mac and idx.
> 
> but that seems backwards to me based on the above requirement:
> 	Allow a key to be used for decryption first and switch it to a
> 	"normal" Rx/Tx key with a second call.
> 
Ah, now I see your point!

I'm viewing a Rx only key as something different, a new "key group" like 
the existing broadcast or unicast key groups. (Which btw. also why I 
have a problems to not have a key marked as such.)

"Switch TX" was intended to bring across, that the Tx status would 
switch from the "other" key to the referenced one. (That's also the 
reason I did not want to use ENABLE_TX.)

Or in other words:
Make a potential existing RX/TX key to a RX only key and the current Rx 
only key to the RX/Tx key. The key referenced by sta and mac must be 
flagged Rx only or the command will have no effect/fail. (The last 
requirement would vanish when we drop the Rx_Only key flag.)

> IOW, you said we need to have the ability to first install RX-only, and
> then switch the key to RX & TX. I'd have called this "ENABLE_TX" or
> something like that. Or perhaps SWITCH_(ON_)TX if you're so inclined,
> but the documentation should then say
> 
> 	Switch key from RX-only to TX/RX, referenced by ...
> 
> no? That's what I meant by "the other way around".

What do you think about:
	Switch key referenced by referenced by sta mac and idx from RX-
	only to RX/TX and make any other RX/TX key for the sta a RX-only
	key.

> 
>> Any non-pairwise keys can only use NL80211_KEY_RX_TX which is of course
>> always the default and also allowed for "legacy" pairwise keys.
> 
> Right.
> 
>> A Extended Key Install will:
>> 1) call NL80211_CMD_NEW_KEY with all the usual parameters of a new key
>> install plus the flag NL80211_KEY_RX_ONLY set.
> 
> So far makes sense.
> 
>> 2) Once ready will call NL80211_CMD_SET_KEY with flag
>> NL80211_KEY_SWITCH_TX to activate a specific key.
> 
> Also makes sense, but the documentation doesn't.
> 
> I think we should rename these perhaps
> 
> 	NL80211_KEY_RX_TX - install key and enable RX/TX (default)
> 	NL80211_KEY_RX_ONLY - install unicast key for RX only
> 	NL80211_KEY_ENABLE_TX - enable TX for a previously installed
> 				RX_ONLY key
> 
> I think?
> 
> About the ENABLE_TX vs. SWITCH_TX - we don't allow to switch TX *off*
> again, only *on*, so I think "enable" makes more sense than "switch".
>
See above. NL80211_KEY_ENABLE_TX would also implicit disable Tx for the 
"other" pairwise key (if present). Mac80211 e.g. evaluates delay 
tailromm for both keys again and always reduces it for the Rx only key 
when it was set and even sets the RX_only flag again.

That said I'm happy with any of these:
	NL80211_KEY_ENABLE_TX
	NL80211_KEY_SWITCH_TX
	NL80211_KEY_MOVE_TX

After that discussion I'm now wondering if we maybe should change the 
naming more fundamentally, similar to what I proposed for mac80211:

	NL80211_KEY_SET - install key and enable RX/TX (default)
	NL80211_KEY_EXT_SET add unicast key for Extended Key ID
	NL80211_KEY_EXT_ENABLE - Set the key referenced by
		sta mac the to the preferred TX key for sta

Here it would be nice to be able to use "NL80211_EXT_KEY_", but that 
would break the naming schema quite badly. And using 
NL80211_KEY_EXT_KEY_ looks also confusing...

Any preferences or other options? I think you have now all details about 
that and whatever looks best for you is it now.

> Anyway, my whole comment was only about the documentation text which
> seemed backward or at least unclear to me.
>
I did not see that when coming from understanding the code to writing 
comments/documentation. Chances are other readers will interpret that 
like  you did and not as intended... And the area is complex enough 
without those misunderstandings.

>> ok, I'll remove all the drive-by comment "cleanups".
>> It (often) looks kind of untidy and not really worth separate patches
>> and I'm kind of responsible for (most) of them.. I see why you don't
>> want to see those fixed drive-by...
>>
>> My understanding is now that we prefer to not change those and I'll
>> leave them alone.
> 
> I have no objection to even the most trivial cleanup patches going in
> separately, and if you like multiple in a bigger "clean up this area"
> patch, but here I think it detracts from the patch.
> 
I understand.
Honestly I would feel silly to put most of the drive-by changes into a 
dedicated patch and not worth the time for a review.
So I guess I'll only do separate patches if I really care about the 
format/comment in future:-)


Alexander


^ permalink raw reply

* Re: [RFC PATCH v3 08/12] iwlwifi: dvm - EXT_KEY_ID A-MPDU API update
From: Alexander Wetzel @ 2019-02-22 21:15 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless
In-Reply-To: <63fecadcf3f38f24b547143d9d53b3454adc417a.camel@sipsolutions.net>

> On Sun, 2019-02-10 at 22:06 +0100, Alexander Wetzel wrote:
>> When using Extended Key ID mac80211 drops @IEEE80211_TX_CTL_AMPDU for
>> the last packet which can be added to a A-MPDU in preparation.
>>
>> Don't throw a warning and just handle the frame as if
>> @IEEE80211_TX_CTL_AMPDU would have been set.
>>
>> Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de>
>> ---
>>
>> I cold not figure out so far how to make sure the card will not mix
>> A-MPDU frames. Looks like that is handled fully in the HW and I didn't
>> find any interface to influence it. (It even may work already, I have
>> some problems to capture A-MPDU frames with A-MPDU information intact
>> and the topic was pretty low on the list so far. After all it works...)
> 
> You can't really do that, as far as I can tell, unfortunately. So this
> might be better in a "compat on steroids" mode?

I hoped that the HW would already enforce the key border. But ok: The 
cards will still be able to use NATIVE mode. Only now the driver will 
have to request to disable Tx aggregation when finding a key border. 
Since Tx aggregation is disabled per default anyhow many users will not 
even see a difference.

(Off topic here, but I suspect the not reproducible problems leading to 
change the Tx aggregation default to off could also have been ptk0 rekey 
freezes. In that case we could now allow it again. But I've not found 
raw error reports and guess it's not worth the efforts/risks to change 
the default again.)

Alexander

^ permalink raw reply

* Re: [RFC PATCH v3 07/12] iwlwifi: Extended Key ID support (NATIVE)
From: Alexander Wetzel @ 2019-02-22 20:50 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless
In-Reply-To: <1a3b6e515c73a2c185e8dad84ab2ebfd8982a6ce.camel@sipsolutions.net>



Am 15.02.19 um 12:52 schrieb Johannes Berg:
> On Sun, 2019-02-10 at 22:06 +0100, Alexander Wetzel wrote:
>> This is not ready for merge and has known issues.
>> The patch is only for discussions to sort out how to handle it correctly!
>>
>> Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de>
>> ---
>>
>> iwlwifi intel cards had two big surprises:
>>
>> Assuming I did not make some stupid errors it looks like my old
>> "Intel Corporation Centrino Ultimate-N 6300 (rev 3e)" using ucode
>> 9.221.4.1 build 25532 is perfectly fine with two keys uploaded to
>> harware and honoring the keyid in the MPDUs. For a card launched 2011
>> that's a pleasant surprise:-)
> 
> :-)
> 
>> A much shorter test with a modern "Intel Corporation Wireless 8265 /
>> 8175 (rev 78)" using ucode version 36.e91976c0.0 shows what seems to be
>> MPDUs decoded with the wrong key at each rekey and therefore a candidate
>> for the COMPAT support only..
>> So the bad news seems to be, that the modern card dropped the support.
> 
> Probably just a firmware bug.
> 
>> It also seems to force us to add some per-card or per-firmware depending
>> check to decide which card can use the Native Extended Key ID support
>> and use the Compat mode for the rest.
>> Is there any way to find out which cards/firmware can be used with
>> Extended Key ID?
> 
> No, but if you have a good test case we can check out what the firmware
> bug is and fix it. Perhaps not for all, but for the future at least.
> Maybe we can still figure out where it was introduced and thus see where
> it's good to use native mode.

I'll verify if can reproduce the scrambled packets and will provide a 
capture if so. Assuming that confirms the initial finding I'll be able 
to reproduce that at will within minutes with access to a test system 
having a mvm card. (I have some plans which will improve access, but 
looks like that will take some time and efforts.)

For now I handle that as low prio till we have generic Extended Key ID 
support merged and I've had some time to improve my test setup and 
hopefully have better access to a mvm card for testing.

> 
>> I also have tested patch for iwldvm using the Compat mode and I think
>> mvm cards will also work with that.
> 
> No they don't, no firmware is available for that.

So far I only looked at the dvm part of iwlwifi with only minutes spend 
on mvm to port the NATIVE solution from dvm.

Are you saying that mvm cards can't seamless switch a RX/TX key to TX 
only one? mvm seems to support SW crypto as needed and switching RX/TX 
to TX keys is the only other requirement for COMPAT mode.

Alexander

^ permalink raw reply

* Re: [RFC PATCH v3 08/12] iwlwifi: dvm - EXT_KEY_ID A-MPDU API update
From: Johannes Berg @ 2019-02-22 21:20 UTC (permalink / raw)
  To: Alexander Wetzel; +Cc: linux-wireless
In-Reply-To: <4bd73bd3-9027-4689-54e7-7c082eefa327@wetzel-home.de>

On Fri, 2019-02-22 at 22:15 +0100, Alexander Wetzel wrote:

> I hoped that the HW would already enforce the key border. 

I don't think so.

> But ok: The 
> cards will still be able to use NATIVE mode. Only now the driver will 
> have to request to disable Tx aggregation when finding a key border. 

It doesn't really have to even completely disable it, it'd just have to
send and LQ_CMD with agg_params.agg_frame_cnt_limit = 1, temporarily,
until the relevant frames were transmitted (this is a global config, so
it'd have to track the key border on each TID, but that's not _too_
hard).

> Since Tx aggregation is disabled per default anyhow many users will not 
> even see a difference.

Good point, I forgot all about that.

> (Off topic here, but I suspect the not reproducible problems leading to 
> change the Tx aggregation default to off could also have been ptk0 rekey 
> freezes. In that case we could now allow it again. But I've not found 
> raw error reports and guess it's not worth the efforts/risks to change 
> the default again.)

I wouldn't be so sure - PTK rekeying should still be a pretty uncommon
configuration. But I also don't recall the exact decision making going
into this.

johannes


^ permalink raw reply

* Re: [RFC PATCH v3 07/12] iwlwifi: Extended Key ID support (NATIVE)
From: Johannes Berg @ 2019-02-22 21:06 UTC (permalink / raw)
  To: Alexander Wetzel; +Cc: linux-wireless
In-Reply-To: <e84c30de-28d6-7d1b-0fa3-d1ca466e257b@wetzel-home.de>

On Fri, 2019-02-22 at 21:50 +0100, Alexander Wetzel wrote:

> > No, but if you have a good test case we can check out what the firmware
> > bug is and fix it. Perhaps not for all, but for the future at least.
> > Maybe we can still figure out where it was introduced and thus see where
> > it's good to use native mode.
> 
> I'll verify if can reproduce the scrambled packets and will provide a 
> capture if so. Assuming that confirms the initial finding I'll be able 
> to reproduce that at will within minutes with access to a test system 
> having a mvm card. (I have some plans which will improve access, but 
> looks like that will take some time and efforts.)
> 
> For now I handle that as low prio till we have generic Extended Key ID 
> support merged

Agree

>  and I've had some time to improve my test setup and 
> hopefully have better access to a mvm card for testing.

If all that's lacking is a few NICs then I'm sure we/I can help out with
that :)

> > > I also have tested patch for iwldvm using the Compat mode and I think
> > > mvm cards will also work with that.
> > 
> > No they don't, no firmware is available for that.
> 
> So far I only looked at the dvm part of iwlwifi with only minutes spend 
> on mvm to port the NATIVE solution from dvm.

:)

> Are you saying that mvm cards can't seamless switch a RX/TX key to TX 
> only one? mvm seems to support SW crypto as needed and switching RX/TX 
> to TX keys is the only other requirement for COMPAT mode.

No, sorry. I misread your statement. I thought you were saying "mvm
cards will also work with iwldvm" rather than "mvm cards will also work
with compat mode" :-)

I think they all should just be made to work in native mode, the
firmware basically supports this as you found, there must be some small
bugs.

johannes


^ permalink raw reply

* Re: pull-request: wireless-drivers-next 2019-02-22
From: David Miller @ 2019-02-22 20:56 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <87sgwfn9zk.fsf@kamboji.qca.qualcomm.com>

From: Kalle Valo <kvalo@codeaurora.org>
Date: Fri, 22 Feb 2019 17:01:03 +0200

> here's a pull request to net-next tree for 5.1, more info below. Do note
> that the diffstat again was wrong due to the wireless-drivers merge so I
> had to recreate it manually.
> 
> Please let me know if there are any problems.

Pulled, thanks a lot Kalle.

^ permalink raw reply

* Re: pull-request: mac80211-next 2019-02-22
From: David Miller @ 2019-02-22 20:52 UTC (permalink / raw)
  To: johannes; +Cc: netdev, linux-wireless
In-Reply-To: <20190222132513.29834-1-johannes@sipsolutions.net>

From: Johannes Berg <johannes@sipsolutions.net>
Date: Fri, 22 Feb 2019 14:25:12 +0100

> Here's the promised update with the big multi-BSSID changes,
> which are related to HE (802.11ax) for which we also have some
> updates.
> 
> Note that I took the liberty of including Herbert's rhashtable
> API removal, I merged net-next for that and verified that the
> API he removed is also not used in anything new, but if you
> apply/applied any patches after I pulled you should probably
> double check that again.
> 
> Please pull and let me know if there's any problem.

Pulled, looks good on this end.

Will push back out after build testing.

Thanks!

^ permalink raw reply

* Re: pull-request: mac80211 2019-02-22
From: David Miller @ 2019-02-22 20:51 UTC (permalink / raw)
  To: johannes; +Cc: netdev, linux-wireless
In-Reply-To: <20190222131052.28249-1-johannes@sipsolutions.net>

From: Johannes Berg <johannes@sipsolutions.net>
Date: Fri, 22 Feb 2019 14:10:51 +0100

> So ... I thought there weren't going to be any more patches
> when I asked you to apply that mac80211 one, but now a few
> days later I still ended up with three that are current and
> possibly even stable material.
> 
> Please pull and let me know if there's any problem.

Pulled, thanks Johannes.

^ permalink raw reply

* Re: [PATCH] mac80211: Change default tx_sk_pacing_shift to 7
From: Johannes Berg @ 2019-02-22 19:10 UTC (permalink / raw)
  To: Toke Høiland-Jørgensen
  Cc: linux-wireless, Ben Greear, Grant Grundler, Kalle Valo, wgong,
	ath10k, wgong, Kan Yan
In-Reply-To: <87imxcvt4z.fsf@toke.dk>

On Fri, 2019-02-22 at 14:40 +0100, Toke Høiland-Jørgensen wrote:
> 
> And send it directly to stable, or does it need to go through you?

I added a Cc: stable tag. So all you really need to do is wait for the
emails telling you it failed to apply, and handle accordingly :)

johannes


^ permalink raw reply

* [PATCH] brcmfmac: run firmware state watchdog on the host machine
From: Rafał Miłecki @ 2019-02-22 17:07 UTC (permalink / raw)
  To: Kalle Valo
  Cc: Arend van Spriel, linux-wireless, brcm80211-dev-list.pdl,
	brcm80211-dev-list, Rafał Miłecki

From: Rafał Miłecki <rafal@milecki.pl>

FullMAC firmware may happen to crash due to some potential bugs exposed
by e.g. a specific traffic or host-requested setup. It usually results
in various timeouts & running our of resources (e.g. ring slots).

Monitoring firmware state allows handling such a situation more
gracefully. At this point the watchdog:
1) Prints a clear error message about a firmware crash
2) Tries to dump a crash info data

That should be helpful for users & should allow providing a valuable
reports for the Broadcom developers. It obviously doesn't really fix
anything.

This watchdog is important for USB & SDIO devices which don't have
anything alike implemented yet. It's also there to complement PCIe with
its FWHALT signal which does not work in all situations.

It has been successfully tested with the recently released
brcmfmac4366c-pcie.bin.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=201853
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
 .../broadcom/brcm80211/brcmfmac/core.c        | 28 +++++++++++++++++++
 .../broadcom/brcm80211/brcmfmac/core.h        |  2 ++
 2 files changed, 30 insertions(+)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
index 4fbe8791f674..ab7a54b2d831 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
@@ -40,6 +40,7 @@
 #include "common.h"
 
 #define MAX_WAIT_FOR_8021X_TX			msecs_to_jiffies(950)
+#define BRCMF_FW_WATCHDOG_POLL			msecs_to_jiffies(1000)
 
 #define BRCMF_BSSIDX_INVALID			-1
 
@@ -1084,6 +1085,28 @@ static int brcmf_revinfo_read(struct seq_file *s, void *data)
 	return 0;
 }
 
+static void brcmf_fw_watchdog(struct work_struct *work)
+{
+	struct brcmf_pub *drvr = container_of(work, struct brcmf_pub,
+					      fw_watchdog.work);
+
+	if (drvr->bus_if->state == BRCMF_BUS_UP) {
+		struct brcmf_if *ifp = drvr->iflist[0];
+		s32 ver;
+		int err;
+
+		err = brcmf_fil_cmd_int_get(ifp, BRCMF_C_GET_VERSION, &ver);
+		if (err) {
+			bphy_err(drvr, "Firmware has most likely crashed and didn't respond: %d\n",
+				 err);
+			brcmf_dev_coredump(drvr->bus_if->dev);
+			return;
+		}
+	}
+
+	schedule_delayed_work(&drvr->fw_watchdog, BRCMF_FW_WATCHDOG_POLL);
+}
+
 static int brcmf_bus_started(struct brcmf_pub *drvr, struct cfg80211_ops *ops)
 {
 	int ret = -1;
@@ -1155,6 +1178,9 @@ static int brcmf_bus_started(struct brcmf_pub *drvr, struct cfg80211_ops *ops)
 #endif
 #endif /* CONFIG_INET */
 
+	INIT_DELAYED_WORK(&drvr->fw_watchdog, brcmf_fw_watchdog);
+	schedule_delayed_work(&drvr->fw_watchdog, BRCMF_FW_WATCHDOG_POLL);
+
 	/* populate debugfs */
 	brcmf_debugfs_add_entry(drvr, "revinfo", brcmf_revinfo_read);
 	brcmf_feat_debugfs_create(drvr);
@@ -1284,6 +1310,8 @@ void brcmf_detach(struct device *dev)
 	if (drvr == NULL)
 		return;
 
+	cancel_delayed_work_sync(&drvr->fw_watchdog);
+
 #ifdef CONFIG_INET
 	unregister_inetaddr_notifier(&drvr->inetaddr_notifier);
 #endif
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h
index d8085ce579f4..1b44d243d05f 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h
@@ -143,6 +143,8 @@ struct brcmf_pub {
 	struct notifier_block inet6addr_notifier;
 	struct brcmf_mp_device *settings;
 
+	struct delayed_work fw_watchdog;
+
 	u8 clmver[BRCMF_DCMD_SMLEN];
 };
 
-- 
2.20.1


^ permalink raw reply related

* Re: [PATCH 2/4] mt76: fix corrupted software generated tx CCMP PN
From: Sasha Levin @ 2019-02-22 15:24 UTC (permalink / raw)
  To: Sasha Levin, Felix Fietkau, linux-wireless; +Cc: stable, stable, stable
In-Reply-To: <20190218194218.41314-2-nbd@nbd.name>

Hi,

[This is an automated email]

This commit has been processed because it contains a "Fixes:" tag,
fixing commit: 23405236460b mt76: fix transmission of encrypted management frames.

The bot has tested the following trees: v4.20.11, v4.19.24.

v4.19.24: Failed to apply! Possible dependencies:
    047aed1c38cf ("mt76: unify mac_shared_key_setup")
    108a4861ef19 ("mt76: create new mt76x02-lib module for common mt76x{0,2} code")
    2735a6dd7df3 ("mt76: unify wait_for_mac")
    32bb405fe2bc ("mt76: unify mac_wcid_setup")
    427f9ebec682 ("mt76: move mt76x02_mac_write_txwi in mt76x02-lib module")
    46436b5ef9dd ("mt76: unify mac_wcid_set_key")
    516ea2a2a9d4 ("mt76: use mac_wcid_set_drop in mt76x0")
    797ea2407825 ("mt76: merge mt76x0/regs.h into mt76x02_regs.h")
    c378f2473466 ("mt76: unify mac_get_key_info")
    f5a7f126e5fe ("mt76: unify sta structure part 1")


How should we proceed with this patch?

--
Thanks,
Sasha

^ permalink raw reply

* pull-request: wireless-drivers-next 2019-02-22
From: Kalle Valo @ 2019-02-22 15:01 UTC (permalink / raw)
  To: David Miller; +Cc: linux-wireless, netdev, linux-kernel

Hi Dave,

here's a pull request to net-next tree for 5.1, more info below. Do note
that the diffstat again was wrong due to the wireless-drivers merge so I
had to recreate it manually.

Please let me know if there are any problems.

Kalle

The following changes since commit d04ca383860bef90a0dab4eb397907f7f05e839e:

  mt76x0u: fix suspend/resume (2019-02-07 18:32:16 +0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git tags/wireless-drivers-next-for-davem-2019-02-22

for you to fetch changes up to 5c0c4c85463461a9ea0a69c4e80849a71c6b1e24:

  Merge tag 'iwlwifi-next-for-kalle-2019-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next (2019-02-20 21:06:13 +0200)

----------------------------------------------------------------
wireless-drivers-next patches for 5.1

Most likely the last set of patches for 5.1. WPA3 support to ath10k
and qtnfmac. FTM support to iwlwifi and ath10k. And of course other
new features and bugfixes.

wireless-drivers was merged due to dependency in mt76.

Major changes:

iwlwifi

* HE radiotap

* FTM (Fine Timing Measurement) initiator and responder implementation

* bump supported firmware API to 46

* VHT extended NSS support

* new PCI IDs for 9260 and 22000 series

ath10k

* change QMI interface to support the new (and backwards incompatible)
  interface from HL3.1 and used in recent HL2.0 branch firmware
  releases

* support WPA3 with WCN3990

* support for mac80211 airtime fairness based on transmit rate
  estimation, the firmware needs to support WMI_SERVICE_PEER_STATS to
  enable this

* report transmit airtime to mac80211 with firmwares having
  WMI_SERVICE_REPORT_AIRTIME feature, this to have more accurate
  airtime fairness based on real transmit time (instead of just
  estimated from transmit rate)

* support Fine Timing Measurement (FTM) responder role

* add dynamic VLAN support with firmware having WMI_SERVICE_PER_PACKET_SW_ENCRYPT

* switch to use SPDX license identifiers

ath

* add new country codes for US

brcmfmac

* support monitor frames with the hardware/ucode header

qtnfmac

* enable WPA3 SAE and OWE support

mt76

* beacon support for USB devices (mesh+ad-hoc only)

rtlwifi

* convert to use SPDX license identifiers

libertas_tf

* get the MAC address before registering the device

----------------------------------------------------------------
Abhishek Ambure (2):
      ath10k: assign 'n_cipher_suites = 11' for WCN3990 to enable WPA3
      ath10k: update GCMP & GCMP-256 cipher suite number for WCN3990

Adrian Bunk (1):
      mwifiex: Fix NL80211_TX_POWER_LIMITED

Alagu Sankar (1):
      ath10k: reduce transmit msdu count

Andrei Otcheretianski (1):
      iwlwifi: mvm: Set TX_CMD_FLG_PROT_REQUIRE correctly

Arend van Spriel (6):
      brcmfmac: assure SSID length from firmware is limited
      brcmfmac: add subtype check for event handling in data path
      brcmfmac: create debugfs files for bus-specific layer
      brcmfmac: disable MBSS feature for bcm4330 device
      brcmfmac: check and dump trap info during sdio probe
      brcmfmac: use chipname in brcmf_fw_alloc_request() for error path as well

Arnd Bergmann (1):
      iwlwifi: fix false-positive maybe-uninitialized warning

Avigail Grinstein (1):
      iwlwifi: mvm: support absolute thresholds in bf configuration

Avraham Stern (4):
      iwlwifi: mvm: Fix possible NULL pointer dereference
      iwlwifi: mvm: add support for new FTM fw API
      iwlwifi: mvm: add debug prints for FTM
      iwlwifi: mvm: stop static queues correctly

Ben Hutchings (1):
      mt76: Use the correct hweight8() function

Brian Norris (3):
      ath10k: sdio: add .owner field
      ath10k: pci: use mutex for diagnostic window CE polling
      mwifiex: don't advertise IBSS features without FW support

Christian Lamparter (1):
      ath10k: implement set_base_macaddr to fix rx-bssid mask in multiple APs conf

Colin Ian King (2):
      rsi: fix indentation issue with a code block
      rtlwifi: rtl8192ce: fix typo, "PairwiseENcAlgorithm" -> "PairwiseEncAlgorithm"

Dan Carpenter (2):
      rsi: fix a typo in a debug message
      carl9170: clean up a clamp() call

Daniel F. Dickinson (1):
      ath9k: Avoid OF no-EEPROM quirks without qca,no-eeprom

Emmanuel Grumbach (3):
      iwlwifi: mvm: support new format for the beacon notification
      iwlwifi: mvm: fix AP mode in WEP
      iwlwifi: mvm: fix the spatial reuse parsing for HE_TRIG PPDUs

Felix Fietkau (11):
      mt76: fix software encryption issues
      mt76: mt76x2: avoid running DPD calibration if tx is blocked
      mt76: explicitly disable energy detect cca during scan
      mt76: run MAC work every 100ms
      mt76: clear CCA timer stats in mt76x02_edcca_init
      mt76: measure the time between mt76x02_edcca_check runs
      mt76: increase ED/CCA tx block threshold
      mt76: fix tx status timeout processing
      mt76: fix corrupted software generated tx CCMP PN
      mt76: fix resetting software IV flag on key delete
      mt76: mt76x2: simplify per-chain signal strength handling

Govind Singh (5):
      ath10k: Add support for extended HTT aggr msg support
      ath10k: update HOST capability qmi message
      ath10k: enable bus layer suspend/resume for WCN3990
      ath10k: disable interface pause wow config for integrated chipset
      ath10k: request credit report if flow control enabled on ep

Greg Kroah-Hartman (5):
      ath10k: do not return invalid pointers as a *dentry
      ath9k: do not return invalid pointers as a *dentry
      iwlwifi: dvm: no need to check return value of debugfs_create functions
      iwlwifi: fw: no need to check return value of debugfs_create functions
      iwlwifi: iwl-drv: no need to check return value of debugfs_create functions

Gustavo A. R. Silva (2):
      iwlwifi: eeprom-parse: use struct_size() in kzalloc()
      iwlwifi: nvm-parse: use struct_size() in kzalloc()

Haim Dreyfuss (1):
      iwlwifi: mvm: add support for 32kHz external clock indication

Ido Yariv (1):
      iwlwifi: mvm: don't require WOWLAN images when unified

Ihab Zhaika (2):
      iwlwifi: add new card for 9260 series
      iwlwifi: add new cards for 22000 and killer series and change the market name

Ilan Peer (5):
      iwiwifi: mvm: Fix FW scan concurrency support assumptions
      iwlwifi: mvm: Don't warn on command failure during restart
      iwlwifi: mvm: Do not return an error value on HW restart
      iwlwifi: mvm: Don't request HW restart if already requested
      iwlwifi: mvm: Allow retries for probe responses

Johannes Berg (17):
      iwlwifi: mvm: remove redundant condition
      iwlwifi: dvm: use %u for sscanf() into unsigned variable
      iwlwifi: mvm: add HE TB PPDU SIG-A BW to radiotap
      iwlwifi: move config structs to C file
      iwlwifi: mvm: don't hide HE radiotap data in SKB
      iwlwifi: refactor NIC init sequence
      iwlwifi: mvm: fix RFH config command with >=10 CPUs
      iwlwifi: implement BISR HW workaround for 22260 devices
      iwlwifi: mvm: support FTM responder
      iwlwifi: mvm: support FTM initiator
      iwlwifi: mvm: clean up NO_PSDU case
      iwlwifi: bump FW API to 46 for 9000 and 22000 series
      iwlwifi: mvm: fix HE radiotap data4 for HE-TB PPDUs
      iwlwifi: mvm: fix error path in iwl_mvm_mac_setup_register()
      iwlwifi: nvm-parse: advertise IEEE80211_VHT_EXT_NSS_BW_CAPABLE in VHT
      iwlwifi: mvm: remove IWL_MVM_INIT_STATUS_REG_HW_INIT_COMPLETE
      iwlwifi: mvm: implement VHT extended NSS support in rs.c

Kalle Valo (16):
      Merge tag 'iwlwifi-next-for-kalle-2019-02-04' of git://git.kernel.org/.../iwlwifi/iwlwifi-next
      Merge ath-next from git://git.kernel.org/.../kvalo/ath.git
      Merge git://git.kernel.org/.../kvalo/wireless-drivers.git
      ath10k: fix line length warning in ath10k_ce_alloc_dest_ring()
      ath10k: add missing values to wmi_service_name()
      ath10k: make wmi_service_name() warn about missing service ids
      ath10k: change wmi.h to include only ieee80211.h
      ath10k: align ath10k_htt_txbuf structures
      ath10k: fix documentation in ath10k_wow_convert_8023_to_80211()
      ath10k: copy the whole struct ath10k_bus_params in ath10k_core_register()
      Merge tag 'iwlwifi-next-for-kalle-2019-02-14' of git://git.kernel.org/.../iwlwifi/iwlwifi-next
      Merge tag 'mt76-for-kvalo-2019-02-18' of https://github.com/nbd168/wireless
      ath10k: change 'unsigned long int' to 'unsigned long'
      ath10k: switch to use SPDX license identifiers
      Merge ath-next from git://git.kernel.org/.../kvalo/ath.git
      Merge tag 'iwlwifi-next-for-kalle-2019-02-20' of git://git.kernel.org/.../iwlwifi/iwlwifi-next

Kan Yan (1):
      ath10k: report estimated frame transmit airtime to improve fairness

Kangjie Lu (1):
      ath6kl: return error code in ath6kl_wmi_set_roam_lrssi_cmd()

Kees Cook (1):
      ath9k: eeprom: Use scnprintf instead of snprintf

Keyur Patel (1):
      orinoco : Replace function name in string with __func__

Larry Finger (21):
      rtlwifi: Replace old-style license information
      rtlwifi: btcoex: Replace old-style license information
      rtlwifi: rtl8188ee: Replace old-style license information
      rtlwifi: rtl8192com: Replace old-style license information
      rtlwifi: rtl8192ce: Replace old-style license information
      rtlwifi: rtl8192cu: Replace old-style license information
      rtlwifi: rtl8192de: Replace old-style license information
      rtlwifi: rtl8192ee: Replace old-style license information
      rtlwifi: rtl8192se: Replace old-style license information
      rtlwifi: rtl8723ae: Replace old-style license information
      rtlwifi: rtl8723be: Replace old-style license information
      rtlwifi: rtl8723_common: Replace old-style license information
      rtlwifi: rtl8821ae: Replace old-style license information
      rtlwifi: Remove CamelCase variables from base code
      rtlwifi: btcoexist: Remove CamelCase variable
      rtlwifi: rtl8188ee: Remove CamelCase variable
      rtlwifi: rtl8192{c,u}: Remove CamelCase variables
      rtlwifi: rtl8188de: Remove CamelCase variables
      rtlwifi: rtl8192se: Remove CamelCase variables
      rtlwifi: rtl8723{be,ae}: Remove CamelCase variables
      rtlwifi: rtl8821ae: Remove CamelCase variables

Liad Kaufman (3):
      iwlwifi: mvm: add tlc command name to output
      iwlwifi: mvm: config mac ctxt to HE before TLC
      iwlwifi: mvm: add read debugfs for he_sniffer_params

Lorenzo Bianconi (21):
      mt76x0: eeprom: fix VHT mcs{8,9} rate power offset
      mt76: move mt76_mcu_msg_alloc in mt76-core
      mt76: move mt76_mcu_get_response in mt76-core
      mt76: move mt76_mcu_rx_event in mt76-core
      mt76x0: mcu: remove useless commented configuration
      mt76: move mt76_dma_tx_queue_skb_raw in mt76-core module
      mt76: remove add_buf pointer in mt76_queue_ops
      mt76: move alloc_device common code in mt76_alloc_device
      mt76x2u: remove mt76x2u_alloc_device routine
      mt76x0: remove mt76x0u_alloc_device routine
      mt76x2: remove mt76x2_alloc_device routine
      mt76x0: phy: report target_power in debugfs
      mt76x0: init: introduce mt76x0_init_txpower routine
      mt76: usb: fix possible NULL pointer dereference in mt76u_mcu_deinit
      mt76: usb: fix possible memory leak in mt76u_buf_free
      mt76: usb: do not run mt76u_queues_deinit twice
      mt76: usb: move mt76u_check_sg in usb.c
      mt76: usb: do not use sg buffers for mcu messages
      mt76: usb: use a linear buffer for tx/rx datapath if sg is not supported
      mt76: usb: introduce disable_usb_sg parameter
      mt76: usb: use dev_err_ratelimited instead of dev_err in mt76u_complete_rx

Lubomir Rintel (7):
      libertas_tf: lower the debug level of command trace
      libertas_tf: don't set URB_ZERO_PACKET on IN USB transfer
      libertas_tf: move the banner to a more appropriate place
      libertas_tf: fix signal reporting
      libertas_tf: move hardware callbacks to a separate structure
      libertas_tf: don't defer firmware loading until start()
      libertas_tf: get the MAC address before registering the device

Luca Coelho (5):
      iwlwifi: bump FW API to 44 for 9000 and 22000 series
      iwlwifi: dvm: fix some fall through warnings
      iwlwifi: mvm: add fall through comments where needed
      iwlwifi: bump FW API to 45 for 9000 and 22000 series
      iwlwifi: start using B-step for some 9000 devices

Manikanta Pubbisetty (2):
      ath10k: add dynamic vlan support
      ath10k: report tx airtime provided by fw

Matteo Croce (1):
      brcmfmac: fix typos

Mordechay Goodstein (1):
      iwlwifi: add FW recovery flow

Naftali Goldstein (1):
      iwlwifi: mvm: add description to second BAD_COMMAND assert number

Oever Gonzalez (1):
      ath: regd: add extra US coutry codes

Pradeep Kumar Chitrapu (1):
      ath10k: add support to configure ftm responder role

Rafał Miłecki (10):
      brcmfmac: modify __brcmf_err() to take bus as a parameter
      brcmfmac: pass bus to the __brcmf_err() in pcie.c
      brcmfmac: add bphy_err() and use it in the cfg80211.c
      brcmfmac: support monitor frames with the hardware/ucode header
      brcmfmac: print firmware reported ring status errors
      brcmfmac: improve code handling bandwidth of firmware reported channels
      brcmfmac: support firmware reporting 160 MHz channels
      brcmfmac: rework bphy_err() to take struct brcmf_pub argument
      brcmfmac: use bphy_err() in all wiphy-related code
      brcmfmac: add basic validation of shared RAM address

Rakesh Pillai (7):
      ath10k: Set DMA address mask to 35 bit for WCN3990
      ath10k: Handle bundled tx completion for management frames
      ath10k: Enable bundle tx compl for management frames in WCN3990
      ath10k: fix dma unmap direction for management frames
      ath10k: fix hw-restart crash inject mode for WCN3990
      ath10k: enable Factory Test Mode for WCN3990
      ath10k: fix shadow register implementation for WCN3990

Ryder Lee (1):
      mt76: change the return type of mt76_dma_attach()

Sara Sharon (12):
      iwlwifi: mvm: simplify some return conditions
      iwlwifi: mvm: support CHANNEL_SWITCH_TIME_EVENT_CMD command
      iwlwifi: mvm: limit AMSDU size to 8K
      iwlwifi: mvm: fix RSS config command
      iwlwifi: pcie: fix emergency path
      iwlwifi: dvm: don't use IWL_DL_FW_ERRORS
      iwlwifi: pcie: add TPT oriented prints
      iwlwifi: mvm: support beacon IE injection
      iwlwifi: pcie: fix TX while flushing
      iwlwifi: mvm: reject new beacons when in inject mode
      iwlwifi: mvm: support non-transmitting AP
      iwlwifi: mvm: add some debug data to TX path

Sergey Matyukevich (2):
      qtnfmac: enable WPA3 OWE support
      qtnfmac: enable WPA3 SAE support

Shahar S Matityahu (33):
      iwlwifi dbg_ini: update ini structs doc
      iwlwifi: dbg_ini: fix iwl_fw_ini_buffer_location field enum bad naming
      iwlwifi: dbg_ini: give better naming to region struct fields
      iwlwifi: fix bad dma handling in page_mem dumping flow
      iwlwifi: differentiate between alive timeout and alive flow failure
      iwlwifi: dbg_ini: update ini triggers enum
      iwlwifi: dbg_ini: update max region id num to  support 64 regions
      iwlwifi: Fix pre operational dumping flows
      iwlwifi: dbg_ini: update ini structs meta doc
      iwlwifi: dbg_ini: remove redundant dram buffer allocation
      iwlwifi: dbg_ini: align struct iwl_fw_ini_region_cfg to the FW
      iwlwifi: dbg_ini: create new dump flow and implement prph dump
      iwlwifi: dbg_ini: implement csr memory dump
      iwlwifi: dbg_ini: implement device internal memory dump
      iwlwifi: dbg_ini: implement paging memory dump
      iwlwifi: fix send hcmd timeout recovery flow
      iwlwifi: dbg_ini: implement monitor sram memory dump
      iwlwifi: dbg_ini: implement monitor dram memory dump
      iwlwifi: receive umac and lmac error table addresses from TLVs
      iwlwifi: dbg_ini: rewrite trigger flow and align to FW API changes
      iwlwifi: mvm: add a debug_enable op
      iwlwifi: properly use delay option in dump trigger flow
      iwlwifi: dbg_ini: enable ignore consecutive trigger feature
      iwlwifi: dbg: buffer overflow in non_collect_ts_start array
      iwlwifi: dbg_ini: add early and after alive apply points to unified images
      iwlwifi: remove redundant condition from prior alive dump flow
      iwlwifi: dbg_ini: fix infinite time ignore consecutive dumps
      iwlwifi: dbg_ini: add print to iwl_dump_ini_mem in case of invalid range
      iwlwifi: dbg_ini: make memory dump get_size handler include headers
      iwlwifi: dbg_ini: make fill_range handler accept generic range pointer
      iwlwifi: dbg_ini: add region to fill_header handler
      iwlwifi: dbg_ini: implement Tx fifos dump
      iwlwifi: dbg_ini: implement Rx fifos dump

Shaul Triebitz (5):
      iwlwifi: introduce device family AX210
      iwlwifi: do not fail on large amount of channels
      iwlwifi: dbg: temporarily skip periphery dump for AX210 devices
      iwlwifi: align to new periphery address space for AX210 family
      iwlwifi: add force NMI for AX210 devices

Siva Rebbagondla (6):
      rsi: Add debug support for wowlan wakeup confirmation
      rsi: add hci detach for hibernation and poweroff
      rsi: fix wowlan wakeup issue for hibernate(S4)
      rsi: resolve power save issue after S4 resume
      rsi: fix for wowlan wakeup failure
      rsi: fix spelling mistakes

Stanislaw Gruszka (12):
      mt76x02: use mask for vifs
      mt76x02: use commmon add interface for mt76x2u
      mt76x02: initialize mutli bss mode when set up address
      mt76x02: minor beaconing init changes
      mt76x02: init beacon config for mt76x2u
      mt76: beaconing fixes for USB
      mt76x02: enable support for IBSS and MESH
      mt76x02u: use usb_bulk_msg to upload firmware
      mt76x02u: remove bogus check and comment padding
      rt2800: enable TX_PIN_CFG_LNA_PE_ bits per band
      rt2800: enable TX_PIN_CFG_RFRX_EN only for MT7620
      rt2800: comment and simplify AGC init for RT6352

Stefan Agner (1):
      mwifiex: don't print error message on coex event

Surabhi Vishnoi (2):
      ath10k: add a condition to fill the LDPC capability correctly
      ath10k: fill tx_duration for each peer in Tx stats per STA

Toke Høiland-Jørgensen (2):
      ath9k: Switch to mac80211 TXQ scheduling and airtime APIs
      ath10k: migrate to mac80211 txq scheduling

Tomislav Požega (2):
      rt2x00: remove unneeded check
      rt2x00: remove confusing AGC register

Triebitz (1):
      iwlwifi: pcie: allocate rb_stts's for all queues in one place

Wen Gong (1):
      ath10k: change swap mail box check after htc ready

Yu Wang (1):
      ath10k: fix S5 power consumption issue for QCA9377

YueHaibing (7):
      iwlwifi: mvm: remove duplicated include from ops.c
      ath10k: snoc: remove set but not used variable 'ar_snoc'
      rtlwifi: remove set but not used variable 'cmd_seq'
      brcmfmac: remove set but not used variable 'old_state'
      rsi: remove set but not used variables 'info, vif'
      libertas_tf: remove set but not used variable 'flags'
      rtl818x_pci: Remove set but not used variables 'io_addr, mem_addr'

Zhiwei Jiang (1):
      ath: move spin_lock_bh to spin_lock in tasklet

 drivers/net/wireless/ath/ath10k/Makefile           |    2 +-
 drivers/net/wireless/ath/ath10k/ahb.c              |   16 +-
 drivers/net/wireless/ath/ath10k/ahb.h              |   13 +-
 drivers/net/wireless/ath/ath10k/bmi.c              |   13 +-
 drivers/net/wireless/ath/ath10k/bmi.h              |   13 +-
 drivers/net/wireless/ath/ath10k/ce.c               |  117 ++-
 drivers/net/wireless/ath/ath10k/ce.h               |   29 +-
 drivers/net/wireless/ath/ath10k/core.c             |   45 +-
 drivers/net/wireless/ath/ath10k/core.h             |   42 +-
 drivers/net/wireless/ath/ath10k/coredump.c         |   15 +-
 drivers/net/wireless/ath/ath10k/coredump.h         |   13 +-
 drivers/net/wireless/ath/ath10k/debug.c            |   17 +-
 drivers/net/wireless/ath/ath10k/debug.h            |   33 +-
 drivers/net/wireless/ath/ath10k/debugfs_sta.c      |   23 +-
 drivers/net/wireless/ath/ath10k/hif.h              |   29 +-
 drivers/net/wireless/ath/ath10k/htc.c              |   22 +-
 drivers/net/wireless/ath/ath10k/htc.h              |   14 +-
 drivers/net/wireless/ath/ath10k/htt.c              |   15 +-
 drivers/net/wireless/ath/ath10k/htt.h              |   49 +-
 drivers/net/wireless/ath/ath10k/htt_rx.c           |  103 +-
 drivers/net/wireless/ath/ath10k/htt_tx.c           |   70 +-
 drivers/net/wireless/ath/ath10k/hw.c               |   23 +-
 drivers/net/wireless/ath/ath10k/hw.h               |   20 +-
 drivers/net/wireless/ath/ath10k/mac.c              |  249 +++--
 drivers/net/wireless/ath/ath10k/mac.h              |   13 +-
 drivers/net/wireless/ath/ath10k/p2p.c              |   13 +-
 drivers/net/wireless/ath/ath10k/p2p.h              |   13 +-
 drivers/net/wireless/ath/ath10k/pci.c              |   62 +-
 drivers/net/wireless/ath/ath10k/pci.h              |   16 +-
 drivers/net/wireless/ath/ath10k/qmi.c              |   13 +-
 drivers/net/wireless/ath/ath10k/qmi.h              |   13 +-
 drivers/net/wireless/ath/ath10k/qmi_wlfw_v01.c     |  242 ++++-
 drivers/net/wireless/ath/ath10k/qmi_wlfw_v01.h     |   47 +-
 drivers/net/wireless/ath/ath10k/rx_desc.h          |   13 +-
 drivers/net/wireless/ath/ath10k/sdio.c             |   59 +-
 drivers/net/wireless/ath/ath10k/sdio.h             |   13 +-
 drivers/net/wireless/ath/ath10k/snoc.c             |   93 +-
 drivers/net/wireless/ath/ath10k/snoc.h             |   15 +-
 drivers/net/wireless/ath/ath10k/spectral.c         |   16 +-
 drivers/net/wireless/ath/ath10k/spectral.h         |   13 +-
 drivers/net/wireless/ath/ath10k/swap.c             |   13 +-
 drivers/net/wireless/ath/ath10k/swap.h             |   13 +-
 drivers/net/wireless/ath/ath10k/targaddrs.h        |   13 +-
 drivers/net/wireless/ath/ath10k/testmode.c         |   15 +-
 drivers/net/wireless/ath/ath10k/testmode.h         |   13 +-
 drivers/net/wireless/ath/ath10k/testmode_i.h       |   13 +-
 drivers/net/wireless/ath/ath10k/thermal.c          |   13 +-
 drivers/net/wireless/ath/ath10k/thermal.h          |   13 +-
 drivers/net/wireless/ath/ath10k/trace.c            |   13 +-
 drivers/net/wireless/ath/ath10k/trace.h            |   13 +-
 drivers/net/wireless/ath/ath10k/txrx.c             |   19 +-
 drivers/net/wireless/ath/ath10k/txrx.h             |   13 +-
 drivers/net/wireless/ath/ath10k/usb.c              |   16 +-
 drivers/net/wireless/ath/ath10k/usb.h              |   13 +-
 drivers/net/wireless/ath/ath10k/wmi-ops.h          |   44 +-
 drivers/net/wireless/ath/ath10k/wmi-tlv.c          |   88 +-
 drivers/net/wireless/ath/ath10k/wmi-tlv.h          |   23 +-
 drivers/net/wireless/ath/ath10k/wmi.c              |   95 +-
 drivers/net/wireless/ath/ath10k/wmi.h              |   98 +-
 drivers/net/wireless/ath/ath10k/wow.c              |   20 +-
 drivers/net/wireless/ath/ath10k/wow.h              |   13 +-
 drivers/net/wireless/ath/ath6kl/wmi.c              |    4 +-
 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c     |   12 +-
 drivers/net/wireless/ath/ath9k/ath9k.h             |   14 -
 drivers/net/wireless/ath/ath9k/common-spectral.c   |    3 +
 drivers/net/wireless/ath/ath9k/debug.c             |    3 -
 drivers/net/wireless/ath/ath9k/debug.h             |    8 -
 drivers/net/wireless/ath/ath9k/debug_sta.c         |   70 --
 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c      |    6 +-
 drivers/net/wireless/ath/ath9k/init.c              |    9 +-
 drivers/net/wireless/ath/ath9k/recv.c              |    9 +-
 drivers/net/wireless/ath/ath9k/xmit.c              |  244 ++---
 drivers/net/wireless/ath/carl9170/rx.c             |    2 +-
 drivers/net/wireless/ath/regd.h                    |    2 +
 drivers/net/wireless/ath/regd_common.h             |    2 +
 .../wireless/broadcom/brcm80211/brcmfmac/bcdc.c    |   22 +-
 .../net/wireless/broadcom/brcm80211/brcmfmac/bus.h |   10 +
 .../broadcom/brcm80211/brcmfmac/cfg80211.c         |  577 +++++-----
 .../wireless/broadcom/brcm80211/brcmfmac/common.c  |   46 +-
 .../wireless/broadcom/brcm80211/brcmfmac/core.c    |  135 ++-
 .../wireless/broadcom/brcm80211/brcmfmac/core.h    |    2 +-
 .../wireless/broadcom/brcm80211/brcmfmac/debug.h   |   19 +-
 .../wireless/broadcom/brcm80211/brcmfmac/feature.c |   22 +-
 .../wireless/broadcom/brcm80211/brcmfmac/feature.h |    4 +-
 .../broadcom/brcm80211/brcmfmac/firmware.c         |    8 +-
 .../wireless/broadcom/brcm80211/brcmfmac/fweh.c    |   25 +-
 .../wireless/broadcom/brcm80211/brcmfmac/fweh.h    |   18 +-
 .../wireless/broadcom/brcm80211/brcmfmac/fwil.c    |   10 +-
 .../broadcom/brcm80211/brcmfmac/fwsignal.c         |   38 +-
 .../wireless/broadcom/brcm80211/brcmfmac/msgbuf.c  |   90 +-
 .../net/wireless/broadcom/brcm80211/brcmfmac/p2p.c |   88 +-
 .../wireless/broadcom/brcm80211/brcmfmac/pcie.c    |   65 +-
 .../net/wireless/broadcom/brcm80211/brcmfmac/pno.c |   22 +-
 .../wireless/broadcom/brcm80211/brcmfmac/proto.c   |    6 +-
 .../wireless/broadcom/brcm80211/brcmfmac/sdio.c    |   71 +-
 .../broadcom/brcm80211/brcmfmac/tracepoint.c       |    9 +-
 .../net/wireless/broadcom/brcm80211/brcmfmac/usb.c |    4 +-
 drivers/net/wireless/intel/iwlwifi/cfg/22000.c     |  104 +-
 drivers/net/wireless/intel/iwlwifi/cfg/9000.c      |    2 +-
 drivers/net/wireless/intel/iwlwifi/dvm/agn.h       |    9 +-
 drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c   |   47 +-
 drivers/net/wireless/intel/iwlwifi/dvm/main.c      |   19 +-
 drivers/net/wireless/intel/iwlwifi/dvm/rx.c        |    6 +-
 drivers/net/wireless/intel/iwlwifi/dvm/scan.c      |    3 +-
 drivers/net/wireless/intel/iwlwifi/fw/acpi.c       |   32 +
 drivers/net/wireless/intel/iwlwifi/fw/acpi.h       |   22 +-
 drivers/net/wireless/intel/iwlwifi/fw/api/alive.h  |   48 +-
 .../net/wireless/intel/iwlwifi/fw/api/commands.h   |    5 +
 .../net/wireless/intel/iwlwifi/fw/api/dbg-tlv.h    |  180 ++--
 .../net/wireless/intel/iwlwifi/fw/api/location.h   |  191 +++-
 .../net/wireless/intel/iwlwifi/fw/api/mac-cfg.h    |   27 +
 drivers/net/wireless/intel/iwlwifi/fw/api/power.h  |   24 +-
 drivers/net/wireless/intel/iwlwifi/fw/api/scan.h   |    6 +-
 drivers/net/wireless/intel/iwlwifi/fw/api/tx.h     |   18 +-
 drivers/net/wireless/intel/iwlwifi/fw/dbg.c        | 1110 +++++++++++++++-----
 drivers/net/wireless/intel/iwlwifi/fw/dbg.h        |   85 +-
 drivers/net/wireless/intel/iwlwifi/fw/debugfs.c    |   11 +-
 drivers/net/wireless/intel/iwlwifi/fw/debugfs.h    |    9 +-
 drivers/net/wireless/intel/iwlwifi/fw/error-dump.h |   95 +-
 drivers/net/wireless/intel/iwlwifi/fw/file.h       |   25 +
 drivers/net/wireless/intel/iwlwifi/fw/img.h        |   31 +-
 drivers/net/wireless/intel/iwlwifi/fw/init.c       |    3 +
 drivers/net/wireless/intel/iwlwifi/fw/runtime.h    |   23 +-
 drivers/net/wireless/intel/iwlwifi/iwl-config.h    |   52 +-
 drivers/net/wireless/intel/iwlwifi/iwl-csr.h       |    5 +
 drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c   |   23 +-
 drivers/net/wireless/intel/iwlwifi/iwl-debug.h     |    5 +-
 drivers/net/wireless/intel/iwlwifi/iwl-drv.c       |   77 +-
 .../net/wireless/intel/iwlwifi/iwl-eeprom-parse.c  |    3 +-
 .../net/wireless/intel/iwlwifi/iwl-eeprom-read.c   |   47 +-
 drivers/net/wireless/intel/iwlwifi/iwl-io.c        |   79 +-
 drivers/net/wireless/intel/iwlwifi/iwl-io.h        |   44 +
 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c |   31 +-
 drivers/net/wireless/intel/iwlwifi/iwl-prph.h      |    7 +-
 drivers/net/wireless/intel/iwlwifi/iwl-trans.h     |   41 +
 drivers/net/wireless/intel/iwlwifi/mvm/Makefile    |    1 +
 drivers/net/wireless/intel/iwlwifi/mvm/coex.c      |    7 +-
 drivers/net/wireless/intel/iwlwifi/mvm/constants.h |    7 +
 drivers/net/wireless/intel/iwlwifi/mvm/d3.c        |    2 +-
 drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c   |  138 ++-
 .../net/wireless/intel/iwlwifi/mvm/ftm-initiator.c |  654 ++++++++++++
 .../net/wireless/intel/iwlwifi/mvm/ftm-responder.c |  244 +++++
 drivers/net/wireless/intel/iwlwifi/mvm/fw.c        |  141 ++-
 drivers/net/wireless/intel/iwlwifi/mvm/led.c       |    3 +
 drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c  |  124 ++-
 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c  |  292 ++++-
 drivers/net/wireless/intel/iwlwifi/mvm/mvm.h       |   61 +-
 drivers/net/wireless/intel/iwlwifi/mvm/ops.c       |   63 +-
 drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c  |    1 +
 drivers/net/wireless/intel/iwlwifi/mvm/power.c     |   23 +-
 drivers/net/wireless/intel/iwlwifi/mvm/rs.c        |   30 +-
 drivers/net/wireless/intel/iwlwifi/mvm/rx.c        |    2 +-
 drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c      |  103 +-
 drivers/net/wireless/intel/iwlwifi/mvm/scan.c      |   20 +-
 drivers/net/wireless/intel/iwlwifi/mvm/sta.c       |  152 +--
 drivers/net/wireless/intel/iwlwifi/mvm/sta.h       |    3 +
 .../net/wireless/intel/iwlwifi/mvm/time-event.c    |    2 +-
 drivers/net/wireless/intel/iwlwifi/mvm/tx.c        |   27 +-
 drivers/net/wireless/intel/iwlwifi/mvm/utils.c     |   31 +-
 .../wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c   |   16 +-
 .../net/wireless/intel/iwlwifi/pcie/ctxt-info.c    |    6 +-
 drivers/net/wireless/intel/iwlwifi/pcie/drv.c      |  115 +-
 drivers/net/wireless/intel/iwlwifi/pcie/internal.h |   30 +-
 drivers/net/wireless/intel/iwlwifi/pcie/rx.c       |  118 ++-
 .../net/wireless/intel/iwlwifi/pcie/trans-gen2.c   |   28 +-
 drivers/net/wireless/intel/iwlwifi/pcie/trans.c    |  213 ++--
 drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c  |    8 +-
 drivers/net/wireless/intel/iwlwifi/pcie/tx.c       |   30 +-
 drivers/net/wireless/intersil/orinoco/mic.c        |   10 +-
 drivers/net/wireless/marvell/libertas_tf/cmd.c     |    9 +-
 drivers/net/wireless/marvell/libertas_tf/if_usb.c  |   38 +-
 .../net/wireless/marvell/libertas_tf/libertas_tf.h |   18 +-
 drivers/net/wireless/marvell/libertas_tf/main.c    |  103 +-
 drivers/net/wireless/marvell/mwifiex/cfg80211.c    |   23 +-
 drivers/net/wireless/marvell/mwifiex/ioctl.h       |    1 +
 drivers/net/wireless/marvell/mwifiex/sta_ioctl.c   |   11 +-
 drivers/net/wireless/marvell/mwifiex/uap_event.c   |    2 +-
 drivers/net/wireless/mediatek/mt76/Makefile        |    3 +-
 drivers/net/wireless/mediatek/mt76/dma.c           |   29 +-
 drivers/net/wireless/mediatek/mt76/dma.h           |    2 +-
 drivers/net/wireless/mediatek/mt76/mac80211.c      |   11 +-
 drivers/net/wireless/mediatek/mt76/mcu.c           |   60 ++
 drivers/net/wireless/mediatek/mt76/mt76.h          |   32 +-
 drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c |   16 +-
 drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.h |    7 +-
 drivers/net/wireless/mediatek/mt76/mt76x0/init.c   |   39 +-
 drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h |    4 -
 drivers/net/wireless/mediatek/mt76/mt76x0/pci.c    |   19 +-
 drivers/net/wireless/mediatek/mt76/mt76x0/phy.c    |   11 +-
 drivers/net/wireless/mediatek/mt76/mt76x0/usb.c    |   26 +-
 .../net/wireless/mediatek/mt76/mt76x0/usb_mcu.c    |    6 -
 drivers/net/wireless/mediatek/mt76/mt76x02.h       |    7 +-
 drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c   |    2 +-
 drivers/net/wireless/mediatek/mt76/mt76x02_mac.c   |   90 +-
 drivers/net/wireless/mediatek/mt76/mt76x02_mac.h   |    8 +-
 drivers/net/wireless/mediatek/mt76/mt76x02_mcu.c   |   69 +-
 drivers/net/wireless/mediatek/mt76/mt76x02_mcu.h   |    6 +
 drivers/net/wireless/mediatek/mt76/mt76x02_txrx.c  |   12 +-
 .../net/wireless/mediatek/mt76/mt76x02_usb_core.c  |   14 +-
 .../net/wireless/mediatek/mt76/mt76x02_usb_mcu.c   |   72 +-
 drivers/net/wireless/mediatek/mt76/mt76x02_util.c  |   79 +-
 drivers/net/wireless/mediatek/mt76/mt76x2/mt76x2.h |    1 -
 .../net/wireless/mediatek/mt76/mt76x2/mt76x2u.h    |    1 -
 drivers/net/wireless/mediatek/mt76/mt76x2/pci.c    |   26 +-
 .../net/wireless/mediatek/mt76/mt76x2/pci_init.c   |   31 +-
 .../net/wireless/mediatek/mt76/mt76x2/pci_main.c   |    2 +-
 .../net/wireless/mediatek/mt76/mt76x2/pci_phy.c    |    6 +-
 drivers/net/wireless/mediatek/mt76/mt76x2/phy.c    |    2 +-
 drivers/net/wireless/mediatek/mt76/mt76x2/usb.c    |   24 +-
 .../net/wireless/mediatek/mt76/mt76x2/usb_init.c   |   32 +-
 .../net/wireless/mediatek/mt76/mt76x2/usb_main.c   |   17 +-
 drivers/net/wireless/mediatek/mt76/tx.c            |    5 +-
 drivers/net/wireless/mediatek/mt76/usb.c           |  162 ++-
 drivers/net/wireless/mediatek/mt76/usb_mcu.c       |   13 +-
 drivers/net/wireless/quantenna/qtnfmac/cfg80211.c  |   40 +-
 drivers/net/wireless/quantenna/qtnfmac/commands.c  |   29 +
 drivers/net/wireless/quantenna/qtnfmac/commands.h  |    2 +
 drivers/net/wireless/quantenna/qtnfmac/event.c     |  185 +++-
 drivers/net/wireless/quantenna/qtnfmac/qlink.h     |   36 +
 drivers/net/wireless/ralink/rt2x00/rt2800lib.c     |  141 +--
 drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c |    6 +-
 drivers/net/wireless/realtek/rtlwifi/base.c        |   29 +-
 drivers/net/wireless/realtek/rtlwifi/base.h        |   26 +-
 .../realtek/rtlwifi/btcoexist/halbt_precomp.h      |   27 +-
 .../realtek/rtlwifi/btcoexist/halbtc8192e2ant.c    |   35 +-
 .../realtek/rtlwifi/btcoexist/halbtc8192e2ant.h    |   27 +-
 .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.c    |   26 +-
 .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.h    |   27 +-
 .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.c    |   27 +-
 .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.h    |   27 +-
 .../realtek/rtlwifi/btcoexist/halbtc8821a1ant.c    |   26 +-
 .../realtek/rtlwifi/btcoexist/halbtc8821a1ant.h    |   26 +-
 .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.c    |   26 +-
 .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.h    |   26 +-
 .../rtlwifi/btcoexist/halbtc8822bwifionly.c        |   17 +-
 .../rtlwifi/btcoexist/halbtc8822bwifionly.h        |   17 +-
 .../realtek/rtlwifi/btcoexist/halbtcoutsrc.c       |   26 +-
 .../realtek/rtlwifi/btcoexist/halbtcoutsrc.h       |   27 +-
 .../wireless/realtek/rtlwifi/btcoexist/rtl_btc.c   |   27 +-
 .../wireless/realtek/rtlwifi/btcoexist/rtl_btc.h   |   25 +-
 drivers/net/wireless/realtek/rtlwifi/cam.c         |   27 +-
 drivers/net/wireless/realtek/rtlwifi/cam.h         |   26 +-
 drivers/net/wireless/realtek/rtlwifi/core.c        |   26 +-
 drivers/net/wireless/realtek/rtlwifi/core.h        |   26 +-
 drivers/net/wireless/realtek/rtlwifi/debug.c       |   25 +-
 drivers/net/wireless/realtek/rtlwifi/debug.h       |   27 +-
 drivers/net/wireless/realtek/rtlwifi/efuse.c       |   71 +-
 drivers/net/wireless/realtek/rtlwifi/efuse.h       |   28 +-
 drivers/net/wireless/realtek/rtlwifi/pci.c         |   26 +-
 drivers/net/wireless/realtek/rtlwifi/pci.h         |   26 +-
 drivers/net/wireless/realtek/rtlwifi/ps.c          |   26 +-
 drivers/net/wireless/realtek/rtlwifi/ps.h          |   26 +-
 drivers/net/wireless/realtek/rtlwifi/pwrseqcmd.h   |   26 +-
 drivers/net/wireless/realtek/rtlwifi/rc.c          |   26 +-
 drivers/net/wireless/realtek/rtlwifi/rc.h          |   26 +-
 drivers/net/wireless/realtek/rtlwifi/regd.c        |   34 +-
 drivers/net/wireless/realtek/rtlwifi/regd.h        |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8188ee/def.h   |   29 +-
 .../net/wireless/realtek/rtlwifi/rtl8188ee/dm.c    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8188ee/dm.h    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8188ee/fw.c    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8188ee/fw.h    |   25 +-
 .../net/wireless/realtek/rtlwifi/rtl8188ee/hw.c    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8188ee/hw.h    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8188ee/led.c   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8188ee/led.h   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8188ee/phy.c   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8188ee/phy.h   |   26 +-
 .../wireless/realtek/rtlwifi/rtl8188ee/pwrseq.c    |   26 +-
 .../wireless/realtek/rtlwifi/rtl8188ee/pwrseq.h    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8188ee/reg.h   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8188ee/rf.c    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8188ee/rf.h    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8188ee/sw.c    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8188ee/sw.h    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8188ee/table.c |   28 +-
 .../net/wireless/realtek/rtlwifi/rtl8188ee/table.h |   28 +-
 .../net/wireless/realtek/rtlwifi/rtl8188ee/trx.c   |   30 +-
 .../net/wireless/realtek/rtlwifi/rtl8188ee/trx.h   |   26 +-
 .../wireless/realtek/rtlwifi/rtl8192c/dm_common.c  |   26 +-
 .../wireless/realtek/rtlwifi/rtl8192c/dm_common.h  |   30 +-
 .../wireless/realtek/rtlwifi/rtl8192c/fw_common.c  |   40 +-
 .../wireless/realtek/rtlwifi/rtl8192c/fw_common.h  |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192c/main.c   |   26 +-
 .../wireless/realtek/rtlwifi/rtl8192c/phy_common.c |   50 +-
 .../wireless/realtek/rtlwifi/rtl8192c/phy_common.h |   32 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ce/def.h   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ce/dm.c    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ce/dm.h    |   30 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ce/hw.c    |   66 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ce/hw.h    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ce/led.c   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ce/led.h   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ce/phy.c   |   36 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ce/phy.h   |   32 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ce/reg.h   |   85 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ce/rf.c    |  138 +--
 .../net/wireless/realtek/rtlwifi/rtl8192ce/rf.h    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ce/sw.c    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ce/sw.h    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ce/table.c |   28 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ce/table.h |   28 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ce/trx.c   |   30 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ce/trx.h   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192cu/def.h   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192cu/dm.c    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192cu/dm.h    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192cu/hw.c    |  304 +++---
 .../net/wireless/realtek/rtlwifi/rtl8192cu/hw.h    |   30 +-
 .../net/wireless/realtek/rtlwifi/rtl8192cu/led.c   |   30 +-
 .../net/wireless/realtek/rtlwifi/rtl8192cu/led.h   |   24 +-
 .../net/wireless/realtek/rtlwifi/rtl8192cu/mac.c   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192cu/mac.h   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192cu/phy.c   |   42 +-
 .../net/wireless/realtek/rtlwifi/rtl8192cu/phy.h   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192cu/reg.h   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192cu/rf.c    |  138 +--
 .../net/wireless/realtek/rtlwifi/rtl8192cu/rf.h    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192cu/sw.c    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192cu/sw.h    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192cu/table.c |   34 +-
 .../net/wireless/realtek/rtlwifi/rtl8192cu/table.h |   42 +-
 .../net/wireless/realtek/rtlwifi/rtl8192cu/trx.c   |   88 +-
 .../net/wireless/realtek/rtlwifi/rtl8192cu/trx.h   |   30 +-
 .../net/wireless/realtek/rtlwifi/rtl8192de/def.h   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192de/dm.c    |   50 +-
 .../net/wireless/realtek/rtlwifi/rtl8192de/dm.h    |   28 +-
 .../net/wireless/realtek/rtlwifi/rtl8192de/fw.c    |   42 +-
 .../net/wireless/realtek/rtlwifi/rtl8192de/fw.h    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192de/hw.c    |   92 +-
 .../net/wireless/realtek/rtlwifi/rtl8192de/hw.h    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192de/led.c   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192de/led.h   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192de/phy.c   |   94 +-
 .../net/wireless/realtek/rtlwifi/rtl8192de/phy.h   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192de/reg.h   |   54 +-
 .../net/wireless/realtek/rtlwifi/rtl8192de/rf.c    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192de/rf.h    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192de/sw.c    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192de/sw.h    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192de/table.c |   27 +-
 .../net/wireless/realtek/rtlwifi/rtl8192de/table.h |   27 +-
 .../net/wireless/realtek/rtlwifi/rtl8192de/trx.c   |   28 +-
 .../net/wireless/realtek/rtlwifi/rtl8192de/trx.h   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ee/def.h   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ee/dm.c    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ee/dm.h    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ee/fw.c    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ee/fw.h    |   25 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ee/hw.c    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ee/hw.h    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ee/led.c   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ee/led.h   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ee/phy.c   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ee/phy.h   |   26 +-
 .../wireless/realtek/rtlwifi/rtl8192ee/pwrseq.c    |   26 +-
 .../wireless/realtek/rtlwifi/rtl8192ee/pwrseq.h    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ee/reg.h   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ee/rf.c    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ee/rf.h    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ee/sw.c    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ee/sw.h    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ee/table.c |   28 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ee/table.h |   28 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ee/trx.c   |   28 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ee/trx.h   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192se/def.h   |   27 +-
 .../net/wireless/realtek/rtlwifi/rtl8192se/dm.c    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192se/dm.h    |   29 +-
 .../net/wireless/realtek/rtlwifi/rtl8192se/fw.c    |   30 +-
 .../net/wireless/realtek/rtlwifi/rtl8192se/fw.h    |   33 +-
 .../net/wireless/realtek/rtlwifi/rtl8192se/hw.c    |   48 +-
 .../net/wireless/realtek/rtlwifi/rtl8192se/hw.h    |   27 +-
 .../net/wireless/realtek/rtlwifi/rtl8192se/led.c   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192se/led.h   |   27 +-
 .../net/wireless/realtek/rtlwifi/rtl8192se/phy.c   |   70 +-
 .../net/wireless/realtek/rtlwifi/rtl8192se/phy.h   |   27 +-
 .../net/wireless/realtek/rtlwifi/rtl8192se/reg.h   |   75 +-
 .../net/wireless/realtek/rtlwifi/rtl8192se/rf.c    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192se/rf.h    |   27 +-
 .../net/wireless/realtek/rtlwifi/rtl8192se/sw.c    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8192se/sw.h    |   25 +-
 .../net/wireless/realtek/rtlwifi/rtl8192se/table.c |   27 +-
 .../net/wireless/realtek/rtlwifi/rtl8192se/table.h |   20 +-
 .../net/wireless/realtek/rtlwifi/rtl8192se/trx.c   |   30 +-
 .../net/wireless/realtek/rtlwifi/rtl8192se/trx.h   |   27 +-
 .../net/wireless/realtek/rtlwifi/rtl8723ae/btc.h   |   25 +-
 .../net/wireless/realtek/rtlwifi/rtl8723ae/def.h   |   28 +-
 .../net/wireless/realtek/rtlwifi/rtl8723ae/dm.c    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8723ae/dm.h    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8723ae/fw.c    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8723ae/fw.h    |   25 +-
 .../realtek/rtlwifi/rtl8723ae/hal_bt_coexist.c     |   26 +-
 .../realtek/rtlwifi/rtl8723ae/hal_bt_coexist.h     |   25 +-
 .../wireless/realtek/rtlwifi/rtl8723ae/hal_btc.c   |   27 +-
 .../wireless/realtek/rtlwifi/rtl8723ae/hal_btc.h   |   25 +-
 .../net/wireless/realtek/rtlwifi/rtl8723ae/hw.c    |   34 +-
 .../net/wireless/realtek/rtlwifi/rtl8723ae/hw.h    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8723ae/led.c   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8723ae/led.h   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8723ae/phy.c   |   28 +-
 .../net/wireless/realtek/rtlwifi/rtl8723ae/phy.h   |   28 +-
 .../wireless/realtek/rtlwifi/rtl8723ae/pwrseq.c    |   26 +-
 .../wireless/realtek/rtlwifi/rtl8723ae/pwrseq.h    |   44 +-
 .../net/wireless/realtek/rtlwifi/rtl8723ae/reg.h   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8723ae/rf.c    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8723ae/rf.h    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8723ae/sw.c    |   28 +-
 .../net/wireless/realtek/rtlwifi/rtl8723ae/sw.h    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8723ae/table.c |   28 +-
 .../net/wireless/realtek/rtlwifi/rtl8723ae/table.h |   28 +-
 .../net/wireless/realtek/rtlwifi/rtl8723ae/trx.c   |   30 +-
 .../net/wireless/realtek/rtlwifi/rtl8723ae/trx.h   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8723be/def.h   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8723be/dm.c    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8723be/dm.h    |   23 +-
 .../net/wireless/realtek/rtlwifi/rtl8723be/fw.c    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8723be/fw.h    |   25 +-
 .../net/wireless/realtek/rtlwifi/rtl8723be/hw.c    |   40 +-
 .../net/wireless/realtek/rtlwifi/rtl8723be/hw.h    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8723be/led.c   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8723be/led.h   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8723be/phy.c   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8723be/phy.h   |   26 +-
 .../wireless/realtek/rtlwifi/rtl8723be/pwrseq.c    |   26 +-
 .../wireless/realtek/rtlwifi/rtl8723be/pwrseq.h    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8723be/reg.h   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8723be/rf.c    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8723be/rf.h    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8723be/sw.c    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8723be/sw.h    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8723be/table.c |   28 +-
 .../net/wireless/realtek/rtlwifi/rtl8723be/table.h |   28 +-
 .../net/wireless/realtek/rtlwifi/rtl8723be/trx.c   |   30 +-
 .../net/wireless/realtek/rtlwifi/rtl8723be/trx.h   |   26 +-
 .../realtek/rtlwifi/rtl8723com/dm_common.c         |   26 +-
 .../realtek/rtlwifi/rtl8723com/dm_common.h         |   26 +-
 .../realtek/rtlwifi/rtl8723com/fw_common.c         |   26 +-
 .../realtek/rtlwifi/rtl8723com/fw_common.h         |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8723com/main.c |   26 +-
 .../realtek/rtlwifi/rtl8723com/phy_common.c        |   26 +-
 .../realtek/rtlwifi/rtl8723com/phy_common.h        |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8821ae/def.h   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8821ae/dm.c    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8821ae/dm.h    |   36 +-
 .../net/wireless/realtek/rtlwifi/rtl8821ae/fw.c    |  128 +--
 .../net/wireless/realtek/rtlwifi/rtl8821ae/fw.h    |   25 +-
 .../net/wireless/realtek/rtlwifi/rtl8821ae/hw.c    |  260 +++--
 .../net/wireless/realtek/rtlwifi/rtl8821ae/hw.h    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8821ae/led.c   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8821ae/led.h   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8821ae/phy.c   |  158 ++-
 .../net/wireless/realtek/rtlwifi/rtl8821ae/phy.h   |   30 +-
 .../wireless/realtek/rtlwifi/rtl8821ae/pwrseq.c    |   26 +-
 .../wireless/realtek/rtlwifi/rtl8821ae/pwrseq.h    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8821ae/reg.h   |   60 +-
 .../net/wireless/realtek/rtlwifi/rtl8821ae/rf.c    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8821ae/rf.h    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8821ae/sw.c    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8821ae/sw.h    |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8821ae/table.c |  213 ++--
 .../net/wireless/realtek/rtlwifi/rtl8821ae/table.h |   28 +-
 .../net/wireless/realtek/rtlwifi/rtl8821ae/trx.c   |   26 +-
 .../net/wireless/realtek/rtlwifi/rtl8821ae/trx.h   |   26 +-
 drivers/net/wireless/realtek/rtlwifi/stats.c       |   27 +-
 drivers/net/wireless/realtek/rtlwifi/stats.h       |   26 +-
 drivers/net/wireless/realtek/rtlwifi/usb.c         |   30 +-
 drivers/net/wireless/realtek/rtlwifi/usb.h         |   26 +-
 drivers/net/wireless/realtek/rtlwifi/wifi.h        |   52 +-
 drivers/net/wireless/rsi/rsi_91x_debugfs.c         |    8 +-
 drivers/net/wireless/rsi/rsi_91x_mac80211.c        |   41 +-
 drivers/net/wireless/rsi/rsi_91x_main.c            |    6 -
 drivers/net/wireless/rsi/rsi_91x_mgmt.c            |   37 +-
 drivers/net/wireless/rsi/rsi_91x_sdio.c            |   24 +-
 drivers/net/wireless/rsi/rsi_91x_usb.c             |    9 +-
 drivers/net/wireless/rsi/rsi_main.h                |    1 +
 include/linux/ieee80211.h                          |    2 +
 include/net/ieee80211_radiotap.h                   |    6 +
 478 files changed, 8789 insertions(+), 10522 deletions(-)
 create mode 100644 drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c
 create mode 100644 drivers/net/wireless/intel/iwlwifi/mvm/ftm-responder.c
 create mode 100644 drivers/net/wireless/mediatek/mt76/mcu.c

^ permalink raw reply

* Re: [PATCH v2 00/12] wil6210 patches
From: merez @ 2019-02-22 14:29 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless, wil6210, linux-wireless-owner
In-Reply-To: <1548689786-23288-1-git-send-email-merez@codeaurora.org>

On 2019-01-28 17:36, Maya Erez wrote:
> Changes from V1:
> - Update copyright year to 2019.
> - Change bool usage in structures to u8.
> 
> The following set of patches include:
> - Use platform specific configuration instead of wil6210 module 
> parameters
> - Various wil6210 fixes.
> 
> Ahmad Masri (5):
>   wil6210: support ndo_select_queue in net_device_ops
>   wil6210: add support for AC queues per station
>   wil6210: support up to 20 stations in AP mode
>   wil6210: accessing 802.3 addresses via utility functions
>   wil6210: prevent device memory access while in reset or suspend
> 
> Alexei Avshalom Lazar (2):
>   wil6210: check null pointer in _wil_cfg80211_merge_extra_ies
>   wil6210: align to latest auto generated wmi.h
> 
> Dedy Lansky (2):
>   wil6210: add option to drop Tx packets when tx ring is full
>   wil6210: fix invalid sta statistics update
> 
> Maya Erez (3):
>   wil6210: remove rtap_include_phy_info module param
>   wil6210: use platform specific configuration
>   wil6210: ignore HALP ICR if already handled
> 
>  drivers/net/wireless/ath/wil6210/cfg80211.c       |  43 ++-
>  drivers/net/wireless/ath/wil6210/debugfs.c        |  48 ++-
>  drivers/net/wireless/ath/wil6210/interrupt.c      |  12 +-
>  drivers/net/wireless/ath/wil6210/main.c           | 162 +++++----
>  drivers/net/wireless/ath/wil6210/netdev.c         |  77 +++-
>  drivers/net/wireless/ath/wil6210/pcie_bus.c       |  33 +-
>  drivers/net/wireless/ath/wil6210/pm.c             |  31 +-
>  drivers/net/wireless/ath/wil6210/rx_reorder.c     |  10 +-
>  drivers/net/wireless/ath/wil6210/trace.h          |   3 +-
>  drivers/net/wireless/ath/wil6210/txrx.c           | 407 
> +++++++++++++++-------
>  drivers/net/wireless/ath/wil6210/txrx.h           |  51 ++-
>  drivers/net/wireless/ath/wil6210/txrx_edma.c      |  14 +-
>  drivers/net/wireless/ath/wil6210/wil6210.h        |  70 ++--
>  drivers/net/wireless/ath/wil6210/wil_crash_dump.c |  18 +-
>  drivers/net/wireless/ath/wil6210/wil_platform.h   |  29 ++
>  drivers/net/wireless/ath/wil6210/wmi.c            | 111 ++++--
>  drivers/net/wireless/ath/wil6210/wmi.h            |  48 ++-
>  17 files changed, 809 insertions(+), 358 deletions(-)

Please drop this set of patches.
I upstreamed a new set of patches.

-- 
Maya Erez
Qualcomm Israel, Inc. on behalf of Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a 
Linux Foundation Collaborative Project

^ permalink raw reply

* [PATCH 07/21] wil6210: check null pointer in _wil_cfg80211_merge_extra_ies
From: Maya Erez @ 2019-02-22 14:21 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Alexei Avshalom Lazar, linux-wireless, wil6210, Maya Erez
In-Reply-To: <1550845279-16103-1-git-send-email-merez@codeaurora.org>

From: Alexei Avshalom Lazar <ailizaro@codeaurora.org>

ies1 or ies2 might be null when code inside
_wil_cfg80211_merge_extra_ies access them.
Add explicit check for null and make sure ies1/ies2 are not
accessed in such a case.

spos might be null and be accessed inside
_wil_cfg80211_merge_extra_ies.
Add explicit check for null in the while condition statement
and make sure spos is not accessed in such a case.

Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
---
 drivers/net/wireless/ath/wil6210/cfg80211.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c b/drivers/net/wireless/ath/wil6210/cfg80211.c
index 9a9d55b..a1e226652 100644
--- a/drivers/net/wireless/ath/wil6210/cfg80211.c
+++ b/drivers/net/wireless/ath/wil6210/cfg80211.c
@@ -1580,6 +1580,12 @@ static int _wil_cfg80211_merge_extra_ies(const u8 *ies1, u16 ies1_len,
 	u8 *buf, *dpos;
 	const u8 *spos;
 
+	if (!ies1)
+		ies1_len = 0;
+
+	if (!ies2)
+		ies2_len = 0;
+
 	if (ies1_len == 0 && ies2_len == 0) {
 		*merged_ies = NULL;
 		*merged_len = 0;
@@ -1589,17 +1595,19 @@ static int _wil_cfg80211_merge_extra_ies(const u8 *ies1, u16 ies1_len,
 	buf = kmalloc(ies1_len + ies2_len, GFP_KERNEL);
 	if (!buf)
 		return -ENOMEM;
-	memcpy(buf, ies1, ies1_len);
+	if (ies1)
+		memcpy(buf, ies1, ies1_len);
 	dpos = buf + ies1_len;
 	spos = ies2;
-	while (spos + 1 < ies2 + ies2_len) {
+	while (spos && (spos + 1 < ies2 + ies2_len)) {
 		/* IE tag at offset 0, length at offset 1 */
 		u16 ielen = 2 + spos[1];
 
 		if (spos + ielen > ies2 + ies2_len)
 			break;
 		if (spos[0] == WLAN_EID_VENDOR_SPECIFIC &&
-		    !_wil_cfg80211_find_ie(ies1, ies1_len, spos, ielen)) {
+		    (!ies1 || !_wil_cfg80211_find_ie(ies1, ies1_len,
+						     spos, ielen))) {
 			memcpy(dpos, spos, ielen);
 			dpos += ielen;
 		}
-- 
1.9.1


^ permalink raw reply related

* [PATCH 10/21] wil6210: increase PCP stop command timeout
From: Maya Erez @ 2019-02-22 14:21 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Maya Erez, linux-wireless, wil6210
In-Reply-To: <1550845279-16103-1-git-send-email-merez@codeaurora.org>

In case there are connected stations, FW needs to disconnect
them before handling PCP stop. This flow can take several
seconds.
Increasing PCP stop timeout to 5 seconds to allow that.

Signed-off-by: Maya Erez <merez@codeaurora.org>
---
 drivers/net/wireless/ath/wil6210/wmi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c
index c737a79e..19247c5 100644
--- a/drivers/net/wireless/ath/wil6210/wmi.c
+++ b/drivers/net/wireless/ath/wil6210/wmi.c
@@ -41,6 +41,7 @@
 
 #define WIL_WAIT_FOR_SUSPEND_RESUME_COMP 200
 #define WIL_WMI_CALL_GENERAL_TO_MS 100
+#define WIL_WMI_PCP_STOP_TO_MS 5000
 
 /**
  * WMI event receiving - theory of operations
@@ -2195,7 +2196,8 @@ int wmi_pcp_stop(struct wil6210_vif *vif)
 		return rc;
 
 	return wmi_call(wil, WMI_PCP_STOP_CMDID, vif->mid, NULL, 0,
-			WMI_PCP_STOPPED_EVENTID, NULL, 0, 20);
+			WMI_PCP_STOPPED_EVENTID, NULL, 0,
+			WIL_WMI_PCP_STOP_TO_MS);
 }
 
 int wmi_set_ssid(struct wil6210_vif *vif, u8 ssid_len, const void *ssid)
-- 
1.9.1


^ permalink raw reply related

* [PATCH 13/21] wil6210: check mid is valid
From: Maya Erez @ 2019-02-22 14:21 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Ahmad Masri, linux-wireless, wil6210, Maya Erez
In-Reply-To: <1550845279-16103-1-git-send-email-merez@codeaurora.org>

From: Ahmad Masri <amasri@codeaurora.org>

Check that the mid is valid and that it does not exceed the memory
size allocated to vifs array.

Signed-off-by: Ahmad Masri <amasri@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
---
 drivers/net/wireless/ath/wil6210/cfg80211.c |  6 +++---
 drivers/net/wireless/ath/wil6210/debugfs.c  | 10 +++++-----
 drivers/net/wireless/ath/wil6210/main.c     |  8 ++++----
 drivers/net/wireless/ath/wil6210/netdev.c   | 10 +++++-----
 drivers/net/wireless/ath/wil6210/pcie_bus.c |  4 ++--
 drivers/net/wireless/ath/wil6210/pm.c       |  6 +++---
 drivers/net/wireless/ath/wil6210/wil6210.h  |  1 +
 drivers/net/wireless/ath/wil6210/wmi.c      |  2 +-
 8 files changed, 24 insertions(+), 23 deletions(-)

diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c b/drivers/net/wireless/ath/wil6210/cfg80211.c
index a1e226652..e8d65dd 100644
--- a/drivers/net/wireless/ath/wil6210/cfg80211.c
+++ b/drivers/net/wireless/ath/wil6210/cfg80211.c
@@ -465,7 +465,7 @@ static int wil_cfg80211_validate_add_iface(struct wil6210_priv *wil,
 		.num_different_channels = 1,
 	};
 
-	for (i = 0; i < wil->max_vifs; i++) {
+	for (i = 0; i < GET_MAX_VIFS(wil); i++) {
 		if (wil->vifs[i]) {
 			wdev = vif_to_wdev(wil->vifs[i]);
 			params.iftype_num[wdev->iftype]++;
@@ -486,7 +486,7 @@ static int wil_cfg80211_validate_change_iface(struct wil6210_priv *wil,
 	};
 	bool check_combos = false;
 
-	for (i = 0; i < wil->max_vifs; i++) {
+	for (i = 0; i < GET_MAX_VIFS(wil); i++) {
 		struct wil6210_vif *vif_pos = wil->vifs[i];
 
 		if (vif_pos && vif != vif_pos) {
@@ -1806,7 +1806,7 @@ void wil_cfg80211_ap_recovery(struct wil6210_priv *wil)
 	int rc, i;
 	struct wiphy *wiphy = wil_to_wiphy(wil);
 
-	for (i = 0; i < wil->max_vifs; i++) {
+	for (i = 0; i < GET_MAX_VIFS(wil); i++) {
 		struct wil6210_vif *vif = wil->vifs[i];
 		struct net_device *ndev;
 		struct cfg80211_beacon_data bcon = {};
diff --git a/drivers/net/wireless/ath/wil6210/debugfs.c b/drivers/net/wireless/ath/wil6210/debugfs.c
index 27cb182..817762f 100644
--- a/drivers/net/wireless/ath/wil6210/debugfs.c
+++ b/drivers/net/wireless/ath/wil6210/debugfs.c
@@ -1381,7 +1381,7 @@ static int link_show(struct seq_file *s, void *data)
 		if (p->status != wil_sta_connected)
 			continue;
 
-		vif = (mid < wil->max_vifs) ? wil->vifs[mid] : NULL;
+		vif = (mid < GET_MAX_VIFS(wil)) ? wil->vifs[mid] : NULL;
 		if (vif) {
 			rc = wil_cid_fill_sinfo(vif, i, sinfo);
 			if (rc)
@@ -1579,7 +1579,7 @@ static int sta_show(struct seq_file *s, void *data)
 			break;
 		}
 		mid = (p->status != wil_sta_unused) ? p->mid : U8_MAX;
-		if (mid < wil->max_vifs) {
+		if (mid < GET_MAX_VIFS(wil)) {
 			struct wil6210_vif *vif = wil->vifs[mid];
 
 			if (vif->wdev.iftype == NL80211_IFTYPE_STATION &&
@@ -1645,7 +1645,7 @@ static int mids_show(struct seq_file *s, void *data)
 	int i;
 
 	mutex_lock(&wil->vif_mutex);
-	for (i = 0; i < wil->max_vifs; i++) {
+	for (i = 0; i < GET_MAX_VIFS(wil); i++) {
 		vif = wil->vifs[i];
 
 		if (vif) {
@@ -1866,7 +1866,7 @@ static int wil_link_stats_debugfs_show(struct seq_file *s, void *data)
 	/* iterate over all MIDs and show per-cid statistics. Then show the
 	 * global statistics
 	 */
-	for (i = 0; i < wil->max_vifs; i++) {
+	for (i = 0; i < GET_MAX_VIFS(wil); i++) {
 		vif = wil->vifs[i];
 
 		seq_printf(s, "MID %d ", i);
@@ -1922,7 +1922,7 @@ static ssize_t wil_link_stats_write(struct file *file, const char __user *buf,
 	if (rc)
 		return rc;
 
-	for (i = 0; i < wil->max_vifs; i++) {
+	for (i = 0; i < GET_MAX_VIFS(wil); i++) {
 		vif = wil->vifs[i];
 		if (!vif)
 			continue;
diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c
index f2432ad..6a6bfb3 100644
--- a/drivers/net/wireless/ath/wil6210/main.c
+++ b/drivers/net/wireless/ath/wil6210/main.c
@@ -685,7 +685,7 @@ void wil_bcast_fini_all(struct wil6210_priv *wil)
 	int i;
 	struct wil6210_vif *vif;
 
-	for (i = 0; i < wil->max_vifs; i++) {
+	for (i = 0; i < GET_MAX_VIFS(wil); i++) {
 		vif = wil->vifs[i];
 		if (vif)
 			wil_bcast_fini(vif);
@@ -1483,7 +1483,7 @@ void wil_abort_scan_all_vifs(struct wil6210_priv *wil, bool sync)
 
 	lockdep_assert_held(&wil->vif_mutex);
 
-	for (i = 0; i < wil->max_vifs; i++) {
+	for (i = 0; i < GET_MAX_VIFS(wil); i++) {
 		struct wil6210_vif *vif = wil->vifs[i];
 
 		if (vif)
@@ -1551,7 +1551,7 @@ static int wil_restore_vifs(struct wil6210_priv *wil)
 	struct wireless_dev *wdev;
 	int i, rc;
 
-	for (i = 0; i < wil->max_vifs; i++) {
+	for (i = 0; i < GET_MAX_VIFS(wil); i++) {
 		vif = wil->vifs[i];
 		if (!vif)
 			continue;
@@ -1627,7 +1627,7 @@ int wil_reset(struct wil6210_priv *wil, bool load_fw)
 	wil_abort_scan_all_vifs(wil, false);
 	mutex_unlock(&wil->vif_mutex);
 
-	for (i = 0; i < wil->max_vifs; i++) {
+	for (i = 0; i < GET_MAX_VIFS(wil); i++) {
 		vif = wil->vifs[i];
 		if (vif) {
 			cancel_work_sync(&vif->disconnect_worker);
diff --git a/drivers/net/wireless/ath/wil6210/netdev.c b/drivers/net/wireless/ath/wil6210/netdev.c
index b4e0eb1..59f041d 100644
--- a/drivers/net/wireless/ath/wil6210/netdev.c
+++ b/drivers/net/wireless/ath/wil6210/netdev.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2012-2017 Qualcomm Atheros, Inc.
- * Copyright (c) 2018, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -27,7 +27,7 @@ bool wil_has_other_active_ifaces(struct wil6210_priv *wil,
 	struct wil6210_vif *vif;
 	struct net_device *ndev_i;
 
-	for (i = 0; i < wil->max_vifs; i++) {
+	for (i = 0; i < GET_MAX_VIFS(wil); i++) {
 		vif = wil->vifs[i];
 		if (vif) {
 			ndev_i = vif_to_ndev(vif);
@@ -155,7 +155,7 @@ static int wil6210_netdev_poll_tx(struct napi_struct *napi, int budget)
 		struct wil6210_vif *vif;
 
 		if (!ring->va || !txdata->enabled ||
-		    txdata->mid >= wil->max_vifs)
+		    txdata->mid >= GET_MAX_VIFS(wil))
 			continue;
 
 		vif = wil->vifs[txdata->mid];
@@ -294,7 +294,7 @@ static u8 wil_vif_find_free_mid(struct wil6210_priv *wil)
 {
 	u8 i;
 
-	for (i = 0; i < wil->max_vifs; i++) {
+	for (i = 0; i < GET_MAX_VIFS(wil); i++) {
 		if (!wil->vifs[i])
 			return i;
 	}
@@ -500,7 +500,7 @@ void wil_vif_remove(struct wil6210_priv *wil, u8 mid)
 	bool any_active = wil_has_active_ifaces(wil, true, false);
 
 	ASSERT_RTNL();
-	if (mid >= wil->max_vifs) {
+	if (mid >= GET_MAX_VIFS(wil)) {
 		wil_err(wil, "invalid MID: %d\n", mid);
 		return;
 	}
diff --git a/drivers/net/wireless/ath/wil6210/pcie_bus.c b/drivers/net/wireless/ath/wil6210/pcie_bus.c
index c8c6613..3b82d6c 100644
--- a/drivers/net/wireless/ath/wil6210/pcie_bus.c
+++ b/drivers/net/wireless/ath/wil6210/pcie_bus.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2012-2017 Qualcomm Atheros, Inc.
- * Copyright (c) 2018, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -176,7 +176,7 @@ static void wil_remove_all_additional_vifs(struct wil6210_priv *wil)
 	struct wil6210_vif *vif;
 	int i;
 
-	for (i = 1; i < wil->max_vifs; i++) {
+	for (i = 1; i < GET_MAX_VIFS(wil); i++) {
 		vif = wil->vifs[i];
 		if (vif) {
 			wil_vif_prepare_stop(vif);
diff --git a/drivers/net/wireless/ath/wil6210/pm.c b/drivers/net/wireless/ath/wil6210/pm.c
index f307522..56143e7 100644
--- a/drivers/net/wireless/ath/wil6210/pm.c
+++ b/drivers/net/wireless/ath/wil6210/pm.c
@@ -26,7 +26,7 @@ static void wil_pm_wake_connected_net_queues(struct wil6210_priv *wil)
 	int i;
 
 	mutex_lock(&wil->vif_mutex);
-	for (i = 0; i < wil->max_vifs; i++) {
+	for (i = 0; i < GET_MAX_VIFS(wil); i++) {
 		struct wil6210_vif *vif = wil->vifs[i];
 
 		if (vif && test_bit(wil_vif_fwconnected, vif->status))
@@ -40,7 +40,7 @@ static void wil_pm_stop_all_net_queues(struct wil6210_priv *wil)
 	int i;
 
 	mutex_lock(&wil->vif_mutex);
-	for (i = 0; i < wil->max_vifs; i++) {
+	for (i = 0; i < GET_MAX_VIFS(wil); i++) {
 		struct wil6210_vif *vif = wil->vifs[i];
 
 		if (vif)
@@ -123,7 +123,7 @@ int wil_can_suspend(struct wil6210_priv *wil, bool is_runtime)
 
 	/* interface is running */
 	mutex_lock(&wil->vif_mutex);
-	for (i = 0; i < wil->max_vifs; i++) {
+	for (i = 0; i < GET_MAX_VIFS(wil); i++) {
 		struct wil6210_vif *vif = wil->vifs[i];
 
 		if (!vif)
diff --git a/drivers/net/wireless/ath/wil6210/wil6210.h b/drivers/net/wireless/ath/wil6210/wil6210.h
index 1b81f3f..de72466 100644
--- a/drivers/net/wireless/ath/wil6210/wil6210.h
+++ b/drivers/net/wireless/ath/wil6210/wil6210.h
@@ -1061,6 +1061,7 @@ struct wil6210_priv {
 #define vif_to_wil(v) (v->wil)
 #define vif_to_ndev(v) (v->ndev)
 #define vif_to_wdev(v) (&v->wdev)
+#define GET_MAX_VIFS(wil) min_t(int, (wil)->max_vifs, WIL_MAX_VIFS)
 
 static inline struct wil6210_vif *wdev_to_vif(struct wil6210_priv *wil,
 					      struct wireless_dev *wdev)
diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c
index 19247c5..c5bcb8d 100644
--- a/drivers/net/wireless/ath/wil6210/wmi.c
+++ b/drivers/net/wireless/ath/wil6210/wmi.c
@@ -3205,7 +3205,7 @@ static void wmi_event_handle(struct wil6210_priv *wil,
 
 		if (mid == MID_BROADCAST)
 			mid = 0;
-		if (mid >= ARRAY_SIZE(wil->vifs) || mid >= wil->max_vifs) {
+		if (mid >= GET_MAX_VIFS(wil)) {
 			wil_dbg_wmi(wil, "invalid mid %d, event skipped\n",
 				    mid);
 			return;
-- 
1.9.1


^ permalink raw reply related

* [PATCH 16/21] wil6210: fix report of rx packet checksum in edma mode
From: Maya Erez @ 2019-02-22 14:21 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Ahmad Masri, linux-wireless, wil6210, Maya Erez
In-Reply-To: <1550845279-16103-1-git-send-email-merez@codeaurora.org>

From: Ahmad Masri <amasri@codeaurora.org>

Update the rx packet checksum of received packet according to edma
HW spec:

No need to calculate checksum in the following cases:
L4_status=0 and L3_status=0 - No L3 and no L4 known protocols found
L4_status=0 and L3_status=1 - L3 was found, and checksum check passed.
No known L4 protocol was found.
L4_status=1 - L4 was found, and checksum check passed.

Recalculate checksum in the following cases:
L4_status=3 and L3_status=1 - It means that L3 protocol was found,
and checksum passed, but L4 checksum failed.
L4_status=3 and L3_status=2	- Both L3 and L4 checksum check failed.

Signed-off-by: Ahmad Masri <amasri@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
---
 drivers/net/wireless/ath/wil6210/txrx_edma.c | 21 +-------------
 drivers/net/wireless/ath/wil6210/txrx_edma.h | 41 +++++++++++++++++++++++++++-
 2 files changed, 41 insertions(+), 21 deletions(-)

diff --git a/drivers/net/wireless/ath/wil6210/txrx_edma.c b/drivers/net/wireless/ath/wil6210/txrx_edma.c
index 48098ae..492f7bd 100644
--- a/drivers/net/wireless/ath/wil6210/txrx_edma.c
+++ b/drivers/net/wireless/ath/wil6210/txrx_edma.c
@@ -807,18 +807,9 @@ static int wil_rx_error_check_edma(struct wil6210_priv *wil,
 				   struct sk_buff *skb,
 				   struct wil_net_stats *stats)
 {
-	int error;
 	int l2_rx_status;
-	int l3_rx_status;
-	int l4_rx_status;
 	void *msg = wil_skb_rxstatus(skb);
 
-	error = wil_rx_status_get_error(msg);
-	if (!error) {
-		skb->ip_summed = CHECKSUM_UNNECESSARY;
-		return 0;
-	}
-
 	l2_rx_status = wil_rx_status_get_l2_rx_status(msg);
 	if (l2_rx_status != 0) {
 		wil_dbg_txrx(wil, "L2 RX error, l2_rx_status=0x%x\n",
@@ -847,17 +838,7 @@ static int wil_rx_error_check_edma(struct wil6210_priv *wil,
 		return -EFAULT;
 	}
 
-	l3_rx_status = wil_rx_status_get_l3_rx_status(msg);
-	l4_rx_status = wil_rx_status_get_l4_rx_status(msg);
-	if (!l3_rx_status && !l4_rx_status)
-		skb->ip_summed = CHECKSUM_UNNECESSARY;
-	/* If HW reports bad checksum, let IP stack re-check it
-	 * For example, HW don't understand Microsoft IP stack that
-	 * mis-calculates TCP checksum - if it should be 0x0,
-	 * it writes 0xffff in violation of RFC 1624
-	 */
-	else
-		stats->rx_csum_err++;
+	skb->ip_summed = wil_rx_status_get_checksum(msg, stats);
 
 	return 0;
 }
diff --git a/drivers/net/wireless/ath/wil6210/txrx_edma.h b/drivers/net/wireless/ath/wil6210/txrx_edma.h
index 343516a..9cf9ecf 100644
--- a/drivers/net/wireless/ath/wil6210/txrx_edma.h
+++ b/drivers/net/wireless/ath/wil6210/txrx_edma.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2016,2018, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2016,2018-2019, The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -511,6 +511,45 @@ static inline int wil_rx_status_get_l4_rx_status(void *msg)
 			    5, 6);
 }
 
+/* L4	L3	Expected result
+ * 0	0	Ok. No L3 and no L4 known protocols found.
+ *		Treated as L2 packet. (no offloads on this packet)
+ * 0	1	Ok. It means that L3 was found, and checksum check passed.
+ *		No known L4 protocol was found.
+ * 0	2	It means that L3 protocol was found, and checksum check failed.
+ *		No L4 known protocol was found.
+ * 1	any	Ok. It means that L4 was found, and checksum check passed.
+ * 3	0	Not a possible scenario.
+ * 3	1	Recalculate. It means that L3 protocol was found, and checksum
+ *		passed. But L4 checksum failed. Need to see if really failed,
+ *		or due to fragmentation.
+ * 3	2	Both L3 and L4 checksum check failed.
+ */
+static inline int wil_rx_status_get_checksum(void *msg,
+					     struct wil_net_stats *stats)
+{
+	int l3_rx_status = wil_rx_status_get_l3_rx_status(msg);
+	int l4_rx_status = wil_rx_status_get_l4_rx_status(msg);
+
+	if (l4_rx_status == 1)
+		return CHECKSUM_UNNECESSARY;
+
+	if (l4_rx_status == 0 && l3_rx_status == 1)
+		return CHECKSUM_UNNECESSARY;
+
+	if (l3_rx_status == 0 && l4_rx_status == 0)
+		/* L2 packet */
+		return CHECKSUM_NONE;
+
+	/* If HW reports bad checksum, let IP stack re-check it
+	 * For example, HW doesn't understand Microsoft IP stack that
+	 * mis-calculates TCP checksum - if it should be 0x0,
+	 * it writes 0xffff in violation of RFC 1624
+	 */
+	stats->rx_csum_err++;
+	return CHECKSUM_NONE;
+}
+
 static inline int wil_rx_status_get_security(void *msg)
 {
 	return WIL_GET_BITS(((struct wil_rx_status_compressed *)msg)->d0,
-- 
1.9.1


^ permalink raw reply related

* [PATCH 14/21] wil6210: use OEM MAC address from OTP
From: Maya Erez @ 2019-02-22 14:21 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Dedy Lansky, linux-wireless, wil6210, Maya Erez
In-Reply-To: <1550845279-16103-1-git-send-email-merez@codeaurora.org>

From: Dedy Lansky <dlansky@codeaurora.org>

In addition to existing MAC address field in OTP, new field added for
OEM MAC address.
wil6210 gives precedence to the new OEM MAC address and will use it if
its valid.

Signed-off-by: Dedy Lansky <dlansky@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
---
 drivers/net/wireless/ath/wil6210/main.c    | 21 +++++++++++++++------
 drivers/net/wireless/ath/wil6210/wil6210.h |  1 +
 2 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c
index 6a6bfb3..b69d9a2 100644
--- a/drivers/net/wireless/ath/wil6210/main.c
+++ b/drivers/net/wireless/ath/wil6210/main.c
@@ -1413,13 +1413,22 @@ static int wil_get_otp_info(struct wil6210_priv *wil)
 	u8 mac[8];
 	int mac_addr;
 
-	if (wil->hw_version >= HW_VER_TALYN_MB)
-		mac_addr = RGF_OTP_MAC_TALYN_MB;
-	else
-		mac_addr = RGF_OTP_MAC;
+	/* OEM MAC has precedence */
+	mac_addr = RGF_OTP_OEM_MAC;
+	wil_memcpy_fromio_32(mac, wil->csr + HOSTADDR(mac_addr), sizeof(mac));
+
+	if (is_valid_ether_addr(mac)) {
+		wil_info(wil, "using OEM MAC %pM\n", mac);
+	} else {
+		if (wil->hw_version >= HW_VER_TALYN_MB)
+			mac_addr = RGF_OTP_MAC_TALYN_MB;
+		else
+			mac_addr = RGF_OTP_MAC;
+
+		wil_memcpy_fromio_32(mac, wil->csr + HOSTADDR(mac_addr),
+				     sizeof(mac));
+	}
 
-	wil_memcpy_fromio_32(mac, wil->csr + HOSTADDR(mac_addr),
-			     sizeof(mac));
 	if (!is_valid_ether_addr(mac)) {
 		wil_err(wil, "Invalid MAC %pM\n", mac);
 		return -EINVAL;
diff --git a/drivers/net/wireless/ath/wil6210/wil6210.h b/drivers/net/wireless/ath/wil6210/wil6210.h
index de72466..9d7e02e 100644
--- a/drivers/net/wireless/ath/wil6210/wil6210.h
+++ b/drivers/net/wireless/ath/wil6210/wil6210.h
@@ -367,6 +367,7 @@ struct RGF_ICR {
 	#define REVISION_ID_SPARROW_D0	(0x3)
 
 #define RGF_OTP_MAC_TALYN_MB		(0x8a0304)
+#define RGF_OTP_OEM_MAC			(0x8a0334)
 #define RGF_OTP_MAC			(0x8a0620)
 
 /* Talyn-MB */
-- 
1.9.1


^ permalink raw reply related

* [PATCH 20/21] wil6210: reset buff id in status message after completion
From: Maya Erez @ 2019-02-22 14:21 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Maya Erez, linux-wireless, wil6210
In-Reply-To: <1550845279-16103-1-git-send-email-merez@codeaurora.org>

Since DR bit and buffer id are written in different dwords of
the status message, the DR bit can already be set to 1 while the
buffer id is not updated yet.
Resetting the buffer id in the status message will allow the driver
to identify such cases and re-read the status message until the buffer
id is written by HW.
In case DR bit is set but buffer id is zero, need to read the status
message again, until a valid id is identified.

In addition to that, move the completed buffer id to the tail of the
free list to prevent its immediate reuse in the upcoming refill.

Signed-off-by: Maya Erez <merez@codeaurora.org>
---
 drivers/net/wireless/ath/wil6210/debugfs.c   |  2 ++
 drivers/net/wireless/ath/wil6210/txrx_edma.c | 50 ++++++++++++++++++++++------
 drivers/net/wireless/ath/wil6210/txrx_edma.h |  6 ++++
 drivers/net/wireless/ath/wil6210/wil6210.h   |  1 +
 4 files changed, 48 insertions(+), 11 deletions(-)

diff --git a/drivers/net/wireless/ath/wil6210/debugfs.c b/drivers/net/wireless/ath/wil6210/debugfs.c
index 78320ec..df2adff 100644
--- a/drivers/net/wireless/ath/wil6210/debugfs.c
+++ b/drivers/net/wireless/ath/wil6210/debugfs.c
@@ -207,6 +207,8 @@ static void wil_print_sring(struct seq_file *s, struct wil6210_priv *wil,
 		seq_puts(s, "???\n");
 	}
 	seq_printf(s, "  desc_rdy_pol   = %d\n", sring->desc_rdy_pol);
+	seq_printf(s, "  invalid_buff_id_cnt   = %d\n",
+		   sring->invalid_buff_id_cnt);
 
 	if (sring->va && (sring->size <= (1 << WIL_RING_SIZE_ORDER_MAX))) {
 		uint i;
diff --git a/drivers/net/wireless/ath/wil6210/txrx_edma.c b/drivers/net/wireless/ath/wil6210/txrx_edma.c
index 492f7bd..f6fce6f 100644
--- a/drivers/net/wireless/ath/wil6210/txrx_edma.c
+++ b/drivers/net/wireless/ath/wil6210/txrx_edma.c
@@ -29,6 +29,7 @@
 #define WIL_EDMA_MAX_DATA_OFFSET (2)
 /* RX buffer size must be aligned to 4 bytes */
 #define WIL_EDMA_RX_BUF_LEN_DEFAULT (2048)
+#define MAX_INVALID_BUFF_ID_RETRY (3)
 
 static void wil_tx_desc_unmap_edma(struct device *dev,
 				   union wil_tx_desc *desc,
@@ -312,7 +313,8 @@ static int wil_init_rx_buff_arr(struct wil6210_priv *wil,
 	struct list_head *free = &wil->rx_buff_mgmt.free;
 	int i;
 
-	wil->rx_buff_mgmt.buff_arr = kcalloc(size, sizeof(struct wil_rx_buff),
+	wil->rx_buff_mgmt.buff_arr = kcalloc(size + 1,
+					     sizeof(struct wil_rx_buff),
 					     GFP_KERNEL);
 	if (!wil->rx_buff_mgmt.buff_arr)
 		return -ENOMEM;
@@ -321,14 +323,16 @@ static int wil_init_rx_buff_arr(struct wil6210_priv *wil,
 	INIT_LIST_HEAD(active);
 	INIT_LIST_HEAD(free);
 
-	/* Linkify the list */
+	/* Linkify the list.
+	 * buffer id 0 should not be used (marks invalid id).
+	 */
 	buff_arr = wil->rx_buff_mgmt.buff_arr;
-	for (i = 0; i < size; i++) {
+	for (i = 1; i <= size; i++) {
 		list_add(&buff_arr[i].list, free);
 		buff_arr[i].id = i;
 	}
 
-	wil->rx_buff_mgmt.size = size;
+	wil->rx_buff_mgmt.size = size + 1;
 
 	return 0;
 }
@@ -876,26 +880,50 @@ static struct sk_buff *wil_sring_reap_rx_edma(struct wil6210_priv *wil,
 
 	/* Extract the buffer ID from the status message */
 	buff_id = le16_to_cpu(wil_rx_status_get_buff_id(msg));
-	if (unlikely(!wil_val_in_range(buff_id, 0, wil->rx_buff_mgmt.size))) {
+
+	while (!buff_id) {
+		struct wil_rx_status_extended *s;
+		int invalid_buff_id_retry = 0;
+
+		wil_dbg_txrx(wil,
+			     "buff_id is not updated yet by HW, (swhead 0x%x)\n",
+			     sring->swhead);
+		if (++invalid_buff_id_retry > MAX_INVALID_BUFF_ID_RETRY)
+			break;
+
+		/* Read the status message again */
+		s = (struct wil_rx_status_extended *)
+			(sring->va + (sring->elem_size * sring->swhead));
+		*(struct wil_rx_status_extended *)msg = *s;
+		buff_id = le16_to_cpu(wil_rx_status_get_buff_id(msg));
+	}
+
+	if (unlikely(!wil_val_in_range(buff_id, 1, wil->rx_buff_mgmt.size))) {
 		wil_err(wil, "Corrupt buff_id=%d, sring->swhead=%d\n",
 			buff_id, sring->swhead);
+		wil_rx_status_reset_buff_id(sring);
 		wil_sring_advance_swhead(sring);
+		sring->invalid_buff_id_cnt++;
 		goto again;
 	}
 
-	wil_sring_advance_swhead(sring);
-
 	/* Extract the SKB from the rx_buff management array */
 	skb = wil->rx_buff_mgmt.buff_arr[buff_id].skb;
 	wil->rx_buff_mgmt.buff_arr[buff_id].skb = NULL;
 	if (!skb) {
 		wil_err(wil, "No Rx skb at buff_id %d\n", buff_id);
+		wil_rx_status_reset_buff_id(sring);
 		/* Move the buffer from the active list to the free list */
-		list_move(&wil->rx_buff_mgmt.buff_arr[buff_id].list,
-			  &wil->rx_buff_mgmt.free);
+		list_move_tail(&wil->rx_buff_mgmt.buff_arr[buff_id].list,
+			       &wil->rx_buff_mgmt.free);
+		wil_sring_advance_swhead(sring);
+		sring->invalid_buff_id_cnt++;
 		goto again;
 	}
 
+	wil_rx_status_reset_buff_id(sring);
+	wil_sring_advance_swhead(sring);
+
 	memcpy(&pa, skb->cb, sizeof(pa));
 	dma_unmap_single(dev, pa, sz, DMA_FROM_DEVICE);
 	dmalen = le16_to_cpu(wil_rx_status_get_length(msg));
@@ -910,8 +938,8 @@ static struct sk_buff *wil_sring_reap_rx_edma(struct wil6210_priv *wil,
 			  sizeof(struct wil_rx_status_extended), false);
 
 	/* Move the buffer from the active list to the free list */
-	list_move(&wil->rx_buff_mgmt.buff_arr[buff_id].list,
-		  &wil->rx_buff_mgmt.free);
+	list_move_tail(&wil->rx_buff_mgmt.buff_arr[buff_id].list,
+		       &wil->rx_buff_mgmt.free);
 
 	eop = wil_rx_status_get_eop(msg);
 
diff --git a/drivers/net/wireless/ath/wil6210/txrx_edma.h b/drivers/net/wireless/ath/wil6210/txrx_edma.h
index 9cf9ecf..bb4ff28 100644
--- a/drivers/net/wireless/ath/wil6210/txrx_edma.h
+++ b/drivers/net/wireless/ath/wil6210/txrx_edma.h
@@ -427,6 +427,12 @@ static inline int wil_rx_status_get_eop(void *msg) /* EoP = End of Packet */
 			    30, 30);
 }
 
+static inline void wil_rx_status_reset_buff_id(struct wil_status_ring *s)
+{
+	((struct wil_rx_status_compressed *)
+		(s->va + (s->elem_size * s->swhead)))->buff_id = 0;
+}
+
 static inline __le16 wil_rx_status_get_buff_id(void *msg)
 {
 	return ((struct wil_rx_status_compressed *)msg)->buff_id;
diff --git a/drivers/net/wireless/ath/wil6210/wil6210.h b/drivers/net/wireless/ath/wil6210/wil6210.h
index f508d52..8724d99 100644
--- a/drivers/net/wireless/ath/wil6210/wil6210.h
+++ b/drivers/net/wireless/ath/wil6210/wil6210.h
@@ -568,6 +568,7 @@ struct wil_status_ring {
 	bool is_rx;
 	u8 desc_rdy_pol; /* Expected descriptor ready bit polarity */
 	struct wil_ring_rx_data rx_data;
+	u32 invalid_buff_id_cnt; /* relevant only for RX */
 };
 
 #define WIL_STA_TID_NUM (16)
-- 
1.9.1


^ permalink raw reply related

* [PATCH 18/21] wil6210: prevent access to RGF_CAF_ICR in Talyn
From: Maya Erez @ 2019-02-22 14:21 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Maya Erez, linux-wireless, wil6210
In-Reply-To: <1550845279-16103-1-git-send-email-merez@codeaurora.org>

Due to access control RGF_CAF_ICR cannot be accessed by host.
Such an access will cause device AHB logger to halt and it will not
capture future AHB fault if there is any.

Signed-off-by: Maya Erez <merez@codeaurora.org>
---
 drivers/net/wireless/ath/wil6210/main.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c
index b69d9a2..9b9c9ec 100644
--- a/drivers/net/wireless/ath/wil6210/main.c
+++ b/drivers/net/wireless/ath/wil6210/main.c
@@ -1532,11 +1532,6 @@ static void wil_pre_fw_config(struct wil6210_priv *wil)
 	if (wil->hw_version < HW_VER_TALYN_MB) {
 		wil_s(wil, RGF_CAF_ICR + offsetof(struct RGF_ICR, ICR), 0);
 		wil_w(wil, RGF_CAF_ICR + offsetof(struct RGF_ICR, IMV), ~0);
-	} else {
-		wil_s(wil,
-		      RGF_CAF_ICR_TALYN_MB + offsetof(struct RGF_ICR, ICR), 0);
-		wil_w(wil, RGF_CAF_ICR_TALYN_MB +
-		      offsetof(struct RGF_ICR, IMV), ~0);
 	}
 	/* clear PAL_UNIT_ICR (potential D0->D3 leftover)
 	 * In Talyn-MB host cannot access this register due to
-- 
1.9.1


^ permalink raw reply related

* [PATCH 21/21] wil6210: print error in FW and board files load failures
From: Maya Erez @ 2019-02-22 14:21 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Maya Erez, linux-wireless, wil6210
In-Reply-To: <1550845279-16103-1-git-send-email-merez@codeaurora.org>

Add an error print-out in case FW and board files load fails,
as such an error is not printed on all failures and user may
not understand why the interface up operations didn't succeed.

Signed-off-by: Maya Erez <merez@codeaurora.org>
---
 drivers/net/wireless/ath/wil6210/fw_inc.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/wil6210/fw_inc.c b/drivers/net/wireless/ath/wil6210/fw_inc.c
index 388b3d4..3ec0f2f 100644
--- a/drivers/net/wireless/ath/wil6210/fw_inc.c
+++ b/drivers/net/wireless/ath/wil6210/fw_inc.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2014-2017 Qualcomm Atheros, Inc.
- * Copyright (c) 2018, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -647,6 +647,8 @@ int wil_request_firmware(struct wil6210_priv *wil, const char *name,
 
 out:
 	release_firmware(fw);
+	if (rc)
+		wil_err_fw(wil, "Loading <%s> failed, rc %d\n", name, rc);
 	return rc;
 }
 
@@ -741,6 +743,8 @@ int wil_request_board(struct wil6210_priv *wil, const char *name)
 
 out:
 	release_firmware(brd);
+	if (rc)
+		wil_err_fw(wil, "Loading <%s> failed, rc %d\n", name, rc);
 	return rc;
 }
 
-- 
1.9.1


^ permalink raw reply related

* [PATCH 19/21] wil6210: add support for ucode tracing
From: Maya Erez @ 2019-02-22 14:21 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Ahmad Masri, linux-wireless, wil6210, Maya Erez
In-Reply-To: <1550845279-16103-1-git-send-email-merez@codeaurora.org>

From: Ahmad Masri <amasri@codeaurora.org>

The driver needs to expose RGF_USER_USAGE_2 register that contains
the offset of the ucode logging table.

Signed-off-by: Ahmad Masri <amasri@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
---
 drivers/net/wireless/ath/wil6210/debugfs.c | 1 +
 drivers/net/wireless/ath/wil6210/wil6210.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/net/wireless/ath/wil6210/debugfs.c b/drivers/net/wireless/ath/wil6210/debugfs.c
index 817762f..78320ec 100644
--- a/drivers/net/wireless/ath/wil6210/debugfs.c
+++ b/drivers/net/wireless/ath/wil6210/debugfs.c
@@ -2392,6 +2392,7 @@ static void wil6210_debugfs_init_isr(struct wil6210_priv *wil,
 	{"RGF_MAC_MTRL_COUNTER_0", 0444, HOSTADDR(RGF_MAC_MTRL_COUNTER_0),
 		doff_io32},
 	{"RGF_USER_USAGE_1", 0444, HOSTADDR(RGF_USER_USAGE_1), doff_io32},
+	{"RGF_USER_USAGE_2", 0444, HOSTADDR(RGF_USER_USAGE_2), doff_io32},
 	{},
 };
 
diff --git a/drivers/net/wireless/ath/wil6210/wil6210.h b/drivers/net/wireless/ath/wil6210/wil6210.h
index 9d7e02e..f508d52 100644
--- a/drivers/net/wireless/ath/wil6210/wil6210.h
+++ b/drivers/net/wireless/ath/wil6210/wil6210.h
@@ -185,6 +185,7 @@ struct RGF_ICR {
 
 /* registers - FW addresses */
 #define RGF_USER_USAGE_1		(0x880004)
+#define RGF_USER_USAGE_2		(0x880008)
 #define RGF_USER_USAGE_6		(0x880018)
 	#define BIT_USER_OOB_MODE		BIT(31)
 	#define BIT_USER_OOB_R2_MODE		BIT(30)
-- 
1.9.1


^ permalink raw reply related

* [PATCH 17/21] wil6210: fix return code of wmi_mgmt_tx and wmi_mgmt_tx_ext
From: Maya Erez @ 2019-02-22 14:21 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Lior David, linux-wireless, wil6210, Maya Erez
In-Reply-To: <1550845279-16103-1-git-send-email-merez@codeaurora.org>

From: Lior David <liord@codeaurora.org>

The functions that send management TX frame have 3 possible
results: success and other side acknowledged receive (ACK=1),
success and other side did not acknowledge receive(ACK=0) and
failure to send the frame. The current implementation
incorrectly reports the ACK=0 case as failure.

Signed-off-by: Lior David <liord@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
---
 drivers/net/wireless/ath/wil6210/cfg80211.c |  5 +++++
 drivers/net/wireless/ath/wil6210/wmi.c      | 11 ++++++-----
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c b/drivers/net/wireless/ath/wil6210/cfg80211.c
index e8d65dd..218296e 100644
--- a/drivers/net/wireless/ath/wil6210/cfg80211.c
+++ b/drivers/net/wireless/ath/wil6210/cfg80211.c
@@ -1274,7 +1274,12 @@ int wil_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
 			     params->wait);
 
 out:
+	/* when the sent packet was not acked by receiver(ACK=0), rc will
+	 * be -EAGAIN. In this case this function needs to return success,
+	 * the ACK=0 will be reflected in tx_status.
+	 */
 	tx_status = (rc == 0);
+	rc = (rc == -EAGAIN) ? 0 : rc;
 	cfg80211_mgmt_tx_status(wdev, cookie ? *cookie : 0, buf, len,
 				tx_status, GFP_KERNEL);
 
diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c
index c5bcb8d..d89cd41 100644
--- a/drivers/net/wireless/ath/wil6210/wmi.c
+++ b/drivers/net/wireless/ath/wil6210/wmi.c
@@ -3511,8 +3511,9 @@ int wmi_mgmt_tx(struct wil6210_vif *vif, const u8 *buf, size_t len)
 	rc = wmi_call(wil, WMI_SW_TX_REQ_CMDID, vif->mid, cmd, total,
 		      WMI_SW_TX_COMPLETE_EVENTID, &evt, sizeof(evt), 2000);
 	if (!rc && evt.evt.status != WMI_FW_STATUS_SUCCESS) {
-		wil_err(wil, "mgmt_tx failed with status %d\n", evt.evt.status);
-		rc = -EINVAL;
+		wil_dbg_wmi(wil, "mgmt_tx failed with status %d\n",
+			    evt.evt.status);
+		rc = -EAGAIN;
 	}
 
 	kfree(cmd);
@@ -3564,9 +3565,9 @@ int wmi_mgmt_tx_ext(struct wil6210_vif *vif, const u8 *buf, size_t len,
 	rc = wmi_call(wil, WMI_SW_TX_REQ_EXT_CMDID, vif->mid, cmd, total,
 		      WMI_SW_TX_COMPLETE_EVENTID, &evt, sizeof(evt), 2000);
 	if (!rc && evt.evt.status != WMI_FW_STATUS_SUCCESS) {
-		wil_err(wil, "mgmt_tx_ext failed with status %d\n",
-			evt.evt.status);
-		rc = -EINVAL;
+		wil_dbg_wmi(wil, "mgmt_tx_ext failed with status %d\n",
+			    evt.evt.status);
+		rc = -EAGAIN;
 	}
 
 	kfree(cmd);
-- 
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