- 14 Apr, 2022 15 commits
-
-
Aliya Rahmani authored
Added tabs for indent to fix the checkpatch error. Signed-off-by: Aliya Rahmani <aliyarahmani786@gmail.com> Link: https://lore.kernel.org/r/20220413204648.60358-1-aliyarahmani786@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Aliya Rahmani authored
Remove redundant parentheses reported by checkpatch. Signed-off-by: Aliya Rahmani <aliyarahmani786@gmail.com> Link: https://lore.kernel.org/r/20220413182303.34807-1-aliyarahmani786@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Aliya Rahmani authored
Remove the unnecessary space immediately after a cast. Identified by checkpatch: CHECK: No space is necessary after a cast. Signed-off-by: Aliya Rahmani <aliyarahmani786@gmail.com> Link: https://lore.kernel.org/r/20220413113531.31224-1-aliyarahmani786@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
pkg_newalloc in struct recv_buf is not used. Remove it. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220413200742.276806-5-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Use structs and functions from ieee80211.h in mgt_dispatcher to parse the incoming frame. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220413200742.276806-4-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
All that the _mgt_dispatcher function does is to call a function from a function pointer. It's not worth having a separate function for this. Merge _mgt_dispatcher into mgt_dispatcher. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220413200742.276806-3-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Replace the driver-specific GetPriority macro with ieee80211_get_tid, which does exactly the same thing. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220413200742.276806-2-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
rtw_get_passing_time_ms and rtw_systime_to_ms are not used any more. Remove them. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220413193654.258507-9-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove the loop in rtw_pwr_wakeup that waits while the system is suspended. pwrpriv->bInSuspend is set in rtw_suspend and cleared in rtw_resume. These functions are the .suspend and .resume functions of the struct usb_driver for r8188eu. A usb_driver's suspend and resume functions are called when the entire system goes into suspend or runtime suspend. All of the code paths for rtw_pwr_wakeup start at ioctl handlers. We can remove the loop that checks bInSuspend. It's not possible to call an ioctl while the entire system is suspended. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220413193654.258507-8-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Clean up the code in rtw_pwr_wakeup that sets pwrpriv->ips_deny_time. Make ips_deny_time an unsigned long, this type is used by the kernel functions that process jiffies. Remove the temporary variable ips_deffer_ms and use RTW_PWR_STATE_CHK_INTERVAL directly. There's no need to set ips_deny_time twice, it's sufficient to set it at the end of rtw_pwr_wakeup. Use time_before to check if ips_deny_time should be updated. We can now remove rtw_ms_to_systime, this function is not used any more. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220413193654.258507-7-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Use the kernel functions to set a timeout and to check if it's expired. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220413193654.258507-6-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Summarize two if statements in rtw_pwr_wakeup and place the constants on the right side of the comparison. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220413193654.258507-5-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
It's sufficient to check pwrpriv->ps_processing as part of the while-loop. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220413193654.258507-4-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
rtw_pwr_wakeup should return _SUCCESS or _FAIL. Replace false with _FAIL in one place and reformat the if-statement. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220413193654.258507-3-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Simplify the conditions for a loop in rtw_pwr_wakeup that waits while the system is suspended. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220413193654.258507-2-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 13 Apr, 2022 14 commits
-
-
Michael Straube authored
Store the address and the data pointer for calls to rtw_writeN() and rtw_write8() in local variables. This avoids long lines and improves readability. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220412185754.8695-7-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The variables i and offset in block_write() are set in the code before they are used. Remove the unneeded initializations. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220412185754.8695-6-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
For cleaner code and improved readability we can reduce the number of local variables in block_write(). Use a single variable for block size, number of blocks and remaining size. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220412185754.8695-5-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The second parameter of write_fw(), page_write() and block_write() is a void pointer, but we always pass an u8 pointer. We can convert this parameter to an u8 pointer. The pointer is not changed in the functions, so we can safely remove the local variable bufferPtr. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220412185754.8695-4-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Rename the parameter buffSize of block_write() to avoid camel case. buffSize -> size Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220412185754.8695-3-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Correct a macro spelling mistake in rtw_fw.c. MAX_REG_BOLCK_SIZE -> MAX_REG_BLOCK_SIZE Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220412185754.8695-2-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Duoming Zhou authored
There is a deadlock in rtw_joinbss_event_prehandle(), which is shown below: (Thread 1) | (Thread 2) | _set_timer() rtw_joinbss_event_prehandle()| mod_timer() spin_lock_bh() //(1) | (wait a time) ... | rtw_join_timeout_handler() | _rtw_join_timeout_handler() del_timer_sync() | spin_lock_bh() //(2) (wait timer to stop) | ... We hold pmlmepriv->lock in position (1) of thread 1 and use del_timer_sync() to wait timer to stop, but timer handler also need pmlmepriv->lock in position (2) of thread 2. As a result, rtw_joinbss_event_prehandle() will block forever. This patch extracts del_timer_sync() from the protection of spin_lock_bh(), which could let timer handler to obtain the needed lock. What`s more, we change spin_lock_bh() to spin_lock_irq() in _rtw_join_timeout_handler() in order to prevent deadlock. Signed-off-by: Duoming Zhou <duoming@zju.edu.cn> Link: https://lore.kernel.org/r/20220409072135.74248-1-duoming@zju.edu.cnSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Duoming Zhou authored
There is a deadlock in rtw_joinbss_event_prehandle(), which is shown below: (Thread 1) | (Thread 2) | _set_timer() rtw_joinbss_event_prehandle()| mod_timer() spin_lock_bh() //(1) | (wait a time) ... | _rtw_join_timeout_handler() del_timer_sync() | spin_lock_bh() //(2) (wait timer to stop) | ... We hold pmlmepriv->lock in position (1) of thread 1 and use del_timer_sync() to wait timer to stop, but timer handler also need pmlmepriv->lock in position (2) of thread 2. As a result, rtw_joinbss_event_prehandle() will block forever. This patch extracts del_timer_sync() from the protection of spin_lock_bh(), which could let timer handler to obtain the needed lock. What`s more, we change spin_lock_bh() to spin_lock_irq() in _rtw_join_timeout_handler() in order to prevent deadlock. Signed-off-by: Duoming Zhou <duoming@zju.edu.cn> Link: https://lore.kernel.org/r/20220409064953.67420-1-duoming@zju.edu.cnSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Duoming Zhou authored
There is a deadlock in rtw_surveydone_event_callback(), which is shown below: (Thread 1) | (Thread 2) | _set_timer() rtw_surveydone_event_callback()| mod_timer() spin_lock_bh() //(1) | (wait a time) ... | rtw_scan_timeout_handler() del_timer_sync() | spin_lock_bh() //(2) (wait timer to stop) | ... We hold pmlmepriv->lock in position (1) of thread 1 and use del_timer_sync() to wait timer to stop, but timer handler also need pmlmepriv->lock in position (2) of thread 2. As a result, rtw_surveydone_event_callback() will block forever. This patch extracts del_timer_sync() from the protection of spin_lock_bh(), which could let timer handler to obtain the needed lock. What`s more, we change spin_lock_bh() in rtw_scan_timeout_handler() to spin_lock_irq(). Otherwise, spin_lock_bh() will also cause deadlock() in timer handler. Signed-off-by: Duoming Zhou <duoming@zju.edu.cn> Link: https://lore.kernel.org/r/20220409061836.60529-1-duoming@zju.edu.cnSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mahak Gupta authored
Adhere to linux coding style. Reported by checkpatch: spaces preferred around that '{operator}'. Signed-off-by: Mahak Gupta <mahak_g@cs.iitr.ac.in> Link: https://lore.kernel.org/r/20220413054517.6343-1-mahak_g@cs.iitr.ac.inSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jaehee Park authored
Remove the optional remove callback for the soc_codec_dev_gbaudio structure. The only place it is referenced is snd_soc_component_remove() which is only called if the sound_component pointer is non-null. The null function pointers here can be optionally ommitted. When a sound component is registered this way, the remove callback is optional. We can safely remove the whole gbcodec_remove function, which used to be an empty function with a void return type. Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jaehee Park <jhpark1013@gmail.com> Link: https://lore.kernel.org/r/12037ae2502ad7d0311bcdf2178c3d2156293236.1649824370.git.jhpark1013@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jaehee Park authored
Correct a spelling typo from 'Atleast' to 'At least' in comment. Issue found by checkpatch. Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Jaehee Park <jhpark1013@gmail.com> Link: https://lore.kernel.org/r/2feb03de97ca4dbd27c22cf40f8e185f7dfaae29.1649824370.git.jhpark1013@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mahak Gupta authored
Else is not necessary after return and break statements, hence remove it. Reported by checkpatch: WARNING: else is not generally useful after a break or return Signed-off-by: Mahak Gupta <mahak_g@cs.iitr.ac.in> Link: https://lore.kernel.org/r/20220413052759.4859-1-mahak_g@cs.iitr.ac.inSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Adrien Thierry authored
Remove compat ALSA card, which has overlapping functionality with the two other cards described by the driver (HDMI and headphones) This handles TODO item "Revisit multi-cards options and PCM route mixer control". Move the S/PDIF device that was part of the compat ALSA card to the HDMI card. Only enable headphones card by default, because HDMI breaks when using both vc4 and bcm2835-audio with HDMI card enabled. Signed-off-by: Adrien Thierry <athierry@redhat.com> Link: https://lore.kernel.org/r/20220408150359.26661-1-athierry@redhat.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 12 Apr, 2022 11 commits
-
-
Davidlohr Bueso authored
Tasklets have long been deprecated as being too heavy on the system by running in irq context - and this is not a performance critical path. If a higher priority process wants to run, it must wait for the tasklet to finish before doing so. rtllib_sta_ps() and ieee80211_sta_ps() will now run in process context and have further concurrency (tasklets being serialized among themselves), but this is done holding the ieee->lock, so it should be fine. Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Link: https://lore.kernel.org/r/20220411151620.129178-7-dave@stgolabs.netSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Davidlohr Bueso authored
This is unused. Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Link: https://lore.kernel.org/r/20220411151620.129178-6-dave@stgolabs.netSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Davidlohr Bueso authored
Tasklets have long been deprecated as being too heavy on the system by running in irq context - and this is not a performance critical path. If a higher priority process wants to run, it must wait for the tasklet to finish before doing so. The execution of the SME event will now occur in task context. There are, however, changes in concurrency. Workqueues, unlike tasklets, are not serialized among themselves and can run concurrently updating sme_i.qhead. However, the current code is already exposed in same ways, regardless of the deferral mechanism, in that hostif_sme_enqueue() does unserialized enqueues updating sme_i.qtail. Also get rid of the bogus (power save) tasklet enabling, as it is never disabled to begin with. Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Link: https://lore.kernel.org/r/20220411151620.129178-5-dave@stgolabs.netSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Davidlohr Bueso authored
Tasklets have long been deprecated as being too heavy on the system by running in irq context - and this is not a performance critical path. If a higher priority process wants to run, it must wait for the tasklet to finish before doing so. The completion_bh tasklet will now run in process context and have further concurrency (tasklets being serialized among themselves), but this is done holding the ctlxq.lock, so it should be fine. Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Link: https://lore.kernel.org/r/20220411151620.129178-4-dave@stgolabs.netSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Davidlohr Bueso authored
Tasklets have long been deprecated as being too heavy on the system by running in irq context - and this is not a performance critical path. If a higher priority process wants to run, it must wait for the tasklet to finish before doing so. The reaper_bh tasklet will now run in process context and have further concurrency (tasklets being serialized among themselves), but this is done holding the ctlxq.lock, so it should be fine. Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Link: https://lore.kernel.org/r/20220411151620.129178-3-dave@stgolabs.netSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Davidlohr Bueso authored
Tasklets have long been deprecated as being too heavy on the system by running in irq context - and this is not a performance critical path. If a higher priority process wants to run, it must wait for the tasklet to finish before doing so. A more suitable equivalent is to converted to threaded irq instead and service channels in regular task context. Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Link: https://lore.kernel.org/r/20220411151620.129178-2-dave@stgolabs.netSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Remove do-while(0) and CamelCase macro PCAvDelayByIO as it is not accepted by checkpatch.pl As the macro is just used once with a constant <= 50 the functionality of the macro is implemented by using udelay() directly. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/e8267e7566d389f318a72d911083e52b02e37210.1649706687.git.philipp.g.hortmann@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Aliya Rahmani authored
This patch fixes checkpatch warnings of precedence issues. Added parentheses around macro arguments 'offset' and 'word_en'. Signed-off-by: Aliya Rahmani <aliyarahmani786@gmail.com> Link: https://lore.kernel.org/r/20220412071456.40980-1-aliyarahmani786@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Use the standard kernel functions to define and check the timeout in efuse_read_phymap_from_txpktbuf. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220409163212.241122-10-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Use the standard kernel functions to define and check the timeout in iol_execute. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220409163212.241122-9-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Use the standard kernel functions to define and check the timeout in LPS_RF_ON_check. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220409163212.241122-8-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-