aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ifb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ifb.c')
-rw-r--r--drivers/net/ifb.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c
index 448e618b6974..15949d3df17e 100644
--- a/drivers/net/ifb.c
+++ b/drivers/net/ifb.c
@@ -40,7 +40,6 @@
40 40
41#define TX_Q_LIMIT 32 41#define TX_Q_LIMIT 32
42struct ifb_private { 42struct ifb_private {
43 struct net_device_stats stats;
44 struct tasklet_struct ifb_tasklet; 43 struct tasklet_struct ifb_tasklet;
45 int tasklet_pending; 44 int tasklet_pending;
46 /* mostly debug stats leave in for now */ 45 /* mostly debug stats leave in for now */
@@ -61,7 +60,6 @@ static int numifbs = 2;
61 60
62static void ri_tasklet(unsigned long dev); 61static void ri_tasklet(unsigned long dev);
63static int ifb_xmit(struct sk_buff *skb, struct net_device *dev); 62static int ifb_xmit(struct sk_buff *skb, struct net_device *dev);
64static struct net_device_stats *ifb_get_stats(struct net_device *dev);
65static int ifb_open(struct net_device *dev); 63static int ifb_open(struct net_device *dev);
66static int ifb_close(struct net_device *dev); 64static int ifb_close(struct net_device *dev);
67 65
@@ -70,7 +68,7 @@ static void ri_tasklet(unsigned long dev)
70 68
71 struct net_device *_dev = (struct net_device *)dev; 69 struct net_device *_dev = (struct net_device *)dev;
72 struct ifb_private *dp = netdev_priv(_dev); 70 struct ifb_private *dp = netdev_priv(_dev);
73 struct net_device_stats *stats = &dp->stats; 71 struct net_device_stats *stats = &_dev->stats;
74 struct sk_buff *skb; 72 struct sk_buff *skb;
75 73
76 dp->st_task_enter++; 74 dp->st_task_enter++;
@@ -140,7 +138,6 @@ resched:
140static void ifb_setup(struct net_device *dev) 138static void ifb_setup(struct net_device *dev)
141{ 139{
142 /* Initialize the device structure. */ 140 /* Initialize the device structure. */
143 dev->get_stats = ifb_get_stats;
144 dev->hard_start_xmit = ifb_xmit; 141 dev->hard_start_xmit = ifb_xmit;
145 dev->open = &ifb_open; 142 dev->open = &ifb_open;
146 dev->stop = &ifb_close; 143 dev->stop = &ifb_close;
@@ -158,7 +155,7 @@ static void ifb_setup(struct net_device *dev)
158static int ifb_xmit(struct sk_buff *skb, struct net_device *dev) 155static int ifb_xmit(struct sk_buff *skb, struct net_device *dev)
159{ 156{
160 struct ifb_private *dp = netdev_priv(dev); 157 struct ifb_private *dp = netdev_priv(dev);
161 struct net_device_stats *stats = &dp->stats; 158 struct net_device_stats *stats = &dev->stats;
162 int ret = 0; 159 int ret = 0;
163 u32 from = G_TC_FROM(skb->tc_verd); 160 u32 from = G_TC_FROM(skb->tc_verd);
164 161
@@ -185,19 +182,6 @@ static int ifb_xmit(struct sk_buff *skb, struct net_device *dev)
185 return ret; 182 return ret;
186} 183}
187 184
188static struct net_device_stats *ifb_get_stats(struct net_device *dev)
189{
190 struct ifb_private *dp = netdev_priv(dev);
191 struct net_device_stats *stats = &dp->stats;
192
193 pr_debug("tasklets stats %ld:%ld:%ld:%ld:%ld:%ld:%ld:%ld:%ld \n",
194 dp->st_task_enter, dp->st_txq_refl_try, dp->st_rxq_enter,
195 dp->st_rx2tx_tran, dp->st_rxq_notenter, dp->st_rx_frm_egr,
196 dp->st_rx_frm_ing, dp->st_rxq_check, dp->st_rxq_rsch);
197
198 return stats;
199}
200
201static int ifb_close(struct net_device *dev) 185static int ifb_close(struct net_device *dev)
202{ 186{
203 struct ifb_private *dp = netdev_priv(dev); 187 struct ifb_private *dp = netdev_priv(dev);