Commit Graph

1905 Commits

Author SHA1 Message Date
Kees Cook aee17df05e staging: rtl8192e: Annotate struct rtllib_txb with __counted_by
Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
(for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).

As found with Coccinelle[1], add __counted_by for struct rtllib_txb.

[1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Cc: linux-staging@lists.linux.dev
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230817204523.never.034-kees@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-22 15:48:05 +02:00
Philipp Hortmann 42f9bcfc71 staging: rtl8192e: Remove unsupported mode IW_MODE_MESH
Tasklet irq_rx_tasklet is scheduled when hw is receiving frames. Function
_rtl92e_irq_rx_tasklet() is then called which calls then
_rtl92e_rx_normal(). In _rtl92e_rx_normal() all frames are processed by
rtllib_rx(). When ieee->iw_mode is IW_MODE_MESH the function returns
0. The calling function then calls: dev_kfree_skb_any() which clears
the skb. So the driver clears all packets received in this mode. Remove
dead code in mode IW_MODE_MESH.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/54230361abba9f33827eac9bf5074dd9f62d787b.1691908402.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-22 15:44:31 +02:00
Philipp Hortmann 31a14cba17 staging: rtl8192e: Remove unsupported mode IW_MODE_REPEAT
Tasklet irq_rx_tasklet is scheduled when hw is receiving frames. Function
_rtl92e_irq_rx_tasklet() is then called which calls then
_rtl92e_rx_normal(). In _rtl92e_rx_normal() all frames are processed by
rtllib_rx(). When ieee->iw_mode is IW_MODE_REPEAT the function returns
0. The calling function then calls: dev_kfree_skb_any() which clears
the skb. So the driver clears all packets received in this mode. Remove
dead code in mode IW_MODE_REPEAT.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/dc6a0ac89970f5b80a552453a9d057c24f53f43b.1691908402.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-22 15:44:31 +02:00
Philipp Hortmann da1e39683a staging: rtl8192e: Remove unused function rtllib_start_master_bss()
Remove unused functions rtllib_start_master_bss(), rtllib_rx_assoc_rq()
and rtllib_rx_auth_rq() and resulting unused functions.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/ac2012d94fe4ff705cc900bb1cf2d58bc81c77f0.1691908402.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-22 15:44:31 +02:00
Philipp Hortmann 2b632f7f4a staging: rtl8192e: Remove unsupported mode IW_MODE_MASTER
Tasklet irq_rx_tasklet is scheduled when hw is receiving frames. Function
_rtl92e_irq_rx_tasklet() is then called which calls then
_rtl92e_rx_normal(). In _rtl92e_rx_normal() all frames are processed by
rtllib_rx(). When ieee->iw_mode is IW_MODE_MASTER the function returns
0. The calling function then calls: dev_kfree_skb_any() which clears the
skb. So the driver clears all packets received in this mode. Remove dead
code in mode IW_MODE_MASTER.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/9cd4574e4cfe0a2d7afce03c9b868757e215a23c.1691908402.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-22 15:44:31 +02:00
Tree Davies c3bdcb9496 Staging: rtl8192e: Rename function RxBaInactTimeout
Rename function RxBaInactTimeout to rtllib_rx_ba_inact_timeout in order
to Fix checkpatch warning: Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Link: https://lore.kernel.org/r/20230807054732.1864827-6-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-09 14:25:17 +02:00
Tree Davies 8dcf97801b Staging: rtl8192e: Rename function TxBaInactTimeout
Rename function TxBaInactTimeout to rtllib_tx_ba_inact_timeout in order
to Fix checkpatch warning: Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Link: https://lore.kernel.org/r/20230807054732.1864827-5-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-09 14:25:17 +02:00
Tree Davies 0936cda7a0 Staging: rtl8192e: Rename function BaSetupTimeOut
Rename function BaSetupTimeOut to rtllib_ba_setup_timeout in order to Fix
checkpatch warning: Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Link: https://lore.kernel.org/r/20230807054732.1864827-4-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-09 14:25:17 +02:00
Tree Davies c54690eb85 Staging: rtl8192e: Rename function TsInitDelBA
Rename function TsInitDelBA to rtllib_ts_init_del_ba in order to Fix
checkpatch warning: Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Link: https://lore.kernel.org/r/20230807054732.1864827-3-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-09 14:25:17 +02:00
Tree Davies c061492843 Staging: rtl8192e: Rename function TsInitAddBA
Rename function TsInitAddBA to rtllib_ts_init_add_ba in order to Fix
checkpatch warning: Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Link: https://lore.kernel.org/r/20230807054732.1864827-2-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-09 14:25:17 +02:00
Philipp Hortmann f5c9676e48 staging: rtl8192e: Remove DefaultKey from rtl92e_set_swcam
Function rtl92e_set_swcam() has parameter DefaultKey which is in all calls
0. Remove dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/9390014fe045028ac2a32ce7c9745c7cddbd4adf.1690615475.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-30 12:29:05 +02:00
Philipp Hortmann 60a0e1a7dd staging: rtl8192e: Remove is_mesh from rtl92e_set_swcam
Function rtl92e_set_swcam() has parameter is_mesh which is in all calls 0.
Remove dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/5d324977054f3a27b89c5c73da82e9c01c6dca45.1690615475.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-30 12:29:05 +02:00
Philipp Hortmann 30afa99d45 staging: rtl8192e: Remove is_mesh from rtllib_softmac_scan_syncro
Function rtllib_softmac_scan_syncro() has unused parameter is_mesh.
Remove dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/9fcd1193c155ef992493af3526442fb84032166f.1690615475.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-30 12:29:05 +02:00
Philipp Hortmann 349db42133 staging: rtl8192e: Remove is_mesh from rtllib_start_scan_syncro
Function rtllib_start_scan_syncro() has parameter is_mesh which is in all
calls 0. Remove dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/6050a1d7764364190dda252f79d75c7cc47143de.1690615475.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-30 12:29:05 +02:00
Philipp Hortmann fc6ea9d3ef staging: rtl8192e: Remove is_mesh from rtllib_send_probe_requests
Function rtllib_send_probe_requests() has unused parameter is_mesh.
Remove dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/06a4c66112e22d6131711969dd4f5ac9fab91426.1690615475.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-30 12:29:05 +02:00
Philipp Hortmann bbf2b164d2 staging: rtl8192e: Remove unused variable is_mesh from rtllib_send_probe
Function rtllib_send_probe() has unused parameter is_mesh. Remove dead
code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/5b1f4b9d8f81790c151adc7f9b6611f0b5cd94a5.1690615475.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-30 12:29:05 +02:00
Philipp Hortmann 206e69b636 staging: rtl8192e: Remove empty function rtllib_rx_Mesh()
Function rtllib_rx_Mesh() returns always 0. Variable ret is already
initialized with 0. Remove dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/7c1aee16a95cd52149faf80c83b6fa19d6499913.1690615475.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-30 12:29:05 +02:00
Philipp Hortmann 37a207d841 staging: rtl8192e: Remove empty function rtllib_rx_Master()
Function rtllib_rx_Master() returns always 0. Variable ret is already
initialized with 0. Remove dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/9604360121c5547cfaa282f73af5b948cdfbd769.1690615475.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-30 12:29:05 +02:00
Philipp Hortmann 9bd15c51e8 staging: rtl8192e: Remove unused variable intb in _rtl92e_irq()
Remove unused variable intb in _rtl92e_irq().

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/df6efb730ba4119f00b5bcc0d760c9b1fd245235.1690615475.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-30 12:29:05 +02:00
Philipp Hortmann 810d7b8845 staging: rtl8192e: Remove unused variable p_intb
Remove unused variable p_intb of rtl92e_ack_irq.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/196f555d3762bf4fa8302f19b46f1510ea68cb31.1690615475.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-30 12:29:05 +02:00
Tree Davies 7363749d09 Staging: rtl8192e: Rename function ResetBaEntry
Rename function ResetBaEntry to rtllib_reset_ba_entry in order to Fix
checkpatch warning: Avoid CamelCase

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Link: https://lore.kernel.org/r/20230728061930.624540-6-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-30 12:24:37 +02:00
Tree Davies c928e84ce5 Staging: rtl8192e: Rename function RxTsDeleteBA
Rename function RxTsDeleteBA to rx_ts_delete_ba in order to Fix checkpatch
warning: Avoid CamelCase

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Link: https://lore.kernel.org/r/20230727061948.579480-5-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27 10:05:59 +02:00
Tree Davies 7b31905582 Staging: rtl8192e: Rename function TxTsDeleteBA
Rename function TxTsDeleteBA to tx_ts_delete_ba in order to Fix checkpatch
warning: Avoid CamelCase

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Link: https://lore.kernel.org/r/20230727061948.579480-4-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27 10:05:59 +02:00
Tree Davies 8dd56eaa94 Staging: rtl8192e: Rename function DeActivateBAEntry
Rename function DeActivateBAEntry to deactivate_ba_entry in order to Fix
checkpatch warning: Avoid CamelCase

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Link: https://lore.kernel.org/r/20230727061948.579480-3-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27 10:05:59 +02:00
Tree Davies ca77687ae3 Staging: rtl8192e: Rename function ActivateBAEntry
Rename function ActivateBAEntry to activate_ba_entry in order to Fix
checkpatch warning: Avoid CamelCase

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Link: https://lore.kernel.org/r/20230727061948.579480-2-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27 10:05:59 +02:00
Yogesh Hegde db4479215c staging: rtl8192e: Rename variable HighRSSIThreshForRA
Rename variable HighRSSIThreshForRA to high_rssi_thresh_for_ra 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/e4a09d927eaa9c185afce3a58cd434326de735dc.1688299890.git.yogi.kernel@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27 09:59:37 +02:00
Yogesh Hegde a93b58da1e staging: rtl8192e: Rename variable LowRSSIThreshForRA
Rename variable LowRSSIThreshForRA to low_rssi_thresh_for_ra 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/ebea3e75dc84a6d77750c0598ab12d04ad55c676.1688299890.git.yogi.kernel@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27 09:59:37 +02:00
Yogesh Hegde cea1733a07 staging: rtl8192e: Rename variable targetRATR
Rename variable targetRATR to target_ratr 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/ef60d870d643a3774363efdac798e059ea5b8f85.1688299890.git.yogi.kernel@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27 09:59:37 +02:00
Yogesh Hegde 42f5942b0e staging: rtl8192e: Rename variable currentRATR
Rename variable currentRATR to current_ratr 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/091a5abb231fb5c88d47f329ec3b5133b08d6b23.1688299890.git.yogi.kernel@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27 09:59:37 +02:00
Philipp Hortmann a90928f764 staging: rtl8192e: Remove variable ieee->short_slot
ieee->short_slot also named priv->rtllib->short_slot is initialized to 1
and then unchanged. All evaluations will result accordingly. Remove
resulting dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/74fe53ccfafe2e0e18319b5502ed83544cc3ffd8.1687583718.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27 09:57:39 +02:00
Philipp Hortmann c011feb40a staging: rtl8192e: Remove variable priv->reg_chnl_plan
Remove variable priv->reg_chnl_plan as it is only once initialized and
only once evaluated. So the result is always the same. Remove dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/0dd4f8eded4b172d75f0cb5d5a34ba3dc66e2e8f.1687583718.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27 09:57:39 +02:00
Philipp Hortmann bbcb3453f3 staging: rtl8192e: Remove variable bdisable_nic
Remove variable bdisable_nic as always set to false. Remove dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/6b083ce8c4aaf42f366c365cbc47178afa2636d4.1687583718.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27 09:57:39 +02:00
Philipp Hortmann bc9efc46eb staging: rtl8192e: Remove variable card_type
Remove variable card_type as it is initialized but never unused.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/f0f40f574ac4837bd2be3b6384ae42d9aabf1832.1687583718.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27 09:57:38 +02:00
Philipp Hortmann a56cbbcc73 staging: rtl8192e: Remove variable host_decrypt as it is constant
ieee->host_decrypt also named priv->rtllib->host_decrypt is initialized
to 1 and then unchanged. All evaluations will result accordingly. Remove
resulting dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/637350e9bc3edded665009a30d12350157e8a9a9.1687583718.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27 09:57:38 +02:00
Philipp Hortmann 1047daace0 staging: rtl8192e: Remove variable host_encrypt as it is constant
ieee->host_encrypt also named priv->rtllib->host_encrypt is initialized
to 1 and then unchanged. All evaluations will result accordingly. Remove
resulting dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/bc4ea0492306f708f0e5cac6bf0239deb3cd9a80.1687583718.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27 09:57:38 +02:00
Philipp Hortmann d6128d77ff staging: rtl8192e: Remove variable modulation as it is constant
ieee->modulation is initialized to 3 and then unchanged. All evaluations
will result accordingly. Remove resulting dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/ebd543d097a65f105078c71faceaed2a4d5e7b55.1687583718.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27 09:57:38 +02:00
Philipp Hortmann 70a49b83bb staging: rtl8192e: Remove empty function AdmitTS
Remove call of function and empty function AdmitTS.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/572feb55932b59c7fc652183877698f8b1123d8d.1687583718.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27 09:57:38 +02:00
Philipp Hortmann fa3f651fea staging: rtl8192e: Remove unused timer InactTimer
Remove unused timer InactTimer and all the resulting unused code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/1a7acdd76037327602858a8634d502b46cdc8786.1687583718.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27 09:57:38 +02:00
Philipp Hortmann dbb70f25b3 staging: rtl8192e: Remove equation of local variable InactTime of AdmitTS
Remove equation of local variable InactTime of AdmitTS as AdmitTS is only
once called with InactTime as 0. The equation is always false and
therefore dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/ff2d60f157059e5440a4b583f2604d99db4d8d2b.1687583718.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27 09:57:38 +02:00
Philipp Hortmann 74d118d51f staging: rtl8192e: Remove unused timer SetupTimer
Remove unused timer SetupTimer and all the resulting unused code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/4bbbd60d84e15fdb7bffde98a687ed168a4dfbbd.1687583718.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27 09:57:38 +02:00
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