@@ -3096,6 +3096,7 @@ static int ucc_geth_start_xmit(struct sk_buff *skb, struct net_device *dev)
3096
3096
3097
3097
ugeth_vdbg ("%s: IN" , __func__ );
3098
3098
3099
+ netdev_sent_queue (dev , skb -> len );
3099
3100
spin_lock_irqsave (& ugeth -> lock , flags );
3100
3101
3101
3102
dev -> stats .tx_bytes += skb -> len ;
@@ -3240,6 +3241,8 @@ static int ucc_geth_tx(struct net_device *dev, u8 txQ)
3240
3241
{
3241
3242
/* Start from the next BD that should be filled */
3242
3243
struct ucc_geth_private * ugeth = netdev_priv (dev );
3244
+ unsigned int bytes_sent = 0 ;
3245
+ int howmany = 0 ;
3243
3246
u8 __iomem * bd ; /* BD pointer */
3244
3247
u32 bd_status ;
3245
3248
@@ -3257,7 +3260,8 @@ static int ucc_geth_tx(struct net_device *dev, u8 txQ)
3257
3260
skb = ugeth -> tx_skbuff [txQ ][ugeth -> skb_dirtytx [txQ ]];
3258
3261
if (!skb )
3259
3262
break ;
3260
-
3263
+ howmany ++ ;
3264
+ bytes_sent += skb -> len ;
3261
3265
dev -> stats .tx_packets ++ ;
3262
3266
3263
3267
dev_consume_skb_any (skb );
@@ -3279,6 +3283,7 @@ static int ucc_geth_tx(struct net_device *dev, u8 txQ)
3279
3283
bd_status = in_be32 ((u32 __iomem * )bd );
3280
3284
}
3281
3285
ugeth -> confBd [txQ ] = bd ;
3286
+ netdev_completed_queue (dev , howmany , bytes_sent );
3282
3287
return 0 ;
3283
3288
}
3284
3289
@@ -3479,6 +3484,7 @@ static int ucc_geth_open(struct net_device *dev)
3479
3484
3480
3485
phy_start (ugeth -> phydev );
3481
3486
napi_enable (& ugeth -> napi );
3487
+ netdev_reset_queue (dev );
3482
3488
netif_start_queue (dev );
3483
3489
3484
3490
device_set_wakeup_capable (& dev -> dev ,
@@ -3509,6 +3515,7 @@ static int ucc_geth_close(struct net_device *dev)
3509
3515
free_irq (ugeth -> ug_info -> uf_info .irq , ugeth -> ndev );
3510
3516
3511
3517
netif_stop_queue (dev );
3518
+ netdev_reset_queue (dev );
3512
3519
3513
3520
return 0 ;
3514
3521
}
0 commit comments