When replacing compare_ether_addr() with
ether_addr_equal() result check condition
isn't revised:
- compare_ether_addr() returns zero in case
of both MAC addreses are same and non-zero
overwise. Result type is unsigned int.
- ether_addr_equal() returns non-zero (1, true)
in case of both MAC addresses are same and
zero (0, false) overwise. Result type is bool (0,1).
Thus igb_del_mac_filter() can't delete MAC address
from filter because it looks for address not equal
to being deleted.
Signed-off-by: Serhii Popovych <[email protected]>
---
src/igb_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/igb_main.c b/src/igb_main.c
index 2dff0f4..13cf6b6 100644
--- a/src/igb_main.c
+++ b/src/igb_main.c
@@ -9447,7 +9447,7 @@ int igb_del_mac_filter(struct igb_adapter *adapter, u8
*addr, u16 queue)
if (is_zero_ether_addr(addr))
return 0;
for (i = 0; i < hw->mac.rar_entry_count; i++) {
- if (!ether_addr_equal(addr, adapter->mac_table[i].addr) &&
+ if (ether_addr_equal(addr, adapter->mac_table[i].addr) &&
adapter->mac_table[i].queue == queue) {
adapter->mac_table[i].state = IGB_MAC_STATE_MODIFIED;
memset(adapter->mac_table[i].addr, 0, ETH_ALEN);
--
1.8.3.1
------------------------------------------------------------------------------
_______________________________________________
E1000-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit
http://communities.intel.com/community/wired