提交 9760822b 编写于 作者: T Tobias Klauser 提交者: Jeff Kirsher

e1000: Use is_broadcast_ether_addr/is_multicast_ether_addr helpers

Use the is_broadcast_ether_addr/is_multicast_ether_addr helper functions
from linux/etherdevice.h instead of open coding them.
Signed-off-by: NTobias Klauser <tklauser@distanz.ch>
Tested-by: NAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
上级 18cae6f7
...@@ -4877,10 +4877,10 @@ void e1000_tbi_adjust_stats(struct e1000_hw *hw, struct e1000_hw_stats *stats, ...@@ -4877,10 +4877,10 @@ void e1000_tbi_adjust_stats(struct e1000_hw *hw, struct e1000_hw_stats *stats,
* since the test for a multicast frame will test positive on * since the test for a multicast frame will test positive on
* a broadcast frame. * a broadcast frame.
*/ */
if ((mac_addr[0] == (u8) 0xff) && (mac_addr[1] == (u8) 0xff)) if (is_broadcast_ether_addr(mac_addr))
/* Broadcast packet */ /* Broadcast packet */
stats->bprc++; stats->bprc++;
else if (*mac_addr & 0x01) else if (is_multicast_ether_addr(mac_addr))
/* Multicast packet */ /* Multicast packet */
stats->mprc++; stats->mprc++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册