Search Linux Wireless

Re: [PATCH] p54usb: bring first generation devices back to life

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
> ---
> 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@xxxxxxxxx>

> ---
> 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),
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux