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()
308 aq_clear_secy(nic, nic->macsec_cfg->aq_txsc[i].sw_secy, in aq_mdo_dev_stop()
317 struct aq_macsec_txsc *aq_txsc = &nic->macsec_cfg->aq_txsc[txsc_idx]; in aq_set_txsc() local
319 const struct macsec_secy *secy = aq_txsc->sw_secy; in aq_set_txsc()
321 unsigned int sc_idx = aq_txsc->hw_sc_idx; in aq_set_txsc()
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()
495 struct aq_macsec_txsc *tx_sc = &nic->macsec_cfg->aq_txsc[txsc_idx]; in aq_clear_txsc()
523 nic->macsec_cfg->aq_txsc[txsc_idx].sw_secy = NULL; in aq_clear_txsc()
582 struct aq_macsec_txsc *aq_txsc; in aq_mdo_add_txsa() local
590 aq_txsc = &cfg->aq_txsc[txsc_idx]; in aq_mdo_add_txsa()
591 set_bit(ctx->sa.assoc_num, &aq_txsc->tx_sa_idx_busy); in aq_mdo_add_txsa()
593 memcpy(aq_txsc->tx_sa_key[ctx->sa.assoc_num], ctx->sa.key, in aq_mdo_add_txsa()
597 ret = aq_update_txsa(nic, aq_txsc->hw_sc_idx, secy, in aq_mdo_add_txsa()
609 struct aq_macsec_txsc *aq_txsc; in aq_mdo_upd_txsa() local
617 aq_txsc = &cfg->aq_txsc[txsc_idx]; in aq_mdo_upd_txsa()
619 ret = aq_update_txsa(nic, aq_txsc->hw_sc_idx, secy, in aq_mdo_upd_txsa()
625 static int aq_clear_txsa(struct aq_nic_s *nic, struct aq_macsec_txsc *aq_txsc, in aq_clear_txsa() argument
628 const int sa_idx = aq_txsc->hw_sc_idx | sa_num; in aq_clear_txsa()
633 clear_bit(sa_num, &aq_txsc->tx_sa_idx_busy); in aq_clear_txsa()
664 ret = aq_clear_txsa(nic, &cfg->aq_txsc[txsc_idx], ctx->sa.assoc_num, in aq_mdo_del_txsa()
1026 struct aq_macsec_txsc *aq_txsc; in aq_mdo_get_tx_sc_stats() local
1033 aq_txsc = &nic->macsec_cfg->aq_txsc[txsc_idx]; in aq_mdo_get_tx_sc_stats()
1034 stats = &aq_txsc->stats; in aq_mdo_get_tx_sc_stats()
1035 aq_get_txsc_stats(hw, aq_txsc->hw_sc_idx, stats); in aq_mdo_get_tx_sc_stats()
1052 struct aq_macsec_txsc *aq_txsc; in aq_mdo_get_tx_sa_stats() local
1063 aq_txsc = &cfg->aq_txsc[txsc_idx]; in aq_mdo_get_tx_sa_stats()
1064 sa_idx = aq_txsc->hw_sc_idx | ctx->sa.assoc_num; in aq_mdo_get_tx_sa_stats()
1065 stats = &aq_txsc->tx_sa_stats[ctx->sa.assoc_num]; in aq_mdo_get_tx_sa_stats()
1073 secy = aq_txsc->sw_secy; in aq_mdo_get_tx_sa_stats()
1173 struct aq_macsec_txsc *aq_txsc = &nic->macsec_cfg->aq_txsc[txsc_idx]; in apply_txsc_cfg() local
1174 const struct macsec_secy *secy = aq_txsc->sw_secy; in apply_txsc_cfg()
1189 ret = aq_update_txsa(nic, aq_txsc->hw_sc_idx, secy, in apply_txsc_cfg()
1190 tx_sa, aq_txsc->tx_sa_key[i], i); in apply_txsc_cfg()
1342 struct aq_macsec_txsc *aq_txsc; in aq_check_txsa_expiration() local
1368 aq_txsc = &cfg->aq_txsc[txsc_idx]; in aq_check_txsa_expiration()
1375 secy = aq_txsc->sw_secy; in aq_check_txsa_expiration()
1382 if (unlikely(!(aq_txsc->tx_sa_idx_busy & BIT(an)))) { in aq_check_txsa_expiration()
1608 cnt += hweight_long(cfg->aq_txsc[i].tx_sa_idx_busy); in aq_macsec_tx_sa_cnt()
1619 struct aq_macsec_txsc *aq_txsc; in aq_macsec_update_stats() local
1629 aq_txsc = &cfg->aq_txsc[i]; in aq_macsec_update_stats()
1631 ret = aq_get_txsc_stats(hw, aq_txsc->hw_sc_idx, in aq_macsec_update_stats()
1632 &aq_txsc->stats); in aq_macsec_update_stats()
1637 if (!test_bit(assoc_num, &aq_txsc->tx_sa_idx_busy)) in aq_macsec_update_stats()
1639 sa_idx = aq_txsc->hw_sc_idx | assoc_num; in aq_macsec_update_stats()
1641 &aq_txsc->tx_sa_stats[assoc_num]); in aq_macsec_update_stats()
1674 struct aq_macsec_txsc *aq_txsc; in aq_macsec_get_stats() local
1715 aq_txsc = &cfg->aq_txsc[sc_num]; in aq_macsec_get_stats()
1716 txsc_stats = &aq_txsc->stats; in aq_macsec_get_stats()
1724 if (!test_bit(assoc_num, &aq_txsc->tx_sa_idx_busy)) in aq_macsec_get_stats()
1727 txsa_stats = &aq_txsc->tx_sa_stats[assoc_num]; in aq_macsec_get_stats()