1865 Commits

Author SHA1 Message Date
Tree Davies
4a22870ced staging: rtl8192e: Remove whitespace and blank lines
This patch cleans up extraneous whitespace for the
struct rt_hi_throughput definition.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Message-ID: <ZJODGu4pvNNQc134@tacos.darkphysics>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-23 10:18:27 +02:00
Michael Straube
32db98b92c 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>
2023-06-20 16:14:47 +02:00
Michael Straube
910b5ee9b3 staging: rtl8192e: remove comparison to true
Remove a comparison to true reported by checkpatch.

CHECK: Using comparison to true is error prone

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230619150953.22484-5-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-20 16:14:32 +02:00
Michael Straube
d9902ac3a7 staging: rtl8192e: remove return statement from void function
Remove unnecessary return statement from the void function
rtl92e_config_mac(). Issue found by checkpatch.

WARNING: void function return statements are not generally useful

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230619150953.22484-4-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-20 16:14:32 +02:00
Michael Straube
18b89d1923 staging: rtl8192e: convert else if sequence to switch
Convert a sequence of else if statements that all check the same
variable to a single switch statement. With a switch statement it is
easier to see what is going on. Additionally this clears a checkpatch
warning.

WARNING: braces {} are not necessary for any arm of this statement

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230619150953.22484-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-20 16:14:32 +02:00
Michael Straube
56424246bb staging: rtl8192e: clean up brace coding style issues
Clean up brace coding style in if/else statements to improve
readability and clear checkpatch issues.

CHECK: braces {} should be used on all arms of this statement
CHECK: Unbalanced braces around else statement

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230619150953.22484-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-20 16:14:32 +02:00
Yogesh Hegde
1e30298461 staging: rtl8192e: Rename variable InitialGainHandler
Rename variable InitialGainHandler to init_gain_handler to avoid
CamelCase which is not accepted by checkpatch.

Signed-off-by: Yogesh Hegde <yogi.kernel@gmail.com>
Link: https://lore.kernel.org/r/a2f37a6cb962e9775978ae5f4fde958b74806a4e.1687183827.git.yogi.kernel@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-19 17:14:13 +02:00
Yogesh Hegde
a6efe935c7 staging: rtl8192e: Rename variable LeisurePSLeave
Rename variable LeisurePSLeave to leisure_ps_leave to avoid
CamelCase which is not accepted by checkpatch.

Signed-off-by: Yogesh Hegde <yogi.kernel@gmail.com>
Link: https://lore.kernel.org/r/3c63f4d750b7365f233c35c676325c5e4ca54a4c.1687183827.git.yogi.kernel@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-19 17:14:13 +02:00
Yogesh Hegde
0ec908bc79 staging: rtl8192e: Rename variable SetBWModeHandler
Rename variable SetBWModeHandler to set_bw_mode_handler to avoid
CamelCase which is not accepted by checkpatch.

Signed-off-by: Yogesh Hegde <yogi.kernel@gmail.com>
Link: https://lore.kernel.org/r/fe6c16cfe1d8f7ff41b5fce90fc63383fbfec4f5.1687183827.git.yogi.kernel@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-19 17:14:13 +02:00
Yogesh Hegde
413cc33f27 staging: rtl8192e: Rename variable SetWirelessMode
Rename variable SetWirelessMode to set_wireless_mode to avoid
CamelCase which is not accepted by checkpatch.

Signed-off-by: Yogesh Hegde <yogi.kernel@gmail.com>
Link: https://lore.kernel.org/r/c0a65d217d272bf457917c89462c49e67bbfedb2.1687183827.git.yogi.kernel@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-19 17:14:13 +02:00
Philipp Hortmann
57e2936e22 staging: rtl8192e: Rename RTLLIB_LINKED_SCANNING
Rename RTLLIB_LINKED_SCANNING to MAC80211_LINKED_SCANNING to align with
rtlwifi driver.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/25b97cd436c636e750c50f0c03386fcc46e56610.1687007788.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-19 14:54:51 +02:00
Philipp Hortmann
2445e3a582 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>
2023-06-19 14:54:51 +02:00
Philipp Hortmann
fff6e86993 staging: rtl8192e: Rename RTLLIB_NOLINK to MAC80211_NOLINK
Rename RTLLIB_NOLINK to MAC80211_NOLINK to align with rtlwifi driver.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/74feefdf800304deaf918efbc04344865f7aa01d.1687007788.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-19 14:54:51 +02:00
Philipp Hortmann
52ac3ff9d6 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>
2023-06-19 14:54:51 +02:00
Philipp Hortmann
f668980849 staging: rtl8192e: Rename rtllib_state to rtl_link_state
Rename rtllib_state to rtl_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/f21541c16c83356e3cd1e08059847ef9a9eb2ef8.1687007788.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-19 14:54:51 +02:00
Philipp Hortmann
0392ac23a9 staging: rtl8192e: Remove unused enum led_ctl_mode
Remove unused enum led_ctl_mode to shorten code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/554729dba4d9358bdd6146ebd8fa17a0f525702e.1687007788.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-19 14:54:51 +02:00
Philipp Hortmann
5cac011cf1 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>
2023-06-19 14:54:50 +02:00
Philipp Hortmann
26cdc2b7bd staging: rtl8192e: Remove unsupported modes IEEE_N_5G and IEEE_A
Remove unsupported modes IEEE_N_5G and IEEE_A as those are not supported
by hardware and are not offered by user software. Remove resulting dead
code and unused defines.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/40c5b21654376348144280dbe45203140c6e6807.1687007788.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-19 14:54:50 +02:00
Philipp Hortmann
90262a95b0 staging: rtl8192e: Remove variable stats->freq as it is constant
stats->freq is initialized with 1 and then unchanged. All evaluations
will result accordingly. Remove resulting dead code and unused defines.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/4d8801d37889e6af4f43dff10d1426fc7918f562.1687007788.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-19 14:54:50 +02:00
Philipp Hortmann
5dfc6a8ae2 staging: rtl8192e: Add missing entry CFG80211 in Kconfig
Add missing entry CFG80211 in Kconfig to ensure that CFG80211 is
available when selecting hardware rtl8192e.

Fixes: d88b46ce5ab8 ("staging: rtl8192e: Add cfg80211.h and remove defined variables")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202306180620.Ew55XtKJ-lkp@intel.com/
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230618194454.GA10653@matrix-ESPRIMO-P710
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-19 14:54:34 +02:00
Philipp Hortmann
01da3efafe staging: rtl8192e: Use standard api to calculate channel to frequency
Use ieee80211_channel_to_freq_khz() to calculate channel to frequency to
omit proprietary code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Message-ID: <c3a94a403d04ba810cffff8afa734a94a218a4e9.1686166624.git.philipp.g.hortmann@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-15 12:47:06 +02:00
Philipp Hortmann
4e9e2c8026 staging: rtl8192e: Use standard api to calculate frequency to channel
Use ieee80211_freq_khz_to_channel() to calculate frequency to channel to
omit proprietary code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Message-ID: <fc332e81f6677965e9e51f1fcef9815997effcb5.1686166624.git.philipp.g.hortmann@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-15 12:47:06 +02:00
Philipp Hortmann
d88b46ce5a staging: rtl8192e: Add cfg80211.h and remove defined variables
Add cfg80211 and remove defined variables rfc1042_header and
bridge_tunnel_header as they are then already defined. Usage of cfg80211
is required to merge driver into wireless subsystem.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Message-ID: <20230603085251.GA20230@matrix-ESPRIMO-P710>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-15 12:46:35 +02:00
Michael Straube
c88af76f71 staging: rtl8192e: remove blank lines
Remove unnecessary blank lines reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Message-ID: <20230531053118.17053-1-straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-15 12:46:35 +02:00
David Tadokoro
c6e9da9d55 staging: rtl8192e: clean unnecessary braces warning on r8192E_phy.c
Clean a checkpatch.pl warning of type "braces {} are not necessary for
single statement blocks" on r8192E_phy.c file.

Signed-off-by: David Tadokoro <davidbtadokoro@usp.br>
Link: https://lore.kernel.org/r/20230528154010.3068-1-davidbtadokoro@usp.br
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-28 16:59:29 +01:00
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