Lines Matching defs:hw

37  * @hw: pointer to the HW struct
41 ice_pkg_get_supported_vlan_mode(struct ice_hw *hw, bool *dvm)
51 bld = ice_pkg_buf_alloc_single_section(hw,
61 status = ice_aq_upload_section(hw,
79 ice_pkg_buf_free(hw, bld);
86 * @hw: pointer to the HW structure
92 ice_aq_get_vlan_mode(struct ice_hw *hw,
103 return ice_aq_send_cmd(hw, &desc, get_params, sizeof(*get_params),
109 * @hw: pointer to the HW structure
118 static bool ice_aq_is_dvm_ena(struct ice_hw *hw)
123 status = ice_aq_get_vlan_mode(hw, &get_params);
125 ice_debug(hw, ICE_DBG_AQ, "Failed to get VLAN mode, status %d\n",
135 * @hw: pointer to the HW structure
142 bool ice_is_dvm_ena(struct ice_hw *hw)
144 return hw->dvm_ena;
149 * @hw: pointer to the HW structure
155 static void ice_cache_vlan_mode(struct ice_hw *hw)
157 hw->dvm_ena = ice_aq_is_dvm_ena(hw) ? true : false;
162 * @hw: pointer to the HW structure
164 static bool ice_pkg_supports_dvm(struct ice_hw *hw)
169 status = ice_pkg_get_supported_vlan_mode(hw, &pkg_supports_dvm);
171 ice_debug(hw, ICE_DBG_PKG, "Failed to get supported VLAN mode, status %d\n",
181 * @hw: pointer to the HW structure
183 static bool ice_fw_supports_dvm(struct ice_hw *hw)
191 status = ice_aq_get_vlan_mode(hw, &get_vlan_mode);
193 ice_debug(hw, ICE_DBG_NVM, "Failed to get VLAN mode, status %d\n",
203 * @hw: pointer to the hardware structure
211 static bool ice_is_dvm_supported(struct ice_hw *hw)
213 if (!ice_pkg_supports_dvm(hw)) {
214 ice_debug(hw, ICE_DBG_PKG, "DDP doesn't support DVM\n");
218 if (!ice_fw_supports_dvm(hw)) {
219 ice_debug(hw, ICE_DBG_PKG, "FW doesn't support DVM\n");
228 * @hw: pointer to the HW structure
234 ice_aq_set_vlan_mode(struct ice_hw *hw,
260 return ice_aq_send_cmd(hw, &desc, set_params, sizeof(*set_params),
266 * @hw: pointer to the HW structure
268 static int ice_set_svm(struct ice_hw *hw)
273 status = ice_aq_set_port_params(hw->port_info, 0, false, false, false, NULL);
275 ice_debug(hw, ICE_DBG_INIT, "Failed to set port parameters for single VLAN mode\n");
280 ice_malloc(hw, sizeof(*set_params));
289 status = ice_aq_set_vlan_mode(hw, set_params);
291 ice_debug(hw, ICE_DBG_INIT, "Failed to configure port in single VLAN mode\n");
293 ice_free(hw, set_params);
299 * @hw: pointer to the HW structure
301 int ice_set_vlan_mode(struct ice_hw *hw)
303 if (!ice_is_dvm_supported(hw))
306 return ice_set_svm(hw);
311 * @hw: pointer to the HW structure
322 void ice_post_pkg_dwnld_vlan_mode_cfg(struct ice_hw *hw)
324 ice_cache_vlan_mode(hw);