net: use HTONS, NTOHS, HTONL, NTOHL macro in kernel code

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
Petro Karashchenko
2022-01-18 09:38:00 +02:00
parent 5b13797cce
commit 9551de7115
81 changed files with 236 additions and 237 deletions
+1 -1
View File
@@ -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 */
+2 -2
View File
@@ -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;
}