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 if (qeth_card_hw_is_reachable(card) && in qeth_bridge_port_role_state_show()
27 card->options.sbp.supported_funcs) in qeth_bridge_port_role_state_show()
28 rc = qeth_bridgeport_query_ports(card, in qeth_bridge_port_role_state_show()
29 &card->options.sbp.role, &state); in qeth_bridge_port_role_state_show()
43 switch (card->options.sbp.role) { in qeth_bridge_port_role_state_show()
54 QETH_CARD_TEXT_(card, 2, "SBP%02x:%02x", in qeth_bridge_port_role_state_show()
55 card->options.sbp.role, state); in qeth_bridge_port_role_state_show()
72 struct qeth_card *card = dev_get_drvdata(dev); in qeth_bridge_port_role_store() local
76 if (!card) in qeth_bridge_port_role_store()
87 mutex_lock(&card->conf_mutex); in qeth_bridge_port_role_store()
89 if (card->options.sbp.reflect_promisc) /* Forbid direct manipulation */ in qeth_bridge_port_role_store()
91 else if (qeth_card_hw_is_reachable(card)) { in qeth_bridge_port_role_store()
92 rc = qeth_bridgeport_setrole(card, role); in qeth_bridge_port_role_store()
94 card->options.sbp.role = role; in qeth_bridge_port_role_store()
96 card->options.sbp.role = role; in qeth_bridge_port_role_store()
98 mutex_unlock(&card->conf_mutex); in qeth_bridge_port_role_store()
118 struct qeth_card *card = dev_get_drvdata(dev); in qeth_bridgeport_hostnotification_show() local
121 if (!card) in qeth_bridgeport_hostnotification_show()
124 enabled = card->options.sbp.hostnotification; in qeth_bridgeport_hostnotification_show()
132 struct qeth_card *card = dev_get_drvdata(dev); in qeth_bridgeport_hostnotification_store() local
136 if (!card) in qeth_bridgeport_hostnotification_store()
146 mutex_lock(&card->conf_mutex); in qeth_bridgeport_hostnotification_store()
148 if (qeth_card_hw_is_reachable(card)) { in qeth_bridgeport_hostnotification_store()
149 rc = qeth_bridgeport_an_set(card, enable); in qeth_bridgeport_hostnotification_store()
151 card->options.sbp.hostnotification = enable; in qeth_bridgeport_hostnotification_store()
153 card->options.sbp.hostnotification = enable; in qeth_bridgeport_hostnotification_store()
155 mutex_unlock(&card->conf_mutex); in qeth_bridgeport_hostnotification_store()
167 struct qeth_card *card = dev_get_drvdata(dev); in qeth_bridgeport_reflect_show() local
170 if (!card) in qeth_bridgeport_reflect_show()
173 if (card->options.sbp.reflect_promisc) { in qeth_bridgeport_reflect_show()
174 if (card->options.sbp.reflect_promisc_primary) in qeth_bridgeport_reflect_show()
187 struct qeth_card *card = dev_get_drvdata(dev); in qeth_bridgeport_reflect_store() local
191 if (!card) in qeth_bridgeport_reflect_store()
206 mutex_lock(&card->conf_mutex); in qeth_bridgeport_reflect_store()
208 if (card->options.sbp.role != QETH_SBP_ROLE_NONE) in qeth_bridgeport_reflect_store()
211 card->options.sbp.reflect_promisc = enable; in qeth_bridgeport_reflect_store()
212 card->options.sbp.reflect_promisc_primary = primary; in qeth_bridgeport_reflect_store()
216 mutex_unlock(&card->conf_mutex); in qeth_bridgeport_reflect_store()
253 void qeth_l2_setup_bridgeport_attrs(struct qeth_card *card) in qeth_l2_setup_bridgeport_attrs() argument
257 if (!card) in qeth_l2_setup_bridgeport_attrs()
259 if (!card->options.sbp.supported_funcs) in qeth_l2_setup_bridgeport_attrs()
261 if (card->options.sbp.role != QETH_SBP_ROLE_NONE) { in qeth_l2_setup_bridgeport_attrs()
263 qeth_bridgeport_setrole(card, card->options.sbp.role); in qeth_l2_setup_bridgeport_attrs()
265 qeth_bridgeport_query_ports(card, in qeth_l2_setup_bridgeport_attrs()
266 &card->options.sbp.role, NULL); in qeth_l2_setup_bridgeport_attrs()
268 if (card->options.sbp.hostnotification) { in qeth_l2_setup_bridgeport_attrs()
269 rc = qeth_bridgeport_an_set(card, 1); in qeth_l2_setup_bridgeport_attrs()
271 card->options.sbp.hostnotification = 0; in qeth_l2_setup_bridgeport_attrs()
273 qeth_bridgeport_an_set(card, 0); in qeth_l2_setup_bridgeport_attrs()