提交 b5556498 编写于 作者: S Stephen Hemminger 提交者: David S. Miller

usbnet: convert rndis driver to use dev_get_stats

dev_get_stats() handles all issues with net_device_ops
Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 63e77b39
......@@ -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;
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册