linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] mwifiex: do not emit messages while holding spinlock
  2015-01-07 12:40 [PATCH] mwifiex: do not emit messages while holding spinlock Avinash Patil
@ 2015-01-07  7:40 ` Johannes Berg
  2015-01-07  8:09   ` Avinash Patil
  2015-01-23 17:06 ` Kalle Valo
  1 sibling, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2015-01-07  7:40 UTC (permalink / raw)
  To: Avinash Patil; +Cc: linux-wireless, akarwar, cluo

On Wed, 2015-01-07 at 18:10 +0530, Avinash Patil wrote:
> Avoid printing dev_{warn/dbg} messages while holding spinlock.

Err, why? There's normally no particular reason to worry about this, so
explaining that might be good.

johannes


^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] mwifiex: do not emit messages while holding spinlock
  2015-01-07  7:40 ` Johannes Berg
@ 2015-01-07  8:09   ` Avinash Patil
  0 siblings, 0 replies; 4+ messages in thread
From: Avinash Patil @ 2015-01-07  8:09 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Amitkumar Karwar, Cathy Luo


________________________________________
From: Johannes Berg [johannes@sipsolutions.net]
Sent: Wednesday, January 07, 2015 1:10 PM
To: Avinash Patil
Cc: linux-wireless@vger.kernel.org; Amitkumar Karwar; Cathy Luo
Subject: Re: [PATCH] mwifiex: do not emit messages while holding spinlock

On Wed, 2015-01-07 at 18:10 +0530, Avinash Patil wrote:
> Avoid printing dev_{warn/dbg} messages while holding spinlock.

>Err, why? There's normally no particular reason to worry about this, so
>explaining that might be good.

Hmm..yes. dev_dbg/dev_err while holding spinlock is not an issue.
This is just for sake of releasing spinlock ASAP.

Thanks,
Avinash.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] mwifiex: do not emit messages while holding spinlock
@ 2015-01-07 12:40 Avinash Patil
  2015-01-07  7:40 ` Johannes Berg
  2015-01-23 17:06 ` Kalle Valo
  0 siblings, 2 replies; 4+ messages in thread
From: Avinash Patil @ 2015-01-07 12:40 UTC (permalink / raw)
  To: linux-wireless; +Cc: akarwar, cluo, Avinash Patil

Avoid printing dev_{warn/dbg} messages while holding spinlock.

Signed-off-by: Avinash Patil <patila@marvell.com>
---
 drivers/net/wireless/mwifiex/11n.c           | 2 +-
 drivers/net/wireless/mwifiex/11n_rxreorder.c | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/mwifiex/11n.c b/drivers/net/wireless/mwifiex/11n.c
index 9d4786e..c5c83cf 100644
--- a/drivers/net/wireless/mwifiex/11n.c
+++ b/drivers/net/wireless/mwifiex/11n.c
@@ -558,10 +558,10 @@ int mwifiex_send_addba(struct mwifiex_private *priv, int tid, u8 *peer_mac)
 		spin_lock_irqsave(&priv->sta_list_spinlock, flags);
 		sta_ptr = mwifiex_get_sta_entry(priv, peer_mac);
 		if (!sta_ptr) {
+			spin_unlock_irqrestore(&priv->sta_list_spinlock, flags);
 			dev_warn(priv->adapter->dev,
 				 "BA setup with unknown TDLS peer %pM!\n",
 				peer_mac);
-			spin_unlock_irqrestore(&priv->sta_list_spinlock, flags);
 			return -1;
 		}
 		if (sta_ptr->is_11ac_enabled)
diff --git a/drivers/net/wireless/mwifiex/11n_rxreorder.c b/drivers/net/wireless/mwifiex/11n_rxreorder.c
index d73fda3..8c60f18 100644
--- a/drivers/net/wireless/mwifiex/11n_rxreorder.c
+++ b/drivers/net/wireless/mwifiex/11n_rxreorder.c
@@ -353,9 +353,6 @@ mwifiex_11n_create_rx_reorder_tbl(struct mwifiex_private *priv, u8 *ta,
 
 	spin_lock_irqsave(&priv->sta_list_spinlock, flags);
 	if (mwifiex_queuing_ra_based(priv)) {
-		dev_dbg(priv->adapter->dev,
-			"info: AP/ADHOC:last_seq=%d start_win=%d\n",
-			last_seq, new_node->start_win);
 		if (priv->bss_role == MWIFIEX_BSS_ROLE_UAP) {
 			node = mwifiex_get_sta_entry(priv, ta);
 			if (node)
@@ -370,6 +367,9 @@ mwifiex_11n_create_rx_reorder_tbl(struct mwifiex_private *priv, u8 *ta,
 	}
 	spin_unlock_irqrestore(&priv->sta_list_spinlock, flags);
 
+	dev_dbg(priv->adapter->dev, "info: last_seq=%d start_win=%d\n",
+		last_seq, new_node->start_win);
+
 	if (last_seq != MWIFIEX_DEF_11N_RX_SEQ_NUM &&
 	    last_seq >= new_node->start_win) {
 		new_node->start_win = last_seq + 1;
@@ -468,10 +468,10 @@ int mwifiex_cmd_11n_addba_rsp_gen(struct mwifiex_private *priv,
 		sta_ptr = mwifiex_get_sta_entry(priv,
 						cmd_addba_req->peer_mac_addr);
 		if (!sta_ptr) {
+			spin_unlock_irqrestore(&priv->sta_list_spinlock, flags);
 			dev_warn(priv->adapter->dev,
 				 "BA setup with unknown TDLS peer %pM!\n",
 				 cmd_addba_req->peer_mac_addr);
-			spin_unlock_irqrestore(&priv->sta_list_spinlock, flags);
 			return -1;
 		}
 		if (sta_ptr->is_11ac_enabled)
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: mwifiex: do not emit messages while holding spinlock
  2015-01-07 12:40 [PATCH] mwifiex: do not emit messages while holding spinlock Avinash Patil
  2015-01-07  7:40 ` Johannes Berg
@ 2015-01-23 17:06 ` Kalle Valo
  1 sibling, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2015-01-23 17:06 UTC (permalink / raw)
  To: Avinash Patil; +Cc: linux-wireless, akarwar, cluo, Avinash Patil


> Avoid printing dev_{warn/dbg} messages while holding spinlock.
> 
> Signed-off-by: Avinash Patil <patila@marvell.com>

Thanks, applied to wireless-drivers-next.git.

Kalle Valo

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-01-23 17:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-07 12:40 [PATCH] mwifiex: do not emit messages while holding spinlock Avinash Patil
2015-01-07  7:40 ` Johannes Berg
2015-01-07  8:09   ` Avinash Patil
2015-01-23 17:06 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).