Lines Matching refs:txsc_idx
24 static int aq_clear_txsc(struct aq_nic_s *nic, const int txsc_idx,
315 static int aq_set_txsc(struct aq_nic_s *nic, const int txsc_idx) in aq_set_txsc() argument
317 struct aq_macsec_txsc *aq_txsc = &nic->macsec_cfg->aq_txsc[txsc_idx]; in aq_set_txsc()
339 ret = aq_mss_set_egress_class_record(hw, &tx_class_rec, txsc_idx); in aq_set_txsc()
446 u32 txsc_idx; in aq_mdo_add_secy() local
459 txsc_idx = ffz(cfg->txsc_idx_busy); in aq_mdo_add_secy()
460 if (txsc_idx == AQ_MACSEC_MAX_SC) in aq_mdo_add_secy()
464 cfg->aq_txsc[txsc_idx].hw_sc_idx = aq_to_hw_sc_idx(txsc_idx, sc_sa); in aq_mdo_add_secy()
465 cfg->aq_txsc[txsc_idx].sw_secy = secy; in aq_mdo_add_secy()
468 ret = aq_set_txsc(nic, txsc_idx); in aq_mdo_add_secy()
470 set_bit(txsc_idx, &cfg->txsc_idx_busy); in aq_mdo_add_secy()
479 int txsc_idx; in aq_mdo_upd_secy() local
482 txsc_idx = aq_get_txsc_idx_from_secy(nic->macsec_cfg, secy); in aq_mdo_upd_secy()
483 if (txsc_idx < 0) in aq_mdo_upd_secy()
487 ret = aq_set_txsc(nic, txsc_idx); in aq_mdo_upd_secy()
492 static int aq_clear_txsc(struct aq_nic_s *nic, const int txsc_idx, in aq_clear_txsc() argument
495 struct aq_macsec_txsc *tx_sc = &nic->macsec_cfg->aq_txsc[txsc_idx]; in aq_clear_txsc()
510 txsc_idx); in aq_clear_txsc()
522 clear_bit(txsc_idx, &nic->macsec_cfg->txsc_idx_busy); in aq_clear_txsc()
523 nic->macsec_cfg->aq_txsc[txsc_idx].sw_secy = NULL; in aq_clear_txsc()
583 int txsc_idx; in aq_mdo_add_txsa() local
586 txsc_idx = aq_get_txsc_idx_from_secy(cfg, secy); in aq_mdo_add_txsa()
587 if (txsc_idx < 0) in aq_mdo_add_txsa()
590 aq_txsc = &cfg->aq_txsc[txsc_idx]; in aq_mdo_add_txsa()
610 int txsc_idx; in aq_mdo_upd_txsa() local
613 txsc_idx = aq_get_txsc_idx_from_secy(cfg, secy); in aq_mdo_upd_txsa()
614 if (txsc_idx < 0) in aq_mdo_upd_txsa()
617 aq_txsc = &cfg->aq_txsc[txsc_idx]; in aq_mdo_upd_txsa()
657 int txsc_idx; in aq_mdo_del_txsa() local
660 txsc_idx = aq_get_txsc_idx_from_secy(cfg, ctx->secy); in aq_mdo_del_txsa()
661 if (txsc_idx < 0) in aq_mdo_del_txsa()
664 ret = aq_clear_txsa(nic, &cfg->aq_txsc[txsc_idx], ctx->sa.assoc_num, in aq_mdo_del_txsa()
1027 int txsc_idx; in aq_mdo_get_tx_sc_stats() local
1029 txsc_idx = aq_get_txsc_idx_from_secy(nic->macsec_cfg, ctx->secy); in aq_mdo_get_tx_sc_stats()
1030 if (txsc_idx < 0) in aq_mdo_get_tx_sc_stats()
1033 aq_txsc = &nic->macsec_cfg->aq_txsc[txsc_idx]; in aq_mdo_get_tx_sc_stats()
1055 int txsc_idx; in aq_mdo_get_tx_sa_stats() local
1059 txsc_idx = aq_get_txsc_idx_from_secy(cfg, ctx->secy); in aq_mdo_get_tx_sa_stats()
1060 if (txsc_idx < 0) in aq_mdo_get_tx_sa_stats()
1063 aq_txsc = &cfg->aq_txsc[txsc_idx]; in aq_mdo_get_tx_sa_stats()
1171 static int apply_txsc_cfg(struct aq_nic_s *nic, const int txsc_idx) in apply_txsc_cfg() argument
1173 struct aq_macsec_txsc *aq_txsc = &nic->macsec_cfg->aq_txsc[txsc_idx]; in apply_txsc_cfg()
1182 ret = aq_set_txsc(nic, txsc_idx); in apply_txsc_cfg()
1231 int txsc_idx; in aq_clear_secy() local
1235 txsc_idx = aq_get_txsc_idx_from_secy(nic->macsec_cfg, secy); in aq_clear_secy()
1236 if (txsc_idx >= 0) { in aq_clear_secy()
1237 ret = aq_clear_txsc(nic, txsc_idx, clear_type); in aq_clear_secy()
1260 int txsc_idx; in aq_apply_secy_cfg() local
1264 txsc_idx = aq_get_txsc_idx_from_secy(nic->macsec_cfg, secy); in aq_apply_secy_cfg()
1265 if (txsc_idx >= 0) in aq_apply_secy_cfg()
1266 apply_txsc_cfg(nic, txsc_idx); in aq_apply_secy_cfg()
1344 int sc_idx = 0, txsc_idx = 0; in aq_check_txsa_expiration() local
1364 txsc_idx = aq_get_txsc_idx_from_sc_idx(sc_sa, sc_idx); in aq_check_txsa_expiration()
1365 if (txsc_idx < 0) in aq_check_txsa_expiration()
1368 aq_txsc = &cfg->aq_txsc[txsc_idx]; in aq_check_txsa_expiration()
1369 if (!(cfg->txsc_idx_busy & BIT(txsc_idx))) { in aq_check_txsa_expiration()