* Re: PROBLEM: network data corruption (bisected to e5a4b0bb803b)
From: David Miller @ 2016-07-27 23:45 UTC (permalink / raw)
To: alexmcwhirter
Cc: rlwinm, viro, chunkeey, linux-wireless, netdev, linux-kernel
In-Reply-To: <87c4ed555bcb4229f2334f6f2bb69bcb@triadic.us>
From: alexmcwhirter@triadic.us
Date: Wed, 27 Jul 2016 19:02:40 -0400
> On 2016-07-27 14:04, alexmcwhirter@triadic.us wrote:
>> Just to add some more information to this, the corruption seems to
>> effect ssh as well.
>> Using a sun hme interface, occasionally upon an ssh connection it will
>> refuse to authenticate a client with either password or cert
>> authentication. Using wireshark to capture and decrypt the packets
>> between the two machines, the data coming from the server seems good,
>> but the data received by the server from the client is essentially
>> garbage. Note that the client is sending valid data, but the server is
>> corrupting it upon receipt. Closing the connection and starting a new
>> one will remedy the login issue, but you do occasionally see
>> corruption on the server side sporadically.
>> So far this only seems to occur on incoming data, outgoing data seems
>> fine.
>
> Also, there is another patch the references this commit on sparc64 at
> least.
>
> https://patchwork.kernel.org/patch/9221895/
>
> I highly expect both my issue and OP's issue to revolve not around
> commit e5a4b0bb803b specifically, but around other code that no longer
> behaves as expected because of it.
Indeed, and that fault address rounding bug occurs two other times
in arch/sparc/lib/user_fixup.c
The mentioned patchwork patch should fix the bug and I'll get that
into my sparc tree, merged, and queued up for -stable ASAP.
^ permalink raw reply
* Re: PROBLEM: network data corruption (bisected to e5a4b0bb803b)
From: alexmcwhirter @ 2016-07-27 23:02 UTC (permalink / raw)
To: Alan Curry
Cc: Al Viro, Christian Lamparter, linux-wireless, netdev,
linux-kernel
In-Reply-To: <4dbfebe8136bc963b5b51463d6887db4@triadic.us>
On 2016-07-27 14:04, alexmcwhirter@triadic.us wrote:
> Just to add some more information to this, the corruption seems to
> effect ssh as well.
>
> Using a sun hme interface, occasionally upon an ssh connection it will
> refuse to authenticate a client with either password or cert
> authentication. Using wireshark to capture and decrypt the packets
> between the two machines, the data coming from the server seems good,
> but the data received by the server from the client is essentially
> garbage. Note that the client is sending valid data, but the server is
> corrupting it upon receipt. Closing the connection and starting a new
> one will remedy the login issue, but you do occasionally see
> corruption on the server side sporadically.
>
> So far this only seems to occur on incoming data, outgoing data seems
> fine.
Also, there is another patch the references this commit on sparc64 at
least.
https://patchwork.kernel.org/patch/9221895/
I highly expect both my issue and OP's issue to revolve not around
commit e5a4b0bb803b specifically, but around other code that no longer
behaves as expected because of it.
^ permalink raw reply
* Re: brcm4330 fails to load on newer kernels
From: Fabio Estevam @ 2016-07-27 20:57 UTC (permalink / raw)
To: Arend van Spriel
Cc: Arend van Spriel, Hante Meuleman, linux-wireless,
brcm80211-dev-list
In-Reply-To: <57991EE9.30005@broadcom.com>
Hi Arend,
On Wed, Jul 27, 2016 at 5:51 PM, Arend van Spriel
<arend.vanspriel@broadcom.com> wrote:
> On 27-07-16 00:35, Fabio Estevam wrote:
>> Hi,
>>
>> On a imx6sl-warp board with a brcm4330 I get the following results
>> depending on the kernel version:
>>
>> - Kernel 4.4.15: place brcmfmac4330-sdio.bin and brcmfmac4330-sdio.txt
>> in the rootfs and the kernel is able to read them correctly. wlan0 is
>> present. All is fine.
>>
>> - Kernel 4.5.7: place brcmfmac4330-sdio.bin brcmfmac4330-sdio.txt in
>> the rootfs and the kernel fails to load them:
>>
>> brcmfmac mmc1:0001:1: Direct firmware load for
>> brcm/brcmfmac4330-sdio.bin failed with error -2
>>
>> Then I build brcmfmac4330-sdio.bin brcmfmac4330-sdio.txt into the
>> kernel and then firmware is detected and wlan0 appears.
>>
>> - Kernel 4.7: I can place the firmware and nvram file into the rootfs
>> or built-i and the following error is seen:
>>
>> brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
>> brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
>> brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
>>
>> So wlan0 never appears here.
>>
>> Does anyone have any suggestions about these different behaviours?
>
> So for all kernel you have brcmfmac built-in the kernel or as a module?
In all these tests I have brcmfmac built-in the kernel.
Thanks,
Fabio Estevam
^ permalink raw reply
* Re: brcm4330 fails to load on newer kernels
From: Arend van Spriel @ 2016-07-27 20:51 UTC (permalink / raw)
To: Fabio Estevam, Arend van Spriel, Hante Meuleman
Cc: linux-wireless, brcm80211-dev-list
In-Reply-To: <CAOMZO5Cu_UO6L9wYy6eJUJwEE25BN-qeBRAMbFveFrJKHtF=aw@mail.gmail.com>
On 27-07-16 00:35, Fabio Estevam wrote:
> Hi,
>
> On a imx6sl-warp board with a brcm4330 I get the following results
> depending on the kernel version:
>
> - Kernel 4.4.15: place brcmfmac4330-sdio.bin and brcmfmac4330-sdio.txt
> in the rootfs and the kernel is able to read them correctly. wlan0 is
> present. All is fine.
>
> - Kernel 4.5.7: place brcmfmac4330-sdio.bin brcmfmac4330-sdio.txt in
> the rootfs and the kernel fails to load them:
>
> brcmfmac mmc1:0001:1: Direct firmware load for
> brcm/brcmfmac4330-sdio.bin failed with error -2
>
> Then I build brcmfmac4330-sdio.bin brcmfmac4330-sdio.txt into the
> kernel and then firmware is detected and wlan0 appears.
>
> - Kernel 4.7: I can place the firmware and nvram file into the rootfs
> or built-i and the following error is seen:
>
> brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
> brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
> brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
>
> So wlan0 never appears here.
>
> Does anyone have any suggestions about these different behaviours?
So for all kernel you have brcmfmac built-in the kernel or as a module?
Regards,
Arend
> Thanks,
>
> Fabio Estevam
>
^ permalink raw reply
* Re: PROBLEM: network data corruption (bisected to e5a4b0bb803b)
From: alexmcwhirter @ 2016-07-27 18:04 UTC (permalink / raw)
To: Alan Curry
Cc: Al Viro, Christian Lamparter, linux-wireless, netdev,
linux-kernel
In-Reply-To: <201607271032.u6RAWPcS008174@sdf.org>
Just to add some more information to this, the corruption seems to
effect ssh as well.
Using a sun hme interface, occasionally upon an ssh connection it will
refuse to authenticate a client with either password or cert
authentication. Using wireshark to capture and decrypt the packets
between the two machines, the data coming from the server seems good,
but the data received by the server from the client is essentially
garbage. Note that the client is sending valid data, but the server is
corrupting it upon receipt. Closing the connection and starting a new
one will remedy the login issue, but you do occasionally see corruption
on the server side sporadically.
So far this only seems to occur on incoming data, outgoing data seems
fine.
^ permalink raw reply
* Re: TCP performance regression in mac80211 triggered by the fq code
From: Toke Høiland-Jørgensen @ 2016-07-27 17:31 UTC (permalink / raw)
To: Michal Kazior; +Cc: Felix Fietkau, linux-wireless
In-Reply-To: <CA+BoTQms1bKrNKgDVdBZYt3HTA3Hdv9tcN6vgnpNOYFHiwDmXw@mail.gmail.com>
Michal Kazior <michal.kazior@tieto.com> writes:
> On 20 July 2016 at 17:24, Toke Høiland-Jørgensen <toke@toke.dk> wrote:
>> Toke Høiland-Jørgensen <toke@toke.dk> writes:
>>
>>> Felix Fietkau <nbd@nbd.name> writes:
>>>
>>>> - if I put a hack in the fq code to force the hash to a constant value
>>>> (effectively disabling fq without disabling codel), the problem
>>>> disappears and even multiple streams get proper performance.
>>>
>>> There's definitely something iffy about the hashing. Here's the output
>>> relevant line from the aqm debug file after running a single TCP stream
>>> for 60 seconds to that station:
>>>
>>> ifname addr tid ac backlog-bytes backlog-packets flows drops marks overlimit collisions
>>> tx-bytes tx-packets
>>> wlp2s0 04:f0:21:1e:74:20 0 2 0 0 146 16 0 0 0 717758966 467925
>>>
>>> (there are two extra fields here; I added per-txq CoDel stats, will send
>>> a patch later).
>>>
>>> This shows that the txq has 146 flows associated from that one TCP flow.
>>> Looking at this over time, it seems that each time the queue runs empty
>>> (which happens way too often, which is what I was originally
>>> investigating), another flow is assigned.
>>>
>>> Michal, any idea why? :)
>>
>> And to answer this: because the flow is being freed to be reassigned
>> when it runs empty, but the counter is not decremented. Is this
>> deliberate? I.e. is the 'flows' var supposed to be a total 'new_flows'
>> counter and not a measure of the current number of assigned flows?
>
> Yes, it is deliberate. fq_codel qdisc does the same thing and I just
> mimicked it.
Right. Think it was the name that sent me down the wrong track ('flows'
instead of 'new_flows'). Especially since the way you structured things,
having a counter for how many flows are currently assigned each tid
might actually make sense...
-Toke
^ permalink raw reply
* Re: [PATCH] ath10k: Allow setting coverage class
From: Ben Greear @ 2016-07-27 17:26 UTC (permalink / raw)
To: Benjamin Berg, Kalle Valo, linux-wireless
Cc: Mathias Kretschmer, Sebastian Gottschall, ath10k,
Simon Wunderlich
In-Reply-To: <1469608424-11370-1-git-send-email-benjamin@sipsolutions.net>
On 07/27/2016 01:33 AM, Benjamin Berg wrote:
> Unfortunately ath10k does not generally allow modifying the coverage class
> with the stock firmware and Qualcomm has so far refused to implement this
> feature so that it can be properly supported in ath10k. If we however know
> the registers that need to be modified for proper operation with a higher
> coverage class, then we can do these modifications from the driver.
>
> This patch implements this hack for first generation cards which are based
> on a core that is similar to ath9k. The registers are modified in place and
> need to be re-written every time the firmware sets them. To achieve this
> the register status is verified after any event from the firmware.
>
> The coverage class may not be modified temporarily right after the card
> re-initializes the registers. This is for example the case during scanning.
>
> A warning will be generated if the hack is not supported on the card or
> unexpected values are hit. There is no error reporting for userspace
> applications though (this is a limitation in the mac80211 driver
> interface).
>
> Thanks to Sebastian Gottschall <s.gottschall@dd-wrt.com> for initially
> working on a userspace support for this. This patch wouldn't have been
> possible without this documentation.
I would be concerned about the various resets firmware does to work around
hardware hangs as well. I don't think any events are generated for these, unless
you count the dbglog messages?
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: [v3] UCC_GETH/UCC_FAST: Use IS_ERR_VALUE_U32 API to avoid IS_ERR_VALUE abuses.
From: arvind Yadav @ 2016-07-27 17:07 UTC (permalink / raw)
To: Arnd Bergmann, linuxppc-dev
Cc: zajec5, leoli, qiang.zhao, viresh.kumar, linux-wireless, netdev,
scottwood, akpm, linux
In-Reply-To: <4175803.I7CDUloLxQ@wuerfel>
I am also agree with Arnd Bergmann. We should use 'static inline function'
instead of macro to deal with error check.
On Tuesday 26 July 2016 05:09 PM, Arnd Bergmann wrote:
> On Saturday, July 23, 2016 11:35:51 PM CEST Arvind Yadav wrote:
>> diff --git a/include/linux/err.h b/include/linux/err.h
>> index 1e35588..a42f942 100644
>> --- a/include/linux/err.h
>> +++ b/include/linux/err.h
>> @@ -19,6 +19,7 @@
>> #ifndef __ASSEMBLY__
>>
>> #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO)
>> +#define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(x) >= (unsigned int)-MAX_ERRNO)
>>
>> static inline void * __must_check ERR_PTR(long error)
>> {
> This doesn't really look like something we want to have as a generic
> interface. The IS_ERR_VALUE() API is rather awkward already, and your
> use seems specific to the cpu_muram_alloc() function.
>
> How about something like
>
> int cpm_muram_error(unsigned long addr)
> {
> if (addr >= (unsigned long)-MAX_ERRNO)
> return addr;
> else
> return 0;
> }
>
> and then use that to check the value returned by the allocation
> that is still an 'unsigned long', before assigning it to a 'u32'.
>
> Arnd
^ permalink raw reply
* [PATCH] ath10k: Remove driver log suggesting QCA9887 support is experimental
From: Mohammed Shafi Shajakhan @ 2016-07-27 15:04 UTC (permalink / raw)
To: ath10k; +Cc: mohammed, linux-wireless, Mohammed Shafi Shajakhan
From: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
Support for QCA9887 is no longer experimental and if there are any issues
we need to address them
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
---
drivers/net/wireless/ath/ath10k/pci.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index f06dd39..f3d943c 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -3144,7 +3144,6 @@ static int ath10k_pci_probe(struct pci_dev *pdev,
pci_hard_reset = ath10k_pci_qca988x_chip_reset;
break;
case QCA9887_1_0_DEVICE_ID:
- dev_warn(&pdev->dev, "QCA9887 support is still experimental, there are likely bugs. You have been warned.\n");
hw_rev = ATH10K_HW_QCA9887;
pci_ps = false;
pci_soft_reset = ath10k_pci_warm_reset;
--
1.9.1
^ permalink raw reply related
* Re: [PATCH -next] rtl8xxxu: gen1: Fix non static symbol warning
From: Jes Sorensen @ 2016-07-27 14:08 UTC (permalink / raw)
To: weiyj_lk; +Cc: Kalle Valo, Wei Yongjun, linux-wireless
In-Reply-To: <1468334014-9098-1-git-send-email-weiyj_lk@163.com>
weiyj_lk@163.com writes:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Fixes the following sparse warning:
>
> drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:898:1: warning:
> symbol 'rtl8xxxu_gen1_h2c_cmd' was not declared. Should it be static?
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
> drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Looks reasonable - I'll apply it to my tree.
Thanks,
Jes
^ permalink raw reply
* [PATCH 1/1 V3] ath9k: consider return code on
From: Eduardo Abinader @ 2016-07-27 13:19 UTC (permalink / raw)
To: linux-wireless, ath9k-devel; +Cc: kvalo
just to comply with current ath9k_hw_nvram_read to return value, hence
behaving reacting accordingly.
Signed-off-by: Eduardo Abinader <eduardo.abinader@riverbed.com>
---
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
index 5bd2cba..08607d7 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
@@ -3252,7 +3252,8 @@ static int ar9300_eeprom_restore_flash(struct ath_hw *ah, u8 *mptr,
int i;
for (i = 0; i < mdata_size / 2; i++, data++)
- ath9k_hw_nvram_read(ah, i, data);
+ if (!ath9k_hw_nvram_read(ah, i, data))
+ return -EIO;
return 0;
}
@@ -3282,7 +3283,8 @@ static int ar9300_eeprom_restore_internal(struct ath_hw *ah,
if (ath9k_hw_use_flash(ah)) {
u8 txrx;
- ar9300_eeprom_restore_flash(ah, mptr, mdata_size);
+ if (ar9300_eeprom_restore_flash(ah, mptr, mdata_size))
+ return -EIO;
/* check if eeprom contains valid data */
eep = (struct ar9300_eeprom *) mptr;
--
2.5.0
^ permalink raw reply related
* [PATCH 0/1 V3] ath9k: consider return code on ar9300_eeprom_restore_flash
From: Eduardo Abinader @ 2016-07-27 13:19 UTC (permalink / raw)
To: linux-wireless, ath9k-devel; +Cc: kvalo
Hi Kale,
Just added the two error codes you asked:
https://lists.ath9k.org/pipermail/ath9k-devel/2016-July/014686.html
Thanks.
Eduardo Abinader (1):
ath9k: consider return code on ar9300_eeprom_restore_flash
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--
2.5.0
^ permalink raw reply
* Re: [PATCH 2/4] ath10k: Add provision for Rx descriptor abstraction
From: Michal Kazior @ 2016-07-27 13:12 UTC (permalink / raw)
To: Thiagarajan, Vasanthakumar; +Cc: ath10k@lists.infradead.org, linux-wireless
In-Reply-To: <5798B042.4070604@qti.qualcomm.com>
On 27 July 2016 at 14:59, Thiagarajan, Vasanthakumar
<vthiagar@qti.qualcomm.com> wrote:
> On Wednesday 27 July 2016 06:13 PM, Michal Kazior wrote:
>> On 27 July 2016 at 14:36, Vasanthakumar Thiagarajan
[...]
>>> --- a/drivers/net/wireless/ath/ath10k/core.c
>>> +++ b/drivers/net/wireless/ath/ath10k/core.c
>>> @@ -68,6 +68,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
>>> .board_size = QCA988X_BOARD_DATA_SZ,
>>> .board_ext_size = QCA988X_BOARD_EXT_DATA_SZ,
>>> },
>>> + .hw_rx_desc_ops = &qca988x_rx_desc_ops,
>> [...]
>>> +struct ath10k_hw_rx_desc_ops {
>>> + int (*rx_desc_get_l3_pad_bytes)(struct htt_rx_desc *rxd);
>>> +};
>>
>> Benjamin is trying to implement coverage class by poking hw registers
>> over firmware's head [1]. I'm thinking the hw_rx_desc_ops could be
>> generalized to hw_ops so it can be used for doing hw-specific hacks as
>> well. What do you think?
>
> Sure. Instead of reworking this patch set, can this be done in a separate patch?.
I don't really mind especially since there's not much comments on his work yet.
Michał
^ permalink raw reply
* Re: [PATCH 2/4] ath10k: Add provision for Rx descriptor abstraction
From: Thiagarajan, Vasanthakumar @ 2016-07-27 12:59 UTC (permalink / raw)
To: michal.kazior@tieto.com; +Cc: ath10k@lists.infradead.org, linux-wireless
In-Reply-To: <CA+BoTQ=kUP-Qtw1EWKKfM_aGtJS_4oQdz4tqD5tiJkF_k3-vOA@mail.gmail.com>
T24gV2VkbmVzZGF5IDI3IEp1bHkgMjAxNiAwNjoxMyBQTSwgTWljaGFsIEthemlvciB3cm90ZToN
Cj4gT24gMjcgSnVseSAyMDE2IGF0IDE0OjM2LCBWYXNhbnRoYWt1bWFyIFRoaWFnYXJhamFuDQo+
IDx2dGhpYWdhckBxdGkucXVhbGNvbW0uY29tPiB3cm90ZToNCj4+IFRoZXJlIGFyZSBzbGlnaHQg
ZGlmZmVyZW5jZXMgaW4gUnggaHcgZGVzY3JpcHRvciBpbmZvcm1hdGlvbg0KPj4gYW1vbmcgZGlm
ZmVyZW50IGNoaXBzLiBTbyBmYXIgZHJpdmVyIGRvZXMgbm90IHVzZSB0aG9zZSBuZXcNCj4+IGlu
Zm9ybWF0aW9uIGZvciBhbnkgZnVuY3Rpb25hbGl0aWVzLCBidXQgdGhlcmUgaXMgb25lIGltcG9y
dGFudA0KPj4gaW5mb3JtYXRpb24gd2hpY2ggaXMgYXZhaWxhYmxlIGZyb20gUUNBOTlYMCBvbndh
cmRzIHRvIGluZGljYXRlDQo+PiB0aGUgbnVtYmVyIG9mIGJ5dGVzIHRoYXQgaHcgcGFkZGVkIGF0
IHRoZSBiZWdpbmluZyBvZiB0aGUgcngNCj4+IHBheWxvYWQgYW5kIHRoaXMgaW5mb3JtYXRpb24g
aXMgbmVlZGVkIHRvIHVuZGVjYXAgdGhlIHJ4DQo+PiBwYWNrZXQuIEFkZCBhbiBhYnN0cmFjdGlv
biBmb3IgUnggZGVzYyB0byBtYWtlIHVzZSBvZiB0aGUNCj4+IG5ldyBkZXNjIGluZm9ybWF0aW9u
IGF2YWlsYWJsZS4gVGhlIGNhbGxiYWNrIHRoYXQgdGhpcyBwYXRjaA0KPj4gZGVmaW5lcyB0byBy
ZXRyaWV2ZSB0aGUgcGFkZGluZyBieXRlcyB3aWxsIGJlIHVzZWQgaW4gZm9sbG93LXVwDQo+PiBw
YXRjaC4NCj4+DQo+PiBTaWduZWQtb2ZmLWJ5OiBWYXNhbnRoYWt1bWFyIFRoaWFnYXJhamFuIDx2
dGhpYWdhckBxdGkucXVhbGNvbW0uY29tPg0KPj4gLS0tDQo+PiAgIGRyaXZlcnMvbmV0L3dpcmVs
ZXNzL2F0aC9hdGgxMGsvY29yZS5jIHwgMTIgKysrKysrKysrKysrDQo+PiAgIGRyaXZlcnMvbmV0
L3dpcmVsZXNzL2F0aC9hdGgxMGsvaHcuYyAgIHwgMTMgKysrKysrKysrKysrKw0KPj4gICBkcml2
ZXJzL25ldC93aXJlbGVzcy9hdGgvYXRoMTBrL2h3LmggICB8IDEyICsrKysrKysrKysrKw0KPj4g
ICAzIGZpbGVzIGNoYW5nZWQsIDM3IGluc2VydGlvbnMoKykNCj4+DQo+PiBkaWZmIC0tZ2l0IGEv
ZHJpdmVycy9uZXQvd2lyZWxlc3MvYXRoL2F0aDEway9jb3JlLmMgYi9kcml2ZXJzL25ldC93aXJl
bGVzcy9hdGgvYXRoMTBrL2NvcmUuYw0KPj4gaW5kZXggZTg4OTgyOS4uOWM1ZTkzYiAxMDA2NDQN
Cj4+IC0tLSBhL2RyaXZlcnMvbmV0L3dpcmVsZXNzL2F0aC9hdGgxMGsvY29yZS5jDQo+PiArKysg
Yi9kcml2ZXJzL25ldC93aXJlbGVzcy9hdGgvYXRoMTBrL2NvcmUuYw0KPj4gQEAgLTY4LDYgKzY4
LDcgQEAgc3RhdGljIGNvbnN0IHN0cnVjdCBhdGgxMGtfaHdfcGFyYW1zIGF0aDEwa19od19wYXJh
bXNfbGlzdFtdID0gew0KPj4gICAgICAgICAgICAgICAgICAgICAgICAgIC5ib2FyZF9zaXplID0g
UUNBOTg4WF9CT0FSRF9EQVRBX1NaLA0KPj4gICAgICAgICAgICAgICAgICAgICAgICAgIC5ib2Fy
ZF9leHRfc2l6ZSA9IFFDQTk4OFhfQk9BUkRfRVhUX0RBVEFfU1osDQo+PiAgICAgICAgICAgICAg
ICAgIH0sDQo+PiArICAgICAgICAgICAgICAgLmh3X3J4X2Rlc2Nfb3BzID0gJnFjYTk4OHhfcnhf
ZGVzY19vcHMsDQo+IFsuLi5dDQo+PiArc3RydWN0IGF0aDEwa19od19yeF9kZXNjX29wcyB7DQo+
PiArICAgICAgIGludCAoKnJ4X2Rlc2NfZ2V0X2wzX3BhZF9ieXRlcykoc3RydWN0IGh0dF9yeF9k
ZXNjICpyeGQpOw0KPj4gK307DQo+DQo+IEJlbmphbWluIGlzIHRyeWluZyB0byBpbXBsZW1lbnQg
Y292ZXJhZ2UgY2xhc3MgYnkgcG9raW5nIGh3IHJlZ2lzdGVycw0KPiBvdmVyIGZpcm13YXJlJ3Mg
aGVhZCBbMV0uIEknbSB0aGlua2luZyB0aGUgaHdfcnhfZGVzY19vcHMgY291bGQgYmUNCj4gZ2Vu
ZXJhbGl6ZWQgdG8gaHdfb3BzIHNvIGl0IGNhbiBiZSB1c2VkIGZvciBkb2luZyBody1zcGVjaWZp
YyBoYWNrcyBhcw0KPiB3ZWxsLiBXaGF0IGRvIHlvdSB0aGluaz8NCg0KU3VyZS4gSW5zdGVhZCBv
ZiByZXdvcmtpbmcgdGhpcyBwYXRjaCBzZXQsIGNhbiB0aGlzIGJlIGRvbmUgaW4gYSBzZXBhcmF0
ZSBwYXRjaD8uDQoNClZhc2FudGgNCg==
^ permalink raw reply
* Re: [PATCH 2/4] ath10k: Add provision for Rx descriptor abstraction
From: Michal Kazior @ 2016-07-27 12:43 UTC (permalink / raw)
To: Vasanthakumar Thiagarajan; +Cc: ath10k@lists.infradead.org, linux-wireless
In-Reply-To: <1469623006-13178-3-git-send-email-vthiagar@qti.qualcomm.com>
On 27 July 2016 at 14:36, Vasanthakumar Thiagarajan
<vthiagar@qti.qualcomm.com> wrote:
> There are slight differences in Rx hw descriptor information
> among different chips. So far driver does not use those new
> information for any functionalities, but there is one important
> information which is available from QCA99X0 onwards to indicate
> the number of bytes that hw padded at the begining of the rx
> payload and this information is needed to undecap the rx
> packet. Add an abstraction for Rx desc to make use of the
> new desc information available. The callback that this patch
> defines to retrieve the padding bytes will be used in follow-up
> patch.
>
> Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
> ---
> drivers/net/wireless/ath/ath10k/core.c | 12 ++++++++++++
> drivers/net/wireless/ath/ath10k/hw.c | 13 +++++++++++++
> drivers/net/wireless/ath/ath10k/hw.h | 12 ++++++++++++
> 3 files changed, 37 insertions(+)
>
> diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
> index e889829..9c5e93b 100644
> --- a/drivers/net/wireless/ath/ath10k/core.c
> +++ b/drivers/net/wireless/ath/ath10k/core.c
> @@ -68,6 +68,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
> .board_size = QCA988X_BOARD_DATA_SZ,
> .board_ext_size = QCA988X_BOARD_EXT_DATA_SZ,
> },
> + .hw_rx_desc_ops = &qca988x_rx_desc_ops,
[...]
> +struct ath10k_hw_rx_desc_ops {
> + int (*rx_desc_get_l3_pad_bytes)(struct htt_rx_desc *rxd);
> +};
Benjamin is trying to implement coverage class by poking hw registers
over firmware's head [1]. I'm thinking the hw_rx_desc_ops could be
generalized to hw_ops so it can be used for doing hw-specific hacks as
well. What do you think?
[1]: http://lists.infradead.org/pipermail/ath10k/2016-July/008107.html
Michał
^ permalink raw reply
* [PATCH] ath10k: Fix rfc1042 header retrieval in QCA4019 with eth decap mode
From: Vasanthakumar Thiagarajan @ 2016-07-27 12:38 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, Vasanthakumar Thiagarajan
Chipset from QCA99X0 onwards (QCA99X0, QCA9984, QCA4019 & future)
rx_hdr_status is not padded to align in 4-byte boundary. Define a
new hw_params field to handle different alignment behaviour between
different hw. This patch fixes improper retrieval of rfc1042 header
with QCA4019. This patch along with "ath10k: Properly remove padding
from the start of rx payload" will fix traffic failure in ethernet
decap mode for QCA4019.
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
---
drivers/net/wireless/ath/ath10k/core.c | 12 ++++++++++++
drivers/net/wireless/ath/ath10k/htt_rx.c | 5 +++--
drivers/net/wireless/ath/ath10k/hw.h | 3 +++
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 74d0ace..ea6a8f4 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -68,6 +68,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.board_ext_size = QCA988X_BOARD_EXT_DATA_SZ,
},
.hw_rx_desc_ops = &qca988x_rx_desc_ops,
+ .decap_align_bytes = 4,
},
{
.id = QCA9887_HW_1_0_VERSION,
@@ -87,6 +88,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.board_ext_size = QCA9887_BOARD_EXT_DATA_SZ,
},
.hw_rx_desc_ops = &qca988x_rx_desc_ops,
+ .decap_align_bytes = 4,
},
{
.id = QCA6174_HW_2_1_VERSION,
@@ -105,6 +107,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.board_ext_size = QCA6174_BOARD_EXT_DATA_SZ,
},
.hw_rx_desc_ops = &qca988x_rx_desc_ops,
+ .decap_align_bytes = 4,
},
{
.id = QCA6174_HW_2_1_VERSION,
@@ -123,6 +126,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.board_ext_size = QCA6174_BOARD_EXT_DATA_SZ,
},
.hw_rx_desc_ops = &qca988x_rx_desc_ops,
+ .decap_align_bytes = 4,
},
{
.id = QCA6174_HW_3_0_VERSION,
@@ -141,6 +145,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.board_ext_size = QCA6174_BOARD_EXT_DATA_SZ,
},
.hw_rx_desc_ops = &qca988x_rx_desc_ops,
+ .decap_align_bytes = 4,
},
{
.id = QCA6174_HW_3_2_VERSION,
@@ -160,6 +165,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.board_ext_size = QCA6174_BOARD_EXT_DATA_SZ,
},
.hw_rx_desc_ops = &qca988x_rx_desc_ops,
+ .decap_align_bytes = 4,
},
{
.id = QCA99X0_HW_2_0_DEV_VERSION,
@@ -183,6 +189,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.board_ext_size = QCA99X0_BOARD_EXT_DATA_SZ,
},
.hw_rx_desc_ops = &qca99x0_rx_desc_ops,
+ .decap_align_bytes = 1,
},
{
.id = QCA9984_HW_1_0_DEV_VERSION,
@@ -206,6 +213,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.board_ext_size = QCA99X0_BOARD_EXT_DATA_SZ,
},
.hw_rx_desc_ops = &qca99x0_rx_desc_ops,
+ .decap_align_bytes = 1,
},
{
.id = QCA9888_HW_2_0_DEV_VERSION,
@@ -228,6 +236,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.board_ext_size = QCA99X0_BOARD_EXT_DATA_SZ,
},
.hw_rx_desc_ops = &qca99x0_rx_desc_ops,
+ .decap_align_bytes = 1,
},
{
.id = QCA9377_HW_1_0_DEV_VERSION,
@@ -246,6 +255,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.board_ext_size = QCA9377_BOARD_EXT_DATA_SZ,
},
.hw_rx_desc_ops = &qca988x_rx_desc_ops,
+ .decap_align_bytes = 4,
},
{
.id = QCA9377_HW_1_1_DEV_VERSION,
@@ -264,6 +274,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.board_ext_size = QCA9377_BOARD_EXT_DATA_SZ,
},
.hw_rx_desc_ops = &qca988x_rx_desc_ops,
+ .decap_align_bytes = 4,
},
{
.id = QCA4019_HW_1_0_DEV_VERSION,
@@ -288,6 +299,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.board_ext_size = QCA4019_BOARD_EXT_DATA_SZ,
},
.hw_rx_desc_ops = &qca99x0_rx_desc_ops,
+ .decap_align_bytes = 1,
},
};
diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c
index 36c4809..97d5b07 100644
--- a/drivers/net/wireless/ath/ath10k/htt_rx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
@@ -1108,6 +1108,7 @@ static void *ath10k_htt_rx_h_find_rfc1042(struct ath10k *ar,
size_t hdr_len, crypto_len;
void *rfc1042;
bool is_first, is_last, is_amsdu;
+ int bytes_aligned = ar->hw_params.decap_align_bytes;
rxd = (void *)msdu->data - sizeof(*rxd);
hdr = (void *)rxd->rx_hdr_status;
@@ -1124,8 +1125,8 @@ static void *ath10k_htt_rx_h_find_rfc1042(struct ath10k *ar,
hdr_len = ieee80211_hdrlen(hdr->frame_control);
crypto_len = ath10k_htt_rx_crypto_param_len(ar, enctype);
- rfc1042 += round_up(hdr_len, 4) +
- round_up(crypto_len, 4);
+ rfc1042 += round_up(hdr_len, bytes_aligned) +
+ round_up(crypto_len, bytes_aligned);
}
if (is_amsdu)
diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h
index 1620e76..1961e67 100644
--- a/drivers/net/wireless/ath/ath10k/hw.h
+++ b/drivers/net/wireless/ath/ath10k/hw.h
@@ -403,6 +403,9 @@ struct ath10k_hw_params {
} fw;
const struct ath10k_hw_rx_desc_ops *hw_rx_desc_ops;
+
+ /* Number of bytes used for alignment in rx_hdr_status of rx desc. */
+ int decap_align_bytes;
};
struct htt_rx_desc;
--
1.9.1
^ permalink raw reply related
* [PATCH 4/4] ath10k: Remove 4-addr padding related hw_param configuration
From: Vasanthakumar Thiagarajan @ 2016-07-27 12:36 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, Vasanthakumar Thiagarajan
In-Reply-To: <1469623006-13178-1-git-send-email-vthiagar@qti.qualcomm.com>
hw_4addr_pad was added to handle different types of padding
in 4-address rx frame. But this padding is not very specific
to 4-address, it can happen even with three address + ethernet
decap mode. Since the padding information can be obtained
through Rx desc for QCA99X0 and newer chips, this hw_param
is not needed any more.
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
---
drivers/net/wireless/ath/ath10k/core.c | 9 ---------
drivers/net/wireless/ath/ath10k/hw.h | 8 --------
2 files changed, 17 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 9c5e93b..74d0ace 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -60,7 +60,6 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.otp_exe_param = 0,
.channel_counters_freq_hz = 88000,
.max_probe_resp_desc_thres = 0,
- .hw_4addr_pad = ATH10K_HW_4ADDR_PAD_AFTER,
.cal_data_len = 2116,
.fw = {
.dir = QCA988X_HW_2_0_FW_DIR,
@@ -80,7 +79,6 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.otp_exe_param = 0,
.channel_counters_freq_hz = 88000,
.max_probe_resp_desc_thres = 0,
- .hw_4addr_pad = ATH10K_HW_4ADDR_PAD_AFTER,
.cal_data_len = 2116,
.fw = {
.dir = QCA9887_HW_1_0_FW_DIR,
@@ -117,7 +115,6 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.otp_exe_param = 0,
.channel_counters_freq_hz = 88000,
.max_probe_resp_desc_thres = 0,
- .hw_4addr_pad = ATH10K_HW_4ADDR_PAD_AFTER,
.cal_data_len = 8124,
.fw = {
.dir = QCA6174_HW_2_1_FW_DIR,
@@ -136,7 +133,6 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.otp_exe_param = 0,
.channel_counters_freq_hz = 88000,
.max_probe_resp_desc_thres = 0,
- .hw_4addr_pad = ATH10K_HW_4ADDR_PAD_AFTER,
.cal_data_len = 8124,
.fw = {
.dir = QCA6174_HW_3_0_FW_DIR,
@@ -155,7 +151,6 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.otp_exe_param = 0,
.channel_counters_freq_hz = 88000,
.max_probe_resp_desc_thres = 0,
- .hw_4addr_pad = ATH10K_HW_4ADDR_PAD_AFTER,
.cal_data_len = 8124,
.fw = {
/* uses same binaries as hw3.0 */
@@ -177,7 +172,6 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.cck_rate_map_rev2 = true,
.channel_counters_freq_hz = 150000,
.max_probe_resp_desc_thres = 24,
- .hw_4addr_pad = ATH10K_HW_4ADDR_PAD_BEFORE,
.tx_chain_mask = 0xf,
.rx_chain_mask = 0xf,
.max_spatial_stream = 4,
@@ -201,7 +195,6 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.cck_rate_map_rev2 = true,
.channel_counters_freq_hz = 150000,
.max_probe_resp_desc_thres = 24,
- .hw_4addr_pad = ATH10K_HW_4ADDR_PAD_BEFORE,
.tx_chain_mask = 0xf,
.rx_chain_mask = 0xf,
.max_spatial_stream = 4,
@@ -224,7 +217,6 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.continuous_frag_desc = true,
.channel_counters_freq_hz = 150000,
.max_probe_resp_desc_thres = 24,
- .hw_4addr_pad = ATH10K_HW_4ADDR_PAD_BEFORE,
.tx_chain_mask = 3,
.rx_chain_mask = 3,
.max_spatial_stream = 2,
@@ -285,7 +277,6 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.cck_rate_map_rev2 = true,
.channel_counters_freq_hz = 125000,
.max_probe_resp_desc_thres = 24,
- .hw_4addr_pad = ATH10K_HW_4ADDR_PAD_BEFORE,
.tx_chain_mask = 0x3,
.rx_chain_mask = 0x3,
.max_spatial_stream = 2,
diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h
index cdd2ce4..1620e76 100644
--- a/drivers/net/wireless/ath/ath10k/hw.h
+++ b/drivers/net/wireless/ath/ath10k/hw.h
@@ -338,11 +338,6 @@ enum ath10k_hw_rate_rev2_cck {
ATH10K_HW_RATE_REV2_CCK_SP_11M,
};
-enum ath10k_hw_4addr_pad {
- ATH10K_HW_4ADDR_PAD_AFTER,
- ATH10K_HW_4ADDR_PAD_BEFORE,
-};
-
enum ath10k_hw_cc_wraparound_type {
ATH10K_HW_CC_WRAP_DISABLED = 0,
@@ -395,9 +390,6 @@ struct ath10k_hw_params {
*/
u32 max_probe_resp_desc_thres;
- /* The padding bytes's location is different on various chips */
- enum ath10k_hw_4addr_pad hw_4addr_pad;
-
u32 tx_chain_mask;
u32 rx_chain_mask;
u32 max_spatial_stream;
--
1.9.1
^ permalink raw reply related
* [PATCH 3/4] ath10k: Properly remove padding from the start of rx payload
From: Vasanthakumar Thiagarajan @ 2016-07-27 12:36 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, Vasanthakumar Thiagarajan
In-Reply-To: <1469623006-13178-1-git-send-email-vthiagar@qti.qualcomm.com>
In QCA99X0 (QCA99X0, QCA9984, QCA9888 and QCA4019) family chips,
hw adds padding at the begining of the rx payload to make L3
header 4-byte aligned. In the chips doing this type of padding,
the number of bytes padded will be indicated through msdu_end:info1.
Define a hw_rx_desc_ops wrapper to retrieve the number of padded
bytes and use this while doing undecap. This should fix padding
related issues with ethernt decap format with QCA99X0, QCA9984,
QCA9888 and QCA4019 hw.
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
---
drivers/net/wireless/ath/ath10k/htt_rx.c | 36 +++++++++++++++++++-------------
drivers/net/wireless/ath/ath10k/hw.h | 9 ++++++++
2 files changed, 31 insertions(+), 14 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c
index 78db5d6..36c4809 100644
--- a/drivers/net/wireless/ath/ath10k/htt_rx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
@@ -1056,9 +1056,11 @@ static void ath10k_htt_rx_h_undecap_nwifi(struct ath10k *ar,
const u8 first_hdr[64])
{
struct ieee80211_hdr *hdr;
+ struct htt_rx_desc *rxd;
size_t hdr_len;
u8 da[ETH_ALEN];
u8 sa[ETH_ALEN];
+ int l3_pad_bytes;
/* Delivered decapped frame:
* [nwifi 802.11 header] <-- replaced with 802.11 hdr
@@ -1072,19 +1074,12 @@ static void ath10k_htt_rx_h_undecap_nwifi(struct ath10k *ar,
*/
/* pull decapped header and copy SA & DA */
- if ((ar->hw_params.hw_4addr_pad == ATH10K_HW_4ADDR_PAD_BEFORE) &&
- ieee80211_has_a4(((struct ieee80211_hdr *)first_hdr)->frame_control)) {
- /* The QCA99X0 4 address mode pad 2 bytes at the
- * beginning of MSDU
- */
- hdr = (struct ieee80211_hdr *)(msdu->data + 2);
- /* The skb length need be extended 2 as the 2 bytes at the tail
- * be excluded due to the padding
- */
- skb_put(msdu, 2);
- } else {
- hdr = (struct ieee80211_hdr *)(msdu->data);
- }
+ rxd = (void *)msdu->data - sizeof(*rxd);
+
+ l3_pad_bytes = ath10k_rx_desc_get_l3_pad_bytes(&ar->hw_params, rxd);
+ skb_put(msdu, l3_pad_bytes);
+
+ hdr = (struct ieee80211_hdr *)(msdu->data + l3_pad_bytes);
hdr_len = ath10k_htt_rx_nwifi_hdrlen(ar, hdr);
ether_addr_copy(da, ieee80211_get_DA(hdr));
@@ -1151,6 +1146,8 @@ static void ath10k_htt_rx_h_undecap_eth(struct ath10k *ar,
void *rfc1042;
u8 da[ETH_ALEN];
u8 sa[ETH_ALEN];
+ int l3_pad_bytes;
+ struct htt_rx_desc *rxd;
/* Delivered decapped frame:
* [eth header] <-- replaced with 802.11 hdr & rfc1042/llc
@@ -1161,6 +1158,11 @@ static void ath10k_htt_rx_h_undecap_eth(struct ath10k *ar,
if (WARN_ON_ONCE(!rfc1042))
return;
+ rxd = (void *)msdu->data - sizeof(*rxd);
+ l3_pad_bytes = ath10k_rx_desc_get_l3_pad_bytes(&ar->hw_params, rxd);
+ skb_put(msdu, l3_pad_bytes);
+ skb_pull(msdu, l3_pad_bytes);
+
/* pull decapped header and copy SA & DA */
eth = (struct ethhdr *)msdu->data;
ether_addr_copy(da, eth->h_dest);
@@ -1191,6 +1193,8 @@ static void ath10k_htt_rx_h_undecap_snap(struct ath10k *ar,
{
struct ieee80211_hdr *hdr;
size_t hdr_len;
+ int l3_pad_bytes;
+ struct htt_rx_desc *rxd;
/* Delivered decapped frame:
* [amsdu header] <-- replaced with 802.11 hdr
@@ -1198,7 +1202,11 @@ static void ath10k_htt_rx_h_undecap_snap(struct ath10k *ar,
* [payload]
*/
- skb_pull(msdu, sizeof(struct amsdu_subframe_hdr));
+ rxd = (void *)msdu->data - sizeof(*rxd);
+ l3_pad_bytes = ath10k_rx_desc_get_l3_pad_bytes(&ar->hw_params, rxd);
+
+ skb_put(msdu, l3_pad_bytes);
+ skb_pull(msdu, sizeof(struct amsdu_subframe_hdr) + l3_pad_bytes);
hdr = (struct ieee80211_hdr *)first_hdr;
hdr_len = ieee80211_hdrlen(hdr->frame_control);
diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h
index a281544..cdd2ce4 100644
--- a/drivers/net/wireless/ath/ath10k/hw.h
+++ b/drivers/net/wireless/ath/ath10k/hw.h
@@ -423,6 +423,15 @@ struct ath10k_hw_rx_desc_ops {
extern const struct ath10k_hw_rx_desc_ops qca988x_rx_desc_ops;
extern const struct ath10k_hw_rx_desc_ops qca99x0_rx_desc_ops;
+static inline int
+ath10k_rx_desc_get_l3_pad_bytes(struct ath10k_hw_params *hw,
+ struct htt_rx_desc *rxd)
+{
+ if (hw->hw_rx_desc_ops->rx_desc_get_l3_pad_bytes)
+ return hw->hw_rx_desc_ops->rx_desc_get_l3_pad_bytes(rxd);
+ return 0;
+}
+
/* Target specific defines for MAIN firmware */
#define TARGET_NUM_VDEVS 8
#define TARGET_NUM_PEER_AST 2
--
1.9.1
^ permalink raw reply related
* [PATCH 2/4] ath10k: Add provision for Rx descriptor abstraction
From: Vasanthakumar Thiagarajan @ 2016-07-27 12:36 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, Vasanthakumar Thiagarajan
In-Reply-To: <1469623006-13178-1-git-send-email-vthiagar@qti.qualcomm.com>
There are slight differences in Rx hw descriptor information
among different chips. So far driver does not use those new
information for any functionalities, but there is one important
information which is available from QCA99X0 onwards to indicate
the number of bytes that hw padded at the begining of the rx
payload and this information is needed to undecap the rx
packet. Add an abstraction for Rx desc to make use of the
new desc information available. The callback that this patch
defines to retrieve the padding bytes will be used in follow-up
patch.
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
---
drivers/net/wireless/ath/ath10k/core.c | 12 ++++++++++++
drivers/net/wireless/ath/ath10k/hw.c | 13 +++++++++++++
drivers/net/wireless/ath/ath10k/hw.h | 12 ++++++++++++
3 files changed, 37 insertions(+)
diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index e889829..9c5e93b 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -68,6 +68,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.board_size = QCA988X_BOARD_DATA_SZ,
.board_ext_size = QCA988X_BOARD_EXT_DATA_SZ,
},
+ .hw_rx_desc_ops = &qca988x_rx_desc_ops,
},
{
.id = QCA9887_HW_1_0_VERSION,
@@ -87,6 +88,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.board_size = QCA9887_BOARD_DATA_SZ,
.board_ext_size = QCA9887_BOARD_EXT_DATA_SZ,
},
+ .hw_rx_desc_ops = &qca988x_rx_desc_ops,
},
{
.id = QCA6174_HW_2_1_VERSION,
@@ -104,6 +106,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.board_size = QCA6174_BOARD_DATA_SZ,
.board_ext_size = QCA6174_BOARD_EXT_DATA_SZ,
},
+ .hw_rx_desc_ops = &qca988x_rx_desc_ops,
},
{
.id = QCA6174_HW_2_1_VERSION,
@@ -122,6 +125,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.board_size = QCA6174_BOARD_DATA_SZ,
.board_ext_size = QCA6174_BOARD_EXT_DATA_SZ,
},
+ .hw_rx_desc_ops = &qca988x_rx_desc_ops,
},
{
.id = QCA6174_HW_3_0_VERSION,
@@ -140,6 +144,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.board_size = QCA6174_BOARD_DATA_SZ,
.board_ext_size = QCA6174_BOARD_EXT_DATA_SZ,
},
+ .hw_rx_desc_ops = &qca988x_rx_desc_ops,
},
{
.id = QCA6174_HW_3_2_VERSION,
@@ -159,6 +164,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.board_size = QCA6174_BOARD_DATA_SZ,
.board_ext_size = QCA6174_BOARD_EXT_DATA_SZ,
},
+ .hw_rx_desc_ops = &qca988x_rx_desc_ops,
},
{
.id = QCA99X0_HW_2_0_DEV_VERSION,
@@ -182,6 +188,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.board_size = QCA99X0_BOARD_DATA_SZ,
.board_ext_size = QCA99X0_BOARD_EXT_DATA_SZ,
},
+ .hw_rx_desc_ops = &qca99x0_rx_desc_ops,
},
{
.id = QCA9984_HW_1_0_DEV_VERSION,
@@ -205,6 +212,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.board_size = QCA99X0_BOARD_DATA_SZ,
.board_ext_size = QCA99X0_BOARD_EXT_DATA_SZ,
},
+ .hw_rx_desc_ops = &qca99x0_rx_desc_ops,
},
{
.id = QCA9888_HW_2_0_DEV_VERSION,
@@ -227,6 +235,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.board_size = QCA99X0_BOARD_DATA_SZ,
.board_ext_size = QCA99X0_BOARD_EXT_DATA_SZ,
},
+ .hw_rx_desc_ops = &qca99x0_rx_desc_ops,
},
{
.id = QCA9377_HW_1_0_DEV_VERSION,
@@ -244,6 +253,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.board_size = QCA9377_BOARD_DATA_SZ,
.board_ext_size = QCA9377_BOARD_EXT_DATA_SZ,
},
+ .hw_rx_desc_ops = &qca988x_rx_desc_ops,
},
{
.id = QCA9377_HW_1_1_DEV_VERSION,
@@ -261,6 +271,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.board_size = QCA9377_BOARD_DATA_SZ,
.board_ext_size = QCA9377_BOARD_EXT_DATA_SZ,
},
+ .hw_rx_desc_ops = &qca988x_rx_desc_ops,
},
{
.id = QCA4019_HW_1_0_DEV_VERSION,
@@ -285,6 +296,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
.board_size = QCA4019_BOARD_DATA_SZ,
.board_ext_size = QCA4019_BOARD_EXT_DATA_SZ,
},
+ .hw_rx_desc_ops = &qca99x0_rx_desc_ops,
},
};
diff --git a/drivers/net/wireless/ath/ath10k/hw.c b/drivers/net/wireless/ath/ath10k/hw.c
index f903d46..6149aa9 100644
--- a/drivers/net/wireless/ath/ath10k/hw.c
+++ b/drivers/net/wireless/ath/ath10k/hw.c
@@ -219,3 +219,16 @@ void ath10k_hw_fill_survey_time(struct ath10k *ar, struct survey_info *survey,
survey->time = CCNT_TO_MSEC(ar, cc);
survey->time_busy = CCNT_TO_MSEC(ar, rcc);
}
+
+const struct ath10k_hw_rx_desc_ops qca988x_rx_desc_ops = {
+};
+
+static int ath10k_qca99x0_rx_desc_get_l3_pad_bytes(struct htt_rx_desc *rxd)
+{
+ return MS(__le32_to_cpu(rxd->msdu_end.qca99x0.info1),
+ RX_MSDU_END_INFO1_L3_HDR_PAD);
+}
+
+const struct ath10k_hw_rx_desc_ops qca99x0_rx_desc_ops = {
+ .rx_desc_get_l3_pad_bytes = ath10k_qca99x0_rx_desc_get_l3_pad_bytes,
+};
diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h
index 1315557..a281544 100644
--- a/drivers/net/wireless/ath/ath10k/hw.h
+++ b/drivers/net/wireless/ath/ath10k/hw.h
@@ -409,8 +409,20 @@ struct ath10k_hw_params {
size_t board_size;
size_t board_ext_size;
} fw;
+
+ const struct ath10k_hw_rx_desc_ops *hw_rx_desc_ops;
};
+struct htt_rx_desc;
+
+/* Defines needed for Rx descriptor abstraction */
+struct ath10k_hw_rx_desc_ops {
+ int (*rx_desc_get_l3_pad_bytes)(struct htt_rx_desc *rxd);
+};
+
+extern const struct ath10k_hw_rx_desc_ops qca988x_rx_desc_ops;
+extern const struct ath10k_hw_rx_desc_ops qca99x0_rx_desc_ops;
+
/* Target specific defines for MAIN firmware */
#define TARGET_NUM_VDEVS 8
#define TARGET_NUM_PEER_AST 2
--
1.9.1
^ permalink raw reply related
* [PATCH 1/4] ath10k: Move ath10k_hw_params definition to hw.h
From: Vasanthakumar Thiagarajan @ 2016-07-27 12:36 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, Vasanthakumar Thiagarajan
In-Reply-To: <1469623006-13178-1-git-send-email-vthiagar@qti.qualcomm.com>
This is to prepare for rx descriptor abstraction where we'll
be dereferencing ath10k_hw_params member in hw.h. Moreover
hw.h looks more suitable to house ath10k_hw_params definition
than core.h
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
---
drivers/net/wireless/ath/ath10k/core.h | 48 +---------------------------------
drivers/net/wireless/ath/ath10k/hw.h | 48 ++++++++++++++++++++++++++++++++++
2 files changed, 49 insertions(+), 47 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 30ae5bf..5ace413 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -715,53 +715,7 @@ struct ath10k {
struct ath10k_htc htc;
struct ath10k_htt htt;
- struct ath10k_hw_params {
- u32 id;
- u16 dev_id;
- const char *name;
- u32 patch_load_addr;
- int uart_pin;
- u32 otp_exe_param;
-
- /* Type of hw cycle counter wraparound logic, for more info
- * refer enum ath10k_hw_cc_wraparound_type.
- */
- enum ath10k_hw_cc_wraparound_type cc_wraparound_type;
-
- /* Some of chip expects fragment descriptor to be continuous
- * memory for any TX operation. Set continuous_frag_desc flag
- * for the hardware which have such requirement.
- */
- bool continuous_frag_desc;
-
- /* CCK hardware rate table mapping for the newer chipsets
- * like QCA99X0, QCA4019 got revised. The CCK h/w rate values
- * are in a proper order with respect to the rate/preamble
- */
- bool cck_rate_map_rev2;
-
- u32 channel_counters_freq_hz;
-
- /* Mgmt tx descriptors threshold for limiting probe response
- * frames.
- */
- u32 max_probe_resp_desc_thres;
-
- /* The padding bytes's location is different on various chips */
- enum ath10k_hw_4addr_pad hw_4addr_pad;
-
- u32 tx_chain_mask;
- u32 rx_chain_mask;
- u32 max_spatial_stream;
- u32 cal_data_len;
-
- struct ath10k_hw_params_fw {
- const char *dir;
- const char *board;
- size_t board_size;
- size_t board_ext_size;
- } fw;
- } hw_params;
+ struct ath10k_hw_params hw_params;
/* contains the firmware images used with ATH10K_FIRMWARE_MODE_NORMAL */
struct ath10k_fw_components normal_mode_fw;
diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h
index e014cd7..1315557 100644
--- a/drivers/net/wireless/ath/ath10k/hw.h
+++ b/drivers/net/wireless/ath/ath10k/hw.h
@@ -363,6 +363,54 @@ enum ath10k_hw_cc_wraparound_type {
ATH10K_HW_CC_WRAP_SHIFTED_EACH = 2,
};
+struct ath10k_hw_params {
+ u32 id;
+ u16 dev_id;
+ const char *name;
+ u32 patch_load_addr;
+ int uart_pin;
+ u32 otp_exe_param;
+
+ /* Type of hw cycle counter wraparound logic, for more info
+ * refer enum ath10k_hw_cc_wraparound_type.
+ */
+ enum ath10k_hw_cc_wraparound_type cc_wraparound_type;
+
+ /* Some of chip expects fragment descriptor to be continuous
+ * memory for any TX operation. Set continuous_frag_desc flag
+ * for the hardware which have such requirement.
+ */
+ bool continuous_frag_desc;
+
+ /* CCK hardware rate table mapping for the newer chipsets
+ * like QCA99X0, QCA4019 got revised. The CCK h/w rate values
+ * are in a proper order with respect to the rate/preamble
+ */
+ bool cck_rate_map_rev2;
+
+ u32 channel_counters_freq_hz;
+
+ /* Mgmt tx descriptors threshold for limiting probe response
+ * frames.
+ */
+ u32 max_probe_resp_desc_thres;
+
+ /* The padding bytes's location is different on various chips */
+ enum ath10k_hw_4addr_pad hw_4addr_pad;
+
+ u32 tx_chain_mask;
+ u32 rx_chain_mask;
+ u32 max_spatial_stream;
+ u32 cal_data_len;
+
+ struct ath10k_hw_params_fw {
+ const char *dir;
+ const char *board;
+ size_t board_size;
+ size_t board_ext_size;
+ } fw;
+};
+
/* Target specific defines for MAIN firmware */
#define TARGET_NUM_VDEVS 8
#define TARGET_NUM_PEER_AST 2
--
1.9.1
^ permalink raw reply related
* [PATCH 0/4] ath10k: Padding related clean ups in rx
From: Vasanthakumar Thiagarajan @ 2016-07-27 12:36 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, Vasanthakumar Thiagarajan
This patch set adds abstraction for rx_hw_desc processing so that
we can make use of newer desc fields notifying padding information
which is done on rx payload. "ath10k: Properly remove padding from
the start of rx payload" fixes padding related bug in ethernet decap
mode for QCA99X0, QCA9984 qnd QCA4019 but even fixing this bug will
not make ethernet decap mode work, there needs to be some more fix
wich would follow this patch series.
Vasanthakumar Thiagarajan (4):
ath10k: Move ath10k_hw_params definition to hw.h
ath10k: Add provision for Rx descriptor abstraction
ath10k: Properly remove padding from the start of rx payload
ath10k: Remove 4-addr padding related hw_param configuration
drivers/net/wireless/ath/ath10k/core.c | 21 ++++++----
drivers/net/wireless/ath/ath10k/core.h | 48 +--------------------
drivers/net/wireless/ath/ath10k/htt_rx.c | 36 +++++++++-------
drivers/net/wireless/ath/ath10k/hw.c | 13 ++++++
drivers/net/wireless/ath/ath10k/hw.h | 71 +++++++++++++++++++++++++++++---
5 files changed, 114 insertions(+), 75 deletions(-)
--
1.9.1
^ permalink raw reply
* Re: PROBLEM: network data corruption (bisected to e5a4b0bb803b)
From: Alan Curry @ 2016-07-27 10:32 UTC (permalink / raw)
To: Al Viro
Cc: Christian Lamparter, Alan Curry, linux-wireless, netdev,
linux-kernel, alexmcwhirter
In-Reply-To: <20160724190237.GP2356@ZenIV.linux.org.uk>
Al Viro wrote:
>
> Another thing (and if that works, it's *NOT* a proper fix - it would be
> papering over the problem, but at least it would show where to look for
> it) - try (on top of mainline) the following delta:
I tried it on top of v4.6.4 and on top of the very recent v4.7-2509-g59ebc44
from Linus, and still got corruption.
>
> diff --git a/net/core/datagram.c b/net/core/datagram.c
> index b7de71f..0ee5995 100644
> --- a/net/core/datagram.c
> +++ b/net/core/datagram.c
> @@ -734,7 +734,7 @@ int skb_copy_and_csum_datagram_msg(struct sk_buff *skb,
> if (!chunk)
> return 0;
>
> - if (msg_data_left(msg) < chunk) {
> + if (iov_iter_single_seg_count(&msg->msg_iter) < chunk) {
> if (__skb_checksum_complete(skb))
> goto csum_error;
> if (skb_copy_datagram_msg(skb, hlen, msg, chunk))
>
--
Alan Curry
^ permalink raw reply
* Re: [PATCH] ath10k: Allow setting coverage class
From: kbuild test robot @ 2016-07-27 10:28 UTC (permalink / raw)
To: Benjamin Berg
Cc: kbuild-all, Kalle Valo, linux-wireless, ath10k,
Sebastian Gottschall, Benjamin Berg, Simon Wunderlich,
Mathias Kretschmer
In-Reply-To: <1469608424-11370-1-git-send-email-benjamin@sipsolutions.net>
[-- Attachment #1: Type: text/plain, Size: 2064 bytes --]
Hi,
[auto build test ERROR on ath6kl/ath-next]
[also build test ERROR on next-20160727]
[cannot apply to v4.7]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Benjamin-Berg/ath10k-Allow-setting-coverage-class/20160727-163809
base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath-next
config: sparc64-allyesconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 5.4.0-6) 5.4.0 20160609
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=sparc64
All errors (new ones prefixed by >>):
drivers/net/wireless/ath/ath10k/wmi.c: In function 'ath10k_ath9k_set_pdev_coverage_class':
>> drivers/net/wireless/ath/ath10k/wmi.c:3176:2: error: expected ';' before 'timeout'
timeout = timeout & ATH9K_MAC_TIME_OUT_ACK;
^
drivers/net/wireless/ath/ath10k/wmi.c:3181:2: error: expected ';' before 'timeout'
timeout = timeout >> ATH9K_MAC_TIME_OUT_CTS_S;
^
drivers/net/wireless/ath/ath10k/wmi.c:3185:2: error: expected ';' before 'timeout'
timeout = timeout & ATH9K_MAC_TIME_OUT_CTS;
^
vim +3176 drivers/net/wireless/ath/ath10k/wmi.c
3170 /* Update ack timeout (lower halfword). */
3171 timeout = (timeout_reg & ATH9K_MAC_TIME_OUT_ACK);
3172 timeout = timeout >> ATH9K_MAC_TIME_OUT_ACK_S;
3173 timeout += 3 * value * counters_freq_mhz;
3174 timeout = min_t(u32, timeout, ATH9K_MAC_TIME_OUT_MAX);
3175 timeout = (timeout << ATH9K_MAC_TIME_OUT_ACK_S)
> 3176 timeout = timeout & ATH9K_MAC_TIME_OUT_ACK;
3177 timeout_reg = (timeout_reg & ~ATH9K_MAC_TIME_OUT_ACK) | timeout;
3178
3179 /* Update cts timeout (upper halfword). */
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 46490 bytes --]
^ permalink raw reply
* Re: [PATCH] ath10k: Allow setting coverage class
From: Michal Kazior @ 2016-07-27 9:15 UTC (permalink / raw)
To: Benjamin Berg
Cc: Kalle Valo, linux-wireless, ath10k@lists.infradead.org,
Sebastian Gottschall, Simon Wunderlich, Mathias Kretschmer
In-Reply-To: <1469608424-11370-1-git-send-email-benjamin@sipsolutions.net>
On 27 July 2016 at 10:33, Benjamin Berg <benjamin@sipsolutions.net> wrote:
> Unfortunately ath10k does not generally allow modifying the coverage class
> with the stock firmware and Qualcomm has so far refused to implement this
> feature so that it can be properly supported in ath10k. If we however know
> the registers that need to be modified for proper operation with a higher
> coverage class, then we can do these modifications from the driver.
>
> This patch implements this hack for first generation cards which are based
> on a core that is similar to ath9k. The registers are modified in place and
> need to be re-written every time the firmware sets them. To achieve this
> the register status is verified after any event from the firmware.
"After any event from firmware" would also need to include HTT events
which your patch doesn't consider.
> The coverage class may not be modified temporarily right after the card
> re-initializes the registers. This is for example the case during scanning.
>
> A warning will be generated if the hack is not supported on the card or
> unexpected values are hit. There is no error reporting for userspace
> applications though (this is a limitation in the mac80211 driver
> interface).
With a recent change in ath10k the ieee80211_ops can be updated in
ar->ops so you can NULL-ify .set_coverage_class before registering to
mac80211. See how wake_tx_queue() is masked. You could use this to
mask it for WAVE2 devices that haven't been verified.
[...]
> @@ -257,6 +258,12 @@ extern const struct ath10k_hw_regs qca6174_regs;
> extern const struct ath10k_hw_regs qca99x0_regs;
> extern const struct ath10k_hw_regs qca4019_regs;
>
> +enum ath10k_hw_mac_core_rev {
> + ATH10K_HW_MAC_CORE_UNKNOWN = 0,
> + ATH10K_HW_MAC_CORE_ATH9K,
WAVE1 would be more appropriate.
> + ATH10K_HW_MAC_CORE_WAVE2,
> +};
> +
[...]
> +#define ATH9K_MAC_TIME_OUT 0x8014
> +#define ATH9K_MAC_TIME_OUT_MAX 0x00003FFF
> +#define ATH9K_MAC_TIME_OUT_ACK 0x00003FFF
> +#define ATH9K_MAC_TIME_OUT_ACK_S 0
> +#define ATH9K_MAC_TIME_OUT_CTS 0x3FFF0000
> +#define ATH9K_MAC_TIME_OUT_CTS_S 16
> +
> +#define ATH9K_MAC_IFS_SLOT 0x1070
> +#define ATH9K_MAC_IFS_SLOT_M 0x0000FFFF
> +#define ATH9K_MAC_IFS_SLOT_RESV0 0xFFFF0000
The prefix is wrong. It shouldn't be ATH9K.
Moreover FW refers to these register as PCU_ACK_CTS_TIMEOUT and
PCU_GBL_IFS_SLOT.
> +
> #endif /* _HW_H_ */
> diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
> index 55c823f..a9b587e 100644
> --- a/drivers/net/wireless/ath/ath10k/mac.c
> +++ b/drivers/net/wireless/ath/ath10k/mac.c
> @@ -5372,6 +5372,15 @@ static void ath10k_bss_info_changed(struct ieee80211_hw *hw,
> mutex_unlock(&ar->conf_mutex);
> }
>
> +static void ath10k_set_coverage_class(struct ieee80211_hw *hw,
> + s16 value)
Wrong function prefix/name. Should be: ath10k_mac_op_set_coverage_class
> +{
> + struct ath10k *ar = hw->priv;
> +
> + if (ath10k_wmi_pdev_set_coverage_class(ar, value) == -EOPNOTSUPP)
> + ath10k_warn(ar, "Modification of coverage class is not supported!\n");
Warning doesn't match the style used in ath10k. "failed to set
coverage class: not supported\n".
[...]
> diff --git a/drivers/net/wireless/ath/ath10k/wmi-ops.h b/drivers/net/wireless/ath/ath10k/wmi-ops.h
> index 64ebd30..3ebc57e 100644
> --- a/drivers/net/wireless/ath/ath10k/wmi-ops.h
> +++ b/drivers/net/wireless/ath/ath10k/wmi-ops.h
> @@ -52,6 +52,8 @@ struct wmi_ops {
> int (*pull_wow_event)(struct ath10k *ar, struct sk_buff *skb,
> struct wmi_wow_ev_arg *arg);
> enum wmi_txbf_conf (*get_txbf_conf_scheme)(struct ath10k *ar);
> + void (*set_pdev_coverage_class)(struct ath10k *ar,
> + s16 value);
WMI ops are used to generate and process events and command buffers.
These ops are not supposed to have side-effects but
"set_pdev_coverage_class" implies it does.
[...]
> /* MAIN WMI cmd track */
> static struct wmi_cmd_map wmi_cmd_map = {
> @@ -3096,6 +3097,121 @@ ath10k_wmi_op_pull_peer_kick_ev(struct ath10k *ar, struct sk_buff *skb,
> return 0;
> }
>
> +static void
> +ath10k_ath9k_set_pdev_coverage_class(struct ath10k *ar, s16 value)
The prefix is wrong. "ath9k" should be used here.
ath10k_wmi_ is appropriate for stuff in wmi.c
[...]
> + /* Do some sanity checks on the slottime register. */
> + if (unlikely(slottime_reg % counters_freq_mhz)) {
> + ath10k_warn(ar,
> + "Not adjusting coverage class timeouts, expected an integer microsecond slot time in HW register\n");
Wrong message style.
> +
> + goto store_regs;
> + }
> +
> + slottime = (slottime_reg & ATH9K_MAC_IFS_SLOT_M) / counters_freq_mhz;
> + if (unlikely(slottime != 9 && slottime != 20)) {
> + ath10k_warn(ar,
> + "Not adjusting coverage class timeouts, expected a slot time of 9 or 20us in HW register. It is %uus.\n",
> + slottime);
Wrong message style.
[...]
> + timeout_reg = (timeout_reg & ~ATH9K_MAC_TIME_OUT_ACK) | timeout;
> +
> + /* Update cts timeout (upper halfword). */
> + timeout = (timeout_reg & ATH9K_MAC_TIME_OUT_CTS)
> + timeout = timeout >> ATH9K_MAC_TIME_OUT_CTS_S;
> + timeout += 3 * value * counters_freq_mhz;
> + timeout = min_t(u32, timeout, ATH9K_MAC_TIME_OUT_MAX);
> + timeout = (timeout << ATH9K_MAC_TIME_OUT_CTS_S)
> + timeout = timeout & ATH9K_MAC_TIME_OUT_CTS;
> + timeout_reg = (timeout_reg & ~ATH9K_MAC_TIME_OUT_CTS) | timeout;
I would really love to see Jakub's hw register helper macros get
merged and used here..
> +
> + ath10k_hif_write32(ar, WLAN_MAC_BASE_ADDRESS + 0x1070, slottime_reg);
> + ath10k_hif_write32(ar, WLAN_MAC_BASE_ADDRESS + 0x8014, timeout_reg);
So you're defining register offsets and then you're using literal
values to address them?..
[...]
> +static void
> +ath10k_wmi_op_set_pdev_coverage_class(struct ath10k *ar, s16 value)
> +{
> + switch (ar->hw_values->mac_core_rev) {
> + case ATH10K_HW_MAC_CORE_ATH9K:
> + ath10k_ath9k_set_pdev_coverage_class(ar, value);
> + break;
> + default:
> + if (value != -1)
> + ath10k_warn(ar, "Setting the coverage class is not supported for this chipset.");
> + break;
> + }
> +}
This is wrong in general. You aren't using WMI to submit coverage
class configuration so it doesn't belong here (wmi.c and wmi-ops).
You're poking HW registers directly actually.
The logic should be placed in mac.c and hw.c and abstracted away
through hw_ops which are defined/populated per-hw in pci.c. Vasanth
recently worked on something similar for rx descriptor handling
(ar->hw_rx_desc_ops). I think it should be generalized to hw_ops and
you should add the coverage-class stuff on top of that.
Michał
^ permalink raw reply
* [PATCH] ath10k: Allow setting coverage class
From: Benjamin Berg @ 2016-07-27 8:33 UTC (permalink / raw)
To: Kalle Valo, linux-wireless
Cc: ath10k, Sebastian Gottschall, Benjamin Berg, Simon Wunderlich,
Mathias Kretschmer
Unfortunately ath10k does not generally allow modifying the coverage class
with the stock firmware and Qualcomm has so far refused to implement this
feature so that it can be properly supported in ath10k. If we however know
the registers that need to be modified for proper operation with a higher
coverage class, then we can do these modifications from the driver.
This patch implements this hack for first generation cards which are based
on a core that is similar to ath9k. The registers are modified in place and
need to be re-written every time the firmware sets them. To achieve this
the register status is verified after any event from the firmware.
The coverage class may not be modified temporarily right after the card
re-initializes the registers. This is for example the case during scanning.
A warning will be generated if the hack is not supported on the card or
unexpected values are hit. There is no error reporting for userspace
applications though (this is a limitation in the mac80211 driver
interface).
Thanks to Sebastian Gottschall <s.gottschall@dd-wrt.com> for initially
working on a userspace support for this. This patch wouldn't have been
possible without this documentation.
Signed-off-by: Benjamin Berg <benjamin@sipsolutions.net>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fit.fraunhofer.de>
---
drivers/net/wireless/ath/ath10k/core.h | 10 ++
drivers/net/wireless/ath/ath10k/hw.c | 9 ++
drivers/net/wireless/ath/ath10k/hw.h | 28 +++++-
drivers/net/wireless/ath/ath10k/mac.c | 10 ++
drivers/net/wireless/ath/ath10k/wmi-ops.h | 17 ++++
drivers/net/wireless/ath/ath10k/wmi.c | 151 ++++++++++++++++++++++++++++++
6 files changed, 224 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 9374bcd..781219b 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -935,6 +935,16 @@ struct ath10k {
struct ath10k_thermal thermal;
struct ath10k_wow wow;
+ /* protected by data_lock */
+ struct {
+ s16 coverage_class;
+
+ u32 reg_slottime_conf;
+ u32 reg_slottime_orig;
+ u32 reg_ack_cts_timeout_conf;
+ u32 reg_ack_cts_timeout_orig;
+ } fw_coverage;
+
/* must be last */
u8 drv_priv[0] __aligned(sizeof(void *));
};
diff --git a/drivers/net/wireless/ath/ath10k/hw.c b/drivers/net/wireless/ath/ath10k/hw.c
index f903d46..82249be 100644
--- a/drivers/net/wireless/ath/ath10k/hw.c
+++ b/drivers/net/wireless/ath/ath10k/hw.c
@@ -22,6 +22,7 @@ const struct ath10k_hw_regs qca988x_regs = {
.rtc_soc_base_address = 0x00004000,
.rtc_wmac_base_address = 0x00005000,
.soc_core_base_address = 0x00009000,
+ .wlan_mac_base_address = 0x00020000,
.ce_wrapper_base_address = 0x00057000,
.ce0_base_address = 0x00057400,
.ce1_base_address = 0x00057800,
@@ -48,6 +49,7 @@ const struct ath10k_hw_regs qca6174_regs = {
.rtc_soc_base_address = 0x00000800,
.rtc_wmac_base_address = 0x00001000,
.soc_core_base_address = 0x0003a000,
+ .wlan_mac_base_address = 0x00020000,
.ce_wrapper_base_address = 0x00034000,
.ce0_base_address = 0x00034400,
.ce1_base_address = 0x00034800,
@@ -74,6 +76,7 @@ const struct ath10k_hw_regs qca99x0_regs = {
.rtc_soc_base_address = 0x00080000,
.rtc_wmac_base_address = 0x00000000,
.soc_core_base_address = 0x00082000,
+ .wlan_mac_base_address = 0x00030000,
.ce_wrapper_base_address = 0x0004d000,
.ce0_base_address = 0x0004a000,
.ce1_base_address = 0x0004a400,
@@ -109,6 +112,7 @@ const struct ath10k_hw_regs qca99x0_regs = {
const struct ath10k_hw_regs qca4019_regs = {
.rtc_soc_base_address = 0x00080000,
.soc_core_base_address = 0x00082000,
+ .wlan_mac_base_address = 0x00030000,
.ce_wrapper_base_address = 0x0004d000,
.ce0_base_address = 0x0004a000,
.ce1_base_address = 0x0004a400,
@@ -139,6 +143,7 @@ const struct ath10k_hw_regs qca4019_regs = {
};
const struct ath10k_hw_values qca988x_values = {
+ .mac_core_rev = ATH10K_HW_MAC_CORE_ATH9K,
.rtc_state_val_on = 3,
.ce_count = 8,
.msi_assign_ce_max = 7,
@@ -148,6 +153,7 @@ const struct ath10k_hw_values qca988x_values = {
};
const struct ath10k_hw_values qca6174_values = {
+ .mac_core_rev = ATH10K_HW_MAC_CORE_ATH9K,
.rtc_state_val_on = 3,
.ce_count = 8,
.msi_assign_ce_max = 7,
@@ -157,6 +163,7 @@ const struct ath10k_hw_values qca6174_values = {
};
const struct ath10k_hw_values qca99x0_values = {
+ .mac_core_rev = ATH10K_HW_MAC_CORE_WAVE2,
.rtc_state_val_on = 5,
.ce_count = 12,
.msi_assign_ce_max = 12,
@@ -166,6 +173,7 @@ const struct ath10k_hw_values qca99x0_values = {
};
const struct ath10k_hw_values qca9888_values = {
+ .mac_core_rev = ATH10K_HW_MAC_CORE_WAVE2,
.rtc_state_val_on = 3,
.ce_count = 12,
.msi_assign_ce_max = 12,
@@ -175,6 +183,7 @@ const struct ath10k_hw_values qca9888_values = {
};
const struct ath10k_hw_values qca4019_values = {
+ .mac_core_rev = ATH10K_HW_MAC_CORE_WAVE2,
.ce_count = 12,
.num_target_ce_config_wlan = 10,
.ce_desc_meta_data_mask = 0xFFF0,
diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h
index e014cd7..4151326 100644
--- a/drivers/net/wireless/ath/ath10k/hw.h
+++ b/drivers/net/wireless/ath/ath10k/hw.h
@@ -230,6 +230,7 @@ struct ath10k_hw_regs {
u32 rtc_soc_base_address;
u32 rtc_wmac_base_address;
u32 soc_core_base_address;
+ u32 wlan_mac_base_address;
u32 ce_wrapper_base_address;
u32 ce0_base_address;
u32 ce1_base_address;
@@ -257,6 +258,12 @@ extern const struct ath10k_hw_regs qca6174_regs;
extern const struct ath10k_hw_regs qca99x0_regs;
extern const struct ath10k_hw_regs qca4019_regs;
+enum ath10k_hw_mac_core_rev {
+ ATH10K_HW_MAC_CORE_UNKNOWN = 0,
+ ATH10K_HW_MAC_CORE_ATH9K,
+ ATH10K_HW_MAC_CORE_WAVE2,
+};
+
struct ath10k_hw_values {
u32 rtc_state_val_on;
u8 ce_count;
@@ -264,6 +271,7 @@ struct ath10k_hw_values {
u8 num_target_ce_config_wlan;
u16 ce_desc_meta_data_mask;
u8 ce_desc_meta_data_lsb;
+ enum ath10k_hw_mac_core_rev mac_core_rev;
};
extern const struct ath10k_hw_values qca988x_values;
@@ -545,7 +553,7 @@ enum ath10k_hw_cc_wraparound_type {
#define WLAN_SI_BASE_ADDRESS 0x00010000
#define WLAN_GPIO_BASE_ADDRESS 0x00014000
#define WLAN_ANALOG_INTF_BASE_ADDRESS 0x0001c000
-#define WLAN_MAC_BASE_ADDRESS 0x00020000
+#define WLAN_MAC_BASE_ADDRESS ar->regs->wlan_mac_base_address
#define EFUSE_BASE_ADDRESS 0x00030000
#define FPGA_REG_BASE_ADDRESS 0x00039000
#define WLAN_UART2_BASE_ADDRESS 0x00054c00
@@ -745,4 +753,22 @@ enum ath10k_hw_cc_wraparound_type {
#define RTC_STATE_V_GET(x) (((x) & RTC_STATE_V_MASK) >> RTC_STATE_V_LSB)
+/* Register definitions for ath10k cards that include a MAC which is based
+ * on ATH9k. This ath9k based MAC still has the same or at least similar
+ * registers.
+ * These registers are usually managed by the ath10k firmware. However by
+ * overriding them it is possible to support a few additional features; in this
+ * case setting the coverage class.
+ */
+#define ATH9K_MAC_TIME_OUT 0x8014
+#define ATH9K_MAC_TIME_OUT_MAX 0x00003FFF
+#define ATH9K_MAC_TIME_OUT_ACK 0x00003FFF
+#define ATH9K_MAC_TIME_OUT_ACK_S 0
+#define ATH9K_MAC_TIME_OUT_CTS 0x3FFF0000
+#define ATH9K_MAC_TIME_OUT_CTS_S 16
+
+#define ATH9K_MAC_IFS_SLOT 0x1070
+#define ATH9K_MAC_IFS_SLOT_M 0x0000FFFF
+#define ATH9K_MAC_IFS_SLOT_RESV0 0xFFFF0000
+
#endif /* _HW_H_ */
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 55c823f..a9b587e 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -5372,6 +5372,15 @@ static void ath10k_bss_info_changed(struct ieee80211_hw *hw,
mutex_unlock(&ar->conf_mutex);
}
+static void ath10k_set_coverage_class(struct ieee80211_hw *hw,
+ s16 value)
+{
+ struct ath10k *ar = hw->priv;
+
+ if (ath10k_wmi_pdev_set_coverage_class(ar, value) == -EOPNOTSUPP)
+ ath10k_warn(ar, "Modification of coverage class is not supported!\n");
+}
+
static int ath10k_hw_scan(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
struct ieee80211_scan_request *hw_req)
@@ -7397,6 +7406,7 @@ static const struct ieee80211_ops ath10k_ops = {
.remove_interface = ath10k_remove_interface,
.configure_filter = ath10k_configure_filter,
.bss_info_changed = ath10k_bss_info_changed,
+ .set_coverage_class = ath10k_set_coverage_class,
.hw_scan = ath10k_hw_scan,
.cancel_hw_scan = ath10k_cancel_hw_scan,
.set_key = ath10k_set_key,
diff --git a/drivers/net/wireless/ath/ath10k/wmi-ops.h b/drivers/net/wireless/ath/ath10k/wmi-ops.h
index 64ebd30..3ebc57e 100644
--- a/drivers/net/wireless/ath/ath10k/wmi-ops.h
+++ b/drivers/net/wireless/ath/ath10k/wmi-ops.h
@@ -52,6 +52,8 @@ struct wmi_ops {
int (*pull_wow_event)(struct ath10k *ar, struct sk_buff *skb,
struct wmi_wow_ev_arg *arg);
enum wmi_txbf_conf (*get_txbf_conf_scheme)(struct ath10k *ar);
+ void (*set_pdev_coverage_class)(struct ath10k *ar,
+ s16 value);
struct sk_buff *(*gen_pdev_suspend)(struct ath10k *ar, u32 suspend_opt);
struct sk_buff *(*gen_pdev_resume)(struct ath10k *ar);
@@ -1012,6 +1014,21 @@ ath10k_wmi_pdev_get_temperature(struct ath10k *ar)
}
static inline int
+ath10k_wmi_pdev_set_coverage_class(struct ath10k *ar,
+ s16 value)
+{
+ if (!ar->wmi.ops->set_pdev_coverage_class)
+ return -EOPNOTSUPP;
+
+ if (value < 0)
+ value = 0;
+
+ ar->wmi.ops->set_pdev_coverage_class(ar, value);
+
+ return 0;
+}
+
+static inline int
ath10k_wmi_addba_clear_resp(struct ath10k *ar, u32 vdev_id, const u8 *mac)
{
struct sk_buff *skb;
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index 169cd2e7..7f30e70 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -28,6 +28,7 @@
#include "wmi-ops.h"
#include "p2p.h"
#include "hw.h"
+#include "hif.h"
/* MAIN WMI cmd track */
static struct wmi_cmd_map wmi_cmd_map = {
@@ -3096,6 +3097,121 @@ ath10k_wmi_op_pull_peer_kick_ev(struct ath10k *ar, struct sk_buff *skb,
return 0;
}
+static void
+ath10k_ath9k_set_pdev_coverage_class(struct ath10k *ar, s16 value)
+{
+ u32 slottime_reg;
+ u32 slottime;
+ u32 timeout_reg;
+ u32 timeout;
+ u32 counters_freq_mhz = ar->hw_params.channel_counters_freq_hz / 1000;
+
+ /* The firmware does not support setting the coverage class. Instead
+ * this function monitors and modifies the corresponding MAC registers.
+ */
+
+ spin_lock_bh(&ar->data_lock);
+
+ /* Retrieve the current values of the two registers that need to be
+ * adjusted.
+ */
+ slottime_reg = ath10k_hif_read32(ar, WLAN_MAC_BASE_ADDRESS +
+ ATH9K_MAC_IFS_SLOT);
+ timeout_reg = ath10k_hif_read32(ar, WLAN_MAC_BASE_ADDRESS +
+ ATH9K_MAC_TIME_OUT);
+
+ if (value < 0)
+ value = ar->fw_coverage.coverage_class;
+
+ /* Break out if the coverage class and registers have the expected
+ * value.
+ */
+ if (value == ar->fw_coverage.coverage_class &&
+ slottime_reg == ar->fw_coverage.reg_slottime_conf &&
+ timeout_reg == ar->fw_coverage.reg_ack_cts_timeout_conf)
+ goto unlock;
+
+ /* Store new initial register values from the firmware. */
+ if (slottime_reg != ar->fw_coverage.reg_slottime_conf)
+ ar->fw_coverage.reg_slottime_orig = slottime_reg;
+ if (timeout_reg != ar->fw_coverage.reg_ack_cts_timeout_conf)
+ ar->fw_coverage.reg_ack_cts_timeout_orig = timeout_reg;
+
+ /* Calculat new value based on the (original) firmware calculation. */
+ slottime_reg = ar->fw_coverage.reg_slottime_orig;
+ timeout_reg = ar->fw_coverage.reg_ack_cts_timeout_orig;
+
+ /* Do some sanity checks on the slottime register. */
+ if (unlikely(slottime_reg % counters_freq_mhz)) {
+ ath10k_warn(ar,
+ "Not adjusting coverage class timeouts, expected an integer microsecond slot time in HW register\n");
+
+ goto store_regs;
+ }
+
+ slottime = (slottime_reg & ATH9K_MAC_IFS_SLOT_M) / counters_freq_mhz;
+ if (unlikely(slottime != 9 && slottime != 20)) {
+ ath10k_warn(ar,
+ "Not adjusting coverage class timeouts, expected a slot time of 9 or 20us in HW register. It is %uus.\n",
+ slottime);
+
+ goto store_regs;
+ }
+
+ /* Recalculate the register values by adding the additional propagation
+ * delay (3us per coverage class).
+ */
+
+ slottime = (slottime_reg & ATH9K_MAC_IFS_SLOT_M);
+ slottime += value * 3 * counters_freq_mhz;
+ slottime = min_t(u32, slottime, ATH9K_MAC_IFS_SLOT_M);
+ slottime_reg = (slottime_reg & ~ATH9K_MAC_IFS_SLOT_M) | slottime;
+
+ /* Update ack timeout (lower halfword). */
+ timeout = (timeout_reg & ATH9K_MAC_TIME_OUT_ACK);
+ timeout = timeout >> ATH9K_MAC_TIME_OUT_ACK_S;
+ timeout += 3 * value * counters_freq_mhz;
+ timeout = min_t(u32, timeout, ATH9K_MAC_TIME_OUT_MAX);
+ timeout = (timeout << ATH9K_MAC_TIME_OUT_ACK_S)
+ timeout = timeout & ATH9K_MAC_TIME_OUT_ACK;
+ timeout_reg = (timeout_reg & ~ATH9K_MAC_TIME_OUT_ACK) | timeout;
+
+ /* Update cts timeout (upper halfword). */
+ timeout = (timeout_reg & ATH9K_MAC_TIME_OUT_CTS)
+ timeout = timeout >> ATH9K_MAC_TIME_OUT_CTS_S;
+ timeout += 3 * value * counters_freq_mhz;
+ timeout = min_t(u32, timeout, ATH9K_MAC_TIME_OUT_MAX);
+ timeout = (timeout << ATH9K_MAC_TIME_OUT_CTS_S)
+ timeout = timeout & ATH9K_MAC_TIME_OUT_CTS;
+ timeout_reg = (timeout_reg & ~ATH9K_MAC_TIME_OUT_CTS) | timeout;
+
+ ath10k_hif_write32(ar, WLAN_MAC_BASE_ADDRESS + 0x1070, slottime_reg);
+ ath10k_hif_write32(ar, WLAN_MAC_BASE_ADDRESS + 0x8014, timeout_reg);
+
+store_regs:
+ /* After an error we will not retry setting the coverage class. */
+ ar->fw_coverage.coverage_class = value;
+ ar->fw_coverage.reg_slottime_conf = slottime_reg;
+ ar->fw_coverage.reg_ack_cts_timeout_conf = timeout_reg;
+
+unlock:
+ spin_unlock_bh(&ar->data_lock);
+}
+
+static void
+ath10k_wmi_op_set_pdev_coverage_class(struct ath10k *ar, s16 value)
+{
+ switch (ar->hw_values->mac_core_rev) {
+ case ATH10K_HW_MAC_CORE_ATH9K:
+ ath10k_ath9k_set_pdev_coverage_class(ar, value);
+ break;
+ default:
+ if (value != -1)
+ ath10k_warn(ar, "Setting the coverage class is not supported for this chipset.");
+ break;
+ }
+}
+
void ath10k_wmi_event_peer_sta_kickout(struct ath10k *ar, struct sk_buff *skb)
{
struct wmi_peer_kick_ev_arg arg = {};
@@ -4992,6 +5108,12 @@ static void ath10k_wmi_op_rx(struct ath10k *ar, struct sk_buff *skb)
break;
}
+ /* Check and possibly reset the coverage class configuration override.
+ * There are many conditions (in particular internal card resets) that
+ * can cause the registers to be re-initialized.
+ */
+ ath10k_wmi_op_set_pdev_coverage_class(ar, -1);
+
out:
dev_kfree_skb(skb);
}
@@ -5116,6 +5238,12 @@ static void ath10k_wmi_10_1_op_rx(struct ath10k *ar, struct sk_buff *skb)
break;
}
+ /* Check and possibly reset the coverage class configuration override.
+ * There are many conditions (in particular internal card resets) that
+ * can cause the registers to be re-initialized.
+ */
+ ath10k_wmi_op_set_pdev_coverage_class(ar, -1);
+
out:
dev_kfree_skb(skb);
}
@@ -5240,6 +5368,12 @@ static void ath10k_wmi_10_2_op_rx(struct ath10k *ar, struct sk_buff *skb)
break;
}
+ /* Check and possibly reset the coverage class configuration override.
+ * There are many conditions (in particular internal card resets) that
+ * can cause the registers to be re-initialized.
+ */
+ ath10k_wmi_op_set_pdev_coverage_class(ar, -1);
+
out:
dev_kfree_skb(skb);
}
@@ -5323,6 +5457,12 @@ static void ath10k_wmi_10_4_op_rx(struct ath10k *ar, struct sk_buff *skb)
break;
}
+ /* Check and possibly reset the coverage class configuration override.
+ * There are many conditions (in particular internal card resets) that
+ * can cause the registers to be re-initialized.
+ */
+ ath10k_wmi_op_set_pdev_coverage_class(ar, -1);
+
out:
dev_kfree_skb(skb);
}
@@ -6017,6 +6157,7 @@ void ath10k_wmi_start_scan_init(struct ath10k *ar,
| WMI_SCAN_EVENT_COMPLETED
| WMI_SCAN_EVENT_BSS_CHANNEL
| WMI_SCAN_EVENT_FOREIGN_CHANNEL
+ | WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT
| WMI_SCAN_EVENT_DEQUEUED;
arg->scan_ctrl_flags |= WMI_SCAN_CHAN_STAT_EVENT;
arg->n_bssids = 1;
@@ -7666,6 +7807,8 @@ static const struct wmi_ops wmi_ops = {
.pull_fw_stats = ath10k_wmi_main_op_pull_fw_stats,
.pull_roam_ev = ath10k_wmi_op_pull_roam_ev,
+ .set_pdev_coverage_class = ath10k_wmi_op_set_pdev_coverage_class,
+
.gen_pdev_suspend = ath10k_wmi_op_gen_pdev_suspend,
.gen_pdev_resume = ath10k_wmi_op_gen_pdev_resume,
.gen_pdev_set_rd = ath10k_wmi_op_gen_pdev_set_rd,
@@ -7739,6 +7882,8 @@ static const struct wmi_ops wmi_10_1_ops = {
.pull_rdy = ath10k_wmi_op_pull_rdy_ev,
.pull_roam_ev = ath10k_wmi_op_pull_roam_ev,
+ .set_pdev_coverage_class = ath10k_wmi_op_set_pdev_coverage_class,
+
.gen_pdev_suspend = ath10k_wmi_op_gen_pdev_suspend,
.gen_pdev_resume = ath10k_wmi_op_gen_pdev_resume,
.gen_pdev_set_param = ath10k_wmi_op_gen_pdev_set_param,
@@ -7808,6 +7953,8 @@ static const struct wmi_ops wmi_10_2_ops = {
.pull_rdy = ath10k_wmi_op_pull_rdy_ev,
.pull_roam_ev = ath10k_wmi_op_pull_roam_ev,
+ .set_pdev_coverage_class = ath10k_wmi_op_set_pdev_coverage_class,
+
.gen_pdev_suspend = ath10k_wmi_op_gen_pdev_suspend,
.gen_pdev_resume = ath10k_wmi_op_gen_pdev_resume,
.gen_pdev_set_param = ath10k_wmi_op_gen_pdev_set_param,
@@ -7874,6 +8021,8 @@ static const struct wmi_ops wmi_10_2_4_ops = {
.pull_rdy = ath10k_wmi_op_pull_rdy_ev,
.pull_roam_ev = ath10k_wmi_op_pull_roam_ev,
+ .set_pdev_coverage_class = ath10k_wmi_op_set_pdev_coverage_class,
+
.gen_pdev_suspend = ath10k_wmi_op_gen_pdev_suspend,
.gen_pdev_resume = ath10k_wmi_op_gen_pdev_resume,
.gen_pdev_set_param = ath10k_wmi_op_gen_pdev_set_param,
@@ -7938,6 +8087,8 @@ static const struct wmi_ops wmi_10_4_ops = {
.pull_roam_ev = ath10k_wmi_op_pull_roam_ev,
.get_txbf_conf_scheme = ath10k_wmi_10_4_txbf_conf_scheme,
+ .set_pdev_coverage_class = ath10k_wmi_op_set_pdev_coverage_class,
+
.gen_pdev_suspend = ath10k_wmi_op_gen_pdev_suspend,
.gen_pdev_resume = ath10k_wmi_op_gen_pdev_resume,
.gen_pdev_set_rd = ath10k_wmi_10x_op_gen_pdev_set_rd,
--
2.8.1
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox