From: Michael Buesch <mb@bu3sch.de>
To: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Johannes Berg <johannes@sipsolutions.net>,
kecsa@kutfo.hit.bme.hu, linux-wireless@vger.kernel.org
Subject: Re: hwtkip hangs on b43
Date: Sat, 23 Jan 2010 20:38:52 +0100 [thread overview]
Message-ID: <201001232038.55204.mb@bu3sch.de> (raw)
In-Reply-To: <4B5B4E9F.8040708@lwfinger.net>
On Saturday 23 January 2010 20:31:43 Larry Finger wrote:
> On 01/23/2010 01:00 PM, Michael Buesch wrote:
> > On Saturday 23 January 2010 19:53:48 Johannes Berg wrote:
> >> Actually you can't, because you can't acquire the mutex here since we're
> >> in an atomic section. So relying on it being already locked is probably
> >> safer. However, you can't actually sleep anyway...
> >
> > I'm OK with removing the lock from the callback, if it is guaranteed that
> > the callback is only called on behalf of a RX call.
> >
> > We can just remove the lock and add a comment explaining why it is not locked...
>
> That works for me.
>
untested
---
drivers/net/wireless/b43/main.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
--- wireless-testing.orig/drivers/net/wireless/b43/main.c
+++ wireless-testing/drivers/net/wireless/b43/main.c
@@ -856,22 +856,19 @@ static void b43_op_update_tkip_key(struc
if (B43_WARN_ON(!modparam_hwtkip))
return;
- mutex_lock(&wl->mutex);
-
+ /* This is only called from the RX path though mac80211, where
+ * our mutex is already locked. */
+ B43_WARN_ON(!mutex_is_locked(&wl->mutex));
dev = wl->current_dev;
- if (!dev || b43_status(dev) < B43_STAT_INITIALIZED)
- goto out_unlock;
+ B43_WARN_ON(!dev || b43_status(dev) < B43_STAT_INITIALIZED);
keymac_write(dev, index, NULL); /* First zero out mac to avoid race */
rx_tkip_phase1_write(dev, index, iv32, phase1key);
/* only pairwise TKIP keys are supported right now */
if (WARN_ON(!sta))
- goto out_unlock;
+ return;
keymac_write(dev, index, sta->addr);
-
-out_unlock:
- mutex_unlock(&wl->mutex);
}
static void do_key_write(struct b43_wldev *dev,
--
Greetings, Michael.
next prev parent reply other threads:[~2010-01-23 19:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-23 8:46 hwtkip hangs on b43 kecsa
2010-01-23 17:20 ` Larry Finger
2010-01-23 17:47 ` Johannes Berg
2010-01-23 18:19 ` Michael Buesch
2010-01-23 18:34 ` Larry Finger
2010-01-23 18:47 ` Michael Buesch
2010-01-23 18:48 ` Johannes Berg
2010-01-23 18:53 ` Johannes Berg
2010-01-23 19:00 ` Michael Buesch
2010-01-23 19:31 ` Larry Finger
2010-01-23 19:38 ` Michael Buesch [this message]
2010-01-24 5:58 ` Larry Finger
2010-01-24 11:32 ` Johannes Berg
2010-01-24 11:45 ` Michael Buesch
2010-01-24 11:47 ` Johannes Berg
2010-01-24 11:52 ` Michael Buesch
2010-01-24 12:37 ` Kalle Valo
2010-01-25 10:43 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201001232038.55204.mb@bu3sch.de \
--to=mb@bu3sch.de \
--cc=Larry.Finger@lwfinger.net \
--cc=johannes@sipsolutions.net \
--cc=kecsa@kutfo.hit.bme.hu \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.