[PATCH] staging: rtl8192e: Fix log spamming in rtl8192_hard_data_xmit

From: Mateusz Kulikowski
Date: Wed Aug 12 2015 - 15:55:15 EST


This patch fixes issue generated by commit ca93dcba3a92
("staging: rtl8192e: Remove assert() macro")

One negation was missed in conversion, therefore
asserted message was always printed.
For 1MB file downloaded via http, ~500 messages
were generated.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@xxxxxxxxx>
---

Notes:
This patch (probably) doesn't have to be applied urgently.
Modern distros are not outputting kernel log to console,
so even though driver would spam dmesg, it should not cause
performance drawbacks.

Target tested and verified that performance in fact improves,
at least on my configuration (logs are printed on console
and via netconsole).

Sorry I didn't catch that earlier - either during original
submission or later on - I didn't checked transmission
speeds as my area has some heavy wifi pollution.

drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index c868cb37..d6b46df 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -1642,8 +1642,8 @@ static void rtl8192_hard_data_xmit(struct sk_buff *skb, struct net_device *dev,
return;
}

- if (queue_index != TXCMD_QUEUE)
- netdev_warn(dev, "%s(): queue index != TXCMD_QUEUE\n",
+ if (queue_index == TXCMD_QUEUE)
+ netdev_warn(dev, "%s(): queue index == TXCMD_QUEUE\n",
__func__);

memcpy((unsigned char *)(skb->cb), &dev, sizeof(dev));
--
1.8.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/