Commit graph

59 commits

Author SHA1 Message Date
zhaoxiao
84b45d4ff9 staging: rtl8192e: replace comparison to NULL by bool
Fixed Comparison to NULL can be written as '!...' by replacing it with
simpler form i.e boolean expression. This makes code more readable alternative.
Reported by checkpatch.

Signed-off-by: zhaoxiao <zhaoxiao@uniontech.com>
Link: https://lore.kernel.org/r/20210430125657.18264-1-zhaoxiao@uniontech.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:34 +02:00
Mitali Borkar
c567fb9da3 staging: rtl8192e: removed multiple blank lines
Removed multiple blank lines to make code better and neater.
Reported by checkpatch.

Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
Link: https://lore.kernel.org/r/2bfe551f152a611cc49a71a4984f41ef7ee69df5.1618380932.git.mitaliborkar810@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-14 10:30:55 +02:00
Mitali Borkar
e3a8607981 staging: rtl8192e: remove unnecessary blank line after close brace
Removed an extra blank line after close brace '{' as it was not
necessary.
Reported by checkpatch

Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
Link: https://lore.kernel.org/r/40f72a84750f402c342b4685e0a2f15d27875c9a.1618380932.git.mitaliborkar810@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-14 10:30:55 +02:00
Mitali Borkar
c7dabf1a45 staging: rtl8192e: remove unnecessary blank line before brace
Removed an extra blank line before close brace as it was not necessary.
Reported by checkpatch.

Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
Link: https://lore.kernel.org/r/cad6a7885f30dcfabaf1ccab1fd0644416fea194.1618380932.git.mitaliborkar810@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-14 10:30:55 +02:00
Mitali Borkar
3cc112a088 staging: rtl8192e: add spaces around binary operators
Added spaces around binary operators like '+', '*', '|', '-', '&',
to improve readability and to meet linux kernel coding style.

Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
Link: https://lore.kernel.org/r/28cbc4825fdfacf5d5ea8bb688a8bd6a1c65f059.1618380932.git.mitaliborkar810@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-14 10:30:54 +02:00
Mitali Borkar
cc444aa522 staging: rtl8192e: remove unnecessary ftrace-like logging
Removed unncessary ftrace-like logging by simply deleting that statement
as we have other modes of logging like ftrace.
Reported by checkpatch.

Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
Link: https://lore.kernel.org/r/460ba9cdd256bf1064c4e3a694caa046171cb60e.1618283232.git.mitaliborkar810@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-13 09:52:26 +02:00
William Durand
6628c6743f staging: rtl8192e: rename RT2RT_HT_Mode to rt2rt_ht_mode in bss_ht struct
Rename RT2RT_HT_Mode to rt2rt_ht_mode to silence a checkpatch warning
about CamelCase.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210220172909.15812-12-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10 09:25:30 +01:00
William Durand
fe403d4b7b staging: rtl8192e: rename bdRT2RTLongSlotTime to bd_rt2rt_long_slot_time in bss_ht struct
Rename bdRT2RTLongSlotTime to bd_rt2rt_long_slot_time to silence a
checkpatch warning about CamelCase.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210220172909.15812-11-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10 09:25:30 +01:00
William Durand
3f1f39fb6c staging: rtl8192e: rename bdRT2RTAggregation to bd_rt2rt_aggregation in bss_ht struct
Rename bdRT2RTAggregation to bd_rt2rt_aggregation to silence a
checkpatch warning about CamelCase.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210220172909.15812-10-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10 09:25:29 +01:00
William Durand
2fbcd6ded9 staging: rtl8192e: rename bdHTSpecVer to bd_ht_spec_ver in bss_ht struct
Rename bdHTSpecVer to bd_ht_spec_ver to silence a checkpatch warning
about CamelCase.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210220172909.15812-8-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10 09:25:29 +01:00
William Durand
060d3f6cb8 staging: rtl8192e: rename bdHTInfoLen to bd_ht_info_len in bss_ht struct
Rename bdHTInfoLen to bd_ht_info_len to silence a checkpatch warning
about CamelCase.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210220172909.15812-7-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10 09:25:29 +01:00
William Durand
2408ee9e3c staging: rtl8192e: rename bdHTInfoBuf to bd_ht_info_buf in bss_ht struct
Rename bdHTInfoBuf to bd_ht_info_buf to silence a checkpatch warning
about CamelCase.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210220172909.15812-6-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10 09:25:29 +01:00
William Durand
20e9063566 staging: rtl8192e: rename bdHTCapLen to bd_ht_cap_len in bss_ht struct
Rename bdHTCapLen to bd_ht_cap_len to silence a checkpatch warning about
CamelCase.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210220172909.15812-5-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10 09:25:29 +01:00
William Durand
b87b210833 staging: rtl8192e: rename bdHTCapBuf to bd_ht_cap_buf in bss_ht struct
Rename bdHTCapBuf to bd_ht_cap_buf to silence a checkpatch warning about
CamelCase.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210220172909.15812-4-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10 09:25:29 +01:00
William Durand
b3b55bd7fc staging: rtl8192e: rename bdSupportHT to bd_support_ht in bss_ht struct
Rename bdSupportHT to bd_support_ht to silence a checkpatch warning
about CamelCase.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210220172909.15812-3-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10 09:25:29 +01:00
Eduard Vintila
8b5b1b8193 staging: rtl8192e: Braces should be used on all arms of statement
Fixed a coding style issue by adding braces on all arms of an "if"
statement.

Signed-off-by: Eduard Vintila <eduard.vintila47@gmail.com>
Link: https://lore.kernel.org/r/20201109202016.79329-1-eduard.vintila47@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-11-13 15:34:07 +01:00
John Oldman
e785e87b65 staging: rtl8192e: Using comparison to true is error prone
clear below issues reported by checkpatch.pl:

CHECK: Using comparison to false is error prone

Signed-off-by: John Oldman <john.oldman@polehill.co.uk>
Link: https://lore.kernel.org/r/20200523172812.16473-1-john.oldman@polehill.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-27 10:16:33 +02:00
Derek Robson
b99692f4db staging: rtl8192e: style fix - Prefer using '"%s...", __func__'
Fixed checkpatch warnings, Prefer using '"%s...", __func__'

Signed-off-by: Derek Robson <robsonde@gmail.com>
Link: https://lore.kernel.org/r/20200202070243.112059-1-robsonde@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-09 16:22:58 -08:00
Greg Kroah-Hartman
18056f34c3 staging: rtl8192e: add proper SPDX identifiers on files that did not have them.
There were a few files for the rtl8192e driver that did not have SPDX
identifiers on them, so fix that up.  At the same time, remove the "free
form" text that specified the license of the file, as that is impossible
for any tool to properly parse.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03 11:10:17 +02:00
Malcolm Priestley
ad3cafd7b4 staging: rtl8192e: HTSetConnectBwMode message replace with debug.
The flag status of bCurBW40MHz is printed as info and is
only useful as debug message.

Replace with netdev_dbg in line with rest of driver.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15 13:29:01 +02:00
Gargi Sharma
24542a004b staging: rtl8192e: Remove useless parentheses
Parentheses are not needed on the right side of assignment.

Additionally added space around '+'and '*' to remove
checkpatch issue, space required around '+' and '*'.

Parentheses Removed using the coccinelle script:
@@
binary operator bop = {+,-,>>,<<};
expression e, e1, e2;
@@

e =
-(
        e1 bop e2
-)

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06 09:17:01 +01:00
Yamanappagouda Patil
839396f555 staging: rtl8192e: Fixed coding style wornings on Block comments.
Fixed checkpatch.pl warnings related to Block comments in
staging/rtl8192e/*.c files.

Signed-off-by: Yamanappagouda Patil <goudapatilk@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-15 11:01:54 +01:00
Mateusz Kulikowski
ae6d07a5d1 staging: rtl8192e: Fix FSF_MAILING_ADDRESS warnings
Remove FSF address from licenses at the beginning of files.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 04:26:06 +02:00
Mateusz Kulikowski
e0c84c1c1f staging: rtl8192e: rtllib_HTProc: Make functions static
Make as many functions as possible static in rtllib_HTProc.c.

The following functions were affected:
- HTMcsToDataRate
- HTFilterMCSRate

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:43:30 -07:00
Mateusz Kulikowski
bcf5b92d9b staging: rtl8192e: Remove rt_hi_throughput::ChnkOp
Field was initialized and never used.
This patch also removes chnl_op enum that was only
referenced by ChnkOp init code.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:35:01 -07:00
Mateusz Kulikowski
35e33b0468 staging: rtl8192e: Fix LONG_LINE warnings
Fix most of simple LONG_LINE warnings. None of the changes should affect
behaviour of code, so several modifications are included in this patch:
- Code is reindented where needed
- Local variable names are compacted (priv -> p)
- Unnecessary casts are removed
- Nested ifs are replaced with logical and
- a = b = c = d expressions are split
- Replace if/then series with clamp_t()
- Removed unneeded scopes

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:33:21 +09:00
Mateusz Kulikowski
7232141526 staging: rtl8192e: Remove RTLLIB_DEBUG_DATA()
Use print_hex_dump_bytes() if VERBOSE_DEBUG is enabled.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:32:02 +09:00
Mateusz Kulikowski
b94436b5d5 staging: rtl8192e: Remove RTLLIB_DEBUG()
- Use netdev_dbg or netdev_vdbg instead of RTLLIB_DEBUG()
- Reformat some messages for better readability
- Remove RTLLIB_DEBUG messages that make no sense

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:32:02 +09:00
Mateusz Kulikowski
11e672c3e2 staging: rtl8192e: Replace RTLLIB_DEBUG(DL_ERR) with netdev_*()
Replace all RTLLIB_DEBUG(RTLLIB_DL_ERR, *) calls with netdev_err()
for errors that really should be reported to user.
Use netdev_warn() for the rest.
Rephrase some of the messages to make them more readable/compact.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:32:00 +09:00
Mateusz Kulikowski
14b40d9288 staging: rtl8192e: Comment cleanup (style/format)
- Multiline comments use "network subsystem comment style"
- Merge short multiline comments
- Remove empty comments
- Remove function name comment at the end of small (<1 screen) functions
- Reformat 802.11 data frame format to use spaces and network format

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 15:29:31 +02:00
Mateusz Kulikowski
285b7c00e0 staging: rtl8192e: Fix UNNECESSARY_ELSE warning
Fix checkpatch warnings 'else is not generally useful after a break or return'

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 15:29:29 +02:00
Mateusz Kulikowski
0822339b52 staging: rtl8192e: fix coding style issues (merge broken strings)
Fix checkpatch.pl warnings:
- 'WARNING: quoted string split across lines'
- 'WARNING: break quoted strings at a space character'

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:13:58 +01:00
Cristina Opriceana
e623d0f3f9 Staging: rtl8192e: Remove unnecessary variables
This patch removes unnecessary intermediary variables in return lines
and uses actual values.
Found by coccinelle using this semantic patch:

@@ type T; expression expr; identifier r; @@

-T r = expr;
... when != r
    when strict
-return r;
+return expr;

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16 16:00:20 +01:00
Sudip Mukherjee
d40b62babc staging: rtl8192e: remove unused functions
removed some functions which were not being used anywhere.
build tested and also verified by git grep that there is no other
reference to these functions.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16 15:59:15 +01:00
Aya Mahfouz
be31fed4f9 staging: rtl8192e: rewrite the right hand side of an assignment
This patch rewrites the right hand side of an assignment for
expressions of the form:
a = (a <op> b);
to be:
a <op>= b;
where <op> = << | >>.

This issue was detected and resolved using the following
coccinelle script:

@@
identifier i;
expression e;
@@

-i = (i >> e);
+i >>= e;

@@
identifier i;
expression e;
@@

-i = (i << e);
+i <<= e;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 15:23:47 -08:00
Gangadhar Vukkesala
31f1c464bd staging: rtl8192e: fixed a space coding style issue
Fixed a space coding style issue in 3-dimensional array initialization
which was found when running checkpatch.pl script on rtl819x_HTProc.c.

Signed-off-by: Gangadhar Vukkesala <gangs.freelancer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 14:13:33 -08:00
Melike Yurtoglu
4dc5afdeff staging: rtl8192e: Fix void function return statements style
Fixes "void function return statements are not generally
useful"checkpatch.pl warning in rtl819x_HTProc.c

Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-02 11:56:43 -07:00
Mahati Chamarthy
4344672830 Staging: rtl8192e: Fix printk style warning
This fixes the following checkpatch.pl warnings:
WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:14:30 -07:00
Matthew Casey
3a6b70c3f3 staging: rtl8192e: fixed coding style issues
Fixed missing blank line after declarations issues

Signed-off-by: Matthew Casey <mdcasey@chabloom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 13:54:03 -07:00
Sean MacLennan
976d534118 rtl8192e: Rename clashing symbols
The "rtl8192e: Export symbols" patch exported three functions already
exported by the rtl8192u driver. This patch renames the three functions:
  Dot11d_Init => dot11d_init
  HTUpdateSelfAndPeerSetting => HT_update_self_and_peer_setting
  IsLegalChannel => rtllib_legal_channel

Signed-off-by: Sean MacLennan <seanm@seanm.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-30 14:16:42 -08:00
Sean MacLennan
3b28499c55 rtl8192e: Export symbols
The rtl8192e driver had a natural split between the more generic
rtllib code and the more specific rtl8192e code. This patch exports
all the symbols needed by the r8192 specific code from the rtllib
generic code.

Signed-off-by: Sean MacLennan <seanm@seanm.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-30 19:45:26 +09:00
Larry Finger
ec0dc6beea staging: rtl8192e: Fix sparse (non-endian) messages - Part I
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:36:34 -07:00
Larry Finger
831cb9db38 staging: rtl8192e: Cleanup checkpatch -f warnings and errors - Part V
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 10:05:10 -07:00
Larry Finger
bb9a7b3f23 staging: rtl8192e: Convert typedef RT_HT_CAPBILITY to enum rt_ht_capability
Remove typedef from enum.
Rename enum.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 10:52:23 -05:00
Larry Finger
b678bd1ff5 staging: rtl8192e: Convert typedef HT_EXTCHNL_OFFSET to enum ht_extchnl_offset
Remove typedef from enum.
Rename enum.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 10:49:30 -05:00
Larry Finger
6e579119b1 staging: rtl8192e: Convert typedef HT_CHANNEL_WIDTH to enum ht_channel_width
Remove typedef from enum.
Rename enum.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 10:49:01 -05:00
Larry Finger
e92b71d571 staging: rtl8192e: Convert typedef HT_CAPABILITY_ELE to struct ht_capab_ele
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 00:56:09 -05:00
Larry Finger
407e998e59 staging: rtl8192e: Convert typedef HT_INFORMATION_ELE to struct ht_info_ele
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 00:25:21 -05:00
Larry Finger
a15e76ad06 staging: rtl8192e: Convert typedef BSS_HT to struct bss_ht
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-23 23:17:13 -05:00
Larry Finger
7796d93eae staging: rtl8192e: Convert typedef RT_HIGH_THROUGHPUT to struct rt_hi_throughput
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-23 23:15:26 -05:00