Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1208175 > unrolled thread
| Started by | Raphaël Beamonte <raphael.beamonte@gmail.com> |
|---|---|
| First post | 2015-08-16 03:40 +0200 |
| Last post | 2015-08-19 13:00 +0200 |
| Articles | 17 on this page of 37 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH 00/20] staging: rtl8192u: r8192U_core: fix all checkpatch.pl reports Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
[PATCH 19/20] staging: rtl8192u: r8192U_core: fix use ether_addr_copy() over memcpy() code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
[PATCH 11/20] staging: rtl8192u: r8192U_core: fix unecessary braces code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
[PATCH 06/20] staging: rtl8192u: r8192U_core: fix missing struct leading to consistent spacing code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
Re: [PATCH 06/20] staging: rtl8192u: r8192U_core: fix missing struct leading to consistent spacing code style error Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-08-18 07:20 +0200
[PATCH 09/20] staging: rtl8192u: r8192U_core: include linux/uaccess.h instead of asm/uaccess.h Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
[PATCH 18/20] staging: rtl8192u: r8192U_core: fix quoted string split across lines code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
[PATCH 05/20] staging: rtl8192u: r8192U_core: fix else following close brace code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
[PATCH 15/20] staging: rtl8192u: r8192U_core: fix unnecessary else after return code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
[PATCH 12/20] staging: rtl8192u: r8192U_core: fix externs in .c file code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
Re: [PATCH 12/20] staging: rtl8192u: r8192U_core: fix externs in .c file code style issue Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-08-18 07:40 +0200
Re: [PATCH 12/20] staging: rtl8192u: r8192U_core: fix externs in .c file code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 07:50 +0200
[PATCH 17/20] staging: rtl8192u: r8192U_core: fix missing blank line after declarations code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
[PATCH 14/20] staging: rtl8192u: r8192U_core: fix unnecessary parentheses code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
[PATCH 02/20] staging: rtl8192u: r8192U_core: fix consistent spacing code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
Re: [PATCH 02/20] staging: rtl8192u: r8192U_core: fix consistent spacing code style error Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-08-18 07:10 +0200
Re: [PATCH 02/20] staging: rtl8192u: r8192U_core: fix consistent spacing code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 07:40 +0200
Re: [PATCH 02/20] staging: rtl8192u: r8192U_core: fix consistent spacing code style error Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-08-18 07:50 +0200
Re: [PATCH 02/20] staging: rtl8192u: r8192U_core: fix consistent spacing code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 08:10 +0200
Re: [PATCH 02/20] staging: rtl8192u: r8192U_core: fix consistent spacing code style error Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-08-18 08:20 +0200
[PATCH 04/20] staging: rtl8192u: r8192U_core: fix code indent using spaces code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:50 +0200
Re: [PATCH 07/20] staging: rtl8192u: r8192_core: whitespace neatening Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-08-18 07:30 +0200
[PATCHv2 00/19] staging: rtl8192u: r8192U_core: fix all checkpatch.pl reports Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:00 +0200
[PATCHv2 17/19] staging: rtl8192u: r8192U_core: fix quoted string split across lines code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:00 +0200
[PATCHv2 03/19] staging: rtl8192u: r8192U_core: fix code indent using spaces code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:00 +0200
[PATCHv2 08/19] staging: rtl8192u: r8192U_core: include linux/uaccess.h instead of asm/uaccess.h Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:00 +0200
[PATCHv2 01/19] staging: rtl8192u: r8192U_core: fix switch and case indent code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:00 +0200
[PATCHv2 18/19] staging: rtl8192u: r8192U_core: fix use ether_addr_copy() over memcpy() code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:00 +0200
[PATCHv2 16/19] staging: rtl8192u: r8192U_core: fix missing blank line after declarations code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:00 +0200
[PATCHv2 14/19] staging: rtl8192u: r8192U_core: fix unnecessary else after return code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:10 +0200
[PATCHv2 09/19] staging: rtl8192u: r8192U_core: remove return statement of void function Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:10 +0200
[PATCHv2 02/19] staging: rtl8192u: r8192U_core: fix space before close parenthesis code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:10 +0200
[PATCHv2 11/19] staging: rtl8192u: r8192U_core: remove forward declarations in .c file Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:10 +0200
[PATCHv2 15/19] staging: rtl8192u: r8192U_core: fix unnecessary whitespace code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:10 +0200
[PATCHv2 04/19] staging: rtl8192u: r8192U_core: fix else following close brace code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:10 +0200
[PATCHv2 05/19] staging: rtl8192u: r8192U_core: fix missing struct leading to consistent spacing code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:10 +0200
Re: [PATCHv2 19/19] staging: rtl8192u: r8192U_core: fix line over 80 characters code style issue Dan Carpenter <dan.carpenter@oracle.com> - 2015-08-19 13:00 +0200
Page 2 of 2 — ← Prev page 1 [2]
| From | Raphaël Beamonte <raphael.beamonte@gmail.com> |
|---|---|
| Date | 2015-08-16 03:50 +0200 |
| Subject | [PATCH 04/20] staging: rtl8192u: r8192U_core: fix code indent using spaces code style error |
| Message-ID | <pXVfb-2jY-3@gated-at.bofh.it> |
| In reply to | #1208175 |
Fix code indent should use tabs where possible code style error
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
---
drivers/staging/rtl8192u/r8192U_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 1eaaa7a..fe92021 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -1542,7 +1542,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
tx_fwinfo->RtsSubcarrier = (tx_fwinfo->RtsHT == 0) ? (tcb_desc->RTSSC) : 0;
tx_fwinfo->RtsBandwidth = (tx_fwinfo->RtsHT == 1) ? ((tcb_desc->bRTSBW) ? 1 : 0) : 0;
tx_fwinfo->RtsShort = (tx_fwinfo->RtsHT == 0) ? (tcb_desc->bRTSUseShortPreamble ? 1 : 0) :
- (tcb_desc->bRTSUseShortGI ? 1 : 0);
+ (tcb_desc->bRTSUseShortGI ? 1 : 0);
/* Set Bandwidth and sub-channel settings. */
if (priv->CurrentChannelBW == HT_CHANNEL_WIDTH_20_40) {
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| Date | 2015-08-18 07:30 +0200 |
| Subject | Re: [PATCH 07/20] staging: rtl8192u: r8192_core: whitespace neatening |
| Message-ID | <pYHDc-54g-3@gated-at.bofh.it> |
| In reply to | #1208175 |
On Sat, Aug 15, 2015 at 09:34:03PM -0400, Raphaël Beamonte wrote: > Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com> > --- <snip> > @@ -2182,30 +2182,30 @@ static void rtl8192_init_priv_variable(struct net_device *dev) > priv->EarlyRxThreshold = 7; > priv->enable_gpio0 = 0; > priv->TransmitConfig = > - (TCR_MXDMA_2048<<TCR_MXDMA_OFFSET) | // Max DMA Burst Size per Tx DMA Burst, 7: reserved. > - (priv->ShortRetryLimit<<TCR_SRL_OFFSET) | // Short retry limit > - (priv->LongRetryLimit<<TCR_LRL_OFFSET) | // Long retry limit > + (TCR_MXDMA_2048 << TCR_MXDMA_OFFSET) | // Max DMA Burst Size per Tx DMA Burst, 7: reserved. > + (priv->ShortRetryLimit << TCR_SRL_OFFSET) | // Short retry limit > + (priv->LongRetryLimit << TCR_LRL_OFFSET) | // Long retry limit > (false ? TCR_SAT : 0); // FALSE: HW provides PLCP length and LENGEXT, TRUE: SW provides them > #ifdef TO_DO_LIST > if (Adapter->bInHctTest) > pHalData->ReceiveConfig = pHalData->CSMethod | > - RCR_AMF | RCR_ADF | //accept management/data > + RCR_AMF | RCR_ADF | //accept management/data > //guangan200710 > - RCR_ACF | //accept control frame for SW AP needs PS-poll, 2005.07.07, by rcnjko. > - RCR_AB | RCR_AM | RCR_APM | //accept BC/MC/UC > - RCR_AICV | RCR_ACRC32 | //accept ICV/CRC error packet > - ((u32)7<<RCR_MXDMA_OFFSET) | // Max DMA Burst Size per Rx DMA Burst, 7: unlimited. > - (pHalData->EarlyRxThreshold<<RCR_FIFO_OFFSET) | // Rx FIFO Threshold, 7: No Rx threshold. > + RCR_ACF | //accept control frame for SW AP needs PS-poll, 2005.07.07, by rcnjko. > + RCR_AB | RCR_AM | RCR_APM | //accept BC/MC/UC > + RCR_AICV | RCR_ACRC32 | //accept ICV/CRC error packet > + ((u32)7 << RCR_MXDMA_OFFSET) | // Max DMA Burst Size per Tx DMA Burst, 7: reserved. looks like the comment has changed. copy paste error from previous lines? regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Raphaël Beamonte <raphael.beamonte@gmail.com> |
|---|---|
| Date | 2015-08-18 19:00 +0200 |
| Subject | [PATCHv2 00/19] staging: rtl8192u: r8192U_core: fix all checkpatch.pl reports |
| Message-ID | <pYSoW-3I8-13@gated-at.bofh.it> |
| In reply to | #1208175 |
Hi,
Here is an update of the patches fixing all the checkpatch warnings and
errors for the file drivers/staging/rtl8192u/r8192U_core.c, thanks to
Sudop Mukherjee's remarks and advices.
As a reminder, here is the checkpatch.pl tailed output before patches:
total: 334 errors, 402 warnings, 4909 lines checked
And after patches:
total: 0 errors, 0 warnings, 5379 lines checked
Please let me know if there is anything else I can do to improve these
patches!
Thanks,
Raphaël
Raphaël Beamonte (19):
staging: rtl8192u: r8192U_core: fix switch and case indent code style
error
staging: rtl8192u: r8192U_core: fix space before close parenthesis
code style error
staging: rtl8192u: r8192U_core: fix code indent using spaces code
style error
staging: rtl8192u: r8192U_core: fix else following close brace code
style error
staging: rtl8192u: r8192U_core: fix missing struct leading to
consistent spacing code style error
staging: rtl8192u: r8192U_core: whitespace neatening to fix consistent
spacing code style errors
staging: rtl8192u: r8192U_core: clean C99 // comments
staging: rtl8192u: r8192U_core: include linux/uaccess.h instead of
asm/uaccess.h
staging: rtl8192u: r8192U_core: remove return statement of void
function
staging: rtl8192u: r8192U_core: fix unecessary braces code style issue
staging: rtl8192u: r8192U_core: remove forward declarations in .c file
staging: rtl8192u: r8192U_core: fix unnecessary check before kfree
code style issue
staging: rtl8192u: r8192U_core: fix unnecessary parentheses code style
issue
staging: rtl8192u: r8192U_core: fix unnecessary else after return code
style issue
staging: rtl8192u: r8192U_core: fix unnecessary whitespace code style
issue
staging: rtl8192u: r8192U_core: fix missing blank line after
declarations code style issue
staging: rtl8192u: r8192U_core: fix quoted string split across lines
code style issue
staging: rtl8192u: r8192U_core: fix use ether_addr_copy() over
memcpy() code style issue
staging: rtl8192u: r8192U_core: fix line over 80 characters code style
issue
drivers/staging/rtl8192u/r8192U.h | 4 +-
drivers/staging/rtl8192u/r8192U_core.c | 2262 +++++++++++++++++++-------------
2 files changed, 1368 insertions(+), 898 deletions(-)
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Raphaël Beamonte <raphael.beamonte@gmail.com> |
|---|---|
| Date | 2015-08-18 19:00 +0200 |
| Subject | [PATCHv2 17/19] staging: rtl8192u: r8192U_core: fix quoted string split across lines code style issue |
| Message-ID | <pYSoX-3I8-29@gated-at.bofh.it> |
| In reply to | #1209369 |
Quoted strings should not be split to help text grep in the source.
All quoted strings that were split have thus been merged to one unique
quoted string each to follow the code style.
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
---
drivers/staging/rtl8192u/r8192U_core.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 88b11e8..76255cb 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -611,8 +611,8 @@ static void rtl8192_proc_init_one(struct net_device *dev)
for (f = rtl8192_proc_files; f->name[0]; f++) {
if (!proc_create_data(f->name, S_IFREG | S_IRUGO, dir,
&rtl8192_proc_fops, f->show)) {
- RT_TRACE(COMP_ERR, "Unable to initialize "
- "/proc/net/rtl8192/%s/%s\n",
+ RT_TRACE(COMP_ERR,
+ "Unable to initialize /proc/net/rtl8192/%s/%s\n",
dev->name, f->name);
return;
}
@@ -1884,8 +1884,8 @@ static int rtl8192_qos_handle_probe_response(struct r8192_priv *priv,
network->qos_data.old_param_count =
network->qos_data.param_count;
queue_work(priv->priv_wq, &priv->qos_activate);
- RT_TRACE(COMP_QOS, "QoS parameters change call "
- "qos_activate\n");
+ RT_TRACE(COMP_QOS,
+ "QoS parameters change call qos_activate\n");
}
} else {
memcpy(&priv->ieee80211->current_network.qos_data.parameters,
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Raphaël Beamonte <raphael.beamonte@gmail.com> |
|---|---|
| Date | 2015-08-18 19:00 +0200 |
| Subject | [PATCHv2 03/19] staging: rtl8192u: r8192U_core: fix code indent using spaces code style error |
| Message-ID | <pYSoW-3I8-27@gated-at.bofh.it> |
| In reply to | #1209369 |
Fix "code indent should use tabs where possible" checkpatch error
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
---
drivers/staging/rtl8192u/r8192U_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 6137a04..3c20731 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -1542,7 +1542,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
tx_fwinfo->RtsSubcarrier = (tx_fwinfo->RtsHT == 0) ? (tcb_desc->RTSSC) : 0;
tx_fwinfo->RtsBandwidth = (tx_fwinfo->RtsHT == 1) ? ((tcb_desc->bRTSBW) ? 1 : 0) : 0;
tx_fwinfo->RtsShort = (tx_fwinfo->RtsHT == 0) ? (tcb_desc->bRTSUseShortPreamble ? 1 : 0) :
- (tcb_desc->bRTSUseShortGI ? 1 : 0);
+ (tcb_desc->bRTSUseShortGI ? 1 : 0);
/* Set Bandwidth and sub-channel settings. */
if (priv->CurrentChannelBW == HT_CHANNEL_WIDTH_20_40) {
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Raphaël Beamonte <raphael.beamonte@gmail.com> |
|---|---|
| Date | 2015-08-18 19:00 +0200 |
| Subject | [PATCHv2 08/19] staging: rtl8192u: r8192U_core: include linux/uaccess.h instead of asm/uaccess.h |
| Message-ID | <pYSoX-3I8-37@gated-at.bofh.it> |
| In reply to | #1209369 |
Use #include <linux/uaccess.h> instead of <asm/uaccess.h> Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com> --- drivers/staging/rtl8192u/r8192U_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 9a658b4..2ab0a98 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -58,7 +58,7 @@ double __extendsfdf2(float a) #define CONFIG_RTL8192_IO_MAP -#include <asm/uaccess.h> +#include <linux/uaccess.h> #include "r8192U_hw.h" #include "r8192U.h" #include "r8190_rtl8256.h" /* RTL8225 Radio frontend */ -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Raphaël Beamonte <raphael.beamonte@gmail.com> |
|---|---|
| Date | 2015-08-18 19:00 +0200 |
| Subject | [PATCHv2 01/19] staging: rtl8192u: r8192U_core: fix switch and case indent code style error |
| Message-ID | <pYSoX-3I8-39@gated-at.bofh.it> |
| In reply to | #1209369 |
Some switch and case were not be at the same indent level.
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
---
drivers/staging/rtl8192u/r8192U_core.c | 190 ++++++++++++++++-----------------
1 file changed, 95 insertions(+), 95 deletions(-)
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 6f6fe38..915493d 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -3536,107 +3536,107 @@ static u8 HwRateToMRate90(bool bIsHT, u8 rate)
if (!bIsHT) {
switch (rate) {
- case DESC90_RATE1M:
- ret_rate = MGN_1M;
- break;
- case DESC90_RATE2M:
- ret_rate = MGN_2M;
- break;
- case DESC90_RATE5_5M:
- ret_rate = MGN_5_5M;
- break;
- case DESC90_RATE11M:
- ret_rate = MGN_11M;
- break;
- case DESC90_RATE6M:
- ret_rate = MGN_6M;
- break;
- case DESC90_RATE9M:
- ret_rate = MGN_9M;
- break;
- case DESC90_RATE12M:
- ret_rate = MGN_12M;
- break;
- case DESC90_RATE18M:
- ret_rate = MGN_18M;
- break;
- case DESC90_RATE24M:
- ret_rate = MGN_24M;
- break;
- case DESC90_RATE36M:
- ret_rate = MGN_36M;
- break;
- case DESC90_RATE48M:
- ret_rate = MGN_48M;
- break;
- case DESC90_RATE54M:
- ret_rate = MGN_54M;
- break;
+ case DESC90_RATE1M:
+ ret_rate = MGN_1M;
+ break;
+ case DESC90_RATE2M:
+ ret_rate = MGN_2M;
+ break;
+ case DESC90_RATE5_5M:
+ ret_rate = MGN_5_5M;
+ break;
+ case DESC90_RATE11M:
+ ret_rate = MGN_11M;
+ break;
+ case DESC90_RATE6M:
+ ret_rate = MGN_6M;
+ break;
+ case DESC90_RATE9M:
+ ret_rate = MGN_9M;
+ break;
+ case DESC90_RATE12M:
+ ret_rate = MGN_12M;
+ break;
+ case DESC90_RATE18M:
+ ret_rate = MGN_18M;
+ break;
+ case DESC90_RATE24M:
+ ret_rate = MGN_24M;
+ break;
+ case DESC90_RATE36M:
+ ret_rate = MGN_36M;
+ break;
+ case DESC90_RATE48M:
+ ret_rate = MGN_48M;
+ break;
+ case DESC90_RATE54M:
+ ret_rate = MGN_54M;
+ break;
- default:
- ret_rate = 0xff;
- RT_TRACE(COMP_RECV, "HwRateToMRate90(): Non supported Rate [%x], bIsHT = %d!!!\n", rate, bIsHT);
- break;
+ default:
+ ret_rate = 0xff;
+ RT_TRACE(COMP_RECV, "HwRateToMRate90(): Non supported Rate [%x], bIsHT = %d!!!\n", rate, bIsHT);
+ break;
}
} else {
switch (rate) {
- case DESC90_RATEMCS0:
- ret_rate = MGN_MCS0;
- break;
- case DESC90_RATEMCS1:
- ret_rate = MGN_MCS1;
- break;
- case DESC90_RATEMCS2:
- ret_rate = MGN_MCS2;
- break;
- case DESC90_RATEMCS3:
- ret_rate = MGN_MCS3;
- break;
- case DESC90_RATEMCS4:
- ret_rate = MGN_MCS4;
- break;
- case DESC90_RATEMCS5:
- ret_rate = MGN_MCS5;
- break;
- case DESC90_RATEMCS6:
- ret_rate = MGN_MCS6;
- break;
- case DESC90_RATEMCS7:
- ret_rate = MGN_MCS7;
- break;
- case DESC90_RATEMCS8:
- ret_rate = MGN_MCS8;
- break;
- case DESC90_RATEMCS9:
- ret_rate = MGN_MCS9;
- break;
- case DESC90_RATEMCS10:
- ret_rate = MGN_MCS10;
- break;
- case DESC90_RATEMCS11:
- ret_rate = MGN_MCS11;
- break;
- case DESC90_RATEMCS12:
- ret_rate = MGN_MCS12;
- break;
- case DESC90_RATEMCS13:
- ret_rate = MGN_MCS13;
- break;
- case DESC90_RATEMCS14:
- ret_rate = MGN_MCS14;
- break;
- case DESC90_RATEMCS15:
- ret_rate = MGN_MCS15;
- break;
- case DESC90_RATEMCS32:
- ret_rate = 0x80|0x20;
- break;
+ case DESC90_RATEMCS0:
+ ret_rate = MGN_MCS0;
+ break;
+ case DESC90_RATEMCS1:
+ ret_rate = MGN_MCS1;
+ break;
+ case DESC90_RATEMCS2:
+ ret_rate = MGN_MCS2;
+ break;
+ case DESC90_RATEMCS3:
+ ret_rate = MGN_MCS3;
+ break;
+ case DESC90_RATEMCS4:
+ ret_rate = MGN_MCS4;
+ break;
+ case DESC90_RATEMCS5:
+ ret_rate = MGN_MCS5;
+ break;
+ case DESC90_RATEMCS6:
+ ret_rate = MGN_MCS6;
+ break;
+ case DESC90_RATEMCS7:
+ ret_rate = MGN_MCS7;
+ break;
+ case DESC90_RATEMCS8:
+ ret_rate = MGN_MCS8;
+ break;
+ case DESC90_RATEMCS9:
+ ret_rate = MGN_MCS9;
+ break;
+ case DESC90_RATEMCS10:
+ ret_rate = MGN_MCS10;
+ break;
+ case DESC90_RATEMCS11:
+ ret_rate = MGN_MCS11;
+ break;
+ case DESC90_RATEMCS12:
+ ret_rate = MGN_MCS12;
+ break;
+ case DESC90_RATEMCS13:
+ ret_rate = MGN_MCS13;
+ break;
+ case DESC90_RATEMCS14:
+ ret_rate = MGN_MCS14;
+ break;
+ case DESC90_RATEMCS15:
+ ret_rate = MGN_MCS15;
+ break;
+ case DESC90_RATEMCS32:
+ ret_rate = 0x80|0x20;
+ break;
- default:
- ret_rate = 0xff;
- RT_TRACE(COMP_RECV, "HwRateToMRate90(): Non supported Rate [%x], bIsHT = %d!!!\n", rate, bIsHT);
- break;
+ default:
+ ret_rate = 0xff;
+ RT_TRACE(COMP_RECV, "HwRateToMRate90(): Non supported Rate [%x], bIsHT = %d!!!\n", rate, bIsHT);
+ break;
}
}
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Raphaël Beamonte <raphael.beamonte@gmail.com> |
|---|---|
| Date | 2015-08-18 19:00 +0200 |
| Subject | [PATCHv2 18/19] staging: rtl8192u: r8192U_core: fix use ether_addr_copy() over memcpy() code style issue |
| Message-ID | <pYSoX-3I8-41@gated-at.bofh.it> |
| In reply to | #1209369 |
Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2) Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com> --- drivers/staging/rtl8192u/r8192U_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 76255cb..b143b36 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -3469,7 +3469,7 @@ static int r8192_set_mac_adr(struct net_device *dev, void *mac) down(&priv->wx_sem); - memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN); + ether_addr_copy(dev->dev_addr, addr->sa_data); schedule_work(&priv->reset_wq); up(&priv->wx_sem); -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Raphaël Beamonte <raphael.beamonte@gmail.com> |
|---|---|
| Date | 2015-08-18 19:00 +0200 |
| Subject | [PATCHv2 16/19] staging: rtl8192u: r8192U_core: fix missing blank line after declarations code style issue |
| Message-ID | <pYSoX-3I8-45@gated-at.bofh.it> |
| In reply to | #1209369 |
Adds whitespaces to separate the variables declarations and the
function content.
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
---
drivers/staging/rtl8192u/r8192U_core.c | 44 +++++++++++++++++++++++++++++++---
1 file changed, 41 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index b471b33..88b11e8 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -160,6 +160,7 @@ static void rtl819x_set_channel_map(u8 channel_plan, struct r8192_priv *priv)
{
int i, max_chan = -1, min_chan = -1;
struct ieee80211_device *ieee = priv->ieee80211;
+
switch (channel_plan) {
case COUNTRY_CODE_FCC:
case COUNTRY_CODE_IC:
@@ -428,6 +429,7 @@ static int proc_get_stats_ap(struct seq_file *m, void *v)
list_for_each_entry(target, &ieee->network_list, list) {
const char *wpa = "non_WPA";
+
if (target->wpa_ie_len > 0 || target->rsn_ie_len > 0)
wpa = "WPA";
@@ -674,6 +676,7 @@ void rtl8192_update_msr(struct net_device *dev)
void rtl8192_set_chan(struct net_device *dev, short ch)
{
struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
+
RT_TRACE(COMP_CH, "=====>%s()====ch:%d\n", __func__, ch);
priv->chan = ch;
@@ -879,8 +882,10 @@ static void rtl8192_rx_isr(struct urb *urb)
struct r8192_priv *priv = ieee80211_priv(dev);
int out_pipe = info->out_pipe;
int err;
+
if (!priv->up)
return;
+
if (unlikely(urb->status)) {
info->urb = NULL;
priv->stats.rxstaterr++;
@@ -1058,6 +1063,7 @@ static void rtl8192_config_rate(struct net_device *dev, u16 *rate_config)
struct r8192_priv *priv = ieee80211_priv(dev);
struct ieee80211_network *net;
u8 i = 0, basic_rate = 0;
+
net = &priv->ieee80211->current_network;
for (i = 0; i < net->rates_len; i++) {
@@ -1153,6 +1159,7 @@ static void rtl8192_update_cap(struct net_device *dev, u16 cap)
u32 tmp = 0;
struct r8192_priv *priv = ieee80211_priv(dev);
struct ieee80211_network *net = &priv->ieee80211->current_network;
+
priv->short_preamble = cap & WLAN_CAPABILITY_SHORT_PREAMBLE;
tmp = priv->basic_rate;
if (priv->short_preamble)
@@ -1161,6 +1168,7 @@ static void rtl8192_update_cap(struct net_device *dev, u16 cap)
if (net->mode & (IEEE_G | IEEE_N_24G)) {
u8 slot_time = 0;
+
if ((cap & WLAN_CAPABILITY_SHORT_SLOT) && (!priv->ieee80211->pHTInfo->bCurrentRT2RTLongSlotTime)) /* short slot time */
slot_time = SHORT_SLOT_TIME;
else /* long slot time */
@@ -1177,6 +1185,7 @@ static void rtl8192_net_update(struct net_device *dev)
struct ieee80211_network *net;
u16 BcnTimeCfg = 0, BcnCW = 6, BcnIFS = 0xf;
u16 rate_config = 0;
+
net = &priv->ieee80211->current_network;
rtl8192_config_rate(dev, &rate_config);
@@ -1490,6 +1499,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
int status;
struct urb *tx_urb = NULL, *tx_urb_zero = NULL;
unsigned int idx_pipe;
+
pend = atomic_read(&priv->tx_pending[tcb_desc->queue_index]);
/* we are locked here so the two atomic_read and inc are executed
* without interleaves
@@ -1616,6 +1626,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
*/
bool bSend0Byte = false;
u8 zero = 0;
+
if (udev->speed == USB_SPEED_HIGH) {
if (skb->len > 0 && skb->len % 512 == 0)
bSend0Byte = true;
@@ -1761,6 +1772,7 @@ static void rtl8192_link_change(struct net_device *dev)
{
struct r8192_priv *priv = ieee80211_priv(dev);
struct ieee80211_device *ieee = priv->ieee80211;
+
if (ieee->state == IEEE80211_LINKED) {
rtl8192_net_update(dev);
rtl8192_update_ratr_table(dev);
@@ -1774,6 +1786,7 @@ static void rtl8192_link_change(struct net_device *dev)
/*update timing params*/
if (ieee->iw_mode == IW_MODE_INFRA || ieee->iw_mode == IW_MODE_ADHOC) {
u32 reg = 0;
+
read_nic_dword(dev, RCR, ®);
if (priv->ieee80211->state == IEEE80211_LINKED)
priv->ReceiveConfig = reg |= RCR_CBSSID;
@@ -1959,6 +1972,7 @@ static int rtl8192_handle_assoc_response(struct net_device *dev,
struct ieee80211_network *network)
{
struct r8192_priv *priv = ieee80211_priv(dev);
+
rtl8192_qos_association_resp(priv, network);
return 0;
}
@@ -1971,6 +1985,7 @@ static void rtl8192_update_ratr_table(struct net_device *dev)
u8 *pMcsRate = ieee->dot11HTOperationalRateSet;
u32 ratr_value = 0;
u8 rate_index = 0;
+
rtl8192_config_rate(dev, (u16 *)(&ratr_value));
ratr_value |= (*(u16 *)(pMcsRate)) << 12;
switch (ieee->mode) {
@@ -2063,6 +2078,7 @@ static u8 rtl8192_getSupportedWireleeMode(struct net_device *dev)
{
struct r8192_priv *priv = ieee80211_priv(dev);
u8 ret = 0;
+
switch (priv->rf_chip) {
case RF_8225:
case RF_8256:
@@ -2117,6 +2133,7 @@ static void rtl8192_init_priv_variable(struct net_device *dev)
{
struct r8192_priv *priv = ieee80211_priv(dev);
u8 i;
+
priv->card_8192 = NIC_8192U;
priv->chan = 1; /* set to channel 1 */
priv->ieee80211->mode = WIRELESS_MODE_AUTO; /* SET AUTO */
@@ -2263,6 +2280,7 @@ static void rtl8192_get_eeprom_size(struct net_device *dev)
{
u16 curCR = 0;
struct r8192_priv *priv = ieee80211_priv(dev);
+
RT_TRACE(COMP_EPROM, "===========>%s()\n", __func__);
read_nic_word_E(dev, EPROM_CMD, &curCR);
RT_TRACE(COMP_EPROM, "read from Reg EPROM_CMD(%x):%x\n", EPROM_CMD, curCR);
@@ -2288,6 +2306,7 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
struct r8192_priv *priv = ieee80211_priv(dev);
u16 tmpValue = 0;
int i;
+
RT_TRACE(COMP_EPROM, "===========>%s()\n", __func__);
wEPROM_ID = eprom_read(dev, 0); /* first read EEPROM ID out; */
RT_TRACE(COMP_EPROM, "EEPROM ID is 0x%x\n", wEPROM_ID);
@@ -2317,8 +2336,10 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
priv->ChannelPlan = priv->eeprom_ChannelPlan;
if (bLoad_From_EEPOM) {
int i;
+
for (i = 0; i < 6; i += 2) {
u16 tmp = 0;
+
tmp = eprom_read(dev, (u16)((EEPROM_NODE_ADDRESS_BYTE_0 + i) >> 1));
*(u16 *)(&dev->dev_addr[i]) = tmp;
}
@@ -2365,6 +2386,7 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
RT_TRACE(COMP_EPROM, "EEPROM_DEF_VER:%d\n", priv->EEPROM_Def_Ver);
if (priv->EEPROM_Def_Ver == 0) { /* old eeprom definition */
int i;
+
if (bLoad_From_EEPOM)
priv->EEPROMTxPowerLevelCCK = (eprom_read(dev, (EEPROM_TxPwIndex_CCK >> 1)) & 0xff) >> 8;
else
@@ -2499,6 +2521,7 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
static short rtl8192_get_channel_map(struct net_device *dev)
{
struct r8192_priv *priv = ieee80211_priv(dev);
+
if (priv->ChannelPlan > COUNTRY_CODE_GLOBAL_DOMAIN) {
netdev_err(dev, "rtl8180_init: Error channel plan! Set to default.\n");
priv->ChannelPlan = 0;
@@ -2520,11 +2543,13 @@ static short rtl8192_init(struct net_device *dev)
{
int i = 0;
u8 queuetopipe[] = {3, 2, 1, 0, 4, 8, 7, 6, 5};
+
memcpy(priv->txqueue_to_outpipemap, queuetopipe, 9);
}
#else
{
u8 queuetopipe[] = {3, 2, 1, 0, 4, 4, 0, 4, 4};
+
memcpy(priv->txqueue_to_outpipemap, queuetopipe, 9);
}
#endif
@@ -2640,6 +2665,7 @@ static bool rtl8192_adapter_start(struct net_device *dev)
bool init_status = true;
u8 SECR_value = 0x0;
u8 tmp;
+
RT_TRACE(COMP_INIT, "====>%s()\n", __func__);
priv->Rf_Mode = RF_OP_By_SW_3wire;
/* for ASIC power on sequence */
@@ -2730,6 +2756,7 @@ static bool rtl8192_adapter_start(struct net_device *dev)
#define DEFAULT_EDCA 0x005e4332
{
int i;
+
for (i = 0; i < QOS_QUEUE_NUM; i++)
write_nic_dword(dev, WDCAPARA_ADD[i], DEFAULT_EDCA);
}
@@ -2800,6 +2827,7 @@ static bool rtl8192_adapter_start(struct net_device *dev)
if (priv->ResetProgress == RESET_TYPE_NORESET) {
/* if D or C cut */
u8 tmpvalue;
+
read_nic_byte(dev, 0x301, &tmpvalue);
if (tmpvalue == 0x03) {
priv->bDcut = true;
@@ -2813,6 +2841,7 @@ static bool rtl8192_adapter_start(struct net_device *dev)
if (priv->bDcut) {
u32 i, TempCCk;
u32 tmpRegA = rtl8192_QueryBBReg(dev, rOFDM0_XATxIQImbalance, bMaskDWord);
+
for (i = 0; i < TxBBGainTableLength; i++) {
if (tmpRegA == priv->txbbgain_table[i].txbbgain_value) {
priv->rfa_txpowertrackingindex = (u8)i;
@@ -2863,6 +2892,7 @@ static bool HalTxCheckStuck819xUsb(struct net_device *dev)
struct r8192_priv *priv = ieee80211_priv(dev);
u16 RegTxCounter;
bool bStuck = false;
+
read_nic_word(dev, 0x128, &RegTxCounter);
RT_TRACE(COMP_RESET, "%s():RegTxCounter is %d,TxCounter is %d\n", __func__, RegTxCounter, priv->TxCounter);
if (priv->TxCounter == RegTxCounter)
@@ -2908,6 +2938,7 @@ static bool HalRxCheckStuck819xUsb(struct net_device *dev)
struct r8192_priv *priv = ieee80211_priv(dev);
bool bStuck = false;
static u8 rx_chk_cnt;
+
read_nic_word(dev, 0x130, &RegRxCounter);
RT_TRACE(COMP_RESET, "%s(): RegRxCounter is %d,RxCounter is %d\n", __func__, RegRxCounter, priv->RxCounter);
/* If rssi is small, we should check rx for long time because of bad rx.
@@ -3271,6 +3302,7 @@ static void rtl819x_watchdog_wqcallback(struct work_struct *work)
static void watch_dog_timer_callback(unsigned long data)
{
struct r8192_priv *priv = ieee80211_priv((struct net_device *)data);
+
queue_delayed_work(priv->priv_wq, &priv->watch_dog_wq, 0);
mod_timer(&priv->watch_dog_timer, jiffies + MSECS(IEEE80211_WATCH_DOG_TIME));
}
@@ -3278,6 +3310,7 @@ static int _rtl8192_up(struct net_device *dev)
{
struct r8192_priv *priv = ieee80211_priv(dev);
int init_status = 0;
+
priv->up = 1;
priv->ieee80211->ieee_up = 1;
RT_TRACE(COMP_INIT, "Bringing up iface");
@@ -3306,6 +3339,7 @@ static int rtl8192_open(struct net_device *dev)
{
struct r8192_priv *priv = ieee80211_priv(dev);
int ret;
+
down(&priv->wx_sem);
ret = rtl8192_up(dev);
up(&priv->wx_sem);
@@ -3386,6 +3420,7 @@ void rtl8192_commit(struct net_device *dev)
{
struct r8192_priv *priv = ieee80211_priv(dev);
int reset_status = 0;
+
if (priv->up == 0)
return;
priv->up = 0;
@@ -3714,6 +3749,7 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
struct rtl_80211_hdr_3addr *hdr;
u16 sc;
unsigned int frag, seq;
+
hdr = (struct rtl_80211_hdr_3addr *)buffer;
sc = le16_to_cpu(hdr->seq_ctl);
frag = WLAN_GET_SEQ_FRAG(sc);
@@ -4404,6 +4440,7 @@ static void query_rxdesc_status(struct sk_buff *skb,
/* TODO */
if (!stats->bHwError) {
u8 ret_rate;
+
ret_rate = HwRateToMRate90(driver_info->RxHT, driver_info->RxRate);
if (ret_rate == 0xff) {
/* Abnormal Case: Receive CRC OK packet with Rx
@@ -4642,6 +4679,7 @@ static int rtl8192_usb_probe(struct usb_interface *intf,
struct r8192_priv *priv = NULL;
struct usb_device *udev = interface_to_usbdev(intf);
int ret;
+
RT_TRACE(COMP_INIT, "Oops: i'm coming\n");
dev = alloc_ieee80211(sizeof(struct r8192_priv));
@@ -4716,10 +4754,9 @@ static void rtl8192_cancel_deferred_work(struct r8192_priv *priv)
static void rtl8192_usb_disconnect(struct usb_interface *intf)
{
struct net_device *dev = usb_get_intfdata(intf);
-
struct r8192_priv *priv = ieee80211_priv(dev);
- if (dev) {
+ if (dev) {
unregister_netdev(dev);
RT_TRACE(COMP_DOWN, "=============>wlan driver to be removed\n");
@@ -4731,7 +4768,6 @@ static void rtl8192_usb_disconnect(struct usb_interface *intf)
rtl8192_usb_deleteendpoints(dev);
destroy_workqueue(priv->priv_wq);
mdelay(10);
-
}
free_ieee80211(dev);
RT_TRACE(COMP_DOWN, "wlan driver removed\n");
@@ -4808,6 +4844,7 @@ void EnableHWSecurityConfig8192(struct net_device *dev)
u8 SECR_value = 0x0;
struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
struct ieee80211_device *ieee = priv->ieee80211;
+
SECR_value = SCR_TxEncEnable | SCR_RxDecEnable;
if (((KEY_TYPE_WEP40 == ieee->pairwise_key_type) || (KEY_TYPE_WEP104 == ieee->pairwise_key_type)) && (priv->ieee80211->auth_mode != 2)) {
SECR_value |= SCR_RxUseDK;
@@ -4842,6 +4879,7 @@ void setKey(struct net_device *dev, u8 EntryNo, u8 KeyIndex, u16 KeyType,
u32 TargetContent = 0;
u16 usConfig = 0;
u8 i;
+
if (EntryNo >= TOTAL_CAM_ENTRY)
RT_TRACE(COMP_ERR, "cam entry exceeds in setKey()\n");
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Raphaël Beamonte <raphael.beamonte@gmail.com> |
|---|---|
| Date | 2015-08-18 19:10 +0200 |
| Subject | [PATCHv2 14/19] staging: rtl8192u: r8192U_core: fix unnecessary else after return code style issue |
| Message-ID | <pYSyB-48R-3@gated-at.bofh.it> |
| In reply to | #1209369 |
An else statement is not useful after a return.
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
---
drivers/staging/rtl8192u/r8192U_core.c | 31 ++++++++++++++-----------------
1 file changed, 14 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 88108fb..21173b1 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -988,8 +988,6 @@ static int rtl8192_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
skb_push(skb, USB_HWDESC_HEADER_LEN);
rtl819xU_tx_cmd(dev, skb);
ret = 1;
- spin_unlock_irqrestore(&priv->tx_lock, flags);
- return ret;
} else {
skb_push(skb, priv->ieee80211->tx_headroom);
ret = rtl8192_tx(dev, skb);
@@ -1300,12 +1298,11 @@ short rtl819xU_tx_cmd(struct net_device *dev, struct sk_buff *skb)
status = usb_submit_urb(tx_urb, GFP_ATOMIC);
- if (!status) {
+ if (!status)
return 0;
- } else {
- DMESGE("Error TX CMD URB, error %d", status);
- return -1;
- }
+
+ DMESGE("Error TX CMD URB, error %d", status);
+ return -1;
}
/*
@@ -1644,11 +1641,11 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
dev->trans_start = jiffies;
atomic_inc(&priv->tx_pending[tcb_desc->queue_index]);
return 0;
- } else {
- RT_TRACE(COMP_ERR, "Error TX URB %d, error %d", atomic_read(&priv->tx_pending[tcb_desc->queue_index]),
- status);
- return -1;
}
+
+ RT_TRACE(COMP_ERR, "Error TX URB %d, error %d", atomic_read(&priv->tx_pending[tcb_desc->queue_index]),
+ status);
+ return -1;
}
static short rtl8192_usb_initendpoints(struct net_device *dev)
@@ -2924,20 +2921,20 @@ static bool HalRxCheckStuck819xUsb(struct net_device *dev)
(priv->CurrentChannelBW == HT_CHANNEL_WIDTH_20 && priv->undecorated_smoothed_pwdb >= RateAdaptiveTH_Low_20M))) {
if (rx_chk_cnt < 2)
return bStuck;
- else
- rx_chk_cnt = 0;
+
+ rx_chk_cnt = 0;
} else if (((priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20 && priv->undecorated_smoothed_pwdb < RateAdaptiveTH_Low_40M) ||
(priv->CurrentChannelBW == HT_CHANNEL_WIDTH_20 && priv->undecorated_smoothed_pwdb < RateAdaptiveTH_Low_20M)) &&
priv->undecorated_smoothed_pwdb >= VeryLowRSSI) {
if (rx_chk_cnt < 4)
return bStuck;
- else
- rx_chk_cnt = 0;
+
+ rx_chk_cnt = 0;
} else {
if (rx_chk_cnt < 8)
return bStuck;
- else
- rx_chk_cnt = 0;
+
+ rx_chk_cnt = 0;
}
if (priv->RxCounter == RegRxCounter)
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Raphaël Beamonte <raphael.beamonte@gmail.com> |
|---|---|
| Date | 2015-08-18 19:10 +0200 |
| Subject | [PATCHv2 09/19] staging: rtl8192u: r8192U_core: remove return statement of void function |
| Message-ID | <pYSyB-48R-5@gated-at.bofh.it> |
| In reply to | #1209369 |
void function return statement was not useful in this case.
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
---
drivers/staging/rtl8192u/r8192U_core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 2ab0a98..90c5907 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -1481,7 +1481,6 @@ static u8 QueryIsShort(u8 TxHT, u8 TxRate, cb_desc *tcb_desc)
static void tx_zero_isr(struct urb *tx_urb)
{
- return;
}
/*
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Raphaël Beamonte <raphael.beamonte@gmail.com> |
|---|---|
| Date | 2015-08-18 19:10 +0200 |
| Subject | [PATCHv2 02/19] staging: rtl8192u: r8192U_core: fix space before close parenthesis code style error |
| Message-ID | <pYSyB-48R-17@gated-at.bofh.it> |
| In reply to | #1209369 |
A space existed before the close parenthesis of an if statement. This patch
removes it to follow the kernel code style.
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
---
drivers/staging/rtl8192u/r8192U_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 915493d..6137a04 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -3221,7 +3221,7 @@ static void rtl819x_watchdog_wqcallback(struct work_struct *work)
//to get busy traffic condition
if (ieee->state == IEEE80211_LINKED) {
if (ieee->LinkDetectInfo.NumRxOkInPeriod > 666 ||
- ieee->LinkDetectInfo.NumTxOkInPeriod > 666 ) {
+ ieee->LinkDetectInfo.NumTxOkInPeriod > 666) {
bBusyTraffic = true;
}
ieee->LinkDetectInfo.NumRxOkInPeriod = 0;
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Raphaël Beamonte <raphael.beamonte@gmail.com> |
|---|---|
| Date | 2015-08-18 19:10 +0200 |
| Subject | [PATCHv2 11/19] staging: rtl8192u: r8192U_core: remove forward declarations in .c file |
| Message-ID | <pYSyB-48R-15@gated-at.bofh.it> |
| In reply to | #1209369 |
Checkpatch was giving a "externs should be avoided in .c files" because
of these forward declarations. As these were not useful in this case,
they have been removed.
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
---
drivers/staging/rtl8192u/r8192U_core.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 4425335..cd14c0a 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -1000,9 +1000,6 @@ static int rtl8192_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
return ret;
}
-
-void rtl8192_try_wake_queue(struct net_device *dev, int pri);
-
static void rtl8192_tx_isr(struct urb *tx_urb)
{
struct sk_buff *skb = (struct sk_buff *)tx_urb->context;
@@ -1223,9 +1220,6 @@ inline u8 rtl8192_IsWirelessBMode(u16 rate)
return 0;
}
-u16 N_DBPSOfRate(u16 DataRate);
-
-
u16 N_DBPSOfRate(u16 DataRate)
{
u16 N_DBPS = 24;
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Raphaël Beamonte <raphael.beamonte@gmail.com> |
|---|---|
| Date | 2015-08-18 19:10 +0200 |
| Subject | [PATCHv2 15/19] staging: rtl8192u: r8192U_core: fix unnecessary whitespace code style issue |
| Message-ID | <pYSyC-48R-31@gated-at.bofh.it> |
| In reply to | #1209369 |
Whitespaces are not necessary before a quoted newline. Remove those.
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
---
drivers/staging/rtl8192u/r8192U_core.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 21173b1..b471b33 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -1350,7 +1350,7 @@ static u8 MapHwQueueToFirmwareQueue(u8 QueueID)
break;
default:
- RT_TRACE(COMP_ERR, "TransmitTCB(): Impossible Queue Selection: %d \n", QueueID);
+ RT_TRACE(COMP_ERR, "TransmitTCB(): Impossible Queue Selection: %d\n", QueueID);
break;
}
return QueueSelect;
@@ -1880,7 +1880,7 @@ static int rtl8192_qos_handle_probe_response(struct r8192_priv *priv,
if ((network->qos_data.active == 1) && (active_network == 1)) {
queue_work(priv->priv_wq, &priv->qos_activate);
- RT_TRACE(COMP_QOS, "QoS was disabled call qos_activate \n");
+ RT_TRACE(COMP_QOS, "QoS was disabled call qos_activate\n");
}
network->qos_data.active = 0;
network->qos_data.supported = 0;
@@ -2895,7 +2895,7 @@ static RESET_TYPE TxCheckStuck(struct net_device *dev)
}
if (bCheckFwTxCnt) {
if (HalTxCheckStuck819xUsb(dev)) {
- RT_TRACE(COMP_RESET, "TxCheckStuck(): Fw indicates no Tx condition! \n");
+ RT_TRACE(COMP_RESET, "TxCheckStuck(): Fw indicates no Tx condition!\n");
return RESET_TYPE_SILENT;
}
}
@@ -3032,7 +3032,7 @@ static void CamRestoreAllEntry(struct net_device *dev)
static u8 CAM_CONST_BROAD[] = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
- RT_TRACE(COMP_SEC, "CamRestoreAllEntry: \n");
+ RT_TRACE(COMP_SEC, "CamRestoreAllEntry:\n");
if ((priv->ieee80211->pairwise_key_type == KEY_TYPE_WEP40) ||
@@ -3107,7 +3107,7 @@ static void rtl819x_ifsilentreset(struct net_device *dev)
if (priv->ResetProgress == RESET_TYPE_NORESET) {
RESET_START:
- RT_TRACE(COMP_RESET, "=========>Reset progress!! \n");
+ RT_TRACE(COMP_RESET, "=========>Reset progress!!\n");
/* Set the variable for reset. */
priv->ResetProgress = RESET_TYPE_SILENT;
@@ -3783,7 +3783,7 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
((priv->stats.rx_rssi_percentage[rfpath] * (Rx_Smooth_Factor - 1)) +
(pprevious_stats->RxMIMOSignalStrength[rfpath])) / (Rx_Smooth_Factor);
}
- RT_TRACE(COMP_DBG, "priv->stats.rx_rssi_percentage[rfPath] = %d \n", priv->stats.rx_rssi_percentage[rfpath]);
+ RT_TRACE(COMP_DBG, "priv->stats.rx_rssi_percentage[rfPath] = %d\n", priv->stats.rx_rssi_percentage[rfpath]);
}
}
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Raphaël Beamonte <raphael.beamonte@gmail.com> |
|---|---|
| Date | 2015-08-18 19:10 +0200 |
| Subject | [PATCHv2 04/19] staging: rtl8192u: r8192U_core: fix else following close brace code style error |
| Message-ID | <pYSyC-48R-39@gated-at.bofh.it> |
| In reply to | #1209369 |
Fix "else should follow close brace" checkpatch error.
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
---
drivers/staging/rtl8192u/r8192U_core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 3c20731..bdb8e4f 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -2585,8 +2585,7 @@ static void rtl8192_hwconfig(struct net_device *dev)
regBwOpMode = BW_OPMODE_20MHZ;
regRATR = RATE_ALL_CCK | RATE_ALL_OFDM_AG;
regRRSR = RATE_ALL_CCK | RATE_ALL_OFDM_AG;
- }
- else
+ } else
#endif
{
regBwOpMode = BW_OPMODE_20MHZ;
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Raphaël Beamonte <raphael.beamonte@gmail.com> |
|---|---|
| Date | 2015-08-18 19:10 +0200 |
| Subject | [PATCHv2 05/19] staging: rtl8192u: r8192U_core: fix missing struct leading to consistent spacing code style error |
| Message-ID | <pYSyD-48R-45@gated-at.bofh.it> |
| In reply to | #1209369 |
A missing struct keyword in variable declaration triggered a
need consistent spacing around '*' code style error. The struct
keyword thus has been added everywhere for the rtl8192_rx_info
struct, and therefore its typedef removed as not needed anymore.
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
---
drivers/staging/rtl8192u/r8192U.h | 4 ++--
drivers/staging/rtl8192u/r8192U_core.c | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
index 785fd02..a76748e 100644
--- a/drivers/staging/rtl8192u/r8192U.h
+++ b/drivers/staging/rtl8192u/r8192U.h
@@ -335,11 +335,11 @@ typedef struct _tx_fwinfo_819x_usb {
u32 PacketID:13;
} tx_fwinfo_819x_usb, *ptx_fwinfo_819x_usb;
-typedef struct rtl8192_rx_info {
+struct rtl8192_rx_info {
struct urb *urb;
struct net_device *dev;
u8 out_pipe;
-} rtl8192_rx_info ;
+};
typedef struct rx_desc_819x_usb {
/* DOWRD 0 */
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index bdb8e4f..e786237 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -4191,7 +4191,7 @@ static void TranslateRxSignalStuff819xUsb(struct sk_buff *skb,
rx_drvinfo_819x_usb *pdrvinfo)
{
// TODO: We must only check packet for current MAC address. Not finish
- rtl8192_rx_info *info = (struct rtl8192_rx_info *)skb->cb;
+ struct rtl8192_rx_info *info = (struct rtl8192_rx_info *)skb->cb;
struct net_device *dev = info->dev;
struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
bool bpacket_match_bssid, bpacket_toself;
@@ -4379,7 +4379,7 @@ static void query_rxdesc_status(struct sk_buff *skb,
struct ieee80211_rx_stats *stats,
bool bIsRxAggrSubframe)
{
- rtl8192_rx_info *info = (struct rtl8192_rx_info *)skb->cb;
+ struct rtl8192_rx_info *info = (struct rtl8192_rx_info *)skb->cb;
struct net_device *dev = info->dev;
struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
rx_drvinfo_819x_usb *driver_info = NULL;
@@ -4470,7 +4470,7 @@ static void query_rxdesc_status(struct sk_buff *skb,
static void rtl8192_rx_nomal(struct sk_buff *skb)
{
- rtl8192_rx_info *info = (struct rtl8192_rx_info *)skb->cb;
+ struct rtl8192_rx_info *info = (struct rtl8192_rx_info *)skb->cb;
struct net_device *dev = info->dev;
struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
struct ieee80211_rx_stats stats = {
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Date | 2015-08-19 13:00 +0200 |
| Subject | Re: [PATCHv2 19/19] staging: rtl8192u: r8192U_core: fix line over 80 characters code style issue |
| Message-ID | <pZ9g6-3EV-17@gated-at.bofh.it> |
| In reply to | #1209369 |
On Tue, Aug 18, 2015 at 12:58:20PM -0400, Raphaël Beamonte wrote:
> Light code refactoring to keep the lines under 80 characters to follow
> the kernel code style.
>
The first patches seem fine but this one is too hard to review...
Divide it up somehow. Maybe:
patch #1: comments
patch #2: add line breaks
patch #3: add temporary variables
patch #4: reverse conditions
I have looked through this patch a little, and I am skepitcal of some
of these changes. Do they really improve readability?
- if (TempCCk == priv->cck_txbbgain_table[i].ccktxbb_valuearray[0]) {
- priv->cck_present_attentuation_20Mdefault = (u8)i;
- break;
- }
+ if (TempCCk !=
+ priv->cck_txbbgain_table[i].
+ ccktxbb_valuearray[0])
+ continue;
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | linux.kernel
csiph-web