xref: /linux/drivers/net/ethernet/cisco/enic/enic_pp.h (revision 8e07e0e3964ca4e23ce7b68e2096fe660a888942)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /* Copyright 2011 Cisco Systems, Inc.  All rights reserved. */
3 
4 #ifndef _ENIC_PP_H_
5 #define _ENIC_PP_H_
6 
7 #define ENIC_PP_BY_INDEX(enic, vf, pp, err) \
8 	do { \
9 		if (enic_is_valid_pp_vf(enic, vf, err)) \
10 			pp = (vf == PORT_SELF_VF) ? enic->pp : enic->pp + vf; \
11 		else \
12 			pp = NULL; \
13 	} while (0)
14 
15 int enic_process_set_pp_request(struct enic *enic, int vf,
16 	struct enic_port_profile *prev_pp, int *restore_pp);
17 int enic_process_get_pp_request(struct enic *enic, int vf,
18 	int request, u16 *response);
19 int enic_is_valid_pp_vf(struct enic *enic, int vf, int *err);
20 
21 #endif /* _ENIC_PP_H_ */
22