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. */
if(!RX_DESC_VALID(desc_hdr)){
{
/*
dev_info(nic->dev,"%s: weird, invalid RX descriptor (%x, head %x)",__func__,desc_hdr,(unsignedint)rx_head-1);
* invalid descriptor? Weird, the RX_ADDR seems
minic_new_rx_buffer(nic);
* to be saying something different. Ignore the packet
// fixme: we need to pass the phase value somehow for RX timestamps. For the time being, we pass the R-F counter difference on the MSB of UTC (instead of sign value), so the PTP can detect the valid counter
hwts->hwtstamp.tv.sec=(s32)utc&0x7fffffff;
EXPLODE_WR_TIMESTAMP(rx_oob,counter_r,counter_f);
minic_ppsg_read_time(nic,&counter_ppsg,&utc);
if(counter_r>(3*REFCLK_FREQ/4)
&&counter_ppsg<REFCLK_FREQ/4)
utc--;
cntr_diff=(counter_r&F_COUNTER_MASK)-counter_f;
/* fixme: we need to pass the phase value somehow
* for RX timestamps. For the time being, we pass
* the R-F counter difference on the MSB of UTC
* (instead of sign value), so the PTP can detect
* the valid counter
*/
if(cntr_diff==1||cntr_diff==(-F_COUNTER_MASK))
hwts->hwtstamp.tv.sec=(s32)utc&0x7fffffff;
hwts->hwtstamp.tv.sec|=0x80000000;// indicated that the rising edge counter is one tick ahead