[riot-notifications] [RIOT-OS/RIOT] drivers/w5100: Fixed netdev_driver_t::recv() API (#10412)

José Alamos notifications at github.com
Wed Jan 9 16:49:42 CET 2019

jia200x requested changes on this pull request.

         /* read the actual data into the given buffer if wanted */
         if (in_buf != NULL) {
+            /* Is provided buffer big enough? */
+            if (len > max_len) {
+                spi_release(dev->p.spi);
+                return -ENOBUFS;

>From docs:
If called with buf != NULL and len is smaller than the received packet:
    The received packet is dropped
    The content in buf becomes invalid. (The driver may use the memory to implement the dropping - or may not change it.)
    -ENOBUFS is returned

AFAIS, the packet won't be dropped if `len > max_len`. The frame is not removed from the RX buffer

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190109/f465a826/attachment.html>

More information about the notifications mailing list