Loading drivers/usb/gadget/function/u_ether.c +19 −1 Original line number Diff line number Diff line Loading @@ -71,6 +71,11 @@ module_param(min_cpu_freq, uint, S_IRUGO | S_IWUSR); MODULE_PARM_DESC(min_cpu_freq, "to set minimum cpu frquency to when ethernet ifc is active"); static unsigned int skb_timestamp_enable; module_param(skb_timestamp_enable, uint, S_IRUGO | S_IWUSR); MODULE_PARM_DESC(skb_timestamp_enable, "to enable timestamping for TX and RX packets"); /* this refers to max number sgs per transfer * which includes headers/data packets */ Loading Loading @@ -677,6 +682,8 @@ static void process_rx_w(struct work_struct *work) dev->net->stats.rx_packets++; dev->net->stats.rx_bytes += skb->len; if (skb_timestamp_enable) skb->tstamp = ktime_get(); status = netif_rx_ni(skb); } set_wake_up_idle(false); Loading Loading @@ -1064,13 +1071,14 @@ static netdev_tx_t eth_start_xmit(struct sk_buff *skb, int extra_alloc = 0; int retval; struct usb_request *req = NULL; struct sk_buff *new_skb; struct sk_buff *new_skb, *clone = NULL; unsigned long flags; struct usb_ep *in = NULL; u16 cdc_filter = 0; bool multi_pkt_xfer = false; u32 fixed_in_len; bool is_fixed; struct skb_shared_hwtstamps hwtstamps; spin_lock_irqsave(&dev->lock, flags); if (dev->port_usb) { Loading Loading @@ -1284,6 +1292,16 @@ static netdev_tx_t eth_start_xmit(struct sk_buff *skb, req->no_interrupt = 0; } if (skb_timestamp_enable) { skb->tstamp = ktime_get(); clone = skb_clone_sk(skb); if (clone) { memset(&hwtstamps, 0, sizeof(struct skb_shared_hwtstamps)); skb_complete_tx_timestamp(clone, &hwtstamps); } } retval = usb_ep_queue(in, req, GFP_ATOMIC); switch (retval) { default: Loading Loading
drivers/usb/gadget/function/u_ether.c +19 −1 Original line number Diff line number Diff line Loading @@ -71,6 +71,11 @@ module_param(min_cpu_freq, uint, S_IRUGO | S_IWUSR); MODULE_PARM_DESC(min_cpu_freq, "to set minimum cpu frquency to when ethernet ifc is active"); static unsigned int skb_timestamp_enable; module_param(skb_timestamp_enable, uint, S_IRUGO | S_IWUSR); MODULE_PARM_DESC(skb_timestamp_enable, "to enable timestamping for TX and RX packets"); /* this refers to max number sgs per transfer * which includes headers/data packets */ Loading Loading @@ -677,6 +682,8 @@ static void process_rx_w(struct work_struct *work) dev->net->stats.rx_packets++; dev->net->stats.rx_bytes += skb->len; if (skb_timestamp_enable) skb->tstamp = ktime_get(); status = netif_rx_ni(skb); } set_wake_up_idle(false); Loading Loading @@ -1064,13 +1071,14 @@ static netdev_tx_t eth_start_xmit(struct sk_buff *skb, int extra_alloc = 0; int retval; struct usb_request *req = NULL; struct sk_buff *new_skb; struct sk_buff *new_skb, *clone = NULL; unsigned long flags; struct usb_ep *in = NULL; u16 cdc_filter = 0; bool multi_pkt_xfer = false; u32 fixed_in_len; bool is_fixed; struct skb_shared_hwtstamps hwtstamps; spin_lock_irqsave(&dev->lock, flags); if (dev->port_usb) { Loading Loading @@ -1284,6 +1292,16 @@ static netdev_tx_t eth_start_xmit(struct sk_buff *skb, req->no_interrupt = 0; } if (skb_timestamp_enable) { skb->tstamp = ktime_get(); clone = skb_clone_sk(skb); if (clone) { memset(&hwtstamps, 0, sizeof(struct skb_shared_hwtstamps)); skb_complete_tx_timestamp(clone, &hwtstamps); } } retval = usb_ep_queue(in, req, GFP_ATOMIC); switch (retval) { default: Loading