diff options
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 64 |
1 files changed, 33 insertions, 31 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index ddee79bb8f15..cbeb5867cff7 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <linux/if_link.h> | 31 | #include <linux/if_link.h> |
32 | 32 | ||
33 | #ifdef __KERNEL__ | 33 | #ifdef __KERNEL__ |
34 | #include <linux/pm_qos_params.h> | 34 | #include <linux/pm_qos.h> |
35 | #include <linux/timer.h> | 35 | #include <linux/timer.h> |
36 | #include <linux/delay.h> | 36 | #include <linux/delay.h> |
37 | #include <linux/atomic.h> | 37 | #include <linux/atomic.h> |
@@ -723,9 +723,8 @@ struct netdev_tc_txq { | |||
723 | * | 723 | * |
724 | * void (*ndo_set_rx_mode)(struct net_device *dev); | 724 | * void (*ndo_set_rx_mode)(struct net_device *dev); |
725 | * This function is called device changes address list filtering. | 725 | * This function is called device changes address list filtering. |
726 | * | 726 | * If driver handles unicast address filtering, it should set |
727 | * void (*ndo_set_multicast_list)(struct net_device *dev); | 727 | * IFF_UNICAST_FLT to its priv_flags. |
728 | * This function is called when the multicast address list changes. | ||
729 | * | 728 | * |
730 | * int (*ndo_set_mac_address)(struct net_device *dev, void *addr); | 729 | * int (*ndo_set_mac_address)(struct net_device *dev, void *addr); |
731 | * This function is called when the Media Access Control address | 730 | * This function is called when the Media Access Control address |
@@ -782,6 +781,7 @@ struct netdev_tc_txq { | |||
782 | * int (*ndo_set_vf_mac)(struct net_device *dev, int vf, u8* mac); | 781 | * int (*ndo_set_vf_mac)(struct net_device *dev, int vf, u8* mac); |
783 | * int (*ndo_set_vf_vlan)(struct net_device *dev, int vf, u16 vlan, u8 qos); | 782 | * int (*ndo_set_vf_vlan)(struct net_device *dev, int vf, u16 vlan, u8 qos); |
784 | * int (*ndo_set_vf_tx_rate)(struct net_device *dev, int vf, int rate); | 783 | * int (*ndo_set_vf_tx_rate)(struct net_device *dev, int vf, int rate); |
784 | * int (*ndo_set_vf_spoofchk)(struct net_device *dev, int vf, bool setting); | ||
785 | * int (*ndo_get_vf_config)(struct net_device *dev, | 785 | * int (*ndo_get_vf_config)(struct net_device *dev, |
786 | * int vf, struct ifla_vf_info *ivf); | 786 | * int vf, struct ifla_vf_info *ivf); |
787 | * int (*ndo_set_vf_port)(struct net_device *dev, int vf, | 787 | * int (*ndo_set_vf_port)(struct net_device *dev, int vf, |
@@ -868,7 +868,6 @@ struct net_device_ops { | |||
868 | void (*ndo_change_rx_flags)(struct net_device *dev, | 868 | void (*ndo_change_rx_flags)(struct net_device *dev, |
869 | int flags); | 869 | int flags); |
870 | void (*ndo_set_rx_mode)(struct net_device *dev); | 870 | void (*ndo_set_rx_mode)(struct net_device *dev); |
871 | void (*ndo_set_multicast_list)(struct net_device *dev); | ||
872 | int (*ndo_set_mac_address)(struct net_device *dev, | 871 | int (*ndo_set_mac_address)(struct net_device *dev, |
873 | void *addr); | 872 | void *addr); |
874 | int (*ndo_validate_addr)(struct net_device *dev); | 873 | int (*ndo_validate_addr)(struct net_device *dev); |
@@ -902,6 +901,8 @@ struct net_device_ops { | |||
902 | int queue, u16 vlan, u8 qos); | 901 | int queue, u16 vlan, u8 qos); |
903 | int (*ndo_set_vf_tx_rate)(struct net_device *dev, | 902 | int (*ndo_set_vf_tx_rate)(struct net_device *dev, |
904 | int vf, int rate); | 903 | int vf, int rate); |
904 | int (*ndo_set_vf_spoofchk)(struct net_device *dev, | ||
905 | int vf, bool setting); | ||
905 | int (*ndo_get_vf_config)(struct net_device *dev, | 906 | int (*ndo_get_vf_config)(struct net_device *dev, |
906 | int vf, | 907 | int vf, |
907 | struct ifla_vf_info *ivf); | 908 | struct ifla_vf_info *ivf); |
@@ -924,11 +925,15 @@ struct net_device_ops { | |||
924 | u16 xid, | 925 | u16 xid, |
925 | struct scatterlist *sgl, | 926 | struct scatterlist *sgl, |
926 | unsigned int sgc); | 927 | unsigned int sgc); |
928 | #endif | ||
929 | |||
930 | #if defined(CONFIG_LIBFCOE) || defined(CONFIG_LIBFCOE_MODULE) | ||
927 | #define NETDEV_FCOE_WWNN 0 | 931 | #define NETDEV_FCOE_WWNN 0 |
928 | #define NETDEV_FCOE_WWPN 1 | 932 | #define NETDEV_FCOE_WWPN 1 |
929 | int (*ndo_fcoe_get_wwn)(struct net_device *dev, | 933 | int (*ndo_fcoe_get_wwn)(struct net_device *dev, |
930 | u64 *wwn, int type); | 934 | u64 *wwn, int type); |
931 | #endif | 935 | #endif |
936 | |||
932 | #ifdef CONFIG_RFS_ACCEL | 937 | #ifdef CONFIG_RFS_ACCEL |
933 | int (*ndo_rx_flow_steer)(struct net_device *dev, | 938 | int (*ndo_rx_flow_steer)(struct net_device *dev, |
934 | const struct sk_buff *skb, | 939 | const struct sk_buff *skb, |
@@ -964,7 +969,7 @@ struct net_device { | |||
964 | */ | 969 | */ |
965 | char name[IFNAMSIZ]; | 970 | char name[IFNAMSIZ]; |
966 | 971 | ||
967 | struct pm_qos_request_list pm_qos_req; | 972 | struct pm_qos_request pm_qos_req; |
968 | 973 | ||
969 | /* device name hash chain */ | 974 | /* device name hash chain */ |
970 | struct hlist_node name_hlist; | 975 | struct hlist_node name_hlist; |
@@ -2587,9 +2592,6 @@ static inline int netif_is_bond_slave(struct net_device *dev) | |||
2587 | 2592 | ||
2588 | extern struct pernet_operations __net_initdata loopback_net_ops; | 2593 | extern struct pernet_operations __net_initdata loopback_net_ops; |
2589 | 2594 | ||
2590 | int dev_ethtool_get_settings(struct net_device *dev, | ||
2591 | struct ethtool_cmd *cmd); | ||
2592 | |||
2593 | static inline u32 dev_ethtool_get_rx_csum(struct net_device *dev) | 2595 | static inline u32 dev_ethtool_get_rx_csum(struct net_device *dev) |
2594 | { | 2596 | { |
2595 | if (dev->features & NETIF_F_RXCSUM) | 2597 | if (dev->features & NETIF_F_RXCSUM) |
@@ -2617,23 +2619,26 @@ static inline const char *netdev_name(const struct net_device *dev) | |||
2617 | return dev->name; | 2619 | return dev->name; |
2618 | } | 2620 | } |
2619 | 2621 | ||
2620 | extern int netdev_printk(const char *level, const struct net_device *dev, | 2622 | extern int __netdev_printk(const char *level, const struct net_device *dev, |
2621 | const char *format, ...) | 2623 | struct va_format *vaf); |
2622 | __attribute__ ((format (printf, 3, 4))); | 2624 | |
2623 | extern int netdev_emerg(const struct net_device *dev, const char *format, ...) | 2625 | extern __printf(3, 4) |
2624 | __attribute__ ((format (printf, 2, 3))); | 2626 | int netdev_printk(const char *level, const struct net_device *dev, |
2625 | extern int netdev_alert(const struct net_device *dev, const char *format, ...) | 2627 | const char *format, ...); |
2626 | __attribute__ ((format (printf, 2, 3))); | 2628 | extern __printf(2, 3) |
2627 | extern int netdev_crit(const struct net_device *dev, const char *format, ...) | 2629 | int netdev_emerg(const struct net_device *dev, const char *format, ...); |
2628 | __attribute__ ((format (printf, 2, 3))); | 2630 | extern __printf(2, 3) |
2629 | extern int netdev_err(const struct net_device *dev, const char *format, ...) | 2631 | int netdev_alert(const struct net_device *dev, const char *format, ...); |
2630 | __attribute__ ((format (printf, 2, 3))); | 2632 | extern __printf(2, 3) |
2631 | extern int netdev_warn(const struct net_device *dev, const char *format, ...) | 2633 | int netdev_crit(const struct net_device *dev, const char *format, ...); |
2632 | __attribute__ ((format (printf, 2, 3))); | 2634 | extern __printf(2, 3) |
2633 | extern int netdev_notice(const struct net_device *dev, const char *format, ...) | 2635 | int netdev_err(const struct net_device *dev, const char *format, ...); |
2634 | __attribute__ ((format (printf, 2, 3))); | 2636 | extern __printf(2, 3) |
2635 | extern int netdev_info(const struct net_device *dev, const char *format, ...) | 2637 | int netdev_warn(const struct net_device *dev, const char *format, ...); |
2636 | __attribute__ ((format (printf, 2, 3))); | 2638 | extern __printf(2, 3) |
2639 | int netdev_notice(const struct net_device *dev, const char *format, ...); | ||
2640 | extern __printf(2, 3) | ||
2641 | int netdev_info(const struct net_device *dev, const char *format, ...); | ||
2637 | 2642 | ||
2638 | #define MODULE_ALIAS_NETDEV(device) \ | 2643 | #define MODULE_ALIAS_NETDEV(device) \ |
2639 | MODULE_ALIAS("netdev-" device) | 2644 | MODULE_ALIAS("netdev-" device) |
@@ -2644,8 +2649,7 @@ extern int netdev_info(const struct net_device *dev, const char *format, ...) | |||
2644 | #elif defined(CONFIG_DYNAMIC_DEBUG) | 2649 | #elif defined(CONFIG_DYNAMIC_DEBUG) |
2645 | #define netdev_dbg(__dev, format, args...) \ | 2650 | #define netdev_dbg(__dev, format, args...) \ |
2646 | do { \ | 2651 | do { \ |
2647 | dynamic_dev_dbg((__dev)->dev.parent, "%s: " format, \ | 2652 | dynamic_netdev_dbg(__dev, format, ##args); \ |
2648 | netdev_name(__dev), ##args); \ | ||
2649 | } while (0) | 2653 | } while (0) |
2650 | #else | 2654 | #else |
2651 | #define netdev_dbg(__dev, format, args...) \ | 2655 | #define netdev_dbg(__dev, format, args...) \ |
@@ -2712,9 +2716,7 @@ do { \ | |||
2712 | #define netif_dbg(priv, type, netdev, format, args...) \ | 2716 | #define netif_dbg(priv, type, netdev, format, args...) \ |
2713 | do { \ | 2717 | do { \ |
2714 | if (netif_msg_##type(priv)) \ | 2718 | if (netif_msg_##type(priv)) \ |
2715 | dynamic_dev_dbg((netdev)->dev.parent, \ | 2719 | dynamic_netdev_dbg(netdev, format, ##args); \ |
2716 | "%s: " format, \ | ||
2717 | netdev_name(netdev), ##args); \ | ||
2718 | } while (0) | 2720 | } while (0) |
2719 | #else | 2721 | #else |
2720 | #define netif_dbg(priv, type, dev, format, args...) \ | 2722 | #define netif_dbg(priv, type, dev, format, args...) \ |