aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/enic
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/enic')
-rw-r--r--drivers/net/enic/enic_main.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 77a7f87d498e..9aab85366d21 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -1087,10 +1087,7 @@ static int enic_set_port_profile(struct enic *enic, u8 *mac)
1087{ 1087{
1088 struct vic_provinfo *vp; 1088 struct vic_provinfo *vp;
1089 u8 oui[3] = VIC_PROVINFO_CISCO_OUI; 1089 u8 oui[3] = VIC_PROVINFO_CISCO_OUI;
1090 u8 *uuid;
1091 char uuid_str[38]; 1090 char uuid_str[38];
1092 static char *uuid_fmt = "%02X%02X%02X%02X-%02X%02X-%02X%02X-"
1093 "%02X%02X-%02X%02X%02X%02X%0X%02X";
1094 int err; 1091 int err;
1095 1092
1096 err = enic_vnic_dev_deinit(enic); 1093 err = enic_vnic_dev_deinit(enic);
@@ -1121,24 +1118,14 @@ static int enic_set_port_profile(struct enic *enic, u8 *mac)
1121 ETH_ALEN, mac); 1118 ETH_ALEN, mac);
1122 1119
1123 if (enic->pp.set & ENIC_SET_INSTANCE) { 1120 if (enic->pp.set & ENIC_SET_INSTANCE) {
1124 uuid = enic->pp.instance_uuid; 1121 sprintf(uuid_str, "%pUB", enic->pp.instance_uuid);
1125 sprintf(uuid_str, uuid_fmt,
1126 uuid[0], uuid[1], uuid[2], uuid[3],
1127 uuid[4], uuid[5], uuid[6], uuid[7],
1128 uuid[8], uuid[9], uuid[10], uuid[11],
1129 uuid[12], uuid[13], uuid[14], uuid[15]);
1130 vic_provinfo_add_tlv(vp, 1122 vic_provinfo_add_tlv(vp,
1131 VIC_LINUX_PROV_TLV_CLIENT_UUID_STR, 1123 VIC_LINUX_PROV_TLV_CLIENT_UUID_STR,
1132 sizeof(uuid_str), uuid_str); 1124 sizeof(uuid_str), uuid_str);
1133 } 1125 }
1134 1126
1135 if (enic->pp.set & ENIC_SET_HOST) { 1127 if (enic->pp.set & ENIC_SET_HOST) {
1136 uuid = enic->pp.host_uuid; 1128 sprintf(uuid_str, "%pUB", enic->pp.host_uuid);
1137 sprintf(uuid_str, uuid_fmt,
1138 uuid[0], uuid[1], uuid[2], uuid[3],
1139 uuid[4], uuid[5], uuid[6], uuid[7],
1140 uuid[8], uuid[9], uuid[10], uuid[11],
1141 uuid[12], uuid[13], uuid[14], uuid[15]);
1142 vic_provinfo_add_tlv(vp, 1129 vic_provinfo_add_tlv(vp,
1143 VIC_LINUX_PROV_TLV_HOST_UUID_STR, 1130 VIC_LINUX_PROV_TLV_HOST_UUID_STR,
1144 sizeof(uuid_str), uuid_str); 1131 sizeof(uuid_str), uuid_str);