From e43ed7d47d9b2c37ccff6dc75d6bfe4c8a55ac86 Mon Sep 17 00:00:00 2001 From: Mimmo La Fauci Date: Thu, 21 Mar 2013 09:24:07 +0100 Subject: Added API to set static IP and DNS server --- firmwares/wifishield/wifiHD/src/cmd_wl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'firmwares/wifishield/wifiHD/src/cmd_wl.c') diff --git a/firmwares/wifishield/wifiHD/src/cmd_wl.c b/firmwares/wifishield/wifiHD/src/cmd_wl.c index 3356931..17c476a 100644 --- a/firmwares/wifishield/wifiHD/src/cmd_wl.c +++ b/firmwares/wifishield/wifiHD/src/cmd_wl.c @@ -182,7 +182,8 @@ cmd_ibss(int argc, char* argv[], void* ctx) cmd_state_t cmd_set_ip(int argc, char* argv[], void* ctx) { - struct net_cfg *ncfg = ctx; + struct ctx_server *hs = ctx; + struct net_cfg *ncfg = &(hs->net_cfg); struct ip_addr lwip_addr; struct netif *nif = ncfg->netif; @@ -197,8 +198,10 @@ cmd_set_ip(int argc, char* argv[], void* ctx) printk(" or : ip none (to enable DHCP)\n"); return CMD_DONE; } + /* IP address */ lwip_addr = str2ip(argv[1]); + INFO_SPI("nif:%p lwip_addr=0x%x\n", nif, lwip_addr.addr); netif_set_ipaddr(nif, &lwip_addr); /* Netmask */ lwip_addr = str2ip(argv[2]); -- cgit v1.2.3-18-g5258