From: Christian Lamparter <chunkeey@web.de>
To: linux-wireless@vger.kernel.org
Cc: Artur Skawina <art.08.09@gmail.com>,
"John W. Linville" <linville@tuxdriver.com>
Subject: [PATCH] p54usb: bring first generation devices back to life
Date: Wed, 17 Dec 2008 12:04:43 +0100 [thread overview]
Message-ID: <200812171204.43946.chunkeey@web.de> (raw)
This patch fixes a serious regression (introduced by:
"p54: fix memory management" 872037115977dc0 )
that affected isl3886+net2280 usb devices operation.
Signed-off-by: Christian Lamparter <chunkeey@web.de>
---
Artur, can you please test the attached patch.
if it works, please add a tested-by/acked/signed-off (whatever you want) line.
---
John,
This patch is made against the current wireless-testing.
(so I hope you don't get any rejects if you merge put it into wireless-2.6 straight away).
Of course, I tried to apply them on top of the last patch (free after tx) and all you
get is little complaint about offsets.. e.g:
patching file p54usb.c
Hunk #1 succeeded at 301 (offset -13 lines).
Hunk #2 succeeded at 327 (offset -13 lines).
---
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c
index 9c2c651..62c2ad4 100644
--- a/drivers/net/wireless/p54/p54usb.c
+++ b/drivers/net/wireless/p54/p54usb.c
@@ -314,6 +314,8 @@ static void p54u_tx_net2280(struct ieee80211_hw *dev, struct sk_buff *skb,
struct net2280_tx_hdr *hdr;
struct net2280_reg_write *reg;
int err = 0;
+ __le32 addr = ((struct p54_hdr *) skb->data)->req_id;
+ __le16 len = cpu_to_le16(skb->len);
reg = kmalloc(sizeof(*reg), GFP_ATOMIC);
if (!reg)
@@ -338,8 +340,8 @@ static void p54u_tx_net2280(struct ieee80211_hw *dev, struct sk_buff *skb,
hdr = (void *)skb_push(skb, sizeof(*hdr));
memset(hdr, 0, sizeof(*hdr));
- hdr->device_addr = ((struct p54_hdr *)skb->data)->req_id;
- hdr->len = cpu_to_le16(skb->len + sizeof(struct p54_hdr));
+ hdr->len = len;
+ hdr->device_addr = addr;
usb_fill_bulk_urb(int_urb, priv->udev,
usb_sndbulkpipe(priv->udev, P54U_PIPE_DEV), reg, sizeof(*reg),
next reply other threads:[~2008-12-17 11:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-17 11:04 Christian Lamparter [this message]
2008-12-17 13:21 ` [PATCH] p54usb: bring first generation devices back to life Artur Skawina
2008-12-17 16:18 ` John W. Linville
2008-12-17 16:59 ` Christian Lamparter
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=200812171204.43946.chunkeey@web.de \
--to=chunkeey@web.de \
--cc=art.08.09@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/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 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).