|
@@ -1005,3 +1005,18 @@ struct net_driver efi_snp_driver __net_driver = {
|
1005
|
1005
|
.notify = efi_snp_notify,
|
1006
|
1006
|
.remove = efi_snp_remove,
|
1007
|
1007
|
};
|
|
1008
|
+
|
|
1009
|
+/**
|
|
1010
|
+ * Get most recently opened SNP device
|
|
1011
|
+ *
|
|
1012
|
+ * @ret snpdev Most recently opened SNP device, or NULL
|
|
1013
|
+ */
|
|
1014
|
+struct efi_snp_device * last_opened_snpdev ( void ) {
|
|
1015
|
+ struct net_device *netdev;
|
|
1016
|
+
|
|
1017
|
+ netdev = last_opened_netdev();
|
|
1018
|
+ if ( ! netdev )
|
|
1019
|
+ return NULL;
|
|
1020
|
+
|
|
1021
|
+ return efi_snp_demux ( netdev );
|
|
1022
|
+}
|