ath10k: scan fixes
cover ath10k: scan fixes
This is a result of a patch split.
Michal Kazior (2):
ath10k: sync wmi before starting scan timeout
ath10k: refactor scan locking
drivers/net/wireless/ath/ath10k/core.c | 1 - drivers/net/wireless/ath/ath10k/core.h | 1 - drivers/net/wireless/ath/ath10k/mac.c | 56 +++++++++++++++----------------- drivers/net/wireless/ath/ath10k/wmi.c | 10 +++--- 4 files changed, 33 insertions(+), 35 deletions(-)
Signature · 1 line
1.7.9.5
PATCH 1/2 ath10k: sync wmi before starting scan timeout
We may have some WMI commands pending. We
shouldn't start the timeout before we're sure we
have submitted the scan stop command.
Signed-off-by Michal Kazior <[email protected]>
--- drivers/net/wireless/ath/ath10k/mac.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/wireless/ath/ath10k/mac.c +2 -0
@@ -1418,6 +1418,8 @@ static void ath10k_abort_scan(struct ath10k *ar)if (ret)ath10k_warn ("%s: ath10k_wmi_stop_scan failed (%d)\n" , __func__, ret); +ath10k_wmi_flush_tx (ar); + ret =wait_for_completion_timeout (&ar->scan.completed,3 *HZ );if (ret ==0 ) ret = -ETIMEDOUT ;
Signature · 1 line
1.7.9.5
PATCH 2/2 ath10k: refactor scan locking
In reply to Michal KaziorSince we have data_lock it is no longer necessary
to have scan.lock.
Signed-off-by Michal Kazior <[email protected]>
--- drivers/net/wireless/ath/ath10k/core.c | 1 - drivers/net/wireless/ath/ath10k/core.h | 1 - drivers/net/wireless/ath/ath10k/mac.c | 54 +++++++++++++++----------------- drivers/net/wireless/ath/ath10k/wmi.c | 10 +++--- 4 files changed, 31 insertions(+), 35 deletions(-)
drivers/net/wireless/ath/ath10k/core.c +0 -1
@@ -482,7 +482,6 @@ struct ath10k *ath10k_core_create(void *hif_priv, struct device *dev,init_completion (&ar->scan.started);init_completion (&ar->scan.completed); -spin_lock_init (&ar->scan.lock);init_completion (&ar->install_key_done);init_completion (&ar->vdev_setup_done);
drivers/net/wireless/ath/ath10k/core.h +0 -1
@@ -309,7 +309,6 @@ struct ath10k { } hw_params;struct { -spinlock_t lock;struct completion started;struct completion completed;struct timer_list timeout;
drivers/net/wireless/ath/ath10k/mac.c +25 -29
157 lines not on this page · raw message
drivers/net/wireless/ath/ath10k/wmi.c +6 -4
@@ -149,10 +149,12 @@ static int ath10k_wmi_event_scan(struct ath10k *ar, struct sk_buff *skb)case WMI_SCAN_EVENT_STARTED :ath10k_dbg (ATH10K_DBG_WMI ,"SCAN_EVENT_STARTED\n" ); -if (ar->scan.is_roc) +spin_lock_bh (&ar->data_lock); +if (ar->scan.in_progress && ar->scan.is_roc)ieee80211_ready_on_channel (ar->hw);complete (&ar->scan.started); +spin_unlock_bh (&ar->data_lock);break ;case WMI_SCAN_EVENT_COMPLETED :ath10k_dbg (ATH10K_DBG_WMI ,"SCAN_EVENT_COMPLETED\n" );
@@ -175,10 +177,10 @@ static int ath10k_wmi_event_scan(struct ath10k *ar, struct sk_buff *skb)rcu_assign_pointer (ar->scan_channel,NULL ); -spin_lock_bh (&ar->scan.lock); +spin_lock_bh (&ar->data_lock);if (!ar->scan.in_progress) { +spin_unlock_bh (&ar->data_lock);ath10k_warn ("no scan requested, ignoring\n" ); -spin_unlock_bh (&ar->scan.lock);break ; }
@@ -194,7 +196,7 @@ static int ath10k_wmi_event_scan(struct ath10k *ar, struct sk_buff *skb)del_timer (&ar->scan.timeout);complete_all (&ar->scan.completed); ar->scan.in_progress = false; -spin_unlock_bh (&ar->scan.lock); +spin_unlock_bh (&ar->data_lock);break ;case WMI_SCAN_EVENT_BSS_CHANNEL :ath10k_dbg (ATH10K_DBG_WMI ,"SCAN_EVENT_BSS_CHANNEL\n" );
Signature · 1 line
1.7.9.5
cover ath10k: scan fixes
In reply to Michal KaziorQuoted 5 lines · Michal Kazior
This is a result of a patch split.
Michal Kazior (2):
ath10k: sync wmi before starting scan timeout
ath10k: refactor scan locking
Thanks, both patches applied.
Signature · 1 line
Kalle Valo