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
@ -248,7 +248,8 @@ int arp_send(in_addr_t ipaddr)
|
|||||||
* Ethernet link layer protocol.
|
* 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;
|
return OK;
|
||||||
}
|
}
|
||||||
|
@ -80,6 +80,7 @@ void neighbor_out(FAR struct net_driver_s *dev)
|
|||||||
{
|
{
|
||||||
#ifdef CONFIG_NET_ETHERNET
|
#ifdef CONFIG_NET_ETHERNET
|
||||||
case NET_LL_ETHERNET:
|
case NET_LL_ETHERNET:
|
||||||
|
case NET_LL_IEEE80211:
|
||||||
neighbor_ethernet_out(dev);
|
neighbor_ethernet_out(dev);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
@ -976,7 +976,8 @@ static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd,
|
|||||||
if (dev)
|
if (dev)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_NET_ETHERNET
|
#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,
|
memcpy(dev->d_mac.ether.ether_addr_octet,
|
||||||
req->ifr_hwaddr.sa_data, IFHWADDRLEN);
|
req->ifr_hwaddr.sa_data, IFHWADDRLEN);
|
||||||
|
@ -121,6 +121,7 @@ int netdev_lladdrsize(FAR struct net_driver_s *dev)
|
|||||||
{
|
{
|
||||||
#ifdef CONFIG_NET_ETHERNET
|
#ifdef CONFIG_NET_ETHERNET
|
||||||
case NET_LL_ETHERNET:
|
case NET_LL_ETHERNET:
|
||||||
|
case NET_LL_IEEE80211:
|
||||||
{
|
{
|
||||||
/* Size of the Ethernet MAC address */
|
/* 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 */
|
/* 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;
|
return -EAFNOSUPPORT;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user