mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
net: use HTONS, NTOHS, HTONL, NTOHL macro in kernel code
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
@@ -532,7 +532,7 @@ static void cdcecm_receive(FAR struct cdcecm_driver_s *self)
|
||||
else
|
||||
#endif
|
||||
#ifdef CONFIG_NET_ARP
|
||||
if (BUF->type == htons(ETHTYPE_ARP))
|
||||
if (BUF->type == HTONS(ETHTYPE_ARP))
|
||||
{
|
||||
/* Dispatch ARP packet to the network layer */
|
||||
|
||||
|
||||
@@ -939,7 +939,7 @@ static void rndis_rxdispatch(FAR void *arg)
|
||||
else
|
||||
#endif
|
||||
#ifdef CONFIG_NET_ARP
|
||||
if (hdr->type == htons(ETHTYPE_ARP))
|
||||
if (hdr->type == HTONS(ETHTYPE_ARP))
|
||||
{
|
||||
NETDEV_RXARP(&priv->netdev);
|
||||
|
||||
@@ -954,7 +954,7 @@ static void rndis_rxdispatch(FAR void *arg)
|
||||
#endif
|
||||
{
|
||||
uerr("ERROR: Unsupported packet type dropped (%02x)\n",
|
||||
htons(hdr->type));
|
||||
HTONS(hdr->type));
|
||||
NETDEV_RXDROPPED(&priv->netdev);
|
||||
priv->netdev.d_len = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user