diff options
author | Yi Zou <yi.zou@intel.com> | 2012-12-06 01:23:43 -0500 |
---|---|---|
committer | Robert Love <robert.w.love@intel.com> | 2012-12-14 13:38:55 -0500 |
commit | 66524ec9d0aeaa8bc59077c7c5f78d09ec9eeb9d (patch) | |
tree | dbdae89a6732c5c6dd155c84fd48bf1166589723 /include/scsi/libfcoe.h | |
parent | 8106fb4790c33547a034db53f7658bccd3cfbf6b (diff) |
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 <yi.zou@intel.com>
Cc: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Tested-by: Marcus Dennis <marcusx.e.dennis@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Diffstat (limited to 'include/scsi/libfcoe.h')
-rw-r--r-- | include/scsi/libfcoe.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/scsi/libfcoe.h b/include/scsi/libfcoe.h index 52bba7138069..746bc587ae34 100644 --- a/include/scsi/libfcoe.h +++ b/include/scsi/libfcoe.h | |||
@@ -353,6 +353,18 @@ struct fcoe_port { | |||
353 | u8 data_src_addr[ETH_ALEN]; | 353 | u8 data_src_addr[ETH_ALEN]; |
354 | struct net_device * (*get_netdev)(const struct fc_lport *lport); | 354 | struct net_device * (*get_netdev)(const struct fc_lport *lport); |
355 | }; | 355 | }; |
356 | |||
357 | /** | ||
358 | * fcoe_get_netdev() - Return the net device associated with a local port | ||
359 | * @lport: The local port to get the net device from | ||
360 | */ | ||
361 | static inline struct net_device *fcoe_get_netdev(const struct fc_lport *lport) | ||
362 | { | ||
363 | struct fcoe_port *port = ((struct fcoe_port *)lport_priv(lport)); | ||
364 | |||
365 | return (port->get_netdev) ? port->get_netdev(lport) : NULL; | ||
366 | } | ||
367 | |||
356 | void fcoe_clean_pending_queue(struct fc_lport *); | 368 | void fcoe_clean_pending_queue(struct fc_lport *); |
357 | void fcoe_check_wait_queue(struct fc_lport *lport, struct sk_buff *skb); | 369 | void fcoe_check_wait_queue(struct fc_lport *lport, struct sk_buff *skb); |
358 | void fcoe_queue_timer(ulong lport); | 370 | void fcoe_queue_timer(ulong lport); |