if(!RX_DESC_VALID(desc_hdr))/* invalid descriptor? Weird, the RX_ADDR seems to be saying something different. Ignore the packet and purge the RX buffer. */
{
minic_new_rx_buffer();
return0;
}
{
mprintf("invalid descriptor\n");
minic_new_rx_buffer();
return0;
}
payload_size=RX_DESC_SIZE(desc_hdr);
num_words=((payload_size+3)>>2)+1;
// mprintf("Payload: %d\n", payload_size);
/* valid packet */
if(!RX_DESC_ERROR(desc_hdr))
{
if(RX_DESC_HAS_OOB(desc_hdr)&&hwts!=NULL)
{
uint32_tcounter_r,counter_f,counter_ppsg,utc;
intcntr_diff;
uint16_tdhdr;
{
payload_size-=RX_OOB_SIZE;
if(RX_DESC_HAS_OOB(desc_hdr)&&hwts!=NULL)
{
uint32_tcounter_r,counter_f,counter_ppsg,utc;
intcntr_diff;
uint16_tdhdr;
memcpy(&raw_ts,(uint8_t*)minic.rx_head+payload_size+6,4);/* fixme: ugly way of doing unaligned read */