NSH wireless setup: Move call to nsh_associate(). It should be possible to associate with an AP when DHCPC is disabled.
This commit is contained in:
parent
8029b81548
commit
5fbf2fd8d1
@ -309,7 +309,7 @@ static void nsh_netinit_configure(void)
|
|||||||
#ifdef CONFIG_NET_IPv4
|
#ifdef CONFIG_NET_IPv4
|
||||||
/* Set up our host address */
|
/* Set up our host address */
|
||||||
|
|
||||||
#if !defined(CONFIG_NSH_DHCPC)
|
#ifndef CONFIG_NSH_DHCPC
|
||||||
addr.s_addr = HTONL(CONFIG_NSH_IPADDR);
|
addr.s_addr = HTONL(CONFIG_NSH_IPADDR);
|
||||||
#else
|
#else
|
||||||
addr.s_addr = 0;
|
addr.s_addr = 0;
|
||||||
@ -353,22 +353,22 @@ static void nsh_netinit_configure(void)
|
|||||||
#endif /* CONFIG_NET_ICMPv6_AUTOCONF */
|
#endif /* CONFIG_NET_ICMPv6_AUTOCONF */
|
||||||
#endif /* CONFIG_NET_IPv6 */
|
#endif /* CONFIG_NET_IPv6 */
|
||||||
|
|
||||||
#if defined(CONFIG_NSH_DNS)
|
#ifdef CONFIG_NSH_DNS
|
||||||
addr.s_addr = HTONL(CONFIG_NSH_DNSIPADDR);
|
addr.s_addr = HTONL(CONFIG_NSH_DNSIPADDR);
|
||||||
netlib_set_ipv4dnsaddr(&addr);
|
netlib_set_ipv4dnsaddr(&addr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_NSH_DHCPC)
|
|
||||||
/* Get the MAC address of the NIC */
|
|
||||||
|
|
||||||
netlib_getmacaddr(NET_DEVNAME, mac);
|
|
||||||
|
|
||||||
#ifdef CONFIG_WIRELESS_WAPI
|
#ifdef CONFIG_WIRELESS_WAPI
|
||||||
/* Associate the wlan */
|
/* Associate the wlan with an access point. */
|
||||||
|
|
||||||
nsh_associate(NET_DEVNAME);
|
nsh_associate(NET_DEVNAME);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_NSH_DHCPC
|
||||||
|
/* Get the MAC address of the NIC */
|
||||||
|
|
||||||
|
netlib_getmacaddr(NET_DEVNAME, mac);
|
||||||
|
|
||||||
/* Set up the DHCPC modules */
|
/* Set up the DHCPC modules */
|
||||||
|
|
||||||
handle = dhcpc_open(&mac, IFHWADDRLEN);
|
handle = dhcpc_open(&mac, IFHWADDRLEN);
|
||||||
|
Loading…
Reference in New Issue
Block a user