History log of /linux-master/drivers/staging/rtl8192e/rtllib_wx.c
Revision Date Author Comments
# c41616e9 05-Jan-2024 Tree Davies <tdavies@darkphysics.net>

Staging: rtl8192e: Rename function SendDisassociation()

Rename function SendDisassociation to send_disassociation to fix checkpatch
warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Link: https://lore.kernel.org/r/20240106055556.430948-18-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 2e9b84b7 16-Dec-2023 Gary Rookard <garyrookard@fastmail.org>

staging: rtl8192e: rename variable HTGetHighestMCSRate

Coding style issue, checkpatch Avoid CamelCase,
rename it. HTGetHighestMCSRate -> ht_get_highest_mcs_rate

Signed-off-by: Gary Rookard <garyrookard@fastmail.org>
Link: https://lore.kernel.org/r/20231216125303.3404-4-garyrookard@fastmail.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# e2572686 18-Sep-2023 Philipp Hortmann <philipp.g.hortmann@gmail.com>

staging: rtl8192e: Fix compiler warning truncated writing of iwe.u.name

iwe.u.name and proto_name have both 16 bytes of space. But when writing
to iwe.u.name the first 10 bytes are used by the fixed string
"IEEE802.11". Evaluating the code shows that only the following strings
can occur in proto_name: "N-24G", "g", "b", "bg". Therefore it is
sufficient to shorten proto_name to 6 bytes.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202309171733.Gl96cmYd-lkp@intel.com/
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/2caafb8628880570725385e87150c47689474fc4.1695054044.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 32db98b9 19-Jun-2023 Michael Straube <straube.linux@gmail.com>

staging: rtl8192e: remove 5G related code

In previous patches we removed 5G code since the hardware that uses this
driver does not support 5G. There is still some 5G related code, remove it.
All the removed defines are unused and we can safely remove "N-5G" from the
rtllib_modes array.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230619155203.6039-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 2445e3a5 17-Jun-2023 Philipp Hortmann <philipp.g.hortmann@gmail.com>

staging: rtl8192e: Rename RTLLIB_LINKED to MAC80211_LINKED

Rename RTLLIB_LINKED to MAC80211_LINKED to align with rtlwifi driver.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/532bd98301657b2a8329e95eccb993540ae9ba3f.1687007788.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 52ac3ff9 17-Jun-2023 Philipp Hortmann <philipp.g.hortmann@gmail.com>

staging: rtl8192e: Rename state to link_state

Rename state to link_state to align with rtlwifi driver and to
increase readability as state is to general.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/9cf4d0b01c6a84a11939099b628754d4c6d54839.1687007788.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 5cac011c 17-Jun-2023 Philipp Hortmann <philipp.g.hortmann@gmail.com>

staging: rtl8192e: Rename constant IEEE_x to WIRELESS_MODE_x

Rename constant IEEE_B to WIRELESS_MODE_B, IEEE_G -> WIRELESS_MODE_G and
IEEE_N_24G -> WIRELESS_MODE_N_24G to align with rtlwifi driver as
requested in TODO.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/37d81ab3cbb0231868d75b11eaa2f65a0e6a9379.1687007788.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# ccffcebb 13-May-2023 Philipp Hortmann <philipp.g.hortmann@gmail.com>

staging: rtl8192e: Remove undefined function set_security

Remove function set_security as it is not defined.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/bdc9bc3a70ca2b5d86bdd2cb5c815d0b3c67972f.1683960684.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 42618f6f 13-May-2023 Philipp Hortmann <philipp.g.hortmann@gmail.com>

staging: rtl8192e: Remove undefined function reset_port

Remove function reset_port as it is not defined.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/faa1fa979b214f709012a8bd65debbcc2bb59049.1683960684.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 4f3db2e2 22-Mar-2023 Philipp Hortmann <philipp.g.hortmann@gmail.com>

staging: rtl8192e: Replace macro iwe_stream_add_point_rsl with standard function

Replace macro iwe_stream_add_point_rsl with standard function
iwe_stream_add_point to increase readability.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/563af664b3186e73d99f73a6396f8ebcd3c52be2.1679504314.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 27e99d03 22-Mar-2023 Philipp Hortmann <philipp.g.hortmann@gmail.com>

staging: rtl8192e: Replace macro iwe_stream_add_event_rsl with standard function

Replace macro iwe_stream_add_event_rsl with standard function
iwe_stream_add_event to increase readability.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/00a8057acc994c139530a070974694b999a8f96a.1679504314.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# bb5b5e21 03-Nov-2022 Larry Finger <Larry.Finger@lwfinger.net>

staging: rtl8192e: Fix divide fault when calculating beacon age

When the configuration parameter CONFIG_HZ is less that 100, the compiler
generates an error as follows:

../drivers/staging/rtl8192e/rtllib_wx.c: In function 'rtl819x_translate_scan':
../drivers/staging/rtl8192e/rtllib_wx.c:220:57: warning: division by zero [-Wdiv-by-zero]
220 | (jiffies - network->last_scanned) / (HZ / 100));
| ^
In file included from ../include/linux/skbuff.h:45,
from ../include/linux/if_ether.h:19,
from ../include/linux/etherdevice.h:20,
from ../drivers/staging/rtl8192e/rtllib_wx.c:18:
../drivers/staging/rtl8192e/rtllib_wx.c: In function 'rtllib_wx_get_scan':
../drivers/staging/rtl8192e/rtllib_wx.c:261:70: warning: division by zero [-Wdiv-by-zero]
261 | (jiffies - network->last_scanned) /
|

In fact, is HZ is not a multiple of 100, the calculation will be wrong,
but it will compile correctly.

The fix is to get rid of the (HZ / 100) portion. To decrease any round-off
errors, the compiler is forced to perform the 100 * jiffies-difference
before dividing by HZ. This patch is only compile tested.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20221104012750.2076-1-Larry.Finger@lwfinger.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# a27e2eb5 01-Jul-2022 Felix Schlepper <f3sch.git@outlook.com>

Staging: rtl8192e: Added spaces around '+'

This addresses two issues raised by checkpatch.pl:

$ ./scripts/checkpatch.pl --terse -f drivers/staging/rtl8192e/rtllib_wx.c
CHECK: spaces preferred around that '+' (ctx:VxV)

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Felix Schlepper <f3sch.git@outlook.com>
Link: https://lore.kernel.org/r/87628a2dd08ec0e5b02090485e7a9a1d91b7d2a5.1656667089.git.f3sch.git@outlook.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# ea32f580 01-Jul-2022 Felix Schlepper <f3sch.git@outlook.com>

Staging: rtl8192e: Remove unnecessary blank line

This addresses an issue raised by checkpatch.pl:

$ ./scripts/checkpatch.pl --terse -f drivers/staging/rtl8192e/rtllib_wx.c
CHECK: Blank lines aren't necessary before a close brace '}'

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Felix Schlepper <f3sch.git@outlook.com>
Link: https://lore.kernel.org/r/f3c6bd5c79331e82f006fb2694f791030b07c5ba.1656667089.git.f3sch.git@outlook.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 58f364ec 01-Jul-2022 Felix Schlepper <f3sch.git@outlook.com>

Staging: rtl8192e: Added braces around else

This addresses two issues raised by checkpatch.pl:

$ ./scripts/checkpatch.pl --terse -f drivers/staging/rtl8192e/rtllib_wx.c
CHECK: braces {} should be used on all arms of this statement
CHECK: Unbalanced braces around else statement

The coding style rule with not using unnecessary braces around if/else
does not apply if only one branch is a single statement.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Felix Schlepper <f3sch.git@outlook.com>
Link: https://lore.kernel.org/r/651f51d9f92e8a445ceaf9f2073f16dd10458a74.1656667089.git.f3sch.git@outlook.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 907d2772 01-Jul-2022 Felix Schlepper <f3sch.git@outlook.com>

Staging: rtl8192e: Remove unnecessary parentheses

This addresses an issue raised by checkpatch.pl:

$ ./scripts/checkpatch.pl --terse -f drivers/staging/rtl8192e/rtllib_wx.c
Unnecessary parentheses around wrqu->encoding

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Felix Schlepper <f3sch.git@outlook.com>
Link: https://lore.kernel.org/r/0e4e340be3f4c7f35a5381b726b1db5fc6842f10.1656667089.git.f3sch.git@outlook.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 2393ef09 01-Jul-2022 Felix Schlepper <f3sch.git@outlook.com>

Staging: rtl8192e: Avoid multiple assignments

This addresses an issue raised by checkpatch.pl:

$ ./scripts/checkpatch.pl --terse -f drivers/staging/rtl8192e/rtllib_wx.c
CHECK: multiple assignments should be avoided

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Felix Schlepper <f3sch.git@outlook.com>
Link: https://lore.kernel.org/r/899a1010643a05668465069951518e5dcab9c77e.1656667089.git.f3sch.git@outlook.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 177a561e 01-Jul-2022 Felix Schlepper <f3sch.git@outlook.com>

Staging: rtl8192e: Refactored rtllib_modes

The initial reason for looking at this code was an
issue raised by checkpatch.pl:

$ ./scripts/checkpatch.pl --terse -f drivers/staging/rtl8192e/rtllib_wx.c
CHECK: Please use a blank line after function/struct/union/enum
declarations

The additional blank line above the struct/before the headers is
just cleaner.

However, as it turns out since there is no str formatting required
One can replace the error prone str + size struct with a char array.
The rest of this patch fixes the usecases.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Felix Schlepper <f3sch.git@outlook.com>
Link: https://lore.kernel.org/r/4dbc4939e88a2c94f1819b4b0cc2c81dc332710b.1656667089.git.f3sch.git@outlook.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 55de6cb7 19-Apr-2022 Solomon Tan <wjsota@gmail.com>

staging: rtl8192e: Remove space after cast

This patch addresses the checkpatch.pl flag that there should not be a
space after a cast.

Signed-off-by: Solomon Tan <wjsota@gmail.com>
Link: https://lore.kernel.org/r/20220419124318.8028-1-wjsota@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 66d708e6 30-Apr-2021 zhaoxiao <zhaoxiao@uniontech.com>

staging: rtl8192e: remove unnecesasry ftrace-like logging

Fixed Check: Remove unnecessary ftrace-like logging by simply deleting
that statement as we have other modes of logging like ftrace.
Reported by checkpatch.

Signed-off-by: zhaoxiao <zhaoxiao@uniontech.com>
Link: https://lore.kernel.org/r/20210430122826.9899-1-zhaoxiao@uniontech.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# b87b2108 20-Feb-2021 William Durand <will+git@drnd.me>

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>


# 061c43a3 19-Feb-2021 William Durand <will+git@drnd.me>

staging: rtl8192e: fix alignment issues in rtllib_wx.c

Fixes "Alignment should match open parenthesis" issues reported by
checkpatch.pl in the `rtllib_wx.c` file.

Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210219233352.2298-1-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 29b205e7 15-Feb-2021 Davidson Francis <davidsondfgl@gmail.com>

staging: rtl8192e: Fix comparisons to NULL

Checkpatch prefers the shorter version (x / !x) over
(!= NULL / == NULL), respectively.

Signed-off-by: Davidson Francis <davidsondfgl@gmail.com>
Link: https://lore.kernel.org/r/20210215194441.11430-1-davidsondfgl@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 465e8997 12-Feb-2021 William Durand <will+git@drnd.me>

staging: rtl8192e: remove multiple blank lines

This patch removes some blank lines in order to fix a checkpatch issue.

Signed-off-by: William Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210213034711.14823-1-will+git@drnd.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 49e86ae1 27-Jul-2020 Gustavo A. R. Silva <gustavoars@kernel.org>

staging: rtl8192e: Use fallthrough pseudo-keyword

Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1].

[1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20200727191006.GA30474@embeddedor
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 39ddadf1 11-Mar-2020 Takashi Iwai <tiwai@suse.de>

staging: rtl8192e: Use scnprintf() for avoiding potential buffer overflow

Since snprintf() returns the would-be-output size instead of the
actual output size, the succeeding calls may go beyond the given
buffer limit. Fix it by replacing with scnprintf().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20200311092451.23933-3-tiwai@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 18056f34 01-Apr-2019 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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>


# 050bd74b 28-Feb-2019 Oscar Gomez Fuente <oscargomezf@gmail.com>

staging: rtl8192e: Fix space and suspect issue

These changes fixed a checkpatch error for space required before the
open brace '{' as well as a warning for suspect code indent for
conditional statements.

Signed-off-by: Oscar Gomez Fuente <oscargomezf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 3294a9c5 24-Feb-2018 Santha Meena Ramamoorthy <santhameena13@gmail.com>

staging: rtl8192e: use struct pointer to get the size of the struct

Use pointer to the structure to get the size of the structure in order
to conform to the Linux kernel coding style. Issue found using
checkpatch.

Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# f67ffd61 12-Oct-2017 Gustavo A. R. Silva <garsilva@embeddedor.com>

staging: rtl8192e: mark expected switch fall-through

In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 6b675ad8 13-May-2017 Malcolm Priestley <tvboxspy@gmail.com>

staging: rtl8192e: print alg name as debug.

alg name will be printed a number times during a connection it
is only really useful as a debug message.

Change to netdev_dbg.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# a959dec1 18-Mar-2017 Derek Robson <robsonde@gmail.com>

Staging: rtl8192e - fixed style of block comments

Fixed style of block comment across whole driver
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 8ad835b9 07-Mar-2017 Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>

staging: rtl8192e: Indent the code

Indent the code in order to follow the rules and to
increase the readability of the code.

Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 9afa9370 01-Jun-2016 Binoy Jayan <binoy.jayan@linaro.org>

rtl8192e: rtllib_device: Replace semaphore wx_sem with mutex

The semaphore 'wx_sem' in the rtllib_device is a simple mutex,
so it should be written as one. Semaphores are going away in the future.

Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 0bd35534 15-Nov-2015 Sean MacLennan <seanm@seanm.ca>

staging:rtl8192e: Usage count off by one

The rtllib driver is not calling try_module_get() when loading the
encryption modules. Because of this, you can never remove the module
once you have used it one (i.e. bring up the wireless interface).

Signed-off-by: Sean MacLennan <seanm@seanm.ca>
Tested-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# ae6d07a5 20-Sep-2015 Mateusz Kulikowski <mateusz.kulikowski@gmail.com>

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>


# 0992510c 15-Jun-2015 Mateusz Kulikowski <mateusz.kulikowski@gmail.com>

staging: rtl8192e: Remove rtllib_wx_get_encode_ext()

This function was declared but never unused.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 622fd494 31-May-2015 Mateusz Kulikowski <mateusz.kulikowski@gmail.com>

staging: rtl8192e: Replace ?: with max

All get_key implementations return either -1 or small buffers, so
cast int->u16 is not a problem.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# a5c06ad8 31-May-2015 Mateusz Kulikowski <mateusz.kulikowski@gmail.com>

staging: rtl8192e: Replace ?: with min_t

Replace :? with min_t for readability. Remove check that is always false.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 521a9cbd 31-May-2015 Mateusz Kulikowski <mateusz.kulikowski@gmail.com>

staging: rtl8192e: Remove RTLLIB_DEBUG_SCAN()

Use netdev_dbg() instead, remove duplicated logs.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# c6a91aba 31-May-2015 Mateusz Kulikowski <mateusz.kulikowski@gmail.com>

staging: rtl8192e: Remove RTLLIB_DEBUG_WX()

Use netdev_dbg() instead of RTLLIB_DEBUG_WX().
Rewrite some messages to be more readable.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 8852112e 31-Mar-2015 Mateusz Kulikowski <mateusz.kulikowski@gmail.com>

staging: rtl8192e: Remove dead code

Remove commented-out code

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 14b40d92 31-Mar-2015 Mateusz Kulikowski <mateusz.kulikowski@gmail.com>

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>


# d69d2054 16-Mar-2015 Mateusz Kulikowski <mateusz.kulikowski@gmail.com>

staging: rtl8192e: fix coding style warnings (printk -> netdev_*)

Use netdev_*, dev_* or pr_* instead of printk where possible.
KERN_DEBUG messages are left intact as pr_dbg has different behaviour.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 2729011c 16-Mar-2015 Mateusz Kulikowski <mateusz.kulikowski@gmail.com>

staging: rtl8192e: rtllib_wx: remove duplicate messages

Some messages were reported with netdev_* macros and internal
driver-specific macro.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 0822339b 16-Mar-2015 Mateusz Kulikowski <mateusz.kulikowski@gmail.com>

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>


# d009f0d7 08-Mar-2015 Darshana Padmadas <darshanapadmadas@gmail.com>

staging: rtl8192e: Replace min with min_t

This patch replaces min with min_t and eliminates the
following warnings found by checkpatch.pl:

WARNING: min() should probably be min_t

Signed-off-by: Darshana Padmadas <darshanapadmadas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# a3ed22ea 28-Feb-2015 Ksenija Stanojevic <ksenija.stanojevic@gmail.com>

Staging: rtl8192e: Fix line over 80 characters

This patch fixes line to fit 80 characters.
Issue found by checkpatch.pl

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# c63eee54 28-Feb-2015 Ksenija Stanojevic <ksenija.stanojevic@gmail.com>

Staging: rtl8192e: Use ether_addr_copy() instead of memcpy()

This patch replaces memcpy with ether_addr_copy.
Also pathole was used to make sure that arguments passed to ether_addr_copy
are aligned to u16.
First argument is iwe.u.ap_addr.sa_data i output of pahole is:
struct iw_event {
__u16 len; /* 0 2 */
__u16 cmd; /* 2 2 */

/* XXX 4 bytes hole, try to pack */

union iwreq_data u; /* 8 16 */

/* size: 24, cachelines: 1, members: 3 */
/* sum members: 20, holes: 1, sum holes: 4 */
/* last cacheline: 24 bytes */
};
and inside union iwreq_data u is sa_data:
struct sockaddr {
/* typedef sa_family_t -> __kernel_sa_family_t */ short unsigned int sa_family; /* 8 2 */
char sa_data[14]; /* 10 14 */
} ap_addr; /* 16 */

sa_data is a char array of size 14, and the number of bytes copied using
ether_addr_copy() is 6.

Second argument is network->bssid and output of pahole is:
struct rtllib_network {
u8 bssid[6]; /* 0 6 */
u8 channel; /* 6 1 */
u8 ssid[33]; /* 7 33 */
u8 ssid_len; /* 40 1 */
u8 hidden_ssid[33]; /* 41 33 */
/* --- cacheline 1 boundary (64 bytes) was 10 bytes ago --- */
u8 hidden_ssid_len; /* 74 1 */

/* XXX 1 byte hole, try to pack */

struct rtllib_qos_data qos_data; /* 76 48 */
bool bWithAironetIE; /* 124 1 */
bool bCkipSupported; /* 125 1 */
bool bCcxRmEnable; /* 126 1 */

/* XXX 1 byte hole, try to pack */

/* --- cacheline 2 boundary (128 bytes) --- */
u16 CcxRmState[2]; /* 128 4 */
bool bMBssidValid; /* 132 1 */
u8 MBssidMask; /* 133 1 */
u8 MBssid[6]; /* 134 6 */
bool bWithCcxVerNum; /* 140 1 */
u8 BssCcxVerNumber; /* 141 1 */

/* XXX 2 bytes hole, try to pack */

struct rtllib_rx_stats stats; /* 144 120 */
/* --- cacheline 4 boundary (256 bytes) was 8 bytes ago --- */
u16 capability; /* 264 2 */
u8 rates[12]; /* 266 12 */
u8 rates_len; /* 278 1 */
u8 rates_ex[16]; /* 279 16 */
u8 rates_ex_len; /* 295 1 */
long unsigned int last_scanned; /* 296 8 */
u8 mode; /* 304 1 */

/* XXX 3 bytes hole, try to pack */

u32 flags; /* 308 4 */
u32 last_associate; /* 312 4 */
u32 time_stamp[2]; /* 316 8 */
/* --- cacheline 5 boundary (320 bytes) was 4 bytes ago --- */
u16 beacon_interval; /* 324 2 */
u16 listen_interval; /* 326 2 */
u16 atim_window; /* 328 2 */
u8 erp_value; /* 330 1 */
u8 wpa_ie[64]; /* 331 64 */

/* XXX 5 bytes hole, try to pack */

/* --- cacheline 6 boundary (384 bytes) was 16 bytes ago --- */
size_t wpa_ie_len; /* 400 8 */
u8 rsn_ie[64]; /* 408 64 */
/* --- cacheline 7 boundary (448 bytes) was 24 bytes ago --- */
size_t rsn_ie_len; /* 472 8 */
u8 wzc_ie[256]; /* 480 256 */
/* --- cacheline 11 boundary (704 bytes) was 32 bytes ago --- */
size_t wzc_ie_len; /* 736 8 */
struct rtllib_tim_parameters tim; /* 744 2 */
u8 dtim_period; /* 746 1 */
u8 dtim_data; /* 747 1 */

/* XXX 4 bytes hole, try to pack */

u64 last_dtim_sta_time; /* 752 8 */
u8 wmm_info; /* 760 1 */

/* XXX 1 byte hole, try to pack */

struct rtllib_wmm_ac_param wmm_param[4]; /* 762 16 */
/* --- cacheline 12 boundary (768 bytes) was 10 bytes ago --- */
u8 Turbo_Enable; /* 778 1 */

/* XXX 1 byte hole, try to pack */

u16 CountryIeLen; /* 780 2 */
u8 CountryIeBuf[255]; /* 782 255 */

/* XXX 3 bytes hole, try to pack */

/* --- cacheline 16 boundary (1024 bytes) was 16 bytes ago --- */
struct bss_ht bssht; /* 1040 84 */
/* --- cacheline 17 boundary (1088 bytes) was 36 bytes ago --- */
bool broadcom_cap_exist; /* 1124 1 */
bool realtek_cap_exit; /* 1125 1 */
bool marvell_cap_exist; /* 1126 1 */
bool ralink_cap_exist; /* 1127 1 */
bool atheros_cap_exist; /* 1128 1 */
bool cisco_cap_exist; /* 1129 1 */
bool airgo_cap_exist; /* 1130 1 */
bool unknown_cap_exist; /* 1131 1 */
bool berp_info_valid; /* 1132 1 */
bool buseprotection; /* 1133 1 */
bool bIsNetgear854T; /* 1134 1 */
u8 SignalStrength; /* 1135 1 */
u8 RSSI; /* 1136 1 */

/* XXX 7 bytes hole, try to pack */

struct list_head list; /* 1144 16 */
/* --- cacheline 18 boundary (1152 bytes) was 8 bytes ago --- */

/* size: 1160, cachelines: 19, members: 61 */
/* sum members: 1132, holes: 10, sum holes: 28 */
/* last cacheline: 8 bytes */
};

network->bssid is char array of size 6.

Issue found by checkpatch.pl

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# c60cfc8e 28-Feb-2015 Ksenija Stanojevic <ksenija.stanojevic@gmail.com>

Staging: rtl8192e: Replace printk with netdev_dbg, netdev_info, or netdev_warn

For network systems netdev_dbg, netdev_info or netdev_warn is preferred over
printk. Issue found by checkpatch.pl

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 3a6b70c3 22-Aug-2014 Matthew Casey <mdcasey@chabloom.com>

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>


# 4bb01423 25-Oct-2013 Valentina Manea <valentina.manea.m@gmail.com>

staging: rtl8192e: do not use comparisons on bool tests

This patch fixes coccinelle errors regarding comparisons
used in bool tests.

Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com>
Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# cd017123 23-Apr-2012 Justin P. Mattock <justinmattock@gmail.com>

staging: rtl8192e: Fix typos.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
ACKed-by: Larry Finger <Larry.finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# b330f606 10-Apr-2012 Jim Cromie <jim.cromie@gmail.com>

staging: replace open-coded ARRAY_SIZEs

spatch http://coccinelle.lip6.fr/rules/array.cocci did these.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 3b148be0 19-Dec-2011 Sean MacLennan <seanm@seanm.ca>

staging/rtl8192e: Register against lib80211

Convert rtllib from registering the crypt drivers against rtllib_crypt
and instead register the against lib80211. The crypto functions have
R- prepended (R-CCMP, R-TKIP, R-WEP) so they will not clash with the
lib80211 versions.

We cannot use the lib80211 crypt drivers since the rtl8192e has some
hardware support that is not handled by the lib80211 crypt drivers.

Signed-off-by: Sean MacLennan <seanm@seanm.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 0ddcf5fd 19-Dec-2011 Sean MacLennan <seanm@seanm.ca>

staging/rtl8192e: Convert to lib80211_crypt_info

Convert rtllib to use lib80211_crypt_info.

Signed-off-by: Sean MacLennan <seanm@seanm.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 32c44cb5 19-Dec-2011 Sean MacLennan <seanm@seanm.ca>

staging/rtl8192e: Convert to lib80211_crypt_data and lib80211_crypt_ops

Convert rtllib_crypt_data to lib80211_crypt_data and
rtllib_crypt_ops to lib80211_crypt_ops.

This is almost a 1:1 replacement, only extra_prefix_len and
extra_postfix_len changed.

Signed-off-by: Sean MacLennan <seanm@seanm.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 184f1938 19-Dec-2011 Sean MacLennan <seanm@seanm.ca>

staging/rtl8192e: Add lib80211.h to rtllib.h

Add lib80211.h header file to rtllib.h and get it compiling.

Signed-off-by: Sean MacLennan <seanm@seanm.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# e0ec8a67 12-Dec-2011 Devendra Naga <devendra.aaru@gmail.com>

staging: remove version.h includes in rtl8192e

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 3b28499c 28-Nov-2011 Sean MacLennan <seanm@seanm.ca>

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>


# 23226977 08-Nov-2011 Thomas Meyer <thomas@m3y3r.de>

staging: rtl8192e: Use kmemdup rather than duplicating its implementation

Use kmemdup rather than duplicating its implementation

The semantic patch that makes this change is available
in scripts/coccinelle/api/memdup.cocci.

More information about semantic patching is available at
http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 929fa2a4 10-Nov-2011 Thomas Meyer <thomas@m3y3r.de>

staging: rtl8192e: Use kzalloc rather than kmalloc v2

Use kzalloc rather than kmalloc followed by memset with 0

This considers some simple cases that are common and easy to validate
Note in particular that there are no ...s in the rule, so all of the
matched code has to be contiguous

The semantic patch that makes this change is available
in scripts/coccinelle/api/alloc/kzalloc-simple.cocci.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# ac50ddaa 25-Aug-2011 Larry Finger <Larry.Finger@lwfinger.net>

staging: rtl8192e: Remove MAC_FMT and MAC_ARG for %pM

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 438812c3 11-Aug-2011 Larry Finger <Larry.Finger@lwfinger.net>

staging: rtl8192e: Remove MAC_FMT and MAC_ARG for %pM

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>


# 62f27cc4 25-Aug-2011 Larry Finger <Larry.Finger@lwfinger.net>

staging: rtl8192e: Cleanup checkpatch -f warnings and errors - Part XVII

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# c73901c9 11-Aug-2011 Larry Finger <Larry.Finger@lwfinger.net>

staging: rtl8192e: Cleanup checkpatch -f warnings and errors - Part XVII

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>


# e92b71d5 18-Jul-2011 Larry Finger <Larry.Finger@lwfinger.net>

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>


# ce403a6a 14-Jul-2011 Larry Finger <Larry.Finger@lwfinger.net>

staging: rtl8192e: Remove dead code associated with CUSTOMER_ID_INTEL_CMPC and CONFIG_CRDA

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>


# 3591733d 10-Jul-2011 Mike McCormack <mikem@ring3k.org>

rtl8192e: Remove WIRELESS_EXT macro checks

Signed-off-by: Mike McCormack <mikem@ring3k.org>


# 94a79942 23-Aug-2011 Larry Finger <Larry.Finger@lwfinger.net>

From: wlanfae <wlanfae@realtek.com>
[PATCH 1/8] rtl8192e: Import new version of driver from realtek

Signed-off-by: wlanfae <wlanfae@realtek.com>
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---