question about drivers/net/ethernet/renesas/ravb_main.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

In the function ravb_hwtstamp_get in ravb_main.c, the following code looks
suspicious:

        if (priv->tstamp_rx_ctrl & RAVB_RXTSTAMP_TYPE_V2_L2_EVENT)
                config.rx_filter = HWTSTAMP_FILTER_PTP_V2_L2_EVENT;
        else if (priv->tstamp_rx_ctrl & RAVB_RXTSTAMP_TYPE_ALL)
                config.rx_filter = HWTSTAMP_FILTER_ALL;
        else
                config.rx_filter = HWTSTAMP_FILTER_NONE;

According to drivers/net/ethernet/renesas/ravb.h,
RAVB_RXTSTAMP_TYPE_V2_L2_EVENT is 0x00000002 and RAVB_RXTSTAMP_TYPE_ALL is
0x00000006.  Therefore, if the test on RAVB_RXTSTAMP_TYPE_ALL should be
true, it will never be reached.  How should the code be changed?

thanks,
julia



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux