Browse Source

change: 调整station模式下的默认hostname

Wendal Chen 3 years ago
parent
commit
bae012eeae
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/network/lwip2.1.3/netif/ethernetif.c

+ 1 - 1
src/network/lwip2.1.3/netif/ethernetif.c

@@ -374,7 +374,7 @@ ethernetif_init(struct netif *netif)
     u8* mac_addr = wpa_supplicant_get_mac();
     u8* mac_addr = wpa_supplicant_get_mac();
 #if LWIP_NETIF_HOSTNAME
 #if LWIP_NETIF_HOSTNAME
 	/* Initialize interface hostname */
 	/* Initialize interface hostname */
-    sprintf(host_name, "WinnerMicro_%02X%02X", mac_addr[4], mac_addr[5]);
+    sprintf(host_name, "LOS_%02X%02X%02X%02X%02X%02X", mac_addr[0], mac_addr[1], mac_addr[2], mac_addr[3], mac_addr[4], mac_addr[5]);
 	netif->hostname = host_name;
 	netif->hostname = host_name;
 #endif /* LWIP_NETIF_HOSTNAME */
 #endif /* LWIP_NETIF_HOSTNAME */