xref: /linux/drivers/s390/net/qeth_l2.h (revision a7f7f6248d9740d710fd6bd190293fe5e16410ac)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  *    Copyright IBM Corp. 2013
4  *    Author(s): Eugene Crosser <eugene.crosser@ru.ibm.com>
5  */
6 
7 #ifndef __QETH_L2_H__
8 #define __QETH_L2_H__
9 
10 #include "qeth_core.h"
11 
12 extern const struct attribute_group *qeth_l2_attr_groups[];
13 
14 int qeth_l2_create_device_attributes(struct device *);
15 void qeth_l2_remove_device_attributes(struct device *);
16 int qeth_bridgeport_query_ports(struct qeth_card *card,
17 				enum qeth_sbp_roles *role,
18 				enum qeth_sbp_states *state);
19 int qeth_bridgeport_setrole(struct qeth_card *card, enum qeth_sbp_roles role);
20 int qeth_bridgeport_an_set(struct qeth_card *card, int enable);
21 
22 int qeth_l2_vnicc_set_state(struct qeth_card *card, u32 vnicc, bool state);
23 int qeth_l2_vnicc_get_state(struct qeth_card *card, u32 vnicc, bool *state);
24 int qeth_l2_vnicc_set_timeout(struct qeth_card *card, u32 timeout);
25 int qeth_l2_vnicc_get_timeout(struct qeth_card *card, u32 *timeout);
26 bool qeth_l2_vnicc_is_in_use(struct qeth_card *card);
27 
28 struct qeth_mac {
29 	u8 mac_addr[ETH_ALEN];
30 	u8 disp_flag:2;
31 	struct hlist_node hnode;
32 };
33 
34 #endif /* __QETH_L2_H__ */
35