]> git.hungrycats.org Git - linux/commit
[NET]: Fix fddi_statistics for 64-bit
authorMaciej W. Rozycki <macro@linux-mips.org>
Tue, 5 Oct 2004 05:29:45 +0000 (22:29 -0700)
committerDavid S. Miller <davem@nuts.davemloft.net>
Tue, 5 Oct 2004 05:29:45 +0000 (22:29 -0700)
commit6ac4b57fa1525c9e923a96f3b69fa8f2248b7ec2
treed0f3e2f9e9490195661e5a8592060e4bd3ade33d
parentbbafa8abb067271768cd871d55cabecce70ac4df
[NET]: Fix fddi_statistics for 64-bit

 There is a problem with "struct fddi_statistics" for 64-bit systems.
The starting members of the struct are expected to correspond to the
respective members of "struct net_device_stats" (drivers for FDDI
devices return "struct fddi_statistics" in the response to the
get_stats() call of "struct net_device").  Unfortunately, due to using
different types (u32 vs ulong) they do not.  "struct net_device_stats"
is a public interface and as a result, bogus results are retrieved,
e.g. for /proc/net/dev.

 Here is my proposal to address the problem.  I think there is no
point in duplicating the layout of "struct net_device_stats" in
"struct fddi_statistics" as the former can simply be included as a
member avoiding this problem and actually any possible discrepancy in
the future.  This also preserves the layout of the structure for
32-bit systems.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/defxx.c
drivers/net/skfp/skfddi.c
include/linux/if_fddi.h