- Apr 04, 2022
-
-
Michael Straube authored
According to the Realtek documentation the chips this driver supports are 2.4 GHz only chips. Frequencies for 5 GHz channels can be removed from the ch_freq_map array. Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220331214146.15161-2-straube.linux@gmail.com Signed-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. Suggested-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Rebecca Mckeever <remckee0@gmail.com> Link: https://lore.kernel.org/r/YkXwwfYBE+P0UObq@bertie Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Rebecca Mckeever authored
Use sizeof(*pvar) instead of sizeof(struct var) when allocating memory. This conforms to Linux kernel coding style, improves readability, and decreases the opportunity for bugs if the pointer variable type is changed. Issue found by checkpatch messages of the following format: CHECK: Prefer kzalloc(sizeof(*pvar)...) over kzalloc(sizeof(struct var)...) Signed-off-by:
Rebecca Mckeever <remckee0@gmail.com> Link: https://lore.kernel.org/r/YkXh1HBqaHwT38UC@bertie Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabio M. De Francesco authored
There is no need for "struct dentry *eth_debugfs_dir" which is used for debug / sysfs directories. Therefore, remove this "struct dentry" and everything related (i.e., creation and removal). As a side effect of this change, the code has no more need of the "cleanup_register_netdev" label, which can also be removed. Suggested-by:
Dan Carpenter <dan.carpenter@oracle.com> Suggested-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20220331064751.29634-1-fmdefrancesco@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The only call to GetHwReg8188EU() that is left over from previous cleanups sets a variable that is immediately overwritten. This call is useless and we can finally remove the GetHwReg8188EU() function. 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/20220331130522.6648-6-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Move the functionality of the HW_VAR_FWLPS_RF_ON case in GetHwReg8188EU() to a static function in rtw_pwrctrl.c and remove the HW_VAR_FWLPS_RF_ON case from GetHwReg8188EU(). 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/20220331130522.6648-5-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The HW_VAR_CHK_HI_QUEUE_EMPTY from GetHwReg8188EU() just calls rtw_read32(). Remove HW_VAR_CHK_HI_QUEUE_EMPTY from GetHwReg8188EU() and call rtw_read32() directly. Move the call to a new function to indicate what it actually does. 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/20220331130522.6648-4-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The HW_VAR_BCN_VALID from GetHwReg8188EU() just calls rtw_read8(). Remove HW_VAR_BCN_VALID from GetHwReg8188EU() and call rtw_read8() directly. Move the call to a new function to indicate what it actually does. 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/20220331130522.6648-3-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Rename clear_bacon_valid_bit(). Actually it should be clear_beacon_valid_bit(). Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220331130522.6648-2-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Alaa Mohamed authored
Fix "WARNING: please, no space before tabs" reported by checkpatch Signed-off-by:
Alaa Mohamed <eng.alaamohamedsoliman.am@gmail.com> Link: https://lore.kernel.org/r/20220331130948.74835-1-eng.alaamohamedsoliman.am@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sevinj Aghayeva authored
Adhere to Linux kernel coding style. Reported by checkpatch: WARNING: braces {} are not necessary for single statement blocks Signed-off-by:Sevinj Aghayeva <sevinj.aghayeva@gmail.com> Link: https://lore.kernel.org/r/20220331113245.GA425141@euclid Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Wang Qing authored
netdev_alloc_skb() has assigned ssi->netdev to skb->dev if successed, no need to repeat assignment. Signed-off-by:
Wang Qing <wangqing@vivo.com> Link: https://lore.kernel.org/r/1648728514-37390-1-git-send-email-wangqing@vivo.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sevinj Aghayeva authored
Adhere to Linux kernel coding style. Reported by checkpatch: WARNING: Comparisons should place the constant on the right side of the test Signed-off-by:
Sevinj Aghayeva <sevinj.aghayeva@gmail.com> Link: https://lore.kernel.org/r/20220331122618.GA434796@euclid Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Xiaoke Wang authored
kmalloc() is called by rtw_cbuf_alloc() and it returns pointer of srtuct rtw_cbuf, NULL for allocation failure. So it is better to check the return value of it. Signed-off-by:
Xiaoke Wang <xkernel.wang@foxmail.com> Link: https://lore.kernel.org/r/tencent_D95ACC78B93B1CDD14C4E13E4A66FF892008@qq.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove the code fragments for printing outgoing packets. There's only a hal variable HAL_DEF_DBG_DUMP_TXPKT and the bDumpTxPkt component of struct hal_data_8188e. The hal variable is set by a private ioctl, it's never read. Signed-off-by:
Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220330201210.175941-3-martin@kaiser.cx Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove the code fragments for printing incoming packets. There's only a hal variable HAL_DEF_DBG_DUMP_RXPKT and the bDumpRxPkt component of struct hal_data_8188e. The hal variable is set by a private ioctl, it's read in validate_recv_frame but it's not used. All of this can be removed, there's no code to dump the packets. Signed-off-by:
Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220330201210.175941-2-martin@kaiser.cx Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sevinj Aghayeva authored
Adhere to Linux kernel coding style. Reported by checkpatch: WARNING: Comparisons should place the constant on the right side of the test Signed-off-by:
Sevinj Aghayeva <sevinj.aghayeva@gmail.com> Link: https://lore.kernel.org/r/20220330120709.GA339788@euclid Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Haowen Bai authored
This patch fixes some spelling typo in error message reported by checkpatch.pl WARNING: 'writting' may be misspelled - perhaps 'writing'? Signed-off-by:
Haowen Bai <baihaowen@meizu.com> Link: https://lore.kernel.org/r/1648636275-13558-1-git-send-email-baihaowen@meizu.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Haowen Bai authored
This patch fixes some spelling typo in error message reported by checkpatch.pl WARNING: 'Tranceiver' may be misspelled - perhaps 'Transceiver'? WARNING: 'Tranceiver' may be misspelled - perhaps 'Transceiver'? WARNING: 'Tranceiver' may be misspelled - perhaps 'Transceiver'? WARNING: 'Tranceiver' may be misspelled - perhaps 'Transceiver'? Signed-off-by:
Haowen Bai <baihaowen@meizu.com> Link: https://lore.kernel.org/r/1648625242-12678-1-git-send-email-baihaowen@meizu.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Charlie Sands authored
This patch fixes sparse warnings about the endianness of different integers in the driver. Fixes: 15865124 ("staging: r8188eu: introduce new core dir for RTL8188eu driver") Reviewed-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Charlie Sands <sandsch@northvilleschools.net> Link: https://lore.kernel.org/r/YkPK/QmLAp3BkygY@sckzor-linux.localdomain Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The HW_VAR_BCN_VALID case in SetHwReg8188EU() just calls rtw_write8(). Remove HW_VAR_BCN_VALID from SetHwReg8188EU() and call rtw_write8() directly. Move the call to a new function to indicate what it actually does. This is part of the ongoing effort to getrid of the unwanted hal layer. Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220329202141.7028-9-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The HW_VAR_TX_RPT_MAX_MACID case in SetHwReg8188EU() just calls rtw_write8(). Remove HW_VAR_TX_RPT_MAX_MACID from SetHwReg8188EU() and call rtw_write8() directly. Move the call to a new function to indicate what it actually does. 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/20220329202141.7028-8-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Simplify a nested if-else statement to a single if-else statement in rtw_set_threshold(). This improves readability and allows us to remove the local variable threshold. Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220329202141.7028-7-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The HW_VAR_RXDMA_AGG_PG_TH case in SetHwReg8188EU() just sets a variable conditionally and then calls rtw_write8(). Set the variable in the caller and call rtw_write8() directly. Move the functionality into a new static function to make the code cleaner. Remove the HW_VAR_RXDMA_AGG_PG_TH 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/20220329202141.7028-6-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
SetHwReg8188EU() is called with HW_VAR_ACM_CTRL only from a function in rtw_wlan_util.c. Move the functionality into a static function in rtw_wlan_util.c and remove the HW_VAR_ACM_CTRL 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/20220329202141.7028-5-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Rename some macros to upper case to avoid camel case and improve readability. While at it, remove some unused macros. Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220329202141.7028-4-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
SetHwReg8188EU() is called with HW_VAR_MLME_DISCONNECT only from functions in rtw_mlme_ext.c. Move the functionality into a static function in rtw_mlme_ext.c and remove the HW_VAR_MLME_DISCONNECT 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/20220329202141.7028-3-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
SetHwReg8188EU() is called with HW_VAR_RESP_SIFS only in one place. Remove the HW_VAR_RESP_SIFS case from SetHwReg8188EU() and call rtw_write8() directly instead. 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/20220329202141.7028-2-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Haowen Bai authored
As init_mlme_ext_priv function always returns SUCCESS , We can change return type from int to void. fixes coccinelle warning: ./drivers/staging/r8188eu/core/rtw_mlme_ext.c:357:5-8: Unneeded variable: "res". Return "_SUCCESS" on line 380 Reviewed-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Haowen Bai <baihaowen@meizu.com> Link: https://lore.kernel.org/r/1648603740-14760-1-git-send-email-baihaowen@meizu.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabio M. De Francesco authored
The use of kmap() is being deprecated in favor of kmap_local_page() where it is feasible. With kmap_local_page(), the mapping is per thread, CPU local and not globally visible. Therefore rtsx_stor_access_xfer_buf() is a function where the use of kmap_local_page() in place of kmap() is correctly suited. Convert to kmap_local_page() but, instead of open coding it, use the helpers memcpy_to_page() and memcpy_from_page(). Make a minor change to a comment related to scatter-gather. Reviewed-by:
Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by:
Ira Weiny <ira.weiny@intel.com> Signed-off-by:
Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20220330143331.8306-1-fmdefrancesco@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Alaa Mohamed authored
Fix "WARNING: suspect code indent for conditional statements (16, 32)" for line 1240 founded by checkpatch.pl Signed-off-by:
Alaa Mohamed <eng.alaamohamedsoliman.am@gmail.com> Link: https://lore.kernel.org/r/20220330175949.95564-1-eng.alaamohamedsoliman.am@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Rebecca Mckeever authored
Conform to Linux kernel coding style. Issue found by checkpatch: WARNING: Statements should start on a tabstop Signed-off-by:
Rebecca Mckeever <remckee0@gmail.com> Link: https://lore.kernel.org/r/YkRWGCmMytlqgvkZ@bertie Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jaehee Park authored
Remove spaces at the start of the line to follow the linux kernel coding style. Issue found by checkpatch: WARNING: please, no spaces at the start of a line. 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/20220329222534.GA1002253@jaehee-ThinkPad-X1-Extreme Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function rtw_inc_and_chk_continual_urb_error() returns boolean values. Change its return type from int to bool. Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220329103756.6740-5-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function rtw_usb_bulk_size_boundary() returns boolean values. Change its return type from u8 to bool. Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220329103756.6740-4-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Refactor rtw_inc_and_chk_continual_urb_error(). Return directly instead of using a return variable and initialize the variable 'value' at declaration. This shortens the code and improves readability. Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220329103756.6740-3-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Using ternary operator to set a variable to true or false is not needed. Convert two such uses of ternary operator in rtw_usb_bulk_size_boundary() to just use the condition and return the value directly instead of using a return variable. This shortens the code and improves readability. While at it, remove an unneeded line break from the function head. Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220329103756.6740-2-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Use the IEEE80211_SCTL_FRAG define to extract the fragment number from an incoming frame. pattrib->frag_num must be in host endianness, we have to convert hdr->seq_ctrl, this field is little-endian. Remove the local GetFragNum macro, it is not used any more. Signed-off-by:
Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220327180944.712545-10-martin@kaiser.cx Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Use the IEEE80211_SEQ_TO_SN macro in function validate_recv_frame to get the sequence number of an incoming frame. Map the incoming rx bytes to a struct ieee80211_hdr. Replace the fc variable with struct ieee80211_hdr's frame control component. The IEEE80211_SEQ_TO_SN macro takes the sequence control field of an ieee80211 header and extracts the sequence number. The macro's input parameter must be in host endianness, the sequence number in the 80211 header is little-endian, we have to convert it to host endianness. Remove the local GetSequence macro, it is not used any more. Signed-off-by:
Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220327180944.712545-9-martin@kaiser.cx Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove unused defines for control frame subtypes. Signed-off-by:
Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220327180944.712545-8-martin@kaiser.cx Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-