aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-12-05staging: r8188eu: read reason code from ieee80211_mgmtMartin Kaiser1-2/+1
Use the struct ieee80211_mgmt to read the reason code instead of parsing the message manually. Remove the pframe pointer, it's no longer used. Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-12-05staging: r8188eu: use ieee80211_mgmt to parse addressesMartin Kaiser1-4/+4
Define a struct ieee80211_mgmt in the OnDisassoc function and use it to parse the addresses in the incoming disassoc message. This replaces some driver-specific functions for address parsing. Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-12-05staging: r8188eu: remove a variableMartin Kaiser1-3/+1
Check the result of rtw_check_bcn_info directly and remove the ret variable. Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-12-05staging: r8188eu: simplify error handling for missing stationMartin Kaiser1-12/+12
Simplify the code to handle the case where we're associated to a station that is not in our list of known stations. We can simply exit in this case. This patch reverts the if-condition and saves one level of indentation. Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-12-05staging: r8188eu: stop beacon processing if kmalloc failsMartin Kaiser1-6/+7
If we cannot allocate a struct wlan_bssid_ex in the OnBeacon function, we should stop processing the incoming beacon message and return. For kmalloc failures, the current code just skips the update of network and beacon info and tries to continue with the authentication. The update would set the encryption algorithm that should be used for the authentication. Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-12-05staging: r8188eu: exit if beacon is not from our bssMartin Kaiser1-51/+52
Do not process an incoming beacon message in the OnBeacon function if the beacon was sent by a base station other than the one to which we're connected. This patch does not modify the behaviour of the code. It reverts the if condition and returns if the beacon should not be processed. This is simpler than wrapping the entire processing into a large if clause. Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-12-05staging: r8188eu: simplify update_sta_support_rate paramsMartin Kaiser1-1/+1
The update_sta_support_rate function takes a pointer to information elements and the total length of all these elements. Use our variables for pointer and length instead of calculating them manually. Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-12-05staging: r8188eu: use ie buffer in update_beacon_infoMartin Kaiser3-10/+6
The update_beacon_info function parses information elements of a beacon message. It should take the pointer to the information elements and their total length, not the entire beacon message. Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-12-05staging: r8188eu: pass only ies to process_p2p_ps_ieMartin Kaiser2-10/+10
The process_p2p_ps_ie function parses the information elements of a beacon message and extracts p2p-related info. process_p2p_ps_ie does not receive a pointer to the information elements as one would expect. Instead it receives a pointer to the timestamp field in the beacon message. process_p2p_ps_ie increments this pointer by _BEACON_IE_OFFSET_ to jump to the start of the information elements (and decreases the buffer length accordingly). This is clumsy and hard to understand. Rewrite this such that process_p2p_ps_ie takes a pointer to the information elements and the total length of all elements. Check up-front that the total length is not negative. Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-12-05staging: r8188eu: replace GetAddr2Ptr callsMartin Kaiser1-4/+3
Get the source address of a beacon frame from our struct ieee80211_mgmt instead of using the driver's internal GetAddr2Ptr helper. Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-12-05staging: r8188eu: read timestamp from ieee80211_mgmtMartin Kaiser1-19/+2
Read the 64-bit timestamp from struct ieee80211_mgmt instead of parsing the beacon message ourselves. Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-12-05staging: r8188eu: replace one GetAddr3Ptr callMartin Kaiser1-1/+2
Define a struct ieee80211_mgmt in the OnBeacon function. Use it to replace one GetAddr3Ptr call. This is a tiny step towards making GetAddr3Ptr obsolete. Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-12-05staging: greybus: loopback_test: Remove extra blank linesJack Schofield1-13/+0
Clean up extra uses of blank lines that do not follow the kernel coding style. Issue reported by checkpatch. Reviewed-by: Johan Hovold <[email protected]> Signed-off-by: Jack Schofield <[email protected]> Link: https://lore.kernel.org/r/51edbcc7583d64d3fe5a203d3a8649a695ef4a75.1669872193.git.schofija@oregonstate.edu Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-12-05staging: greybus: loopback_test: Remove void function return statementJack Schofield1-1/+0
Void function return statement is not useful in this case. Issue reported by checkpatch. Reviewed-by: Johan Hovold <[email protected]> Signed-off-by: Jack Schofield <[email protected]> Link: https://lore.kernel.org/r/5d465d56a6e3de2cb9d2f34377cbb82678cc67b1.1669872193.git.schofija@oregonstate.edu Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-12-05staging: greybus: loopback_test: Add blank line after declaration.Jack Schofield1-0/+1
Declarations are to be followed by a blank line. Add to follow Linux Kernel coding style. Issue reported by checkpatch. Reviewed-by: Johan Hovold <[email protected]> Signed-off-by: Jack Schofield <[email protected]> Link: https://lore.kernel.org/r/048967b5c3b157e19ccf4608f71da8418fc31877.1669872193.git.schofija@oregonstate.edu Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-12-05staging: r8188eu: use ieee80211 helper for protected bitMartin Kaiser2-4/+1
Use ieee80211_has_protected to check if the "protected" bit is set. Remove the r8188eu driver's internal macro for this check. Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-12-05staging: r8188eu: simplify the checks for zero addressMartin Kaiser1-3/+2
In function ap2sta_data_frame, we can use is_zero_ether_addr to check for all-zero ethernet addresses. Both pattrib->bssid and mybssid are 16-bit aligned. Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-12-05staging: r8188eu: fix the number of probereq retriesMartin Kaiser2-15/+9
issue_probereq_ex sends a probe request and retries if this fails. There's no point in making the number of retries configurable. Hard-code the value that's used by issue_probereq_ex's only caller. Simplify the code to check the loop condition only once. Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-12-05staging: r8188eu: remove wait_ms parameterMartin Kaiser2-7/+7
Remove the wait_ms parameter from function issue_probereq_ex. There's only one caller, who requests a waiting time of 1 ms. Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-12-05staging: r8188eu: drop return value from issue_probereq_exMartin Kaiser2-11/+4
The only caller of issue_probereq_ex does not check the return value. We can remove it and make issue_probereq_ex a void function. Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-12-05staging: rtl8192e: Fix potential use-after-free in rtllib_rx_Monitor()YueHaibing1-1/+1
The skb is delivered to netif_rx() in rtllib_monitor_rx(), which may free it, after calling this, dereferencing skb may trigger use-after-free. Found by Smatch. Fixes: 94a799425eee ("From: wlanfae <[email protected]> [PATCH 1/8] rtl8192e: Import new version of driver from realtek") Signed-off-by: YueHaibing <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-12-05staging: rtl8192e: Remove unused variable int_logPhilipp Hortmann3-20/+0
int_log is initialized and incremented but never evaluated. Remove resulting dead code. Signed-off-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/e2edcde052cc3c47e6e6b94d09e460b8cf6a49a8.1669156825.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-12-05staging: rtl8192e: Remove unused variable ChannelAccessSettingPhilipp Hortmann1-12/+0
ChannelAccessSetting is never used. Remove resulting dead code. Signed-off-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/b88a31954532f47a4caf9abfcad8e20b32a618cc.1669156825.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-12-05staging: rtl8192e: Remove unused variable initialized_at_probePhilipp Hortmann2-2/+0
initialized_at_probe is initialized and never used. Remove resulting dead code. Signed-off-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/4855b2dd5b7296b0eb10e697f605fb820e1dfc7b.1669156825.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-12-05staging: rtl8192e: Remove unused variable skb_aggQPhilipp Hortmann3-5/+0
skb_aggQ is initialized, never used and purged. Remove resulting dead code. Signed-off-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/3197be3cb412eea1c662a5bec1b1afda2cee675d.1669156825.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-12-05staging: rtl8192e: Remove unchanged variable AcmMethodPhilipp Hortmann4-12/+0
AcmMethod is initialized and never changed. The evaluation will always have the same result. Remove resulting dead code. Signed-off-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/7d73a66184e13d5f8d4af7d21564032247a7e923.1669156825.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-12-05staging: rtl8192u: Fix use after free in ieee80211_rx()Dan Carpenter1-1/+3
We cannot dereference the "skb" pointer after calling ieee80211_monitor_rx(), because it is a use after free. Fixes: 8fc8598e61f6 ("Staging: Added Realtek rtl8192u driver to staging") Signed-off-by: Dan Carpenter <[email protected]> Link: https://lore.kernel.org/r/Y33BArx3k/aw6yv/@kili Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-22staging: iio: ade7854: Convert to i2c's .probe_new()Uwe Kleine-König1-3/+2
The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-22staging: olpc_dcon: Convert to i2c's .probe_new()Uwe Kleine-König1-2/+2
The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-22staging: most: i2c: Convert to i2c's .probe_new()Uwe Kleine-König1-2/+2
The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-22vc04_services: bcm2835-camera: Use bool values for mmal_fmt.remove_paddingUmang Jain1-15/+15
mmal_fmt.remove_padding is defined as a boolean type hence, use boolean values for it instead of 0/1 integers. This enhances code readability. Signed-off-by: Umang Jain <[email protected]> Reviewed-by: Dave Stevenson <[email protected]> Reviewed-by: Kieran Bingham <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-22vc04_services: mmal-vchiq: Use bool for vchiq_mmal_component.in_useUmang Jain2-4/+4
In commit 7967656ffbfa ("coding-style: Clarify the expectations around bool") the check to dis-allow bool structure members was removed from checkpatch.pl. It promotes bool structure members to store boolean values. This enhances code readability. Signed-off-by: Umang Jain <[email protected]> Reviewed-by: Kieran Bingham <[email protected]> Reviewed-by: Dave Stevenson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-22Revert "staging: mmal-vchiq: Avoid use of bool in structures"Umang Jain2-8/+8
This reverts commit 640e77466e69d9c28de227bc76881f5501f532ca. In commit 7967656ffbfa ("coding-style: Clarify the expectations around bool") the check to dis-allow bool structure members was removed from checkpatch.pl. It promotes bool structure members to store boolean values. This enhances code readability. Signed-off-by: Umang Jain <[email protected]> Reviewed-by: Dave Stevenson <[email protected]> Reviewed-by: Kieran Bingham <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-22staging: gdm724x: Replace macro GDM_TTY_READY with static inline functionBrent Pappas1-5/+8
Replace the macro GDM_TTY_READY with a static inline function to follow the Linux kernel coding style. Signed-off-by: Brent Pappas <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-22staging: vme_user: Fix possible UAF in tsi148_dma_list_addGaosheng Cui1-0/+1
Smatch report warning as follows: drivers/staging/vme_user/vme_tsi148.c:1757 tsi148_dma_list_add() warn: '&entry->list' not removed from list In tsi148_dma_list_add(), the error path "goto err_dma" will not remove entry->list from list->entries, but entry will be freed, then list traversal may cause UAF. Fix by removeing it from list->entries before free(). Fixes: b2383c90a9d6 ("vme: tsi148: fix first DMA item mapping") Signed-off-by: Gaosheng Cui <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-17staging: rtl8192e: Rename pHTInfoPhilipp Hortmann14-307/+307
Rename variable pHTInfo to ht_info to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/88cdc0ef393c92cb2102a66893c5320e8c8606df.1668313325.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-17staging: rtl8192e: Rename InterruptLog, RxCounter and bHwRfOffActionPhilipp Hortmann5-13/+13
Rename variable InterruptLog to int_log, RxCounter to rx_ctr and bHwRfOffAction to hw_rf_off_action to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/82ea07ddd894ac9b863ce90ddb9ba78065bd1f4e.1668313325.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-17staging: rtl8192e: Rename bFilterSour.., CCKPresentAt.. and ResetProg..Philipp Hortmann8-43/+43
Rename variable bFilterSourceStationFrame to fltr_src_sta_frame, CCKPresentAttentuation to cck_present_attn and ResetProgress to rst_progress to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/25ab52350a4a3249a1f76b28eea10c44e2f9552d.1668313325.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-17staging: rtl8192e: Rename bNetPromisc.., IntelPromiscu.. and bPromiscu..Philipp Hortmann6-25/+25
Rename variable bNetPromiscuousMode to net_promiscuous_md, IntelPromiscuousModeInfo to intel_promiscuous_md_info and bPromiscuousOn to promiscuous_on to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/69d9998a30ce2286c3ae6cb4510174e1255b3f9e.1668313325.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-17staging: rtl8192e: Rename LinkDetectInfoPhilipp Hortmann6-55/+55
Rename variable LinkDetectInfo to link_detect_info to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/48d043893fa755490e810af204e5b7ad2ba606de.1668313325.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-17staging: rtl8192e: Rename RFInProgres.., bEnableHT and RegChannelPlanPhilipp Hortmann8-24/+24
Rename variable RFInProgressTimeOut to rf_in_progress_timeout, bEnableHT to enable_ht and RegChannelPlan to reg_chnl_plan to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/aa3b8fd4a51fc9b1c32566cd079590bf11a9190d.1668313325.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-17staging: rtl8192e: Rename pPSCPhilipp Hortmann6-60/+60
Rename variable pPSC to psc to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/47ded8a906e55d6f09b51cd8f2dfb78b7b92c1cc.1668313325.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-17staging: rtl8192e: Rename Regdot11TxHT.., dot11HTOpera.. and RegHTSuppRa..Philipp Hortmann5-19/+19
Rename variable Regdot11TxHTOperationalRateSet to reg_dot11tx_ht_oper_rate_set, dot11HTOperationalRateSet to dot11ht_oper_rate_set and RegHTSuppRateSet to reg_ht_supp_rate_set to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/0c87e7ffc94be1c26f6400f5e12419f2df0418a3.1668313325.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-17staging: rtl8192e: Rename Regdot11HTOper.., bSupportM.. and PowerSaveCo..Philipp Hortmann7-31/+31
Rename variable Regdot11HTOperationalRateSet to reg_dot11ht_oper_rate_set, bSupportMode to support_mode and PowerSaveControl to pwr_save_ctrl to avoid CamelCase which is not accepted by checkpatch. Fix unnecessary parentheses warning from checkpatch when used with this variables. Signed-off-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/1ef7fd22b4a037c4d1f8685065ce7916b6f0930b.1668313325.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-17staging: rtl8192e: Rename bTxDisableRate.., RegMaxLPSAwa.. and bTxUseD..Philipp Hortmann7-34/+34
Rename variable bTxDisableRateFallBack to tx_dis_rate_fallback, RegMaxLPSAwakeIntvl to reg_max_lps_awake_intvl and bTxUseDriverAssingedRate to tx_use_drv_assinged_rate to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/092eb2dc73d37daf851ea9ef9cb7e4df6f766845.1668313325.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-17staging: r8188eu: binstallGrpkey is set to _FAILMichael Straube1-1/+1
The variable binstallGrpkey is set to _FAIL which is defined as 0. Use false to set the variable to get rid of another use of _FAIL. Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Signed-off-by: Michael Straube <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-17staging: r8188eu: convert _rtw_init_xmit_priv() to common error logicMichael Straube3-22/+10
Convert the function _rtw_init_xmit_priv() away from returning _FAIL or _SUCCESS which uses inverted error logic. Use the common error logic instead. Return 0 for success and negative values for failure. Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Signed-off-by: Michael Straube <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-17staging: r8188eu: convert rtw_xmit_resource_alloc() to common error logicMichael Straube1-9/+8
Convert the function rtw_xmit_resource_alloc() away from returning _FAIL or _SUCCESS which uses inverted error logic. Use the common error logic instead. Return 0 for success and negative values for failure. Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Signed-off-by: Michael Straube <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-17staging: r8188eu: convert aes_cipher() to voidMichael Straube1-3/+1
The function aes_cipher() returns always _SUCCESS and its callers do not use the return value. So we can convert the return type to void and get rid of another use of _SUCCESS. Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Signed-off-by: Michael Straube <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-17staging: r8188eu: rename three functionsMichael Straube3-14/+14
Prefix the names of the following functions with the driver name. The original names are bad for the global namespace. While at it, convert is_IBSS_empty() to all lower case to follow kernel coding style. is_client_associated_to_ap() is_client_associated_to_ibss() is_IBSS_empty() Suggested-by: Greg Kroah-Hartman <[email protected]> Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Signed-off-by: Michael Straube <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>