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

Marian Buschsieweke notifications at github.com
Tue Jan 22 13:03:29 CET 2019


maribu commented on this pull request.



>  
-            /* if RX buffer now empty, clear RECV interrupt flag */
-            if ((num - psize) == 0) {
-                wreg(dev, S0_IR, IR_RECV);
-            }
+        /* if frame received OR drop requested, remove frame from RX buffer */
+        if ((in_buf != NULL) || (len > 0)) {

This is strange. The original code did advance the read pointer address after reading the frame, which is now done in `drop()`. When `||` is changed to `&&` above, the read pointer address would no longer be advanced after reading the frame. I will try to investigate this issue

https://github.com/RIOT-OS/RIOT/blob/af627606f08fd9db74b7f8b927e6b84f43fbe562/drivers/w5100/w5100.c#L254-L273

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/10412#discussion_r249751890
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190122/29158045/attachment.html>


More information about the notifications mailing list