Lines Matching refs:mac_addr
123 struct fbnic_mac_addr *mac_addr = &fbd->mac_addr[i]; in fbnic_uc_unsync() local
125 if (!ether_addr_equal(mac_addr->value.addr8, addr)) in fbnic_uc_unsync()
128 ret = __fbnic_uc_unsync(mac_addr); in fbnic_uc_unsync()
164 struct fbnic_mac_addr *mac_addr = &fbd->mac_addr[i]; in fbnic_mc_unsync() local
166 if (!ether_addr_equal(mac_addr->value.addr8, addr)) in fbnic_mc_unsync()
169 ret = __fbnic_mc_unsync(mac_addr); in fbnic_mc_unsync()
180 struct fbnic_mac_addr *mac_addr; in __fbnic_set_rx_mode() local
184 mac_addr = &fbd->mac_addr[FBNIC_RPC_TCAM_MACDA_HOST_ADDR_IDX]; in __fbnic_set_rx_mode()
185 if (!ether_addr_equal(mac_addr->value.addr8, netdev->dev_addr) || in __fbnic_set_rx_mode()
186 mac_addr->state != FBNIC_TCAM_S_VALID) { in __fbnic_set_rx_mode()
187 ether_addr_copy(mac_addr->value.addr8, netdev->dev_addr); in __fbnic_set_rx_mode()
188 mac_addr->state = FBNIC_TCAM_S_UPDATE; in __fbnic_set_rx_mode()
189 set_bit(FBNIC_MAC_ADDR_T_UNICAST, mac_addr->act_tcam); in __fbnic_set_rx_mode()
193 mac_addr = &fbd->mac_addr[FBNIC_RPC_TCAM_MACDA_BROADCAST_IDX]; in __fbnic_set_rx_mode()
195 if (!is_broadcast_ether_addr(mac_addr->value.addr8) || in __fbnic_set_rx_mode()
196 mac_addr->state != FBNIC_TCAM_S_VALID) { in __fbnic_set_rx_mode()
197 eth_broadcast_addr(mac_addr->value.addr8); in __fbnic_set_rx_mode()
198 mac_addr->state = FBNIC_TCAM_S_ADD; in __fbnic_set_rx_mode()
200 set_bit(FBNIC_MAC_ADDR_T_BROADCAST, mac_addr->act_tcam); in __fbnic_set_rx_mode()
201 } else if (mac_addr->state == FBNIC_TCAM_S_VALID) { in __fbnic_set_rx_mode()
202 __fbnic_xc_unsync(mac_addr, FBNIC_MAC_ADDR_T_BROADCAST); in __fbnic_set_rx_mode()
217 mac_addr = &fbd->mac_addr[FBNIC_RPC_TCAM_MACDA_PROMISC_IDX]; in __fbnic_set_rx_mode()
219 if (!is_zero_ether_addr(mac_addr->value.addr8) || in __fbnic_set_rx_mode()
220 mac_addr->state != FBNIC_TCAM_S_VALID) { in __fbnic_set_rx_mode()
221 eth_zero_addr(mac_addr->value.addr8); in __fbnic_set_rx_mode()
222 eth_broadcast_addr(mac_addr->mask.addr8); in __fbnic_set_rx_mode()
224 mac_addr->act_tcam); in __fbnic_set_rx_mode()
226 mac_addr->act_tcam); in __fbnic_set_rx_mode()
227 mac_addr->state = FBNIC_TCAM_S_ADD; in __fbnic_set_rx_mode()
237 if (!is_multicast_ether_addr(mac_addr->value.addr8) || in __fbnic_set_rx_mode()
238 mac_addr->state != FBNIC_TCAM_S_VALID) { in __fbnic_set_rx_mode()
239 eth_zero_addr(mac_addr->value.addr8); in __fbnic_set_rx_mode()
240 eth_broadcast_addr(mac_addr->mask.addr8); in __fbnic_set_rx_mode()
241 mac_addr->value.addr8[0] ^= 1; in __fbnic_set_rx_mode()
242 mac_addr->mask.addr8[0] ^= 1; in __fbnic_set_rx_mode()
244 mac_addr->act_tcam); in __fbnic_set_rx_mode()
246 mac_addr->act_tcam); in __fbnic_set_rx_mode()
247 mac_addr->state = FBNIC_TCAM_S_ADD; in __fbnic_set_rx_mode()
249 } else if (mac_addr->state == FBNIC_TCAM_S_VALID) { in __fbnic_set_rx_mode()
250 if (test_bit(FBNIC_MAC_ADDR_T_BMC, mac_addr->act_tcam)) { in __fbnic_set_rx_mode()
252 mac_addr->act_tcam); in __fbnic_set_rx_mode()
254 mac_addr->act_tcam); in __fbnic_set_rx_mode()
256 mac_addr->state = FBNIC_TCAM_S_DELETE; in __fbnic_set_rx_mode()
298 for (idx = ARRAY_SIZE(fbd->mac_addr); idx--;) { in fbnic_clear_rx_mode()
299 struct fbnic_mac_addr *mac_addr = &fbd->mac_addr[idx]; in fbnic_clear_rx_mode() local
301 if (mac_addr->state != FBNIC_TCAM_S_VALID) in fbnic_clear_rx_mode()
304 bitmap_clear(mac_addr->act_tcam, in fbnic_clear_rx_mode()
308 if (bitmap_empty(mac_addr->act_tcam, in fbnic_clear_rx_mode()
310 mac_addr->state = FBNIC_TCAM_S_DELETE; in fbnic_clear_rx_mode()