aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
AgeCommit message (Collapse)AuthorFilesLines
2022-01-26staging: mt7621-dts: use trgmii on gmac0 and enable flow control on port@6Arınç ÜNAL1-1/+2
Change phy-mode of gmac0 to trgmii to match the other side, port@6. Flow control needs to be enabled on both sides to work. It is already enabled on gmac0, enable it on port@6 too. Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com> Link: https://lore.kernel.org/r/20220125153903.1469-4-arinc.unal@arinc9.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-26staging: mt7621-dts: fix switch0@0 warningsArınç ÜNAL1-3/+0
Remove reg property from ports node to fix this warning: Warning (unit_address_vs_reg): /ethernet@1e100000/mdio-bus/switch0@0/ports: node has a reg or ranges property, but no unit name Another warning surfaces afterwards. Remove #address-cells and #size-cells from switch0@0 node to fix this warning: Warning (avoid_unnecessary_addr_size): /ethernet@1e100000/mdio-bus/switch0@0: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com> Link: https://lore.kernel.org/r/20220125153903.1469-3-arinc.unal@arinc9.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-26staging: mt7621-dts: fix formattingArınç ÜNAL1-3/+12
Fix formatting on mt7621.dtsi. Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com> Link: https://lore.kernel.org/r/20220125153903.1469-2-arinc.unal@arinc9.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-26staging: pi433: add missing register contantsPaulo Miguel Almeida1-0/+2
add missing register constants present in RFM69 and/or RFM69HW so that we don't need to hardcode values when referencing them. this patch adds REG_TESTLNA, REG_TESTAFC constants Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com> Link: https://lore.kernel.org/r/20220124042636.GA7962@mail.google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-26staging: pi433: enforce tx_cfg to be set before any message can be sentPaulo Miguel Almeida1-2/+14
this driver relies on exposing a char device to userspace to tx messages. Every message can be sent using different trasmitter settings such so the tx_cfg must be written before sending any messages. Failing to do so will cause the message to fail silently depending on printk/dynamic_debug settings which makes it hard to troubleshoot. This patch add a control variable that will get initialized once tx_cfg is set for the fd used when interacting with the char device. Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com> Link: https://lore.kernel.org/r/20220114221643.GA7843@mail.google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: fbtft: Fix error path in fbtft_driver_module_init()Uwe Kleine-König1-1/+4
If registering the platform driver fails, the function must not return without undoing the spi driver registration first. Fixes: c296d5f9957c ("staging: fbtft: core support") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20220118181338.207943-1-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: vc04_services: Fix RCU dereference checkPadmanabha Srinivasaiah1-2/+18
In service_callback path RCU dereferenced pointer struct vchiq_service need to be accessed inside rcu read-critical section. Also userdata/user_service part of vchiq_service is accessed around different synchronization mechanism, getting an extra reference to a pointer keeps sematics simpler and avoids prolonged graceperiod. Accessing vchiq_service with rcu_read_[lock/unlock] fixes below issue. [ 32.201659] ============================= [ 32.201664] WARNING: suspicious RCU usage [ 32.201670] 5.15.11-rt24-v8+ #3 Not tainted [ 32.201680] ----------------------------- [ 32.201685] drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h:529 suspicious rcu_dereference_check() usage! [ 32.201695] [ 32.201695] other info that might help us debug this: [ 32.201695] [ 32.201700] [ 32.201700] rcu_scheduler_active = 2, debug_locks = 1 [ 32.201708] no locks held by vchiq-slot/0/98. [ 32.201715] [ 32.201715] stack backtrace: [ 32.201723] CPU: 1 PID: 98 Comm: vchiq-slot/0 Not tainted 5.15.11-rt24-v8+ #3 [ 32.201733] Hardware name: Raspberry Pi 4 Model B Rev 1.4 (DT) [ 32.201739] Call trace: [ 32.201742] dump_backtrace+0x0/0x1b8 [ 32.201772] show_stack+0x20/0x30 [ 32.201784] dump_stack_lvl+0x8c/0xb8 [ 32.201799] dump_stack+0x18/0x34 [ 32.201808] lockdep_rcu_suspicious+0xe4/0xf8 [ 32.201817] service_callback+0x124/0x400 [ 32.201830] slot_handler_func+0xf60/0x1e20 [ 32.201839] kthread+0x19c/0x1a8 [ 32.201849] ret_from_fork+0x10/0x20 Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Padmanabha Srinivasaiah <treasure4paddy@gmail.com> Link: https://lore.kernel.org/r/20211231195406.5479-1-treasure4paddy@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: fbtft: Deduplicate driver registration macrosUwe Kleine-König1-57/+36
The two macros FBTFT_REGISTER_DRIVER and FBTFT_REGISTER_SPI_DRIVER contain quite some duplication: Both define an spi driver and an of device table and the differences are quite subtle. So create two new macros and use both twice. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20220118181338.207943-2-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: pi433: validate max bit_rate based on modulation usedPaulo Miguel Almeida2-1/+11
Max bit rate is dependent on which modulation is used. Previous validation routine only took into consideration min bit rate which can lead a misconfiguration of the rf69 chip causing the packets not to be sent/read. This patch enhances that input check in set_bit_rate to account for modulation values and their respective max bit rate Acked-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com> Link: https://lore.kernel.org/r/20220118230555.GA4961@mail.google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: pi433: change order in which driver config the rf69 chipPaulo Miguel Almeida1-4/+4
There is an explicit dependency between modulation and bit rate configurations. To ensure proper validation of input value for the set_bit_rate routine, we must ensure that modulation has been set before. This patch ensures that set_modulation is always called before set_bit_rate for both RX and TX routines Acked-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com> Link: https://lore.kernel.org/r/20220118230502.GA4897@mail.google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: pi433: fix validation for min bit rate supported by the devicePaulo Miguel Almeida1-3/+1
rf69 datasheets establishes that the minimum supported bit rate is 1.2 kbps regardless of modulation. this patch replaces the errouneous validation with the correct value Acked-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com> Link: https://lore.kernel.org/r/20220118230413.GA4859@mail.google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: vchiq_dev: Avoid unnecessary alloc in vchiq_ioc_create_serviceStefan Wahren1-4/+3
There is no need to allocate the user service in case there is a VCHIQ connection required, but not available. So simply check the error conditions before doing an expensive memory allocation. Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1642968143-19281-19-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: vchiq_core: handle NULL result of find_service_by_handleStefan Wahren1-0/+6
In case of an invalid handle the function find_servive_by_handle returns NULL. So take care of this and avoid a NULL pointer dereference. Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1642968143-19281-18-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: vchiq_arm: Avoid NULL ptr deref in vchiq_dump_platform_instancesStefan Wahren1-0/+3
vchiq_get_state() can return a NULL pointer. So handle this cases and avoid a NULL pointer derefence in vchiq_dump_platform_instances. Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1642968143-19281-17-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: vchiq_arm: make vchiq_get_state return earlyStefan Wahren1-4/+8
Make vchiq_get_state return early with NULL and improve the readability. Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1642968143-19281-16-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: vchiq_core: use min_t macroStefan Wahren1-6/+3
Don't try to open code min_t(). Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1642968143-19281-15-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: vchiq_core: avoid ternary operator for set_service_stateStefan Wahren1-4/+6
There is already a check for service->sync, so use this instead of a separate ternary operator to update the service state. Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1642968143-19281-14-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: vchiq_core: fix alignmentStefan Wahren1-3/+2
This fixes some alignment found by checkpatch.pl. Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1642968143-19281-13-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: vchiq_core: reduce multi-line statementsStefan Wahren1-7/+4
In order to improvement readability try to reduce the multi-line statements. Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1642968143-19281-12-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: vchiq_core: drop prefix of vchiq_set_service_stateStefan Wahren1-16/+15
The name of this static function is unnecessary longish. So drop the prefix. This gives us the chance to avoid some multi-line statements or fix some indentations later. Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1642968143-19281-11-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: vchiq_core: align return statements in msg_type_strStefan Wahren1-15/+15
The return statements aren't properly aligned. So fix this by using tabs. Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1642968143-19281-10-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: vchiq_core: simplify vchiq_add_service_internalStefan Wahren1-22/+1
Better use kzalloc to properly init vchiq_service with zero. As a result this saves us all the zero assignments. Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1642968143-19281-9-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: vchiq_core: fix type of parameter localportStefan Wahren2-4/+4
The whole vchiq driver uses unsigned int for "localport" except of find_service_by_port(). So fix this and get the rid of this suspicous cast. Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1642968143-19281-8-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: vchiq: add message handling to TODO listStefan Wahren1-0/+9
Recently Arnd Bergmann noticed that the message handling looks broken to him. So add this point on the TODO list. Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1642968143-19281-7-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: vchiq: drop completed tasks from TODOStefan Wahren1-29/+0
This removes all already completed tasks from the TODO file. Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1642968143-19281-6-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: vchiq: convert TODOs into unordered listStefan Wahren1-12/+12
Keeping the order of the TODO items is hard and also unnecessary. So convert it to an unordered list. Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1642968143-19281-5-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: vchiq_arm: introduce is_adjacent_blockStefan Wahren1-4/+15
The check for an adjacent block is hard to read. So move it into a separate inline function. Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1642968143-19281-4-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: vchiq_debugfs: get the rid of n_log_entriesStefan Wahren1-3/+1
There is no need for this static variable, so use the macro directly. Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1642968143-19281-3-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: vchiq_core: fix indentation in vchiq_log_dump_memStefan Wahren1-4/+4
This align the indentation in the var declaration of vchiq_log_dump_mem to the other code. Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1642968143-19281-2-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: handle rtw_init_netdev_name() failure appropriatelyVihas Mak1-2/+11
rtw_init_netdev_name() calls dev_alloc_name() which allocates the name for the device as per the given name format. The name format is specified by the module parameter "ifname". It returns a negative err code if the format is invalid. Handle this error appropriately. Cancel the timers ininitliazed by rtw_init_drv_sw() before calling rtw_free_drv_sw() and then proceed to free the adapter. Also, if register_netdev() fails then goto free_drv_sw instead of goto handle_dualmac. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Vihas Mak <makvihas@gmail.com> Link: https://lore.kernel.org/r/20220123181734.10402-1-makvihas@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: pi433: move get version func to where all other functions arePaulo Miguel Almeida3-2/+8
As a convention for the pi433 driver, all routines that deals with the rf69 chip are defined in the rf69.c file. There was an exception to the rule in which the uC version verification was being done directly elsewhere. While at it, the Version Register hardcoded value was replaced with a pre-existing constant in the driver. This patch adds rf69_get_version function to rf69.c Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com> Link: https://lore.kernel.org/r/20220108212728.GA7784@mail.google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: merge Init_ODM_ComInfo_88E and rtl8188e_init_dm_privMartin Kaiser1-16/+6
rtl8188e_init_dm_priv is the only caller of Init_ODM_ComInfo_88E. Merge the two functions. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220122170547.68378-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: ODM_RF_CALIBRATION is always setMartin Kaiser3-14/+1
The ODM_RF_CALIBRATION flag is set in Init_ODM_ComInfo_88E directly after the driver is probed and it's never cleared. Remove the flag and the code where it's set or checked. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220122170547.68378-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: ODM_RF_TX_PWR_TRACK is always setMartin Kaiser3-9/+2
The ODM_RF_TX_PWR_TRACK flag is set in Init_ODM_ComInfo_88E directly after the driver is probed and it's never cleared. Remove the flag and the one place where it's checked. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220122170547.68378-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: EntryMaxUndecoratedSmoothedPWDB is set but not usedMartin Kaiser2-7/+1
The variable EntryMaxUndecoratedSmoothedPWDB in struct dm_priv is set but not used. Remove it. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220122170547.68378-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: remove unnecessary braces in rtw_xmit.cMarcelo Aloisio da Silva1-13/+8
Remove unnecessary braces reported by checkpatch.pl in rtw_xmit.c. Signed-off-by: Marcelo Aloisio da Silva <marcelo.as@aol.com> Link: https://lore.kernel.org/r/20220119034933.GA29744@snoopy Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: remove rtw_netif_stop_queue wrapperMartin Kaiser3-8/+3
Remove the rtw_netif_stop_queue wrapper function. Call netif_tx_stop_all_queues directly. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220115165536.231210-11-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: remove rtw_netif_start_queue wrapperMartin Kaiser2-6/+1
Remove the rtw_netif_start_queue wrapper function. Call netif_tx_start_all_queues directly. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220115165536.231210-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: remove rtw_netif_wake_queue wrapperMartin Kaiser2-6/+1
Remove the rtw_netif_wake_queue wrapper function. Call netif_tx_wake_all_queues directly. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220115165536.231210-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: call msecs_to_jiffies in _set_timerMartin Kaiser1-1/+1
The _set_timer wrapper function takes a timeout in milliseconds. Call msecs_to_jiffies to convert the timeout to jiffies. Don't do the calculation ourselves. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220115165536.231210-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: remove _cancel_timer wrapperMartin Kaiser4-21/+6
Remove the _cancel_timer wrapper function and call del_timer_sync directly. None of the callers needs the bcancelled variable that's populated by _cancel_timer, these variables can be removed in the calling functions. rtw_surveydone_event_callback calls _cancel_timer only if it believes that the timer is currently running. We can drop this. It's safe to call del_timer_sync when the timer is not running. The timer in question, scan_to_timer, is used only for the site survey command (the rtw_survey functions) so we won't be stopping it while it's in use by someone else. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220115165536.231210-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: remove rtw_list_delete wrapperMartin Kaiser2-6/+1
Remove the rtw_list_delete wrapper function. Call list_del_init directly. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220115165536.231210-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: remove unused PATH_LENGTH_MAX defineMartin Kaiser1-3/+0
PATH_LENGTH_MAX in osdep_service.h is not used and can be removed. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220115165536.231210-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: remove unused bitshift functionMartin Kaiser1-9/+0
The bitshift function from osdep_service.h is not used. Remove it. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220115165536.231210-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: remove unused macrosMartin Kaiser1-4/+0
Remove some unused macros from osdep_service.h. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220115165536.231210-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: remove unused externl variablesMartin Kaiser1-6/+0
Remove a group of external variables which are not used in osdep_service.h or in the files where osdep_service.h is included. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220115165536.231210-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: convert DBG_88E calls in core/rtw_sta_mgt.cPhillip Potter1-2/+2
Convert the DBG_88E macro calls in core/rtw_sta_mgt.c to use pr_debug, as their information may be useful to observers, and this gets the driver closer to the point of being able to remove DBG_88E itself. These calls are at points in the call chain where use of dev_dbg or netdev_dbg isn't possible due to lack of device pointer, so plain pr_debug is appropriate here. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220110090020.6800-8-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: convert DBG_88E calls in core/rtw_mlme_ext.cPhillip Potter1-186/+245
Convert the DBG_88E macro calls in core/rtw_mlme_ext.c to use pr_debug or netdev_dbg appropriately, as their information may be useful to observers, and this gets the driver closer to the point of being able to remove DBG_88E itself. Also remove some commented out or unnecessary DBG_88E calls altogether. Some calls are at points in the call chain where use of dev_dbg or netdev_dbg isn't possible due to lack of device pointer, so plain pr_debug is appropriate here. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220110090020.6800-7-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: convert DBG_88E calls in core/rtw_ioctl_set.cPhillip Potter1-5/+5
Convert the DBG_88E macro calls in core/rtw_ioctl_set.c to use netdev_dbg, as their information may be useful to observers, and this gets the driver closer to the point of being able to remove DBG_88E itself. Also remove one unnecessary DBG_88E call which was already commented out. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220110090020.6800-6-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: r8188eu: convert DBG_88E calls in core/rtw_mlme.cPhillip Potter1-41/+54
Convert the DBG_88E macro calls in core/rtw_mlme.c to use netdev_dbg, as their information may be useful to observers, and this gets the driver closer to the point of being able to remove DBG_88E itself. Also remove some unnecessary DBG_88E calls altogether as all they do is print the function name. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220110090020.6800-5-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>