Skip to content

Commit

Permalink
usbnet: convert rndis driver to use dev_get_stats
Browse files Browse the repository at this point in the history
dev_get_stats() handles all issues with net_device_ops

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Mar 22, 2009
1 parent 63e77b3 commit b555649
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/usb/gadget/rndis.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
int i, count;
rndis_query_cmplt_type *resp;
struct net_device *net;
struct net_device_stats *stats;
const struct net_device_stats *stats;

if (!r) return -ENOMEM;
resp = (rndis_query_cmplt_type *) r->buf;
Expand All @@ -193,10 +193,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
resp->InformationBufferOffset = cpu_to_le32 (16);

net = rndis_per_dev_params[configNr].dev;
if (net->get_stats)
stats = net->get_stats(net);
else
stats = NULL;
stats = dev_get_stats(net);

switch (OID) {

Expand Down

0 comments on commit b555649

Please sign in to comment.