1 /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
2 * Copyright(c) 2018-2019 Pensando Systems, Inc. All rights reserved.
7 #include "ionic_mac_api.h"
10 ionic_init_mac(struct ionic_hw *hw)
19 ionic_set_mac_type(hw);
21 switch (hw->mac.type) {
33 ionic_set_mac_type(struct ionic_hw *hw)
39 if (hw->vendor_id != IONIC_PENSANDO_VENDOR_ID) {
40 IONIC_PRINT(ERR, "Unsupported vendor id: %" PRIx32 "",
45 switch (hw->device_id) {
46 case IONIC_DEV_ID_ETH_PF:
47 case IONIC_DEV_ID_ETH_VF:
48 case IONIC_DEV_ID_ETH_MGMT:
49 hw->mac.type = IONIC_MAC_CAPRI;
53 IONIC_PRINT(ERR, "Unsupported device id: %" PRIx32 "",
58 IONIC_PRINT(INFO, "Mac: %d (%d)",