Signed-off-by: Michael Brown <mcb30@ipxe.org>
extern int efi_snp_hii_install ( struct efi_snp_device *snpdev );
extern void efi_snp_hii_uninstall ( struct efi_snp_device *snpdev );
+extern struct efi_snp_device * last_opened_snpdev ( void );
#endif /* _IPXE_EFI_SNP_H */
.notify = efi_snp_notify,
.remove = efi_snp_remove,
};
+
+/**
+ * Get most recently opened SNP device
+ *
+ * @ret snpdev Most recently opened SNP device, or NULL
+ */
+struct efi_snp_device * last_opened_snpdev ( void ) {
+ struct net_device *netdev;
+
+ netdev = last_opened_netdev();
+ if ( ! netdev )
+ return NULL;
+
+ return efi_snp_demux ( netdev );
+}