- 08 Mar, 2023 37 commits
-
-
Hans de Goede authored
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.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Hans de Goede authored
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.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Hans de Goede authored
Commit cc7ad0d7 ("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: cc7ad0d7 ("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.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Hans de Goede authored
Commit 041879b1 ("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: 041879b1 ("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.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Rohit Chavan authored
This patch resolves a checkpatch issue by removing blank line, after return statement at end of the function. Signed-off-by: Rohit Chavan <roheetchavan@gmail.com> Link: https://lore.kernel.org/r/20230224123401.1365-1-roheetchavan@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
The array Rtl8192PciERadioD_Array is only used in function rtl92e_config_rf_path which is only called in function rtl92e_config_rf. In function rtl92e_config_rf a termination condition for the loop is set to priv->num_total_rf_path = RTL819X_TOTAL_RF_PATH = 2. The loop is only executed with numbers 0 and 1 for eRFPath. So the function rtl92e_config_rf_path is only called with eRFPath for 0 and 1 and never with 3 that would make the "case RF90_PATH_D:" be called. Remove resulting dead code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Reviewed-by: Dan Carpenter <error27@gmail.com> Link: https://lore.kernel.org/r/608ced17b85ca321fdc0026c686e3c62a9d6d8cd.1678222487.git.philipp.g.hortmann@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
The array Rtl8192PciERadioC_Array is only used in function rtl92e_config_rf_path which is only called in function rtl92e_config_rf. In function rtl92e_config_rf a termination condition for the loop is set to priv->num_total_rf_path = RTL819X_TOTAL_RF_PATH = 2. The loop is only executed with numbers 0 and 1 for eRFPath. So the function rtl92e_config_rf_path is only called with eRFPath for 0 and 1 and never with 2 that would make the "case RF90_PATH_C:" be called. Remove resulting dead code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Reviewed-by: Dan Carpenter <error27@gmail.com> Link: https://lore.kernel.org/r/ed1e0df7ed677c335340f42c1108e7b5c0f18462.1678222487.git.philipp.g.hortmann@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Remove conditions for RF_2T4R because hardware that uses RF_2T4R does not exist. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/af7dcd620fdad63b2f324d626f1c97601895823a.1677955334.git.philipp.g.hortmann@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Remove empty array Rtl8192PciEPHY_REGArray and the code where it is used because it is dead code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/511bd239bf033dca3efcc64a640d5343c98fa897.1677955334.git.philipp.g.hortmann@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Change r8192E_hwimg.c to table.c and r8192E_hwimg.h to table.h to adapt filenames from drivers/net/wireless/realtek/rtlwifi rtl8192ee and rtl8192se. Task is from TODO file. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/20230302191457.GA17628@matrix-ESPRIMO-P710Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Function pointers of rtllib_ips_leave and ScanOperationBackupHandler is set while executing the probe function. Therefore a NULL pointer check is not required. Remove checks as it is dead code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/8b01cbfaad2db4666b98bfeae29dd429d8c6cd07.1677345331.git.philipp.g.hortmann@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Function pointers of stop_send_beacons and rtllib_ips_leave_wq is set while executing the probe function. Therefore a NULL pointer check is not required. Remove checks as it is dead code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/f12e9167499344059f77991d2058c050bbe744d2.1677345331.git.philipp.g.hortmann@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Function pointers of LeisurePSLeave and start_send_beacons is set while executing the probe function. Therefore a NULL pointer check is not required. Remove checks as it is dead code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/cd828bb1c8dfbb6d2a85d770c82afbb9889e0ea2.1677345331.git.philipp.g.hortmann@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Function pointers of handle_assoc_response and handle_beacon is set while executing the probe function. Therefore a NULL pointer check is not required. Remove checks as it is dead code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/5c0fd114c24616bc03271ccb0a72a6bc68e45d61.1677345331.git.philipp.g.hortmann@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Remove empty struct rtl819x_ops as it is dead code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/31b5b0ba88d7b07b0407956d56446e8f0e62e3e7.1677133271.git.philipp.g.hortmann@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Replace macro RTL_PCI_DEVICE with PCI_DEVICE to get rid of rtl819xp_ops which is empty. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/8b45ee783fa91196b7c9d6fc840a189496afd2f4.1677133271.git.philipp.g.hortmann@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Remove unchanged entry .nic_type and replace it with constant NIC_8192E. This increases readability of the code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/f1fd37a2d2b90bef8caac31a98f3eeff404b3095.1677010997.git.philipp.g.hortmann@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Remove entry .link_change and replace it with function name rtl92e_link_change. This increases readability of the code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/9b451317eb4c13db007476c30212ffb09ced2356.1677010997.git.philipp.g.hortmann@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Remove entry .rx_command_packet_handler, .irq_clear and .init_before_adapter_start as it is dead code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/93427f1b2ad5841451d7e8cc8a621d7eff8cd916.1677010997.git.philipp.g.hortmann@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Remove entry .rx_check_stuck_handler and replace it with function name rtl92e_is_rx_stuck. This increases readability of the code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/6538f1e158664837f6d1e7a20583ff20fc4f1403.1677010997.git.philipp.g.hortmann@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Remove entry .tx_check_stuck_handler and replace it with function name rtl92e_is_tx_stuck. This increases readability of the code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/f58cc7b39f4a6bce0606bdd90a706b35b87d8256.1677010997.git.philipp.g.hortmann@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Remove entry .interrupt_recognized and replace it with function name rtl92e_ack_irq. This increases readability of the code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/a972ff8963b426f20651810b5161c8759ffa2d05.1677010997.git.philipp.g.hortmann@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Remove entry .tx_enable and replace it with function name rtl92e_enable_tx. This increases readability of the code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/76955e787fd161dea83d10e81054fafb3b334b5c.1677010997.git.philipp.g.hortmann@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Remove entry .rx_enable and replace it with function name rtl92e_enable_rx. This increases readability of the code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/8fd6c4b18cff8662215e27d299205646ce720a3b.1676840647.git.philipp.g.hortmann@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Remove entry .irq_disable and replace it with function name rtl92e_disable_irq. This increases readability of the code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/6d981b554a73ca965096e434d687b9827b0b96b2.1676840647.git.philipp.g.hortmann@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Remove entry .irq_enable and replace it with function name rtl92e_enable_irq. This increases readability of the code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/c23a034632e06b0d9dcb98bd2311010561b6645e.1676840647.git.philipp.g.hortmann@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Remove entry .update_ratr_table and replace it with function name rtl92e_update_ratr_table. This increases readability of the code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/b9557fd44fde0261acd867124aae4d318587a497.1676840647.git.philipp.g.hortmann@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Remove entry .stop_adapter and replace it with function name rtl92e_stop_adapter. This increases readability of the code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/87f874eae22027956b9f1140b8d460ed8b63a9f9.1676840647.git.philipp.g.hortmann@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Remove entry .rx_query_status_descriptor and replace it with function name rtl92e_get_rx_stats. This increases readability of the code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/889c557f6e312645eb40173b7ffa210cabf10110.1676840647.git.philipp.g.hortmann@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Remove entry .tx_fill_cmd_descriptor and replace it with function name rtl92e_fill_tx_cmd_desc. This increases readability of the code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/713a48fcd6d56c3cc4e32aea0eeba881e0d092c5.1676840647.git.philipp.g.hortmann@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Remove entry .tx_fill_descriptor and replace it with function name rtl92e_fill_tx_desc. This increases readability of the code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/1ae7d44ef74dc6cb61ff43f670b21d702403d7fb.1676840647.git.philipp.g.hortmann@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Remove entry .initialize_adapter and replace it with function name rtl92e_start_adapter. This increases readability of the code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/7457e18ea9f3b2415bf41fca8ac2b22349d2edd1.1676840647.git.philipp.g.hortmann@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Remove entry .init_adapter_variable and replace it with function name rtl92e_init_variables. This increases readability of the code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/cc6134e1cf43a8b74615f9eb4377988e3edd0bca.1676840647.git.philipp.g.hortmann@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Remove entry .get_eeprom_size and replace it with function name rtl92e_get_eeprom_size. This increases readability of the code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/1323e1ae2b4f52dc42b7ce5debca5608c9c5aafd.1676840647.git.philipp.g.hortmann@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Yang Li authored
According to commit 890cc39a ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Link: https://lore.kernel.org/r/20230308063653.92879-1-yang.lee@linux.alibaba.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Shibo Li authored
This patch fixes the following warning in rtl871x_mlme.c WARNING: Avoid multiple line dereference - prefer 'adapter->securitypriv.PrivacyAlgrthm' Signed-off-by: Shibo Li <zzutcyha@163.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> AW-NU120 Reviewed-by: Dan Carpenter <error27@gmail.com> Link: https://lore.kernel.org/r/20230220084050.18459-1-zzutcyha@163.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Shibo Li authored
This patch fixes the problem of irregular indentation Signed-off-by: Shibo Li <zzutcyha@163.com> Link: https://lore.kernel.org/r/20230220090430.19589-1-zzutcyha@163.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 05 Mar, 2023 3 commits
-
-
Linus Torvalds authored
-
Linus Torvalds authored
Commit aa47a7c2 ("lib/cpumask: deprecate nr_cpumask_bits") resulted in the cpumask operations potentially becoming hugely less efficient, because suddenly the cpumask was always considered to be variable-sized. The optimization was then later added back in a limited form by commit 6f9c07be ("lib/cpumask: add FORCE_NR_CPUS config option"), but that FORCE_NR_CPUS option is not useful in a generic kernel and more of a special case for embedded situations with fixed hardware. Instead, just re-introduce the optimization, with some changes. Instead of depending on CPUMASK_OFFSTACK being false, and then always using the full constant cpumask width, this introduces three different cpumask "sizes": - the exact size (nr_cpumask_bits) remains identical to nr_cpu_ids. This is used for situations where we should use the exact size. - the "small" size (small_cpumask_bits) is the NR_CPUS constant if it fits in a single word and the bitmap operations thus end up able to trigger the "small_const_nbits()" optimizations. This is used for the operations that have optimized single-word cases that get inlined, notably the bit find and scanning functions. - the "large" size (large_cpumask_bits) is the NR_CPUS constant if it is an sufficiently small constant that makes simple "copy" and "clear" operations more efficient. This is arbitrarily set at four words or less. As a an example of this situation, without this fixed size optimization, cpumask_clear() will generate code like movl nr_cpu_ids(%rip), %edx addq $63, %rdx shrq $3, %rdx andl $-8, %edx callq memset@PLT on x86-64, because it would calculate the "exact" number of longwords that need to be cleared. In contrast, with this patch, using a MAX_CPU of 64 (which is quite a reasonable value to use), the above becomes a single movq $0,cpumask instruction instead, because instead of caring to figure out exactly how many CPU's the system has, it just knows that the cpumask will be a single word and can just clear it all. Note that this does end up tightening the rules a bit from the original version in another way: operations that set bits in the cpumask are now limited to the actual nr_cpu_ids limit, whereas we used to do the nr_cpumask_bits thing almost everywhere in the cpumask code. But if you just clear bits, or scan for bits, we can use the simpler compile-time constants. In the process, remove 'cpumask_complement()' and 'for_each_cpu_not()' which were not useful, and which fundamentally have to be limited to 'nr_cpu_ids'. Better remove them now than have somebody introduce use of them later. Of course, on x86-64 with MAXSMP there is no sane small compile-time constant for the cpumask sizes, and we end up using the actual CPU bits, and will generate the above kind of horrors regardless. Please don't use MAXSMP unless you really expect to have machines with thousands of cores. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-
git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6Linus Torvalds authored
Pull crypto fix from Herbert Xu: "Fix a regression in the caam driver" * tag 'v6.3-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: caam - Fix edesc/iv ordering mixup
-