Lines Matching refs:aq_txsc

26 static int aq_clear_txsa(struct aq_nic_s *nic, struct aq_macsec_txsc *aq_txsc,
58 if (macsec_cfg->aq_txsc[i].sw_secy == secy) in aq_get_txsc_idx_from_secy()
314 aq_clear_secy(nic, nic->macsec_cfg->aq_txsc[i].sw_secy, in aq_mdo_dev_stop()
323 struct aq_macsec_txsc *aq_txsc = &nic->macsec_cfg->aq_txsc[txsc_idx]; in aq_set_txsc() local
325 const struct macsec_secy *secy = aq_txsc->sw_secy; in aq_set_txsc()
327 unsigned int sc_idx = aq_txsc->hw_sc_idx; in aq_set_txsc()
473 cfg->aq_txsc[txsc_idx].hw_sc_idx = aq_to_hw_sc_idx(txsc_idx, sc_sa); in aq_mdo_add_secy()
474 cfg->aq_txsc[txsc_idx].sw_secy = secy; in aq_mdo_add_secy()
507 struct aq_macsec_txsc *tx_sc = &nic->macsec_cfg->aq_txsc[txsc_idx]; in aq_clear_txsc()
535 nic->macsec_cfg->aq_txsc[txsc_idx].sw_secy = NULL; in aq_clear_txsc()
596 struct aq_macsec_txsc *aq_txsc; in aq_mdo_add_txsa() local
607 aq_txsc = &cfg->aq_txsc[txsc_idx]; in aq_mdo_add_txsa()
608 set_bit(ctx->sa.assoc_num, &aq_txsc->tx_sa_idx_busy); in aq_mdo_add_txsa()
610 memcpy(aq_txsc->tx_sa_key[ctx->sa.assoc_num], ctx->sa.key, in aq_mdo_add_txsa()
614 ret = aq_update_txsa(nic, aq_txsc->hw_sc_idx, secy, in aq_mdo_add_txsa()
626 struct aq_macsec_txsc *aq_txsc; in aq_mdo_upd_txsa() local
637 aq_txsc = &cfg->aq_txsc[txsc_idx]; in aq_mdo_upd_txsa()
639 ret = aq_update_txsa(nic, aq_txsc->hw_sc_idx, secy, in aq_mdo_upd_txsa()
645 static int aq_clear_txsa(struct aq_nic_s *nic, struct aq_macsec_txsc *aq_txsc, in aq_clear_txsa() argument
648 const int sa_idx = aq_txsc->hw_sc_idx | sa_num; in aq_clear_txsa()
653 clear_bit(sa_num, &aq_txsc->tx_sa_idx_busy); in aq_clear_txsa()
687 ret = aq_clear_txsa(nic, &cfg->aq_txsc[txsc_idx], ctx->sa.assoc_num, in aq_mdo_del_txsa()
1069 struct aq_macsec_txsc *aq_txsc; in aq_mdo_get_tx_sc_stats() local
1079 aq_txsc = &nic->macsec_cfg->aq_txsc[txsc_idx]; in aq_mdo_get_tx_sc_stats()
1080 stats = &aq_txsc->stats; in aq_mdo_get_tx_sc_stats()
1081 aq_get_txsc_stats(hw, aq_txsc->hw_sc_idx, stats); in aq_mdo_get_tx_sc_stats()
1098 struct aq_macsec_txsc *aq_txsc; in aq_mdo_get_tx_sa_stats() local
1112 aq_txsc = &cfg->aq_txsc[txsc_idx]; in aq_mdo_get_tx_sa_stats()
1113 sa_idx = aq_txsc->hw_sc_idx | ctx->sa.assoc_num; in aq_mdo_get_tx_sa_stats()
1114 stats = &aq_txsc->tx_sa_stats[ctx->sa.assoc_num]; in aq_mdo_get_tx_sa_stats()
1122 secy = aq_txsc->sw_secy; in aq_mdo_get_tx_sa_stats()
1228 struct aq_macsec_txsc *aq_txsc = &nic->macsec_cfg->aq_txsc[txsc_idx]; in apply_txsc_cfg() local
1229 const struct macsec_secy *secy = aq_txsc->sw_secy; in apply_txsc_cfg()
1244 ret = aq_update_txsa(nic, aq_txsc->hw_sc_idx, secy, in apply_txsc_cfg()
1245 tx_sa, aq_txsc->tx_sa_key[i], i); in apply_txsc_cfg()
1397 struct aq_macsec_txsc *aq_txsc; in aq_check_txsa_expiration() local
1423 aq_txsc = &cfg->aq_txsc[txsc_idx]; in aq_check_txsa_expiration()
1430 secy = aq_txsc->sw_secy; in aq_check_txsa_expiration()
1437 if (unlikely(!(aq_txsc->tx_sa_idx_busy & BIT(an)))) { in aq_check_txsa_expiration()
1620 cnt += hweight_long(cfg->aq_txsc[i].tx_sa_idx_busy); in aq_macsec_tx_sa_cnt()
1630 struct aq_macsec_txsc *aq_txsc; in aq_macsec_update_stats() local
1640 aq_txsc = &cfg->aq_txsc[i]; in aq_macsec_update_stats()
1642 ret = aq_get_txsc_stats(hw, aq_txsc->hw_sc_idx, in aq_macsec_update_stats()
1643 &aq_txsc->stats); in aq_macsec_update_stats()
1648 if (!test_bit(assoc_num, &aq_txsc->tx_sa_idx_busy)) in aq_macsec_update_stats()
1650 sa_idx = aq_txsc->hw_sc_idx | assoc_num; in aq_macsec_update_stats()
1652 &aq_txsc->tx_sa_stats[assoc_num]); in aq_macsec_update_stats()
1685 struct aq_macsec_txsc *aq_txsc; in aq_macsec_get_stats() local
1724 aq_txsc = &cfg->aq_txsc[sc_num]; in aq_macsec_get_stats()
1725 txsc_stats = &aq_txsc->stats; in aq_macsec_get_stats()
1733 if (!test_bit(assoc_num, &aq_txsc->tx_sa_idx_busy)) in aq_macsec_get_stats()
1736 txsa_stats = &aq_txsc->tx_sa_stats[assoc_num]; in aq_macsec_get_stats()