Lines Matching refs:card
18 struct qeth_card *card = dev_get_drvdata(dev); in qeth_bridge_port_role_state_show() local
23 if (!card) in qeth_bridge_port_role_state_show()
26 mutex_lock(&card->conf_mutex); in qeth_bridge_port_role_state_show()
28 if (qeth_card_hw_is_reachable(card) && in qeth_bridge_port_role_state_show()
29 card->options.sbp.supported_funcs) in qeth_bridge_port_role_state_show()
30 rc = qeth_bridgeport_query_ports(card, in qeth_bridge_port_role_state_show()
31 &card->options.sbp.role, &state); in qeth_bridge_port_role_state_show()
45 switch (card->options.sbp.role) { in qeth_bridge_port_role_state_show()
56 QETH_CARD_TEXT_(card, 2, "SBP%02x:%02x", in qeth_bridge_port_role_state_show()
57 card->options.sbp.role, state); in qeth_bridge_port_role_state_show()
62 mutex_unlock(&card->conf_mutex); in qeth_bridge_port_role_state_show()
76 struct qeth_card *card = dev_get_drvdata(dev); in qeth_bridge_port_role_store() local
80 if (!card) in qeth_bridge_port_role_store()
91 mutex_lock(&card->conf_mutex); in qeth_bridge_port_role_store()
93 if (qeth_card_hw_is_reachable(card)) { in qeth_bridge_port_role_store()
94 rc = qeth_bridgeport_setrole(card, role); in qeth_bridge_port_role_store()
96 card->options.sbp.role = role; in qeth_bridge_port_role_store()
98 card->options.sbp.role = role; in qeth_bridge_port_role_store()
100 mutex_unlock(&card->conf_mutex); in qeth_bridge_port_role_store()
120 struct qeth_card *card = dev_get_drvdata(dev); in qeth_bridgeport_hostnotification_show() local
123 if (!card) in qeth_bridgeport_hostnotification_show()
126 mutex_lock(&card->conf_mutex); in qeth_bridgeport_hostnotification_show()
128 enabled = card->options.sbp.hostnotification; in qeth_bridgeport_hostnotification_show()
130 mutex_unlock(&card->conf_mutex); in qeth_bridgeport_hostnotification_show()
138 struct qeth_card *card = dev_get_drvdata(dev); in qeth_bridgeport_hostnotification_store() local
142 if (!card) in qeth_bridgeport_hostnotification_store()
152 mutex_lock(&card->conf_mutex); in qeth_bridgeport_hostnotification_store()
154 if (qeth_card_hw_is_reachable(card)) { in qeth_bridgeport_hostnotification_store()
155 rc = qeth_bridgeport_an_set(card, enable); in qeth_bridgeport_hostnotification_store()
157 card->options.sbp.hostnotification = enable; in qeth_bridgeport_hostnotification_store()
159 card->options.sbp.hostnotification = enable; in qeth_bridgeport_hostnotification_store()
161 mutex_unlock(&card->conf_mutex); in qeth_bridgeport_hostnotification_store()
197 void qeth_l2_setup_bridgeport_attrs(struct qeth_card *card) in qeth_l2_setup_bridgeport_attrs() argument
201 if (!card) in qeth_l2_setup_bridgeport_attrs()
203 if (!card->options.sbp.supported_funcs) in qeth_l2_setup_bridgeport_attrs()
205 if (card->options.sbp.role != QETH_SBP_ROLE_NONE) { in qeth_l2_setup_bridgeport_attrs()
207 qeth_bridgeport_setrole(card, card->options.sbp.role); in qeth_l2_setup_bridgeport_attrs()
209 qeth_bridgeport_query_ports(card, in qeth_l2_setup_bridgeport_attrs()
210 &card->options.sbp.role, NULL); in qeth_l2_setup_bridgeport_attrs()
212 if (card->options.sbp.hostnotification) { in qeth_l2_setup_bridgeport_attrs()
213 rc = qeth_bridgeport_an_set(card, 1); in qeth_l2_setup_bridgeport_attrs()
215 card->options.sbp.hostnotification = 0; in qeth_l2_setup_bridgeport_attrs()
217 qeth_bridgeport_an_set(card, 0); in qeth_l2_setup_bridgeport_attrs()