]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/UefiBootManagerLib/BmBootDescription.c
MdeModulePKg/BDS: Build meaningful description for Wi-Fi boot option
[mirror_edk2.git] / MdeModulePkg / Library / UefiBootManagerLib / BmBootDescription.c
index 501a0cc25520ec4b569f937767110eef42395102..6e69a1540a4552e15c8cdf350222192b3d03dd43 100644 (file)
@@ -382,13 +382,13 @@ BmGetNetworkDescription (
 \r
   //\r
   // The PXE device path is like:\r
 \r
   //\r
   // The PXE device path is like:\r
-  //   ....../Mac(...)[/Vlan(...)]\r
-  //   ....../Mac(...)[/Vlan(...)]/IPv4(...)\r
-  //   ....../Mac(...)[/Vlan(...)]/IPv6(...)\r
+  //   ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]\r
+  //   ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv4(...)\r
+  //   ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv6(...)\r
   //\r
   // The HTTP device path is like:\r
   //\r
   // The HTTP device path is like:\r
-  //   ....../Mac(...)[/Vlan(...)]/IPv4(...)/Uri(...)\r
-  //   ....../Mac(...)[/Vlan(...)]/IPv6(...)/Uri(...)\r
+  //   ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv4(...)/Uri(...)\r
+  //   ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv6(...)/Uri(...)\r
   //\r
   while (!IsDevicePathEnd (DevicePath) &&\r
          ((DevicePathType (DevicePath) != MESSAGING_DEVICE_PATH) ||\r
   //\r
   while (!IsDevicePathEnd (DevicePath) &&\r
          ((DevicePathType (DevicePath) != MESSAGING_DEVICE_PATH) ||\r
@@ -404,6 +404,9 @@ BmGetNetworkDescription (
   Mac = (MAC_ADDR_DEVICE_PATH *) DevicePath;\r
   DevicePath = NextDevicePathNode (DevicePath);\r
 \r
   Mac = (MAC_ADDR_DEVICE_PATH *) DevicePath;\r
   DevicePath = NextDevicePathNode (DevicePath);\r
 \r
+  //\r
+  // Locate the optional Vlan node\r
+  //\r
   if ((DevicePathType (DevicePath) == MESSAGING_DEVICE_PATH) &&\r
       (DevicePathSubType (DevicePath) == MSG_VLAN_DP)\r
       ) {\r
   if ((DevicePathType (DevicePath) == MESSAGING_DEVICE_PATH) &&\r
       (DevicePathSubType (DevicePath) == MSG_VLAN_DP)\r
       ) {\r
@@ -413,6 +416,18 @@ BmGetNetworkDescription (
     Vlan = NULL;\r
   }\r
 \r
     Vlan = NULL;\r
   }\r
 \r
+  //\r
+  // Skip the optional Wi-Fi node\r
+  //\r
+  if ((DevicePathType (DevicePath) == MESSAGING_DEVICE_PATH) &&\r
+      (DevicePathSubType (DevicePath) == MSG_WIFI_DP)\r
+      ) {\r
+    DevicePath = NextDevicePathNode (DevicePath);\r
+  }\r
+\r
+  //\r
+  // Locate the IP node\r
+  //\r
   if ((DevicePathType (DevicePath) == MESSAGING_DEVICE_PATH) &&\r
       ((DevicePathSubType (DevicePath) == MSG_IPv4_DP) ||\r
        (DevicePathSubType (DevicePath) == MSG_IPv6_DP))\r
   if ((DevicePathType (DevicePath) == MESSAGING_DEVICE_PATH) &&\r
       ((DevicePathSubType (DevicePath) == MSG_IPv4_DP) ||\r
        (DevicePathSubType (DevicePath) == MSG_IPv6_DP))\r
@@ -423,6 +438,9 @@ BmGetNetworkDescription (
     Ip = NULL;\r
   }\r
 \r
     Ip = NULL;\r
   }\r
 \r
+  //\r
+  // Locate the URI node\r
+  //\r
   if ((DevicePathType (DevicePath) == MESSAGING_DEVICE_PATH) &&\r
       (DevicePathSubType (DevicePath) == MSG_URI_DP)\r
       ) {\r
   if ((DevicePathType (DevicePath) == MESSAGING_DEVICE_PATH) &&\r
       (DevicePathSubType (DevicePath) == MSG_URI_DP)\r
       ) {\r