diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2017-02-10 14:03:13 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-02-15 11:13:04 +0200 |
commit | 3a6282045b228f6de6abced74b793c71178fb948 (patch) | |
tree | 75b3de4af82e02f90659040bbdb7d2287c99d596 /drivers/net/wireless/intersil/orinoco/orinoco_usb.c | |
parent | rtlwifi: btcoexist: fix semicolon.cocci warnings (diff) | |
download | linux-dev-3a6282045b228f6de6abced74b793c71178fb948.tar.xz linux-dev-3a6282045b228f6de6abced74b793c71178fb948.zip |
orinoco: Use net_device_stats from struct net_device
Instead of using a private copy of struct net_device_stats in
struct orinoco_private, use stats from struct net_device. Also remove
the now unnecessary .ndo_get_stats function.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/wireless/intersil/orinoco/orinoco_usb.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/wireless/intersil/orinoco/orinoco_usb.c b/drivers/net/wireless/intersil/orinoco/orinoco_usb.c index bca6935a94db..98e1380b9917 100644 --- a/drivers/net/wireless/intersil/orinoco/orinoco_usb.c +++ b/drivers/net/wireless/intersil/orinoco/orinoco_usb.c @@ -403,8 +403,7 @@ static void ezusb_ctx_complete(struct request_context *ctx) if ((ctx->out_rid == EZUSB_RID_TX) && upriv->dev) { struct net_device *dev = upriv->dev; - struct orinoco_private *priv = ndev_priv(dev); - struct net_device_stats *stats = &priv->stats; + struct net_device_stats *stats = &dev->stats; if (ctx->state != EZUSB_CTX_COMPLETE) stats->tx_errors++; @@ -1183,7 +1182,7 @@ static int ezusb_program(struct hermes *hw, const char *buf, static netdev_tx_t ezusb_xmit(struct sk_buff *skb, struct net_device *dev) { struct orinoco_private *priv = ndev_priv(dev); - struct net_device_stats *stats = &priv->stats; + struct net_device_stats *stats = &dev->stats; struct ezusb_priv *upriv = priv->card; u8 mic[MICHAEL_MIC_LEN + 1]; int err = 0; @@ -1556,7 +1555,6 @@ static const struct net_device_ops ezusb_netdev_ops = { .ndo_set_mac_address = eth_mac_addr, .ndo_validate_addr = eth_validate_addr, .ndo_tx_timeout = orinoco_tx_timeout, - .ndo_get_stats = orinoco_get_stats, }; static int ezusb_probe(struct usb_interface *interface, |