aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-11-09staging: rtl8192u: remove redundant macro definitionsDeepak R Varma1-61/+0
Several ieee80211_* symbol names are extended with _rsl tag using macros. This is done to avoid a conflict when a similar symbol is already in use in another part of kernel and may lead to conflicts. However, most of these base symbol names are not found to being used anywhere in the code and hence are not useful today. These symbols are not used outside of the module and hence can be safely removed. The code continues to use the original symbol names. Suggested-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Deepak R Varma <[email protected]> Link: https://lore.kernel.org/r/17f69a042e215c484931a0327fdf7775eea5f918.1667930292.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-09staging: fieldbus: use sysfs_emit() in show functionsDeepak R Varma1-10/+7
The show() methods should only use sysfs_emit() when formatting values to be returned to the user space. Ref: Documentation/filesystems/sysfs.rst Issue identified by coccicheck. Signed-off-by: Deepak R Varma <[email protected]> Link: https://lore.kernel.org/r/Y2uEIzebbM/Fs5Jz@qemulion Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-09staging: ks7010: Avoid clashing function prototypesGustavo A. R. Silva1-122/+126
When built with Control Flow Integrity, function prototypes between caller and function declaration must match. These mismatches are visible at compile time with the new -Wcast-function-type-strict in Clang[1]. Fix a total of 27 warnings like these: drivers/staging/ks7010/ks_wlan_net.c:2415:2: warning: cast from 'int (*)(struct net_device *, struct iw_request_info *, struct iw_point *, char *)' to 'iw_handler' (aka 'int (*)(struct net_device *, struct iw_request_info *, union iwreq_data *, char *)') converts to incompatible function type [-Wcast-function-type-strict] (iw_handler)ks_wlan_get_firmware_version,/* 3 KS_WLAN_GET_FIRM_VERSION */ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The ks_wlan_net Wireless Extension handler callbacks (iw_handler) use a union for the data argument. Actually use the union and perform explicit member selection in the function body instead of having a function prototype mismatch. There are no resulting binary differences before/after changes. These changes were made partly manually and partly with the help of Coccinelle. Link: https://reviews.llvm.org/D134831 [1] Signed-off-by: Gustavo A. R. Silva <[email protected]> Link: https://lore.kernel.org/r/8d2ceee1248b5a76e9b6c379f578e65482c91168.1667934775.git.gustavoars@kernel.org Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-09drivers: staging: r8188eu: Fix sleep-in-atomic-context bug in ↵Duoming Zhou1-1/+1
rtw_join_timeout_handler The rtw_join_timeout_handler() is a timer handler that runs in atomic context, but it could call msleep(). As a result, the sleep-in-atomic-context bug will happen. The process is shown below: (atomic context) rtw_join_timeout_handler _rtw_join_timeout_handler rtw_do_join rtw_select_and_join_from_scanned_queue rtw_indicate_disconnect rtw_lps_ctrl_wk_cmd lps_ctrl_wk_hdl LPS_Leave LPS_RF_ON_check msleep //sleep in atomic context Fix by removing msleep() and replacing with mdelay(). Fixes: 15865124feed ("staging: r8188eu: introduce new core dir for RTL8188eu driver") Signed-off-by: Duoming Zhou <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-08staging: r8188eu: drop removal/stop check in dump_mgntframe_and_wait_ackMartin Kaiser1-3/+0
We can remove the checks for bDriverStopped and bSurpriseRemoved in dump_mgntframe_and_wait_ack. The code path from this function looks like dump_mgntframe_and_wait_ack rtl8188eu_mgnt_xmit rtw_dump_xframe loop over all fragments rtw_write_port is called for each fragment. bSurpriseRemoved and bDriverStopped are checked in rtw_write_port. Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-08staging: r8188eu: drop another removal/stop checkMartin Kaiser1-3/+0
There's no need to check bDriverStopped and bSurpriseRemoved in issue_probereq_ex. The code path looks like issue_probereq_ex _issue_probereq dump_mgntframe or dump_mgntframe_and_wait_ack All paths from dump_mgntframe check the two variables. dump_mgntframe_and_wait_ack contains a check as well. Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-08staging: r8188eu: use a qos_hdr in validate_recv_data_frameMartin Kaiser1-4/+5
Define a struct ieee80211_qos_hdr in the validate_recv_data_frame function. Use this struct to replace some numeric offsets and make the code easier to understand. Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-08staging: r8188eu: remove unnecessary castingDeepak R Varma1-1/+1
The dhcpMessage struct member variable "cookie" is already declared to be of type __be32. There is no need to cast it again as __be32. Signed-off-by: Deepak R Varma <[email protected]> Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Link: https://lore.kernel.org/r/c333e22349c5c347c740b425330b35830b969fa9.1667755987.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-08staging: r8188eu: simplify complex pointer castingDeepak R Varma1-3/+2
Pointers to structures udphdr and dhcpMessage are derived by casting adjacent pointers with size_t. Such typecast of pointer using size_t is not preferred. The code looks complex and delicate. Simplify such casting by utilizing generic "void *" casting. Suggested-by: Joe Perches <[email protected]> Signed-off-by: Deepak R Varma <[email protected]> Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Link: https://lore.kernel.org/r/1428580d09a9916899209c9278dca40ee2d297d3.1667755987.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-08staging: r8188eu: clean up error handling in rtw_start_drv_threads()Michael Straube2-11/+8
Convert the error handling in the function rtw_start_drv_threads() to the common logic used in the kernel. Another step to get rid of _FAIL and _SUCCESS which uses inverted logic. Signed-off-by: Michael Straube <[email protected]> Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-08staging: r8188eu: remove checks in dump_mgntframeMartin Kaiser1-3/+0
There's no need to check for bSurpriseRemoved and bDriverStopped in dump_mgmtframe. The sequence of function calls is dump_mgntframe rtl8188eu_mgnt_xmit rtw_dump_xframe loop over all fragments For each fragment, rtw_write_port is called. This function checks bSurpriseRemoved and bDriverStopped. Signed-off-by: Martin Kaiser <[email protected]> Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-08staging: r8188eu: merge two rtw_free_network_nolock functionsMartin Kaiser2-17/+8
Remove the _rtw_free_network_nolock function and merge it into rtw_free_network_nolock, which is its only caller. Signed-off-by: Martin Kaiser <[email protected]> Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-08staging: r8188eu: remove get_fwstateMartin Kaiser1-5/+0
The get_fwstate function is not used. Remove it. Signed-off-by: Martin Kaiser <[email protected]> Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-08staging: r8188eu: clean up rtw_hal_initMartin Kaiser1-12/+7
Clean up the rtw_hal_init function. Remove the status variable. Exit immediately for errors. Signed-off-by: Martin Kaiser <[email protected]> Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-08staging: r8188eu: remove state checks in rtw_led_controlMartin Kaiser1-2/+1
There's no need to check for bSurpriseRemoved or bDriverStopped in the rtw_led_control function. This function schedules a delayed worker which calls SwLedOn or SwLedOff (or the function calls SwLedOff directly). SwLedOn and SwLedOff check bDriverStopped themselves or they initiate a USB control transfer via usb_write, where bSurpriseRemoved is checked. Signed-off-by: Martin Kaiser <[email protected]> Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-08staging: r8188eu: reformat a function headerMartin Kaiser1-5/+1
The definition of Hal_EfuseParseIDCode88E can be a single line. Signed-off-by: Martin Kaiser <[email protected]> Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-08staging: r8188eu: reorder assignments, clarify the header formatMartin Kaiser1-9/+6
Reorder some of the assignments in update_recvframe_attrib_88e. This should make it a bit easier to understand the format of the header that is added by the chip's firmware. Signed-off-by: Martin Kaiser <[email protected]> Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-08staging: r8188eu: remove some obsolete commentsMartin Kaiser1-2/+0
Remove obsolete comments in validate_recv_data_frame. There is no prxcmd variable (any more?). Signed-off-by: Martin Kaiser <[email protected]> Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-08staging: r8188eu: don't store addba requestMartin Kaiser3-24/+13
There's no need to store an incoming addba request in struct mlme_ext_info. We only need the addba request to copy some of its fields into our addba response. It's simpler to pass the incoming request's management frame to issue_action_BA as an additional parameter. issue_action_BA can then extract the required fields. If issue_action_BA prepares a request rather than a response, the caller sets the parameter for the incoming request to NULL. Signed-off-by: Martin Kaiser <[email protected]> Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-08staging: r8188eu: convert three functions to boolMichael Straube2-12/+12
The functions is_client_associated_to_ap() is_client_associated_to_ibss() is_IBSS_empty() return boolean values. Convert their return type to bool and replace _FAIL, which is defined as 0, with false. Another step to get rid of _SUCCESS / _FAIL. Signed-off-by: Michael Straube <[email protected]> Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-08staging: r8188eu: remove unused struct declarationsDeepak R Varma1-42/+0
Some structures are only declared but have not been used anywhere in the code. Remove such unused structs. Issue identified as part of coccicheck report driven code investigation. Suggested-by: Pavel Skripkin <[email protected]> Signed-off-by: Deepak R Varma <[email protected]> Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Link: https://lore.kernel.org/r/Y2LYvhr74ng+xFbz@qemulion Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-08staging: emxx_udc: use min helper macro for variable comparisonDeepak R Varma1-4/+1
Simplify code by using min helper macros in place of lengthy if/else block oriented logical evaluation and value assignment. This issue is identified by coccicheck using the minmax.cocci file. Signed-off-by: Deepak R Varma <[email protected]> Link: https://lore.kernel.org/r/Y2eKxoUWtbPY/88b@qemulion Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-08staging: rtl8723bs: replace underutilized struct by array variableDeepak R Varma2-20/+13
For structure iqk_matrix_regs_setting, only the "Value" member variable is utilized whereas the other struct members are only declared but not utilised. Replace the struct declaration and implementation by an equivalent variable similar to the only used struct member variable. While in there, update the macro mixed case names to uppercase style. The resultant code is simpler and is easy to maintain. Suggested-by: Dan Carpenter <[email protected]> Signed-off-by: Deepak R Varma <[email protected]> Link: https://lore.kernel.org/r/Y2ZF6O1KU3zZ6r3C@qemulion Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-08staging: rtl8192e: Fix divide fault when calculating beacon ageLarry Finger1-3/+3
When the configuration parameter CONFIG_HZ is less that 100, the compiler generates an error as follows: ../drivers/staging/rtl8192e/rtllib_wx.c: In function 'rtl819x_translate_scan': ../drivers/staging/rtl8192e/rtllib_wx.c:220:57: warning: division by zero [-Wdiv-by-zero] 220 | (jiffies - network->last_scanned) / (HZ / 100)); | ^ In file included from ../include/linux/skbuff.h:45, from ../include/linux/if_ether.h:19, from ../include/linux/etherdevice.h:20, from ../drivers/staging/rtl8192e/rtllib_wx.c:18: ../drivers/staging/rtl8192e/rtllib_wx.c: In function 'rtllib_wx_get_scan': ../drivers/staging/rtl8192e/rtllib_wx.c:261:70: warning: division by zero [-Wdiv-by-zero] 261 | (jiffies - network->last_scanned) / | In fact, is HZ is not a multiple of 100, the calculation will be wrong, but it will compile correctly. The fix is to get rid of the (HZ / 100) portion. To decrease any round-off errors, the compiler is forced to perform the 100 * jiffies-difference before dividing by HZ. This patch is only compile tested. Reported-by: Randy Dunlap <[email protected]> Acked-by: Randy Dunlap <[email protected]> # build-tested Signed-off-by: Larry Finger <[email protected]> Tested-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-08staging: r8188eu: change return type of rtw_set_802_11_disassociate to voidPhillip Potter3-10/+5
Change return type of rtw_set_802_11_disassociate to void. This function always returns 'true' no matter what, so there is no need to return a value, and no need to check for it in the two call sites within rtw_wx_set_mlme. Also, as we are no longer using ret in rtw_wx_set_mlme except as the return value, just remove it and return 0 directly. Suggested-by: Michael Straube <[email protected]> Signed-off-by: Phillip Potter <[email protected]> Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-08staging: rtl8192e: rtl819x_HTProc: make arrays const and one staticColin Ian King1-3/+3
Make two dead-only arrays const. Make array EWC11NHTCap static const so it is not populated on the stack, makes the code smaller too. Signed-off-by: Colin Ian King <[email protected]> Tested-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-08staging: r8188eu: remove unused ijk_matrix_regs_set implementationDeepak R Varma2-15/+0
Instance IQKMatrixRegSetting of struct ijk_matrix_regs_set is initialised and its member variables are assigned values, but it is not used anywhere. Remove the structure and its unused implementation. Suggested-by: Dan Carpenter <[email protected]> Signed-off-by: Deepak R Varma <[email protected]> Link: https://lore.kernel.org/r/Y2P6Jj+IcPss0wFd@qemulion Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-08staging: rtl8723bs: Use min/max macros for variable comparisonDeepak R Varma2-12/+5
Simplify code by using min and max helper macros in place of lengthy if/else block oriented logical evaluation and value assignment. This issue is identified by coccicheck using the minmax.cocci file. Signed-off-by: Deepak R Varma <[email protected]> Link: https://lore.kernel.org/r/Y2OK6fcIkH3S2/1f@qemulion Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-08staging: rtl8192e: Use min_t/max_t macros for variable comparisonDeepak R Varma1-9/+4
Simplify code by using min_t and max_t helper macros in place of lengthy if/else block oriented logical evaluation and value assignment. This issue is identified by coccicheck using the minmax.cocci file. Use the *_t variants of min/max macros to avoid compiler warnings about data typecast. Also, use u32 as type for min_t macro to avoid any truncation of data associated with enum constant HT_AGG_SIZE_32K. Signed-off-by: Deepak R Varma <[email protected]> Tested-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/Y2LxC2kziM1TznhO@qemulion Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-08staging: vt6655: change 2 variable names wFB_Opt0 and wFB_Opt1Tanjuate Brunostar1-16/+16
These variables are named using Hungarian notation, which is not used in the Linux kernel. Signed-off-by: Tanjuate Brunostar <[email protected]> Tested-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/Y2Nu/i957Ill7r+d@elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-02staging: r8188eu: convert rtw_setdatarate_cmd to correct error semanticsPhillip Potter3-17/+10
Convert rtw_setdatarate_cmd function to use proper error return codes rather than _SUCCESS and _FAIL, and a simpler 'return 0;' style. For now, wrap rtw_enqueue_cmd call and return -EPERM if it fails, as converting this function makes more sense later on due to its large number of callers. Also change rtw_wx_set_rate function to pass through the proper error code rather than just 0 or -1. Signed-off-by: Phillip Potter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-02staging: wlan-ng: Remove unused structure definitionsDeepak R Varma1-232/+0
Remove structure definitions that are never used in the code. Signed-off-by: Deepak R Varma <[email protected]> Link: https://lore.kernel.org/r/74a79ea400ec26624e445692f3353424fb6fc29e.1667308828.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-02staging: wlan-ng: Remove unused function declarationsDeepak R Varma1-22/+0
Several functions are declared but are not implemented or used in any part of the code. Remove such unimplemented function declarations. Signed-off-by: Deepak R Varma <[email protected]> Link: https://lore.kernel.org/r/09e2af8d702e33c15ed9f655b0a1190b4e8bec86.1667308828.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-02staging: wlan-ng: Remove unused struct p80211macarray definitionDeepak R Varma1-6/+0
struct p80211macarray is defined but is never used. Remove the unused struct declaration. Issue identified as part of coccicheck based code analysis. Suggested-by: Dan Carpenter <[email protected]> Suggested-by: Pavel Skripkin <[email protected]> Signed-off-by: Deepak R Varma <[email protected]> Link: https://lore.kernel.org/r/b42eff9b8f73542bc9015948e5e4684416982e1b.1667308828.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-02staging: wlan-ng: Remove unused struct wlan_ie_ibss_parms referencesDeepak R Varma1-9/+0
Pointer reference to struct wlan_ie_ibss_parms is added as a member variable to 2 structures; However, these references are never used. Remove such unused struct references. The cleanup also renders the struct useless; so remove it as well. Issue identified as part of coccicheck based code analysis. Suggested-by: Dan Carpenter <[email protected]> Suggested-by: Pavel Skripkin <[email protected]> Signed-off-by: Deepak R Varma <[email protected]> Link: https://lore.kernel.org/r/e53084cdd3ca3ffea6a32393f6f28c7b7650d1a4.1667308828.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-02staging: wlan-ng: Remove unused struct wlan_ie_tim referencesDeepak R Varma1-12/+0
Pointer reference to struct wlan_ie_tim is added as a member variable of a structure; However, this references is never used. Remove such unused struct reference. The cleanup also renders the struct useless; so remove it as well. Issue identified as part of coccicheck based code analysis. Suggested-by: Dan Carpenter <[email protected]> Suggested-by: Pavel Skripkin <[email protected]> Signed-off-by: Deepak R Varma <[email protected]> Link: https://lore.kernel.org/r/36834007587a2e0ef7a782f5919f3a4c756b7840.1667308828.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-02staging: wlan-ng: Remove unused struct wlan_ie_supp_rates referencesDeepak R Varma1-14/+0
Pointer reference to struct wlan_ie_supp_rates is added as a member variable to 7 different structures. However, these references are never used. Remove such unused struct references. The cleanup also renders the struct useless; so remove it as well. Issue identified as part of coccicheck based code analysis. Suggested-by: Dan Carpenter <[email protected]> Suggested-by: Pavel Skripkin <[email protected]> Signed-off-by: Deepak R Varma <[email protected]> Link: https://lore.kernel.org/r/370feb1f300896af66fa1c443d3ad19dc8934be3.1667308828.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-02staging: wlan-ng: Remove unused struct wlan_ie_ssid referencesDeepak R Varma1-12/+0
Pointer reference to struct wlan_ie_ssid is added as a member variable to 5 different structures. However, these references are never used. Remove such unused struct references. The cleanup also renders the struct useless; so remove it as well. Issue identified as part of coccicheck based code analysis. Suggested-by: Dan Carpenter <[email protected]> Suggested-by: Pavel Skripkin <[email protected]> Signed-off-by: Deepak R Varma <[email protected]> Link: https://lore.kernel.org/r/6e39ef59d01d65a1e179f6aecfbb0d68b81fa257.1667308828.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-02staging: r8188eu: convert rtw_free_stainfo() to voidMichael Straube2-7/+3
The function rtw_free_stainfo() returns always _SUCCESS and none of its callers uses the return value. We can safely make the function void. Yet another tiny step towards getting rid of _FAIL / _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-02staging: r8188eu: remove extern from function prototypesMichael Straube3-12/+12
Declaring function prototypes extern is redundant and triggers checkpatch warnings. Remove all extern from function prototypes. 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-02staging: rtl8192u: remove unnecessary function implementationDeepak R Varma3-12/+0
This driver is a single standalone driver and does not have any loading dependencies on another associated drivers. The build results in one single .ko object. The current implementation of the function ieee80211_tkip_null simply returns back to the caller without any useful instruction executions. It does not lead to auto-loading of any other associated modules as the initial design implementation appears to be. Hence the call to ieee80211_tkip_null() and its implementation is unnecessary and should be removed. Signed-off-by: Deepak R Varma <[email protected]> Link: https://lore.kernel.org/r/6f5a4313fc21365bf733c25385aef79554ffb253.1667237959.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-02staging: rtl8192e: Remove line breaks to match coding styleGabhyun Kim1-2/+1
Remove redundant line break in function definition to correct coding style. Signed-off-by: Gabhyun Kim <[email protected]> Link: https://lore.kernel.org/r/20221101062636.GA3257@ubuntu Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-02staging: octeon: cvmx_ptr_to_phys() should return physaddr_tGeert Uytterhoeven2-3/+3
On 32-bit without physical address extensions (e.g. sh-allmodconfig): drivers/staging/octeon/ethernet-mem.c: In function ‘cvm_oct_free_hw_memory’: ./arch/sh/include/asm/io.h:239:32: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] 239 | #define phys_to_virt(address) ((void *)(address)) | ^ drivers/staging/octeon/ethernet-mem.c:123:18: note: in expansion of macro ‘phys_to_virt’ 123 | fpa = (char *)phys_to_virt(cvmx_ptr_to_phys(fpa)); | ^~~~~~~~~~~~ Fix this by making cvmx_ptr_to_phys() return physaddr_t instead of uint64_t. Signed-off-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-02staging: vt6655: change variable name wTimeStampOffTanjuate Brunostar1-2/+2
Remove the use of Hungarian notation, which is not used in the Linux kernel. Signed-off-by: Tanjuate Brunostar <[email protected]> Link: https://lore.kernel.org/r/Y2DtFRdhCiyNF2kF@elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.net Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-11-02staging: r8188eu: use ether_addr_equal in OnActionMartin Kaiser1-1/+1
Use ether_addr_equal to compare two mac addresses in OnAction. Both struct ieee80211_mgmt and struct eeprom_priv's mac_addr component are 2-byte aligned. Suggested-by: Joe Perches <[email protected]> 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-11-02staging: r8188eu: replace ternary operator with min, max, abs macrosMichael Straube3-5/+4
Replace some ternary operators with the min(), max() or abs() macros to improve readability. 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-02staging: r8188eu: use ieee80211_get_SAMartin Kaiser1-1/+1
Use ieee80211_get_SA in update_recvframe_phyinfo_88e instead of the driver-specific get_sa 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-11-02staging: r8188eu: use hdr->frame_control instead of fcMartin Kaiser1-3/+3
We can remove the fc variable in update_recvframe_phyinfo_88e and use hdr->frame_control instead. 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-11-02staging: r8188eu: use ether_addr_equal for address comparisonMartin Kaiser1-2/+2
We can use ether_addr_equal instead of memcmp in update_recvframe_phyinfo_88e for comparing the incoming frame's destination address with our local address. Both struct ieee80211_hdr and struct eeprom_priv's mac_addr component are 2-byte aligned. Suggested-by: Joe Perches <[email protected]> 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-10-31staging: r8188eu: check destination address in OnActionMartin Kaiser1-12/+3
All subfunctions of OnAction check if the destination address matches the local interface's address. It's simpler to move this check to OnAction. 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]>