aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8723bs
AgeCommit message (Collapse)AuthorFilesLines
2024-03-05staging: rtl8723bs: remove redundant variable hoffsetGravatar Colin Ian King 1-12/+2
Variable hoffset in functions hal_EfuseGetCurrentSize_WiFi and hal_EfuseGetCurrentSize_BT is being assigned a value but it not being read for any useful reason at all. The variable is redundant and can be removed. Cleans up clang scan build warnings for lines 957 and 1050: drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:957:5: warning: variable 'hoffset' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20240304161045.769912-1-colin.i.king@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-05Staging: rtl8723bs: Remove dead code from _rtw_free_network()Gravatar Meir Elisha 1-2/+0
Clean dead code from is_same_network() and _rtw_free_network(). Signed-off-by: Meir Elisha <meir6264@gmail.com> Link: https://lore.kernel.org/r/20240229121445.22257-1-meir6264@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-05Staging: rtl8723bs: Remove unnecessary braces in rtw_update_ht_capGravatar Meir Elisha 1-4/+3
Remove braces from single statement blocks to improve coding style. Signed-off-by: Meir Elisha <meir6264@gmail.com> Link: https://lore.kernel.org/r/20240220122802.12561-1-meir6264@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-24staging: rtl8723bs: Use kcalloc() instead of kzalloc()Gravatar Erick Archer 1-2/+1
As noted in the "Deprecated Interfaces, Language Features, Attributes, and Conventions" documentation [1], size calculations (especially multiplication) should not be performed in memory allocator (or similar) function arguments due to the risk of them overflowing. This could lead to values wrapping around and a smaller allocation being made than the caller was expecting. Using those allocations could lead to linear overflows of heap memory and other misbehaviors. So, use the purpose specific kcalloc() function instead of the argument count * size in the kzalloc() function. Also, it is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). Link: https://www.kernel.org/doc/html/next/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments [1] Link: https://github.com/KSPP/linux/issues/162 Signed-off-by: Erick Archer <erick.archer@gmx.com> Reviewed-by: "Gustavo A. R. Silva" <gustavoars@kernel.org> Link: https://lore.kernel.org/r/20240119173900.11035-1-erick.archer@gmx.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-24staging: rtl8712: remove unnecessary braces in while loopGravatar Hoorad Farrokh 1-2/+1
Fixed a linux coding style. Reported by checkpath: WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Hoorad Farrokh <hourrad.f@gmail.com> Link: https://lore.kernel.org/r/4vmxiuz5u2f2vehngdccj5q7bakpujagk72ty5ounfv2nfzxgr@lqkdn5fecc23 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-24Staging: rtl8723bs: rtw_ieee80211: Remove extra spaceGravatar Meir Elisha 1-2/+2
Fix checkpatch warning: please, no space before tabs Signed-off-by: Meir Elisha <meir6264@Gmail.com> Link: https://lore.kernel.org/r/20240115083438.108901-1-meir6264@Gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-11-03Merge tag 'staging-6.7-rc1' of ↵Gravatar Linus Torvalds 1-3/+3
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver updates from Greg KH: "Here is the big set of staging driver updates for 6.7-rc1. A bit bigger than 6.6 this time around, as it coincided with the Outreachy and mentorship application process, so we got a bunch of new developers sending in their first changes, which is nice to see. Also in here is a removal of the qlge ethernet driver, and the rtl8192u wireless driver. Both of these were very old and no one was maintaining them, the wireless driver removal was due to no one using it anymore, and no hardware to be found, and is part of a larger effort to remove unused and old wifi drivers from the system. The qlge ethernet driver did have one user pop up after it was dropped, and we are working with the network mainainers to figure out what tree it will come back in from and who will be responsible for it, and if it really is being used or not. Odds are it will show up in a network subsystem pull request after -rc1 is out, but we aren't sure yet. Other smaller changes in here are: - Lots of vc04_services work by Umang to clean up the mess created by the rpi developers long ago, bringing it almost into good enough shape to get out of staging, hopefully next major release, it's getting close. - rtl8192e variable cleanups and removal of unused code and structures - vme_user coding style cleanups - other small coding style cleanups to lots of the staging drivers - octeon typedef removals, and then last-minute revert when it was found to break the build in some configurations (it's a hard driver to build properly, none of the normal automated testing catches it.) All of these have been in linux-next for a while with no reported issues" * tag 'staging-6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (256 commits) Revert "staging: octeon: remove typedef in enum cvmx_spi_mode_t" Revert "staging: octeon: remove typedef in enum cvmx_helper_interface_mode_t" Revert "staging: octeon: remove typedef in enum cvmx_pow_wait_t" Revert "staging: octeon: remove typedef in struct cvmx_pko_lock_t" Revert "staging: octeon: remove typedef in enum cvmx_pko_status_t" Revert "staging: octeon: remove typedef in structs cvmx_pip_port_status_t and cvmx_pko_port_status_t" staging: vt6655: Type encoding info dropped from variable name "byRxRate" staging: vt6655: Type encoding info dropped from function name "CARDbUpdateTSF" staging: vt6655: Type encoding info dropped from function name "CARDvSetRSPINF" staging: vt6655: Type encoding info dropped from function name "CARDbyGetPktType" staging: vt6655: Type encoding info dropped from variable name "byPacketType" staging: vt6655: Type encoding info dropped from function name "CARDbSetPhyParameter" staging: vt6655: Type encoding info dropped from variable name "pbyRsvTime" staging: vt6655: Type encoding info dropped from variable name "pbyTxRate" staging: vt6655: Type encoding info dropped from function name "s_vCalculateOFDMRParameter" staging: vt6655: Type encoding info dropped from array name "cwRXBCNTSFOff" staging: fbtft: Convert to platform remove callback returning void staging: olpc_dcon: Remove I2C_CLASS_DDC support staging: vc04_services: use snprintf instead of sprintf staging: rtl8192e: Fix line break issue at priv->rx_buf[priv->rx_idx] ...
2023-10-06Merge tag 'wireless-next-2023-10-06' of ↵Gravatar Jakub Kicinski 1-4/+5
git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Kalle Valo says: ==================== wireless-next patches for v6.7 The first pull request for v6.7, with both stack and driver changes. We have a big change how locking is handled in cfg80211 and mac80211 which removes several locks and hopefully simplifies the locking overall. In drivers rtw89 got MCC support and smaller features to other active drivers but nothing out of ordinary. Major changes: cfg80211 - remove wdev mutex, use the wiphy mutex instead - annotate iftype_data pointer with sparse - first kunit tests, for element defrag - remove unused scan_width support mac80211 - major locking rework, remove several locks like sta_mtx, key_mtx etc. and use the wiphy mutex instead - remove unused shifted rate support - support antenna control in frame injection (requires driver support) - convert RX_DROP_UNUSABLE to more detailed reason codes rtw89 - TDMA-based multi-channel concurrency (MCC) support iwlwifi - support set_antenna() operation - support frame injection antenna control ath12k - WCN7850: enable 320 MHz channels in 6 GHz band - WCN7850: hardware rfkill support - WCN7850: enable IEEE80211_HW_SINGLE_SCAN_ON_ALL_BANDS to make scan faster ath11k - add chip id board name while searching board-2.bin * tag 'wireless-next-2023-10-06' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (272 commits) wifi: rtlwifi: remove unreachable code in rtl92d_dm_check_edca_turbo() wifi: rtw89: debug: txpwr table supports Wi-Fi 7 chips wifi: rtw89: debug: show txpwr table according to chip gen wifi: rtw89: phy: set TX power RU limit according to chip gen wifi: rtw89: phy: set TX power limit according to chip gen wifi: rtw89: phy: set TX power offset according to chip gen wifi: rtw89: phy: set TX power by rate according to chip gen wifi: rtw89: mac: get TX power control register according to chip gen wifi: rtlwifi: use unsigned long for rtl_bssid_entry timestamp wifi: rtlwifi: fix EDCA limit set by BT coexistence wifi: rt2x00: fix MT7620 low RSSI issue wifi: rtw89: refine bandwidth 160MHz uplink OFDMA performance wifi: rtw89: refine uplink trigger based control mechanism wifi: rtw89: 8851b: update TX power tables to R34 wifi: rtw89: 8852b: update TX power tables to R35 wifi: rtw89: 8852c: update TX power tables to R67 wifi: rtw89: regd: configure Thailand in regulation type wifi: mac80211: add back SPDX identifier wifi: mac80211: fix ieee80211_drop_unencrypted_mgmt return type/value wifi: rtlwifi: cleanup few rtlxxxx_set_hw_reg() routines ... ==================== Link: https://lore.kernel.org/r/87jzrz6bvw.fsf@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-09-26staging: rtl8723bs: hal: Fix codespell-reported spelling mistakesGravatar Bragatheswaran Manickavel 1-3/+3
They are appear to be spelling mistakes, Initially identified in a codespell report and never been addressed so far. ./rtl8723b_phycfg.c:156: Threre ==> There, three ./rtl8723b_phycfg.c:283: Condig ==> Config ./rtl8723b_phycfg.c:328: Tranceiver ==> Transceiver Signed-off-by: Bragatheswaran Manickavel <bragathemanick0908@gmail.com> Link: https://lore.kernel.org/r/20230917134940.2746-1-bragathemanick0908@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-25wifi: cfg80211: split struct cfg80211_ap_settingsGravatar Johannes Berg 1-1/+1
Using the full struct cfg80211_ap_settings for an update is misleading, since most settings cannot be updated. Split the update case off into a new struct cfg80211_ap_update. Change-Id: I3ba4dd9280938ab41252f145227a7005edf327e4 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-09-13wifi: cfg80211: modify prototype for change_beaconGravatar Aloka Dixit 1-2/+4
Modify the prototype for change_beacon() in struct cfg80211_op to accept cfg80211_ap_settings instead of cfg80211_beacon_data so that it can process data in addition to beacons. Modify the prototypes of ieee80211_change_beacon() and driver specific functions accordingly. Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com> Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://lore.kernel.org/r/20230727174100.11721-4-quic_alokad@quicinc.com [while at it, remove pointless "if (info)" check in tracing that just makes all the lines longer than they need be - it's never NULL] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-08-22staging: rtl8723bs: Use helpers to check broadcast and multicast Ether addressesGravatar Ruan Jinjie 10-44/+29
Use is_multicast_ether_addr() and is_broadcast_ether_addr() instead of custom macro IS_MCAST() and MacAddr_isBcst(), the buffer is properly aligned. Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com> Link: https://lore.kernel.org/r/20230814105623.292541-1-ruanjinjie@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-04staging: rtl8723bs: use is_broadcast_ether_addr() instead of memcmp()Gravatar Yang Yingliang 3-10/+5
Use is_broadcast_ether_addr() instead of memcmp to check if the ethernet address is broadcast address. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230804083841.1321554-2-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-04staging: rtl8723bs: use is_zero_ether_addr() instead of memcmp()Gravatar Yang Yingliang 3-10/+8
Use is_zero_ether_addr() instead of memcmp to check if the ethernet address is all zeros. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230804083841.1321554-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27staging: rtl8723bs: ioctl_linux: Fix comparison to falseGravatar Franziska Naepelt 1-1/+1
Fix the following checkpatch issue: - CHECK: Using comparison to false is error prone Signed-off-by: Franziska Naepelt <franziska.naepelt@googlemail.com> Link: https://lore.kernel.org/r/20230722215927.4443-1-franziska.naepelt@googlemail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27staging: rtl8723bs: ioctl_linux: Add preferred spacesGravatar Franziska Naepelt 1-19/+19
Fix the following checkpatch issues: - CHECK: spaces preferred around that '+' (ctx:VxV) - CHECK: spaces preferred around that '&' (ctx:VxV) - CHECK: spaces preferred around that '|' (ctx:VxV) - CHECK: spaces required around that ':' (ctx:VxV) Signed-off-by: Franziska Naepelt <franziska.naepelt@googlemail.com> Link: https://lore.kernel.org/r/20230722215916.4413-1-franziska.naepelt@googlemail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27staging: rtl8723bs: ioctl_linux: Fix alignment on open parenthesisGravatar Franziska Naepelt 1-4/+4
Fix the following checkpatch issue: - CHECK: Alignment should match open parenthesis Signed-off-by: Franziska Naepelt <franziska.naepelt@googlemail.com> Link: https://lore.kernel.org/r/20230722215905.4383-1-franziska.naepelt@googlemail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27staging: rtl8723bs: ioctl_linux: Remove unnecessary parenthesesGravatar Franziska Naepelt 1-29/+29
Fix the following checkpatch issue: - CHECK: Unnecessary parentheses around ... Signed-off-by: Franziska Naepelt <franziska.naepelt@googlemail.com> Link: https://lore.kernel.org/r/20230722215850.4353-1-franziska.naepelt@googlemail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27staging: rtl8723bs: ioctl_linux: Remove unnecessary blank linesGravatar Franziska Naepelt 1-26/+0
Fix the following checkpatch issues: - CHECK: Blank lines aren't necessary before a close brace '}' - CHECK: Blank lines aren't necessary after an open brace '{' Signed-off-by: Franziska Naepelt <franziska.naepelt@googlemail.com> Link: https://lore.kernel.org/r/20230722215840.4323-1-franziska.naepelt@googlemail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27staging: rtl8723bs: ioctl_linux: Remove multiple blank linesGravatar Franziska Naepelt 1-18/+0
Fix the following checkpatch issue: - CHECK: Please don't use multiple blank lines Signed-off-by: Franziska Naepelt <franziska.naepelt@googlemail.com> Link: https://lore.kernel.org/r/20230722215824.4281-1-franziska.naepelt@googlemail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27staging: rtl8723bs: ioctl_linux: Fix block comment alignmentGravatar Franziska Naepelt 1-3/+3
Fix the following checkpatch issue: - WARNING: Block comments should align the * on each line Signed-off-by: Franziska Naepelt <franziska.naepelt@googlemail.com> Link: https://lore.kernel.org/r/20230722215808.4246-1-franziska.naepelt@googlemail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27staging: rtl8723bs: ioctl_linux: Fix code indentGravatar Franziska Naepelt 1-1/+1
Fix the following checkpatch issue: - WARNING: suspect code indent for conditional statements Signed-off-by: Franziska Naepelt <franziska.naepelt@googlemail.com> Link: https://lore.kernel.org/r/20230722215757.4214-1-franziska.naepelt@googlemail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27staging: rtl8723bs: ioctl_linux: Fix else on next lineGravatar Franziska Naepelt 1-2/+1
Fix the following checkpatch issue: - ERROR: else should follow close brace '}' Signed-off-by: Franziska Naepelt <franziska.naepelt@googlemail.com> Link: https://lore.kernel.org/r/20230722215736.4183-1-franziska.naepelt@googlemail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27staging: rtl8723bs: Fix remaining blank line issueGravatar Franziska Naepelt 1-1/+0
Fix the following checkpatch blank line issue: - CHECK: Please don't use multiple blank lines Signed-off-by: Franziska Naepelt <franziska.naepelt@googlemail.com> Link: https://lore.kernel.org/r/20230701102613.5420-1-franziska.naepelt@googlemail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27staging: rtl8723bs: Fix alignment open parenthesisGravatar Franziska Naepelt 1-42/+49
Fix the following checkpatch issues: - CHECK: Alignment should match open parenthesis Signed-off-by: Franziska Naepelt <franziska.naepelt@googlemail.com> Link: https://lore.kernel.org/r/20230701102555.5393-1-franziska.naepelt@googlemail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27staging: rtl8723bs: Fix space issuesGravatar Franziska Naepelt 1-38/+38
Fix the following checkpatch space issues: - CHECK: spaces preferred around that '*' (ctx:VxV) - CHECK: spaces preferred around that '+' (ctx:VxV) - CHECK: spaces preferred around that '-' (ctx:VxV) - CHECK: spaces preferred around that '|' (ctx:VxV) - CHECK: No space is necessary after a cast - WARNING: please, no spaces at the start of a line Signed-off-by: Franziska Naepelt <franziska.naepelt@googlemail.com> Link: https://lore.kernel.org/r/20230701102538.5359-1-franziska.naepelt@googlemail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-20staging: rtl8723bs: Fix blank line issuesGravatar Franziska Naepelt 1-46/+0
Fix the following checkpatch blank line issues: - CHECK: Please don't use multiple blank lines - CHECK: Blank lines aren't necessary before a close brace '}' - CHECK: Blank lines aren't necessary after an open brace '{' Signed-off-by: Franziska Naepelt <franziska.naepelt@gmail.com> Link: https://lore.kernel.org/r/20230619181246.19112-1-franziska.naepelt@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-20staging: rtl8723bs: Fix block comment issueGravatar Franziska Naepelt 1-5/+5
Fix the following checkpatch block comment issue: - WARNING: Block comments use * on subsequent lines Signed-off-by: Franziska Naepelt <franziska.naepelt@gmail.com> Link: https://lore.kernel.org/r/20230619181230.19070-1-franziska.naepelt@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-20staging: rtl8723bs: Fix indentation issuesGravatar Franziska Naepelt 1-3/+3
Fix the following checkpatch indentation issues: - WARNING: suspect code indent for conditional statements (32, 48) - WARNING: suspect code indent for conditional statements (24, 24) - ERROR: code indent should use tabs where possible Signed-off-by: Franziska Naepelt <franziska.naepelt@gmail.com> Link: https://lore.kernel.org/r/20230619180351.18925-1-franziska.naepelt@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-28staging: rtl8723bs: replace ternary operator with if-else blockGravatar Atin Bainada 1-1/+4
replace the ternary operator used for assignment of pHalData->ant_path with an if-else block for better readability Signed-off-by: Atin Bainada <hi@atinb.me> Link: https://lore.kernel.org/r/20230513214338.79833-1-hi@atinb.me Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-08staging: rtl8723bs: use tabs for indentationGravatar Daniel Watson 1-13/+13
Use tabs for indentation to conform to styleguide. Signed-off-by: Daniel Watson <ozzloy@gmail.com> Link: https://lore.kernel.org/r/ZEyAaC0riuuBJO14@trent-reznor Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-05staging: rtl8723bs: indent with tab, align with spaceGravatar Daniel Watson 1-23/+26
Use tabs to indent code and spaces to align in order to make the code consistent and easier to read. Signed-off-by: Daniel Watson <ozzloy@gmail.com> Link: https://lore.kernel.org/r/ZCdmCBIdabBGqm11@trent-reznor Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-29staging: rtl8723bs: conform if's braces to kernel styleGravatar Daniel Watson 1-6/+3
Move the open brace of if-statements to the same line. This matches the brace placement style described in the kernel's style guide. Signed-off-by: Daniel Watson <ozzloy@gmail.com> Link: https://lore.kernel.org/r/ZCOGhkLvLtBEo92Y@trent-reznor Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-25staging: rtl8723bs: remove hal_btcoex_SetChipType()Gravatar Michael Straube 3-10/+0
Remove the function hal_btcoex_SetChipType() as it does nothing and produces the following gcc warning when compiling with W=1. drivers/staging/rtl8723bs/hal/hal_btcoex.c:1182:30: warning: variable 'pHalData' set but not used [-Wunused-but-set-variable] 1182 | struct hal_com_data *pHalData; | ^~~~~~~~ Signed-off-by: Michael Straube <straube.linux@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20230324084334.12183-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-22staging: rtl8723bs: use inline functions for dvobj_to_devGravatar Menna Mahmoud 1-1/+5
Convert `dvobj_to_dev` macro into a static inline function. it is not great to have macro that use `container_of` macro, because from looking at the definition one cannot tell what type it applies to. One can get the same benefit from an efficiency point of view by making an inline function. Suggested-by: Julia Lawall <julia.lawall@inria.fr> Signed-off-by: Menna Mahmoud <eng.mennamahmoud.mm@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20230319201134.253839-1-eng.mennamahmoud.mm@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-16staging: rtl8723bs: rtw_get_raw_rssi_info() is not usedGravatar Michael Straube 2-33/+0
The function rtw_get_raw_rssi_info() is not used anywhere, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20230310083449.23775-6-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-16staging: rtl8723bs: linked_info_dump() is not usedGravatar Michael Straube 2-22/+0
The function linked_info_dump() is not used anywhere, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20230310083449.23775-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-16staging: rtl8723bs: isAllSpaceOrTab() is not usedGravatar Michael Straube 2-17/+0
The function isAllSpaceOrTab() is not used anywhere, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20230310083449.23775-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-16staging: rtl8723bs: ParseQualifiedString() is not usedGravatar Michael Straube 2-27/+0
The function ParseQualifiedString() is not used anywhere, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20230310083449.23775-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-16staging: rtl8723bs: MapCharToHexDigit() is not usedGravatar Michael Straube 2-18/+0
The function MapCharToHexDigit() is not used anywhere, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20230310083449.23775-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-13Merge 6.3-rc2 into staging-nextGravatar Greg Kroah-Hartman 3-34/+39
We need the removal of the r8188eu staging driver in here as well so that outreachy and LF mentor applicants do not try to submit patches against it as it is now gone from the tree. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-08staging: rtl8723bs: Pass correct parameters to cfg80211_get_bss()Gravatar Hans de Goede 1-3/+3
To last 2 parameters to cfg80211_get_bss() should be of the enum ieee80211_bss_type resp. enum ieee80211_privacy types, which WLAN_CAPABILITY_ESS very much is not. Fix both cfg80211_get_bss() calls in ioctl_cfg80211.c to pass the right parameters. Note that the second call was already somewhat fixed by commenting out WLAN_CAPABILITY_ESS and passing in 0 instead. This was still not entirely correct though since that would limit returned BSS-es to ESS type BSS-es with privacy on. Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20230306153512.162104-2-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-08staging: rtl8723bs: Fix key-store index handlingGravatar Hans de Goede 3-31/+36
There are 2 issues with the key-store index handling 1. The non WEP key stores can store keys with indexes 0 - BIP_MAX_KEYID, this means that they should be an array with BIP_MAX_KEYID + 1 entries. But some of the arrays where just BIP_MAX_KEYID entries big. While one other array was hardcoded to a size of 6 entries, instead of using the BIP_MAX_KEYID define. 2. The rtw_cfg80211_set_encryption() and wpa_set_encryption() functions index check where checking that the passed in key-index would fit inside both the WEP key store (which only has 4 entries) as well as in the non WEP key stores. This breaks any attempts to set non WEP keys with index 4 or 5. Issue 2. specifically breaks wifi connection with some access points which advertise PMF support. Without this fix connecting to these access points fails with the following wpa_supplicant messages: nl80211: kernel reports: key addition failed wlan0: WPA: Failed to configure IGTK to the driver wlan0: RSN: Failed to configure IGTK wlan0: CTRL-EVENT-DISCONNECTED bssid=... reason=1 locally_generated=1 Fix 1. by using the right size for the key-stores. After this 2. can safely be fixed by checking the right max-index value depending on the used algorithm, fixing wifi not working with some PMF capable APs. Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20230306153512.162104-1-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-08drivers: staging: rtl8723bs: Remove pmlmepriv->num_of_scannedGravatar Hans de Goede 2-17/+0
pmlmepriv->num_of_scanned is only ever set and never read, remove it. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20230221145326.7808-4-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-08drivers: staging: rtl8723bs: Remove unused clr_fwstate() functionGravatar Hans de Goede 1-12/+0
The clr_fwstate() function is not used anywhere, remove it. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20230221145326.7808-3-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-08drivers: staging: rtl8723bs: Fix locking in rtw_scan_timeout_handler()Gravatar Hans de Goede 1-2/+2
Commit cc7ad0d77b51 ("drivers: staging: rtl8723bs: Fix deadlock in rtw_surveydone_event_callback()") besides fixing the deadlock also modified rtw_scan_timeout_handler() to use spin_[un]lock_irq() instead of spin_[un]lock_bh(). Disabling the IRQs is not necessary since all code taking this lock runs from either user contexts or from softirqs rtw_scan_timeout_handler() is the only function taking pmlmepriv->lock which uses spin_[un]lock_irq() for this. Switch back to spin_[un]lock_bh() to make it consistent with the rest of the code. Fixes: cc7ad0d77b51 ("drivers: staging: rtl8723bs: Fix deadlock in rtw_surveydone_event_callback()") Cc: Duoming Zhou <duoming@zju.edu.cn> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20230221145326.7808-2-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-08drivers: staging: rtl8723bs: Fix locking in _rtw_join_timeout_handler()Gravatar Hans de Goede 1-2/+2
Commit 041879b12ddb ("drivers: staging: rtl8192bs: Fix deadlock in rtw_joinbss_event_prehandle()") besides fixing the deadlock also modified _rtw_join_timeout_handler() to use spin_[un]lock_irq() instead of spin_[un]lock_bh(). _rtw_join_timeout_handler() calls rtw_do_join() which takes pmlmepriv->scanned_queue.lock using spin_[un]lock_bh(). This spin_unlock_bh() call re-enables softirqs which triggers an oops in kernel/softirq.c: __local_bh_enable_ip() when it calls lockdep_assert_irqs_enabled(): [ 244.506087] WARNING: CPU: 2 PID: 0 at kernel/softirq.c:376 __local_bh_enable_ip+0xa6/0x100 ... [ 244.509022] Call Trace: [ 244.509048] <IRQ> [ 244.509100] _rtw_join_timeout_handler+0x134/0x170 [r8723bs] [ 244.509468] ? __pfx__rtw_join_timeout_handler+0x10/0x10 [r8723bs] [ 244.509772] ? __pfx__rtw_join_timeout_handler+0x10/0x10 [r8723bs] [ 244.510076] call_timer_fn+0x95/0x2a0 [ 244.510200] __run_timers.part.0+0x1da/0x2d0 This oops is causd by the switch to spin_[un]lock_irq() which disables the IRQs for the entire duration of _rtw_join_timeout_handler(). Disabling the IRQs is not necessary since all code taking this lock runs from either user contexts or from softirqs, switch back to spin_[un]lock_bh() to fix this. Fixes: 041879b12ddb ("drivers: staging: rtl8192bs: Fix deadlock in rtw_joinbss_event_prehandle()") Cc: Duoming Zhou <duoming@zju.edu.cn> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20230221145326.7808-1-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17staging: rtl8723bs: hal: Fix codespell-reported spelling mistakesGravatar Anup Sharma 1-7/+7
They are appear to be spelling mistakes, Initially identified in a codespell report and never been addressed so far. drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:656: regsiters ==> registers drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:1696: beacause ==> because drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:2092: Checl ==> Check drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:2513: checksume ==> checksum drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:2726: sequense ==> sequence drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:2780: vlaue ==> value drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:3409: equall ==> equal, equally Signed-off-by: Anup Sharma <anupnewsmail@gmail.com> Link: https://lore.kernel.org/r/Y61y+flJp9/jEicc@local Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-11-08staging: rtl8723bs: replace underutilized struct by array variableGravatar Deepak R Varma 2-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 <error27@gmail.com> Signed-off-by: Deepak R Varma <drv@mailo.com> Link: https://lore.kernel.org/r/Y2ZF6O1KU3zZ6r3C@qemulion Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-11-08staging: rtl8723bs: Use min/max macros for variable comparisonGravatar Deepak R Varma 2-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 <drv@mailo.com> Link: https://lore.kernel.org/r/Y2OK6fcIkH3S2/1f@qemulion Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>