- 02 Nov, 2022 9 commits
-
-
Deepak R Varma authored
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 <drv@mailo.com> Link: https://lore.kernel.org/r/6f5a4313fc21365bf733c25385aef79554ffb253.1667237959.git.drv@mailo.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gabhyun Kim authored
Remove redundant line break in function definition to correct coding style. Signed-off-by: Gabhyun Kim <kimgaby415@gmail.com> Link: https://lore.kernel.org/r/20221101062636.GA3257@ubuntuSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Geert Uytterhoeven authored
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 <geert@linux-m68k.org> Link: https://lore.kernel.org/r/20221101080111.750748-1-geert@linux-m68k.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Tanjuate Brunostar authored
Remove the use of Hungarian notation, which is not used in the Linux kernel. Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com> Link: https://lore.kernel.org/r/Y2DtFRdhCiyNF2kF@elroy-temp-vm.gaiao0uenmiufjlowqgp5yxwdh.gvxx.internal.cloudapp.netSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
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 <joe@perches.com> 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/20221031205140.124682-1-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Replace some ternary operators with the min(), max() or abs() macros to improve readability. 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/20221031153743.8801-1-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Use ieee80211_get_SA in update_recvframe_phyinfo_88e instead of the driver-specific get_sa function. 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/20221031205412.124871-4-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
We can remove the fc variable in update_recvframe_phyinfo_88e and use hdr->frame_control instead. 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/20221031205412.124871-3-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
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 <joe@perches.com> 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/20221031205412.124871-2-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 31 Oct, 2022 31 commits
-
-
Martin Kaiser authored
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 <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20221030173326.1588647-14-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Both callers of rtw_action_public_decache pass a u8 value for the token parameter. We can change token from s32 to u8 and remove the code for token < 0. 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/20221030173326.1588647-13-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
The only caller of on_action_public_default does not check the return value. We can make it a void function. 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/20221030173326.1588647-12-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
The only caller of on_action_public_vendor does not check the return value. We can make it a void function. 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/20221030173326.1588647-11-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Use the struct mgmt to read the action_code. This is much simpler than parsing the message ourselves. Add a comment about reading the action code. All members of the action enum start with an action_code byte. It does not matter which member we use. 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/20221030173326.1588647-10-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Define a struct ieee80211_mgmt in OnAction_p2p and use it to check the destination address. This replaces a call to the driver-specific GetAddr1Ptr function. 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/20221030173326.1588647-9-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
OnAction_p2p has a switch-case statement where only a single case is handled. Use if instead, this makes the code shorter and easier to read. 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/20221030173326.1588647-8-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
The caller of OnAction_p2p has already checked the action category. We can remove the check in OnAction_p2p. 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/20221030173326.1588647-7-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
OnAction_p2p is called only by OnAction, its return value is not checked. We can make it a static void function. 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/20221030173326.1588647-6-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
OnAction_back is called only by OnAction, its return value is not checked. We can make it a static void function. 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/20221030173326.1588647-5-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
The on_action_public function is called only by OnAction. This function also lives in rtw_mlme_ext.c and does not check the return value from on_action_public. We can make on_action_public a static void function. The ret variable is no longer needed if we don't return a value. It can be removed. Reported-by: kernel test robot <lkp@intel.com> 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/20221030173326.1588647-4-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
The caller of on_action_public has already checked the action category. We can remove the check in on_action_public. 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/20221030173326.1588647-3-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Define a struct ieee80211_mgmt and use it to read the destination address. This replaces one call to the driver-specific GetAddr1Ptr function, which should eventually be removed. 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/20221030173326.1588647-2-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nam Cao authored
In r8712_init_drv_sw(), whenever any function call returns error, it is returned immediately without properly cleaning up the other successfully executed functions. This can cause memory leak. Instead of return immediately, free all the allocated buffers first. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Signed-off-by: Nam Cao <namcaov@gmail.com> Link: https://lore.kernel.org/r/0a3414b12031f6cdcba81a8725e91eb9567ff34f.1666688642.git.namcaov@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nam Cao authored
The return value of _r8712_init_xmit_priv() is never checked and the driver always continue execution as if all is well. This will cause problems if, for example, buffers cannot be allocated and the driver continue and use those buffers. Check for return value of _r8712_init_xmit_priv() and return error (if any) during probing. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Signed-off-by: Nam Cao <namcaov@gmail.com> Link: https://lore.kernel.org/r/b550803561acf26af71f2377215c28b94435a644.1666688642.git.namcaov@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nam Cao authored
The function _r8712_init_recv_priv() and also r8712_init_recv_priv() just returns silently if they fail to allocate memory. Change their return type to int and add necessary checks and handling if they return -ENOMEM Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Signed-off-by: Nam Cao <namcaov@gmail.com> Link: https://lore.kernel.org/r/506ac35a667e511db568b06b86834fd0ceeba453.1666688642.git.namcaov@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nam Cao authored
This reverts commit 5d3da4a2. This commit annotated false positive for kmemleak. The reasoning is that the buffers are freed when the driver is unloaded. However, there is actually potential memory leak when probe fails. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Signed-off-by: Nam Cao <namcaov@gmail.com> Link: https://lore.kernel.org/r/26ce206b2c40c7db48c146aa6105789db9dfcc1a.1666688642.git.namcaov@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Replace the last get_da call with ieee80211_get_DA and remove the get_da function. 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/20221029171011.1572091-3-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Replace a call to the driver-specific get_da function with ieee80211_get_DA from ieee80211.h. 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/20221029171011.1572091-2-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Aaron Lawrence authored
Rewritten a comparison to NULL with a negation operator in accordance with the Linux kernel coding-style regulations. The fix was directly recommended by the checkpatch script. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Signed-off-by: Aaron Lawrence <t4rmin@zohomail.com> Link: https://lore.kernel.org/r/ca33296630627020694f4b653580f689a8a3d1c7.1666787061.git.t4rmin@zohomail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Aaron Lawrence authored
Split a multiple assignments statement to individual assignments on different lines in accordance with the Linux kernel coding-style regulations. Also repositioned comments on it and the statement before for increased legibility. The multiple assignments issue was found by the checkpatch script, with the comments legibility issue were through direct observation. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Signed-off-by: Aaron Lawrence <t4rmin@zohomail.com> Link: https://lore.kernel.org/r/a9ab257d0042afd3b3231eefe4f58c0c3ac7649f.1666787061.git.t4rmin@zohomail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Aaron Lawrence authored
Added braces around needed arms of statements which needs them in accordance with the Linux kernel coding-style regulations. The issues were found with the help of the checkpatch script. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Signed-off-by: Aaron Lawrence <t4rmin@zohomail.com> Link: https://lore.kernel.org/r/641d8360c5f86b54efc96d7f8ef70be1371db480.1666787061.git.t4rmin@zohomail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Aaron Lawrence authored
Aligned multiple lines to be at the same indentation of open parentheses before it in accordance with the Linux kernel coding-style regulations. The issues were found by running the checkpatch script on the file. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Signed-off-by: Aaron Lawrence <t4rmin@zohomail.com> Link: https://lore.kernel.org/r/4253b94d6b7d94713afb02fa63d0a98686e77cc1.1666787061.git.t4rmin@zohomail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Aaron Lawrence authored
Removed multiple blank lines that are not necessary before a closing brace. The issues were found with the checkpatch script and were dealt with in accordance with the Linux kernel coding-style guidelines. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Signed-off-by: Aaron Lawrence <t4rmin@zohomail.com> Link: https://lore.kernel.org/r/1ba11754f1b1e39b1525a837b8493ba8434d5e3b.1666787061.git.t4rmin@zohomail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Aaron Lawrence authored
Removed multiple unnecessary blank lines in accordance with the Linux kernel coding-style regulations. The issues were reported by the checkpatch script. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Signed-off-by: Aaron Lawrence <t4rmin@zohomail.com> Link: https://lore.kernel.org/r/f2103758c23f37b61fcbe14f8ed0da8d6b31f5c6.1666787061.git.t4rmin@zohomail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Yogesh Hegde authored
Rename variables * rateIndex to rate_index * rateBitmap to rate_bitmap to avoid CamelCase which is not accepted by checkpatch.pl . Signed-off-by: Yogesh Hegde <yogi.kernel@gmail.com> Link: https://lore.kernel.org/r/20221030133204.GA416592@zephyrusSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Aaron Lawrence authored
This patch is intended to remove unnecessary parentheses in the rtllib_module.c file following the Linux kernel coding-style regulations. The modification is recommended by the checkpatch script. Signed-off-by: Aaron Lawrence <t4rmin@zohomail.com> Link: https://lore.kernel.org/r/20221027135627.vzc3woeuhrivozqz@plymouthSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Kang Minchul authored
Make function rtw_sta_flush to void in order to prevent cocci warning as follows: Unneeded variable: "ret". Return "0" on line 1031 Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Kang Minchul <tegongkang@gmail.com> Link: https://lore.kernel.org/r/20221025170621.271903-5-tegongkang@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Kang Minchul authored
Return 0 directly instead of storing it in a variable. This can prevent cocci warning as follows: Unneeded variable: "pull". Return "0" on line 298 Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Kang Minchul <tegongkang@gmail.com> Link: https://lore.kernel.org/r/20221025170621.271903-4-tegongkang@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Kang Minchul authored
Return _SUCCESS directly instead of storing it in a variable. This can prevent cocci warning as follows: Unneeded variable: "ret". Return "_SUCCESS" on line 1516 Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Kang Minchul <tegongkang@gmail.com> Link: https://lore.kernel.org/r/20221025170621.271903-3-tegongkang@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Kang Minchul authored
Returning value 0 directly instead of storing it in variable ret. This commit can prevent cocci warning as follows: Unneeded variable: "ret". Return "0" on line 3030 Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Kang Minchul <tegongkang@gmail.com> Link: https://lore.kernel.org/r/20221025170621.271903-2-tegongkang@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-