Commit 8647f7f0 authored by Sascha Hauer's avatar Sascha Hauer Committed by Kalle Valo

wifi: rtw88: Drop coex mutex

coex->mutex is used in rtw_coex_info_request() only. Most callers of this
function hold rtwdev->mutex already, except for one callsite in the
debugfs code. The debugfs code alone doesn't justify the extra lock, so
acquire rtwdev->mutex there as well and drop the now unnecessary
spinlock.
Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20221202081224.2779981-6-s.hauer@pengutronix.de
parent 1e2701f4
...@@ -633,7 +633,7 @@ static struct sk_buff *rtw_coex_info_request(struct rtw_dev *rtwdev, ...@@ -633,7 +633,7 @@ static struct sk_buff *rtw_coex_info_request(struct rtw_dev *rtwdev,
struct rtw_coex *coex = &rtwdev->coex; struct rtw_coex *coex = &rtwdev->coex;
struct sk_buff *skb_resp = NULL; struct sk_buff *skb_resp = NULL;
mutex_lock(&coex->mutex); lockdep_assert_held(&rtwdev->mutex);
rtw_fw_query_bt_mp_info(rtwdev, req); rtw_fw_query_bt_mp_info(rtwdev, req);
...@@ -650,7 +650,6 @@ static struct sk_buff *rtw_coex_info_request(struct rtw_dev *rtwdev, ...@@ -650,7 +650,6 @@ static struct sk_buff *rtw_coex_info_request(struct rtw_dev *rtwdev,
} }
out: out:
mutex_unlock(&coex->mutex);
return skb_resp; return skb_resp;
} }
......
...@@ -841,7 +841,9 @@ static int rtw_debugfs_get_coex_info(struct seq_file *m, void *v) ...@@ -841,7 +841,9 @@ static int rtw_debugfs_get_coex_info(struct seq_file *m, void *v)
struct rtw_debugfs_priv *debugfs_priv = m->private; struct rtw_debugfs_priv *debugfs_priv = m->private;
struct rtw_dev *rtwdev = debugfs_priv->rtwdev; struct rtw_dev *rtwdev = debugfs_priv->rtwdev;
mutex_lock(&rtwdev->mutex);
rtw_coex_display_coex_info(rtwdev, m); rtw_coex_display_coex_info(rtwdev, m);
mutex_unlock(&rtwdev->mutex);
return 0; return 0;
} }
......
...@@ -2071,7 +2071,6 @@ int rtw_core_init(struct rtw_dev *rtwdev) ...@@ -2071,7 +2071,6 @@ int rtw_core_init(struct rtw_dev *rtwdev)
spin_lock_init(&rtwdev->tx_report.q_lock); spin_lock_init(&rtwdev->tx_report.q_lock);
mutex_init(&rtwdev->mutex); mutex_init(&rtwdev->mutex);
mutex_init(&rtwdev->coex.mutex);
mutex_init(&rtwdev->hal.tx_power_mutex); mutex_init(&rtwdev->hal.tx_power_mutex);
init_waitqueue_head(&rtwdev->coex.wait); init_waitqueue_head(&rtwdev->coex.wait);
...@@ -2143,7 +2142,6 @@ void rtw_core_deinit(struct rtw_dev *rtwdev) ...@@ -2143,7 +2142,6 @@ void rtw_core_deinit(struct rtw_dev *rtwdev)
} }
mutex_destroy(&rtwdev->mutex); mutex_destroy(&rtwdev->mutex);
mutex_destroy(&rtwdev->coex.mutex);
mutex_destroy(&rtwdev->hal.tx_power_mutex); mutex_destroy(&rtwdev->hal.tx_power_mutex);
} }
EXPORT_SYMBOL(rtw_core_deinit); EXPORT_SYMBOL(rtw_core_deinit);
......
...@@ -1501,8 +1501,6 @@ struct rtw_coex_stat { ...@@ -1501,8 +1501,6 @@ struct rtw_coex_stat {
}; };
struct rtw_coex { struct rtw_coex {
/* protects coex info request section */
struct mutex mutex;
struct sk_buff_head queue; struct sk_buff_head queue;
wait_queue_head_t wait; wait_queue_head_t wait;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment