<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 28, 2016 at 3:12 AM, Chris Johns <span dir="ltr"><<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 27/06/2016 22:29, Deval Shah wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello all,<br>
<br>
I am trying to add USB-Ethernet driver for Raspberry Pi. I added<br>
required files to libbsd.py and tried to compile.<br>
<br>
I am getting the following error which is very strange because the<br>
symbols in this error are already defined in net/if_var.h and the file<br>
is included in usb_ethernet.c.<br>
</blockquote>
<br></span>
$ grep -r if_inc_counter freebsd/sys/net/if_var.h<br>
$<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
../../freebsd/sys/dev/usb/net/usb_ethernet.c: In function 'uether_rxmbuf':<br>
../../freebsd/sys/dev/usb/net/usb_ethernet.c:585:22: error:<br>
'IFCOUNTER_IPACKETS' undeclared (first use in this function)<br>
   if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1);<br>
</blockquote>
<br></span>
This is something added to FreeBSD after our snapshot. The Cadence net driver for the Zynq has similar code which Sebastian has amended. Check in sys/dev/cadence/if_cgem.c.<br>
<br>
It might pay for us to add these to an RTEMS header to make porting simpler.<br>
<br></blockquote><div>Can't we update our sys/net/if.c and sys/net/if_var.h files accourding to new FreeBSD ?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Please make sure your libbsd is up to date. I added support for device sysctl's on the master branch yesterday so that code should work.<span class="HOEnZb"><font color="#888888"><br>
<br>
Chris<br>
</font></span></blockquote></div><br></div></div>