Commit 22981e0e5ab3aedfb46698ed7c12c7b944781bd3
Committed by
Greg Kroah-Hartman
1 parent
46ef6886ac
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
staging: vt6655: Use net_device_stats from struct net_device
Instead of using an own copy of struct net_device_stats in struct vnt_private, use stats from struct net_device. Also remove the thus unnecessary device_get_stats(), as it would now just return netdev->stats, which is the default in dev_get_stats(). Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing 3 changed files with 2 additions and 12 deletions Side-by-side Diff
drivers/staging/vt6655/device.h
drivers/staging/vt6655/device_main.c
... | ... | @@ -264,7 +264,6 @@ |
264 | 264 | static void device_free_info(struct vnt_private *pDevice); |
265 | 265 | static bool device_get_pci_info(struct vnt_private *, struct pci_dev *pcid); |
266 | 266 | static void device_print_info(struct vnt_private *pDevice); |
267 | -static struct net_device_stats *device_get_stats(struct net_device *dev); | |
268 | 267 | static void device_init_diversity_timer(struct vnt_private *pDevice); |
269 | 268 | static int device_open(struct net_device *dev); |
270 | 269 | static int device_xmit(struct sk_buff *skb, struct net_device *dev); |
... | ... | @@ -807,7 +806,6 @@ |
807 | 806 | .ndo_open = device_open, |
808 | 807 | .ndo_stop = device_close, |
809 | 808 | .ndo_do_ioctl = device_ioctl, |
810 | - .ndo_get_stats = device_get_stats, | |
811 | 809 | .ndo_start_xmit = device_xmit, |
812 | 810 | .ndo_set_rx_mode = device_set_multi, |
813 | 811 | }; |
... | ... | @@ -1406,7 +1404,7 @@ |
1406 | 1404 | unsigned char byTsr1; |
1407 | 1405 | unsigned int uFrameSize, uFIFOHeaderSize; |
1408 | 1406 | PSTxBufHead pTxBufHead; |
1409 | - struct net_device_stats *pStats = &pDevice->stats; | |
1407 | + struct net_device_stats *pStats = &pDevice->dev->stats; | |
1410 | 1408 | struct sk_buff *skb; |
1411 | 1409 | unsigned int uNodeIndex; |
1412 | 1410 | PSMgmtObject pMgmt = pDevice->pMgmt; |
... | ... | @@ -2585,13 +2583,6 @@ |
2585 | 2583 | |
2586 | 2584 | VNSvOutPortB(pDevice->PortOffset + MAC_REG_RCR, pDevice->byRxMode); |
2587 | 2585 | pr_debug("pDevice->byRxMode = %x\n", pDevice->byRxMode); |
2588 | -} | |
2589 | - | |
2590 | -static struct net_device_stats *device_get_stats(struct net_device *dev) | |
2591 | -{ | |
2592 | - struct vnt_private *pDevice = netdev_priv(dev); | |
2593 | - | |
2594 | - return &pDevice->stats; | |
2595 | 2586 | } |
2596 | 2587 | |
2597 | 2588 | static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) |
drivers/staging/vt6655/dpc.c
... | ... | @@ -274,7 +274,7 @@ |
274 | 274 | ) |
275 | 275 | { |
276 | 276 | PDEVICE_RD_INFO pRDInfo = pCurrRD->pRDInfo; |
277 | - struct net_device_stats *pStats = &pDevice->stats; | |
277 | + struct net_device_stats *pStats = &pDevice->dev->stats; | |
278 | 278 | struct sk_buff *skb; |
279 | 279 | PSMgmtObject pMgmt = pDevice->pMgmt; |
280 | 280 | PSRxMgmtPacket pRxPacket = &(pDevice->pMgmt->sRxPacket); |