[Prism54-devel] handle mgmt timeouts by resetting hardware

Margit Schubert-While margitsw at t-online.de
Fri Aug 6 19:16:05 UTC 2004


At 21:43 06.08.2004 +0300, Denis scribeth:
>On Friday 06 August 2004 09:46, Margit Schubert-While wrote:
> > More comments :
> > Dennis, are you trying to win the "Obfuscated C" prize ?
>
>No. Which part of code made you think so?
>
> > Have you got an aversion to white space ? :
> > eg.
> >     if (data==(unsigned long)NULL)
> >     if(modulation==DOT11_MOD_PBCC) return -ENOTSUPP;
>
>You took those two lines from two different .c files.

Geez -
  if<space> (data<space>==<space>(unsigned long)NULL)
  if<space>(modulation<space>==<space>DOT11_MOD_PBCC)<new line> return 
-ENOTSUPP;
Clear ?

> > Re: timer code.
> > You seem to have not taken into account PSM
> > (Power Saving Mode) and have ignored suspend/resume
> > totally.
>
>That's because I did not think about it at all.
>My primary testing method is heavy traffic in both directions,
>power saving does not kick in :)
>
>I need to look into it. But there is not bug _yet_ because
>watchdog timer does not touch hardware _yet_.

Yes, there is, you can't anymore suspend/resume after the
timer is triggered.

> > Re: set rates.
> > prism54_set_rates :
> > Memory leak.
> > prism54_set_rates can return early without freeing memory from
> > mgt_get_request.
> > (Actually, the same applies to the current prism54_set_rate, which
> >   just shows that one should not blindly copy code - fix coming up)
>
>Good catch!
>
>Talking about "Obfuscated C" contest:
>
>prism54_set_rate(struct net_device *ndev,
>                  struct iw_request_info *info,
>                  struct iw_param *vwrq, char *extra)
>...
>         if ((ret =
>              mgt_get_request(priv, DOT11_OID_SUPPORTEDRATES, 0, NULL, &r)))
>                 return ret;
>
>Please untangle r = f(); and if(r) ...;

Which has been patched in CVS
and do the same yourself !

Margit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://prism54.org/pipermail/prism54-devel/attachments/20040806/464e4d78/attachment.htm


More information about the Prism54-devel mailing list