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 <[email protected]>
---
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),
On Wednesday 17 December 2008 17:18:05 John W. Linville wrote:
> AFAICT, the "p54: fix memory management" is not in wireless-2.6.
> Perhaps you meant wireless-next-2.6?
and you're right! That said, maybe a few more days and we might see a new release
and everything moves up.
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 <[email protected]>
> ---
> 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 <[email protected]>
> ---
> 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),
>
>
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 <[email protected]>
> ---
> 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
[email protected] of your literate lifestyle.