* Re: brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
From: Krzysiek Rosinski @ 2019-03-03 19:04 UTC (permalink / raw)
To: linux-wireless
In-Reply-To: <CAAUgxQLVXy4X-h+dLK0WrU5_cvbx0+mxvyFRFuNkYkybP4f_1g@mail.gmail.com>
On Sun, Mar 3, 2019 at 10:22 AM Krzysiek Rosinski <krzysiek@jrdltd.co.uk> wrote:
>
> Hi,
>
> I'm working on a custom board with cyw4343 connected to osd3358-sm (TI
> am3358), when I load the brcmfmac driver I get 'HT Avail timeout'
> error. The same combination of driver+firmware works fine on Raspberry
> Pi Zero W.
>
> I've tried to gather as much information I can from both; the custom
> board and pi. This is available here:
>
> https://www.dropbox.com/s/vqejyrixbxx1z8d/logs.tar.gz?dl=0
>
> I have a custom board with cyw4343 chip fitted and also flyleded
> Murata 1DX to the PocketBeagle, both give the same error code.
>
> My setup is as follows:
>
> osd335x-sm (TI am3348), cyw4343, 37.4 MHz xtal.
> Linux beaglebone 4.14.93-bone17.1 #1 PREEMPT Mon Feb 25 16:27:58 UTC
> 2019 armv7l GNU/Linux
> brcmfmac: cypress v4.14.52-backports
> brcm43430-sdio.bin: Version: 7.45.98.38
>
> Is there something obvious which I'm doing wrong? Can you give me a
> hint on how to move with this further, please?
>
> Kind regards,
> Krzysztof
Hi,
Actually, I've managed to fix this with information from the "AP6335
with mainline kernel" thread:
"boardflags3 (...) to 0x101188"
this fixed my problem too. Is there documentation which says what
boardflags3 means, please?
Once I've fixed this problem this show up:
[ 378.143229] omap_hsmmc 47810000.mmc: MMC start dma failure
[ 378.148856] brcmfmac: brcmf_sdiod_sglist_rw: CMD53 sg block write failed -22
[ 378.159997] brcmfmac: brcmf_sdio_txfail: sdio error, abort command
and terminate frame
I've managed to fix this by applying patch from here:
https://e2e.ti.com/support/processors/f/791/t/541016?AM335X-Error-message-in-SDIO-driver
Kind regards,
Krzysztof
^ permalink raw reply
* [PATCH] ath10k: Drop WARN_ON()s that always trigger during system resume
From: Rafael J. Wysocki @ 2019-03-03 17:24 UTC (permalink / raw)
To: Kalle Valo
Cc: Linux PM, Srinivas Pandruvada, ath10k, Todd Brandt,
linux-wireless
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
ath10k_mac_vif_chan() always returns an error for the given vif
during system-wide resume which reliably triggers two WARN_ON()s
in ath10k_bss_info_changed() and they are not particularly
useful in that code path, so drop them.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
drivers/net/wireless/ath/ath10k/mac.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: linux-pm/drivers/net/wireless/ath/ath10k/mac.c
===================================================================
--- linux-pm.orig/drivers/net/wireless/ath/ath10k/mac.c
+++ linux-pm/drivers/net/wireless/ath/ath10k/mac.c
@@ -5705,7 +5705,7 @@ static void ath10k_bss_info_changed(stru
}
if (changed & BSS_CHANGED_MCAST_RATE &&
- !WARN_ON(ath10k_mac_vif_chan(arvif->vif, &def))) {
+ !ath10k_mac_vif_chan(arvif->vif, &def)) {
band = def.chan->band;
rateidx = vif->bss_conf.mcast_rate[band] - 1;
@@ -5743,7 +5743,7 @@ static void ath10k_bss_info_changed(stru
}
if (changed & BSS_CHANGED_BASIC_RATES) {
- if (WARN_ON(ath10k_mac_vif_chan(vif, &def))) {
+ if (ath10k_mac_vif_chan(vif, &def)) {
mutex_unlock(&ar->conf_mutex);
return;
}
^ permalink raw reply
* Re: [mt76/mt7603/mac] Question about missing variable assignment
From: Gustavo A. R. Silva @ 2019-03-03 15:06 UTC (permalink / raw)
To: Felix Fietkau, Lorenzo Bianconi, Kalle Valo, David S. Miller,
Matthias Brugger
Cc: linux-wireless, netdev, linux-arm-kernel, linux-mediatek,
linux-kernel
In-Reply-To: <827d2ee6-04de-f4f9-15b4-40dac90bda9c@nbd.name>
On 3/3/19 4:05 AM, Felix Fietkau wrote:
> On 2019-03-02 22:10, Gustavo A. R. Silva wrote:
>> Hi all,
>>
>> The following piece of code in drivers/net/wireless/mediatek/mt76/mt7603/mac.c
>> is missing a variable assignment before line 1058. Notice that there
>> is a potential execution path in which variable *i* is compared against
>> magic number 15 at line 1075 without being initialized previously
>> (this was reported by Coverity):
>>
>> 1055 out:
>> 1056 final_rate_flags = info->status.rates[final_idx].flags;
>> 1057
>> 1058 switch (FIELD_GET(MT_TX_RATE_MODE, final_rate)) {
>> 1059 case MT_PHY_TYPE_CCK:
>> 1060 cck = true;
>> 1061 /* fall through */
>> 1062 case MT_PHY_TYPE_OFDM:
>> 1063 if (dev->mt76.chandef.chan->band == NL80211_BAND_5GHZ)
>> 1064 sband = &dev->mt76.sband_5g.sband;
>> 1065 else
>> 1066 sband = &dev->mt76.sband_2g.sband;
>> 1067 final_rate &= GENMASK(5, 0);
>> 1068 final_rate = mt7603_get_rate(dev, sband, final_rate, cck);
>> 1069 final_rate_flags = 0;
>> 1070 break;
>> 1071 case MT_PHY_TYPE_HT_GF:
>> 1072 case MT_PHY_TYPE_HT:
>> 1073 final_rate_flags |= IEEE80211_TX_RC_MCS;
>> 1074 final_rate &= GENMASK(5, 0);
>> 1075 if (i > 15)
>> 1076 return false;
>> 1077 break;
>> 1078 default:
>> 1079 return false;
>> 1080 }
>>
>> My guess is that such missing assignment should be something similar
>> to the one at line 566:
>>
>> i = FIELD_GET(MT_RXV1_TX_RATE, rxdg0);
>>
>> but I'm not sure what the proper arguments for macro FIELD_GET should
>> be.
>>
>> This code was introduced by commit c8846e1015022d2531ac4c895783e400b3e5babe
>>
>> What do you think?
> Thanks for reporting this. The fix is simpler than that, the check
> should be: if (final_rate > 15)
> I will send a fix.
>
Great. Glad to help. :)
Thanks
--
Gustavo
^ permalink raw reply
* Re: [PATCH] rsi: Fix NULL pointer dereference in kmalloc
From: Johannes Berg @ 2019-03-03 14:14 UTC (permalink / raw)
To: Aditya Pakki
Cc: kjlu, Amitkumar Karwar, Siva Rebbagondla, Kalle Valo,
David S. Miller, linux-wireless, netdev, linux-kernel
In-Reply-To: <20190302203123.9182-1-pakki001@umn.edu>
On Sat, 2019-03-02 at 14:31 -0600, Aditya Pakki wrote:
> kmalloc can fail in rsi_register_rates_channels but memcpy still attempts
> to write to channels. The patch checks and avoids such a situation.
>
> Signed-off-by: Aditya Pakki <pakki001@umn.edu>
> ---
> drivers/net/wireless/rsi/rsi_91x_mac80211.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
> index e56fc83faf0e..59eb1f533d0e 100644
> --- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c
> +++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
> @@ -197,6 +197,11 @@ static void rsi_register_rates_channels(struct rsi_hw *adapter, int band)
>
> if (band == NL80211_BAND_2GHZ) {
> channels = kmalloc(sizeof(rsi_2ghz_channels), GFP_KERNEL);
> + if (!channels) {
> + rsi_dbg(ERR_ZONE, "Failed to allocate memory\n");
> + return;
> + }
> +
> memcpy(channels,
> rsi_2ghz_channels,
> sizeof(rsi_2ghz_channels));
Should probably be kmemdup() anyway though.
johannes
^ permalink raw reply
* Re: [mt76/mt7603/mac] Question about missing variable assignment
From: Felix Fietkau @ 2019-03-03 10:05 UTC (permalink / raw)
To: Gustavo A. R. Silva, Lorenzo Bianconi, Kalle Valo,
David S. Miller, Matthias Brugger
Cc: linux-wireless, netdev, linux-arm-kernel, linux-mediatek,
linux-kernel
In-Reply-To: <20190302211046.GA20268@embeddedor.com>
On 2019-03-02 22:10, Gustavo A. R. Silva wrote:
> Hi all,
>
> The following piece of code in drivers/net/wireless/mediatek/mt76/mt7603/mac.c
> is missing a variable assignment before line 1058. Notice that there
> is a potential execution path in which variable *i* is compared against
> magic number 15 at line 1075 without being initialized previously
> (this was reported by Coverity):
>
> 1055 out:
> 1056 final_rate_flags = info->status.rates[final_idx].flags;
> 1057
> 1058 switch (FIELD_GET(MT_TX_RATE_MODE, final_rate)) {
> 1059 case MT_PHY_TYPE_CCK:
> 1060 cck = true;
> 1061 /* fall through */
> 1062 case MT_PHY_TYPE_OFDM:
> 1063 if (dev->mt76.chandef.chan->band == NL80211_BAND_5GHZ)
> 1064 sband = &dev->mt76.sband_5g.sband;
> 1065 else
> 1066 sband = &dev->mt76.sband_2g.sband;
> 1067 final_rate &= GENMASK(5, 0);
> 1068 final_rate = mt7603_get_rate(dev, sband, final_rate, cck);
> 1069 final_rate_flags = 0;
> 1070 break;
> 1071 case MT_PHY_TYPE_HT_GF:
> 1072 case MT_PHY_TYPE_HT:
> 1073 final_rate_flags |= IEEE80211_TX_RC_MCS;
> 1074 final_rate &= GENMASK(5, 0);
> 1075 if (i > 15)
> 1076 return false;
> 1077 break;
> 1078 default:
> 1079 return false;
> 1080 }
>
> My guess is that such missing assignment should be something similar
> to the one at line 566:
>
> i = FIELD_GET(MT_RXV1_TX_RATE, rxdg0);
>
> but I'm not sure what the proper arguments for macro FIELD_GET should
> be.
>
> This code was introduced by commit c8846e1015022d2531ac4c895783e400b3e5babe
>
> What do you think?
Thanks for reporting this. The fix is simpler than that, the check
should be: if (final_rate > 15)
I will send a fix.
- Felix
^ permalink raw reply
* brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
From: Krzysiek Rosinski @ 2019-03-03 9:22 UTC (permalink / raw)
To: linux-wireless
Hi,
I'm working on a custom board with cyw4343 connected to osd3358-sm (TI
am3358), when I load the brcmfmac driver I get 'HT Avail timeout'
error. The same combination of driver+firmware works fine on Raspberry
Pi Zero W.
I've tried to gather as much information I can from both; the custom
board and pi. This is available here:
https://www.dropbox.com/s/vqejyrixbxx1z8d/logs.tar.gz?dl=0
I have a custom board with cyw4343 chip fitted and also flyleded
Murata 1DX to the PocketBeagle, both give the same error code.
My setup is as follows:
osd335x-sm (TI am3348), cyw4343, 37.4 MHz xtal.
Linux beaglebone 4.14.93-bone17.1 #1 PREEMPT Mon Feb 25 16:27:58 UTC
2019 armv7l GNU/Linux
brcmfmac: cypress v4.14.52-backports
brcm43430-sdio.bin: Version: 7.45.98.38
Is there something obvious which I'm doing wrong? Can you give me a
hint on how to move with this further, please?
Kind regards,
Krzysztof
^ permalink raw reply
* Re: [PATCH] rsi: Fix NULL pointer dereference in kmalloc
From: Joe Perches @ 2019-03-03 3:02 UTC (permalink / raw)
To: Aditya Pakki
Cc: kjlu, Amitkumar Karwar, Siva Rebbagondla, Kalle Valo,
David S. Miller, linux-wireless, netdev, linux-kernel
In-Reply-To: <20190302203123.9182-1-pakki001@umn.edu>
On Sat, 2019-03-02 at 14:31 -0600, Aditya Pakki wrote:
> kmalloc can fail in rsi_register_rates_channels but memcpy still attempts
> to write to channels. The patch checks and avoids such a situation.
[]
> diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
[]
> @@ -197,6 +197,11 @@ static void rsi_register_rates_channels(struct rsi_hw *adapter, int band)
It'd be better to make this return -ENOMEM on failure
and test in the caller and push the failure up-stack.
>
> if (band == NL80211_BAND_2GHZ) {
> channels = kmalloc(sizeof(rsi_2ghz_channels), GFP_KERNEL);
> + if (!channels) {
> + rsi_dbg(ERR_ZONE, "Failed to allocate memory\n");
Allocation error messages aren't really useful
as there's a generic OOM message.
> + return;
> + }
> +
> memcpy(channels,
> rsi_2ghz_channels,
> sizeof(rsi_2ghz_channels));
> @@ -206,6 +211,11 @@ static void rsi_register_rates_channels(struct rsi_hw *adapter, int band)
> sbands->n_bitrates = ARRAY_SIZE(rsi_rates);
> } else {
> channels = kmalloc(sizeof(rsi_5ghz_channels), GFP_KERNEL);
> + if (!channels) {
> + rsi_dbg(ERR_ZONE, "Failed to allocate memory\n");
> + return;
> + }
> +
> memcpy(channels,
> rsi_5ghz_channels,
> sizeof(rsi_5ghz_channels));
^ permalink raw reply
* [mt76/mt7603/mac] Question about missing variable assignment
From: Gustavo A. R. Silva @ 2019-03-02 21:10 UTC (permalink / raw)
To: Felix Fietkau, Lorenzo Bianconi, Kalle Valo, David S. Miller,
Matthias Brugger
Cc: linux-wireless, netdev, linux-arm-kernel, linux-mediatek,
linux-kernel, Gustavo A. R. Silva
Hi all,
The following piece of code in drivers/net/wireless/mediatek/mt76/mt7603/mac.c
is missing a variable assignment before line 1058. Notice that there
is a potential execution path in which variable *i* is compared against
magic number 15 at line 1075 without being initialized previously
(this was reported by Coverity):
1055 out:
1056 final_rate_flags = info->status.rates[final_idx].flags;
1057
1058 switch (FIELD_GET(MT_TX_RATE_MODE, final_rate)) {
1059 case MT_PHY_TYPE_CCK:
1060 cck = true;
1061 /* fall through */
1062 case MT_PHY_TYPE_OFDM:
1063 if (dev->mt76.chandef.chan->band == NL80211_BAND_5GHZ)
1064 sband = &dev->mt76.sband_5g.sband;
1065 else
1066 sband = &dev->mt76.sband_2g.sband;
1067 final_rate &= GENMASK(5, 0);
1068 final_rate = mt7603_get_rate(dev, sband, final_rate, cck);
1069 final_rate_flags = 0;
1070 break;
1071 case MT_PHY_TYPE_HT_GF:
1072 case MT_PHY_TYPE_HT:
1073 final_rate_flags |= IEEE80211_TX_RC_MCS;
1074 final_rate &= GENMASK(5, 0);
1075 if (i > 15)
1076 return false;
1077 break;
1078 default:
1079 return false;
1080 }
My guess is that such missing assignment should be something similar
to the one at line 566:
i = FIELD_GET(MT_RXV1_TX_RATE, rxdg0);
but I'm not sure what the proper arguments for macro FIELD_GET should
be.
This code was introduced by commit c8846e1015022d2531ac4c895783e400b3e5babe
What do you think?
Thanks
--
Gustavo
^ permalink raw reply
* [PATCH] rsi: Fix NULL pointer dereference in kmalloc
From: Aditya Pakki @ 2019-03-02 20:31 UTC (permalink / raw)
To: pakki001
Cc: kjlu, Amitkumar Karwar, Siva Rebbagondla, Kalle Valo,
David S. Miller, linux-wireless, netdev, linux-kernel
kmalloc can fail in rsi_register_rates_channels but memcpy still attempts
to write to channels. The patch checks and avoids such a situation.
Signed-off-by: Aditya Pakki <pakki001@umn.edu>
---
drivers/net/wireless/rsi/rsi_91x_mac80211.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
index e56fc83faf0e..59eb1f533d0e 100644
--- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c
+++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
@@ -197,6 +197,11 @@ static void rsi_register_rates_channels(struct rsi_hw *adapter, int band)
if (band == NL80211_BAND_2GHZ) {
channels = kmalloc(sizeof(rsi_2ghz_channels), GFP_KERNEL);
+ if (!channels) {
+ rsi_dbg(ERR_ZONE, "Failed to allocate memory\n");
+ return;
+ }
+
memcpy(channels,
rsi_2ghz_channels,
sizeof(rsi_2ghz_channels));
@@ -206,6 +211,11 @@ static void rsi_register_rates_channels(struct rsi_hw *adapter, int band)
sbands->n_bitrates = ARRAY_SIZE(rsi_rates);
} else {
channels = kmalloc(sizeof(rsi_5ghz_channels), GFP_KERNEL);
+ if (!channels) {
+ rsi_dbg(ERR_ZONE, "Failed to allocate memory\n");
+ return;
+ }
+
memcpy(channels,
rsi_5ghz_channels,
sizeof(rsi_5ghz_channels));
--
2.17.1
^ permalink raw reply related
* Re: [PATCH] mt76: usb: reduce code indentation in mt76u_alloc_tx
From: Joe Perches @ 2019-03-02 20:30 UTC (permalink / raw)
To: Lorenzo Bianconi, nbd; +Cc: linux-wireless, sgruszka, lorenzo.bianconi
In-Reply-To: <2ead6e0fc3222faa772a37d55736c03041c90a1f.1551534029.git.lorenzo@kernel.org>
On Sat, 2019-03-02 at 14:50 +0100, Lorenzo Bianconi wrote:
> Improve code readability reducing code indentation in
> mt76u_alloc_tx
Trivial note below:
> diff --git a/drivers/net/wireless/mediatek/mt76/usb.c b/drivers/net/wireless/mediatek/mt76/usb.c
[]
> @@ -787,6 +787,7 @@ static int mt76u_alloc_tx(struct mt76_dev *dev)
> {
> struct mt76u_buf *buf;
> struct mt76_queue *q;
> + size_t size;
> int i, j;
>
> for (i = 0; i < IEEE80211_NUM_ACS; i++) {
> @@ -810,15 +811,15 @@ static int mt76u_alloc_tx(struct mt76_dev *dev)
> if (!buf->urb)
> return -ENOMEM;
>
> - if (dev->usb.sg_en) {
> - size_t size = MT_SG_MAX_SIZE *
> - sizeof(struct scatterlist);
> + if (!dev->usb.sg_en)
> + continue;
>
> - buf->urb->sg = devm_kzalloc(dev->dev, size,
> - GFP_KERNEL);
> - if (!buf->urb->sg)
> - return -ENOMEM;
> - }
> + size = MT_SG_MAX_SIZE * sizeof(struct scatterlist);
> +
> + buf->urb->sg = devm_kzalloc(dev->dev, size,
> + GFP_KERNEL);
Perhaps eliminate size and use devm_kcalloc instead like
the allocation immediately above this.
---
drivers/net/wireless/mediatek/mt76/usb.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/usb.c b/drivers/net/wireless/mediatek/mt76/usb.c
index ae6ada370597..fc87ae223f8d 100644
--- a/drivers/net/wireless/mediatek/mt76/usb.c
+++ b/drivers/net/wireless/mediatek/mt76/usb.c
@@ -806,15 +806,15 @@ static int mt76u_alloc_tx(struct mt76_dev *dev)
if (!buf->urb)
return -ENOMEM;
- if (dev->usb.sg_en) {
- size_t size = MT_SG_MAX_SIZE *
- sizeof(struct scatterlist);
-
- buf->urb->sg = devm_kzalloc(dev->dev, size,
- GFP_KERNEL);
- if (!buf->urb->sg)
- return -ENOMEM;
- }
+ if (!dev->usb.sg_en)
+ continue;
+
+ buf->urb->sg = devm_kcalloc(dev->dev,
+ MT_SG_MAX_SIZE,
+ sizeof(*buf->urb->sg),
+ GFP_KERNEL);
+ if (!buf->urb->sg)
+ return -ENOMEM;
}
}
return 0;
^ permalink raw reply related
* QCA6164 Driver Problem (firmware crashes)
From: Anees Ahmed @ 2019-03-02 20:24 UTC (permalink / raw)
To: linux-wireless
I have a laptop (Lenovo G50-45 80E3) which came with a wifi card
(Qualcomm Atheros QCA6164).
In Windows 10, as far as I have observed, it works perfectly.
In Linux distros, it works fine most of the times except in the
following scenarios:
1. Everytime the system boots, it emits some firmware related error
messages in the log.
2. Sometimes it just stops doing the data transfer with the router,
without any apparent issues in connection. Disconnecting and
reconnecting with the router fixes it.
3. When attempting to suspend, almost everytime, the firmware crashes.
It then stops responding. Only rebooting fixes the issue.
4. When attempting to hibernate, almost everytime, the firmware
crashes. It then stops responding. Only rebooting fixes the issue.
5. My current workaround is to put the laptop in airplane mode before
suspend/hibernate and then turning wifi back on after resume/thaw. It
works fine when using this scheme. But sometimes, firmware crashes
even while putting the laptop in airplane mode. It then stops
responding. Only rebooting fixes the issue.
Currently, my primary OS is Ubuntu. But I have a third OS also which I
keep changing (hopping), currently it is AntergOS. All distros face
identical issues with regards to the wifi driver, just the error
messages have minor differences.
FOLLOWING ARE THE INFO AND LOGS FROM MY PRIMARY OS.
$ uname -a
Linux anees-lap-u18 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29
16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$ sudo lspci -vvnn
02:00.0 Network controller [0280]: Qualcomm Atheros QCA6164 802.11ac
Wireless Network Adapter [168c:0041] (rev 20)
Subsystem: Lenovo QCA6164 802.11ac Wireless Network Adapter [17aa:3545]
Physical Slot: 0-1
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 48
Region 0: Memory at f0800000 (64-bit, non-prefetchable) [size=2M]
Capabilities: [40] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA
PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [50] MSI: Enable+ Count=1/8 Maskable+ 64bit-
Address: fee08004 Data: 4026
Masking: 000000fe Pending: 00000000
Capabilities: [70] Express (v2) Endpoint, MSI 00
DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s
unlimited, L1 <64us
ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
SlotPowerLimit 0.000W
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
MaxPayload 256 bytes, MaxReadReq 512 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit
Latency L0s <4us, L1 <64us
ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp+
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+
DLActive- BWMgmt- ABWMgmt-
DevCap2: Completion Timeout: Not Supported, TimeoutDis+, LTR+,
OBFF Via message
DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-,
OBFF Disabled
LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
Transmit Margin: Normal Operating Range,
EnterModifiedCompliance- ComplianceSOS-
Compliance De-emphasis: -6dB
LnkSta2: Current De-emphasis Level: -6dB,
EqualizationComplete-, EqualizationPhase1-
EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
Capabilities: [100 v2] Advanced Error Reporting
UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt-
RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt-
RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt-
RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
AERCap: First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-
Capabilities: [148 v1] Virtual Channel
Caps: LPEVC=0 RefClk=100ns PATEntryBits=1
Arb: Fixed- WRR32- WRR64- WRR128-
Ctrl: ArbSelect=Fixed
Status: InProgress-
VC0: Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
Arb: Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
Ctrl: Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
Status: NegoPending- InProgress-
Capabilities: [168 v1] Device Serial Number 00-00-00-00-00-00-00-00
Capabilities: [178 v1] Latency Tolerance Reporting
Max snoop latency: 0ns
Max no snoop latency: 0ns
Capabilities: [180 v1] L1 PM Substates
L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+
L1_PM_Substates+
PortCommonModeRestoreTime=50us PortTPowerOnTime=10us
L1SubCtl1: PCI-PM_L1.2- PCI-PM_L1.1- ASPM_L1.2- ASPM_L1.1-
T_CommonMode=0us LTR1.2_Threshold=0ns
L1SubCtl2: T_PwrOn=10us
Kernel driver in use: ath10k_pci
Kernel modules: ath10k_pci
# This is the system log every time the system boots:
$ sudo dmesg
[ 24.212523] ath10k_pci 0000:02:00.0: pci irq msi oper_irq_mode 2
irq_mode 0 reset_mode 0
[ 24.506056] ath10k_pci 0000:02:00.0: Direct firmware load for
ath10k/pre-cal-pci-0000:02:00.0.bin failed with error -2
[ 24.506088] ath10k_pci 0000:02:00.0: Direct firmware load for
ath10k/cal-pci-0000:02:00.0.bin failed with error -2
[ 24.532778] ath10k_pci 0000:02:00.0: Direct firmware load for
ath10k/QCA6174/hw2.1/firmware-6.bin failed with error -2
[ 24.544064] ath10k_pci 0000:02:00.0: qca6164 hw2.1 target
0x05010000 chip_id 0x003405ff sub 17aa:3545
[ 24.544069] ath10k_pci 0000:02:00.0: kconfig debug 0 debugfs 1
tracing 1 dfs 0 testmode 0
[ 24.544509] ath10k_pci 0000:02:00.0: firmware ver
SW_RM.1.1.1-00157-QCARMSWPZ-1 api 5 features ignore-otp,no-4addr-pad
crc32 10bf8e08
[ 24.706369] ath10k_pci 0000:02:00.0: board_file api 2 bmi_id N/A
crc32 ae2e275a
[ 25.874889] ath10k_pci 0000:02:00.0: htt-ver 3.1 wmi-op 4 htt-op 3
cal otp max-sta 32 raw 0 hwcrypto 1
[ 25.971375] ath: EEPROM regdomain: 0x6c
[ 25.971378] ath: EEPROM indicates we should expect a direct regpair map
[ 25.971380] ath: Country alpha2 being used: 00
[ 25.971381] ath: Regpair used: 0x6c
[ 25.980634] ath10k_pci 0000:02:00.0 wlp2s0: renamed from wlan0
# This is the system log after a successful suspend (and the subsequent resume):
$ sudo dmesg
[ 1088.087662] wlp2s0: deauthenticating from 88:b1:e1:a7:c8:40 by
local choice (Reason: 3=DEAUTH_LEAVING)
[ 1091.293187] ath10k_pci 0000:02:00.0: failed to update channel list: -11
[ 1094.365118] ath10k_pci 0000:02:00.0: failed to set pdev regdomain: -11
[ 1094.610358] PM: suspend entry (deep)
[ 1094.610363] PM: Syncing filesystems ... done.
[ 1096.304067] Freezing user space processes ...
[ 1097.437176] ath10k_pci 0000:02:00.0: failed to delete WMI vdev 1: -11
[ 1097.449275] ath10k_pci 0000:02:00.0: failed to read hi_board_data
address: -16
[ 1103.581096] ath10k_pci 0000:02:00.0: could not suspend target (-11)
[ 1106.628111] ath10k_pci 0000:02:00.0: failed to receive initialized
event from target: 00000000
[ 1109.652185] ath10k_pci 0000:02:00.0: failed to receive initialized
event from target: 00000000
[ 1109.652342] ath10k_pci 0000:02:00.0: failed to wait for target init: -110
[ 1109.657506] (elapsed 13.353 seconds) done.
[ 1109.657519] OOM killer disabled.
[ 1109.657520] Freezing remaining freezable tasks ... (elapsed 0.262
seconds) done.
[ 1112.814879] PM: Saving platform NVS memory
[ 1112.884421] PM: Restoring platform NVS memory
[ 1116.539542] OOM killer enabled.
[ 1116.539543] Restarting tasks ... done.
[ 1116.564335] rfkill: input handler enabled
[ 1116.614505] PM: suspend exit
[ 1116.798484] rfkill: input handler disabled
[ 1117.506319] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
[ 1118.926213] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
[ 1119.004471] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
[ 1123.890778] wlp2s0: authenticate with 88:b1:e1:a7:c8:40
[ 1123.921847] wlp2s0: send auth to 88:b1:e1:a7:c8:40 (try 1/3)
[ 1123.931521] wlp2s0: authenticated
[ 1123.934156] wlp2s0: associate with 88:b1:e1:a7:c8:40 (try 1/3)
[ 1123.937070] wlp2s0: RX AssocResp from 88:b1:e1:a7:c8:40
(capab=0x501 status=0 aid=1)
[ 1123.939673] wlp2s0: associated
[ 1123.939848] ath: EEPROM regdomain: 0x8348
[ 1123.939849] ath: EEPROM indicates we should expect a country code
[ 1123.939851] ath: doing EEPROM country->regdmn map search
[ 1123.939852] ath: country maps to regdmn code: 0x3a
[ 1123.939854] ath: Country alpha2 being used: US
[ 1123.939854] ath: Regpair used: 0x3a
[ 1123.939856] ath: regdomain 0x8348 dynamically updated by country IE
[ 1123.940769] IPv6: ADDRCONF(NETDEV_CHANGE): wlp2s0: link becomes ready
[ 1124.033939] wlp2s0: Limiting TX power to 24 (24 - 0) dBm as
advertised by 88:b1:e1:a7:c8:40
# This is the system log after a failed suspend (due to wifi card
firmware crash):
$ sudo dmesg
[ 3890.086991] wlp2s0: deauthenticating from 88:b1:e1:a7:c8:40 by
local choice (Reason: 3=DEAUTH_LEAVING)
[ 3890.112855] ath10k_pci 0000:02:00.0: firmware crashed! (guid
5b2e643e-09fc-4c55-907b-78003f1a8125)
[ 3890.112872] ath10k_pci 0000:02:00.0: qca6164 hw2.1 target
0x05010000 chip_id 0x003405ff sub 17aa:3545
[ 3890.112876] ath10k_pci 0000:02:00.0: kconfig debug 0 debugfs 1
tracing 1 dfs 0 testmode 0
[ 3890.113485] ath10k_pci 0000:02:00.0: firmware ver
SW_RM.1.1.1-00157-QCARMSWPZ-1 api 5 features ignore-otp,no-4addr-pad
crc32 10bf8e08
[ 3890.113808] ath10k_pci 0000:02:00.0: board_file api 2 bmi_id N/A
crc32 ae2e275a
[ 3890.113814] ath10k_pci 0000:02:00.0: htt-ver 3.1 wmi-op 4 htt-op 3
cal otp max-sta 32 raw 0 hwcrypto 1
[ 3890.115837] ath10k_pci 0000:02:00.0: firmware register dump:
[ 3890.115849] ath10k_pci 0000:02:00.0: [00]: 0x05010000 0x00000000
0x0092E500 0x00000000
[ 3890.115855] ath10k_pci 0000:02:00.0: [04]: 0x00000000 0x00000000
0x00000000 0x00000000
[ 3890.115859] ath10k_pci 0000:02:00.0: [08]: 0x00000000 0x00000000
0x00000000 0x00000000
[ 3890.115864] ath10k_pci 0000:02:00.0: [12]: 0x00000000 0x00000000
0x00000000 0x00000000
[ 3890.115868] ath10k_pci 0000:02:00.0: [16]: 0x00000000 0x00000000
0x00000000 0x0092E500
[ 3890.115873] ath10k_pci 0000:02:00.0: [20]: 0x00000000 0x004018F0
0x00000000 0x00000000
[ 3890.115877] ath10k_pci 0000:02:00.0: [24]: 0x00000000 0x00000000
0x00000000 0x00000000
[ 3890.115881] ath10k_pci 0000:02:00.0: [28]: 0x00000000 0x00000000
0x00000000 0x00000000
[ 3890.115885] ath10k_pci 0000:02:00.0: [32]: 0x00000000 0x00000000
0x00000000 0x00000000
[ 3890.115890] ath10k_pci 0000:02:00.0: [36]: 0x00000000 0x00000000
0x00000000 0x00000000
[ 3890.115894] ath10k_pci 0000:02:00.0: [40]: 0x00000000 0x00000000
0x00000000 0x00000000
[ 3890.115898] ath10k_pci 0000:02:00.0: [44]: 0x00000000 0x00000000
0x00000000 0x00000000
[ 3890.115902] ath10k_pci 0000:02:00.0: [48]: 0x00000000 0x00000000
0x00000000 0x00000000
[ 3890.115906] ath10k_pci 0000:02:00.0: [52]: 0x00000000 0x00000000
0x00000000 0x00000000
[ 3890.115910] ath10k_pci 0000:02:00.0: [56]: 0x00000000 0x00000000
0x00000000 0x00000000
[ 3890.115915] ath10k_pci 0000:02:00.0: Copy Engine register dump:
[ 3890.115926] ath10k_pci 0000:02:00.0: [00]: 0x00034400 1 1 3 3
[ 3890.115936] ath10k_pci 0000:02:00.0: [01]: 0x00034800 23 23 506 507
[ 3890.115946] ath10k_pci 0000:02:00.0: [02]: 0x00034c00 7 7 6 7
[ 3890.115955] ath10k_pci 0000:02:00.0: [03]: 0x00035000 13 13 14 13
[ 3890.115965] ath10k_pci 0000:02:00.0: [04]: 0x00035400 1333 1333 220 156
[ 3890.115975] ath10k_pci 0000:02:00.0: [05]: 0x00035800 0 0 0 0
[ 3890.115985] ath10k_pci 0000:02:00.0: [06]: 0x00035c00 3 3 3 3
[ 3890.115995] ath10k_pci 0000:02:00.0: [07]: 0x00036000 1 1 1 1
[ 3890.200927] ath10k_pci 0000:02:00.0: device has crashed during init
[ 3890.229001] ath10k_pci 0000:02:00.0: device has crashed during init
[ 3890.229006] ath10k_pci 0000:02:00.0: failed to wait for target init: -70
[ 3890.232486] ieee80211 phy0: Hardware restart was requested
[ 3890.232555] ath10k_pci 0000:02:00.0: failed to delete WMI vdev 1: -108
[ 3890.285030] ath10k_pci 0000:02:00.0: device has crashed during init
[ 3890.313053] ath10k_pci 0000:02:00.0: device has crashed during init
[ 3890.313058] ath10k_pci 0000:02:00.0: failed to wait for target init: -70
[ 3891.342643] radeon_dp_aux_transfer_native: 22 callbacks suppressed
[ 3894.096807] ata1: exception Emask 0x40 SAct 0x0 SErr 0xc0800 action 0x7
[ 3894.096820] ata1: SError: { HostInt CommWake 10B8B }
[ 3894.096830] ata1: hard resetting link
[ 3894.631096] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[ 3894.665627] ata1.00: configured for UDMA/100
[ 3894.665973] ata1: EH complete
[ 4109.279064] INFO: task cups-browsed:1153 blocked for more than 120 seconds.
[ 4109.279078] Tainted: G OE 4.15.0-45-generic #48-Ubuntu
[ 4109.279083] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
disables this message.
[ 4109.279089] cups-browsed D 0 1153 1 0x00000000
[ 4109.279096] Call Trace:
[ 4109.279115] __schedule+0x291/0x8a0
[ 4109.279122] schedule+0x2c/0x80
[ 4109.279127] schedule_preempt_disabled+0xe/0x10
[ 4109.279132] __mutex_lock.isra.2+0x18c/0x4d0
[ 4109.279139] __mutex_lock_slowpath+0x13/0x20
[ 4109.279144] ? __mutex_lock_slowpath+0x13/0x20
[ 4109.279149] mutex_lock+0x2f/0x40
[ 4109.279155] __netlink_dump_start+0x51/0x1c0
[ 4109.279160] rtnetlink_rcv_msg+0x1c2/0x2b0
[ 4109.279164] ? rtnl_getlink+0x280/0x280
[ 4109.279168] ? rtnl_getlink+0x280/0x280
[ 4109.279172] ? rtnl_calcit.isra.28+0x110/0x110
[ 4109.279177] netlink_rcv_skb+0x54/0x130
[ 4109.279184] rtnetlink_rcv+0x15/0x20
[ 4109.279188] netlink_unicast+0x19e/0x240
[ 4109.279193] netlink_sendmsg+0x2d1/0x3d0
[ 4109.279201] sock_sendmsg+0x3e/0x50
[ 4109.279206] SYSC_sendto+0x13f/0x180
[ 4109.279212] ? SYSC_getsockname+0xb3/0xf0
[ 4109.279217] ? sock_alloc_file+0xa0/0x150
[ 4109.279224] ? fd_install+0x25/0x30
[ 4109.279228] ? sock_map_fd+0x44/0x80
[ 4109.279234] SyS_sendto+0xe/0x10
[ 4109.279240] do_syscall_64+0x73/0x130
[ 4109.279247] entry_SYSCALL_64_after_hwframe+0x3d/0xa2
[ 4109.279253] RIP: 0033:0x7f396b20ddfa
[ 4109.279255] RSP: 002b:00007fffd36ff330 EFLAGS: 00000293 ORIG_RAX:
000000000000002c
[ 4109.279261] RAX: ffffffffffffffda RBX: 000000000000000b RCX: 00007f396b20ddfa
[ 4109.279264] RDX: 0000000000000014 RSI: 00007fffd3700410 RDI: 000000000000000b
[ 4109.279266] RBP: 0000000000000000 R08: 00007fffd37003d0 R09: 000000000000000c
[ 4109.279269] R10: 0000000000000000 R11: 0000000000000293 R12: 00007fffd3700410
[ 4109.279271] R13: 0000000000000014 R14: 0000000000000000 R15: 00007fffd37003d0
[ 4109.279281] INFO: task whoopsie:1232 blocked for more than 120 seconds.
[ 4109.279287] Tainted: G OE 4.15.0-45-generic #48-Ubuntu
[ 4109.279292] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
disables this message.
[ 4109.279296] whoopsie D 0 1232 1 0x00000000
[ 4109.279301] Call Trace:
[ 4109.279307] __schedule+0x291/0x8a0
[ 4109.279313] schedule+0x2c/0x80
[ 4109.279318] schedule_preempt_disabled+0xe/0x10
[ 4109.279322] __mutex_lock.isra.2+0x18c/0x4d0
[ 4109.279329] __mutex_lock_slowpath+0x13/0x20
[ 4109.279334] ? __mutex_lock_slowpath+0x13/0x20
[ 4109.279338] mutex_lock+0x2f/0x40
[ 4109.279342] __netlink_dump_start+0x51/0x1c0
[ 4109.279347] rtnetlink_rcv_msg+0x1c2/0x2b0
[ 4109.279353] ? rtnl_bridge_notify+0xf0/0xf0
[ 4109.279357] ? rtnl_calcit.isra.28+0x110/0x110
[ 4109.279362] netlink_rcv_skb+0x54/0x130
[ 4109.279368] rtnetlink_rcv+0x15/0x20
[ 4109.279372] netlink_unicast+0x19e/0x240
[ 4109.279377] netlink_sendmsg+0x2d1/0x3d0
[ 4109.279383] sock_sendmsg+0x3e/0x50
[ 4109.279388] SYSC_sendto+0x13f/0x180
[ 4109.279397] ? ktime_get_ts64+0x51/0xf0
[ 4109.279403] SyS_sendto+0xe/0x10
[ 4109.279408] do_syscall_64+0x73/0x130
[ 4109.279414] entry_SYSCALL_64_after_hwframe+0x3d/0xa2
[ 4109.279417] RIP: 0033:0x7f948c9e0c96
[ 4109.279420] RSP: 002b:00007fff6cc7d8f0 EFLAGS: 00000246 ORIG_RAX:
000000000000002c
[ 4109.279424] RAX: ffffffffffffffda RBX: 0000000000000007 RCX: 00007f948c9e0c96
[ 4109.279427] RDX: 0000000000000014 RSI: 00007fff6cc7d980 RDI: 0000000000000007
[ 4109.279429] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[ 4109.279432] R10: 0000000000004000 R11: 0000000000000246 R12: 00007fff6cc7d980
[ 4109.279434] R13: 0000000000000014 R14: 0000000000004000 R15: 0000000000000000
[ 4109.279477] INFO: task packagekitd:1638 blocked for more than 120 seconds.
[ 4109.279483] Tainted: G OE 4.15.0-45-generic #48-Ubuntu
[ 4109.279487] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
disables this message.
[ 4109.279491] packagekitd D 0 1638 1 0x00000000
[ 4109.279496] Call Trace:
[ 4109.279502] __schedule+0x291/0x8a0
[ 4109.279508] schedule+0x2c/0x80
[ 4109.279513] schedule_preempt_disabled+0xe/0x10
[ 4109.279517] __mutex_lock.isra.2+0x18c/0x4d0
[ 4109.279524] __mutex_lock_slowpath+0x13/0x20
[ 4109.279528] ? __mutex_lock_slowpath+0x13/0x20
[ 4109.279533] mutex_lock+0x2f/0x40
[ 4109.279537] __netlink_dump_start+0x51/0x1c0
[ 4109.279542] rtnetlink_rcv_msg+0x1c2/0x2b0
[ 4109.279548] ? rtnl_bridge_notify+0xf0/0xf0
[ 4109.279552] ? rtnl_calcit.isra.28+0x110/0x110
[ 4109.279556] netlink_rcv_skb+0x54/0x130
[ 4109.279563] rtnetlink_rcv+0x15/0x20
[ 4109.279567] netlink_unicast+0x19e/0x240
[ 4109.279572] netlink_sendmsg+0x2d1/0x3d0
[ 4109.279578] sock_sendmsg+0x3e/0x50
[ 4109.279583] SYSC_sendto+0x13f/0x180
[ 4109.279590] ? ktime_get_ts64+0x51/0xf0
[ 4109.279597] SyS_sendto+0xe/0x10
[ 4109.279602] do_syscall_64+0x73/0x130
[ 4109.279607] entry_SYSCALL_64_after_hwframe+0x3d/0xa2
[ 4109.279611] RIP: 0033:0x7effa129a9ae
[ 4109.279613] RSP: 002b:00007ffebeb6a0e0 EFLAGS: 00000246 ORIG_RAX:
000000000000002c
[ 4109.279617] RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 00007effa129a9ae
[ 4109.279620] RDX: 0000000000000014 RSI: 00007ffebeb6a170 RDI: 0000000000000005
[ 4109.279622] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[ 4109.279625] R10: 0000000000004000 R11: 0000000000000246 R12: 00007ffebeb6a170
[ 4109.279627] R13: 0000000000000014 R14: 0000000000004000 R15: 0000000000000000
[ 4109.279703] INFO: task goa-daemon:2071 blocked for more than 120 seconds.
[ 4109.279708] Tainted: G OE 4.15.0-45-generic #48-Ubuntu
[ 4109.279712] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
disables this message.
[ 4109.279716] goa-daemon D 0 2071 1809 0x00000000
[ 4109.279721] Call Trace:
[ 4109.279728] __schedule+0x291/0x8a0
[ 4109.279733] schedule+0x2c/0x80
[ 4109.279738] schedule_preempt_disabled+0xe/0x10
[ 4109.279742] __mutex_lock.isra.2+0x18c/0x4d0
[ 4109.279749] __mutex_lock_slowpath+0x13/0x20
[ 4109.279754] ? __mutex_lock_slowpath+0x13/0x20
[ 4109.279758] mutex_lock+0x2f/0x40
[ 4109.279762] __netlink_dump_start+0x51/0x1c0
[ 4109.279767] rtnetlink_rcv_msg+0x1c2/0x2b0
[ 4109.279773] ? rtnl_bridge_notify+0xf0/0xf0
[ 4109.279777] ? rtnl_calcit.isra.28+0x110/0x110
[ 4109.279782] netlink_rcv_skb+0x54/0x130
[ 4109.279788] rtnetlink_rcv+0x15/0x20
[ 4109.279792] netlink_unicast+0x19e/0x240
[ 4109.279797] netlink_sendmsg+0x2d1/0x3d0
[ 4109.279804] sock_sendmsg+0x3e/0x50
[ 4109.279808] SYSC_sendto+0x13f/0x180
[ 4109.279815] ? ktime_get_ts64+0x51/0xf0
[ 4109.279822] SyS_sendto+0xe/0x10
[ 4109.279827] do_syscall_64+0x73/0x130
[ 4109.279833] entry_SYSCALL_64_after_hwframe+0x3d/0xa2
[ 4109.279836] RIP: 0033:0x7f10114379ae
[ 4109.279838] RSP: 002b:00007ffff9e6aee0 EFLAGS: 00000246 ORIG_RAX:
000000000000002c
[ 4109.279843] RAX: ffffffffffffffda RBX: 000000000000000b RCX: 00007f10114379ae
[ 4109.279845] RDX: 0000000000000014 RSI: 00007ffff9e6af70 RDI: 000000000000000b
[ 4109.279847] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[ 4109.279850] R10: 0000000000004000 R11: 0000000000000246 R12: 00007ffff9e6af70
[ 4109.279852] R13: 0000000000000014 R14: 0000000000004000 R15: 0000000000000000
[ 4109.279899] INFO: task evolution-calen:2372 blocked for more than
120 seconds.
[ 4109.279904] Tainted: G OE 4.15.0-45-generic #48-Ubuntu
[ 4109.279908] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
disables this message.
[ 4109.279912] evolution-calen D 0 2372 2321 0x00000000
[ 4109.279917] Call Trace:
[ 4109.279923] __schedule+0x291/0x8a0
[ 4109.279929] schedule+0x2c/0x80
[ 4109.279934] schedule_preempt_disabled+0xe/0x10
[ 4109.279938] __mutex_lock.isra.2+0x18c/0x4d0
[ 4109.279944] ? __switch_to_asm+0x34/0x70
[ 4109.279950] __mutex_lock_slowpath+0x13/0x20
[ 4109.279954] ? __mutex_lock_slowpath+0x13/0x20
[ 4109.279958] mutex_lock+0x2f/0x40
[ 4109.279963] __netlink_dump_start+0x51/0x1c0
[ 4109.279967] rtnetlink_rcv_msg+0x1c2/0x2b0
[ 4109.279973] ? rtnl_bridge_notify+0xf0/0xf0
[ 4109.279978] ? rtnl_calcit.isra.28+0x110/0x110
[ 4109.279982] netlink_rcv_skb+0x54/0x130
[ 4109.279988] rtnetlink_rcv+0x15/0x20
[ 4109.279992] netlink_unicast+0x19e/0x240
[ 4109.279997] netlink_sendmsg+0x2d1/0x3d0
[ 4109.280004] sock_sendmsg+0x3e/0x50
[ 4109.280009] SYSC_sendto+0x13f/0x180
[ 4109.280016] ? ktime_get_ts64+0x51/0xf0
[ 4109.280022] SyS_sendto+0xe/0x10
[ 4109.280027] do_syscall_64+0x73/0x130
[ 4109.280033] entry_SYSCALL_64_after_hwframe+0x3d/0xa2
[ 4109.280036] RIP: 0033:0x7fd447e87c96
[ 4109.280038] RSP: 002b:00007ffc769063c0 EFLAGS: 00000246 ORIG_RAX:
000000000000002c
[ 4109.280043] RAX: ffffffffffffffda RBX: 0000000000000009 RCX: 00007fd447e87c96
[ 4109.280045] RDX: 0000000000000014 RSI: 00007ffc76906450 RDI: 0000000000000009
[ 4109.280047] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[ 4109.280050] R10: 0000000000004000 R11: 0000000000000246 R12: 00007ffc76906450
[ 4109.280052] R13: 0000000000000014 R14: 0000000000004000 R15: 0000000000000000
[ 4109.280063] INFO: task evolution-addre:2396 blocked for more than
120 seconds.
[ 4109.280068] Tainted: G OE 4.15.0-45-generic #48-Ubuntu
[ 4109.280072] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
disables this message.
[ 4109.280076] evolution-addre D 0 2396 2385 0x00000000
[ 4109.280080] Call Trace:
[ 4109.280086] __schedule+0x291/0x8a0
[ 4109.280091] schedule+0x2c/0x80
[ 4109.280096] schedule_preempt_disabled+0xe/0x10
[ 4109.280100] __mutex_lock.isra.2+0x18c/0x4d0
[ 4109.280106] ? __switch_to_asm+0x34/0x70
[ 4109.280112] __mutex_lock_slowpath+0x13/0x20
[ 4109.280116] ? __mutex_lock_slowpath+0x13/0x20
[ 4109.280121] mutex_lock+0x2f/0x40
[ 4109.280125] __netlink_dump_start+0x51/0x1c0
[ 4109.280129] rtnetlink_rcv_msg+0x1c2/0x2b0
[ 4109.280135] ? rtnl_bridge_notify+0xf0/0xf0
[ 4109.280139] ? rtnl_calcit.isra.28+0x110/0x110
[ 4109.280144] netlink_rcv_skb+0x54/0x130
[ 4109.280150] rtnetlink_rcv+0x15/0x20
[ 4109.280154] netlink_unicast+0x19e/0x240
[ 4109.280160] netlink_sendmsg+0x2d1/0x3d0
[ 4109.280166] sock_sendmsg+0x3e/0x50
[ 4109.280171] SYSC_sendto+0x13f/0x180
[ 4109.280178] ? ktime_get_ts64+0x51/0xf0
[ 4109.280184] SyS_sendto+0xe/0x10
[ 4109.280189] do_syscall_64+0x73/0x130
[ 4109.280195] entry_SYSCALL_64_after_hwframe+0x3d/0xa2
[ 4109.280198] RIP: 0033:0x7fafc0ea0c96
[ 4109.280200] RSP: 002b:00007fffe7cb0040 EFLAGS: 00000246 ORIG_RAX:
000000000000002c
[ 4109.280205] RAX: ffffffffffffffda RBX: 0000000000000007 RCX: 00007fafc0ea0c96
[ 4109.280207] RDX: 0000000000000014 RSI: 00007fffe7cb00d0 RDI: 0000000000000007
[ 4109.280209] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[ 4109.280212] R10: 0000000000004000 R11: 0000000000000246 R12: 00007fffe7cb00d0
[ 4109.280214] R13: 0000000000000014 R14: 0000000000004000 R15: 0000000000000000
[ 4109.280224] INFO: task gjs:2441 blocked for more than 120 seconds.
[ 4109.280229] Tainted: G OE 4.15.0-45-generic #48-Ubuntu
[ 4109.280233] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
disables this message.
[ 4109.280237] gjs D 0 2441 1809 0x00000000
[ 4109.280241] Call Trace:
[ 4109.280247] __schedule+0x291/0x8a0
[ 4109.280253] schedule+0x2c/0x80
[ 4109.280257] schedule_preempt_disabled+0xe/0x10
[ 4109.280262] __mutex_lock.isra.2+0x18c/0x4d0
[ 4109.280269] __mutex_lock_slowpath+0x13/0x20
[ 4109.280273] ? __mutex_lock_slowpath+0x13/0x20
[ 4109.280277] mutex_lock+0x2f/0x40
[ 4109.280282] __netlink_dump_start+0x51/0x1c0
[ 4109.280286] rtnetlink_rcv_msg+0x1c2/0x2b0
[ 4109.280292] ? rtnl_bridge_notify+0xf0/0xf0
[ 4109.280296] ? rtnl_calcit.isra.28+0x110/0x110
[ 4109.280301] netlink_rcv_skb+0x54/0x130
[ 4109.280307] rtnetlink_rcv+0x15/0x20
[ 4109.280311] netlink_unicast+0x19e/0x240
[ 4109.280316] netlink_sendmsg+0x2d1/0x3d0
[ 4109.280322] sock_sendmsg+0x3e/0x50
[ 4109.280327] SYSC_sendto+0x13f/0x180
[ 4109.280337] ? compat_poll_select_copy_remaining+0x130/0x130
[ 4109.280344] SyS_sendto+0xe/0x10
[ 4109.280349] do_syscall_64+0x73/0x130
[ 4109.280355] entry_SYSCALL_64_after_hwframe+0x3d/0xa2
[ 4109.280358] RIP: 0033:0x7fe61c808c96
[ 4109.280360] RSP: 002b:00007ffd83d6ab00 EFLAGS: 00000246 ORIG_RAX:
000000000000002c
[ 4109.280364] RAX: ffffffffffffffda RBX: 0000000000000014 RCX: 00007fe61c808c96
[ 4109.280367] RDX: 0000000000000014 RSI: 00007ffd83d6ab90 RDI: 0000000000000014
[ 4109.280369] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[ 4109.280372] R10: 0000000000004000 R11: 0000000000000246 R12: 00007ffd83d6ab90
[ 4109.280374] R13: 0000000000000014 R14: 0000000000004000 R15: 0000000000000000
[ 4109.280387] INFO: task gnome-software:2605 blocked for more than 120 seconds.
[ 4109.280393] Tainted: G OE 4.15.0-45-generic #48-Ubuntu
[ 4109.280397] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
disables this message.
[ 4109.280401] gnome-software D 0 2605 1852 0x00000000
[ 4109.280405] Call Trace:
[ 4109.280411] __schedule+0x291/0x8a0
[ 4109.280417] schedule+0x2c/0x80
[ 4109.280421] schedule_preempt_disabled+0xe/0x10
[ 4109.280426] __mutex_lock.isra.2+0x18c/0x4d0
[ 4109.280432] __mutex_lock_slowpath+0x13/0x20
[ 4109.280437] ? __mutex_lock_slowpath+0x13/0x20
[ 4109.280441] mutex_lock+0x2f/0x40
[ 4109.280446] __netlink_dump_start+0x51/0x1c0
[ 4109.280450] rtnetlink_rcv_msg+0x1c2/0x2b0
[ 4109.280456] ? rtnl_bridge_notify+0xf0/0xf0
[ 4109.280460] ? rtnl_calcit.isra.28+0x110/0x110
[ 4109.280465] netlink_rcv_skb+0x54/0x130
[ 4109.280471] rtnetlink_rcv+0x15/0x20
[ 4109.280475] netlink_unicast+0x19e/0x240
[ 4109.280480] netlink_sendmsg+0x2d1/0x3d0
[ 4109.280487] sock_sendmsg+0x3e/0x50
[ 4109.280491] SYSC_sendto+0x13f/0x180
[ 4109.280498] ? ktime_get_ts64+0x51/0xf0
[ 4109.280505] SyS_sendto+0xe/0x10
[ 4109.280510] do_syscall_64+0x73/0x130
[ 4109.280516] entry_SYSCALL_64_after_hwframe+0x3d/0xa2
[ 4109.280519] RIP: 0033:0x7f3ccadca9ae
[ 4109.280521] RSP: 002b:00007ffd3bdd2240 EFLAGS: 00000246 ORIG_RAX:
000000000000002c
[ 4109.280525] RAX: ffffffffffffffda RBX: 000000000000000c RCX: 00007f3ccadca9ae
[ 4109.280528] RDX: 0000000000000014 RSI: 00007ffd3bdd22d0 RDI: 000000000000000c
[ 4109.280530] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[ 4109.280532] R10: 0000000000004000 R11: 0000000000000246 R12: 00007ffd3bdd22d0
[ 4109.280535] R13: 0000000000000014 R14: 0000000000004000 R15: 0000000000000000
[ 4109.280544] INFO: task deja-dup-monito:3278 blocked for more than
120 seconds.
[ 4109.280550] Tainted: G OE 4.15.0-45-generic #48-Ubuntu
[ 4109.280553] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
disables this message.
[ 4109.280557] deja-dup-monito D 0 3278 1852 0x00000000
[ 4109.280562] Call Trace:
[ 4109.280568] __schedule+0x291/0x8a0
[ 4109.280573] schedule+0x2c/0x80
[ 4109.280578] schedule_preempt_disabled+0xe/0x10
[ 4109.280582] __mutex_lock.isra.2+0x18c/0x4d0
[ 4109.280589] __mutex_lock_slowpath+0x13/0x20
[ 4109.280593] ? __mutex_lock_slowpath+0x13/0x20
[ 4109.280598] mutex_lock+0x2f/0x40
[ 4109.280602] __netlink_dump_start+0x51/0x1c0
[ 4109.280606] rtnetlink_rcv_msg+0x1c2/0x2b0
[ 4109.280612] ? rtnl_bridge_notify+0xf0/0xf0
[ 4109.280616] ? rtnl_calcit.isra.28+0x110/0x110
[ 4109.280621] netlink_rcv_skb+0x54/0x130
[ 4109.280627] rtnetlink_rcv+0x15/0x20
[ 4109.280631] netlink_unicast+0x19e/0x240
[ 4109.280636] netlink_sendmsg+0x2d1/0x3d0
[ 4109.280643] sock_sendmsg+0x3e/0x50
[ 4109.280648] SYSC_sendto+0x13f/0x180
[ 4109.280655] ? ktime_get_ts64+0x51/0xf0
[ 4109.280661] SyS_sendto+0xe/0x10
[ 4109.280666] do_syscall_64+0x73/0x130
[ 4109.280672] entry_SYSCALL_64_after_hwframe+0x3d/0xa2
[ 4109.280675] RIP: 0033:0x7f08442e5c96
[ 4109.280677] RSP: 002b:00007ffe39ab3c10 EFLAGS: 00000246 ORIG_RAX:
000000000000002c
[ 4109.280682] RAX: ffffffffffffffda RBX: 0000000000000009 RCX: 00007f08442e5c96
[ 4109.280684] RDX: 0000000000000014 RSI: 00007ffe39ab3ca0 RDI: 0000000000000009
[ 4109.280687] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[ 4109.280689] R10: 0000000000004000 R11: 0000000000000246 R12: 00007ffe39ab3ca0
[ 4109.280691] R13: 0000000000000014 R14: 0000000000004000 R15: 0000000000000000
[ 4109.280704] INFO: task kworker/2:4:5337 blocked for more than 120 seconds.
[ 4109.280710] Tainted: G OE 4.15.0-45-generic #48-Ubuntu
[ 4109.280714] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
disables this message.
[ 4109.280718] kworker/2:4 D 0 5337 2 0x80000000
[ 4109.280773] Workqueue: events_freezable ieee80211_restart_work [mac80211]
[ 4109.280776] Call Trace:
[ 4109.280783] __schedule+0x291/0x8a0
[ 4109.280789] schedule+0x2c/0x80
[ 4109.280793] schedule_preempt_disabled+0xe/0x10
[ 4109.280798] __mutex_lock.isra.2+0x18c/0x4d0
[ 4109.280803] ? _cond_resched+0x19/0x40
[ 4109.280808] __mutex_lock_slowpath+0x13/0x20
[ 4109.280813] ? __mutex_lock_slowpath+0x13/0x20
[ 4109.280817] mutex_lock+0x2f/0x40
[ 4109.280823] rtnl_lock+0x15/0x20
[ 4109.280861] ieee80211_restart_work+0x56/0xd0 [mac80211]
[ 4109.280868] process_one_work+0x1de/0x410
[ 4109.280873] worker_thread+0x32/0x410
[ 4109.280879] kthread+0x121/0x140
[ 4109.280883] ? process_one_work+0x410/0x410
[ 4109.280888] ? kthread_create_worker_on_cpu+0x70/0x70
[ 4109.280893] ? do_syscall_64+0x73/0x130
[ 4109.280898] ? SyS_exit_group+0x14/0x20
[ 4109.280903] ret_from_fork+0x22/0x40
^ permalink raw reply
* Re: Realtek r8822be kernel module does not negotiate 802.11ac connection
From: Larry Finger @ 2019-03-02 18:39 UTC (permalink / raw)
To: David R. Bergstein, Tony Chuang
Cc: Pkshih, linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
In-Reply-To: <96c5b6c4-61fe-570d-ba2d-7721b1be7cca@gmail.com>
On 3/2/19 12:09 PM, David R. Bergstein wrote:
> Larry,
>
> I tried using iw but it gives the same reading for bit rate. In regard
> to the firmware, it was not installed via "make install" so I did it
> manually.
David,
There was a typo in the Makefile. 'make install' now installs the firmware
correctly.
Larry
^ permalink raw reply
* Re: Realtek r8822be kernel module does not negotiate 802.11ac connection
From: David R. Bergstein @ 2019-03-02 18:09 UTC (permalink / raw)
To: Larry Finger, Tony Chuang
Cc: Pkshih, linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
In-Reply-To: <c64c435c-fda7-9356-0205-093182fb1398@lwfinger.net>
Larry,
I tried using iw but it gives the same reading for bit rate. In regard
to the firmware, it was not installed via "make install" so I did it
manually.
Sincerely,
David R. Bergstein
On 3/2/19 12:58 PM, Larry Finger wrote:
>> Larry,
>>
>> Sorry about all these extra replies. Shortly after I sent my last
>> message my access point started recognizing the connection as 802.11ac
>> with PHY Rate / Modulation Rate of 866.6 Mbps. What is somewhat
>> misleading is the information reported by iwconfig (see bit rate below).
>>
>> $ iwconfig wlo1
>> wlo1 IEEE 802.11 ESSID:"XXXXXXXXXX-5G"
>> Mode:Managed Frequency:5.22 GHz Access Point:
>> xx:xx:xx:xx:xx:xx
>> Bit Rate=6.5 Mb/s Tx-Power=23 dBm
>> Retry short limit:7 RTS thr:off Fragment thr:off
>> Power Management:on
>> Link Quality=70/70 Signal level=-40 dBm
>> Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
>> Tx excessive retries:0 Invalid misc:11 Missed beacon:0
>
> The utility iwconfig is obsolete and not exactly up to date with the
> latest in wireless. I am not an expert on iw, but I think you want 'iw
> dev wlo1 link'.
>
> I am wondering about the missing firmware stage. Had you not done the
> 'sudo make install' step, or did that step fail to install the firmware?
>
> Larry
>
^ permalink raw reply
* Re: Realtek r8822be kernel module does not negotiate 802.11ac connection
From: Larry Finger @ 2019-03-02 17:58 UTC (permalink / raw)
To: David R. Bergstein, Tony Chuang
Cc: Pkshih, linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
In-Reply-To: <27e1a339-023a-360b-1e5d-1a156fc5edd2@gmail.com>
On 3/1/19 9:52 PM, David R. Bergstein wrote:
> Larry,
>
> Sorry about all these extra replies. Shortly after I sent my last
> message my access point started recognizing the connection as 802.11ac
> with PHY Rate / Modulation Rate of 866.6 Mbps. What is somewhat
> misleading is the information reported by iwconfig (see bit rate below).
>
> $ iwconfig wlo1
> wlo1 IEEE 802.11 ESSID:"XXXXXXXXXX-5G"
> Mode:Managed Frequency:5.22 GHz Access Point:
> xx:xx:xx:xx:xx:xx
> Bit Rate=6.5 Mb/s Tx-Power=23 dBm
> Retry short limit:7 RTS thr:off Fragment thr:off
> Power Management:on
> Link Quality=70/70 Signal level=-40 dBm
> Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
> Tx excessive retries:0 Invalid misc:11 Missed beacon:0
The utility iwconfig is obsolete and not exactly up to date with the latest in
wireless. I am not an expert on iw, but I think you want 'iw dev wlo1 link'.
I am wondering about the missing firmware stage. Had you not done the 'sudo make
install' step, or did that step fail to install the firmware?
Larry
^ permalink raw reply
* Re: [PATCH RFC] mac80211: Use IFF_ECHO to force delivery of tx_status frames
From: Julius Niedworok @ 2019-03-02 15:16 UTC (permalink / raw)
To: Johannes Berg
Cc: Oliver Hartkopp, linux-wireless, ga58taw, David Hildenbrand, nc,
David S. Miller, Edward Cree, Jiri Pirko, Ido Schimmel,
Petr Machata, Kirill Tkhai, Alexander Duyck, Amritha Nambiar,
Li RongQing, netdev, linux-kernel, Julius Niedworok
In-Reply-To: <e20962001ee10a0f90f8e2f1f8baafcf3b70e9dd.camel@sipsolutions.net>
> On 01.03.2019 09:32, Johannes Berg wrote:
>
> Thus, I don't think this was ever intended for any cross-interface
> behaviour, even if it may be on the same physical NIC.
Now we got your point. We are sorry for the confusion - it seems we
understood that wrong.
> Not all drivers can and do this, I believe. Some things don't work very
> well if they don't do it, but I _think_ you've just been lucky and used
> hardware that does in fact support it.
If the drivers do not adhere to the API, this is a problem of the drivers,
right? Because, how can we rely on *any* functionality of the drivers when
we assume that they do not adhere to the documented interfaces?
> Also note that for some hardware that does support this, there's
> sometimes significant overhead - not just the performance overhead of
> actually reporting the frames, but sometimes also overhead in how the
> hardware is programmed and used, and how TX status is extracted.
The default of this option will be disabled. If it is turned on manually
for debugging, the performance impact is probably acceptable.
> I suppose it could be in mac80211 (perhaps debugfs?) too. I just really
> don’t think IFF_ECHO is the right approach.
We see your point. So you think we should use debugfs to enable/disable
our functionality? If so, we are happy to see that we find a way to force
REQ_TX_STATUS to one from there.
Thank you,
Julius and Charlie
^ permalink raw reply
* [PATCH] mt76: usb: reduce code indentation in mt76u_alloc_tx
From: Lorenzo Bianconi @ 2019-03-02 13:50 UTC (permalink / raw)
To: nbd; +Cc: linux-wireless, sgruszka, lorenzo.bianconi
In-Reply-To: <cover.1551534029.git.lorenzo@kernel.org>
Improve code readability reducing code indentation in
mt76u_alloc_tx
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/net/wireless/mediatek/mt76/usb.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/usb.c b/drivers/net/wireless/mediatek/mt76/usb.c
index 4c1abd492405..c30878d2dc5c 100644
--- a/drivers/net/wireless/mediatek/mt76/usb.c
+++ b/drivers/net/wireless/mediatek/mt76/usb.c
@@ -787,6 +787,7 @@ static int mt76u_alloc_tx(struct mt76_dev *dev)
{
struct mt76u_buf *buf;
struct mt76_queue *q;
+ size_t size;
int i, j;
for (i = 0; i < IEEE80211_NUM_ACS; i++) {
@@ -810,15 +811,15 @@ static int mt76u_alloc_tx(struct mt76_dev *dev)
if (!buf->urb)
return -ENOMEM;
- if (dev->usb.sg_en) {
- size_t size = MT_SG_MAX_SIZE *
- sizeof(struct scatterlist);
+ if (!dev->usb.sg_en)
+ continue;
- buf->urb->sg = devm_kzalloc(dev->dev, size,
- GFP_KERNEL);
- if (!buf->urb->sg)
- return -ENOMEM;
- }
+ size = MT_SG_MAX_SIZE * sizeof(struct scatterlist);
+
+ buf->urb->sg = devm_kzalloc(dev->dev, size,
+ GFP_KERNEL);
+ if (!buf->urb->sg)
+ return -ENOMEM;
}
}
return 0;
--
2.20.1
^ permalink raw reply related
* [PATCH 5/5] mt76: introduce mt76_txq_id field in mt76_queue_entry
From: Lorenzo Bianconi @ 2019-03-02 13:47 UTC (permalink / raw)
To: nbd; +Cc: linux-wireless, sgruszka, lorenzo.bianconi, roychl666, ryder.lee
In-Reply-To: <cover.1551533068.git.lorenzo@kernel.org>
Add mt76_txq_id field to mt76_queue_entry in order to properly
track outstanding frames for mt7615 that relies on a single hw queue
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/net/wireless/mediatek/mt76/dma.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt76.h | 1 +
drivers/net/wireless/mediatek/mt76/tx.c | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mediatek/mt76/dma.c b/drivers/net/wireless/mediatek/mt76/dma.c
index a37a1af74981..75ea381ff64a 100644
--- a/drivers/net/wireless/mediatek/mt76/dma.c
+++ b/drivers/net/wireless/mediatek/mt76/dma.c
@@ -164,7 +164,7 @@ mt76_dma_tx_cleanup(struct mt76_dev *dev, enum mt76_txq_id qid, bool flush)
while (q->queued && q->tail != last) {
mt76_dma_tx_cleanup_idx(dev, q, q->tail, &entry);
if (entry.schedule)
- dev->q_tx[qid].swq_queued--;
+ dev->q_tx[entry.qid].swq_queued--;
q->tail = (q->tail + 1) % q->ndesc;
q->queued--;
diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h
index e3160dc7c515..51245623b427 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76.h
@@ -100,6 +100,7 @@ struct mt76_queue_entry {
struct mt76_txwi_cache *txwi;
struct mt76u_buf ubuf;
};
+ enum mt76_txq_id qid;
bool schedule;
};
diff --git a/drivers/net/wireless/mediatek/mt76/tx.c b/drivers/net/wireless/mediatek/mt76/tx.c
index 240ef2cc5c79..b59cdf88a224 100644
--- a/drivers/net/wireless/mediatek/mt76/tx.c
+++ b/drivers/net/wireless/mediatek/mt76/tx.c
@@ -465,6 +465,7 @@ mt76_txq_send_burst(struct mt76_dev *dev, struct mt76_sw_queue *sq,
} while (n_frames < limit);
if (!probe) {
+ hwq->entry[idx].qid = sq - dev->q_tx;
hwq->entry[idx].schedule = true;
sq->swq_queued++;
}
--
2.20.1
^ permalink raw reply related
* [PATCH 4/5] mt76: introduce mt76_sw_queue data structure
From: Lorenzo Bianconi @ 2019-03-02 13:47 UTC (permalink / raw)
To: nbd; +Cc: linux-wireless, sgruszka, lorenzo.bianconi, roychl666, ryder.lee
In-Reply-To: <cover.1551533068.git.lorenzo@kernel.org>
Introduce mt76_sw_queue data structure in order to support new
chipsets (e.g. mt7615) that have a shared hardware queue for all traffic
identifiers. mt76_sw_queue will be used to track outstanding packets
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/net/wireless/mediatek/mt76/debugfs.c | 7 ++-
drivers/net/wireless/mediatek/mt76/dma.c | 12 ++--
drivers/net/wireless/mediatek/mt76/mac80211.c | 4 +-
drivers/net/wireless/mediatek/mt76/mt76.h | 16 ++++--
.../wireless/mediatek/mt76/mt7603/beacon.c | 8 +--
.../net/wireless/mediatek/mt76/mt7603/dma.c | 13 ++++-
.../net/wireless/mediatek/mt76/mt7603/mac.c | 4 +-
.../net/wireless/mediatek/mt76/mt7603/main.c | 2 +-
.../net/wireless/mediatek/mt76/mt76x02_mmio.c | 19 +++++--
.../wireless/mediatek/mt76/mt76x02_usb_core.c | 2 +-
.../net/wireless/mediatek/mt76/mt76x02_util.c | 2 +-
drivers/net/wireless/mediatek/mt76/tx.c | 55 ++++++++++---------
drivers/net/wireless/mediatek/mt76/usb.c | 23 +++++---
13 files changed, 100 insertions(+), 67 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/debugfs.c b/drivers/net/wireless/mediatek/mt76/debugfs.c
index a5adf22c3ffa..840615362b08 100644
--- a/drivers/net/wireless/mediatek/mt76/debugfs.c
+++ b/drivers/net/wireless/mediatek/mt76/debugfs.c
@@ -43,14 +43,15 @@ mt76_queues_read(struct seq_file *s, void *data)
int i;
for (i = 0; i < ARRAY_SIZE(dev->q_tx); i++) {
- struct mt76_queue *q = &dev->q_tx[i];
+ struct mt76_sw_queue *q = &dev->q_tx[i];
- if (!q->ndesc)
+ if (!q->q->ndesc)
continue;
seq_printf(s,
"%d: queued=%d head=%d tail=%d swq_queued=%d\n",
- i, q->queued, q->head, q->tail, q->swq_queued);
+ i, q->q->queued, q->q->head, q->q->tail,
+ q->swq_queued);
}
return 0;
diff --git a/drivers/net/wireless/mediatek/mt76/dma.c b/drivers/net/wireless/mediatek/mt76/dma.c
index 58c67df9f185..a37a1af74981 100644
--- a/drivers/net/wireless/mediatek/mt76/dma.c
+++ b/drivers/net/wireless/mediatek/mt76/dma.c
@@ -29,7 +29,6 @@ mt76_dma_alloc_queue(struct mt76_dev *dev, struct mt76_queue *q,
int i;
spin_lock_init(&q->lock);
- INIT_LIST_HEAD(&q->swq);
q->regs = dev->mmio.regs + ring_base + idx * MT_RING_SIZE;
q->ndesc = n_desc;
@@ -147,7 +146,8 @@ mt76_dma_sync_idx(struct mt76_dev *dev, struct mt76_queue *q)
static void
mt76_dma_tx_cleanup(struct mt76_dev *dev, enum mt76_txq_id qid, bool flush)
{
- struct mt76_queue *q = &dev->q_tx[qid];
+ struct mt76_sw_queue *sq = &dev->q_tx[qid];
+ struct mt76_queue *q = sq->q;
struct mt76_queue_entry entry;
bool wake = false;
int last;
@@ -164,7 +164,7 @@ mt76_dma_tx_cleanup(struct mt76_dev *dev, enum mt76_txq_id qid, bool flush)
while (q->queued && q->tail != last) {
mt76_dma_tx_cleanup_idx(dev, q, q->tail, &entry);
if (entry.schedule)
- q->swq_queued--;
+ dev->q_tx[qid].swq_queued--;
q->tail = (q->tail + 1) % q->ndesc;
q->queued--;
@@ -185,7 +185,7 @@ mt76_dma_tx_cleanup(struct mt76_dev *dev, enum mt76_txq_id qid, bool flush)
}
if (!flush)
- mt76_txq_schedule(dev, q);
+ mt76_txq_schedule(dev, sq);
else
mt76_dma_sync_idx(dev, q);
@@ -258,7 +258,7 @@ static int
mt76_dma_tx_queue_skb_raw(struct mt76_dev *dev, enum mt76_txq_id qid,
struct sk_buff *skb, u32 tx_info)
{
- struct mt76_queue *q = &dev->q_tx[qid];
+ struct mt76_queue *q = dev->q_tx[qid].q;
struct mt76_queue_buf buf;
dma_addr_t addr;
@@ -282,7 +282,7 @@ int mt76_dma_tx_queue_skb(struct mt76_dev *dev, enum mt76_txq_id qid,
struct sk_buff *skb, struct mt76_wcid *wcid,
struct ieee80211_sta *sta)
{
- struct mt76_queue *q = &dev->q_tx[qid];
+ struct mt76_queue *q = dev->q_tx[qid].q;
struct mt76_queue_entry e;
struct mt76_txwi_cache *t;
struct mt76_queue_buf buf[32];
diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c
index a033745adb2f..47eecb4d4d01 100644
--- a/drivers/net/wireless/mediatek/mt76/mac80211.c
+++ b/drivers/net/wireless/mediatek/mt76/mac80211.c
@@ -386,10 +386,12 @@ EXPORT_SYMBOL_GPL(mt76_rx);
static bool mt76_has_tx_pending(struct mt76_dev *dev)
{
+ struct mt76_queue *q;
int i;
for (i = 0; i < ARRAY_SIZE(dev->q_tx); i++) {
- if (dev->q_tx[i].queued)
+ q = dev->q_tx[i].q;
+ if (q && q->queued)
return true;
}
diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h
index e9bb1812c4cf..e3160dc7c515 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76.h
@@ -117,9 +117,6 @@ struct mt76_queue {
struct mt76_queue_entry *entry;
struct mt76_desc *desc;
- struct list_head swq;
- int swq_queued;
-
u16 first;
u16 head;
u16 tail;
@@ -137,6 +134,13 @@ struct mt76_queue {
spinlock_t rx_page_lock;
};
+struct mt76_sw_queue {
+ struct mt76_queue *q;
+
+ struct list_head swq;
+ int swq_queued;
+};
+
struct mt76_mcu_ops {
int (*mcu_send_msg)(struct mt76_dev *dev, int cmd, const void *data,
int len, bool wait_resp);
@@ -214,7 +218,7 @@ struct mt76_wcid {
struct mt76_txq {
struct list_head list;
- struct mt76_queue *hwq;
+ struct mt76_sw_queue *swq;
struct mt76_wcid *wcid;
struct sk_buff_head retry_q;
@@ -437,7 +441,7 @@ struct mt76_dev {
struct sk_buff_head rx_skb[__MT_RXQ_MAX];
struct list_head txwi_cache;
- struct mt76_queue q_tx[__MT_TXQ_MAX];
+ struct mt76_sw_queue q_tx[__MT_TXQ_MAX];
struct mt76_queue q_rx[__MT_RXQ_MAX];
const struct mt76_queue_ops *queue_ops;
int tx_dma_idx[4];
@@ -659,7 +663,7 @@ void mt76_txq_remove(struct mt76_dev *dev, struct ieee80211_txq *txq);
void mt76_wake_tx_queue(struct ieee80211_hw *hw, struct ieee80211_txq *txq);
void mt76_stop_tx_queues(struct mt76_dev *dev, struct ieee80211_sta *sta,
bool send_bar);
-void mt76_txq_schedule(struct mt76_dev *dev, struct mt76_queue *hwq);
+void mt76_txq_schedule(struct mt76_dev *dev, struct mt76_sw_queue *sq);
void mt76_txq_schedule_all(struct mt76_dev *dev);
void mt76_release_buffered_frames(struct ieee80211_hw *hw,
struct ieee80211_sta *sta,
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c b/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c
index ae41c1ba6e9b..addfeec51f60 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c
@@ -30,7 +30,7 @@ mt7603_update_beacon_iter(void *priv, u8 *mac, struct ieee80211_vif *vif)
mt76_wr(dev, MT_DMA_FQCR0, MT_DMA_FQCR0_BUSY |
FIELD_PREP(MT_DMA_FQCR0_TARGET_WCID, mvif->sta.wcid.idx) |
FIELD_PREP(MT_DMA_FQCR0_TARGET_QID,
- dev->mt76.q_tx[MT_TXQ_CAB].hw_idx) |
+ dev->mt76.q_tx[MT_TXQ_CAB].q->hw_idx) |
FIELD_PREP(MT_DMA_FQCR0_DEST_PORT_ID, 3) |
FIELD_PREP(MT_DMA_FQCR0_DEST_QUEUE_ID, 8));
@@ -76,7 +76,7 @@ void mt7603_pre_tbtt_tasklet(unsigned long arg)
data.dev = dev;
__skb_queue_head_init(&data.q);
- q = &dev->mt76.q_tx[MT_TXQ_BEACON];
+ q = dev->mt76.q_tx[MT_TXQ_BEACON].q;
spin_lock_bh(&q->lock);
ieee80211_iterate_active_interfaces_atomic(mt76_hw(dev),
IEEE80211_IFACE_ITER_RESUME_ALL,
@@ -93,7 +93,7 @@ void mt7603_pre_tbtt_tasklet(unsigned long arg)
if (dev->mt76.csa_complete)
goto out;
- q = &dev->mt76.q_tx[MT_TXQ_CAB];
+ q = dev->mt76.q_tx[MT_TXQ_CAB].q;
do {
nframes = skb_queue_len(&data.q);
ieee80211_iterate_active_interfaces_atomic(mt76_hw(dev),
@@ -135,7 +135,7 @@ void mt7603_pre_tbtt_tasklet(unsigned long arg)
out:
mt76_queue_tx_cleanup(dev, MT_TXQ_BEACON, false);
- if (dev->mt76.q_tx[MT_TXQ_BEACON].queued >
+ if (dev->mt76.q_tx[MT_TXQ_BEACON].q->queued >
__sw_hweight8(dev->beacon_mask))
dev->beacon_check++;
}
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/dma.c b/drivers/net/wireless/mediatek/mt76/mt7603/dma.c
index 5067c49142f7..56c02423370c 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/dma.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/dma.c
@@ -5,16 +5,23 @@
#include "../dma.h"
static int
-mt7603_init_tx_queue(struct mt7603_dev *dev, struct mt76_queue *q,
+mt7603_init_tx_queue(struct mt7603_dev *dev, struct mt76_sw_queue *q,
int idx, int n_desc)
{
+ struct mt76_queue *hwq;
int err;
- err = mt76_queue_alloc(dev, q, idx, n_desc, 0,
- MT_TX_RING_BASE);
+ hwq = devm_kzalloc(dev->mt76.dev, sizeof(*hwq), GFP_KERNEL);
+ if (!hwq)
+ return -ENOMEM;
+
+ err = mt76_queue_alloc(dev, hwq, idx, n_desc, 0, MT_TX_RING_BASE);
if (err < 0)
return err;
+ INIT_LIST_HEAD(&q->swq);
+ q->q = hwq;
+
mt7603_irq_enable(dev, MT_INT_TX_DONE(idx));
return 0;
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
index 7a7f898f5400..c640f3e2e640 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
@@ -828,7 +828,7 @@ mt7603_mac_write_txwi(struct mt7603_dev *dev, __le32 *txwi,
struct ieee80211_tx_rate *rate = &info->control.rates[0];
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
struct ieee80211_vif *vif = info->control.vif;
- struct mt76_queue *q = &dev->mt76.q_tx[qid];
+ struct mt76_queue *q = dev->mt76.q_tx[qid].q;
struct mt7603_vif *mvif;
int wlan_idx;
int hdr_len = ieee80211_get_hdrlen_from_skb(skb);
@@ -1411,7 +1411,7 @@ static bool mt7603_tx_hang(struct mt7603_dev *dev)
int i;
for (i = 0; i < 4; i++) {
- q = &dev->mt76.q_tx[i];
+ q = dev->mt76.q_tx[i].q;
if (!q->queued)
continue;
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/main.c b/drivers/net/wireless/mediatek/mt76/mt7603/main.c
index b10775ed92e6..05fd8009a5fe 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/main.c
@@ -476,7 +476,7 @@ mt7603_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u16 queue,
u16 cw_max = (1 << 10) - 1;
u32 val;
- queue = dev->mt76.q_tx[queue].hw_idx;
+ queue = dev->mt76.q_tx[queue].q->hw_idx;
if (params->cw_min)
cw_min = params->cw_min;
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c b/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c
index 910277e55480..c2a2fa353297 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c
@@ -103,7 +103,7 @@ mt76x02_resync_beacon_timer(struct mt76x02_dev *dev)
static void mt76x02_pre_tbtt_tasklet(unsigned long arg)
{
struct mt76x02_dev *dev = (struct mt76x02_dev *)arg;
- struct mt76_queue *q = &dev->mt76.q_tx[MT_TXQ_PSD];
+ struct mt76_queue *q = dev->mt76.q_tx[MT_TXQ_PSD].q;
struct beacon_bc_data data = {};
struct sk_buff *skb;
int i, nframes;
@@ -153,16 +153,23 @@ static void mt76x02_pre_tbtt_tasklet(unsigned long arg)
}
static int
-mt76x02_init_tx_queue(struct mt76x02_dev *dev, struct mt76_queue *q,
+mt76x02_init_tx_queue(struct mt76x02_dev *dev, struct mt76_sw_queue *q,
int idx, int n_desc)
{
+ struct mt76_queue *hwq;
int err;
- err = mt76_queue_alloc(dev, q, idx, n_desc, 0,
- MT_TX_RING_BASE);
+ hwq = devm_kzalloc(dev->mt76.dev, sizeof(*hwq), GFP_KERNEL);
+ if (!hwq)
+ return -ENOMEM;
+
+ err = mt76_queue_alloc(dev, hwq, idx, n_desc, 0, MT_TX_RING_BASE);
if (err < 0)
return err;
+ INIT_LIST_HEAD(&q->swq);
+ q->q = hwq;
+
mt76x02_irq_enable(dev, MT_INT_TX_DONE(idx));
return 0;
@@ -313,7 +320,7 @@ irqreturn_t mt76x02_irq_handler(int irq, void *dev_instance)
if (dev->mt76.csa_complete)
mt76_csa_finish(&dev->mt76);
else
- mt76_queue_kick(dev, &dev->mt76.q_tx[MT_TXQ_PSD]);
+ mt76_queue_kick(dev, dev->mt76.q_tx[MT_TXQ_PSD].q);
}
if (intr & MT_INT_TX_STAT) {
@@ -385,7 +392,7 @@ static bool mt76x02_tx_hang(struct mt76x02_dev *dev)
int i;
for (i = 0; i < 4; i++) {
- q = &dev->mt76.q_tx[i];
+ q = dev->mt76.q_tx[i].q;
if (!q->queued)
continue;
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c
index 6ad2f9f95120..8ab63255ba6f 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c
@@ -77,7 +77,7 @@ int mt76x02u_tx_prepare_skb(struct mt76_dev *mdev, void *data,
u32 *tx_info)
{
struct mt76x02_dev *dev = container_of(mdev, struct mt76x02_dev, mt76);
- int pid, len = skb->len, ep = q2ep(mdev->q_tx[qid].hw_idx);
+ int pid, len = skb->len, ep = q2ep(mdev->q_tx[qid].q->hw_idx);
struct mt76x02_txwi *txwi;
enum mt76_qsel qsel;
u32 flags;
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
index cd072ac614f7..b14a55737829 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
@@ -465,7 +465,7 @@ int mt76x02_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
u8 cw_min = 5, cw_max = 10, qid;
u32 val;
- qid = dev->mt76.q_tx[queue].hw_idx;
+ qid = dev->mt76.q_tx[queue].q->hw_idx;
if (params->cw_min)
cw_min = fls(params->cw_min);
diff --git a/drivers/net/wireless/mediatek/mt76/tx.c b/drivers/net/wireless/mediatek/mt76/tx.c
index 5c94cffb53b7..240ef2cc5c79 100644
--- a/drivers/net/wireless/mediatek/mt76/tx.c
+++ b/drivers/net/wireless/mediatek/mt76/tx.c
@@ -283,7 +283,7 @@ mt76_tx(struct mt76_dev *dev, struct ieee80211_sta *sta,
mt76_check_agg_ssn(mtxq, skb);
}
- q = &dev->q_tx[qid];
+ q = dev->q_tx[qid].q;
spin_lock_bh(&q->lock);
dev->queue_ops->tx_queue_skb(dev, qid, skb, wcid, sta);
@@ -345,7 +345,7 @@ mt76_release_buffered_frames(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
{
struct mt76_dev *dev = hw->priv;
struct sk_buff *last_skb = NULL;
- struct mt76_queue *hwq = &dev->q_tx[MT_TXQ_PSD];
+ struct mt76_queue *hwq = dev->q_tx[MT_TXQ_PSD].q;
int i;
spin_lock_bh(&hwq->lock);
@@ -382,13 +382,14 @@ mt76_release_buffered_frames(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
EXPORT_SYMBOL_GPL(mt76_release_buffered_frames);
static int
-mt76_txq_send_burst(struct mt76_dev *dev, struct mt76_queue *hwq,
+mt76_txq_send_burst(struct mt76_dev *dev, struct mt76_sw_queue *sq,
struct mt76_txq *mtxq, bool *empty)
{
struct ieee80211_txq *txq = mtxq_to_txq(mtxq);
enum mt76_txq_id qid = mt76_txq_get_qid(txq);
- struct ieee80211_tx_info *info;
struct mt76_wcid *wcid = mtxq->wcid;
+ struct mt76_queue *hwq = sq->q;
+ struct ieee80211_tx_info *info;
struct sk_buff *skb;
int n_frames = 1, limit;
struct ieee80211_tx_rate tx_rate;
@@ -464,8 +465,8 @@ mt76_txq_send_burst(struct mt76_dev *dev, struct mt76_queue *hwq,
} while (n_frames < limit);
if (!probe) {
- hwq->swq_queued++;
hwq->entry[idx].schedule = true;
+ sq->swq_queued++;
}
dev->queue_ops->kick(dev, hwq);
@@ -474,14 +475,15 @@ mt76_txq_send_burst(struct mt76_dev *dev, struct mt76_queue *hwq,
}
static int
-mt76_txq_schedule_list(struct mt76_dev *dev, struct mt76_queue *hwq)
+mt76_txq_schedule_list(struct mt76_dev *dev, struct mt76_sw_queue *sq)
{
+ struct mt76_queue *hwq = sq->q;
struct mt76_txq *mtxq, *mtxq_last;
int len = 0;
restart:
- mtxq_last = list_last_entry(&hwq->swq, struct mt76_txq, list);
- while (!list_empty(&hwq->swq)) {
+ mtxq_last = list_last_entry(&sq->swq, struct mt76_txq, list);
+ while (!list_empty(&sq->swq)) {
bool empty = false;
int cur;
@@ -489,7 +491,7 @@ mt76_txq_schedule_list(struct mt76_dev *dev, struct mt76_queue *hwq)
test_bit(MT76_RESET, &dev->state))
return -EBUSY;
- mtxq = list_first_entry(&hwq->swq, struct mt76_txq, list);
+ mtxq = list_first_entry(&sq->swq, struct mt76_txq, list);
if (mtxq->send_bar && mtxq->aggr) {
struct ieee80211_txq *txq = mtxq_to_txq(mtxq);
struct ieee80211_sta *sta = txq->sta;
@@ -506,9 +508,9 @@ mt76_txq_schedule_list(struct mt76_dev *dev, struct mt76_queue *hwq)
list_del_init(&mtxq->list);
- cur = mt76_txq_send_burst(dev, hwq, mtxq, &empty);
+ cur = mt76_txq_send_burst(dev, sq, mtxq, &empty);
if (!empty)
- list_add_tail(&mtxq->list, &hwq->swq);
+ list_add_tail(&mtxq->list, &sq->swq);
if (cur < 0)
return cur;
@@ -522,16 +524,16 @@ mt76_txq_schedule_list(struct mt76_dev *dev, struct mt76_queue *hwq)
return len;
}
-void mt76_txq_schedule(struct mt76_dev *dev, struct mt76_queue *hwq)
+void mt76_txq_schedule(struct mt76_dev *dev, struct mt76_sw_queue *sq)
{
int len;
rcu_read_lock();
do {
- if (hwq->swq_queued >= 4 || list_empty(&hwq->swq))
+ if (sq->swq_queued >= 4 || list_empty(&sq->swq))
break;
- len = mt76_txq_schedule_list(dev, hwq);
+ len = mt76_txq_schedule_list(dev, sq);
} while (len > 0);
rcu_read_unlock();
}
@@ -542,10 +544,10 @@ void mt76_txq_schedule_all(struct mt76_dev *dev)
int i;
for (i = 0; i <= MT_TXQ_BK; i++) {
- struct mt76_queue *q = &dev->q_tx[i];
+ struct mt76_queue *q = dev->q_tx[i].q;
spin_lock_bh(&q->lock);
- mt76_txq_schedule(dev, q);
+ mt76_txq_schedule(dev, &dev->q_tx[i]);
spin_unlock_bh(&q->lock);
}
}
@@ -558,18 +560,20 @@ void mt76_stop_tx_queues(struct mt76_dev *dev, struct ieee80211_sta *sta,
for (i = 0; i < ARRAY_SIZE(sta->txq); i++) {
struct ieee80211_txq *txq = sta->txq[i];
+ struct mt76_queue *hwq;
struct mt76_txq *mtxq;
if (!txq)
continue;
mtxq = (struct mt76_txq *)txq->drv_priv;
+ hwq = mtxq->swq->q;
- spin_lock_bh(&mtxq->hwq->lock);
+ spin_lock_bh(&hwq->lock);
mtxq->send_bar = mtxq->aggr && send_bar;
if (!list_empty(&mtxq->list))
list_del_init(&mtxq->list);
- spin_unlock_bh(&mtxq->hwq->lock);
+ spin_unlock_bh(&hwq->lock);
}
}
EXPORT_SYMBOL_GPL(mt76_stop_tx_queues);
@@ -577,31 +581,32 @@ EXPORT_SYMBOL_GPL(mt76_stop_tx_queues);
void mt76_wake_tx_queue(struct ieee80211_hw *hw, struct ieee80211_txq *txq)
{
struct mt76_dev *dev = hw->priv;
- struct mt76_txq *mtxq = (struct mt76_txq *) txq->drv_priv;
- struct mt76_queue *hwq = mtxq->hwq;
+ struct mt76_txq *mtxq = (struct mt76_txq *)txq->drv_priv;
+ struct mt76_sw_queue *sq = mtxq->swq;
+ struct mt76_queue *hwq = sq->q;
if (!test_bit(MT76_STATE_RUNNING, &dev->state))
return;
spin_lock_bh(&hwq->lock);
if (list_empty(&mtxq->list))
- list_add_tail(&mtxq->list, &hwq->swq);
- mt76_txq_schedule(dev, hwq);
+ list_add_tail(&mtxq->list, &sq->swq);
+ mt76_txq_schedule(dev, sq);
spin_unlock_bh(&hwq->lock);
}
EXPORT_SYMBOL_GPL(mt76_wake_tx_queue);
void mt76_txq_remove(struct mt76_dev *dev, struct ieee80211_txq *txq)
{
- struct mt76_txq *mtxq;
struct mt76_queue *hwq;
+ struct mt76_txq *mtxq;
struct sk_buff *skb;
if (!txq)
return;
mtxq = (struct mt76_txq *) txq->drv_priv;
- hwq = mtxq->hwq;
+ hwq = mtxq->swq->q;
spin_lock_bh(&hwq->lock);
if (!list_empty(&mtxq->list))
@@ -620,7 +625,7 @@ void mt76_txq_init(struct mt76_dev *dev, struct ieee80211_txq *txq)
INIT_LIST_HEAD(&mtxq->list);
skb_queue_head_init(&mtxq->retry_q);
- mtxq->hwq = &dev->q_tx[mt76_txq_get_qid(txq)];
+ mtxq->swq = &dev->q_tx[mt76_txq_get_qid(txq)];
}
EXPORT_SYMBOL_GPL(mt76_txq_init);
diff --git a/drivers/net/wireless/mediatek/mt76/usb.c b/drivers/net/wireless/mediatek/mt76/usb.c
index e5485c83267b..7cff5c2b547b 100644
--- a/drivers/net/wireless/mediatek/mt76/usb.c
+++ b/drivers/net/wireless/mediatek/mt76/usb.c
@@ -627,13 +627,15 @@ static void mt76u_tx_tasklet(unsigned long data)
{
struct mt76_dev *dev = (struct mt76_dev *)data;
struct mt76_queue_entry entry;
+ struct mt76_sw_queue *sq;
struct mt76u_buf *buf;
struct mt76_queue *q;
bool wake;
int i;
for (i = 0; i < IEEE80211_NUM_ACS; i++) {
- q = &dev->q_tx[i];
+ sq = &dev->q_tx[i];
+ q = sq->q;
spin_lock_bh(&q->lock);
while (true) {
@@ -643,7 +645,7 @@ static void mt76u_tx_tasklet(unsigned long data)
if (q->entry[q->head].schedule) {
q->entry[q->head].schedule = false;
- q->swq_queued--;
+ sq->swq_queued--;
}
entry = q->entry[q->head];
@@ -654,7 +656,7 @@ static void mt76u_tx_tasklet(unsigned long data)
dev->drv->tx_complete_skb(dev, i, &entry);
spin_lock_bh(&q->lock);
}
- mt76_txq_schedule(dev, q);
+ mt76_txq_schedule(dev, sq);
wake = q->stopped && q->queued < q->ndesc - 8;
if (wake)
@@ -730,7 +732,7 @@ mt76u_tx_queue_skb(struct mt76_dev *dev, enum mt76_txq_id qid,
struct sk_buff *skb, struct mt76_wcid *wcid,
struct ieee80211_sta *sta)
{
- struct mt76_queue *q = &dev->q_tx[qid];
+ struct mt76_queue *q = dev->q_tx[qid].q;
struct mt76u_buf *buf;
u16 idx = q->tail;
int err;
@@ -792,10 +794,15 @@ static int mt76u_alloc_tx(struct mt76_dev *dev)
int i, j;
for (i = 0; i < IEEE80211_NUM_ACS; i++) {
- q = &dev->q_tx[i];
+ INIT_LIST_HEAD(&dev->q_tx[i].swq);
+
+ q = devm_kzalloc(dev->dev, sizeof(*q), GFP_KERNEL);
+ if (!q)
+ return -ENOMEM;
+
spin_lock_init(&q->lock);
- INIT_LIST_HEAD(&q->swq);
q->hw_idx = mt76_ac_to_hwq(i);
+ dev->q_tx[i].q = q;
q->entry = devm_kcalloc(dev->dev,
MT_NUM_TX_ENTRIES, sizeof(*q->entry),
@@ -832,7 +839,7 @@ static void mt76u_free_tx(struct mt76_dev *dev)
int i, j;
for (i = 0; i < IEEE80211_NUM_ACS; i++) {
- q = &dev->q_tx[i];
+ q = dev->q_tx[i].q;
for (j = 0; j < q->ndesc; j++)
usb_free_urb(q->entry[j].ubuf.urb);
}
@@ -844,7 +851,7 @@ static void mt76u_stop_tx(struct mt76_dev *dev)
int i, j;
for (i = 0; i < IEEE80211_NUM_ACS; i++) {
- q = &dev->q_tx[i];
+ q = dev->q_tx[i].q;
for (j = 0; j < q->ndesc; j++)
usb_kill_urb(q->entry[j].ubuf.urb);
}
--
2.20.1
^ permalink raw reply related
* [PATCH 3/5] mt76: remove mt76_queue dependency from tx_complete_skb function pointer
From: Lorenzo Bianconi @ 2019-03-02 13:47 UTC (permalink / raw)
To: nbd; +Cc: linux-wireless, sgruszka, lorenzo.bianconi, roychl666, ryder.lee
In-Reply-To: <cover.1551533068.git.lorenzo@kernel.org>
Remove mt76_queue dependency from tx_complete_skb function pointer and
rely on mt76_tx_qid instead. Remove flush from tx_complete_skb
signature. This is a preliminary patch to introduce mt76_sw_queue
support
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/net/wireless/mediatek/mt76/dma.c | 4 ++--
drivers/net/wireless/mediatek/mt76/mt76.h | 4 ++--
drivers/net/wireless/mediatek/mt76/mt7603/mac.c | 6 +++---
drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h | 4 ++--
drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 4 ++--
drivers/net/wireless/mediatek/mt76/mt76x02_mac.h | 4 ++--
drivers/net/wireless/mediatek/mt76/mt76x02_usb.h | 4 ++--
drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c | 4 ++--
drivers/net/wireless/mediatek/mt76/usb.c | 2 +-
9 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/dma.c b/drivers/net/wireless/mediatek/mt76/dma.c
index a9f0195ef0b7..58c67df9f185 100644
--- a/drivers/net/wireless/mediatek/mt76/dma.c
+++ b/drivers/net/wireless/mediatek/mt76/dma.c
@@ -171,7 +171,7 @@ mt76_dma_tx_cleanup(struct mt76_dev *dev, enum mt76_txq_id qid, bool flush)
if (entry.skb) {
spin_unlock_bh(&q->lock);
- dev->drv->tx_complete_skb(dev, q, &entry, flush);
+ dev->drv->tx_complete_skb(dev, qid, &entry);
spin_lock_bh(&q->lock);
}
@@ -348,7 +348,7 @@ int mt76_dma_tx_queue_skb(struct mt76_dev *dev, enum mt76_txq_id qid,
free:
e.skb = skb;
e.txwi = t;
- dev->drv->tx_complete_skb(dev, q, &e, true);
+ dev->drv->tx_complete_skb(dev, qid, &e);
mt76_put_txwi(dev, t);
return ret;
}
diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h
index ef7677f84755..e9bb1812c4cf 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76.h
@@ -292,8 +292,8 @@ struct mt76_driver_ops {
struct mt76_wcid *wcid,
struct ieee80211_sta *sta, u32 *tx_info);
- void (*tx_complete_skb)(struct mt76_dev *dev, struct mt76_queue *q,
- struct mt76_queue_entry *e, bool flush);
+ void (*tx_complete_skb)(struct mt76_dev *dev, enum mt76_txq_id qid,
+ struct mt76_queue_entry *e);
bool (*tx_status_data)(struct mt76_dev *dev, u8 *update);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
index 08ec43765f28..7a7f898f5400 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
@@ -1168,8 +1168,8 @@ void mt7603_mac_add_txs(struct mt7603_dev *dev, void *data)
rcu_read_unlock();
}
-void mt7603_tx_complete_skb(struct mt76_dev *mdev, struct mt76_queue *q,
- struct mt76_queue_entry *e, bool flush)
+void mt7603_tx_complete_skb(struct mt76_dev *mdev, enum mt76_txq_id qid,
+ struct mt76_queue_entry *e)
{
struct mt7603_dev *dev = container_of(mdev, struct mt7603_dev, mt76);
struct sk_buff *skb = e->skb;
@@ -1179,7 +1179,7 @@ void mt7603_tx_complete_skb(struct mt76_dev *mdev, struct mt76_queue *q,
return;
}
- if (q - dev->mt76.q_tx < 4)
+ if (qid < 4)
dev->tx_hang_check = 0;
mt76_tx_complete_skb(mdev, skb);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h b/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
index 49eeab0f97cf..8bd00b97066a 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
@@ -227,8 +227,8 @@ int mt7603_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
struct mt76_wcid *wcid, struct ieee80211_sta *sta,
u32 *tx_info);
-void mt7603_tx_complete_skb(struct mt76_dev *mdev, struct mt76_queue *q,
- struct mt76_queue_entry *e, bool flush);
+void mt7603_tx_complete_skb(struct mt76_dev *mdev, enum mt76_txq_id qid,
+ struct mt76_queue_entry *e);
void mt7603_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q,
struct sk_buff *skb);
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_mac.c b/drivers/net/wireless/mediatek/mt76/mt76x02_mac.c
index e1e0c8da5a8c..e2077ba3c761 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_mac.c
@@ -755,8 +755,8 @@ void mt76x02_mac_poll_tx_status(struct mt76x02_dev *dev, bool irq)
}
}
-void mt76x02_tx_complete_skb(struct mt76_dev *mdev, struct mt76_queue *q,
- struct mt76_queue_entry *e, bool flush)
+void mt76x02_tx_complete_skb(struct mt76_dev *mdev, enum mt76_txq_id qid,
+ struct mt76_queue_entry *e)
{
struct mt76x02_dev *dev = container_of(mdev, struct mt76x02_dev, mt76);
struct mt76x02_txwi *txwi;
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_mac.h b/drivers/net/wireless/mediatek/mt76/mt76x02_mac.h
index caeeef96c42f..e4a9e0d0924b 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_mac.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_mac.h
@@ -198,8 +198,8 @@ void mt76x02_mac_write_txwi(struct mt76x02_dev *dev, struct mt76x02_txwi *txwi,
struct sk_buff *skb, struct mt76_wcid *wcid,
struct ieee80211_sta *sta, int len);
void mt76x02_mac_poll_tx_status(struct mt76x02_dev *dev, bool irq);
-void mt76x02_tx_complete_skb(struct mt76_dev *mdev, struct mt76_queue *q,
- struct mt76_queue_entry *e, bool flush);
+void mt76x02_tx_complete_skb(struct mt76_dev *mdev, enum mt76_txq_id qid,
+ struct mt76_queue_entry *e);
void mt76x02_update_channel(struct mt76_dev *mdev);
void mt76x02_mac_work(struct work_struct *work);
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_usb.h b/drivers/net/wireless/mediatek/mt76/mt76x02_usb.h
index 20e0cee6e4e4..98e647c8c7c7 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_usb.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_usb.h
@@ -29,6 +29,6 @@ int mt76x02u_tx_prepare_skb(struct mt76_dev *mdev, void *data,
struct sk_buff *skb, enum mt76_txq_id qid,
struct mt76_wcid *wcid, struct ieee80211_sta *sta,
u32 *tx_info);
-void mt76x02u_tx_complete_skb(struct mt76_dev *mdev, struct mt76_queue *q,
- struct mt76_queue_entry *e, bool flush);
+void mt76x02u_tx_complete_skb(struct mt76_dev *mdev, enum mt76_txq_id qid,
+ struct mt76_queue_entry *e);
#endif /* __MT76x02_USB_H */
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c
index 643a817ae079..6ad2f9f95120 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c
@@ -26,8 +26,8 @@ static void mt76x02u_remove_dma_hdr(struct sk_buff *skb)
mt76x02_remove_hdr_pad(skb, 2);
}
-void mt76x02u_tx_complete_skb(struct mt76_dev *mdev, struct mt76_queue *q,
- struct mt76_queue_entry *e, bool flush)
+void mt76x02u_tx_complete_skb(struct mt76_dev *mdev, enum mt76_txq_id qid,
+ struct mt76_queue_entry *e)
{
mt76x02u_remove_dma_hdr(e->skb);
mt76_tx_complete_skb(mdev, e->skb);
diff --git a/drivers/net/wireless/mediatek/mt76/usb.c b/drivers/net/wireless/mediatek/mt76/usb.c
index 918dc03acfb3..e5485c83267b 100644
--- a/drivers/net/wireless/mediatek/mt76/usb.c
+++ b/drivers/net/wireless/mediatek/mt76/usb.c
@@ -651,7 +651,7 @@ static void mt76u_tx_tasklet(unsigned long data)
q->queued--;
spin_unlock_bh(&q->lock);
- dev->drv->tx_complete_skb(dev, q, &entry, false);
+ dev->drv->tx_complete_skb(dev, i, &entry);
spin_lock_bh(&q->lock);
}
mt76_txq_schedule(dev, q);
--
2.20.1
^ permalink raw reply related
* [PATCH 2/5] mt76: remove mt76_queue dependency from tx_prepare_skb function pointer
From: Lorenzo Bianconi @ 2019-03-02 13:47 UTC (permalink / raw)
To: nbd; +Cc: linux-wireless, sgruszka, lorenzo.bianconi, roychl666, ryder.lee
In-Reply-To: <cover.1551533068.git.lorenzo@kernel.org>
Remove mt76_queue dependency from tx_prepare_skb function pointer and
rely on mt76_tx_qid instead. This is a preliminary patch to introduce
mt76_sw_queue support
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/net/wireless/mediatek/mt76/dma.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt76.h | 2 +-
drivers/net/wireless/mediatek/mt76/mt7603/mac.c | 11 ++++++-----
drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h | 2 +-
drivers/net/wireless/mediatek/mt76/mt76x02.h | 2 +-
drivers/net/wireless/mediatek/mt76/mt76x02_txrx.c | 4 ++--
drivers/net/wireless/mediatek/mt76/mt76x02_usb.h | 2 +-
drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c | 7 +++----
drivers/net/wireless/mediatek/mt76/usb.c | 2 +-
9 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/dma.c b/drivers/net/wireless/mediatek/mt76/dma.c
index b9a43183d5d9..a9f0195ef0b7 100644
--- a/drivers/net/wireless/mediatek/mt76/dma.c
+++ b/drivers/net/wireless/mediatek/mt76/dma.c
@@ -301,7 +301,7 @@ int mt76_dma_tx_queue_skb(struct mt76_dev *dev, enum mt76_txq_id qid,
skb->prev = skb->next = NULL;
dma_sync_single_for_cpu(dev->dev, t->dma_addr, sizeof(t->txwi),
DMA_TO_DEVICE);
- ret = dev->drv->tx_prepare_skb(dev, &t->txwi, skb, q, wcid, sta,
+ ret = dev->drv->tx_prepare_skb(dev, &t->txwi, skb, qid, wcid, sta,
&tx_info);
dma_sync_single_for_device(dev->dev, t->dma_addr, sizeof(t->txwi),
DMA_TO_DEVICE);
diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h
index 0eaa05007f6d..ef7677f84755 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76.h
@@ -288,7 +288,7 @@ struct mt76_driver_ops {
void (*update_survey)(struct mt76_dev *dev);
int (*tx_prepare_skb)(struct mt76_dev *dev, void *txwi_ptr,
- struct sk_buff *skb, struct mt76_queue *q,
+ struct sk_buff *skb, enum mt76_txq_id qid,
struct mt76_wcid *wcid,
struct ieee80211_sta *sta, u32 *tx_info);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
index 0a0115861b51..08ec43765f28 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
@@ -820,7 +820,7 @@ int mt7603_wtbl_set_key(struct mt7603_dev *dev, int wcid,
static int
mt7603_mac_write_txwi(struct mt7603_dev *dev, __le32 *txwi,
- struct sk_buff *skb, struct mt76_queue *q,
+ struct sk_buff *skb, enum mt76_txq_id qid,
struct mt76_wcid *wcid, struct ieee80211_sta *sta,
int pid, struct ieee80211_key_conf *key)
{
@@ -828,6 +828,7 @@ mt7603_mac_write_txwi(struct mt7603_dev *dev, __le32 *txwi,
struct ieee80211_tx_rate *rate = &info->control.rates[0];
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
struct ieee80211_vif *vif = info->control.vif;
+ struct mt76_queue *q = &dev->mt76.q_tx[qid];
struct mt7603_vif *mvif;
int wlan_idx;
int hdr_len = ieee80211_get_hdrlen_from_skb(skb);
@@ -841,7 +842,7 @@ mt7603_mac_write_txwi(struct mt7603_dev *dev, __le32 *txwi,
if (vif) {
mvif = (struct mt7603_vif *)vif->drv_priv;
vif_idx = mvif->idx;
- if (vif_idx && q >= &dev->mt76.q_tx[MT_TXQ_BEACON])
+ if (vif_idx && qid >= MT_TXQ_BEACON)
vif_idx += 0x10;
}
@@ -915,7 +916,7 @@ mt7603_mac_write_txwi(struct mt7603_dev *dev, __le32 *txwi,
}
/* use maximum tx count for beacons and buffered multicast */
- if (q >= &dev->mt76.q_tx[MT_TXQ_BEACON])
+ if (qid >= MT_TXQ_BEACON)
tx_count = 0x1f;
val = FIELD_PREP(MT_TXD3_REM_TX_COUNT, tx_count) |
@@ -936,7 +937,7 @@ mt7603_mac_write_txwi(struct mt7603_dev *dev, __le32 *txwi,
}
int mt7603_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
- struct sk_buff *skb, struct mt76_queue *q,
+ struct sk_buff *skb, enum mt76_txq_id qid,
struct mt76_wcid *wcid, struct ieee80211_sta *sta,
u32 *tx_info)
{
@@ -968,7 +969,7 @@ int mt7603_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
spin_unlock_bh(&dev->mt76.lock);
}
- mt7603_mac_write_txwi(dev, txwi_ptr, skb, q, wcid, sta, pid, key);
+ mt7603_mac_write_txwi(dev, txwi_ptr, skb, qid, wcid, sta, pid, key);
return 0;
}
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h b/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
index dc9f2e9b20f6..49eeab0f97cf 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
@@ -223,7 +223,7 @@ void mt7603_wtbl_set_smps(struct mt7603_dev *dev, struct mt7603_sta *sta,
void mt7603_filter_tx(struct mt7603_dev *dev, int idx, bool abort);
int mt7603_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
- struct sk_buff *skb, struct mt76_queue *q,
+ struct sk_buff *skb, enum mt76_txq_id qid,
struct mt76_wcid *wcid, struct ieee80211_sta *sta,
u32 *tx_info);
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02.h b/drivers/net/wireless/mediatek/mt76/mt76x02.h
index 3d93017c3227..e42262fd7380 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02.h
@@ -169,7 +169,7 @@ irqreturn_t mt76x02_irq_handler(int irq, void *dev_instance);
void mt76x02_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control,
struct sk_buff *skb);
int mt76x02_tx_prepare_skb(struct mt76_dev *mdev, void *txwi,
- struct sk_buff *skb, struct mt76_queue *q,
+ struct sk_buff *skb, enum mt76_txq_id qid,
struct mt76_wcid *wcid, struct ieee80211_sta *sta,
u32 *tx_info);
void mt76x02_sw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_txrx.c b/drivers/net/wireless/mediatek/mt76/mt76x02_txrx.c
index 94f47248c59f..ce9ace11339d 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_txrx.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_txrx.c
@@ -147,7 +147,7 @@ bool mt76x02_tx_status_data(struct mt76_dev *mdev, u8 *update)
EXPORT_SYMBOL_GPL(mt76x02_tx_status_data);
int mt76x02_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
- struct sk_buff *skb, struct mt76_queue *q,
+ struct sk_buff *skb, enum mt76_txq_id qid,
struct mt76_wcid *wcid, struct ieee80211_sta *sta,
u32 *tx_info)
{
@@ -157,7 +157,7 @@ int mt76x02_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
int pid;
int ret;
- if (q == &dev->mt76.q_tx[MT_TXQ_PSD] && wcid && wcid->idx < 128)
+ if (qid == MT_TXQ_PSD && wcid && wcid->idx < 128)
mt76x02_mac_wcid_set_drop(dev, wcid->idx, false);
mt76x02_mac_write_txwi(dev, txwi, skb, wcid, sta, skb->len);
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_usb.h b/drivers/net/wireless/mediatek/mt76/mt76x02_usb.h
index 0126e51d77ed..20e0cee6e4e4 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_usb.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_usb.h
@@ -26,7 +26,7 @@ int mt76x02u_mcu_fw_send_data(struct mt76x02_dev *dev, const void *data,
int mt76x02u_skb_dma_info(struct sk_buff *skb, int port, u32 flags);
int mt76x02u_tx_prepare_skb(struct mt76_dev *mdev, void *data,
- struct sk_buff *skb, struct mt76_queue *q,
+ struct sk_buff *skb, enum mt76_txq_id qid,
struct mt76_wcid *wcid, struct ieee80211_sta *sta,
u32 *tx_info);
void mt76x02u_tx_complete_skb(struct mt76_dev *mdev, struct mt76_queue *q,
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c
index 6fb52b596d42..643a817ae079 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c
@@ -72,16 +72,15 @@ int mt76x02u_skb_dma_info(struct sk_buff *skb, int port, u32 flags)
}
int mt76x02u_tx_prepare_skb(struct mt76_dev *mdev, void *data,
- struct sk_buff *skb, struct mt76_queue *q,
+ struct sk_buff *skb, enum mt76_txq_id qid,
struct mt76_wcid *wcid, struct ieee80211_sta *sta,
u32 *tx_info)
{
struct mt76x02_dev *dev = container_of(mdev, struct mt76x02_dev, mt76);
+ int pid, len = skb->len, ep = q2ep(mdev->q_tx[qid].hw_idx);
struct mt76x02_txwi *txwi;
enum mt76_qsel qsel;
- int len = skb->len;
u32 flags;
- int pid;
mt76x02_insert_hdr_pad(skb);
@@ -92,7 +91,7 @@ int mt76x02u_tx_prepare_skb(struct mt76_dev *mdev, void *data,
pid = mt76_tx_status_skb_add(mdev, wcid, skb);
txwi->pktid = pid;
- if (pid >= MT_PACKET_ID_FIRST || q2ep(q->hw_idx) == MT_EP_OUT_HCCA)
+ if (pid >= MT_PACKET_ID_FIRST || ep == MT_EP_OUT_HCCA)
qsel = MT_QSEL_MGMT;
else
qsel = MT_QSEL_EDCA;
diff --git a/drivers/net/wireless/mediatek/mt76/usb.c b/drivers/net/wireless/mediatek/mt76/usb.c
index 47ca79ef1db4..918dc03acfb3 100644
--- a/drivers/net/wireless/mediatek/mt76/usb.c
+++ b/drivers/net/wireless/mediatek/mt76/usb.c
@@ -739,7 +739,7 @@ mt76u_tx_queue_skb(struct mt76_dev *dev, enum mt76_txq_id qid,
return -ENOSPC;
skb->prev = skb->next = NULL;
- err = dev->drv->tx_prepare_skb(dev, NULL, skb, q, wcid, sta, NULL);
+ err = dev->drv->tx_prepare_skb(dev, NULL, skb, qid, wcid, sta, NULL);
if (err < 0)
return err;
--
2.20.1
^ permalink raw reply related
* [PATCH 1/5] mt76: remove mt76_queue dependency from tx_queue_skb function pointer
From: Lorenzo Bianconi @ 2019-03-02 13:47 UTC (permalink / raw)
To: nbd; +Cc: linux-wireless, sgruszka, lorenzo.bianconi, roychl666, ryder.lee
In-Reply-To: <cover.1551533068.git.lorenzo@kernel.org>
Remove mt76_queue dependency from tx_queue_skb function pointer and
rely on mt76_tx_qid instead. This is a preliminary patch to introduce
mt76_sw_queue support
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/net/wireless/mediatek/mt76/dma.c | 3 ++-
drivers/net/wireless/mediatek/mt76/mt76.h | 4 ++--
drivers/net/wireless/mediatek/mt76/mt7603/beacon.c | 6 +++---
drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c | 4 ++--
drivers/net/wireless/mediatek/mt76/tx.c | 10 +++++-----
drivers/net/wireless/mediatek/mt76/usb.c | 3 ++-
6 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/dma.c b/drivers/net/wireless/mediatek/mt76/dma.c
index 4e2dfb0f20c3..b9a43183d5d9 100644
--- a/drivers/net/wireless/mediatek/mt76/dma.c
+++ b/drivers/net/wireless/mediatek/mt76/dma.c
@@ -278,10 +278,11 @@ mt76_dma_tx_queue_skb_raw(struct mt76_dev *dev, enum mt76_txq_id qid,
return 0;
}
-int mt76_dma_tx_queue_skb(struct mt76_dev *dev, struct mt76_queue *q,
+int mt76_dma_tx_queue_skb(struct mt76_dev *dev, enum mt76_txq_id qid,
struct sk_buff *skb, struct mt76_wcid *wcid,
struct ieee80211_sta *sta)
{
+ struct mt76_queue *q = &dev->q_tx[qid];
struct mt76_queue_entry e;
struct mt76_txwi_cache *t;
struct mt76_queue_buf buf[32];
diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h
index 477027bb9aaf..0eaa05007f6d 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76.h
@@ -158,7 +158,7 @@ struct mt76_queue_ops {
struct mt76_queue_buf *buf, int nbufs, u32 info,
struct sk_buff *skb, void *txwi);
- int (*tx_queue_skb)(struct mt76_dev *dev, struct mt76_queue *q,
+ int (*tx_queue_skb)(struct mt76_dev *dev, enum mt76_txq_id qid,
struct sk_buff *skb, struct mt76_wcid *wcid,
struct ieee80211_sta *sta);
@@ -647,7 +647,7 @@ static inline struct mt76_tx_cb *mt76_tx_skb_cb(struct sk_buff *skb)
return ((void *) IEEE80211_SKB_CB(skb)->status.status_driver_data);
}
-int mt76_dma_tx_queue_skb(struct mt76_dev *dev, struct mt76_queue *q,
+int mt76_dma_tx_queue_skb(struct mt76_dev *dev, enum mt76_txq_id qid,
struct sk_buff *skb, struct mt76_wcid *wcid,
struct ieee80211_sta *sta);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c b/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c
index afcd86f735b4..ae41c1ba6e9b 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c
@@ -23,7 +23,7 @@ mt7603_update_beacon_iter(void *priv, u8 *mac, struct ieee80211_vif *vif)
if (!skb)
return;
- mt76_dma_tx_queue_skb(&dev->mt76, &dev->mt76.q_tx[MT_TXQ_BEACON], skb,
+ mt76_dma_tx_queue_skb(&dev->mt76, MT_TXQ_BEACON, skb,
&mvif->sta.wcid, NULL);
spin_lock_bh(&dev->ps_lock);
@@ -118,8 +118,8 @@ void mt7603_pre_tbtt_tasklet(unsigned long arg)
struct ieee80211_vif *vif = info->control.vif;
struct mt7603_vif *mvif = (struct mt7603_vif *)vif->drv_priv;
- mt76_dma_tx_queue_skb(&dev->mt76, q, skb, &mvif->sta.wcid,
- NULL);
+ mt76_dma_tx_queue_skb(&dev->mt76, MT_TXQ_CAB, skb,
+ &mvif->sta.wcid, NULL);
}
mt76_queue_kick(dev, q);
spin_unlock_bh(&q->lock);
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c b/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c
index 6a34a6afcfe4..910277e55480 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c
@@ -146,8 +146,8 @@ static void mt76x02_pre_tbtt_tasklet(unsigned long arg)
struct ieee80211_vif *vif = info->control.vif;
struct mt76x02_vif *mvif = (struct mt76x02_vif *)vif->drv_priv;
- mt76_dma_tx_queue_skb(&dev->mt76, q, skb, &mvif->group_wcid,
- NULL);
+ mt76_dma_tx_queue_skb(&dev->mt76, MT_TXQ_PSD, skb,
+ &mvif->group_wcid, NULL);
}
spin_unlock_bh(&q->lock);
}
diff --git a/drivers/net/wireless/mediatek/mt76/tx.c b/drivers/net/wireless/mediatek/mt76/tx.c
index fc7dffe066be..5c94cffb53b7 100644
--- a/drivers/net/wireless/mediatek/mt76/tx.c
+++ b/drivers/net/wireless/mediatek/mt76/tx.c
@@ -286,7 +286,7 @@ mt76_tx(struct mt76_dev *dev, struct ieee80211_sta *sta,
q = &dev->q_tx[qid];
spin_lock_bh(&q->lock);
- dev->queue_ops->tx_queue_skb(dev, q, skb, wcid, sta);
+ dev->queue_ops->tx_queue_skb(dev, qid, skb, wcid, sta);
dev->queue_ops->kick(dev, q);
if (q->queued > q->ndesc - 8 && !q->stopped) {
@@ -327,7 +327,6 @@ mt76_queue_ps_skb(struct mt76_dev *dev, struct ieee80211_sta *sta,
{
struct mt76_wcid *wcid = (struct mt76_wcid *) sta->drv_priv;
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
- struct mt76_queue *hwq = &dev->q_tx[MT_TXQ_PSD];
info->control.flags |= IEEE80211_TX_CTRL_PS_RESPONSE;
if (last)
@@ -335,7 +334,7 @@ mt76_queue_ps_skb(struct mt76_dev *dev, struct ieee80211_sta *sta,
IEEE80211_TX_CTL_REQ_TX_STATUS;
mt76_skb_set_moredata(skb, !last);
- dev->queue_ops->tx_queue_skb(dev, hwq, skb, wcid, sta);
+ dev->queue_ops->tx_queue_skb(dev, MT_TXQ_PSD, skb, wcid, sta);
}
void
@@ -387,6 +386,7 @@ mt76_txq_send_burst(struct mt76_dev *dev, struct mt76_queue *hwq,
struct mt76_txq *mtxq, bool *empty)
{
struct ieee80211_txq *txq = mtxq_to_txq(mtxq);
+ enum mt76_txq_id qid = mt76_txq_get_qid(txq);
struct ieee80211_tx_info *info;
struct mt76_wcid *wcid = mtxq->wcid;
struct sk_buff *skb;
@@ -420,7 +420,7 @@ mt76_txq_send_burst(struct mt76_dev *dev, struct mt76_queue *hwq,
if (ampdu)
mt76_check_agg_ssn(mtxq, skb);
- idx = dev->queue_ops->tx_queue_skb(dev, hwq, skb, wcid, txq->sta);
+ idx = dev->queue_ops->tx_queue_skb(dev, qid, skb, wcid, txq->sta);
if (idx < 0)
return idx;
@@ -455,7 +455,7 @@ mt76_txq_send_burst(struct mt76_dev *dev, struct mt76_queue *hwq,
if (cur_ampdu)
mt76_check_agg_ssn(mtxq, skb);
- idx = dev->queue_ops->tx_queue_skb(dev, hwq, skb, wcid,
+ idx = dev->queue_ops->tx_queue_skb(dev, qid, skb, wcid,
txq->sta);
if (idx < 0)
return idx;
diff --git a/drivers/net/wireless/mediatek/mt76/usb.c b/drivers/net/wireless/mediatek/mt76/usb.c
index c30878d2dc5c..47ca79ef1db4 100644
--- a/drivers/net/wireless/mediatek/mt76/usb.c
+++ b/drivers/net/wireless/mediatek/mt76/usb.c
@@ -726,10 +726,11 @@ mt76u_tx_build_sg(struct mt76_dev *dev, struct sk_buff *skb,
}
static int
-mt76u_tx_queue_skb(struct mt76_dev *dev, struct mt76_queue *q,
+mt76u_tx_queue_skb(struct mt76_dev *dev, enum mt76_txq_id qid,
struct sk_buff *skb, struct mt76_wcid *wcid,
struct ieee80211_sta *sta)
{
+ struct mt76_queue *q = &dev->q_tx[qid];
struct mt76u_buf *buf;
u16 idx = q->tail;
int err;
--
2.20.1
^ permalink raw reply related
* [PATCH 0/5] introduce mt76_sw_queue data structure
From: Lorenzo Bianconi @ 2019-03-02 13:47 UTC (permalink / raw)
To: nbd; +Cc: linux-wireless, sgruszka, lorenzo.bianconi, roychl666, ryder.lee
Add mt76_sw_queue data structure in order to support new
chipsets (e.g. mt7615) that have a shared hardware queue for all traffic
identifiers. mt76_sw_queue is used to track outstanding packets.
Add mt76_txq_id field to mt76_queue_entry in order to properly
track outstanding frames
Lorenzo Bianconi (5):
mt76: remove mt76_queue dependency from tx_queue_skb function pointer
mt76: remove mt76_queue dependency from tx_prepare_skb function
pointer
mt76: remove mt76_queue dependency from tx_complete_skb function
pointer
mt76: introduce mt76_sw_queue data structure
mt76: introduce mt76_txq_id field in mt76_queue_entry
drivers/net/wireless/mediatek/mt76/debugfs.c | 7 +-
drivers/net/wireless/mediatek/mt76/dma.c | 19 +++---
drivers/net/wireless/mediatek/mt76/mac80211.c | 4 +-
drivers/net/wireless/mediatek/mt76/mt76.h | 27 ++++----
.../wireless/mediatek/mt76/mt7603/beacon.c | 14 ++--
.../net/wireless/mediatek/mt76/mt7603/dma.c | 13 +++-
.../net/wireless/mediatek/mt76/mt7603/mac.c | 19 +++---
.../net/wireless/mediatek/mt76/mt7603/main.c | 2 +-
.../wireless/mediatek/mt76/mt7603/mt7603.h | 6 +-
drivers/net/wireless/mediatek/mt76/mt76x02.h | 2 +-
.../net/wireless/mediatek/mt76/mt76x02_mac.c | 4 +-
.../net/wireless/mediatek/mt76/mt76x02_mac.h | 4 +-
.../net/wireless/mediatek/mt76/mt76x02_mmio.c | 23 ++++---
.../net/wireless/mediatek/mt76/mt76x02_txrx.c | 4 +-
.../net/wireless/mediatek/mt76/mt76x02_usb.h | 6 +-
.../wireless/mediatek/mt76/mt76x02_usb_core.c | 11 ++--
.../net/wireless/mediatek/mt76/mt76x02_util.c | 2 +-
drivers/net/wireless/mediatek/mt76/tx.c | 66 ++++++++++---------
drivers/net/wireless/mediatek/mt76/usb.c | 28 +++++---
19 files changed, 149 insertions(+), 112 deletions(-)
--
2.20.1
^ permalink raw reply
* Re: Realtek r8822be kernel module does not negotiate 802.11ac connection
From: Arend Van Spriel @ 2019-03-02 10:03 UTC (permalink / raw)
To: David R. Bergstein, Larry Finger, Tony Chuang
Cc: Pkshih, linux-wireless, netdev, linux-kernel
In-Reply-To: <27e1a339-023a-360b-1e5d-1a156fc5edd2@gmail.com>
Op 2 maart 2019 04:52:46 schreef "David R. Bergstein"
<david.r.bergstein@gmail.com>:
> Larry,
>
> Sorry about all these extra replies. Shortly after I sent my last
> message my access point started recognizing the connection as 802.11ac
> with PHY Rate / Modulation Rate of 866.6 Mbps. What is somewhat
> misleading is the information reported by iwconfig (see bit rate below).
My bet would be that it is nitrate at which beacon or probe response is
received. Regardless I would suggest using iw in this day and age.
Regards,
Arend
> $ iwconfig wlo1
> wlo1 IEEE 802.11 ESSID:"XXXXXXXXXX-5G"
> Mode:Managed Frequency:5.22 GHz Access Point:
> xx:xx:xx:xx:xx:xx
> Bit Rate=6.5 Mb/s Tx-Power=23 dBm
> Retry short limit:7 RTS thr:off Fragment thr:off
> Power Management:on
> Link Quality=70/70 Signal level=-40 dBm
> Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
> Tx excessive retries:0 Invalid misc:11 Missed beacon:0
>
> Sincerely,
>
> David R. Bergstein
>
> On 3/1/19 10:16 PM, David R. Bergstein wrote:
>> Larry,
>>
>> Please disregard my last message. The firmware is now installed and the
>> rtw88 module is working with my wireless router. The next hurdle
>> appears to be setting the speed to 802.11ac as it is currently
>> connecting as an 802.11n client.
>>
>> Sincerely,
>>
>> David R. Bergstein
>>
>> On 3/1/19 9:55 PM, David R. Bergstein wrote:
>>> Larry,
>>>
>>> Following up to your last reply, I blacklisted the r8822be module,
>>> rebooted and was unable to bring up the wireless interface via rtw88.
>>> Below are some errors recorded in my system log:
>>>
>>>
>>> [ 267.509818] rtw_pci 0000:3d:00.0: Direct firmware load for
>>> rtw88/rtw8822b_fw.bin failed with error -2
>>> [ 267.509821] rtw_pci 0000:3d:00.0: failed to request firmware
>>> [ 267.511068] rtw_pci 0000:3d:00.0: mac power on failed
>>> [ 267.511072] rtw_pci 0000:3d:00.0: failed to power on mac
>>> [ 267.511073] rtw_pci 0000:3d:00.0: failed to setup chip efuse info
>>> [ 267.511075] rtw_pci 0000:3d:00.0: failed to setup chip information
>>> [ 267.512817] rtw_pci: probe of 0000:3d:00.0 failed with error -114
>>>
>>> As directed, I used the rtwpci module to perform load/unload the rtw88
>>> module before I saw the errors above. Do I still need to install firmware?
>>>
>>> Sincerely,
>>>
>>> David R. Bergstein
>>>
>>> On 3/1/19 8:46 PM, Larry Finger wrote:
>>>> On 3/1/19 4:26 PM, David R. Bergstein wrote:
>>>>> Larry,
>>>>>
>>>>> Thanks for the response and detailed instructions, which allowed me to
>>>>> build and install the rtw88 kernel module. I cannot however seem to get
>>>>> my system to actually use the module. Just to recap this is an HP Omen
>>>>> laptop with secure boot disabled. Upon boot-up both the new rtw88 and
>>>>> old r8822be modules are loaded. If I unload the r8822be module the wifi
>>>>> network connection gets terminated, even if I unload/reload the rtw88
>>>>> module.
>>>>>
>>>>> Is there something else I should be doing prior to invoking rtw88, e.g.,
>>>>> blacklisting the old module?
>>>> Yes, r8822be must be blacklisted. Use the lsmod command to see what
>>>> modules are actually loaded. You load/unload rtw88 using the rtwpci
>>>> module.
>>>>
>>>> Larry
>>>>
>
Verzonden met AquaMail voor Android
https://www.mobisystems.com/aqua-mail
^ permalink raw reply
* Re: pull-request: wireless-drivers-next 2019-03-01
From: David Miller @ 2019-03-02 8:58 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <8736o6hce8.fsf@kamboji.qca.qualcomm.com>
From: Kalle Valo <kvalo@codeaurora.org>
Date: Fri, 01 Mar 2019 16:55:59 +0200
> as Linus gave us one more week here are few more patches to net-next for
> 5.1. Please let me know if there are any problems.
Pulled, thanks Kalle.
^ permalink raw reply
* Re: brcmfmac: bogus error messages during module unload
From: Arend Van Spriel @ 2019-03-02 7:05 UTC (permalink / raw)
To: Stefan Wahren, Chi-Hsien Lin, Franky Lin, Hante Meuleman,
Wright Feng
Cc: linux-wireless
In-Reply-To: <1125416917.128310.1551471017839@email.ionos.de>
Op 1 maart 2019 21:10:18 schreef Stefan Wahren <stefan.wahren@i2se.com>:
> Hi,
>
> this is some kind of older issue with brcmfmac. Everytime i unload the
> kernel module (e.g. v5.0-rc8 or next-20190301) on a Raspberry Pi 3
> (multi_v7_defconfig / arm64_defconfig) after the driver has successful
> probed, i'm getting such bogus error messages in the kernel log:
>
> [ 870.477114] brcmfmac: brcmf_proto_bcdc_query_dcmd: brcmf_proto_bcdc_msg
> failed w/status -5
> [ 870.477122] brcmfmac: brcmf_cfg80211_get_tx_power: error (-5)
> [ 871.057074] brcmfmac: brcmf_fil_cmd_data: bus is down. we have nothing
> to do.
> [ 871.057153] brcmfmac: brcmf_fil_cmd_data: bus is down. we have nothing
> to do.
> [ 871.057870] brcmfmac: brcmf_fil_cmd_data: bus is down. we have nothing
> to do.
> [ 871.057878] brcmfmac: brcmf_cfg80211_get_channel: chanspec failed (-5)
>
> Is there a chance to remove or at least reduce them?
These are triggered by user-space. Upon remove we can not communicate with
the device, but have not yet removed the network interfaces. So when
user-space does a request we fail. I will have a look at it.
Regards,
Arend
Verzonden met AquaMail voor Android
https://www.mobisystems.com/aqua-mail
^ permalink raw reply
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