^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * Copyright IBM Corp. 2013
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) * Author(s): Eugene Crosser <eugene.crosser@ru.ibm.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) #ifndef __QETH_L2_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) #define __QETH_L2_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #include "qeth_core.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) extern const struct attribute_group *qeth_l2_attr_groups[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) int qeth_l2_create_device_attributes(struct device *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) void qeth_l2_remove_device_attributes(struct device *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) int qeth_bridgeport_query_ports(struct qeth_card *card,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) enum qeth_sbp_roles *role,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) enum qeth_sbp_states *state);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) int qeth_bridgeport_setrole(struct qeth_card *card, enum qeth_sbp_roles role);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) int qeth_bridgeport_an_set(struct qeth_card *card, int enable);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) int qeth_l2_vnicc_set_state(struct qeth_card *card, u32 vnicc, bool state);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) int qeth_l2_vnicc_get_state(struct qeth_card *card, u32 vnicc, bool *state);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) int qeth_l2_vnicc_set_timeout(struct qeth_card *card, u32 timeout);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) int qeth_l2_vnicc_get_timeout(struct qeth_card *card, u32 *timeout);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) bool qeth_bridgeport_allowed(struct qeth_card *card);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) struct qeth_mac {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) u8 mac_addr[ETH_ALEN];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) u8 disp_flag:2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) struct hlist_node hnode;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) static inline bool qeth_bridgeport_is_in_use(struct qeth_card *card)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) return card->options.sbp.role ||
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) card->options.sbp.reflect_promisc ||
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) card->options.sbp.hostnotification;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) #endif /* __QETH_L2_H__ */