pkarashchenko commented on code in PR #7817:
URL: https://github.com/apache/nuttx/pull/7817#discussion_r1043133654


##########
arch/risc-v/src/esp32c3/esp32c3_wlan.c:
##########
@@ -691,27 +486,9 @@ static void wlan_rxpoll(void *arg)
       pkt_input(&priv->dev);
 #endif
 
-      /* Check if the packet is a valid size for the network
-       * buffer configuration (this should not happen)
-       */
-
-      if (dev->d_len > WLAN_BUF_SIZE)
-        {
-          nwarn("WARNING: DROPPED Too big: %d\n", dev->d_len);
-
-          /* Free dropped packet buffer */
-
-          if (dev->d_buf)
-            {
-              wlan_free_buffer(priv, dev->d_buf);
-              dev->d_buf = NULL;
-              dev->d_len = 0;
-            }
-
-          continue;
-        }
-
-      eth_hdr = (struct eth_hdr_s *)dev->d_buf;
+      eth_hdr = (struct eth_hdr_s *)
+        &dev->d_iob->io_data[CONFIG_NET_LL_GUARDSIZE -
+                             NET_LL_HDRLEN(dev)];

Review Comment:
   ```suggestion
         eth_hdr = ETHBUF;
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to