提交 6ccf7a57 编写于 作者: J Jacob Keller 提交者: Jeff Kirsher

ixgbe: use ETQF filter name instead of magic number

This patch removes a magic number that was used for the ETQF used for
filtering L2 ptp packets and replaces it with the supplied define that
previously existed. The intent is to clarify that this filter is already
set aside for L2 1588 work.
Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
Tested-by: NPhil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
上级 21cc57fb
...@@ -704,14 +704,14 @@ int ixgbe_ptp_hwtstamp_ioctl(struct ixgbe_adapter *adapter, ...@@ -704,14 +704,14 @@ int ixgbe_ptp_hwtstamp_ioctl(struct ixgbe_adapter *adapter,
/* Store filter value for later use */ /* Store filter value for later use */
adapter->rx_hwtstamp_filter = config.rx_filter; adapter->rx_hwtstamp_filter = config.rx_filter;
/* define ethertype filter for timestamped packets */ /* define ethertype filter for timestamping L2 packets */
if (is_l2) if (is_l2)
IXGBE_WRITE_REG(hw, IXGBE_ETQF(3), IXGBE_WRITE_REG(hw, IXGBE_ETQF(IXGBE_ETQF_FILTER_1588),
(IXGBE_ETQF_FILTER_EN | /* enable filter */ (IXGBE_ETQF_FILTER_EN | /* enable filter */
IXGBE_ETQF_1588 | /* enable timestamping */ IXGBE_ETQF_1588 | /* enable timestamping */
ETH_P_1588)); /* 1588 eth protocol type */ ETH_P_1588)); /* 1588 eth protocol type */
else else
IXGBE_WRITE_REG(hw, IXGBE_ETQF(3), 0); IXGBE_WRITE_REG(hw, IXGBE_ETQF(IXGBE_ETQF_FILTER_1588), 0);
#define PTP_PORT 319 #define PTP_PORT 319
/* L4 Queue Filter[3]: filter by destination port and protocol */ /* L4 Queue Filter[3]: filter by destination port and protocol */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册