diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2014-09-10 09:34:50 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-09-11 14:59:18 -0700 |
commit | 22981e0e5ab3aedfb46698ed7c12c7b944781bd3 (patch) | |
tree | 4d40f6bf70923b23fc4712a6baaaeb6a3ebae297 /drivers/staging/vt6655 | |
parent | 46ef6886ac5324058898a4e84cad029f06de8b18 (diff) | |
download | linux-22981e0e5ab3aedfb46698ed7c12c7b944781bd3.tar.bz2 |
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>
Diffstat (limited to 'drivers/staging/vt6655')
-rw-r--r-- | drivers/staging/vt6655/device.h | 1 | ||||
-rw-r--r-- | drivers/staging/vt6655/device_main.c | 11 | ||||
-rw-r--r-- | drivers/staging/vt6655/dpc.c | 2 |
3 files changed, 2 insertions, 12 deletions
diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h index 5e41b19dc127..e37469a1660a 100644 --- a/drivers/staging/vt6655/device.h +++ b/drivers/staging/vt6655/device.h @@ -335,7 +335,6 @@ struct vnt_private { // netdev struct net_device *dev; - struct net_device_stats stats; //dma addr, rx/tx pool dma_addr_t pool_dma; diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 7e7d9affbc12..aaeb3711f1da 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -264,7 +264,6 @@ static void vt6655_init_info(struct pci_dev *pcid, static void device_free_info(struct vnt_private *pDevice); static bool device_get_pci_info(struct vnt_private *, struct pci_dev *pcid); static void device_print_info(struct vnt_private *pDevice); -static struct net_device_stats *device_get_stats(struct net_device *dev); static void device_init_diversity_timer(struct vnt_private *pDevice); static int device_open(struct net_device *dev); static int device_xmit(struct sk_buff *skb, struct net_device *dev); @@ -807,7 +806,6 @@ static const struct net_device_ops device_netdev_ops = { .ndo_open = device_open, .ndo_stop = device_close, .ndo_do_ioctl = device_ioctl, - .ndo_get_stats = device_get_stats, .ndo_start_xmit = device_xmit, .ndo_set_rx_mode = device_set_multi, }; @@ -1406,7 +1404,7 @@ static int device_tx_srv(struct vnt_private *pDevice, unsigned int uIdx) unsigned char byTsr1; unsigned int uFrameSize, uFIFOHeaderSize; PSTxBufHead pTxBufHead; - struct net_device_stats *pStats = &pDevice->stats; + struct net_device_stats *pStats = &pDevice->dev->stats; struct sk_buff *skb; unsigned int uNodeIndex; PSMgmtObject pMgmt = pDevice->pMgmt; @@ -2587,13 +2585,6 @@ static void device_set_multi(struct net_device *dev) { pr_debug("pDevice->byRxMode = %x\n", pDevice->byRxMode); } -static struct net_device_stats *device_get_stats(struct net_device *dev) -{ - struct vnt_private *pDevice = netdev_priv(dev); - - return &pDevice->stats; -} - static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { struct vnt_private *pDevice = netdev_priv(dev); diff --git a/drivers/staging/vt6655/dpc.c b/drivers/staging/vt6655/dpc.c index 6fb6cdfbf5bc..8515b8c80801 100644 --- a/drivers/staging/vt6655/dpc.c +++ b/drivers/staging/vt6655/dpc.c @@ -274,7 +274,7 @@ device_receive_frame( ) { PDEVICE_RD_INFO pRDInfo = pCurrRD->pRDInfo; - struct net_device_stats *pStats = &pDevice->stats; + struct net_device_stats *pStats = &pDevice->dev->stats; struct sk_buff *skb; PSMgmtObject pMgmt = pDevice->pMgmt; PSRxMgmtPacket pRxPacket = &(pDevice->pMgmt->sRxPacket); |