diff mbox

[1/4] rtl8xxxu: Fix off by one error calculating pubq

Message ID 1474420769-20086-2-git-send-email-Jes.Sorensen@redhat.com (mailing list archive)
State Accepted
Commit 3a589fae4a2cff317c3cabd4f76578ffd2761808
Delegated to: Kalle Valo
Headers show

Commit Message

Jes Sorensen Sept. 21, 2016, 1:19 a.m. UTC
From: Jes Sorensen <Jes.Sorensen@redhat.com>

This was detected tracing the 8188eu driver, but doesn't seem to make
any difference when using it.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
---
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kalle Valo Sept. 26, 2016, 5:42 p.m. UTC | #1
Jes Sorensen <Jes.Sorensen@redhat.com> wrote:
> From: Jes Sorensen <Jes.Sorensen@redhat.com>
> 
> This was detected tracing the 8188eu driver, but doesn't seem to make
> any difference when using it.
> 
> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>

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

3a589fae4a2c rtl8xxxu: Fix off by one error calculating pubq
c0a99bbb1b7a rtl8xxxu: Clean up llt_init() API
2fc5dd27bf9b rtl8xxxu: Use a struct rtl8xxxu_fileops * in rtl8xxxu_init_device()
b42fbed6b8a5 rtl8xxxu: Stop log spam from each successful interrupt
diff mbox

Patch

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
index ca92022..98fcd7b 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
@@ -3869,7 +3869,7 @@  static void rtl8xxxu_init_queue_reserved_page(struct rtl8xxxu_priv *priv)
 	val32 = (nq << RQPN_NPQ_SHIFT) | (eq << RQPN_EPQ_SHIFT);
 	rtl8xxxu_write32(priv, REG_RQPN_NPQ, val32);
 
-	pubq = fops->total_page_num - hq - lq - nq;
+	pubq = fops->total_page_num - hq - lq - nq - 1;
 
 	val32 = RQPN_LOAD;
 	val32 |= (hq << RQPN_HI_PQ_SHIFT);