162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 262306a36Sopenharmony_ci/* Copyright 2011 Cisco Systems, Inc. All rights reserved. */ 362306a36Sopenharmony_ci 462306a36Sopenharmony_ci#ifndef _ENIC_PP_H_ 562306a36Sopenharmony_ci#define _ENIC_PP_H_ 662306a36Sopenharmony_ci 762306a36Sopenharmony_ci#define ENIC_PP_BY_INDEX(enic, vf, pp, err) \ 862306a36Sopenharmony_ci do { \ 962306a36Sopenharmony_ci if (enic_is_valid_pp_vf(enic, vf, err)) \ 1062306a36Sopenharmony_ci pp = (vf == PORT_SELF_VF) ? enic->pp : enic->pp + vf; \ 1162306a36Sopenharmony_ci else \ 1262306a36Sopenharmony_ci pp = NULL; \ 1362306a36Sopenharmony_ci } while (0) 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ciint enic_process_set_pp_request(struct enic *enic, int vf, 1662306a36Sopenharmony_ci struct enic_port_profile *prev_pp, int *restore_pp); 1762306a36Sopenharmony_ciint enic_process_get_pp_request(struct enic *enic, int vf, 1862306a36Sopenharmony_ci int request, u16 *response); 1962306a36Sopenharmony_ciint enic_is_valid_pp_vf(struct enic *enic, int vf, int *err); 2062306a36Sopenharmony_ci 2162306a36Sopenharmony_ci#endif /* _ENIC_PP_H_ */ 22