From 66524ec9d0aeaa8bc59077c7c5f78d09ec9eeb9d Mon Sep 17 00:00:00 2001 From: Yi Zou Date: Thu, 6 Dec 2012 06:23:43 +0000 Subject: fcoe: add support to the get_netdev() for fcoe_interface Adds support to fcoe_port's newly added get_netdev fucntion pointer. Signed-off-by: Yi Zou Cc: Bhanu Prakash Gollapudi Tested-by: Marcus Dennis Signed-off-by: Robert Love --- include/scsi/libfcoe.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/scsi') diff --git a/include/scsi/libfcoe.h b/include/scsi/libfcoe.h index 52bba71..746bc58 100644 --- a/include/scsi/libfcoe.h +++ b/include/scsi/libfcoe.h @@ -353,6 +353,18 @@ struct fcoe_port { u8 data_src_addr[ETH_ALEN]; struct net_device * (*get_netdev)(const struct fc_lport *lport); }; + +/** + * fcoe_get_netdev() - Return the net device associated with a local port + * @lport: The local port to get the net device from + */ +static inline struct net_device *fcoe_get_netdev(const struct fc_lport *lport) +{ + struct fcoe_port *port = ((struct fcoe_port *)lport_priv(lport)); + + return (port->get_netdev) ? port->get_netdev(lport) : NULL; +} + void fcoe_clean_pending_queue(struct fc_lport *); void fcoe_check_wait_queue(struct fc_lport *lport, struct sk_buff *skb); void fcoe_queue_timer(ulong lport); -- cgit v1.1