Lines Matching refs:vnicc
36 static bool qeth_l2_vnicc_recover_timeout(struct qeth_card *card, u32 vnicc,
963 QETH_CARD_HEX(card, 2, &card->options.vnicc.sup_chars, in qeth_l2_trace_features()
964 sizeof(card->options.vnicc.sup_chars)); in qeth_l2_trace_features()
2014 struct qeth_ipacmd_vnicc *rep = &cmd->data.vnicc; in qeth_l2_vnicc_request_cb()
2020 card->options.vnicc.sup_chars = rep->hdr.sup; in qeth_l2_vnicc_request_cb()
2021 card->options.vnicc.cur_chars = rep->hdr.cur; in qeth_l2_vnicc_request_cb()
2050 req = &cmd->data.vnicc; in qeth_l2_vnicc_request()
2130 static int qeth_l2_vnicc_getset_timeout(struct qeth_card *card, u32 vnicc, in qeth_l2_vnicc_getset_timeout() argument
2137 cbctl.param.vnic_char = vnicc; in qeth_l2_vnicc_getset_timeout()
2148 int qeth_l2_vnicc_set_state(struct qeth_card *card, u32 vnicc, bool state) in qeth_l2_vnicc_set_state() argument
2156 if (!(card->options.vnicc.sup_chars & vnicc) || in qeth_l2_vnicc_set_state()
2157 !(card->options.vnicc.set_char_sup & vnicc)) in qeth_l2_vnicc_set_state()
2166 card->options.vnicc.wanted_chars |= vnicc; in qeth_l2_vnicc_set_state()
2169 card->options.vnicc.wanted_chars &= ~vnicc; in qeth_l2_vnicc_set_state()
2173 if (card->options.vnicc.cur_chars == card->options.vnicc.wanted_chars) in qeth_l2_vnicc_set_state()
2179 card->options.vnicc.cur_chars |= vnicc; in qeth_l2_vnicc_set_state()
2181 card->options.vnicc.cur_chars &= ~vnicc; in qeth_l2_vnicc_set_state()
2185 rc = qeth_l2_vnicc_set_char(card, vnicc, cmd); in qeth_l2_vnicc_set_state()
2187 card->options.vnicc.wanted_chars = in qeth_l2_vnicc_set_state()
2188 card->options.vnicc.cur_chars; in qeth_l2_vnicc_set_state()
2191 if (state && vnicc == QETH_VNICC_RX_BCAST) in qeth_l2_vnicc_set_state()
2192 card->options.vnicc.rx_bcast_enabled = true; in qeth_l2_vnicc_set_state()
2193 if (!state && vnicc == QETH_VNICC_LEARNING) in qeth_l2_vnicc_set_state()
2194 qeth_l2_vnicc_recover_timeout(card, vnicc, in qeth_l2_vnicc_set_state()
2195 &card->options.vnicc.learning_timeout); in qeth_l2_vnicc_set_state()
2202 int qeth_l2_vnicc_get_state(struct qeth_card *card, u32 vnicc, bool *state) in qeth_l2_vnicc_get_state() argument
2209 if (!(card->options.vnicc.sup_chars & vnicc)) in qeth_l2_vnicc_get_state()
2219 *state = (card->options.vnicc.cur_chars & vnicc) ? true : false; in qeth_l2_vnicc_get_state()
2233 if (!(card->options.vnicc.sup_chars & QETH_VNICC_LEARNING) || in qeth_l2_vnicc_set_timeout()
2234 !(card->options.vnicc.getset_timeout_sup & QETH_VNICC_LEARNING)) in qeth_l2_vnicc_set_timeout()
2241 if (card->options.vnicc.learning_timeout == timeout) in qeth_l2_vnicc_set_timeout()
2246 card->options.vnicc.learning_timeout = timeout; in qeth_l2_vnicc_set_timeout()
2254 card->options.vnicc.learning_timeout = timeout; in qeth_l2_vnicc_set_timeout()
2269 if (!(card->options.vnicc.sup_chars & QETH_VNICC_LEARNING) || in qeth_l2_vnicc_get_timeout()
2270 !(card->options.vnicc.getset_timeout_sup & QETH_VNICC_LEARNING)) in qeth_l2_vnicc_get_timeout()
2277 *timeout = card->options.vnicc.learning_timeout; in qeth_l2_vnicc_get_timeout()
2289 if (!card->options.vnicc.sup_chars) in qeth_l2_vnicc_is_in_use()
2294 if (card->options.vnicc.cur_chars == QETH_VNICC_DEFAULT) { in qeth_l2_vnicc_is_in_use()
2295 if (!card->options.vnicc.rx_bcast_enabled || in qeth_l2_vnicc_is_in_use()
2303 static bool qeth_l2_vnicc_recover_timeout(struct qeth_card *card, u32 vnicc, in qeth_l2_vnicc_recover_timeout() argument
2306 if (card->options.vnicc.sup_chars & vnicc && in qeth_l2_vnicc_recover_timeout()
2307 card->options.vnicc.getset_timeout_sup & vnicc && in qeth_l2_vnicc_recover_timeout()
2308 !qeth_l2_vnicc_getset_timeout(card, vnicc, IPA_VNICC_SET_TIMEOUT, in qeth_l2_vnicc_recover_timeout()
2316 static bool qeth_l2_vnicc_recover_char(struct qeth_card *card, u32 vnicc, in qeth_l2_vnicc_recover_char() argument
2321 if (card->options.vnicc.sup_chars & vnicc && in qeth_l2_vnicc_recover_char()
2322 card->options.vnicc.set_char_sup & vnicc && in qeth_l2_vnicc_recover_char()
2323 !qeth_l2_vnicc_set_char(card, vnicc, cmd)) in qeth_l2_vnicc_recover_char()
2325 card->options.vnicc.wanted_chars &= ~vnicc; in qeth_l2_vnicc_recover_char()
2326 card->options.vnicc.wanted_chars |= QETH_VNICC_DEFAULT & vnicc; in qeth_l2_vnicc_recover_char()
2333 u32 *timeout = &card->options.vnicc.learning_timeout; in qeth_l2_vnicc_init()
2337 u32 sup_cmds, vnicc; in qeth_l2_vnicc_init() local
2341 card->options.vnicc.rx_bcast_enabled = 0; in qeth_l2_vnicc_init()
2344 if (card->options.vnicc.wanted_chars != QETH_VNICC_DEFAULT || in qeth_l2_vnicc_init()
2348 card->options.vnicc.sup_chars = 0; in qeth_l2_vnicc_init()
2349 card->options.vnicc.cur_chars = 0; in qeth_l2_vnicc_init()
2350 card->options.vnicc.wanted_chars = QETH_VNICC_DEFAULT; in qeth_l2_vnicc_init()
2354 chars_tmp = card->options.vnicc.sup_chars; in qeth_l2_vnicc_init()
2355 chars_len = sizeof(card->options.vnicc.sup_chars) * BITS_PER_BYTE; in qeth_l2_vnicc_init()
2357 vnicc = BIT(i); in qeth_l2_vnicc_init()
2358 if (qeth_l2_vnicc_query_cmds(card, vnicc, &sup_cmds)) { in qeth_l2_vnicc_init()
2364 card->options.vnicc.getset_timeout_sup |= vnicc; in qeth_l2_vnicc_init()
2366 card->options.vnicc.getset_timeout_sup &= ~vnicc; in qeth_l2_vnicc_init()
2369 card->options.vnicc.set_char_sup |= vnicc; in qeth_l2_vnicc_init()
2371 card->options.vnicc.set_char_sup &= ~vnicc; in qeth_l2_vnicc_init()
2376 chars_tmp = card->options.vnicc.wanted_chars ^ QETH_VNICC_DEFAULT; in qeth_l2_vnicc_init()
2377 chars_len = sizeof(card->options.vnicc.wanted_chars) * BITS_PER_BYTE; in qeth_l2_vnicc_init()
2379 vnicc = BIT(i); in qeth_l2_vnicc_init()
2380 enable = card->options.vnicc.wanted_chars & vnicc; in qeth_l2_vnicc_init()
2381 error |= qeth_l2_vnicc_recover_char(card, vnicc, enable); in qeth_l2_vnicc_init()
2391 card->options.vnicc.sup_chars = QETH_VNICC_ALL; in qeth_l2_vnicc_set_defaults()
2392 card->options.vnicc.cur_chars = QETH_VNICC_DEFAULT; in qeth_l2_vnicc_set_defaults()
2393 card->options.vnicc.learning_timeout = QETH_VNICC_DEFAULT_TIMEOUT; in qeth_l2_vnicc_set_defaults()
2395 card->options.vnicc.set_char_sup = QETH_VNICC_ALL; in qeth_l2_vnicc_set_defaults()
2396 card->options.vnicc.getset_timeout_sup = QETH_VNICC_LEARNING; in qeth_l2_vnicc_set_defaults()
2398 card->options.vnicc.wanted_chars = QETH_VNICC_DEFAULT; in qeth_l2_vnicc_set_defaults()