1840 Commits

Author SHA1 Message Date
Michael Straube
8942c3f19b staging: rtl8192e: add missing spaces around operators
Add missing spaces around operators to improve readability and clear
checkpatch issues.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20230518163201.14463-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-28 10:12:12 +01:00
Philipp Hortmann
2305232c94 staging: rtl8192e: Unlock wx_mutex not in rtllib_wx_set_scan
On start of rtllib_wx_set_scan lock was taken with
mutex_lock(&ieee->wx_mutex). Unlocking was done at the end of
schedule_work(&ieee->wx_sync_scan_wq) which lead to the error "lock held
when returning to user space!". Pushing lock to beginning of
ieee->wx_sync_scan_wq to improve overview. Removed lock from
rtllib_wx_set_scan as ieee->state, ieee->iw_mode and ieee->proto_started
are not protected in many other places.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230516192206.GA7710@matrix-ESPRIMO-P710
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-28 10:11:36 +01:00
Philipp Hortmann
35a70c0305 staging: rtl8192e: Exclude scan_mutex in rtllib_softmac_stop_scan
Exclude scan_mutex from cancel_delayed_work_sync(&ieee->softmac_scan_wq) as
ieee->softmac_scan_wq takes scan_mutex as well.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230514204033.GA20187@matrix-ESPRIMO-P710
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-28 10:11:34 +01:00
Philipp Hortmann
09201af57c staging: rtl8192e: Remove undefined function LedControlHandler
Remove function LedControlHandler as it is not defined. Remove resulting
unused local variables bLedBlinking, type, fc and LedAction.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/e3c29c3db33d314dffb673f8e563da0fb1f2b22f.1683960685.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-28 10:11:12 +01:00
Philipp Hortmann
b17bbcfbf3 staging: rtl8192e: Remove undefined function UpdateBeaconInterruptHandler
Remove function UpdateBeaconInterruptHandler as it is not defined.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/7cc71096fb1e6fee755dd96de0095ef1fb6d51e1.1683960685.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-28 10:11:12 +01:00
Philipp Hortmann
4e2ae4fffd staging: rtl8192e: Remove undefined function SetFwCmdHandler
Remove function SetFwCmdHandler as it is not defined.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/e141f44176aab38e11d7211ed79cebda68aea5ed.1683960685.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-28 10:11:12 +01:00
Philipp Hortmann
ccffcebb77 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>
2023-05-28 10:11:12 +01:00
Philipp Hortmann
ab2f13f290 staging: rtl8192e: Remove undefined function hard_start_xmit
Remove function hard_start_xmit as it is not defined. Equation
!ieee->hard_start_xmit always evaluates to true. When
(*ieee->hard_start_xmit)(txb, dev) == 0 is called the my computer is
freezing.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/603a143ba506ca031d7bd70a844b9f080872d601.1683960684.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-28 10:11:12 +01:00
Philipp Hortmann
42618f6fbd 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>
2023-05-28 10:11:12 +01:00
Philipp Hortmann
03477a4641 staging: rtl8192e: Remove functions rtllib_start_hw_scan and stop
Remove functions rtllib_start_hw_scan and rtllib_stop_hw_scan as they are
not defined.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/868524470321b8936f63d3ea06ba86c34fc89bb7.1683960684.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-28 10:11:12 +01:00
Philipp Hortmann
27b644c575 staging: rtl8192e: Remove undefined function data_hard_resume
Remove function data_hard_resume as it is not defined.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/07048d775759fffe1d1c63d0416214da8311129a.1683960684.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-28 10:11:11 +01:00
Philipp Hortmann
a634e89498 staging: rtl8192e: Remove undefined function data_hard_stop
Remove function data_hard_stop as it is not defined.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/4cc180b9538d6c9c32ff0f56646a642fa217a4a4.1683960684.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-28 10:11:11 +01:00
Yogesh Hegde
1f3413dc8e staging: rtl8192e: Refactor tmp_ofdm_index variable assignment
Refactor tmp_ofdm_index variable assignment to avoid multiple
assignments which is not accepted by checkpatch.

Signed-off-by: Yogesh Hegde <yogi.kernel@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/af7bc22ec142c33cf7346c1ab13d192b55095d1e.1683730854.git.yogi.kernel@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-13 20:13:43 +09:00
Yogesh Hegde
94c4126611 staging: rtl8192e: Rename tmpCCK20Mindex and tmpCCK40Mindex
Rename variable tmpCCK20Mindex to tmp_cck_20m_index and
tmpCCK40Mindex to tmp_cck_40m_index to avoid CamelCase which
is not accepted by checkpatch.

Signed-off-by: Yogesh Hegde <yogi.kernel@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/3e8b6cd85e6e4fcc934cc1d813f5f594cef8ff92.1683730854.git.yogi.kernel@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-13 20:13:43 +09:00
Yogesh Hegde
9c2501d68e staging: rtl8192e: Rename tmpOFDMindex and tmpCCKindex
Rename variable tmpOFDMindex to tmp_ofdm_index and
tmpCCKindex to tmp_cck_index to avoid CamelCase which
is not accepted by checkpatch.

Signed-off-by: Yogesh Hegde <yogi.kernel@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/48098479094e4562fe196cbce813476041a664df.1683730854.git.yogi.kernel@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-13 20:13:43 +09:00
Yogesh Hegde
2151bbbdf7 staging: rtl8192e: Rename tmpRegA and TempCCk
Rename variable tmpRegA to tmp_reg, TempCCk to tmp_cck
to avoid CamelCase which is not accepted by checkpatch.

Signed-off-by: Yogesh Hegde <yogi.kernel@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/c9c67f832db3a776c04f26e0afb083ae3ba99c07.1683730854.git.yogi.kernel@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-13 20:13:43 +09:00
John Grace
718ac8c8bd staging: rtl8192e: avoid CamelCase <RATRIndex>
Linux kernel coding-style suggests to not use mixed-case names. Fix
checkpatch issue by changing the variable name from camel case to snake
case.

Signed-off-by: John Grace <johnmgrace1@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/ZEcjdUR/bnln7Z1J@iris
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-08 16:08:46 +02:00
Yogesh Hegde
e7e0b078c9 staging: rtl8192e: Remove unused sens and max_sens from r8192_priv struct
The 'sens' and 'max_sens' fields in the 'r8192_priv' structure are no
longer used by the driver. This commit removes these fields.

Suggested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Yogesh Hegde <yogi.kernel@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/e117e958ada5695975deecfcd442703fd11bba3f.1682358035.git.yogi.kernel@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-08 16:08:08 +02:00
Yogesh Hegde
3877f73207 staging: rtl8192e: Remove unused _rtl92e_wx_set_sens function
After removal of rf_set_sens variable, the _rtl92e_wx_set_sens function
always returns an error code.
This commit removes the unused function and the respective ioctl.

Suggested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Yogesh Hegde <yogi.kernel@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/439386d2940fe70ec2092e87211df5e7946aab82.1682358035.git.yogi.kernel@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-08 16:08:04 +02:00
Yogesh Hegde
03b9a1ab7c staging: rtl8192e: Remove unused _rtl92e_wx_get_sens function
After removal of rf_set_sens variable, the _rtl92e_wx_get_sens function
always returns an error code.
This commit removes the unused function and the respective ioctl.

Suggested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Yogesh Hegde <yogi.kernel@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/eae80c4e2ac7f386c853cf824135b988c3666031.1682358035.git.yogi.kernel@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-08 16:07:31 +02:00
Yogesh Hegde
3a4d000ae7 staging: rtl8192e: Remove unused rf_set_sens variable
The rf_set_sens variable is declared but never set, so it is always NULL.
This commit cleans up the unused rf_set_sens variable and removes the
associated code that relied on it.

Specifically, the following changes have been made:
- Removed the `range->sensitivity` assignment, which was never used.
- Removed the sensitivity level get implementation, which always returns
  an error code.
- Removed the sensitivity level set implementation, which always returns
  an error code.
- Removed the `rf_set_sens` variable.

Suggested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Yogesh Hegde <yogi.kernel@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/5a9767fab76b1836ea7881994ffb3593c1ab12bf.1682358035.git.yogi.kernel@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-08 16:07:31 +02:00
Stephan Snyman
77f2760e71 staging: rtl8192e: add missing braces {}
Add missing braces to if/else statements to adhere to the
Linux kernel coding-style guidelines.
These issues were reported by checkpatch.pl

"CHECK: braces {} should be used on all arms of this statement"

Signed-off-by: Stephan Snyman <rooiratel@tinyglitch.net>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230420133209.4661-1-rooiratel@tinyglitch.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-08 16:07:27 +02:00
Philipp Hortmann
3fac2397f5 staging: rtl8192e: Fix W_DISABLE# does not work after stop/start
When loading the driver for rtl8192e, the W_DISABLE# switch is working as
intended. But when the WLAN is turned off in software and then turned on
again the W_DISABLE# does not work anymore. Reason for this is that in
the function _rtl92e_dm_check_rf_ctrl_gpio() the bfirst_after_down is
checked and returned when true. bfirst_after_down is set true when
switching the WLAN off in software. But it is not set to false again
when WLAN is turned on again.

Add bfirst_after_down = false in _rtl92e_sta_up to reset bit and fix
above described bug.

Fixes: 94a799425eee ("From: wlanfae <wlanfae@realtek.com> [PATCH 1/8] rtl8192e: Import new version of driver from realtek")
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230418200201.GA17398@matrix-ESPRIMO-P710
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-20 13:55:20 +02:00
Philipp Hortmann
4de65f2b97 staging: rtl8192e: Remove unchanged variables bfsync_processing and more
Remove unchanged variable bfsync_processing and
rfc_txpowertrackingindex_real to shorten code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/cb609f904d988febaa579526514586877b1dabf7.1681627603.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-20 13:55:20 +02:00
Philipp Hortmann
548534d95b staging: rtl8192e: Remove unchanged variable frame_sync_monitor
Remove unchanged variable frame_sync_monitor and equations that have
always the same result to shorten code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/0c4bdca5f5dbb93bb05c6b7f32136d4dfb3b0e4b.1681627603.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-20 13:55:20 +02:00
Philipp Hortmann
dc8aaa4f32 staging: rtl8192e: Remove unchanged variable chan_forced
Remove unchanged variable chan_forced and equations that have always the
same result to shorten code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/3f218531a9d31c399d1351d3da7f9ca13d20df0c.1681627603.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-20 13:55:20 +02:00
Philipp Hortmann
93bf41cc8a staging: rtl8192e: Remove set to true while true of bfirst_after_down
Remove set to true while true of bfirst_after_down to shorten code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/053ab341e80909e81867e42ec4c077e76b762051.1681627603.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-20 13:55:20 +02:00
Philipp Hortmann
bfc1bb7866 staging: rtl8192e: Remove second initialization of bActuallySet
Remove second initialization of bActuallySet to shorten code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/ebf51fbd56bad4f8fd7fb51fe031f376c3ab6d2c.1681627603.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-20 13:55:20 +02:00
Philipp Hortmann
b0e60e96af staging: rtl8192e: Remove unused macro RT_SET_PS_LEVEL
Remove unused macro RT_SET_PS_LEVEL to shorten code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/0d397210830f77ad3231c3b4a0465ae89aacb962.1681627603.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-20 13:55:19 +02:00
Philipp Hortmann
88b81bddf1 staging: rtl8192e: Remove unused function rtl92e_disable_nic
Remove unused function rtl92e_disable_nic to shorten code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/5ce2ef58f66e25d7db7432c56c7b7c37a2b15fc1.1681627603.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-20 13:55:19 +02:00
Philipp Hortmann
8020247877 staging: rtl8192e: Remove unchanged variable RegRfPsLevel
Remove unchanged variable RegRfPsLevel and equations that have always the
same result to shorten code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/49162b0041db33c6c43c4126839baed69c76cb89.1681627603.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-20 13:55:19 +02:00
Philipp Hortmann
1cadfcfe35 staging: rtl8192e: Remove unused variable RF_Type
Remove unused variable RF_Type.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/7710a87f627dcfd2d0c34f14f583625ffab10660.1680902603.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-15 18:03:59 +02:00
Philipp Hortmann
a273033cf4 staging: rtl8192e: Remove one of two checks for hardware RTL8192SE
Check for hardware RTL8192SE is done in function _rtl92e_pci_probe()
directly and also two lines later in function rtl92e_check_adapter().
Remove top level check to increase readability.
This pci_read does not follow a pci_write to ensure data is written to
the device.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/4126cca73739c75b1a0379af2ef8b0c63a705639.1680902603.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-15 18:03:59 +02:00
Philipp Hortmann
edc332a9f4 staging: rtl8192e: Remove unused function _rtl92e_dm_init_wa_broadcom_iot
Remove unused function _rtl92e_dm_init_wa_broadcom_iot and the variables
that are not any longer used.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/0e7a2a5b9edc85b7f8e3fc0f9e0e6ab7f2830d02.1680902603.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-15 18:03:59 +02:00
Philipp Hortmann
748b5db6a9 staging: rtl8192e: Remove macro IS_HARDWARE_TYPE_8192SE
Remove unused macro IS_HARDWARE_TYPE_8192SE as it is used only in code
areas that are not executed when 8192SE hardware is found.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/e9b19862ace002462e870e62c6f62bab3cc81c5a.1680902603.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-15 18:03:59 +02:00
Sumitra Sharma
41500f4535 staging: rtl8192e: Add blank lines after declarations
Add blank lines after declarations to adhere to the Linux kernel
coding-style. Check reported by checkpatch.pl

"CHECK: Please use a blank line after function/struct/union/enum
declarations"

Signed-off-by: Sumitra Sharma <sumitraartsy@gmail.com>
Link: https://lore.kernel.org/r/20230405063003.GA218972@sumitra.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-05 16:39:19 +02:00
Khadija Kamran
85f76d9301 staging: rtl8192e: avoid CamelCase <dot11RSNAStatsCCMPDecryptErrors>
Linux kernel coding-style suggests to not use mixed-case names. Fix
checkpatch issue by changing the variable name from camel case to snake
case.

Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/d29ff5db6f19d79ee762a835db88155bee2aefba.1680445545.git.kamrankhadijadj@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-05 16:39:08 +02:00
Khadija Kamran
f60fc1311b staging: rtl8192e: avoid CamelCase <dot11RSNAStatsCCMPReplays>
Linux kernel coding-style suggests to not use mixed-case names. Fix
checkpatch issue by changing the variable name from camel case to snake
case.

Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/7166160c0face9e32dbb28c44727eb8856173f0a.1680445545.git.kamrankhadijadj@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-05 16:39:08 +02:00
Khadija Kamran
73749c7fb4 staging: rtl8192e: avoid CamelCase <dot11RSNAStatsCCMPFormatErrors>
Linux kernel coding-style suggests to not use mixed-case names. Fix
checkpatch issue by changing the variable name from camel case to snake
case.

Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/ebfd9c40400eac872b9af2a5120b0829ff71e077.1680445545.git.kamrankhadijadj@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-05 16:39:08 +02:00
Khadija Kamran
7cf3f17b58 staging: rtl8192e: fix alignment to match open parenthesis
Fix alignemnt to match opening parenthesis as suggested by Linux kernel
coding-style. This issue is reported by checkpatch.

Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/76814f7a2a026ef195334b0c42ecd2aeb8e8ea40.1680445545.git.kamrankhadijadj@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-05 16:39:08 +02:00
Khadija Kamran
f395d3f9d2 staging: rtl8192e: remove extra blank lines in rtllib_crypt_ccmp.c
Remove extra blank lines as suggested by the Linux kernel coding-style.
These issues were reported by checkpatch.

"CHECK: Please don't use multiple blank lines"

Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/283265f6a5ff938f8425e14af86cee9e2da36318.1680445545.git.kamrankhadijadj@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-05 16:39:08 +02:00
Philipp Hortmann
3642e50acc staging: rtl8192e: Remove case customer_id = RT_CID_DEFAULT, ..
customer_id is initialize to zero. Changing customer_id to RT_CID_DEFAULT
will not change customer_id as it is already zero. default and
EEPROM_CID_WHQL contain only a break. Remove useless code lines to
increase readability.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/58df9db5da84991206266e739b2a12c893d1be8e.1680427945.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-05 16:38:23 +02:00
Philipp Hortmann
795916c1c8 staging: rtl8192e: Remove case customer_id = RT_CID_819x_CAMEO, ..
customer_id is initialize to zero. Changing customer_id to
RT_CID_819x_CAMEO, RT_CID_819x_RUNTOP, RT_CID_Nettronix or RT_CID_PRONET
would not change the program execution as there is no equation for
RT_CID_819x_CAMEO, RT_CID_819x_RUNTOP, RT_CID_Nettronix or RT_CID_PRONET.
Remove useless code lines to increase readability.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/b546933897acc20a6ac5be2bd5ef5ad979599c66.1680427945.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-05 16:38:23 +02:00
Philipp Hortmann
8e45222d79 staging: rtl8192e: Remove case customer_id = RT_CID_DLINK
customer_id is initialize to zero. Changing customer_id to RT_CID_DLINK
would not change the program execution as there is no equation for
RT_CID_DLINK. Remove useless code lines to increase readability.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/e4ecef11015c32c9909cd07e0939c4de53fd501a.1680427945.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-05 16:38:23 +02:00
Philipp Hortmann
0be699ab84 staging: rtl8192e: Remove local variable Value and powerlevelOFDM24G
powerlevelOFDM24G is set to priv->pwr_track. Then Value is set to
powerlevelOFDM24G and then only once used. Remove both variables to
increase readability.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/2076dc2f8f5afc11cbab23bc3f5d4ace9bf33bfd.1680427945.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-05 16:38:23 +02:00
Philipp Hortmann
b7119698bc staging: rtl8192e: Remove enum RF_1T2R and RF_Type
enum RF_1T2R is used to initialize a local variable RF_Type that is then
shifted. The result of the shift is zero. Remove code that has always
the same result to increase readability.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/6c29e709f5c328703870ca8e7d61ee6338886fa7.1680427945.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-05 16:38:23 +02:00
Philipp Hortmann
d8571801a6 staging: rtl8192e: Remove RF_Type from .._dm_tx_update_tssi_weak_signal
Remove RF_Type from _rtl92e_dm_tx_update_tssi_weak_signal and
_rtl92e_dm_tx_update_tssi_strong_signal as it is unused.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/95744a9d271723b44b92465809d092f90edf9bc9.1680427945.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-05 16:38:22 +02:00
Khadija Kamran
0cda003f1d staging: rtl8192e: fix unbalanced braces around else
Balance if/else braces as recommended by checkpatch.pl

Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
Link: https://lore.kernel.org/r/ZCISGaFELBfDyGRT@khadija-virtual-machine
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-28 13:35:03 +02:00
Philipp Hortmann
35c2274d34 staging: rtl8192e: Remove wireless mode WIRELESS_MODE_N_5G
Remove WIRELESS_MODE_N_5G from equations as it is not supported by
hardware and to improve readability.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/fdefd4d706493fa3f080550d31eb5bea3f4e1a7e.1679949171.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-28 13:34:39 +02:00
Philipp Hortmann
a993465cd1 staging: rtl8192e: Remove wireless modes A, N_5G from rtl92e_set_channel
Remove WIRELESS_MODE_N_5G and WIRELESS_MODE_A as those are not supported
by hardware and to improve readability.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/aaaf832fe5f90ad2c618bef22c1bdbd5209c4359.1679949171.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-28 13:34:39 +02:00