Lines Matching defs:secy

32 static int aq_clear_secy(struct aq_nic_s *nic, const struct macsec_secy *secy,
36 const struct macsec_secy *secy);
50 const struct macsec_secy *secy)
54 if (unlikely(!secy))
58 if (macsec_cfg->aq_txsc[i].sw_secy == secy)
296 ret = aq_apply_secy_cfg(nic, ctx->secy);
319 const struct macsec_secy *secy = aq_txsc->sw_secy;
325 aq_ether_addr_to_mac(tx_class_rec.mac_sa, secy->netdev->dev_addr);
327 put_unaligned_be64((__force u64)secy->sci, tx_class_rec.sci);
343 sc_rec.protect = secy->protect_frames;
344 if (secy->tx_sc.encrypt)
346 if (secy->tx_sc.scb)
348 if (secy->tx_sc.send_sci)
350 if (secy->tx_sc.end_station)
355 if (!(secy->icv_len == 16 && !secy->tx_sc.encrypt))
360 switch (secy->key_len) {
375 sc_rec.curr_an = secy->tx_sc.encoding_sa;
444 const struct macsec_secy *secy = ctx->secy;
449 if (secy->xpn)
465 cfg->aq_txsc[txsc_idx].sw_secy = secy;
467 if (netif_carrier_ok(nic->ndev) && netif_running(secy->netdev))
478 const struct macsec_secy *secy = ctx->secy;
482 txsc_idx = aq_get_txsc_idx_from_secy(nic->macsec_cfg, secy);
486 if (netif_carrier_ok(nic->ndev) && netif_running(secy->netdev))
537 ret = aq_clear_secy(nic, ctx->secy, AQ_CLEAR_ALL);
543 const struct macsec_secy *secy,
567 memcpy(&key_rec.key, key, secy->key_len);
569 aq_rotate_keys(&key_rec.key, secy->key_len);
581 const struct macsec_secy *secy = ctx->secy;
586 txsc_idx = aq_get_txsc_idx_from_secy(cfg, secy);
594 secy->key_len);
596 if (netif_carrier_ok(nic->ndev) && netif_running(secy->netdev))
597 ret = aq_update_txsa(nic, aq_txsc->hw_sc_idx, secy,
608 const struct macsec_secy *secy = ctx->secy;
613 txsc_idx = aq_get_txsc_idx_from_secy(cfg, secy);
618 if (netif_carrier_ok(nic->ndev) && netif_running(secy->netdev))
619 ret = aq_update_txsa(nic, aq_txsc->hw_sc_idx, secy,
660 txsc_idx = aq_get_txsc_idx_from_secy(cfg, ctx->secy);
692 const struct macsec_secy *secy = aq_rxsc->sw_secy;
730 aq_rxsc_validate_frames(secy->validate_frames);
731 if (secy->replay_protect) {
733 sc_record.anti_replay_window = secy->replay_window;
762 cfg->aq_rxsc[rxsc_idx].sw_secy = ctx->secy;
765 if (netif_carrier_ok(nic->ndev) && netif_running(ctx->secy->netdev))
786 if (netif_carrier_ok(nic->ndev) && netif_running(ctx->secy->netdev))
859 const struct macsec_secy *secy,
883 memcpy(&sa_key_record.key, key, secy->key_len);
885 switch (secy->key_len) {
899 aq_rotate_keys(&sa_key_record.key, secy->key_len);
911 const struct macsec_secy *secy = ctx->secy;
924 secy->key_len);
926 if (netif_carrier_ok(nic->ndev) && netif_running(secy->netdev))
927 ret = aq_update_rxsa(nic, aq_rxsc->hw_sc_idx, secy,
939 const struct macsec_secy *secy = ctx->secy;
947 if (netif_carrier_ok(nic->ndev) && netif_running(secy->netdev))
949 secy, ctx->sa.rx_sa, NULL,
1029 txsc_idx = aq_get_txsc_idx_from_secy(nic->macsec_cfg, ctx->secy);
1051 const struct macsec_secy *secy;
1059 txsc_idx = aq_get_txsc_idx_from_secy(cfg, ctx->secy);
1073 secy = aq_txsc->sw_secy;
1074 tx_sa = rcu_dereference_bh(secy->tx_sc.sa[ctx->sa.assoc_num]);
1174 const struct macsec_secy *secy = aq_txsc->sw_secy;
1179 if (!netif_running(secy->netdev))
1187 tx_sa = rcu_dereference_bh(secy->tx_sc.sa[i]);
1189 ret = aq_update_txsa(nic, aq_txsc->hw_sc_idx, secy,
1202 const struct macsec_secy *secy = aq_rxsc->sw_secy;
1207 if (!netif_running(secy->netdev))
1217 ret = aq_update_rxsa(nic, aq_rxsc->hw_sc_idx, secy,
1227 static int aq_clear_secy(struct aq_nic_s *nic, const struct macsec_secy *secy,
1235 txsc_idx = aq_get_txsc_idx_from_secy(nic->macsec_cfg, secy);
1242 for (rx_sc = rcu_dereference_bh(secy->rx_sc); rx_sc;
1257 const struct macsec_secy *secy)
1264 txsc_idx = aq_get_txsc_idx_from_secy(nic->macsec_cfg, secy);
1268 for (rx_sc = rcu_dereference_bh(secy->rx_sc); rx_sc && rx_sc->active;
1343 const struct macsec_secy *secy;
1375 secy = aq_txsc->sw_secy;
1376 if (!netif_running(secy->netdev)) {
1388 tx_sa = rcu_dereference_bh(secy->tx_sc.sa[an]);
1389 macsec_pn_wrapped((struct macsec_secy *)secy, tx_sa);