]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
MdePkg: Add WiFi device path definition and its node/text conversion
[mirror_edk2.git] / MdePkg / Library / UefiDevicePathLib / DevicePathToText.c
index a4a665b31622b87e8363e041af3d4d6316663721..68b937293eb8aad749741dcb92768fe9aabc912b 100644 (file)
@@ -1561,6 +1561,33 @@ DevPathToTextBluetooth (
     );\r
 }\r
 \r
+/**\r
+  Converts a Wi-Fi device path structure to its string representative.\r
+\r
+  @param Str             The string representative of input device.\r
+  @param DevPath         The input device path structure.\r
+  @param DisplayOnly     If DisplayOnly is TRUE, then the shorter text representation\r
+                         of the display node is used, where applicable. If DisplayOnly\r
+                         is FALSE, then the longer text representation of the display node\r
+                         is used.\r
+  @param AllowShortcuts  If AllowShortcuts is TRUE, then the shortcut forms of text\r
+                         representation for a device node can be used, where applicable.\r
+\r
+**/\r
+VOID\r
+DevPathToTextWiFi (\r
+  IN OUT POOL_PRINT  *Str,\r
+  IN VOID            *DevPath,\r
+  IN BOOLEAN         DisplayOnly,\r
+  IN BOOLEAN         AllowShortcuts\r
+  )\r
+{\r
+  WIFI_DEVICE_PATH      *WiFi;\r
+\r
+  WiFi = DevPath;\r
+  UefiDevicePathLibCatPrint (Str, L"WiFi(%a)", WiFi->SSId);\r
+}\r
+\r
 /**\r
   Converts a URI device path structure to its string representative.\r
 \r
@@ -2021,6 +2048,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED const DEVICE_PATH_TO_TEXT_TABLE mUefiDevicePathLib
   {MESSAGING_DEVICE_PATH, MSG_VLAN_DP,                      DevPathToTextVlan           },\r
   {MESSAGING_DEVICE_PATH, MSG_URI_DP,                       DevPathToTextUri            },\r
   {MESSAGING_DEVICE_PATH, MSG_BLUETOOTH_DP,                 DevPathToTextBluetooth      },\r
+  {MESSAGING_DEVICE_PATH, MSG_WIFI_DP,                      DevPathToTextWiFi           },\r
   {MEDIA_DEVICE_PATH,     MEDIA_HARDDRIVE_DP,               DevPathToTextHardDrive      },\r
   {MEDIA_DEVICE_PATH,     MEDIA_CDROM_DP,                   DevPathToTextCDROM          },\r
   {MEDIA_DEVICE_PATH,     MEDIA_VENDOR_DP,                  DevPathToTextVendor         },\r