diff options
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 3ca60b070ef0..875f869dc38a 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -728,6 +728,16 @@ struct netdev_fcoe_hbainfo { | |||
728 | }; | 728 | }; |
729 | #endif | 729 | #endif |
730 | 730 | ||
731 | #define MAX_PHYS_PORT_ID_LEN 32 | ||
732 | |||
733 | /* This structure holds a unique identifier to identify the | ||
734 | * physical port used by a netdevice. | ||
735 | */ | ||
736 | struct netdev_phys_port_id { | ||
737 | unsigned char id[MAX_PHYS_PORT_ID_LEN]; | ||
738 | unsigned char id_len; | ||
739 | }; | ||
740 | |||
731 | /* | 741 | /* |
732 | * This structure defines the management hooks for network devices. | 742 | * This structure defines the management hooks for network devices. |
733 | * The following hooks can be defined; unless noted otherwise, they are | 743 | * The following hooks can be defined; unless noted otherwise, they are |
@@ -932,6 +942,12 @@ struct netdev_fcoe_hbainfo { | |||
932 | * that determine carrier state from physical hardware properties (eg | 942 | * that determine carrier state from physical hardware properties (eg |
933 | * network cables) or protocol-dependent mechanisms (eg | 943 | * network cables) or protocol-dependent mechanisms (eg |
934 | * USB_CDC_NOTIFY_NETWORK_CONNECTION) should NOT implement this function. | 944 | * USB_CDC_NOTIFY_NETWORK_CONNECTION) should NOT implement this function. |
945 | * | ||
946 | * int (*ndo_get_phys_port_id)(struct net_device *dev, | ||
947 | * struct netdev_phys_port_id *ppid); | ||
948 | * Called to get ID of physical port of this device. If driver does | ||
949 | * not implement this, it is assumed that the hw is not able to have | ||
950 | * multiple net devices on single physical port. | ||
935 | */ | 951 | */ |
936 | struct net_device_ops { | 952 | struct net_device_ops { |
937 | int (*ndo_init)(struct net_device *dev); | 953 | int (*ndo_init)(struct net_device *dev); |
@@ -1060,6 +1076,8 @@ struct net_device_ops { | |||
1060 | struct nlmsghdr *nlh); | 1076 | struct nlmsghdr *nlh); |
1061 | int (*ndo_change_carrier)(struct net_device *dev, | 1077 | int (*ndo_change_carrier)(struct net_device *dev, |
1062 | bool new_carrier); | 1078 | bool new_carrier); |
1079 | int (*ndo_get_phys_port_id)(struct net_device *dev, | ||
1080 | struct netdev_phys_port_id *ppid); | ||
1063 | }; | 1081 | }; |
1064 | 1082 | ||
1065 | /* | 1083 | /* |
@@ -2315,6 +2333,8 @@ extern int dev_set_mac_address(struct net_device *, | |||
2315 | struct sockaddr *); | 2333 | struct sockaddr *); |
2316 | extern int dev_change_carrier(struct net_device *, | 2334 | extern int dev_change_carrier(struct net_device *, |
2317 | bool new_carrier); | 2335 | bool new_carrier); |
2336 | extern int dev_get_phys_port_id(struct net_device *dev, | ||
2337 | struct netdev_phys_port_id *ppid); | ||
2318 | extern int dev_hard_start_xmit(struct sk_buff *skb, | 2338 | extern int dev_hard_start_xmit(struct sk_buff *skb, |
2319 | struct net_device *dev, | 2339 | struct net_device *dev, |
2320 | struct netdev_queue *txq); | 2340 | struct netdev_queue *txq); |