aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2022-04-04staging: r8188eu: remove HW_VAR_RPT_TIMER_SETTING from SetHwReg8188EU()Michael Straube3-8/+4
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.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: remove HW_VAR_ANTENNA_DIVERSITY_SELECT from SetHwReg8188EU()Michael Straube3-15/+7
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.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: remove HW_VAR_AMPDU_MIN_SPACE from SetHwReg8188EU()Michael Straube3-30/+30
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.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: remove HW_VAR_ACK_PREAMBLE from SetHwReg8188EU()Michael Straube3-18/+15
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.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: remove HW_VAR_BSSID from SetHwReg8188EU()Michael Straube3-20/+13
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.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: Fix misspelling in comment "cacluated" -> "calculated"白浩文1-2/+2
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.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: sm750fb: Call iounmap() to free mapped bus memoryFabio M. De Francesco1-0/+1
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.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: Use the ARRAY_SIZE() macroFabio M. De Francesco5-9/+9
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.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: Remove redundant code from rtw_free_netdev()Fabio M. De Francesco1-9/+0
In rtw_free_netdev() there are two redundant tests. The first checks for a valid pointer to a "struct net_device". This pointer is the argument of rtw_free_netdev(). The two callers of this function already test this parameter immediatelly before the calls. The second checks for a valid pointer to a "struct rtw_netdev_priv_indicator". This pointer is always valid and, even if it were not, vfree() is a no-op on NULL pointers. Therefore the above-mentioned two "if" statements are unnecessary and redundant. For this reason, remove these two tests. After removing these tests there is no more need of the "RETURN" label. Therefore, remove also the "RETURN" label. Cc: Pavel Skripkin <paskripkin@gmail.com> Cc: Martin Kaiser <martin@kaiser.cx> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20220402140657.10549-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: remove spaces before tabsRebecca Mckeever1-8/+8
Conform to Linux kernel coding style. Reported by checkpatch: WARNING: please, no space before tabs Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> Link: https://lore.kernel.org/r/2fd10f393e3bc7381a85d0bfc1ec04a80af4eabb.1648888462.git.remckee0@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: remove unnecessary braces in conditional statementsRebecca Mckeever1-7/+4
Conform to Linux kernel coding style. Reported by checkpatch: WARNING: braces {} are not necessary for single statement blocks WARNING: braces {} are not necessary for any arm of this statement Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> Link: https://lore.kernel.org/r/2b46501bb3965a8cf27e7134407c50551c36b7e8.1648888462.git.remckee0@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: format block commentsRebecca Mckeever1-15/+14
Add ' * ' or ' ' to beginning of block comment lines to conform to Linux kernel coding style. Reported by checkpatch: WARNING: Block comments use * on subsequent lines Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> Link: https://lore.kernel.org/r/0387f3df49d89c17acf96cf072e70c98e81e58f7.1648888462.git.remckee0@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: correct misspelling in comment "conider" -> "consider"Rebecca Mckeever1-1/+1
Correct spelling typo. Reported by checkpatch: CHECK: 'conider' may be misspelled - perhaps 'consider'? Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> Link: https://lore.kernel.org/r/5799315f84e50db2a7d05b74cd4ed9ec2f28a8e2.1648888461.git.remckee0@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: remove else after returnRebecca Mckeever1-2/+4
Conform to Linux kernel coding style. Reported by checkpatch: WARNING: else is not generally useful after a break or return Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> Link: https://lore.kernel.org/r/84db0348481b54f58cb0b6200fa9ae471ee06b3b.1648888461.git.remckee0@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: place constants on the right side of testsRebecca Mckeever1-3/+3
Conform to Linux kernel coding style. Reported by checkpatch: WARNING: Comparisons should place the constant on the right side of the test Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> Link: https://lore.kernel.org/r/0f3db3586b3668d6d784e075bc52ffd88b0920d2.1648888461.git.remckee0@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: wlan-ng: Fix Alignment with parenthesisAlaa Mohamed1-2/+2
Fix " CHECK: Alignment should match open parenthesis " Reported by checkpath Signed-off-by: Alaa Mohamed <eng.alaamohamedsoliman.am@gmail.com> Link: https://lore.kernel.org/r/08641d36aaee60797f8c68683b013ebf0215ba2e.1648899123.git.eng.alaamohamedsoliman.am@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: wlan-ng: Fix Lines shouldn't end with '('Alaa Mohamed1-4/+2
Fix "CHECK: Lines should not end with a '('" for lines 331 and 485 Reported By checkpatch Signed-off-by: Alaa Mohamed <eng.alaamohamedsoliman.am@gmail.com> Link: https://lore.kernel.org/r/82bb0ca2bad1bafbaca8ded6fe82b94e4761f648.1648899123.git.eng.alaamohamedsoliman.am@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: rtl8723bs: simplify control flowSevinj Aghayeva1-21/+7
The function iterates an index from 0 to NUM_PMKID_CACHE and returns the first index for which the condition is true. If no such index is found, the function returns -1. Current code has a complex control flow that obfuscates this simple task. Replace it with a loop. Also, given the shortened function body, replace the long variable name psecuritypriv with a short variable name p. Reported by checkpatch: WARNING: else is not generally useful after a break or return Reviewed-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Sevinj Aghayeva <sevinj.aghayeva@gmail.com> Link: https://lore.kernel.org/r/20220401114635.GA567659@euclid Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: vc04_services: Convert kmap() to kmap_local_page()Fabio M. De Francesco1-8/+5
The use of kmap() is being deprecated in favor of kmap_local_page() where it is feasible. In file interface/vchiq_arm/vchiq_arm.c, function free_pagelist() calls kmap() / kunmap() from two places. With kmap_local_page(), the mapping is per thread, CPU local and not globally visible. Therefore, free_pagelist() 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 memcpy_to_page() helper. Reviewed-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20220330191414.23141-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: rtl8723bs: refactor rtw_ch2freq()Michael Straube1-22/+18
Convert the array ch_freq_map to a simple integer array and use the indices as channel numbers. This simplifies the code and avoids looping through the array to get the frequency. To avoid out of bounds array access return a default value for invalid channel values, like the original code did. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220331214146.15161-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: rtl8723bs: remove 5 GHz channels from ch_freq_mapMichael Straube1-16/+0
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>
2022-04-04staging: r8188eu: remove handlerOS independent commentRebecca Mckeever1-1/+0
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>
2022-04-04staging: r8188eu: use sizeof(*pvar) for allocating structsRebecca Mckeever2-10/+10
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>
2022-04-04staging: unisys: Remove "struct dentry *eth_debugfs_dir"Fabio M. De Francesco1-17/+0
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>
2022-04-04staging: r8188eu: remove GetHwReg8188EU()Michael Straube3-19/+1
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>
2022-04-04staging: r8188eu: remove HW_VAR_FWLPS_RF_ON from GetHwReg8188EU()Michael Straube3-22/+16
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>
2022-04-04staging: r8188eu: remove HW_VAR_CHK_HI_QUEUE_EMPTY from GetHwReg8188EU()Michael Straube3-11/+7
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>
2022-04-04staging: r8188eu: remove HW_VAR_BCN_VALID from GetHwReg8188EU()Michael Straube5-8/+10
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>
2022-04-04staging: r8188eu: rename clear_bacon_valid_bit()Michael Straube3-5/+5
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>
2022-04-04staging: rtl8723bs: Fix No space before tabsAlaa Mohamed1-27/+27
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>
2022-04-04staging: rtl8723bs: remove redundant braces in if statementsSevinj Aghayeva1-8/+4
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>
2022-04-04staging: r8188eu: remove duplicate assignmentWang Qing1-1/+0
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>
2022-04-04staging: rtl8723bs: place constants on the right side of testsSevinj Aghayeva1-16/+16
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>
2022-04-04staging: r8188eu: add a check for rtw_cbuf_alloc()Xiaoke Wang1-0/+2
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>
2022-04-04staging: r8188eu: remove the "dump tx packet" fragmentsMartin Kaiser4-13/+0
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>
2022-04-04staging: r8188eu: remove the "dump rx packet" fragmentsMartin Kaiser5-16/+1
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>
2022-04-04staging: rtl8723bs: place constants on the right side of testsSevinj Aghayeva1-5/+5
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>
2022-04-04staging: r8188eu: Fix misspelling in comment "writting" -> "writing"Haowen Bai1-1/+1
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>
2022-04-04staging: r8188eu: Fix misspelling in comment "Tranceiver" -> "Transceiver"Haowen Bai1-4/+4
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>
2022-04-04staging: r8188eu: Fix sparse endianness warnings.Charlie Sands1-5/+7
This patch fixes sparse warnings about the endianness of different integers in the driver. Fixes: 15865124feed ("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>
2022-04-04staging: r8188eu: remove HW_VAR_BCN_VALID from SetHwReg8188EU()Michael Straube4-8/+11
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>
2022-04-04staging: r8188eu: remove HW_VAR_TX_RPT_MAX_MACID from SetHwReg8188EU()Michael Straube5-9/+10
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>
2022-04-04staging: r8188eu: simplify if-else statementMichael Straube1-10/+4
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>
2022-04-04staging: r8188eu: remove HW_VAR_RXDMA_AGG_PG_TH from SetHwReg8188EU()Michael Straube3-22/+21
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>
2022-04-04staging: r8188eu: remove HW_VAR_ACM_CTRL from SetHwReg8188EU()Michael Straube3-28/+26
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>
2022-04-04staging: r8188eu: rename some macros to upper caseMichael Straube2-13/+9
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>
2022-04-04staging: r8188eu: remove HW_VAR_MLME_DISCONNECT from SetHwReg8188EU()Michael Straube3-15/+16
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>
2022-04-04staging: r8188eu: remove HW_VAR_RESP_SIFS from SetHwReg8188EU()Michael Straube3-14/+6
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>
2022-04-04staging: r8188eu: Directly return _SUCCESS instead of using local ret variableHaowen Bai3-10/+3
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>
2022-04-04staging: rts5208: Convert kmap() to kmap_local_page()Fabio M. De Francesco1-7/+5
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>