- 27 Sep, 2022 2 commits
-
-
Michael Straube authored
The function odm_ConfigRF_RadioA_8188E() is only used in HalHWImg8188E_RF.c. Make it static. Signed-off-by: Michael Straube <straube.linux@gmail.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20220926173243.8767-3-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The function odm_ConfigMAC_8188E() is only used in HalHWImg8188E_MAC.c. Make it static. Signed-off-by: Michael Straube <straube.linux@gmail.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20220926173243.8767-2-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 26 Sep, 2022 15 commits
-
-
Martin Kaiser authored
The blink_work function calls either SwLedOff or SwLedOn. These two functions handle bSurpriseRemoved and bDriverStopped. There's no need to check bSurpriseRemoved and bDriverStopped again in the blink worker. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220925140406.112991-3-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
The SwLedOff function calls rtw_read8 which in turn calls usb_read. bSurpriseRemoved is checked in usb_read. We don't have to check it again in SwLedOff. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220925140406.112991-2-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
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.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
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.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
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.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
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.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
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.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
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.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
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.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
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.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
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.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
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.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Greg Kroah-Hartman authored
In the years since it was added (2012), no one has stepped up to maintain this properly and get it merged into the kernel tree. So remove it as it's obviously not being used. If it is being used, we can easily revert this and take the time to get it out of the staging tree. Link: https://lore.kernel.org/r/20220924105817.808385-1-gregkh@linuxfoundation.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Valentin Vidic authored
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.hrSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Dragan Cvetic authored
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.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 24 Sep, 2022 23 commits
-
-
Martin Kaiser authored
Both LED_BLINK_StartToBlink and LED_BLINK_RUNTOP in enum LED_STATE_871x are not used in the r8188eu driver. Remove them. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220918175700.215170-7-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
We don't have to check bSurpriseRemoved in the SwLedOn function. SwLedOn calls rtw_read8 which in turn calls usb_read. This function checks bSurpriseRemoved for us. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220918175700.215170-6-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Both bLedOn and BlinkingLedState in struct led_priv store the same information. The boolean bLedOn stores the curent led state while BlinkingLedState stores the next led state to be set during blinking, which is the inverse of the current led state. (The led is either off or blinking, it's never continuously on.) This patch removes BlinkingLedState and uses bLedOn instead. The LED_BLINK_WPS_STOP case in blink_work checked for pLed->BlinkingLedState != RTW_LED_ON. This is true if the next led blinking state is ON, i.e. if the led has just been switched off by blink_work, i.e. if (!pLed->bLedOn). Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220918175700.215170-5-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove the bLedNoLinkBlinkInProgress state variable. Its sole purpose is to block subsequent requests for "no link" blinking when this blinking pattern is already active. It's perfectly safe to restart "no link" blinking. We can remove bLedNoLinkBlinkInProgress and the many places where it's updated. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220918175700.215170-4-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Always update the status variables in rtw_led_control when we start blinking to show that wps was successful. The if statements are not necessary. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220918175700.215170-3-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
We can always cancel blink_work during wps_stop. The blinking pattern will be updated to show that wps was successful. Another worker will be started for this. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220918175700.215170-2-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nathan Huckleberry authored
The ndo_start_xmit field in net_device_ops is expected to be of type netdev_tx_t (*ndo_start_xmit)(struct sk_buff *skb, struct net_device *dev). The mismatched return type breaks forward edge kCFI since the underlying function definition does not match the function hook definition. The return type of rtw_xmit_entry should be changed from int to netdev_tx_t. Link: https://github.com/ClangBuiltLinux/linux/issues/1703 Cc: llvm@lists.linux.dev Reported-by: Dan Carpenter <error27@gmail.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Reviewed-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Nathan Huckleberry <nhuck@google.com> Link: https://lore.kernel.org/r/20220914211606.423959-1-nhuck@google.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Xiaoke Wang authored
In _rtw_init_xmit_priv(), there are several error paths for allocation failures just jump to the `exit` section. However, there is no action will be performed, so the allocated resources are not properly released, which leads to various memory leaks. To properly release them, this patch unifies the error handling code and several error handling paths are added. According to the allocation sequence, if the validation fails, it will jump to its corresponding error tag to release the resources. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Xiaoke Wang <xkernel.wang@foxmail.com> Link: https://lore.kernel.org/r/tencent_DB57E4F270F4539485C32B05FDAF8394310A@qq.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Xiaoke Wang authored
In rtw_xmit_resource_alloc(), if usb_alloc_urb() fails, then the memory `pxmitbuf->pallocated_buf` which is allocated by kzalloc() is not properly released before returning. So this patch adds kfree() on the above error path to release it in time. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Reviewed-by: Martin Kaiser <martin@kaiser.cx> Signed-off-by: Xiaoke Wang <xkernel.wang@foxmail.com> Link: https://lore.kernel.org/r/tencent_3B46EE3287288555389AD2EC3F388827B306@qq.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The functions _rtw_init_recv_priv(), _rtw_free_recv_priv() and rtw_recv_entry() are defined in rtw_recv.c. Move their prototypes from recv_osdep.h to rtw_recv.h. Move the last two remaining prototypes netdev_open() and netdev_close() from recv_osdep.h to osdep_intf.h. That is a more appropriate place and we can remove recv_osdep.h. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220911174933.3784-4-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The function prototypes rtw_recv_returnpacket(), rtw_init_recv_priv() and rtw_free_recv_priv() are not used. Remove them. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220911174933.3784-3-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The function _netdev_open() is only used in os_intfs.c. Make it static. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220911174933.3784-2-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
In statements spaces should be used not tabs. Replace tabs withs spaces in two return statements in odm_query_rxpwrpercentage(). Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220911161949.11293-7-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Rename the variable 'AntPower' in odm_query_rxpwrpercentage() to avoid camel case. AntPower -> antpower Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220911161949.11293-6-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Rename odm_QueryRxPwrPercentage() to avoid camel case. odm_QueryRxPwrPercentage -> odm_query_rxpwrpercentage Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220911161949.11293-5-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The variable 'retsig' in odm_signal_scale_mapping() is set in the function before it returns, so it is not needed to initialize it. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220911161949.11293-4-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Rename variables in odm_signal_scale_mapping() to avoid camel case. CurrSig -> currsig RetSig -> retsig Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220911161949.11293-3-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Rename odm_SignalScaleMapping() to avoid camel case. odm_SignalScaleMapping -> odm_signal_scale_mapping Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220911161949.11293-2-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Always update the status variables in rtw_led_control when we start link blinking. The if statements are not necessary. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220911145122.15444-10-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Cancel blink_work before we start link blinking. Another worker will be scheduled after the state variables are updated. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220911145122.15444-9-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
The blinking code to signal that a link is up has the same big if clause around it as most other blink events. Revert this if condition and exit if we're already blinking to show that the link is up. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220911145122.15444-8-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Always update the status variables in rtw_led_control when we start tx/rx blinking. The if statements are not necessary. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220911145122.15444-7-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Cancel blink_work before we start tx/rx blinking. Another worker will be scheduled after the state variables are updated. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220911145122.15444-6-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-