1 /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
2 * Copyright(c) 2018-2019 Pensando Systems, Inc. All rights reserved.
5 #include "ionic_mac_api.h"
8 ionic_init_mac(struct ionic_hw *hw)
17 ionic_set_mac_type(hw);
19 switch (hw->mac.type) {
31 ionic_set_mac_type(struct ionic_hw *hw)
37 if (hw->vendor_id != IONIC_PENSANDO_VENDOR_ID) {
38 IONIC_PRINT(ERR, "Unsupported vendor id: %" PRIx32 "",
43 switch (hw->device_id) {
44 case IONIC_DEV_ID_ETH_PF:
45 case IONIC_DEV_ID_ETH_VF:
46 case IONIC_DEV_ID_ETH_MGMT:
47 hw->mac.type = IONIC_MAC_CAPRI;
51 IONIC_PRINT(ERR, "Unsupported device id: %" PRIx32 "",
56 IONIC_PRINT(INFO, "Mac: %d (%d)",