aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjorn Andersson <bjorn.andersson@linaro.org>2017-12-08 19:35:08 -0500
committerKalle Valo <kvalo@qca.qualcomm.com>2017-12-14 10:31:44 -0500
commit6d1f37323f5b796dbba4e2d9069778fc5b9bb2a2 (patch)
tree97d7f1477851aa22dfc1c374cf85c0857036d338
parent413fd2f5c0233d3cde391679b967c1f14cd2cb27 (diff)
wcn36xx: Reduce spinlock in indication handler
The purpose of pushing indication on a list and handle these in a separate worker is to allow the handlers to sleep. It does therefor not make much sense to hold the queue spinlock through the entire indication worker function. By removing items from the queue early we don't need to hold the lock throughout the indication worker, allowing the individual handlers to sleep. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r--drivers/net/wireless/ath/wcn36xx/smd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index 33a9f8988d13..2914618a0335 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
@@ -2416,6 +2416,8 @@ static void wcn36xx_ind_smd_work(struct work_struct *work)
2416 hal_ind_msg = list_first_entry(&wcn->hal_ind_queue, 2416 hal_ind_msg = list_first_entry(&wcn->hal_ind_queue,
2417 struct wcn36xx_hal_ind_msg, 2417 struct wcn36xx_hal_ind_msg,
2418 list); 2418 list);
2419 list_del(wcn->hal_ind_queue.next);
2420 spin_unlock_irqrestore(&wcn->hal_ind_lock, flags);
2419 2421
2420 msg_header = (struct wcn36xx_hal_msg_header *)hal_ind_msg->msg; 2422 msg_header = (struct wcn36xx_hal_msg_header *)hal_ind_msg->msg;
2421 2423
@@ -2452,8 +2454,6 @@ static void wcn36xx_ind_smd_work(struct work_struct *work)
2452 wcn36xx_err("SMD_EVENT (%d) not supported\n", 2454 wcn36xx_err("SMD_EVENT (%d) not supported\n",
2453 msg_header->msg_type); 2455 msg_header->msg_type);
2454 } 2456 }
2455 list_del(wcn->hal_ind_queue.next);
2456 spin_unlock_irqrestore(&wcn->hal_ind_lock, flags);
2457 kfree(hal_ind_msg); 2457 kfree(hal_ind_msg);
2458} 2458}
2459int wcn36xx_smd_open(struct wcn36xx *wcn) 2459int wcn36xx_smd_open(struct wcn36xx *wcn)