Commit Graph

251 Commits

Author SHA1 Message Date
Nathan Chancellor 4cd05e390a staging: rtl8192u: Fix bitwise vs logical operator in TranslateRxSignalStuff819xUsb()
commit 099ec97ac92911abfb102bb5c68ed270fc12e0dd upstream.

clang warns:

drivers/staging/rtl8192u/r8192U_core.c:4268:20: warning: bitwise and of
boolean expressions; did you mean logical and? [-Wbool-operation-and]
        bpacket_toself =  bpacket_match_bssid &
                          ^~~~~~~~~~~~~~~~~~~~~
                                              &&
1 warning generated.

Replace the bitwise AND with a logical one to clear up the warning, as
that is clearly what was intended.

Fixes: 8fc8598e61 ("Staging: Added Realtek rtl8192u driver to staging")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20210814235625.1780033-1-nathan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-26 14:07:07 +02:00
Colin Ian King c751e448b7 staging: rtl8192u: Fix potential infinite loop
[ Upstream commit f9b9263a25dc3d2eaaa829e207434db6951ca7bc ]

The for-loop iterates with a u8 loop counter i and compares this
with the loop upper limit of riv->ieee80211->LinkDetectInfo.SlotNum
that is a u16 type. There is a potential infinite loop if SlotNum
is larger than the u8 loop counter. Fix this by making the loop
counter the same type as SlotNum.

Addresses-Coverity: ("Infinite loop")
Fixes: 8fc8598e61 ("Staging: Added Realtek rtl8192u driver to staging")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210407150308.496623-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-14 09:44:20 +02:00
Colin Ian King 2698fab038 staging: rtl8192u: fix a dubious looking mask before a shift
[ Upstream commit c4283950a9a4d3bf4a3f362e406c80ab14f10714 ]

Currently the masking of ret with 0xff and followed by a right shift
of 8 bits always leaves a zero result.  It appears the mask of 0xff
is incorrect and should be 0xff00, but I don't have the hardware to
test this. Fix this to mask the upper 8 bits before shifting.

[ Not tested ]

Addresses-Coverity: ("Operands don't affect result")
Fixes: 8fc8598e61 ("Staging: Added Realtek rtl8192u driver to staging")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20200716154720.1710252-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-08-19 08:16:13 +02:00
Navid Emamdoost 29d575fe17 staging: rtl8192u: fix multiple memory leaks on error path
[ Upstream commit ca312438cf176a16d4b89350cade8789ba8d7133 ]

In rtl8192_tx on error handling path allocated urbs and also skb should
be released.

Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Link: https://lore.kernel.org/r/20190920025137.29407-1-navid.emamdoost@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-12-31 16:43:10 +01:00
Stephen Brennan 684c215dd0 staging: rtl8192u: remove code under TO_DO_LIST
Several blocks of code are guarded by #ifdef TO_DO_LIST. If this is
defined, compilation fails. No machinery exists to define this, and no
documenation on the in-progress feature exists. Since this code is dead,
let's delete it.

Signed-off-by: Stephen Brennan <stephen@brennan.io>
Link: https://lore.kernel.org/r/20190823162410.10038-1-stephen@brennan.io
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-25 10:27:39 +02:00
Navid Emamdoost 09acf29c82 staging: rtl8192u: null check the kzalloc
In rtl8192_init_priv_variable allocation for priv->pFirmware may fail,
so a null check is necessary.priv->pFirmware is accessed later in
rtl8192_adapter_start. I added the check and made appropriate changes
to propagate the errno to the caller.

Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>

Link: https://lore.kernel.org/r/20190731141925.29268-1-navid.emamdoost@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-01 18:38:08 +02:00
Nishka Dasgupta feb20855a3 staging: rtl8192u: Replace function rtl8192_rx_enable()
Remove function rtl8192_rx_enable as all it does is call
rtl8192_rx_initiate.
Rename rtl8192_rx_initiate to rtl8192_rx_enable and change its type from
static to non-static to maintain compatibility with call sites of
rtl8192_rx_enable.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190701091552.12696-1-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-03 18:32:09 +02:00
Nishka Dasgupta e6e70326d6 staging: rtl8192u: Change type of rtl8192_rx_initiate()
Change type of function rtl8192_rx_initiate from int to void as it
always returns 0 and this value is never used.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 09:11:23 +02:00
Greg Kroah-Hartman 21baa36d92 staging: rtl8192u: add proper SPDX identifiers on files that did not have them.
There were a few files for the rtl8192u 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.

Cc: John Whitmore <johnfwhitmore@gmail.com>
Cc: Bhanusree Pola <bhanusreemahesh@gmail.com>
Cc: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
Cc: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03 11:10:17 +02:00
Colin Ian King 5e767cca29 staging: rtl8192u: remove redundant nul check on pointer dev
There is a null check on pointer dev which implies it may be null, however
dev can never be null as it is set in rtl8192_usb_probe via the call
to usb_set_intfdata.

Detected by CoverityScan, CID#143078 ("Dereference after null check")

Fixes: 8fc8598e61 ("Staging: Added Realtek rtl8192u driver to staging")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-07 13:33:54 +01:00
John Whitmore 3d7f12d31f staging:rtl8192u: Rename Rx_Smooth_Factor - Style
Rename the MACRO Rx_Smooth_Factor to RX_SMOOTH_FACTOR, this clears the
checkpatch issue with CamelCase naming.

This is a coding style change which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-10 17:11:26 +02:00
John Whitmore 73d4be9472 staging:rtl8192u: Rename RTL819xU_MODULE_NAME - Style
Rename the MACRO RTL819xU_MODULE_NAME to RTL819XU_MODULE_NAME, this
clears the checkpatch issue with CamelCase naming.

This is a coding style change which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-10 17:11:26 +02:00
John Whitmore a4f74fc067 staging:rtl8192u: Remove unused functions - Style
Remove unused function declarations. This is a coding style change
which should have no impact on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-10 17:11:26 +02:00
John Whitmore 491f9f8de1 staging:rtl8192u: Remove read_cam() - Style
Remove the function read_cam(), as it is unused in code.

Simple style change which should not impact runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-10 17:11:26 +02:00
John Whitmore fda7c4e00e staging:rtl8192u: Remove write_cam() - Style
Remove the function write_cam() as it is unused.

Simple style change which should not impact runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-10 17:11:26 +02:00
John Whitmore d0679000c4 staging:rtl8192u: Refactor member variable enabled - Style
The structure rt_dot11d_info contains a memeber variable 'enabled',
which causes a checkpatch issue as it is declared as being of type
bool. The type of the variable has been changed to a 'u8', to clear
the issue.

Additionally to aid searching for the member variable in code it
has been renamed from 'enabled' to 'dot11d_enabled'.

These are purely coding style changes which should not impact runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-10 10:37:54 +02:00
John Whitmore 9003987a08 staging:rtl8192u: Rename dot11d_init to fix name clash
The function dot11d_init() was previously renamed to clear a style
issue. Unfortunately the new name used, dot11d_init(), clashes with
a sybmol which is exported with the same name. To correct this
problem the function has been renamed to rtl8192u_dot11d_init().

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-10 10:21:37 +02:00
John Whitmore 1e7b06f0e0 staging:rtl8192u: Rename EEPROM_ChannelPlan - Style
Rename the constant EEPROM_ChannelPlan to EEPROM_CHANNEL_PLAN,
this clears the checkpatch issue with CamelCase naming.

This is purely a coding style change which should have no impact on
runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:27:49 +02:00
John Whitmore 89d5bcf46a staging:rtl8192u: Rename EEPROM_Customer_ID - Style
Rename the constant EEPROM_Customer_ID to EEPROM_CUSTOMER_ID,
this change clears the checkpatch issue with CamelCase naming.

This is purely a coding style change which should have no
impact on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:27:49 +02:00
John Whitmore b635fb9f13 staging:rtl8192u: Rename EEPROM_Default_TxPower - Style
rename the constant EEPROM_Default_TxPower to EEPROM_DEFAULT_TX_POWER,
this clears the checkpatch issue with CamelCase issue.

This is purely a coding style change which should have no impact
on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:27:49 +02:00
John Whitmore 3e86b64263 staging:rtl8192u: Rename EEPROM_Default_CrystalCap - Style
Rename the constant EEPROM_Default_CrystalCap to
EEPROM_DEFAULT_CRYSTAL_CAP, this clears the checkpatch issue with
CamelCase naming.

This is purely a coding style change which should have no impact
on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:27:49 +02:00
John Whitmore aa37aea128 staging:rtl8192u: Rename EEPROM_Default_PwDiff - Style
Rename the constant EEPROM_Default_PwDiff to EEPROM_DEFAULT_PW_DIFF,
this clears the checkpatch issue with CamelCase naming.

This change is purely a coding style change which should have no
impact on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:27:49 +02:00
John Whitmore 74103437df staging:rtl8192u: Rename EEPROM_Default_ThermalMeter - Style
Rename the constant EEPROM_Default_ThermalMeter to
EEPROM_DEFAULT_THERNAL_METER, this change clears the checkpatch
issue with CamelCase naming.

This is purely a coding style change which should have no impact
on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:27:49 +02:00
John Whitmore 81bba51495 staging:rtl8192u: rename EEPROM_TxPwIndex_Ver - Style
Rename the constant EEPROM_TxPwIndex_Ver to
EEPROM_TX_PW_INDEX_VER, this clears the checkpatch issue with
CamelCase naming.

This is purely a coding style change which should have no impact
on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:27:48 +02:00
John Whitmore be9bd9d5a7 staging:rtl8192u: Rename EEPROM_TxPwIndex_CCK_V1 - Style
Rename the constant EEPROM_TxPwIndex_CCK_V1 to
EEPROM_TX_PW_INDEX_CCK_V1, this clears the checkpatch issue with
CamelCase naming.

This is purely a coding style change which should have no impact
on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:27:48 +02:00
John Whitmore e9034dd6e1 staging:rtl8192u: Rename EEPROM_TxPwIndex_OFDM_24G - Style
Rename the constant EEPROM_TxPwIndex_OFDM_24G to
EEPROM_TX_PW_INDEX_OFDM_24G, this change clears the checkpatch
issue with CamelCase naming.

This change is a coding style change which should have no impact
on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:27:48 +02:00
John Whitmore 2b29377bda staging:rtl8192u: Rename EEPROM_TxPwIndex_OFDM_24G_V1 - STYLE
Rename the constant EEPROM_TxPwIndex_OFDM_24G_V1 to
EEPROM_TX_PW_INDEX_OFDM_24G_V1, this change clears the checkpatch
issue with CamelCase naming.

This is a coding style change which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:27:48 +02:00
John Whitmore 3e78c2127d staging:rtl8192u: Rename EEPROM_TxPwIndex_CCK - Style
Rename the constant EEPROM_TxPwIndex_CCK to EEPROM_TX_PW_INDEX_CCK.
This change clears the checkpatch issue with CamelCase naming.

The change is coding style in nature so should have no impact on
runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:27:48 +02:00
John Whitmore 7a4a474db3 staging:rtl8192u: Rename EEPROM_CrystalCap - Style
Rename the constant EEPROM_CrystalCap to EEPROM_CRYSTAL_CAP. This
clears the checkpatch issue with CamelCase naming.

This is a coding style change which should not impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:27:48 +02:00
John Whitmore 98dbfe8bff staging:rtl8192u: Rename EEPROM_PwDiff - Style
Rename the constant EEPROM_PwDiff to EEPROM_PW_DIFF. This change clears
the checkpatch issue with CamelCase naming.

This is a coding style change which should not impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:27:48 +02:00
John Whitmore 9bfe573611 staging:rtl8192u: Rename EEPROM_ThermalMeter - Style
Rename EEPROM_ThermalMeter to EEPROM_THERMAL_METER. This change clears
the checkpatch issue with CamelCase naming.

This change is a coding style change which should not impact on
runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:27:48 +02:00
John Whitmore e94d958580 staging:rtl8192u: Rename EEPROM_TxPowerDiff - Style
Rename EEPROM_TxPowerDiff to EEPROM_TX_POWER_DIFF. This change clears
the checkpatch issue with CamelCase naming.

This change is purely a coding style change which should have no
impact on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:27:48 +02:00
John Whitmore 64749a7e54 staging:rtl8192u: Refactor enum VERSION_819xU - Style
Rename enumerated type VERSION_819xU to version_819xu to clear
checkpatch issue with CamelCase naming. Additionally the constants
defined by the type are renamed for the same reason.

Remove the 'typedef' directive to clear the checkpatch issue with
defining new types.

The enumerated type has been moved to the file where the type is
actually used, r8192U.h

Additionally the memeber variable, which uses the type
(card_8192_version), has been changed to use the type to enable
compiler typechecking.

These are coding style changes which should not impact runtime code
execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:27:47 +02:00
John Whitmore fe9756ee9e staging:rtl8192u: Replace magic number with defined constant - Style
The defined constant MIMO_PS_STATIC is used for this test for zero
elsewhere in code so the magic number '0' has been replaced with that
comment, which was actually explicitly mentioned in the comment.

This is a simple coding style change which should have no impact on
runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:22:39 +02:00
John Whitmore 6a184731c2 staging:rtl8192u: Rename Dot11d_Reset - Style
The function Dot11d_Reset causes a checkpatch issue due to its use of
CamelCase naming, so has been renamed to dot11d_reset.

This is a coding style change which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:17:08 +02:00
John Whitmore c01f06b750 staging:rtl8192u: Rename Dot11d_Init - Style
The function Dot11d_Init() causes a checkpatch issue due to its use
of CamelCase naming. The function has been renamed to dot11d_init.

This is a coding style change which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:17:08 +02:00
John Whitmore 9391bea9ad staging:rtl8192u: Remove macro eqMacAddr - Style
The macro eqMacAddr implements the same functionality as the
ether_addr_equal function defined in etherdevice.h, as a result the
macro has been removed from the code, and its use replaced with the
function call.

Note that to use the ether_addr_equal function the data array
containing the MAC Address has to be u16 aligned. Because of this the
struct rt_dot11d_info has had it's member variables re-ordered.

This is a coding style change which should have no impact on runtime
code execution.

Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:17:07 +02:00
John Whitmore 070c1ce978 staging:rtl8192u: Rename constants - Style
The constants 'VeryLowRSSI' and 'CTSToSelfTHVal' generate warnings from
checkpatch due to the use of CamelCase naming. The two constants have
been renamed to 'VERY_LOW_RSSI' and 'CTS_TO_SELF_TH_VAL' respectively.

These are coding style changes which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05 16:21:07 +02:00
John Whitmore c972be9a75 staging:rtl8192u: Rename constants RateAdaptiveTH_Low_* - Style
The two constants, RateAdaptiveTH_Low_20M and RateAdaptiveTH_Low_40M
generate a checkpatch warning about CamelCase naming. The two have been
renamed to clear this issue. RATE_ADAPTIVE_TH_LOW_20M and
RATE_ADAPTIVE_TH_LOW_40M

This is a coding style change which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05 16:21:07 +02:00
John Whitmore 0395a9aad5 staging:rtl8192u: Rename RateAdaptiveTH_High - Style
The constant RateAdaptiveTH_High causes a checkpatch issue with respect
to CamelCase naming. As a result the constant has been renamed to
RATE_ADAPTIVE_TH_HIGH.

This is purely a coding style change which should have no impact on
runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05 16:21:07 +02:00
John Whitmore fb37edcfcb staging:rtl8192u: Rename RF90_RADIO_PATH_E - Style
Rename the enumerated type RF90_RADIO_PATH_E to rf90_radio_path_e.
Whilst it is not flagged as an issue by checkpatch, types are meant
to be named in lowercase.

This change is purely a coding style change which should have no
impact on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-29 10:13:26 +02:00
John Whitmore b34db7f48a staging:rtl8192u: Rename bEnabled > enabled - Style
Rename the member variable bEnabled to enabled. This change clears the
checkpatch issue with CamelCase. Purely a coding style change which should not
impact runtime execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-24 14:03:48 +02:00
John Whitmore 8b5c53e62c staging:rtl8192u: Remove typdef from enumeration RF90_RADIO_PATH_E - Style
Checkpatch warns about the creation of new types. This patch simply removes
the typedef from the enumeration RF90_RADIO_PATH_E to clear this checkpatch
warning. There should be no impact on run time code execution, as this is a
coding style issue only.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-13 15:41:16 +02:00
John Whitmore 6898f96695 staging:rtl8192u: remove typedef from struct rx_drvinfo_819x_usb
Removed the typedef from the struct rx_drvinfo_819x_usb  to leave it as a
simple structure.

This clears the issue flagged by checkpatch, defining new types.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-13 11:40:46 +02:00
John Whitmore 2541fcd9bb staging:rtl8192u: typedef struct rx_desc_819x_usb remove typedef
Change structure rx_desc_819x_usb from being typedef to being a simple
structure, without the typedef.

Clears a checkpatch issue, definging new types in the code.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-13 11:40:46 +02:00
John Whitmore ec65e266ae staging:rtl8192u: typedef struct tx_fwinfo_819x_usb remove typedef
Change structure tx_fwinfo_819x_usb from being typedef to being a simple
structure, without the typedef.

Clears the coding style issue flagged by checkpatch, (new type definitions)

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-13 11:40:46 +02:00
John Whitmore 6e5fde482b staging:rtl8192u: typedef struct tx_desc_cmd_819x_usb remove typedef
Change structure tx_desc_cmd_819x_usb from being typedef to being a simple
structure, without the typedef.

checkpatch warns about defining new types in the code.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-13 11:40:45 +02:00
John Whitmore c0f94a0aeb staging:rtl8192u: typedef struct tx_desc_819x_usb > struct tx_desc_819x_usb
Change structure tx_desc_819x_usb from being typedef to being a simple
structure, without the typedef.

checkpatch warns about defining new types in code.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-13 11:40:45 +02:00
Randy Dunlap 33d77fc00e staging/rtl8192u: fix defined but not used build warnings
Fix build warnings in rtl8192u when CONFIG_PROC_FS is not enabled
by marking the unused functions as __maybe_unused.

../drivers/staging/rtl8192u/r8192U_core.c:508:12: warning: 'proc_get_stats_ap' defined but not used [-Wunused-function]
../drivers/staging/rtl8192u/r8192U_core.c:527:12: warning: 'proc_get_registers' defined but not used [-Wunused-function]
../drivers/staging/rtl8192u/r8192U_core.c:568:12: warning: 'proc_get_stats_tx' defined but not used [-Wunused-function]
../drivers/staging/rtl8192u/r8192U_core.c:627:12: warning: 'proc_get_stats_rx' defined but not used [-Wunused-function]

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Jerry chuang <wlanfae@realtek.com>
Cc: devel@driverdev.osuosl.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-07 10:25:05 +02:00
Kenneth Lu e9d93154e5 staging: rtl8192u: remove redundant variables
Clean up W=1 warning: variable set but not used.

Signed-off-by: Kenneth Lu <kuohsianglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-17 09:05:13 +02:00