* Re: [PATCH v2] ath10k: Re-enable TXQs for all devices
From: Felix Fietkau @ 2017-11-11 13:38 UTC (permalink / raw)
To: Toke Høiland-Jørgensen, make-wifi-fast, linux-wireless,
ath10k
In-Reply-To: <20171110004839.7478-1-toke@toke.dk>
On 2017-11-10 01:48, Toke Høiland-Jørgensen wrote:
> Commit 4ca1807815aa6801aaced7fdefa9edacc2521767 disables the use of the
> mac80211 TXQs for some devices because of a theoretical throughput
> regression. The original regression report[1] was related to fq_codel
> qdisc drop performance, which was fixed in
> 9d18562a227874289fda8ca5d117d8f503f1dcca. Since then, we have not seen
> the TXQ-related regression, so it should be safe to re-enable TXQs.
That commit is unrelated to the fq/codel implementations in mac80211,
since mac80211 with txq does not use qdisc.
- Felix
^ permalink raw reply
* Re: pull-request: wireless-drivers-next 2017-11-11
From: David Miller @ 2017-11-11 13:38 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <87o9o9vugd.fsf@kamboji.qca.qualcomm.com>
From: Kalle Valo <kvalo@codeaurora.org>
Date: Sat, 11 Nov 2017 15:03:14 +0200
> some more patches to net-next for v4.15. Even though I applied the last
> patch only on Saturday morning, all these have been tested by kbuild bot
> and most of them should also be in linux-next. Please let me know if
> there are any problems.
Pulled, but looking at your merge commit message:
> Major changes:
>
> iwlwifi
>
> * some new PCI IDs
I doubt this was the only major change in here :-)))
^ permalink raw reply
* Re: pull-request: wireless-drivers-next 2017-11-11
From: Kalle Valo @ 2017-11-11 14:14 UTC (permalink / raw)
To: David Miller; +Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <20171111.223832.2216321055833169803.davem@davemloft.net>
David Miller <davem@davemloft.net> writes:
> From: Kalle Valo <kvalo@codeaurora.org>
> Date: Sat, 11 Nov 2017 15:03:14 +0200
>
>> some more patches to net-next for v4.15. Even though I applied the last
>> patch only on Saturday morning, all these have been tested by kbuild bot
>> and most of them should also be in linux-next. Please let me know if
>> there are any problems.
>
> Pulled, but looking at your merge commit message:
Thanks!
>> Major changes:
>>
>> iwlwifi
>>
>> * some new PCI IDs
>
> I doubt this was the only major change in here :-)))
Yeah, you're right. I wrote that too hastily. My excuse this time is
that I tagged it at the airport :) But of course I should have prepared
it better.
--
Kalle Valo
^ permalink raw reply
* Re: [run_timer_softirq] BUG: unable to handle kernel paging request at 0000000000010007
From: Fengguang Wu @ 2017-11-11 15:35 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Linus Torvalds, Network Development, Linux Wireless List,
Linux Kernel Mailing List
In-Reply-To: <alpine.DEB.2.20.1711102228030.2288@nanos>
On Fri, Nov 10, 2017 at 10:29:59PM +0100, Thomas Gleixner wrote:
>On Fri, 10 Nov 2017, Linus Torvalds wrote:
>
>> On Wed, Nov 8, 2017 at 9:19 PM, Fengguang Wu <fengguang.wu@intel.com> wrote:
>> >
>> > Yes it's accessing the list. Here is the faddr2line output.
>>
>> Ok, so it's a corrupted timer list. Which is not a big surprise.
>>
>> It's
>>
>> next->pprev = pprev;
>>
>> in __hlist_del(), and the trapping instruction decodes as
>>
>> mov %rdx,0x8(%rax)
>>
>> with %rax having the value dead000000000200,
>>
>> Which is just LIST_POISON2.
>>
>> So we've deleted that entry twice - LIST_POISON2 is what hlist_del()
>> sets pprev to after already deleting it once.
>>
>> Although in this case it might not be hlist_del(), because
>> detach_timer() also sets entry->next to LIST_POISON2.
>>
>> Which is pretty bogus, we are supposed to use LIST_POISON1 for the
>> "next" pointer. Oh well. Nobody cares, except for the list entry
>> debugging code, which isn't run on the hlist cases.
>>
>> Adding Thomas Gleixner to the cc. It should not be possible to delete
>> the same timer twice.
>
>Right, it shouldn't.
>
>Fengguang, can you please enable:
>
>CONFIG_DEBUG_OBJECTS
>CONFIG_DEBUG_OBJECTS_TIMERS
>
>and try to reproduce? Debugobject should catch that hopefully.
Sure. However I've not got any results until now -- it's rather hard
to reproduce. I'll check possible results tomorrow.
Regards,
Fengguang
^ permalink raw reply
* [PATCH] wcn36xx: fix iris child-node lookup
From: Johan Hovold @ 2017-11-11 17:05 UTC (permalink / raw)
To: Eugene Krasnikov
Cc: Kalle Valo, wcn36xx, linux-wireless, netdev, linux-kernel,
Johan Hovold, stable, Loic Poulain
Fix child-node lookup during probe, which ended up searching the whole
device tree depth-first starting at the parent rather than just matching
on its children.
To make things worse, the parent mmio node was also prematurely freed.
Fixes: fd52bdae9ab0 ("wcn36xx: Disable 5GHz for wcn3620")
Cc: stable <stable@vger.kernel.org> # 4.14
Cc: Loic Poulain <loic.poulain@linaro.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/net/wireless/ath/wcn36xx/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
index 71812a2dd513..f7d228b5ba93 100644
--- a/drivers/net/wireless/ath/wcn36xx/main.c
+++ b/drivers/net/wireless/ath/wcn36xx/main.c
@@ -1233,7 +1233,7 @@ static int wcn36xx_platform_get_resources(struct wcn36xx *wcn,
}
/* External RF module */
- iris_node = of_find_node_by_name(mmio_node, "iris");
+ iris_node = of_get_child_by_name(mmio_node, "iris");
if (iris_node) {
if (of_device_is_compatible(iris_node, "qcom,wcn3620"))
wcn->rf_id = RF_IRIS_WCN3620;
--
2.15.0
^ permalink raw reply related
* [PATCH] wcn36xx: Set BTLE coexistence related configuration values to defaults
From: Ramon Fried @ 2017-11-12 12:48 UTC (permalink / raw)
To: kvalo
Cc: k.eugene.e, wcn36xx, linux-wireless, netdev, linux-kernel,
bjorn.andersson, nicolas.dechesne, Eyal Ilsar, Ramon Fried
From: Eyal Ilsar <eilsar@codeaurora.org>
Signed-off-by: Eyal Ilsar <eilsar@codeaurora.org>
Signed-off-by: Ramon Fried <rfried@codeaurora.org>
---
drivers/net/wireless/ath/wcn36xx/main.c | 2 +-
drivers/net/wireless/ath/wcn36xx/smd.c | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
index b83f01d..0d4ed41 100644
--- a/drivers/net/wireless/ath/wcn36xx/main.c
+++ b/drivers/net/wireless/ath/wcn36xx/main.c
@@ -27,7 +27,7 @@
#include <linux/soc/qcom/wcnss_ctrl.h>
#include "wcn36xx.h"
-unsigned int wcn36xx_dbg_mask;
+unsigned int wcn36xx_dbg_mask = WCN36XX_DBG_NONE;
module_param_named(debug_mask, wcn36xx_dbg_mask, uint, 0644);
MODULE_PARM_DESC(debug_mask, "Debugging mask");
diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index 9c6590d..1c75987 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
@@ -72,8 +72,10 @@ struct wcn36xx_cfg_val {
WCN36XX_CFG_VAL(DYNAMIC_PS_POLL_VALUE, 0),
WCN36XX_CFG_VAL(TX_PWR_CTRL_ENABLE, 1),
WCN36XX_CFG_VAL(ENABLE_CLOSE_LOOP, 1),
- WCN36XX_CFG_VAL(ENABLE_LPWR_IMG_TRANSITION, 0),
+ WCN36XX_CFG_VAL(BTC_STATIC_LEN_LE_BT, 120000),
+ WCN36XX_CFG_VAL(BTC_STATIC_LEN_LE_WLAN, 30000),
WCN36XX_CFG_VAL(MAX_ASSOC_LIMIT, 10),
+ WCN36XX_CFG_VAL(ENABLE_LPWR_IMG_TRANSITION, 0),
WCN36XX_CFG_VAL(ENABLE_MCC_ADAPTIVE_SCHEDULER, 0),
};
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply related
* Re: [PATCH] wcn36xx: Set BTLE coexistence related configuration values to defaults
From: Kalle Valo @ 2017-11-12 12:50 UTC (permalink / raw)
To: Ramon Fried
Cc: k.eugene.e, wcn36xx, linux-wireless, netdev, linux-kernel,
bjorn.andersson, nicolas.dechesne, Eyal Ilsar
In-Reply-To: <1510490904-21255-1-git-send-email-rfried@codeaurora.org>
Ramon Fried <rfried@codeaurora.org> writes:
> From: Eyal Ilsar <eilsar@codeaurora.org>
>
> Signed-off-by: Eyal Ilsar <eilsar@codeaurora.org>
> Signed-off-by: Ramon Fried <rfried@codeaurora.org>
Why? No empty commit logs, please.
--
Kalle Valo
^ permalink raw reply
* Re: [PATCH] wcn36xx: Set BTLE coexistence related configuration values to defaults
From: Kalle Valo @ 2017-11-12 12:51 UTC (permalink / raw)
To: Ramon Fried
Cc: k.eugene.e, wcn36xx, linux-wireless, netdev, linux-kernel,
bjorn.andersson, nicolas.dechesne, Eyal Ilsar
In-Reply-To: <1510490904-21255-1-git-send-email-rfried@codeaurora.org>
Ramon Fried <rfried@codeaurora.org> writes:
> From: Eyal Ilsar <eilsar@codeaurora.org>
>
> Signed-off-by: Eyal Ilsar <eilsar@codeaurora.org>
> Signed-off-by: Ramon Fried <rfried@codeaurora.org>
> ---
> drivers/net/wireless/ath/wcn36xx/main.c | 2 +-
> drivers/net/wireless/ath/wcn36xx/smd.c | 4 +++-
> 2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
> index b83f01d..0d4ed41 100644
> --- a/drivers/net/wireless/ath/wcn36xx/main.c
> +++ b/drivers/net/wireless/ath/wcn36xx/main.c
> @@ -27,7 +27,7 @@
> #include <linux/soc/qcom/wcnss_ctrl.h>
> #include "wcn36xx.h"
>
> -unsigned int wcn36xx_dbg_mask;
> +unsigned int wcn36xx_dbg_mask = WCN36XX_DBG_NONE;
And this looks unrelated to the title?
--
Kalle Valo
^ permalink raw reply
* [PATCH] wcn36xx: Set BTLE coexistence related configuration values to defaults
From: Ramon Fried @ 2017-11-12 14:21 UTC (permalink / raw)
To: kvalo
Cc: k.eugene.e, wcn36xx, linux-wireless, netdev, linux-kernel,
bjorn.andersson, nicolas.dechesne, Eyal Ilsar, Ramon Fried
From: Eyal Ilsar <eilsar@codeaurora.org>
If the value for the firmware configuration parameters BTC_STATIC_LEN_LE_BT
and BTC_STATIC_LEN_LE_WLAN are not set the duty cycle between BT and WLAN
is such that if BT (including BLE) is active WLAN gets 0 bandwidth.
When tuning these parameters having a too high value for WLAN means that BLE performance degrades.
The "sweet" point of roughly half of the maximal values was empirically found to achieve
a balance between BLE and Wi-Fi coexistence performance.
Signed-off-by: Eyal Ilsar <eilsar@codeaurora.org>
Signed-off-by: Ramon Fried <rfried@codeaurora.org>
---
drivers/net/wireless/ath/wcn36xx/smd.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index 9c6590d..1c75987 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
@@ -72,8 +72,10 @@ struct wcn36xx_cfg_val {
WCN36XX_CFG_VAL(DYNAMIC_PS_POLL_VALUE, 0),
WCN36XX_CFG_VAL(TX_PWR_CTRL_ENABLE, 1),
WCN36XX_CFG_VAL(ENABLE_CLOSE_LOOP, 1),
- WCN36XX_CFG_VAL(ENABLE_LPWR_IMG_TRANSITION, 0),
+ WCN36XX_CFG_VAL(BTC_STATIC_LEN_LE_BT, 120000),
+ WCN36XX_CFG_VAL(BTC_STATIC_LEN_LE_WLAN, 30000),
WCN36XX_CFG_VAL(MAX_ASSOC_LIMIT, 10),
+ WCN36XX_CFG_VAL(ENABLE_LPWR_IMG_TRANSITION, 0),
WCN36XX_CFG_VAL(ENABLE_MCC_ADAPTIVE_SCHEDULER, 0),
};
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply related
* Re: [PATCH v2] ath10k: Re-enable TXQs for all devices
From: Toke Høiland-Jørgensen @ 2017-11-12 14:40 UTC (permalink / raw)
To: Felix Fietkau, make-wifi-fast, linux-wireless, ath10k
In-Reply-To: <f5540404-f2e0-203a-ee75-daf357f29547@nbd.name>
Felix Fietkau <nbd@nbd.name> writes:
> On 2017-11-10 01:48, Toke H=C3=B8iland-J=C3=B8rgensen wrote:
>> Commit 4ca1807815aa6801aaced7fdefa9edacc2521767 disables the use of the
>> mac80211 TXQs for some devices because of a theoretical throughput
>> regression. The original regression report[1] was related to fq_codel
>> qdisc drop performance, which was fixed in
>> 9d18562a227874289fda8ca5d117d8f503f1dcca. Since then, we have not seen
>> the TXQ-related regression, so it should be safe to re-enable TXQs.
> That commit is unrelated to the fq/codel implementations in mac80211,
> since mac80211 with txq does not use qdisc.
Yup. Which is why it's odd that the initial bug report referred to this;
that would indicate that the regression had nothing to do with TXQs in
the first place, and we could have merged this ages ago?
-Toke
^ permalink raw reply
* brcmfmac: Unable to handle kernel paging request at virtual address 726f6674616cd8
From: Stefan Wahren @ 2017-11-12 16:50 UTC (permalink / raw)
To: Franky Lin, Chi-Hsien Lin, Wright Feng, Arend van Spriel,
Hante Meuleman
Cc: Kalle Valo, brcm80211-dev-list.pdl, linux-wireless,
brcm80211-dev-list
Hi,
i discovered a random oops during probe of brcmfmac on Raspberry Pi 3 in yesterdays kernelci run for net-next [1]. I need to point out there is no DT entry for the wifi chip on Raspberry Pi 3 in the lack of a driver for the necessary GPIO expander. So the "HT Avail timeout" is expected.
I was also able to trigger this oops by calling "modprobe brcmfmac" on my Raspberry Pi 3 with latest linux-next.
Any help to fix this is appreciated.
[1] - https://storage.kernelci.org/net-next/master/v4.14-rc8-2221-ga8a6f1e4ea78/arm64/defconfig+kselftest/lab-baylibre/boot-bcm2837-rpi-3-b.txt
[ 94.922915] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 94.933262] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 94.940503] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 94.950222] cfg80211: failed to load regulatory.db
[ 94.977028] brcmfmac: brcmf_fw_map_chip_to_name: using brcm/brcmfmac43430-sdio.bin for chip 0x00a9a6(43430) rev 0x000001
[ 94.990977] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43430-sdio.txt failed with error -2
[ 96.021578] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
[ 97.034210] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
[ 97.071241] Unable to handle kernel paging request at virtual address 726f6674616cd8
[ 97.079464] Mem abort info:
[ 97.082437] ESR = 0x96000004
[ 97.085744] Exception class = DABT (current EL), IL = 32 bits
[ 97.092140] SET = 0, FnV = 0
[ 97.095438] EA = 0, S1PTW = 0
[ 97.098775] Data abort info:
[ 97.101851] ISV = 0, ISS = 0x00000004
[ 97.105942] CM = 0, WnR = 0
[ 97.118824] [00726f6674616cd8] address between user and kernel address ranges
[ 97.135901] Internal error: Oops: 96000004 [#1] PREEMPT SMP
[ 97.151348] Modules linked in: brcmfmac cfg80211 brcmutil vc4 cec drm_kms_helper drm crc32_ce smsc95xx rfkill bcm2835_rng usbnet rng_core pwm_bcm2835 bcm2835_dma i2c_bcm2835 ip_tables x_tables ipv6 [last unloaded: cfg80211]
[ 97.182218] CPU: 3 PID: 92 Comm: kworker/3:1 Tainted: G W 4.14.0-rc8-next-20171110 #1
[ 97.202052] Hardware name: Raspberry Pi 3 Model B Rev 1.2 (DT)
[ 97.218562] Workqueue: events request_firmware_work_func
[ 97.234663] task: ffff8000372dd400 task.stack: ffff000009420000
[ 97.251451] pstate: 60000005 (nZCv daif -PAN -UAO)
[ 97.267105] pc : mutex_lock+0x30/0x60
[ 97.281628] lr : mutex_lock+0x24/0x60
[ 97.296124] sp : ffff000009423bd0
[ 97.309945] x29: ffff000009423bd0 x28: 0000000000000000
[ 97.325824] x27: ffff00000932bd20 x26: ffff000008fafbf0
[ 97.341362] x25: ffff8000372dd400 x24: ffff800036d8c100
[ 97.356869] x23: 0000000000000000 x22: ffff800038fd3d00
[ 97.372367] x21: 0000000000000000 x20: 6d726f6674616cd8
[ 97.387876] x19: 6d726f6674616cd8 x18: 0000000000000000
[ 97.403458] x17: 0000ffffacf22930 x16: ffff00000825b470
[ 97.419094] x15: 0000000000000000 x14: 0000000000000400
[ 97.434747] x13: 0000000000000400 x12: 0000000000000000
[ 97.450344] x11: 0000000000000000 x10: 0000000000000000
[ 97.465868] x9 : 0000000000000000 x8 : ffff8000312aa9a8
[ 97.481377] x7 : ffff8000312a1458 x6 : 0000000000000000
[ 97.496942] x5 : 0000000000000000 x4 : ffff8000372dd400
[ 97.512552] x3 : 0000000000000000 x2 : 0000000004208060
[ 97.528144] x1 : 0000000000000000 x0 : ffff8000372dd400
[ 97.543741] Process kworker/3:1 (pid: 92, stack limit = 0xffff000009420000)
[ 97.561203] Call trace:
[ 97.574047] mutex_lock+0x30/0x60
[ 97.587808] device_release_driver_internal+0x38/0x1f0
[ 97.603563] device_release_driver+0x14/0x20
[ 97.618589] brcmf_sdio_firmware_callback+0x160/0x578 [brcmfmac]
[ 97.635534] brcmf_fw_request_nvram_done+0x258/0x5e8 [brcmfmac]
[ 97.652336] request_firmware_work_func+0x34/0x60
[ 97.667928] process_one_work+0x1ac/0x328
[ 97.682825] worker_thread+0x50/0x460
[ 97.697361] kthread+0x104/0x130
[ 97.711466] ret_from_fork+0x10/0x18
[ 97.725960] Code: 97dc9c70 d2800001 d5384100 f9800271 (c85ffe62)
[ 97.743203] ---[ end trace a27498e726fb3a35 ]---
^ permalink raw reply
* [PATCH] rtlwifi: Convert individual interrupt results to struct
From: Larry Finger @ 2017-11-12 20:06 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless, Larry Finger, Ping-Ke Shih
With the RTL8822BE and later devices, the number of interrupt vectors
has grown from 2 to 4. At this point, saving and passing those vectors
in a struct makes more sense than using individual scaler variables.
In two of the drivers, code to process the second of the interrupt
registers was included, but commented out. This patch removes those
useless sections.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtlwifi/pci.c | 47 +++++++++++-----------
.../net/wireless/realtek/rtlwifi/rtl8188ee/hw.c | 11 +++--
.../net/wireless/realtek/rtlwifi/rtl8188ee/hw.h | 3 +-
.../net/wireless/realtek/rtlwifi/rtl8192ce/hw.c | 12 ++----
.../net/wireless/realtek/rtlwifi/rtl8192ce/hw.h | 3 +-
.../net/wireless/realtek/rtlwifi/rtl8192de/hw.c | 12 ++----
.../net/wireless/realtek/rtlwifi/rtl8192de/hw.h | 3 +-
.../net/wireless/realtek/rtlwifi/rtl8192ee/hw.c | 11 +++--
.../net/wireless/realtek/rtlwifi/rtl8192ee/hw.h | 3 +-
.../net/wireless/realtek/rtlwifi/rtl8192se/hw.c | 12 +++---
.../net/wireless/realtek/rtlwifi/rtl8192se/hw.h | 3 +-
.../net/wireless/realtek/rtlwifi/rtl8723ae/hw.c | 7 ++--
.../net/wireless/realtek/rtlwifi/rtl8723ae/hw.h | 3 +-
.../net/wireless/realtek/rtlwifi/rtl8723be/hw.c | 13 +++---
.../net/wireless/realtek/rtlwifi/rtl8723be/hw.h | 3 +-
.../net/wireless/realtek/rtlwifi/rtl8821ae/hw.c | 11 +++--
.../net/wireless/realtek/rtlwifi/rtl8821ae/hw.h | 3 +-
drivers/net/wireless/realtek/rtlwifi/wifi.h | 11 ++++-
18 files changed, 76 insertions(+), 95 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.c b/drivers/net/wireless/realtek/rtlwifi/pci.c
index c2575b0b9440..ed6e4a5b99de 100644
--- a/drivers/net/wireless/realtek/rtlwifi/pci.c
+++ b/drivers/net/wireless/realtek/rtlwifi/pci.c
@@ -924,10 +924,8 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id)
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
unsigned long flags;
- u32 inta = 0;
- u32 intb = 0;
- u32 intc = 0;
- u32 intd = 0;
+ struct rtl_int intvec = {0};
+
irqreturn_t ret = IRQ_HANDLED;
if (rtlpci->irq_enabled == 0)
@@ -937,47 +935,47 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id)
rtlpriv->cfg->ops->disable_interrupt(hw);
/*read ISR: 4/8bytes */
- rtlpriv->cfg->ops->interrupt_recognized(hw, &inta, &intb, &intc, &intd);
+ rtlpriv->cfg->ops->interrupt_recognized(hw, &intvec);
/*Shared IRQ or HW disappeared */
- if (!inta || inta == 0xffff)
+ if (!intvec.inta || intvec.inta == 0xffff)
goto done;
/*<1> beacon related */
- if (inta & rtlpriv->cfg->maps[RTL_IMR_TBDOK])
+ if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_TBDOK])
RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE,
"beacon ok interrupt!\n");
- if (unlikely(inta & rtlpriv->cfg->maps[RTL_IMR_TBDER]))
+ if (unlikely(intvec.inta & rtlpriv->cfg->maps[RTL_IMR_TBDER]))
RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE,
"beacon err interrupt!\n");
- if (inta & rtlpriv->cfg->maps[RTL_IMR_BDOK])
+ if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_BDOK])
RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE, "beacon interrupt!\n");
- if (inta & rtlpriv->cfg->maps[RTL_IMR_BCNINT]) {
+ if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_BCNINT]) {
RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE,
"prepare beacon for interrupt!\n");
tasklet_schedule(&rtlpriv->works.irq_prepare_bcn_tasklet);
}
/*<2> Tx related */
- if (unlikely(intb & rtlpriv->cfg->maps[RTL_IMR_TXFOVW]))
+ if (unlikely(intvec.intb & rtlpriv->cfg->maps[RTL_IMR_TXFOVW]))
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, "IMR_TXFOVW!\n");
- if (inta & rtlpriv->cfg->maps[RTL_IMR_MGNTDOK]) {
+ if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_MGNTDOK]) {
RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE,
"Manage ok interrupt!\n");
_rtl_pci_tx_isr(hw, MGNT_QUEUE);
}
- if (inta & rtlpriv->cfg->maps[RTL_IMR_HIGHDOK]) {
+ if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_HIGHDOK]) {
RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE,
"HIGH_QUEUE ok interrupt!\n");
_rtl_pci_tx_isr(hw, HIGH_QUEUE);
}
- if (inta & rtlpriv->cfg->maps[RTL_IMR_BKDOK]) {
+ if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_BKDOK]) {
rtlpriv->link_info.num_tx_inperiod++;
RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE,
@@ -985,7 +983,7 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id)
_rtl_pci_tx_isr(hw, BK_QUEUE);
}
- if (inta & rtlpriv->cfg->maps[RTL_IMR_BEDOK]) {
+ if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_BEDOK]) {
rtlpriv->link_info.num_tx_inperiod++;
RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE,
@@ -993,7 +991,7 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id)
_rtl_pci_tx_isr(hw, BE_QUEUE);
}
- if (inta & rtlpriv->cfg->maps[RTL_IMR_VIDOK]) {
+ if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_VIDOK]) {
rtlpriv->link_info.num_tx_inperiod++;
RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE,
@@ -1001,7 +999,7 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id)
_rtl_pci_tx_isr(hw, VI_QUEUE);
}
- if (inta & rtlpriv->cfg->maps[RTL_IMR_VODOK]) {
+ if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_VODOK]) {
rtlpriv->link_info.num_tx_inperiod++;
RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE,
@@ -1010,7 +1008,7 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id)
}
if (rtlhal->hw_type == HARDWARE_TYPE_RTL8822BE) {
- if (intd & rtlpriv->cfg->maps[RTL_IMR_H2CDOK]) {
+ if (intvec.intd & rtlpriv->cfg->maps[RTL_IMR_H2CDOK]) {
rtlpriv->link_info.num_tx_inperiod++;
RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE,
@@ -1020,7 +1018,7 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id)
}
if (rtlhal->hw_type == HARDWARE_TYPE_RTL8192SE) {
- if (inta & rtlpriv->cfg->maps[RTL_IMR_COMDOK]) {
+ if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_COMDOK]) {
rtlpriv->link_info.num_tx_inperiod++;
RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE,
@@ -1030,25 +1028,25 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id)
}
/*<3> Rx related */
- if (inta & rtlpriv->cfg->maps[RTL_IMR_ROK]) {
+ if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_ROK]) {
RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE, "Rx ok interrupt!\n");
_rtl_pci_rx_interrupt(hw);
}
- if (unlikely(inta & rtlpriv->cfg->maps[RTL_IMR_RDU])) {
+ if (unlikely(intvec.inta & rtlpriv->cfg->maps[RTL_IMR_RDU])) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING,
"rx descriptor unavailable!\n");
_rtl_pci_rx_interrupt(hw);
}
- if (unlikely(intb & rtlpriv->cfg->maps[RTL_IMR_RXFOVW])) {
+ if (unlikely(intvec.intb & rtlpriv->cfg->maps[RTL_IMR_RXFOVW])) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, "rx overflow !\n");
_rtl_pci_rx_interrupt(hw);
}
/*<4> fw related*/
if (rtlhal->hw_type == HARDWARE_TYPE_RTL8723AE) {
- if (inta & rtlpriv->cfg->maps[RTL_IMR_C2HCMD]) {
+ if (intvec.inta & rtlpriv->cfg->maps[RTL_IMR_C2HCMD]) {
RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE,
"firmware interrupt!\n");
queue_delayed_work(rtlpriv->works.rtl_wq,
@@ -1064,7 +1062,8 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id)
*/
if (rtlhal->hw_type == HARDWARE_TYPE_RTL8188EE ||
rtlhal->hw_type == HARDWARE_TYPE_RTL8723BE) {
- if (unlikely(inta & rtlpriv->cfg->maps[RTL_IMR_HSISR_IND])) {
+ if (unlikely(intvec.inta &
+ rtlpriv->cfg->maps[RTL_IMR_HSISR_IND])) {
RT_TRACE(rtlpriv, COMP_INTR, DBG_TRACE,
"hsisr interrupt!\n");
_rtl_pci_hs_interrupt(hw);
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c
index e30a18e64ff5..988d5ac57d02 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c
@@ -1472,17 +1472,16 @@ void rtl88ee_card_disable(struct ieee80211_hw *hw)
}
void rtl88ee_interrupt_recognized(struct ieee80211_hw *hw,
- u32 *p_inta, u32 *p_intb,
- u32 *p_intc, u32 *p_intd)
+ struct rtl_int *intvec)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
- *p_inta = rtl_read_dword(rtlpriv, ISR) & rtlpci->irq_mask[0];
- rtl_write_dword(rtlpriv, ISR, *p_inta);
+ intvec->inta = rtl_read_dword(rtlpriv, ISR) & rtlpci->irq_mask[0];
+ rtl_write_dword(rtlpriv, ISR, intvec->inta);
- *p_intb = rtl_read_dword(rtlpriv, REG_HISRE) & rtlpci->irq_mask[1];
- rtl_write_dword(rtlpriv, REG_HISRE, *p_intb);
+ intvec->intb = rtl_read_dword(rtlpriv, REG_HISRE) & rtlpci->irq_mask[1];
+ rtl_write_dword(rtlpriv, REG_HISRE, intvec->intb);
}
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.h b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.h
index cdf49de1e6ed..214cd2a32018 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.h
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.h
@@ -29,8 +29,7 @@
void rtl88ee_get_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val);
void rtl88ee_read_eeprom_info(struct ieee80211_hw *hw);
void rtl88ee_interrupt_recognized(struct ieee80211_hw *hw,
- u32 *p_inta, u32 *p_intb,
- u32 *p_intc, u32 *p_intd);
+ struct rtl_int *int_vec);
int rtl88ee_hw_init(struct ieee80211_hw *hw);
void rtl88ee_card_disable(struct ieee80211_hw *hw);
void rtl88ee_enable_interrupt(struct ieee80211_hw *hw);
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c
index 0f4c86a28716..4a81e0ef4b8e 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c
@@ -1375,19 +1375,13 @@ void rtl92ce_card_disable(struct ieee80211_hw *hw)
}
void rtl92ce_interrupt_recognized(struct ieee80211_hw *hw,
- u32 *p_inta, u32 *p_intb,
- u32 *p_intc, u32 *p_intd)
+ struct rtl_int *intvec)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
- *p_inta = rtl_read_dword(rtlpriv, ISR) & rtlpci->irq_mask[0];
- rtl_write_dword(rtlpriv, ISR, *p_inta);
-
- /*
- * *p_intb = rtl_read_dword(rtlpriv, REG_HISRE) & rtlpci->irq_mask[1];
- * rtl_write_dword(rtlpriv, ISR + 4, *p_intb);
- */
+ intvec->inta = rtl_read_dword(rtlpriv, ISR) & rtlpci->irq_mask[0];
+ rtl_write_dword(rtlpriv, ISR, intvec->inta);
}
void rtl92ce_set_beacon_related_registers(struct ieee80211_hw *hw)
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.h b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.h
index b5c8e2fc1ba2..6711ea1a75d9 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.h
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.h
@@ -42,8 +42,7 @@ static inline u8 rtl92c_get_chnl_group(u8 chnl)
void rtl92ce_get_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val);
void rtl92ce_read_eeprom_info(struct ieee80211_hw *hw);
void rtl92ce_interrupt_recognized(struct ieee80211_hw *hw,
- u32 *p_inta, u32 *p_intb,
- u32 *p_intc, u32 *p_intd);
+ struct rtl_int *int_vec);
int rtl92ce_hw_init(struct ieee80211_hw *hw);
void rtl92ce_card_disable(struct ieee80211_hw *hw);
void rtl92ce_enable_interrupt(struct ieee80211_hw *hw);
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c
index 0da6c0136857..80123fd97221 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c
@@ -1356,19 +1356,13 @@ void rtl92de_card_disable(struct ieee80211_hw *hw)
}
void rtl92de_interrupt_recognized(struct ieee80211_hw *hw,
- u32 *p_inta, u32 *p_intb,
- u32 *p_intc, u32 *p_intd)
+ struct rtl_int *intvec)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
- *p_inta = rtl_read_dword(rtlpriv, ISR) & rtlpci->irq_mask[0];
- rtl_write_dword(rtlpriv, ISR, *p_inta);
-
- /*
- * *p_intb = rtl_read_dword(rtlpriv, REG_HISRE) & rtlpci->irq_mask[1];
- * rtl_write_dword(rtlpriv, ISR + 4, *p_intb);
- */
+ intvec->inta = rtl_read_dword(rtlpriv, ISR) & rtlpci->irq_mask[0];
+ rtl_write_dword(rtlpriv, ISR, intvec->inta);
}
void rtl92de_set_beacon_related_registers(struct ieee80211_hw *hw)
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.h b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.h
index 9236aa91273d..e6c702e69ecf 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.h
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.h
@@ -29,8 +29,7 @@
void rtl92de_get_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val);
void rtl92de_read_eeprom_info(struct ieee80211_hw *hw);
void rtl92de_interrupt_recognized(struct ieee80211_hw *hw,
- u32 *p_inta, u32 *p_intb,
- u32 *p_intc, u32 *p_intd);
+ struct rtl_int *int_vec);
int rtl92de_hw_init(struct ieee80211_hw *hw);
void rtl92de_card_disable(struct ieee80211_hw *hw);
void rtl92de_enable_interrupt(struct ieee80211_hw *hw);
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c
index fe5da637e77a..fd7928fdbd1a 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c
@@ -1694,17 +1694,16 @@ void rtl92ee_card_disable(struct ieee80211_hw *hw)
}
void rtl92ee_interrupt_recognized(struct ieee80211_hw *hw,
- u32 *p_inta, u32 *p_intb,
- u32 *p_intc, u32 *p_intd)
+ struct rtl_int *intvec)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
- *p_inta = rtl_read_dword(rtlpriv, ISR) & rtlpci->irq_mask[0];
- rtl_write_dword(rtlpriv, ISR, *p_inta);
+ intvec->inta = rtl_read_dword(rtlpriv, ISR) & rtlpci->irq_mask[0];
+ rtl_write_dword(rtlpriv, ISR, intvec->inta);
- *p_intb = rtl_read_dword(rtlpriv, REG_HISRE) & rtlpci->irq_mask[1];
- rtl_write_dword(rtlpriv, REG_HISRE, *p_intb);
+ intvec->intb = rtl_read_dword(rtlpriv, REG_HISRE) & rtlpci->irq_mask[1];
+ rtl_write_dword(rtlpriv, REG_HISRE, intvec->intb);
}
void rtl92ee_set_beacon_related_registers(struct ieee80211_hw *hw)
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.h b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.h
index cd6d3322f033..3a63bec9b0cc 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.h
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.h
@@ -29,8 +29,7 @@
void rtl92ee_get_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val);
void rtl92ee_read_eeprom_info(struct ieee80211_hw *hw);
void rtl92ee_interrupt_recognized(struct ieee80211_hw *hw,
- u32 *p_inta, u32 *p_intb,
- u32 *p_intc, u32 *p_intd);
+ struct rtl_int *int_vec);
int rtl92ee_hw_init(struct ieee80211_hw *hw);
void rtl92ee_card_disable(struct ieee80211_hw *hw);
void rtl92ee_enable_interrupt(struct ieee80211_hw *hw);
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c
index 76bf089cced4..30dea7b9bc17 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c
@@ -1558,17 +1558,17 @@ void rtl92se_card_disable(struct ieee80211_hw *hw)
udelay(100);
}
-void rtl92se_interrupt_recognized(struct ieee80211_hw *hw, u32 *p_inta,
- u32 *p_intb, u32 *p_intc, u32 *p_intd)
+void rtl92se_interrupt_recognized(struct ieee80211_hw *hw,
+ struct rtl_int *intvec)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
- *p_inta = rtl_read_dword(rtlpriv, ISR) & rtlpci->irq_mask[0];
- rtl_write_dword(rtlpriv, ISR, *p_inta);
+ intvec->inta = rtl_read_dword(rtlpriv, ISR) & rtlpci->irq_mask[0];
+ rtl_write_dword(rtlpriv, ISR, intvec->inta);
- *p_intb = rtl_read_dword(rtlpriv, ISR + 4) & rtlpci->irq_mask[1];
- rtl_write_dword(rtlpriv, ISR + 4, *p_intb);
+ intvec->intb = rtl_read_dword(rtlpriv, ISR + 4) & rtlpci->irq_mask[1];
+ rtl_write_dword(rtlpriv, ISR + 4, intvec->intb);
}
void rtl92se_set_beacon_related_registers(struct ieee80211_hw *hw)
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.h b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.h
index 607056010974..fa836ceefc8f 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.h
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.h
@@ -42,8 +42,7 @@ void rtl92se_get_hw_reg(struct ieee80211_hw *hw,
u8 variable, u8 *val);
void rtl92se_read_eeprom_info(struct ieee80211_hw *hw);
void rtl92se_interrupt_recognized(struct ieee80211_hw *hw,
- u32 *p_inta, u32 *p_intb,
- u32 *p_intc, u32 *p_intd);
+ struct rtl_int *int_vec);
int rtl92se_hw_init(struct ieee80211_hw *hw);
void rtl92se_card_disable(struct ieee80211_hw *hw);
void rtl92se_enable_interrupt(struct ieee80211_hw *hw);
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c
index c3f98d58124c..545115db507e 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c
@@ -1340,14 +1340,13 @@ void rtl8723e_card_disable(struct ieee80211_hw *hw)
}
void rtl8723e_interrupt_recognized(struct ieee80211_hw *hw,
- u32 *p_inta, u32 *p_intb,
- u32 *p_intc, u32 *p_intd)
+ struct rtl_int *intvec)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
- *p_inta = rtl_read_dword(rtlpriv, 0x3a0) & rtlpci->irq_mask[0];
- rtl_write_dword(rtlpriv, 0x3a0, *p_inta);
+ intvec->inta = rtl_read_dword(rtlpriv, 0x3a0) & rtlpci->irq_mask[0];
+ rtl_write_dword(rtlpriv, 0x3a0, intvec->inta);
}
void rtl8723e_set_beacon_related_registers(struct ieee80211_hw *hw)
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.h b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.h
index 19e467a37c72..c76e453f4f43 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.h
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.h
@@ -34,8 +34,7 @@ void rtl8723e_get_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val);
void rtl8723e_read_eeprom_info(struct ieee80211_hw *hw);
void rtl8723e_interrupt_recognized(struct ieee80211_hw *hw,
- u32 *p_inta, u32 *p_intb,
- u32 *p_intc, u32 *p_intd);
+ struct rtl_int *int_vec);
int rtl8723e_hw_init(struct ieee80211_hw *hw);
void rtl8723e_card_disable(struct ieee80211_hw *hw);
void rtl8723e_enable_interrupt(struct ieee80211_hw *hw);
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c
index 7cd1ffa7d4a7..d2369b0cad99 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c
@@ -1682,18 +1682,17 @@ void rtl8723be_card_disable(struct ieee80211_hw *hw)
}
void rtl8723be_interrupt_recognized(struct ieee80211_hw *hw,
- u32 *p_inta, u32 *p_intb,
- u32 *p_intc, u32 *p_intd)
+ struct rtl_int *intvec)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
- *p_inta = rtl_read_dword(rtlpriv, ISR) & rtlpci->irq_mask[0];
- rtl_write_dword(rtlpriv, ISR, *p_inta);
+ intvec->inta = rtl_read_dword(rtlpriv, ISR) & rtlpci->irq_mask[0];
+ rtl_write_dword(rtlpriv, ISR, intvec->inta);
- *p_intb = rtl_read_dword(rtlpriv, REG_HISRE) &
- rtlpci->irq_mask[1];
- rtl_write_dword(rtlpriv, REG_HISRE, *p_intb);
+ intvec->intb = rtl_read_dword(rtlpriv, REG_HISRE) &
+ rtlpci->irq_mask[1];
+ rtl_write_dword(rtlpriv, REG_HISRE, intvec->intb);
}
void rtl8723be_set_beacon_related_registers(struct ieee80211_hw *hw)
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.h b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.h
index 2215a792f6bf..ae856a19e81a 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.h
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.h
@@ -30,8 +30,7 @@ void rtl8723be_get_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val);
void rtl8723be_read_eeprom_info(struct ieee80211_hw *hw);
void rtl8723be_interrupt_recognized(struct ieee80211_hw *hw,
- u32 *p_inta, u32 *p_intb,
- u32 *p_intc, u32 *p_intd);
+ struct rtl_int *int_vec);
int rtl8723be_hw_init(struct ieee80211_hw *hw);
void rtl8723be_card_disable(struct ieee80211_hw *hw);
void rtl8723be_enable_interrupt(struct ieee80211_hw *hw);
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c
index 43e18c4c1e68..f20e77b4bb65 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c
@@ -2483,17 +2483,16 @@ void rtl8821ae_card_disable(struct ieee80211_hw *hw)
}
void rtl8821ae_interrupt_recognized(struct ieee80211_hw *hw,
- u32 *p_inta, u32 *p_intb,
- u32 *p_intc, u32 *p_intd)
+ struct rtl_int *intvec)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
- *p_inta = rtl_read_dword(rtlpriv, ISR) & rtlpci->irq_mask[0];
- rtl_write_dword(rtlpriv, ISR, *p_inta);
+ intvec->inta = rtl_read_dword(rtlpriv, ISR) & rtlpci->irq_mask[0];
+ rtl_write_dword(rtlpriv, ISR, intvec->inta);
- *p_intb = rtl_read_dword(rtlpriv, REG_HISRE) & rtlpci->irq_mask[1];
- rtl_write_dword(rtlpriv, REG_HISRE, *p_intb);
+ intvec->intb = rtl_read_dword(rtlpriv, REG_HISRE) & rtlpci->irq_mask[1];
+ rtl_write_dword(rtlpriv, REG_HISRE, intvec->intb);
}
void rtl8821ae_set_beacon_related_registers(struct ieee80211_hw *hw)
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.h b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.h
index 284d259fe557..e2ab783a2ad9 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.h
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.h
@@ -30,8 +30,7 @@ void rtl8821ae_get_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val);
void rtl8821ae_read_eeprom_info(struct ieee80211_hw *hw);
void rtl8821ae_interrupt_recognized(struct ieee80211_hw *hw,
- u32 *p_inta, u32 *p_intb,
- u32 *p_intc, u32 *p_intd);
+ struct rtl_int *int_vec);
int rtl8821ae_hw_init(struct ieee80211_hw *hw);
void rtl8821ae_card_disable(struct ieee80211_hw *hw);
void rtl8821ae_enable_interrupt(struct ieee80211_hw *hw);
diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/drivers/net/wireless/realtek/rtlwifi/wifi.h
index 92d4859ec906..e2b14793b705 100644
--- a/drivers/net/wireless/realtek/rtlwifi/wifi.h
+++ b/drivers/net/wireless/realtek/rtlwifi/wifi.h
@@ -2093,14 +2093,21 @@ struct rtl_wow_pattern {
u32 mask[4];
};
+/* struct to store contents of interrupt vectors */
+struct rtl_int {
+ u32 inta;
+ u32 intb;
+ u32 intc;
+ u32 intd;
+};
+
struct rtl_hal_ops {
int (*init_sw_vars) (struct ieee80211_hw *hw);
void (*deinit_sw_vars) (struct ieee80211_hw *hw);
void (*read_chip_version)(struct ieee80211_hw *hw);
void (*read_eeprom_info) (struct ieee80211_hw *hw);
void (*interrupt_recognized) (struct ieee80211_hw *hw,
- u32 *p_inta, u32 *p_intb,
- u32 *p_intc, u32 *p_intd);
+ struct rtl_int *intvec);
int (*hw_init) (struct ieee80211_hw *hw);
void (*hw_disable) (struct ieee80211_hw *hw);
void (*hw_suspend) (struct ieee80211_hw *hw);
--
2.15.0
^ permalink raw reply related
* Re: [v2] ath9k: add MSI support
From: Kalle Valo @ 2017-11-13 8:48 UTC (permalink / raw)
To: Daniel Drake
Cc: Russell Hu, linux-wireless@vger.kernel.org, Ryan Hsu,
Robert Chang, Aeolus Yang, ath9k-devel, linux@endlessm.com,
rafael.j.wysocki@intel.com, andy@infradead.org
In-Reply-To: <20171110025415.7854-1-drake@endlessm.com>
Daniel Drake <drake@endlessm.com> writes:
>> On new Intel platforms like ApolloLake, legacy interrupt mechanism
>> (INTx) is not supported
>
> Could you please share the background on what you are claiming here.
> I have multiple ApolloLake laptops here with many legacy interrupts
> being used in /proc/interrupts.
>
> I do see this ath9k problem on multiple Acer ApolloLake laptops, however
> I also have an Asus E402NA ApolloLake laptop on hand where the exact same
> ath9k miniPCIe card is working fine with legacy interrupts.
>
>> With module paremeter "use_msi=3D1", ath9k driver would try to
>> use MSI instead of INTx.
>
> In the previous patch review it was suggested that MSI should become
> the default - not a quirk or parameter.
> https://lkml.org/lkml/2017/9/26/64
Enabling MSI by default is just too invasive, ath9k is used in so many
different enviroments that risk of regressions is high. MSI needs a lot
of testing before we can even consider enabling it by default.
> I have tested your patch on Acer Aspire ES1-432. It does not work -
> I still can't connect to wifi.
> /proc/interrupts shows that no MSI interrupts are delivered, the
> counters are 0.
>
> lspci -vv shows:
> Capabilities: [50] MSI: Enable+ Count=3D1/4 Maskable+ 64bit+
> Address: 00000000fee0f00c Data: 4142
> Masking: 0000000e Pending: 00000000
>
> So MSI is enabled and the vector number is 0x42 (decimal 66).
> However my kernel log is now totally spammed with:
> do_IRQ: 0.64 No irq handler for vector
>
> My assumption here is that the ath9k hardware implementation of
> MSI is buggy, and it is therefore corrupting the MSI vector number
> by zeroing out the lower 2 bits (e.g. 66 -> 64).
>
> It would be very useful if Qualcomm could confirm if this behaviour
> is really true and if it could potentially be fixed with a new ath9k
> firmware version.
ath9k does not have firmware.
--=20
Kalle Valo=
^ permalink raw reply
* Re: [PATCH] wcn36xx: fix iris child-node lookup
From: Kalle Valo @ 2017-11-13 8:51 UTC (permalink / raw)
To: Johan Hovold
Cc: k.eugene.e@gmail.com, wcn36xx@lists.infradead.org,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, stable, Loic Poulain
In-Reply-To: <20171111170532.6110-1-johan@kernel.org>
Johan Hovold <johan@kernel.org> writes:
> Fix child-node lookup during probe, which ended up searching the whole
> device tree depth-first starting at the parent rather than just matching
> on its children.
>
> To make things worse, the parent mmio node was also prematurely freed.
>
> Fixes: fd52bdae9ab0 ("wcn36xx: Disable 5GHz for wcn3620")
fd52bdae9ab0 is in net-next right now so the first release for that
commit should be v4.15-rc1.
> Cc: stable <stable@vger.kernel.org> # 4.14
As fd52bdae9ab0 is not in v4.14 no need to Cc stable. I'll remove it.
> Cc: Loic Poulain <loic.poulain@linaro.org>
> Signed-off-by: Johan Hovold <johan@kernel.org>
Thanks, I'll queue this to v4.15.
--=20
Kalle Valo=
^ permalink raw reply
* Re: [PATCH] ath10k: fix recent bandwidth conversion bug
From: Johannes Berg @ 2017-11-13 8:53 UTC (permalink / raw)
To: Sebastian Gottschall, Christian Lamparter; +Cc: linux-wireless, Kalle Valo
In-Reply-To: <b31e2b05-4882-de0a-09c8-a007f1e407ce@dd-wrt.com>
On Thu, 2017-11-02 at 22:08 +0100, Sebastian Gottschall wrote:
> i know. saw that later too. code should be safe
It would be good if you could adhere to our mailing list customs and
start quoting properly, instead of just top-posting.
Thanks,
johannes
^ permalink raw reply
* Re: [PATCH v2 3/4] cfg80211: reg: remove support for built-in regdb
From: Johannes Berg @ 2017-11-13 9:23 UTC (permalink / raw)
To: Benjamin Beichler, linux-wireless, Seth Forshee
In-Reply-To: <5392a1bb-378c-17c6-de0d-862e86041c2e@uni-rostock.de>
On Mon, 2017-11-13 at 10:19 +0100, Benjamin Beichler wrote:
>
> Is there already an example regulatory.db file available?
There isn't yet, Seth?
> And is there already a tool chain for creating the new format?
I posted a patch:
https://patchwork.kernel.org/patch/9992477/
for the regdb project.
> I don't see any
> corresponding commit on
> https://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git/
> for your change. Or can I simply use the regulartory.bin as firmware file?
No, you have to make a new file.
johannes
^ permalink raw reply
* Re: [PATCH v2 3/4] cfg80211: reg: remove support for built-in regdb
From: Benjamin Beichler @ 2017-11-13 9:19 UTC (permalink / raw)
To: Johannes Berg, linux-wireless; +Cc: Johannes Berg
In-Reply-To: <20171009095018.5289-4-johannes@sipsolutions.net>
[-- Attachment #1: Type: text/plain, Size: 3053 bytes --]
Hi Johannes,
Am 09.10.2017 um 11:50 schrieb Johannes Berg:
> From: Johannes Berg <johannes.berg@intel.com>
>
> Parsing and building C structures from a regdb is no longer needed
> since the "firmware" file (regulatory.db) can be linked into the
> kernel image to achieve the same effect.
>
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> ---
> Documentation/networking/regulatory.txt | 22 +----
> net/wireless/Kconfig | 24 +----
> net/wireless/Makefile | 6 --
> net/wireless/db.txt | 17 ----
> net/wireless/genregdb.awk | 158 --------------------------------
> net/wireless/reg.c | 39 --------
> net/wireless/regdb.h | 23 -----
> 7 files changed, 3 insertions(+), 286 deletions(-)
> delete mode 100644 net/wireless/db.txt
> delete mode 100644 net/wireless/genregdb.awk
> delete mode 100644 net/wireless/regdb.h
>
> diff --git a/Documentation/networking/regulatory.txt b/Documentation/networking/regulatory.txt
> index 46c8d8b1cc66..381e5b23d61d 100644
> --- a/Documentation/networking/regulatory.txt
> +++ b/Documentation/networking/regulatory.txt
> @@ -200,23 +200,5 @@ Then in some part of your code after your wiphy has been registered:
> Statically compiled regulatory database
> ---------------------------------------
>
> -In most situations the userland solution using CRDA as described
> -above is the preferred solution. However in some cases a set of
> -rules built into the kernel itself may be desirable. To account
> -for this situation, a configuration option has been provided
> -(i.e. CONFIG_CFG80211_INTERNAL_REGDB). With this option enabled,
> -the wireless database information contained in net/wireless/db.txt is
> -used to generate a data structure encoded in net/wireless/regdb.c.
> -That option also enables code in net/wireless/reg.c which queries
> -the data in regdb.c as an alternative to using CRDA.
> -
> -The file net/wireless/db.txt should be kept up-to-date with the db.txt
> -file available in the git repository here:
> -
> - git://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git
> -
> -Again, most users in most situations should be using the CRDA package
> -provided with their distribution, and in most other situations users
> -should be building and using CRDA on their own rather than using
> -this option. If you are not absolutely sure that you should be using
> -CONFIG_CFG80211_INTERNAL_REGDB then _DO_NOT_USE_IT_.
> +When a database should be fixed into the kernel, it can be provided as a
> +firmware file at build time that is then linked into the kernel.
>
Is there already an example regulatory.db file available? And is there
already a tool chain for creating the new format? I don't see any
corresponding commit on
https://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git/
for your change. Or can I simply use the regulartory.bin as firmware file?
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5151 bytes --]
^ permalink raw reply
* Re: [PATCH] mac80211: Update last_ack status for all except probing frames
From: Johannes Berg @ 2017-11-13 9:25 UTC (permalink / raw)
To: Rajkumar Manoharan, Igor Mitsyanko
Cc: linux-wireless@vger.kernel.org, rmanohar@codeaurora.org
In-Reply-To: <96799d352b7347a8a9092bb37f1cd8d9@NALASEXR01H.na.qualcomm.com>
On Mon, 2017-11-06 at 20:20 +0000, Rajkumar Manoharan wrote:
> > > For steering an idle station from one BSS to another, the steering
> > > application has to know the actual station idle period. But if the
> > > idle period is cleared by ap_max_inactivity, the steering application
> > > cannot steer the station even though the station is not sending or receiving
> >
> > any data or mgmt. frame.
I guess you want something else. Why even consider a station that's
sending mgmt frames as non-idle?
You can just use the data TX/RX counters to figure out if the station
has been idle.
You've not convinced me that changing the current logic here makes any
sense.
johannes
^ permalink raw reply
* Re: [PATCH] IW: Zero or Uninitialized value of keylen passing
From: Johannes Berg @ 2017-11-13 9:27 UTC (permalink / raw)
To: amit.khatri, linux-wireless@vger.kernel.org
Cc: Nitin Jhanwar, AMIT KUMAR JAISWAL
In-Reply-To: <20171102112839epcms5p42b2f4fa5e261fb5ec26237a17fe08655@epcms5p4>
On Thu, 2017-11-02 at 11:28 +0000, Amit Khatri wrote:
> From b755c8ee282abbd0008e9e7241c457662c90f2c3 Mon Sep 17 00:00:00 2001
> From: Amit Khatri <amit.khatri@samsung.com>
> Date: Thu, 2 Nov 2017 15:55:16 +0530
> Subject: [PATCH] IW: Zero or Uninitialized value of keylen passing
>
> In case of hexadeciaml keydata, keylen is not gettig updated
> and passing in NLA_PUT(msg, NL80211_KEY_DATA, keylen, keydata)
> as zero (becasue of local variable).
>
> This patch initilalize keylen variable in case of hexkey data.
Uh. Please re-read the code. I'll selectively quote for you (without
your changes):
> case 10:
> keydata = hex2bin(keydata, keybuf);
> case 5:
> NLA_PUT_U32(msg, NL80211_KEY_CIPHER, 0x000FAC01);
> keylen = 5;
> break;
johannes
^ permalink raw reply
* Re: [PATCH] cfg80211: Include length of kek in rekey data
From: Johannes Berg @ 2017-11-13 9:28 UTC (permalink / raw)
To: Vidyullatha Kanchanapally
Cc: linux-wireless, jouni, vkanchan, amarnath, usdutt, vamsin
In-Reply-To: <1508923180-14558-1-git-send-email-vidyullatha@codeaurora.org>
On Wed, 2017-10-25 at 14:49 +0530, Vidyullatha Kanchanapally wrote:
> With support for new AKM suites (example FILS-SHA256), the KEK length
> can now be more than NL80211_KEK_LEN and the KCK length can be zero.
> Add changes in cfg80211 to specify the length of KEK, and make KCK
> optional. Make NL80211_REKEY_DATA_KEK as NLA_BINARY to enforce a maximum
> length check.
It seems to me that some sort of feature negotiation would be required
here, since you can't just assume all (existing) drivers will
understand this?
johannes
^ permalink raw reply
* Re: [RFC PATCH 2/2] nl80211: implement beacon change notifier
From: Johannes Berg @ 2017-11-13 9:30 UTC (permalink / raw)
To: Sergey Matyukevich, linux-wireless
Cc: Igor Mitsyanko, Avinash Patil, Vasily Ulyanov
In-Reply-To: <20171109094024.9085-2-sergey.matyukevich.os@quantenna.com>
On Thu, 2017-11-09 at 12:40 +0300, Sergey Matyukevich wrote:
> From: Vasily Ulyanov <vulyanov@quantenna.com>
>
> Notify user-space listeners about beacon data change.
What would this be needed for, and why couldn't you just directly talk
to hostapd/wpa_s?
johannes
^ permalink raw reply
* Re: [PATCH] wcn36xx: fix iris child-node lookup
From: Johan Hovold @ 2017-11-13 9:37 UTC (permalink / raw)
To: Kalle Valo
Cc: Johan Hovold, k.eugene.e@gmail.com, wcn36xx@lists.infradead.org,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, stable, Loic Poulain
In-Reply-To: <87po8m7e8s.fsf@qca.qualcomm.com>
On Mon, Nov 13, 2017 at 08:51:49AM +0000, Kalle Valo wrote:
> Johan Hovold <johan@kernel.org> writes:
>
> > Fix child-node lookup during probe, which ended up searching the whole
> > device tree depth-first starting at the parent rather than just matching
> > on its children.
> >
> > To make things worse, the parent mmio node was also prematurely freed.
> >
> > Fixes: fd52bdae9ab0 ("wcn36xx: Disable 5GHz for wcn3620")
>
> fd52bdae9ab0 is in net-next right now so the first release for that
> commit should be v4.15-rc1.
>
> > Cc: stable <stable@vger.kernel.org> # 4.14
>
> As fd52bdae9ab0 is not in v4.14 no need to Cc stable. I'll remove it.
Ah, sorry. Thanks for fixing that up.
> > Cc: Loic Poulain <loic.poulain@linaro.org>
> > Signed-off-by: Johan Hovold <johan@kernel.org>
>
> Thanks, I'll queue this to v4.15.
Johan
^ permalink raw reply
* [PATCH 0/3] rtlwifi: Refactor TX/RX flow to improve throughput
From: pkshih @ 2017-11-13 9:39 UTC (permalink / raw)
To: Larry.Finger, kvalo; +Cc: linux-wireless, steventing, yhchuang
From: Ping-Ke Shih <pkshih@realtek.com>
This patchset is aim to reduce IO to improve TX/RX performance, and also I
cleanup the code to make it easier and simpler.
Ping-Ke Shih (3):
rtlwifi: Reduce IO in RX interrupt to boost throughput
rtlwifi: fix the wrong size to calculate fifo space
rtlwifi: cleanup the code that check whether TX ring is available
drivers/net/wireless/realtek/rtlwifi/pci.c | 13 ++---
drivers/net/wireless/realtek/rtlwifi/pci.h | 5 +-
.../net/wireless/realtek/rtlwifi/rtl8192ee/trx.c | 57 ++++------------------
3 files changed, 15 insertions(+), 60 deletions(-)
--
2.14.1
^ permalink raw reply
* [PATCH 1/3] rtlwifi: Reduce IO in RX interrupt to boost throughput
From: pkshih @ 2017-11-13 9:39 UTC (permalink / raw)
To: Larry.Finger, kvalo; +Cc: linux-wireless, steventing, yhchuang
In-Reply-To: <20171113093935.20431-1-pkshih@realtek.com>
From: Ping-Ke Shih <pkshih@realtek.com>
Check remaining count of RX packets cost a lot of CPU time, so only update
when the counter decreases to zero. In old flow, the counter was updated
once a RX packet is received.
Signed-off-by: Steven Ting <steventing@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtlwifi/pci.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.c b/drivers/net/wireless/realtek/rtlwifi/pci.c
index c2575b0b9440..ca3f4716c1b6 100644
--- a/drivers/net/wireless/realtek/rtlwifi/pci.c
+++ b/drivers/net/wireless/realtek/rtlwifi/pci.c
@@ -747,7 +747,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
u8 tmp_one;
bool unicast = false;
u8 hw_queue = 0;
- unsigned int rx_remained_cnt;
+ unsigned int rx_remained_cnt = 0;
struct rtl_stats stats = {
.signal = 0,
.rate = 0,
@@ -768,7 +768,8 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
struct sk_buff *new_skb;
if (rtlpriv->use_new_trx_flow) {
- rx_remained_cnt =
+ if (rx_remained_cnt == 0)
+ rx_remained_cnt =
rtlpriv->cfg->ops->rx_desc_buff_remained_cnt(hw,
hw_queue);
if (rx_remained_cnt == 0)
--
2.14.1
^ permalink raw reply related
* [PATCH 2/3] rtlwifi: fix the wrong size to calculate fifo space
From: pkshih @ 2017-11-13 9:39 UTC (permalink / raw)
To: Larry.Finger, kvalo; +Cc: linux-wireless, steventing, yhchuang
In-Reply-To: <20171113093935.20431-1-pkshih@realtek.com>
From: Ping-Ke Shih <pkshih@realtek.com>
Give correct fifo size to calculate fifo space. Fortunately, the values of
RTL_PCI_MAX_RX_COUNT and TX_DESC_NUM_92E are the same in old code, so it
still works.
Signed-off-by: Steven Ting <steventing@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtlwifi/pci.h | 4 ++--
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c | 6 ++++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.h b/drivers/net/wireless/realtek/rtlwifi/pci.h
index e7d070e8da2d..ed5de1218bd9 100644
--- a/drivers/net/wireless/realtek/rtlwifi/pci.h
+++ b/drivers/net/wireless/realtek/rtlwifi/pci.h
@@ -320,10 +320,10 @@ static inline void pci_write32_async(struct rtl_priv *rtlpriv,
writel(val, (u8 __iomem *)rtlpriv->io.pci_mem_start + addr);
}
-static inline u16 calc_fifo_space(u16 rp, u16 wp)
+static inline u16 calc_fifo_space(u16 rp, u16 wp, u16 size)
{
if (rp <= wp)
- return RTL_PCI_MAX_RX_COUNT - 1 + rp - wp;
+ return size - 1 + rp - wp;
return rp - wp - 1;
}
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c
index 12255682e890..bc44d9d912d8 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c
@@ -498,7 +498,8 @@ u16 rtl92ee_rx_desc_buff_remained_cnt(struct ieee80211_hw *hw, u8 queue_index)
if (!start_rx)
return 0;
- remind_cnt = calc_fifo_space(read_point, write_point);
+ remind_cnt = calc_fifo_space(read_point, write_point,
+ RTL_PCI_MAX_RX_COUNT);
if (remind_cnt == 0)
return 0;
@@ -560,7 +561,8 @@ u16 rtl92ee_get_available_desc(struct ieee80211_hw *hw, u8 q_idx)
current_tx_write_point = (u16)((tmp_4byte) & 0x0fff);
point_diff = calc_fifo_space(current_tx_read_point,
- current_tx_write_point);
+ current_tx_write_point,
+ TX_DESC_NUM_92E);
rtlpci->tx_ring[q_idx].avl_desc = point_diff;
return point_diff;
--
2.14.1
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox