• Home
  • Raw
  • Download

Lines Matching refs:netdev

127 	struct net_device *netdev;  member
203 struct net_device *netdev; in usb_8dev_send_cmd() local
205 netdev = priv->netdev; in usb_8dev_send_cmd()
218 netdev_err(netdev, "sending command message failed\n"); in usb_8dev_send_cmd()
226 netdev_err(netdev, "no command message answer\n"); in usb_8dev_send_cmd()
316 static int usb_8dev_set_mode(struct net_device *netdev, enum can_mode mode) in usb_8dev_set_mode() argument
318 struct usb_8dev_priv *priv = netdev_priv(netdev); in usb_8dev_set_mode()
325 netdev_warn(netdev, "couldn't start device"); in usb_8dev_set_mode()
341 struct net_device_stats *stats = &priv->netdev->stats; in usb_8dev_rx_err_msg()
357 skb = alloc_can_err_skb(priv->netdev, &cf); in usb_8dev_rx_err_msg()
371 can_bus_off(priv->netdev); in usb_8dev_rx_err_msg()
433 netdev_warn(priv->netdev, in usb_8dev_rx_err_msg()
464 struct net_device_stats *stats = &priv->netdev->stats; in usb_8dev_rx_can_msg()
470 skb = alloc_can_skb(priv->netdev, &cf); in usb_8dev_rx_can_msg()
489 can_led_event(priv->netdev, CAN_LED_EVENT_RX); in usb_8dev_rx_can_msg()
491 netdev_warn(priv->netdev, "frame type %d unknown", in usb_8dev_rx_can_msg()
504 struct net_device *netdev; in usb_8dev_read_bulk_callback() local
508 netdev = priv->netdev; in usb_8dev_read_bulk_callback()
510 if (!netif_device_present(netdev)) in usb_8dev_read_bulk_callback()
524 netdev_info(netdev, "Rx URB aborted (%d)\n", in usb_8dev_read_bulk_callback()
533 netdev_err(priv->netdev, "format error\n"); in usb_8dev_read_bulk_callback()
552 netif_device_detach(netdev); in usb_8dev_read_bulk_callback()
554 netdev_err(netdev, in usb_8dev_read_bulk_callback()
567 struct net_device *netdev; in usb_8dev_write_bulk_callback() local
572 netdev = priv->netdev; in usb_8dev_write_bulk_callback()
580 if (!netif_device_present(netdev)) in usb_8dev_write_bulk_callback()
584 netdev_info(netdev, "Tx URB aborted (%d)\n", in usb_8dev_write_bulk_callback()
587 netdev->stats.tx_packets++; in usb_8dev_write_bulk_callback()
588 netdev->stats.tx_bytes += context->dlc; in usb_8dev_write_bulk_callback()
590 can_get_echo_skb(netdev, context->echo_index); in usb_8dev_write_bulk_callback()
592 can_led_event(netdev, CAN_LED_EVENT_TX); in usb_8dev_write_bulk_callback()
597 netif_wake_queue(netdev); in usb_8dev_write_bulk_callback()
602 struct net_device *netdev) in usb_8dev_start_xmit() argument
604 struct usb_8dev_priv *priv = netdev_priv(netdev); in usb_8dev_start_xmit()
605 struct net_device_stats *stats = &netdev->stats; in usb_8dev_start_xmit()
614 if (can_dropped_invalid_skb(netdev, skb)) in usb_8dev_start_xmit()
625 netdev_err(netdev, "No memory left for USB buffer\n"); in usb_8dev_start_xmit()
669 can_put_echo_skb(skb, netdev, context->echo_index); in usb_8dev_start_xmit()
675 can_free_echo_skb(netdev, context->echo_index); in usb_8dev_start_xmit()
683 netif_device_detach(netdev); in usb_8dev_start_xmit()
685 netdev_warn(netdev, "failed tx_urb %d\n", err); in usb_8dev_start_xmit()
689 netif_stop_queue(netdev); in usb_8dev_start_xmit()
702 netdev_warn(netdev, "couldn't find free context"); in usb_8dev_start_xmit()
716 static int usb_8dev_get_berr_counter(const struct net_device *netdev, in usb_8dev_get_berr_counter() argument
719 struct usb_8dev_priv *priv = netdev_priv(netdev); in usb_8dev_get_berr_counter()
730 struct net_device *netdev = priv->netdev; in usb_8dev_start() local
748 netdev_err(netdev, "No memory left for USB buffer\n"); in usb_8dev_start()
782 netdev_warn(netdev, "couldn't setup read URBs\n"); in usb_8dev_start()
788 netdev_warn(netdev, "rx performance may be slow\n"); in usb_8dev_start()
800 netif_device_detach(priv->netdev); in usb_8dev_start()
802 netdev_warn(netdev, "couldn't submit control: %d\n", err); in usb_8dev_start()
808 static int usb_8dev_open(struct net_device *netdev) in usb_8dev_open() argument
810 struct usb_8dev_priv *priv = netdev_priv(netdev); in usb_8dev_open()
814 err = open_candev(netdev); in usb_8dev_open()
818 can_led_event(netdev, CAN_LED_EVENT_OPEN); in usb_8dev_open()
824 netif_device_detach(priv->netdev); in usb_8dev_open()
826 netdev_warn(netdev, "couldn't start device: %d\n", in usb_8dev_open()
829 close_candev(netdev); in usb_8dev_open()
834 netif_start_queue(netdev); in usb_8dev_open()
857 static int usb_8dev_close(struct net_device *netdev) in usb_8dev_close() argument
859 struct usb_8dev_priv *priv = netdev_priv(netdev); in usb_8dev_close()
865 netdev_warn(netdev, "couldn't stop device"); in usb_8dev_close()
869 netif_stop_queue(netdev); in usb_8dev_close()
874 close_candev(netdev); in usb_8dev_close()
876 can_led_event(netdev, CAN_LED_EVENT_STOP); in usb_8dev_close()
909 struct net_device *netdev; in usb_8dev_probe() local
923 netdev = alloc_candev(sizeof(struct usb_8dev_priv), MAX_TX_URBS); in usb_8dev_probe()
924 if (!netdev) { in usb_8dev_probe()
929 priv = netdev_priv(netdev); in usb_8dev_probe()
932 priv->netdev = netdev; in usb_8dev_probe()
943 netdev->netdev_ops = &usb_8dev_netdev_ops; in usb_8dev_probe()
945 netdev->flags |= IFF_ECHO; /* we support local echo */ in usb_8dev_probe()
962 SET_NETDEV_DEV(netdev, &intf->dev); in usb_8dev_probe()
966 err = register_candev(netdev); in usb_8dev_probe()
968 netdev_err(netdev, in usb_8dev_probe()
975 netdev_err(netdev, "can't get firmware version\n"); in usb_8dev_probe()
978 netdev_info(netdev, in usb_8dev_probe()
984 devm_can_led_init(netdev); in usb_8dev_probe()
989 unregister_netdev(priv->netdev); in usb_8dev_probe()
992 free_candev(netdev); in usb_8dev_probe()
1006 netdev_info(priv->netdev, "device disconnected\n"); in usb_8dev_disconnect()
1008 unregister_netdev(priv->netdev); in usb_8dev_disconnect()
1010 free_candev(priv->netdev); in usb_8dev_disconnect()