On Tue, Jan 28, 2003 at 08:19:25PM +0100, Oliver Neukum wrote:
> Am Dienstag, 28. Januar 2003 13:54 schrieb Oliver Kurth:
> > Hello!
> >
> > I wrote a new driver for Atmel at76c503 based USB wlan adapters. See
> > the link below in my .signature.

> > Maybe someone wants to look over it. It is still in development,
> > and supports only ad-hoc mode at the moment. There is one 'exotic'
> > thing about it: it uses another module which I wrote to load the
> > firmware, it is included in the package. It works as follows:
> 
>       block = kmalloc(EXT_FW_BLOCK_SIZE, GFP_KERNEL|GFP_DMA);
>       if(block == NULL) return -ENOMEM;
> 
> Wrong. Use GFP_KERNEL only.

Alright. I just wanted to be sure it's DMA.

>       if(urb->status != 0){
>               if((urb->status != -ENOENT) &&
>                  (urb->status != -ECONNRESET)) {
>                       dbg(__FUNCTION__ " - nonzero write bulk status received: %d",
>                           urb->status);
>               }
>               return;
> 
> Any error will lock up the device? Not nice.

Oh, thanks for that. Fixed.

> 
>       struct ieee802_11_hdr *i802_11_hdr =
>               (struct ieee802_11_hdr *)&(tx_buffer->packet);
> 
>       down(&dev->sem);

Fixed as well, I now use spin_lock_irq(). Strange thing, it never
crashed here, so I thought this is not in an interrupt.

> down() with spinlock held. Absolute taboo. There are severaly bugs
> of this kind.

Thank you for looking... if anyone finds more, please tell me.

Greetings,
Oliver
-- 
An MTA for home users, notebooks and PDAs: http://masqmail.cx/masqmail/
A driver for Atmel at76c503 based WLAN Adapters: http://masqmail.cx/at76c503/

Attachment: msg11129/pgp00000.pgp
Description: PGP signature

Reply via email to