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
+2 -2
View File
@@ -1461,7 +1461,7 @@ static void enc_rxdispatch(FAR struct enc_driver_s *priv)
else
#endif
#ifdef CONFIG_NET_ARP
if (BUF->type == htons(ETHTYPE_ARP))
if (BUF->type == HTONS(ETHTYPE_ARP))
{
ninfo("ARP packet received (%02x)\n", BUF->type);
NETDEV_RXARP(&priv->dev);
@@ -1481,7 +1481,7 @@ static void enc_rxdispatch(FAR struct enc_driver_s *priv)
#endif
{
nwarn("WARNING: Unsupported packet type dropped (%02x)\n",
htons(BUF->type));
HTONS(BUF->type));
NETDEV_RXDROPPED(&priv->dev);
}
}