return NULL;
}
-static inline int is_valid_ether_addr(uint8_t *addr)
-{
- if (!(addr[0] | addr[1] | addr[2] | addr[3] | addr[4] | addr[5]))
- return 0;
- else
- return 1;
-}
-
static inline void
bnx2x_set_rx_mode(struct bnx2x_softc *sc)
{
sc->igu_sb_cnt, sc->igu_base_sb);
strncpy(sc->fw_ver, sc_resp.fw_ver, sizeof(sc->fw_ver));
- if (is_valid_ether_addr(sc_resp.resc.current_mac_addr))
- (void)rte_memcpy(sc->link_params.mac_addr,
- sc_resp.resc.current_mac_addr,
- ETH_ALEN);
+ if (is_valid_assigned_ether_addr(&sc_resp.resc.current_mac_addr))
+ ether_addr_copy(&sc_resp.resc.current_mac_addr,
+ (struct ether_addr *)sc->link_params.mac_addr);
+ else
+ eth_random_addr(sc->link_params.mac_addr);
return 0;
}
uint8_t num_vlan_filters;
uint8_t num_mc_filters;
uint8_t permanent_mac_addr[ETH_ALEN];
- uint8_t current_mac_addr[ETH_ALEN];
+ struct ether_addr current_mac_addr;
uint16_t pf_link_speed;
uint32_t pf_link_supported;
};