[PATCH] libertas: Fix ethtool statistics
dwmw2 at infradead.org
Sun Apr 20 06:56:32 EDT 2008
On Sun, 2008-04-20 at 10:41 +0200, Sebastian Siewior wrote:
> The function before lbs_ethtool_get_stats() (in net code that
> determinate the number of elements, dunno the name right now) is able to
> return an error. This one could check if the firmware has mesh support.
That's what my second patch does.
> Do I understand this correct: If the firmware has support for mesh
> devices than we have ethX and mshX and only mshX should return the
Well, they are _mesh_ statistics :)
> returning uninitialized nonsense is leaking kernel memory.
Indeed. We need that memset there to handle errors, definitely.
> What about changing lbs_ethtool_get_stats() from void to int? All
> other drivers are reading memory to get this data, we have to go
> through usb/cs/sdio layer and all of them may fail.
Yeah, that might be worthwhile.
> I will try to form a patch around Monday that fixes Dan's comments (if
> nobody else is going to).
Which comments? If we apply your original patch, followed by my patch in
<1208509888.9212.291.camel at pmac.infradead.org> (which for some reason
only went to wireless-dev, not libertas-dev), then I think it's fine.
More information about the libertas-dev