- 04 Apr, 2022 40 commits
-
-
Sathish Kumar authored
This patch fixes the checkpatch.pl warnings like: CHECK: Please don't use multiple blank lines + + from rtl8712_*.h, rtl871x_*.h, sta_info.h, and wifi.h Signed-off-by: Sathish Kumar <skumark1902@gmail.com> Link: https://lore.kernel.org/r/20220404034706.2384-1-skumark1902@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Rebecca Mckeever authored
Conform to Linux kernel coding style. Noticed when completing a different patch. Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> Link: https://lore.kernel.org/r/ccacca6f679a879ad2032dc0aeb0b0156e3a847b.1649011311.git.remckee0@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Rebecca Mckeever authored
Both sides of conditional statement are the same except for the comment. Additional instance found with git grep. Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> Link: https://lore.kernel.org/r/d33c51bc3a20fa25e4737b258f3b1c42cc8124e3.1649011311.git.remckee0@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Rebecca Mckeever authored
The "need to make timeout handlerOS independent" comment is incorrect. Remove the comment to avoid misleading developers. Additional instance found with git grep. Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> Link: https://lore.kernel.org/r/7d0d2253d86f46bc0def0447de424727d70f03a7.1649011311.git.remckee0@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove the bretry variable. It's set and used only once. Call the ieee80211 helper directly. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220403165438.357728-12-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Do not call get_hdr_bssid from validate_recv_data_frame. We already distinguish between the four cases for to_ds, from_ds. Copy the bssid address as described in the "DS bit usage" table in include/linux/ieee80211.h. Eventually, we should remove get_hdr_bssid (and other similar driver-specific parsing functions). Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220403165438.357728-11-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove the psa, pda variables. They are set and read only once. We can use the ieee80211 helpers directly. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220403165438.357728-10-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
The "DS bit usage" table in include/linux/ieee80211.h shows that ra is always addr1 and ta is always addr2. We can set pattrib->ra and pattrib->ta regardless of the to_ds and from_ds bits. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220403165438.357728-9-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
to_fr_ds in struct rx_pkt_attrib stores the values of the to_ds and from_ds bits of an incoming data frame. to_fr_ds is set by parsing the frame control bytes and it's used only in validate_recv_data_frame. Remove to_fr_ds from struct rx_pkt_attrib and use the ieee80211 helpers to distinguish between the four different cases for to_ds, from_ds. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220403165438.357728-8-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
In validate_recv_data_frame, we return an error if both to_ds and from_ds are set in the incoming data frame. There's no need to populate patrib->ra and ta before we return. The caller will free the received frame, including pattrib. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220403165438.357728-7-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove two unnecessary ternary operators in validate_recv_data_frame. pattrib->to_fr_ds cannot be 3 in these places. If it was 3, we'd already have returned an error to the caller. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220403165438.357728-6-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Simplify the error handling in validate_recv_data_frame. The function does not have to do any cleanup for errors, we can return immediately. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220403165438.357728-5-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Use the ieee80211 helper to check if the retry bit is set in the incoming data frame. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220403165438.357728-4-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Use the ieee80211_get_DA helper to get a pointer to the destination address of the incoming data frame. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220403165438.357728-3-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Use the ieee80211_get_SA helper to get a pointer to the source address of the incoming data frame. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220403165438.357728-2-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove the GetAid macro and map the frame data to a struct ieee80211_pspoll instead. We can then read the aid component. psta->aid is in host endianness and has a 0x3FFF mask applied. We have to convert our read value as well and apply the mask before we compare it to psta->aid. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220403164526.357371-6-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Map the incoming frame data to a struct ieee80211_hdr and extract the addresses. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220403164526.357371-5-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
validate_recv_ctrl_frame wraps nearly all of its code into a large if (pspoll) { ... } clause. Revert this condition and exit if the incoming frame is not a pspoll frame. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220403164526.357371-4-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Use the ieee80211 helper to check if our incoming ctrl frame is a pspoll frame. We can drop the initial ctrl frame check as ieee80211_is_pspoll checks for a control frame with subtype pspoll. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220403164526.357371-3-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Make validate_recv_ctrl_frame return void. At the moment, the function always returns _FAIL, the caller does not check the return value. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220403164526.357371-2-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Use the ieee80211 helpers to detect the frame subtype in and to parse mac addresses in validate_recv_mgnt_frame. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220403163818.357173-3-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Change the validate_recv_mgnt_frame function to not return a status. It always returns _SUCCESS, its only caller does not check the return value. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220403163818.357173-2-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
wifi_test_chk_rate is always 1. Remove the variable and the code to check it. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220403163206.357004-3-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Don't jump to _continue, we go there anyway. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220403163206.357004-2-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Bruno Moreira-Guedes authored
The MODULE_AUTHOR line missed the '>' character in the end of the author's e-mail address. Just added it. Signed-off-by: Bruno Moreira-Guedes <codeagain@codeagain.dev> Link: https://lore.kernel.org/r/20220403222728.276111-1-codeagain@codeagain.devSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jaehee Park authored
Change variable name to be consistent with the naming conventions. ssidlen was changed to ssid_len and ssidie was changed to ssid_ie to be consistent. This makes the variables more readable. The other ssid names in the code are separated by an underscore. For example, bssid_filter and num_of_ssids have the ssid separated from the rest of the words with an underscore. Signed-off-by: Jaehee Park <jhpark1013@gmail.com> Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20220401145350.GA45053@jaehee-ThinkPad-X1-ExtremeSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Clean up the comment for rtw_pwr_wakeup() by removing obvious information. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220403103713.12883-5-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
After previous cleanups the rtw_pwr_wakeup() macro is just an alias for _rtw_pwr_wakeup(). Remove the macro and rename _rtw_pwr_wakeup() to rtw_pwr_wakeup(). Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220403103713.12883-4-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The parameter 'ips_deffer_ms' of _rtw_pwr_wakeup() is always RTW_PWR_STATE_CHK_INTERVAL. Make it local. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220403103713.12883-3-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The parameter 'caller' of _rtw_pwr_wakeup() is not used. Remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220403103713.12883-2-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The HW_VAR_H2C_FW_P2P_PS_OFFLOAD case in SetHwReg8188EU() just calls a function. Call the function directly and remove the HW_VAR_H2C_FW_P2P_PS_OFFLOAD case from SetHwReg8188EU(). This is part of the ongoing effort to get rid of the unwanted hal layer. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220402092332.6627-8-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The HW_VAR_H2C_FW_JOINBSSRPT case in SetHwReg8188EU() just calls a function. Call the function directly and remove the HW_VAR_H2C_FW_JOINBSSRPT case from SetHwReg8188EU(). This is part of the ongoing effort to get rid of the unwanted hal layer. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220402092332.6627-7-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Remove the HW_VAR_RPT_TIMER_SETTING case from SetHwReg8188EU() and move its functionality to rtw_cmd.c where it is actually used. This is part of the ongoing effort to get rid of the unwanted hal layer. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220402092332.6627-6-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Remove the HW_VAR_ANTENNA_DIVERSITY_SELECT case from SetHwReg8188EU() and move its functionality to rtw_cmd.c where it is actually used. This is part of the ongoing effort to get rid of the unwanted hal layer. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220402092332.6627-5-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Remove the HW_VAR_AMPDU_MIN_SPACE case from SetHwReg8188EU() and move its functionality to rtw_wlan_util.c where it is actually used. This is part of the ongoing effort to get rid of the unwanted hal layer. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220402092332.6627-4-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Remove the HW_VAR_ACK_PREAMBLE case from SetHwReg8188EU() and move its functionality to rtw_wlan_util.c where it is actually used. This is part of the ongoing effort to get rid of the unwanted hal layer. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220402092332.6627-3-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Remove the HW_VAR_BSSID case from SetHwReg8188EU() and move its functionality to rtw_mlme_ext.c where it is actually used. This is part of the ongoing effort to get rid of the unwanted hal layer. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220402092332.6627-2-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
白浩文 authored
This patch fixes some spelling typo in error message reported by checkpatch.pl WARNING: 'cacluated' may be misspelled - perhaps 'calculated'? Signed-off-by: 白浩文 <baihaowen@meizu.com> Link: https://lore.kernel.org/r/1648809881-2777-1-git-send-email-baihaowen@meizu.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabio M. De Francesco authored
If ioremap_wc() fails, the code jumps to the "exit" label and forgets to free the bus memory mapped into "sm750_dev->pvReg". Mapped bus memory must always be freed by calling iounmap(). Call iounmap(sm750_dev->pvReg) when the above-mentioned failures happen. The site of the missing iounmap() has been detected by Smatch. Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20220402175655.31512-1-fmdefrancesco@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabio M. De Francesco authored
Use the ARRAY_SIZE() macro in places where there are open coded calculations of the size of arrays. ARRAY_SIZE(arr) makes sure that "arr" is an array, it's safer than sizeof(arr) / sizeof(arr[0]), and improves readibility. Detected with the help of Coccinelle. Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20220402163439.20457-1-fmdefrancesco@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-