From: Ivo van Doorn <ivdoorn@gmail.com>
To: netdev@vger.kernel.org
Cc: rt2x00-devel@lfcorreia.dyndns.org
Subject: [PATCH 23/32] rt2x00: Make correct cast in USB interrupt
Date: Fri, 28 Apr 2006 00:03:14 +0200 [thread overview]
Message-ID: <200604280003.15151.IvDoorn@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1760 bytes --]
From: Ivo van Doorn <IvDoorn@gmail.com>
The USB interrupt handler receives the entry
in the ring and not the ring itself.
Also check if the status indicates an error
before queueing the work.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
diff -uprN wireless-dev-rt2x00/drivers/net/wireless/d80211/rt2x00/rt2500usb.c wireless-dev-rt2x00-patch/drivers/net/wireless/d80211/rt2x00/rt2500usb.c
--- wireless-dev-rt2x00/drivers/net/wireless/d80211/rt2x00/rt2500usb.c 2006-04-27 21:53:13.000000000 +0200
+++ wireless-dev-rt2x00-patch/drivers/net/wireless/d80211/rt2x00/rt2500usb.c 2006-04-27 21:54:33.000000000 +0200
@@ -856,11 +856,14 @@ rt2500usb_txdone(void *data)
static void
rt2500usb_interrupt(struct urb *urb, struct pt_regs *regs)
{
- struct data_ring *ring = (struct data_ring*)urb->context;
+ struct data_entry *entry = (struct data_entry*)urb->context;
struct rt2x00_usb *rt2x00usb =
- ieee80211_dev_hw_data(ring->net_dev);
+ ieee80211_dev_hw_data(entry->ring->net_dev);
- queue_work(rt2x00usb->workqueue, &ring->irq_work);
+ if (urb->status)
+ return;
+
+ queue_work(rt2x00usb->workqueue, &entry->ring->irq_work);
}
/*
@@ -1064,7 +1067,6 @@ rt2500usb_init_txring(struct rt2x00_usb
}
}
-
static int
rt2500usb_init_rings(struct rt2x00_usb *rt2x00usb)
{
@@ -1798,7 +1800,7 @@ rt2500usb_init_hw_channels(struct rt2x00
for (counter = 0; counter < ARRAY_SIZE(vals); counter++)
channels[counter].val = vals[counter] | rf2_base;
} else if (rt2x00_rf(&rt2x00usb->chip, RF2525E)) {
- u32 vals[] = {
+ static u32 vals[] = {
0x0000089a, 0x0000089e, 0x0000089e, 0x000008a2,
0x000008a2, 0x000008a6, 0x000008a6, 0x000008aa,
0x000008aa, 0x000008ae, 0x000008ae, 0x000008b2,
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
reply other threads:[~2006-04-27 22:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200604280003.15151.IvDoorn@gmail.com \
--to=ivdoorn@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=rt2x00-devel@lfcorreia.dyndns.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.