* [PATCH] p54usb: bring first generation devices back to life
@ 2008-12-17 11:04 Christian Lamparter
2008-12-17 13:21 ` Artur Skawina
2008-12-17 16:18 ` John W. Linville
0 siblings, 2 replies; 4+ messages in thread
From: Christian Lamparter @ 2008-12-17 11:04 UTC (permalink / raw)
To: linux-wireless; +Cc: Artur Skawina, John W. Linville
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),
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] p54usb: bring first generation devices back to life
2008-12-17 11:04 [PATCH] p54usb: bring first generation devices back to life Christian Lamparter
@ 2008-12-17 13:21 ` Artur Skawina
2008-12-17 16:18 ` John W. Linville
1 sibling, 0 replies; 4+ messages in thread
From: Artur Skawina @ 2008-12-17 13:21 UTC (permalink / raw)
To: Christian Lamparter; +Cc: linux-wireless, John W. Linville
Christian Lamparter wrote:
> 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.
patch works.
Tested-by: Artur Skawina <art.08.09@gmail.com>
> ---
> 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),
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] p54usb: bring first generation devices back to life
2008-12-17 11:04 [PATCH] p54usb: bring first generation devices back to life Christian Lamparter
2008-12-17 13:21 ` Artur Skawina
@ 2008-12-17 16:18 ` John W. Linville
2008-12-17 16:59 ` Christian Lamparter
1 sibling, 1 reply; 4+ messages in thread
From: John W. Linville @ 2008-12-17 16:18 UTC (permalink / raw)
To: Christian Lamparter; +Cc: linux-wireless, Artur Skawina
On Wed, Dec 17, 2008 at 12:04:43PM +0100, Christian Lamparter wrote:
> 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:
AFAICT, the "p54: fix memory management" is not in wireless-2.6.
Perhaps you meant wireless-next-2.6?
John
--
John W. Linville Linux should be at the core
linville@tuxdriver.com of your literate lifestyle.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-12-17 16:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-17 11:04 [PATCH] p54usb: bring first generation devices back to life Christian Lamparter
2008-12-17 13:21 ` Artur Skawina
2008-12-17 16:18 ` John W. Linville
2008-12-17 16:59 ` Christian Lamparter
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).