mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 10:09:10 +02:00
wifi: mwifiex: remove unnecessary queue empty check
Since Commit 7bff9c974e ("mwifiex: send firmware initialization commands
synchronously") all initialization commands are sent synchronously which
means the command queue is empty when mwifiex_sta_init_cmd() returns. No
need to check for entries in the command code then, so remove the check.
Add a WARN_ON() just in case there is something wrong with the
reasoning.
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Acked-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://patch.msgid.link/20250423-mwifiex-drop-asynchronous-init-v2-1-1bb951073a06@pengutronix.de
[remove now unused is_cmd_pend_q_empty variable and comment]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
20e4d3f89d
commit
659d609bdd
|
|
@ -480,14 +480,12 @@ int mwifiex_init_lock_list(struct mwifiex_adapter *adapter)
|
|||
* - Initialize the private structure
|
||||
* - Add BSS priority tables to the adapter structure
|
||||
* - For each interface, send the init commands to firmware
|
||||
* - Send the first command in command pending queue, if available
|
||||
*/
|
||||
int mwifiex_init_fw(struct mwifiex_adapter *adapter)
|
||||
{
|
||||
int ret;
|
||||
struct mwifiex_private *priv;
|
||||
u8 i, first_sta = true;
|
||||
int is_cmd_pend_q_empty;
|
||||
|
||||
adapter->hw_status = MWIFIEX_HW_STATUS_INITIALIZING;
|
||||
|
||||
|
|
@ -522,15 +520,10 @@ int mwifiex_init_fw(struct mwifiex_adapter *adapter)
|
|||
}
|
||||
|
||||
spin_lock_bh(&adapter->cmd_pending_q_lock);
|
||||
is_cmd_pend_q_empty = list_empty(&adapter->cmd_pending_q);
|
||||
WARN_ON(!list_empty(&adapter->cmd_pending_q));
|
||||
spin_unlock_bh(&adapter->cmd_pending_q_lock);
|
||||
if (!is_cmd_pend_q_empty) {
|
||||
/* Send the first command in queue and return */
|
||||
if (mwifiex_main_process(adapter) != -1)
|
||||
ret = -EINPROGRESS;
|
||||
} else {
|
||||
adapter->hw_status = MWIFIEX_HW_STATUS_READY;
|
||||
}
|
||||
|
||||
adapter->hw_status = MWIFIEX_HW_STATUS_READY;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user