mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 13:18:50 +08:00
net: complement wireless handling as ethernet
Change-Id: I13cc4cbfc1e305e17c0630f11a1173afe96e8a03 Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
parent
70fbc14103
commit
97bead5496
5 changed files with 8 additions and 3 deletions
|
@ -248,7 +248,8 @@ int arp_send(in_addr_t ipaddr)
|
|||
* Ethernet link layer protocol.
|
||||
*/
|
||||
|
||||
if (dev->d_lltype != NET_LL_ETHERNET)
|
||||
if (dev->d_lltype != NET_LL_ETHERNET &&
|
||||
dev->d_lltype != NET_LL_IEEE80211)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
|
|
|
@ -80,6 +80,7 @@ void neighbor_out(FAR struct net_driver_s *dev)
|
|||
{
|
||||
#ifdef CONFIG_NET_ETHERNET
|
||||
case NET_LL_ETHERNET:
|
||||
case NET_LL_IEEE80211:
|
||||
neighbor_ethernet_out(dev);
|
||||
break;
|
||||
#endif
|
||||
|
|
|
@ -976,7 +976,8 @@ static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd,
|
|||
if (dev)
|
||||
{
|
||||
#ifdef CONFIG_NET_ETHERNET
|
||||
if (dev->d_lltype == NET_LL_ETHERNET)
|
||||
if (dev->d_lltype == NET_LL_ETHERNET ||
|
||||
dev->d_lltype == NET_LL_IEEE80211)
|
||||
{
|
||||
memcpy(dev->d_mac.ether.ether_addr_octet,
|
||||
req->ifr_hwaddr.sa_data, IFHWADDRLEN);
|
||||
|
|
|
@ -121,6 +121,7 @@ int netdev_lladdrsize(FAR struct net_driver_s *dev)
|
|||
{
|
||||
#ifdef CONFIG_NET_ETHERNET
|
||||
case NET_LL_ETHERNET:
|
||||
case NET_LL_IEEE80211:
|
||||
{
|
||||
/* Size of the Ethernet MAC address */
|
||||
|
||||
|
|
|
@ -376,7 +376,8 @@ static int pkt_bind(FAR struct socket *psock, FAR const struct sockaddr *addr,
|
|||
|
||||
/* Only Ethernet is supported */
|
||||
|
||||
if (dev->d_lltype != NET_LL_ETHERNET)
|
||||
if (dev->d_lltype != NET_LL_ETHERNET &&
|
||||
dev->d_lltype != NET_LL_IEEE80211)
|
||||
{
|
||||
return -EAFNOSUPPORT;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue