src/dpdk/drivers/net/ice/base/ice_vlan_mode.c
static enum ice_status
ice_aq_set_vlan_mode(struct ice_hw *hw,
		     struct ice_aqc_set_vlan_mode *set_params)
{
	u8 rdma_packet, mng_vlan_prot_id;
	struct ice_aq_desc desc;

	if (!set_params)
		return ICE_ERR_PARAM;

	if (set_params->l2tag_prio_tagging > ICE_AQ_VLAN_PRIO_TAG_MAX)
		return ICE_ERR_PARAM;

	rdma_packet = set_params->rdma_packet;
	if (rdma_packet != ICE_AQ_SVM_VLAN_RDMA_PKT_FLAG_SETTING &&
	    rdma_packet != ICE_AQ_DVM_VLAN_RDMA_PKT_FLAG_SETTING)
		return ICE_ERR_PARAM;

	mng_vlan_prot_id = set_params->mng_vlan_prot_id;
	if (mng_vlan_prot_id != ICE_AQ_VLAN_MNG_PROTOCOL_ID_OUTER &&
	    mng_vlan_prot_id != ICE_AQ_VLAN_MNG_PROTOCOL_ID_INNER)
		return ICE_ERR_PARAM;

	ice_fill_dflt_direct_cmd_desc(&desc,
				      ice_aqc_opc_set_vlan_mode_parameters);
	desc.flags |= CPU_TO_LE16(ICE_AQ_FLAG_RD);

	return ice_aq_send_cmd(hw, &desc, set_params, sizeof(*set_params),
			       NULL);
}
/**
 * ice_aq_set_vlan_mode - set the VLAN mode of the device
 * @hw: pointer to the HW structure
 * @set_params: requested VLAN mode configuration
 *
 * Set VLAN Mode Parameters (0x020C)
 */
set the VLAN mode of the device
@hw: pointer to the HW structure
@set_params: requested VLAN mode configuration

Set VLAN Mode Parameters (0x020C)
set the VLAN mode of the device @hw : pointer to the HW structure @set_params : requested VLAN mode configuration Set VLAN Mode Parameters ( 0x020C )
static enum ice_status
ice_aq_set_vlan_mode(struct ice_hw *hw,
		     struct ice_aqc_set_vlan_mode *set_params)
{
	u8 rdma_packet, mng_vlan_prot_id;
	struct ice_aq_desc desc;
	if (!set_params)
		return ICE_ERR_PARAM;
	if (set_params->l2tag_prio_tagging > ICE_AQ_VLAN_PRIO_TAG_MAX)
		return ICE_ERR_PARAM;
	rdma_packet = set_params->rdma_packet;
	if (rdma_packet != ICE_AQ_SVM_VLAN_RDMA_PKT_FLAG_SETTING &&
	    rdma_packet != ICE_AQ_DVM_VLAN_RDMA_PKT_FLAG_SETTING)
		return ICE_ERR_PARAM;
	mng_vlan_prot_id = set_params->mng_vlan_prot_id;
	if (mng_vlan_prot_id != ICE_AQ_VLAN_MNG_PROTOCOL_ID_OUTER &&
	    mng_vlan_prot_id != ICE_AQ_VLAN_MNG_PROTOCOL_ID_INNER)
		return ICE_ERR_PARAM;
	ice_fill_dflt_direct_cmd_desc(&desc,
				      ice_aqc_opc_set_vlan_mode_parameters);
	desc.flags |= CPU_TO_LE16(ICE_AQ_FLAG_RD);
	return ice_aq_send_cmd(hw, &desc, set_params, sizeof(*set_params),
			       NULL);
}
static enum ice_status ice_aq_set_vlan_mode ( struct ice_hw * hw , struct ice_aqc_set_vlan_mode * set_params ) { u8 rdma_packet , mng_vlan_prot_id ; struct ice_aq_desc desc ; if ( ! set_params ) return ICE_ERR_PARAM ; if ( set_params -> l2tag_prio_tagging > ICE_AQ_VLAN_PRIO_TAG_MAX ) return ICE_ERR_PARAM ; rdma_packet = set_params -> rdma_packet ; if ( rdma_packet != ICE_AQ_SVM_VLAN_RDMA_PKT_FLAG_SETTING && rdma_packet != ICE_AQ_DVM_VLAN_RDMA_PKT_FLAG_SETTING ) return ICE_ERR_PARAM ; mng_vlan_prot_id = set_params -> mng_vlan_prot_id ; if ( mng_vlan_prot_id != ICE_AQ_VLAN_MNG_PROTOCOL_ID_OUTER && mng_vlan_prot_id != ICE_AQ_VLAN_MNG_PROTOCOL_ID_INNER ) return ICE_ERR_PARAM ; ice_fill_dflt_direct_cmd_desc ( & desc , ice_aqc_opc_set_vlan_mode_parameters ) ; desc . flags |= CPU_TO_LE16 ( ICE_AQ_FLAG_RD ) ; return ice_aq_send_cmd ( hw , & desc , set_params , sizeof ( * set_params ) , NULL ) ; }
ice_aq_set_vlan_mode - set the VLAN mode of the device
 @hw: pointer to the HW structure
 @set_params: requested VLAN mode configuration
ice_aq_set_vlan_mode - set the VLAN mode of the device @hw : pointer to the HW structure @set_params : requested VLAN mode configuration