aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192e (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-09-30staging: rtl8192e: Rename variable Bandwidth to avoid CamelCaseYogesh Hegde6-13/+13
Rename variable Bandwidth to bandwidth to avoid CamelCase which is not accepted by checkpatch.pl . Signed-off-by: Yogesh Hegde <yogi.kernel@gmail.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/20220928180350.GA82748@zephyrus Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-27staging: rtl8192e: cmdpkt: Use skb_put_data() instead of skb_put/memcpy pairShang XiaoJing1-2/+1
Use skb_put_data() instead of skb_put() and memcpy(), which is shorter and clear. Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com> Link: https://lore.kernel.org/r/20220927024220.14044-1-shangxiaojing@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-26staging: rtl8192e: Remove unused variables ForcedAMSDUMaxSize, ...Philipp Hortmann2-15/+0
Remove unused variables that are may just once written but never read ForcedAMSDUMaxSize, PeerBandwidth, SwBwStep, bIsPeerBcm and bAcceptAddbaReq to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/0f3e63030511f72dbadc0368fd5e2dbd3ff84e07.1664055213.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-26staging: rtl8192e: Rename CurrentMPDU..., ForcedAMPDU... and ForcedMPDU...Philipp Hortmann3-10/+10
Rename variable CurrentMPDUDensity to current_mpdu_density, ForcedAMPDUFactor to forced_ampdu_factor and ForcedMPDUDensity to forced_mpdu_density to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/4fb37ad6dab9addccf99a41a861220840c123e9b.1664055213.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-26staging: rtl8192e: Rename SelfMimoPs, CurrentOpMode and bForcedShortGIPhilipp Hortmann3-13/+13
Rename variable SelfMimoPs to self_mimo_ps, CurrentOpMode to current_op_mode and bForcedShortGI to forced_short_gi to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/4c59f62a95b9a77711284998b98fbc559b8db813.1664055213.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-26staging: rtl8192e: Rename PeerMimoPs, IOTAction and IOTRaFuncPhilipp Hortmann8-48/+48
Rename variable PeerMimoPs to peer_mimo_ps, IOTAction to iot_action and IOTRaFunc to iot_ra_func to avoid CamelCase which is not accepted by checkpatch. Added spaces around '&' as proposed by checkpatch. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/2a8ce7bff9a00fe44c057242cedb27ca91219137.1664055213.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-26staging: rtl8192e: Rename RxRe...WinSize, RxReorder... and RxReorderDr...Philipp Hortmann4-9/+9
Rename variable RxReorderWinSize to rx_reorder_win_size, RxReorderPendingTime to rx_reorder_pending_time and RxReorderDropCounter to rx_reorder_drop_counter to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/e09ef6e2edc88e32782202589a9230204b547a9c.1664055213.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-26staging: rtl8192e: Rename szRT2RTAggBuffer, bRegRxRe... and bCurRxReo...Philipp Hortmann4-11/+11
Rename variable szRT2RTAggBuffer to sz_rt2rt_agg_buf, bRegRxReorderEnable to reg_rx_reorder_enable and bCurRxReorderEnable to cur_rx_reorder_enable to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/af445e0a80dc8e153a1ba81df99309f19a69d6cb.1664055213.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-26staging: rtl8192e: Rename bSwBwInPro..., bRegRT2RTAg... and bCurrentRT...Philipp Hortmann3-18/+18
Rename variable bSwBwInProgress to sw_bw_in_progress, bRegRT2RTAggregation to reg_rt2rt_aggregation and bCurrentRT2RTAggregation to current_rt2rt_aggregation to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/868f9db0e29bd170129f90bdbcc14238a750c440.1664055213.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-26staging: rtl8192e: Rename dot11Cur..., bCurTxBW40MHz and bCurrentRT2...Philipp Hortmann7-22/+22
Rename variable dot11CurrentPreambleMode to dot11_current_preamble_mode, bCurTxBW40MHz to cur_tx_bw40mhz and bCurrentRT2RTLongSlotTime to current_rt2rt_long_slot_time to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/97c4f62da9a98b0ddcdaafae68182e3eb47f9a17.1664055213.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-26staging: rtl8192e: Rename eRfSleep, eRfPowerStateToSet and RfOffReasonPhilipp Hortmann8-27/+27
Rename variable eRfSleep to rf_sleep, eRfPowerStateToSet to rf_power_state_to_set and RfOffReason to rf_off_reason to avoid CamelCase which is not accepted by checkpatch. Omit the upfront "e" as no RfSleep and RfPowerStateToSet exist and it makes the variables unnecessary long. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/58e21e5cf86270edae93162db2395e6348c9c424.1664055213.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-26staging: rtl8192e: Rename eRFPowerState, eRfOff and eRfOnPhilipp Hortmann11-61/+61
Rename variable eRFPowerState to rf_power_state, eRfOff to rf_off and eRfOn to rf_on to avoid CamelCase which is not accepted by checkpatch. Omit the upfront "e" as no RFPowerState, RfOff and RfOn exist and it makes the variables unnecessary long. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/52c676bbaf1f894e30971c5c409b4bcb71c8ef7e.1664055213.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-26staging: rtl8192e: fix CamelCase variablesValentin Vidic1-12/+12
Fix checkpatch warnings for variables: LinkCtrlReg, DeviceID, RevisionID, IrqLine. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Signed-off-by: Valentin Vidic <vvidic@valentin-vidic.from.hr> Link: https://lore.kernel.org/r/20220925123810.2492865-1-vvidic@valentin-vidic.from.hr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-26staging: rtl8192e: Rename Tx_Retry_Count_RegDragan Cvetic2-11/+6
Rename: Current_Tx_Rate_Reg to CURRENT_TX_RATE_REG, Initial_Tx_Rate_Reg to INITIAL_TX_RATE_REG and Tx_Retry_Count_Reg to TX_RETRY_COUNT_REG to avoid CamelCase which is not accepted by checkpatch.pl. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Signed-off-by: Dragan Cvetic <dragan.m.cvetic@gmail.com> Link: https://lore.kernel.org/r/20220924225126.10527-1-dragan.m.cvetic@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-24staging: rtl8192e: Remove ftrace-like logging in rtl819x_BAProc.c, ...Philipp Hortmann4-25/+0
Remove "Unnecessary ftrace-like logging" as requested by checkpatch. Remove multiline macro as it is not needed anymore and not liked by kernel community. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/2c41e6856cd37b4f3e5cb1108272bcc24032bf64.1663387785.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-24staging: rtl8192e: Remove ftrace-like logging in rtl_ps.cPhilipp Hortmann1-34/+0
Remove "Unnecessary ftrace-like logging" as requested by checkpatch. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/6d942ba65f62643af2ff7104911f7947cca21790.1663387785.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-24staging: rtl8192e: Remove ftrace-like logging in rtl_dm.cPhilipp Hortmann1-165/+0
Remove "Unnecessary ftrace-like logging" as requested by checkpatch. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/bc0e2c9551ccf78fe388b27d18576b5bb195e2f7.1663387785.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-24staging: rtl8192e: Remove ftrace-like logging in r8192E_phy.cPhilipp Hortmann1-132/+0
Remove "Unnecessary ftrace-like logging" as requested by checkpatch. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/7315b22f54d62c5b56e8b9284426eca4cb641f77.1663387785.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-24staging: rtl8192e: Remove ftrace-like logging in r8192E_dev.cPhilipp Hortmann1-160/+1
Remove "Unnecessary ftrace-like logging" as requested by checkpatch. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/425e1b015c34ddb6df425bc516df64c40a70a58a.1663387785.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-24staging: rtl8192e: Remove ftrace-like logging in r8192E_firmware.c, ...Philipp Hortmann7-42/+0
Remove "Unnecessary ftrace-like logging" as requested by checkpatch. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/370f47919a69f2f1717f50123c1617cabc78ceca.1663387785.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-11staging: rtl8192e: Rename CurSlotTimePhilipp Hortmann1-3/+3
Rename variable CurSlotTime to cur_slot_time to avoid CamelCase which is not accepted by checkpatch.pl. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/1b71366d87b2b178fcd8f182127a51c7a7507936.1662402870.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-11staging: rtl8192e: Rename bHwRadioOffPhilipp Hortmann4-32/+32
Rename variable bHwRadioOff to hw_radio_off to avoid CamelCase which is not accepted by checkpatch.pl. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/bb977791e835310e51e9c38cc5c547e0b8a35e0c.1662402870.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-11staging: rtl8192e: Rename RFChangeInProgressPhilipp Hortmann3-15/+15
Rename variable RFChangeInProgress to rf_change_in_progress to avoid CamelCase which is not accepted by checkpatch.pl. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/29739986e76750395941ddaa6c4f0ffab6eb26a9.1662402870.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-11staging: rtl8192e: Rename RFWaitCounterPhilipp Hortmann1-3/+3
Rename variable RFWaitCounter to rf_wait_counter to avoid CamelCase which is not accepted by checkpatch.pl. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/11acf28a0b9f56dde4fa4fbd74a085cf2fa1c20d.1662402870.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-11staging: rtl8192e: Rename rtStatePhilipp Hortmann4-21/+21
Rename variable rtState to rt_state to avoid CamelCase which is not accepted by checkpatch.pl. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/e888fa7e6edaa68e741236ea012f8230f6817882.1662402870.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-11staging: rtl8192e: Rename bConnectBySSIDPhilipp Hortmann1-3/+3
Rename variable bConnectBySSID to connect_by_ssid to avoid CamelCase which is not accepted by checkpatch.pl. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/2b193be93598348994b1f890b6dc5c2ffb84a9b6.1662402870.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-11staging: rtl8192e: Rename bActionAllowedPhilipp Hortmann1-6/+6
Rename variable bActionAllowed to action_allowed to avoid CamelCase which is not accepted by checkpatch.pl. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/e8b617ab58c360bb485cb51d080a8ef81cd47869.1662402870.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-11staging: rtl8192e: Rename ChangeSourcePhilipp Hortmann2-9/+9
Rename variable ChangeSource to change_source to avoid CamelCase which is not accepted by checkpatch.pl. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/0d934bb707510692ccd161ea6034b69133aac14c.1662402870.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-09staging: rtl8192e: Fix return type for implementation of ndo_start_xmitGUO Zihua2-3/+3
CFI (Control Flow Integrity) is a safety feature allowing the system to detect and react should a potential control flow hijacking occurs. In particular, the Forward-Edge CFI protects indirect function calls by ensuring the prototype of function that is actually called matches the definition of the function hook. Since Linux now supports CFI, it will be a good idea to fix mismatched return type for implementation of hooks. Otherwise this would get cought out by CFI and cause a panic. Use enums from netdev_tx_t as return value instead, then change return type to netdev_tx_t. Note that rtllib_xmit_inter() would return 1 only on allocation failure and the queue is stopped if that happens, meeting the documented requirement if NETDEV_TX_BUSY should be returned by ndo_start_xmit. Signed-off-by: GUO Zihua <guozihua@huawei.com> Link: https://lore.kernel.org/r/20220905130053.10731-1-guozihua@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-08-30staging: rtl8192e: Describe each kernel config optionAlman Khan1-1/+11
An important thing people want to know is what each option that they select in their kernel configuration file actually does, so that they can select the right options for their system, and, once booted, make sure their hardware works as expected. Add more details describing each option in the kernel configuration for the rtl8192e (rtllib) driver so that the end-user understands what they mean, and, if necessary, enables/disables those features if they are not required. Signed-off-by: Alman Khan <ak47.almank@gmail.com> Link: https://lore.kernel.org/r/d053abd3e60d3f2d7724d6857c28a6a255b4f46b.camel@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-08-30staging/rtl8192e: fix repeated words in commentsJilin Yuan1-1/+1
Delete the redundant word 'new'. Signed-off-by: Jilin Yuan <yuanjilin@cdjrlc.com> Link: https://lore.kernel.org/r/20220825122645.27588-1-yuanjilin@cdjrlc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-08-30staging: rtl8192e: Remove PHY_SetRFPowerState and rename StateToSetPhilipp Hortmann3-6/+5
Remove macro that replaces PHY_SetRFPowerState with rtl92e_set_rf_power_state and rename StateToSet to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/ae69fd4a09900a395de40b7cfc4fd8af81e63e13.1661370978.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-08-30staging: rtl8192e: Remove Unnecessary ftrace-like loggingPhilipp Hortmann1-121/+9
Remove "Unnecessary ftrace-like logging" as requested by checkpatch. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/5240b86941ebf3a290d384744d117d436e7bad41.1661370978.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-08-30staging: rtl8192e: Rename Tx... and RxCheckStuckHandlerPhilipp Hortmann2-6/+6
Variable name TxCheckStuckHandler and RxCheckStuckHandler is changed to avoid CamelCase which is not accepted by checkpatch.pl Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/3041cec77df10cdff18d5466beb3b0616370b112.1661370978.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-08-30staging: rtl8192e: Remove blank lines in rtl_core.cPhilipp Hortmann1-24/+0
Remove blank lines as requested by checkpatch. Reasons are "multiple blank lines", "Blank lines aren't necessary after an open brace" and "Blank lines aren't necessary before a close brace". Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/32e831619a91f00cc37e04a2da1a9aeda2ad90a0.1661370978.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-08Staging: rtl8192e: Added spaces around '+'Felix Schlepper1-1/+1
This addresses two issues raised by checkpatch.pl: $ ./scripts/checkpatch.pl --terse -f drivers/staging/rtl8192e/rtllib_wx.c CHECK: spaces preferred around that '+' (ctx:VxV) Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Signed-off-by: Felix Schlepper <f3sch.git@outlook.com> Link: https://lore.kernel.org/r/87628a2dd08ec0e5b02090485e7a9a1d91b7d2a5.1656667089.git.f3sch.git@outlook.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-08Staging: rtl8192e: Remove unnecessary blank lineFelix Schlepper1-1/+0
This addresses an issue raised by checkpatch.pl: $ ./scripts/checkpatch.pl --terse -f drivers/staging/rtl8192e/rtllib_wx.c CHECK: Blank lines aren't necessary before a close brace '}' Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Signed-off-by: Felix Schlepper <f3sch.git@outlook.com> Link: https://lore.kernel.org/r/f3c6bd5c79331e82f006fb2694f791030b07c5ba.1656667089.git.f3sch.git@outlook.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-08Staging: rtl8192e: Added braces around elseFelix Schlepper1-2/+4
This addresses two issues raised by checkpatch.pl: $ ./scripts/checkpatch.pl --terse -f drivers/staging/rtl8192e/rtllib_wx.c CHECK: braces {} should be used on all arms of this statement CHECK: Unbalanced braces around else statement The coding style rule with not using unnecessary braces around if/else does not apply if only one branch is a single statement. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Signed-off-by: Felix Schlepper <f3sch.git@outlook.com> Link: https://lore.kernel.org/r/651f51d9f92e8a445ceaf9f2073f16dd10458a74.1656667089.git.f3sch.git@outlook.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-08Staging: rtl8192e: Remove unnecessary parenthesesFelix Schlepper1-2/+2
This addresses an issue raised by checkpatch.pl: $ ./scripts/checkpatch.pl --terse -f drivers/staging/rtl8192e/rtllib_wx.c Unnecessary parentheses around wrqu->encoding Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Signed-off-by: Felix Schlepper <f3sch.git@outlook.com> Link: https://lore.kernel.org/r/0e4e340be3f4c7f35a5381b726b1db5fc6842f10.1656667089.git.f3sch.git@outlook.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-08Staging: rtl8192e: Avoid multiple assignmentsFelix Schlepper1-1/+2
This addresses an issue raised by checkpatch.pl: $ ./scripts/checkpatch.pl --terse -f drivers/staging/rtl8192e/rtllib_wx.c CHECK: multiple assignments should be avoided Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Signed-off-by: Felix Schlepper <f3sch.git@outlook.com> Link: https://lore.kernel.org/r/899a1010643a05668465069951518e5dcab9c77e.1656667089.git.f3sch.git@outlook.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-08Staging: rtl8192e: Refactored rtllib_modesFelix Schlepper1-15/+6
The initial reason for looking at this code was an issue raised by checkpatch.pl: $ ./scripts/checkpatch.pl --terse -f drivers/staging/rtl8192e/rtllib_wx.c CHECK: Please use a blank line after function/struct/union/enum declarations The additional blank line above the struct/before the headers is just cleaner. However, as it turns out since there is no str formatting required One can replace the error prone str + size struct with a char array. The rest of this patch fixes the usecases. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Signed-off-by: Felix Schlepper <f3sch.git@outlook.com> Link: https://lore.kernel.org/r/4dbc4939e88a2c94f1819b4b0cc2c81dc332710b.1656667089.git.f3sch.git@outlook.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-27Staging: rtl8192e: Cleaning up error handlingFelix Schlepper1-10/+10
Moved error handling to one common block. This removes double checking if all txb->fragments[] were initialized. The original code worked fine, but this is cleaner. Signed-off-by: Felix Schlepper <f3sch.git@outlook.com> Link: https://lore.kernel.org/r/13b32131cd00a1f0b8793657a24ada71240a8350.1656078068.git.f3sch.git@outlook.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-27Staging: rtl8192e: Using kzalloc and delete memsetFelix Schlepper1-2/+1
By using kzalloc, we can delete a memset. The practical difference is that using kzalloc() will zero out the txb->fragments[] array. The original code worked fine, but zeroing everything seems nicer. Signed-off-by: Felix Schlepper <f3sch.git@outlook.com> Link: https://lore.kernel.org/r/9727fe31c675f2f3052ca2fa586d137dd856ac91.1656078068.git.f3sch.git@outlook.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-27Staging: rtl8192e: Use struct_sizeFelix Schlepper1-2/+1
Using struct_size is encouraged because it is safer than using sizeof and calculations by hand. Signed-off-by: Felix Schlepper <f3sch.git@outlook.com> Link: https://lore.kernel.org/r/54ea62a2b7628d3bdd5aa52df82c3e91704a2127.1656078068.git.f3sch.git@outlook.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-19staging: rtl8192e: remove null check after call container_of()Haowen Bai1-2/+0
container_of() will never return NULL, so remove useless code. Signed-off-by: Haowen Bai <baihaowen@meizu.com> Link: https://lore.kernel.org/r/1652696403-17852-1-git-send-email-baihaowen@meizu.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-26staging: rtl8192e: Remove u16 cast for u16 return valueSolomon Tan1-1/+1
Remove explicit u16 cast of the function Mk16 return value. The variable hi does not need to be casted explicitly to u16 as it will already be casted implicitly. Signed-off-by: Solomon Tan <wjsota@gmail.com> Link: https://lore.kernel.org/r/20220423130150.161903-8-wjsota@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-26staging: rtl8192e: Remove u16 cast for u32 parameterSolomon Tan1-1/+1
The explicit u16 cast is not necessary because rtl92e_eeprom_read's second parameter is defined to be u32. Signed-off-by: Solomon Tan <wjsota@gmail.com> Link: https://lore.kernel.org/r/20220423130150.161903-7-wjsota@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-26staging: rtl8192e: Remove unnecessary u16 argument castSolomon Tan1-1/+1
Remove the explicit u16 casts for u16 argument in the function call. This function has declared its parameter to be of type u16, so the argument given to that parameter will be automatically coerced to u16. Therefore, an explicit cast is unnecessary. Signed-off-by: Solomon Tan <wjsota@gmail.com> Link: https://lore.kernel.org/r/20220423130150.161903-6-wjsota@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-26staging: rtl8192e: Remove unnecessary u16 assignment castSolomon Tan2-4/+3
Remove the explicit casts in assignment statements for u16 variables. Because these variables are declared as u16, there is implicit conversion to u16 during the assignment, so an explicit cast is unnecessary. Signed-off-by: Solomon Tan <wjsota@gmail.com> Link: https://lore.kernel.org/r/20220423130150.161903-5-wjsota@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-26staging: rtl8192e: Remove unnecessary u8 cast in comparisonSolomon Tan2-2/+2
Since the macro VERSION_8190_BD is defined to be 0x3, and the structure members card_8192_version and IC_Cut are both u8, an explicit u8 cast is unnecessary. Signed-off-by: Solomon Tan <wjsota@gmail.com> Link: https://lore.kernel.org/r/20220423130150.161903-4-wjsota@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>