You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2020/01/11 11:04:29 UTC
[incubator-nuttx] branch pr75 updated: net: complement wireless
handling as ethernet
This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch pr75
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/pr75 by this push:
new 97bead5 net: complement wireless handling as ethernet
97bead5 is described below
commit 97bead5496614029e612b553daaab5856592df49
Author: chao.an <an...@xiaomi.com>
AuthorDate: Mon Jan 6 19:35:50 2020 +0800
net: complement wireless handling as ethernet
Change-Id: I13cc4cbfc1e305e17c0630f11a1173afe96e8a03
Signed-off-by: chao.an <an...@xiaomi.com>
---
net/arp/arp_send.c | 3 ++-
net/neighbor/neighbor_out.c | 1 +
net/netdev/netdev_ioctl.c | 3 ++-
net/netdev/netdev_lladdrsize.c | 1 +
net/pkt/pkt_sockif.c | 3 ++-
5 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/net/arp/arp_send.c b/net/arp/arp_send.c
index 7339c27..f19d28b 100644
--- a/net/arp/arp_send.c
+++ b/net/arp/arp_send.c
@@ -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;
}
diff --git a/net/neighbor/neighbor_out.c b/net/neighbor/neighbor_out.c
index 5ee5002..8b52e4f 100644
--- a/net/neighbor/neighbor_out.c
+++ b/net/neighbor/neighbor_out.c
@@ -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
diff --git a/net/netdev/netdev_ioctl.c b/net/netdev/netdev_ioctl.c
index e8720af..3218251 100644
--- a/net/netdev/netdev_ioctl.c
+++ b/net/netdev/netdev_ioctl.c
@@ -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);
diff --git a/net/netdev/netdev_lladdrsize.c b/net/netdev/netdev_lladdrsize.c
index a3abc36..d07cffc 100644
--- a/net/netdev/netdev_lladdrsize.c
+++ b/net/netdev/netdev_lladdrsize.c
@@ -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 */
diff --git a/net/pkt/pkt_sockif.c b/net/pkt/pkt_sockif.c
index def5bc4..a6429c3 100644
--- a/net/pkt/pkt_sockif.c
+++ b/net/pkt/pkt_sockif.c
@@ -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;
}