[PATCH] libertas: Fix ethtool statistics

Holger Schurig hs4233 at mail.mn-solutions.de
Fri Apr 18 09:10:53 EDT 2008


> > I wrote "if (ret) return ret", not "if (ret) return;".
>
> I know you did, but I don't know why. The
> lbs_ethtool_get_stats() function returns void. Sebastian's
> patch which memsets it to zero makes sense, but it can't
> return an error.

Ahh, I stand corrected.


> They're separate problems, really. With or without the patch I
> first posted, you're getting crap back when you ask for
> statistics on a non-mesh device. The second patch fixes that,
> and stands alone.

Yes, this is separate. That's why I wrote "The ultimate patch 
would be".

BTW, I like your two patches combined more than Sebastians memset 
approach. Because with Sebastians patch on on ethX we would get 
zeroed nonsense instead of uninitialized nonsense.

The memset should possible there anyway in the case of a firmware 
that can mshX, but not CMD_ACT_MESH_GET_STATS or which would 
return some error for another reason.



More information about the libertas-dev mailing list