1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2001-2020 Intel Corporation
5 #include "ice_vlan_mode.h"
6 #include "ice_common.h"
9 * ice_set_svm - set single VLAN mode
10 * @hw: pointer to the HW structure
12 static enum ice_status ice_set_svm_dflt(struct ice_hw *hw)
14 ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__);
16 return ice_aq_set_port_params(hw->port_info, 0, false, false, false, NULL);
20 * ice_init_vlan_mode_ops - initialize VLAN mode configuration ops
21 * @hw: pointer to the HW structure
23 void ice_init_vlan_mode_ops(struct ice_hw *hw)
25 hw->vlan_mode_ops.set_dvm = NULL;
26 hw->vlan_mode_ops.set_svm = ice_set_svm_dflt;
31 * @hw: pointer to the HW structure
33 enum ice_status ice_set_vlan_mode(struct ice_hw *hw)
35 enum ice_status status = ICE_ERR_NOT_IMPL;
37 if (hw->vlan_mode_ops.set_dvm)
38 status = hw->vlan_mode_ops.set_dvm(hw);
41 return hw->vlan_mode_ops.set_svm(hw);