@@ -289,7 +289,7 @@ static int aq_get_txsc_stats(struct aq_hw_s *hw, const int sc_idx,
289289
290290static int aq_mdo_dev_open (struct macsec_context * ctx )
291291{
292- struct aq_nic_s * nic = netdev_priv (ctx -> netdev );
292+ struct aq_nic_s * nic = macsec_netdev_priv (ctx -> netdev );
293293 int ret = 0 ;
294294
295295 if (netif_carrier_ok (nic -> ndev ))
@@ -300,7 +300,7 @@ static int aq_mdo_dev_open(struct macsec_context *ctx)
300300
301301static int aq_mdo_dev_stop (struct macsec_context * ctx )
302302{
303- struct aq_nic_s * nic = netdev_priv (ctx -> netdev );
303+ struct aq_nic_s * nic = macsec_netdev_priv (ctx -> netdev );
304304 int i ;
305305
306306 for (i = 0 ; i < AQ_MACSEC_MAX_SC ; i ++ ) {
@@ -439,7 +439,7 @@ static enum aq_macsec_sc_sa sc_sa_from_num_an(const int num_an)
439439
440440static int aq_mdo_add_secy (struct macsec_context * ctx )
441441{
442- struct aq_nic_s * nic = netdev_priv (ctx -> netdev );
442+ struct aq_nic_s * nic = macsec_netdev_priv (ctx -> netdev );
443443 struct aq_macsec_cfg * cfg = nic -> macsec_cfg ;
444444 const struct macsec_secy * secy = ctx -> secy ;
445445 enum aq_macsec_sc_sa sc_sa ;
@@ -474,7 +474,7 @@ static int aq_mdo_add_secy(struct macsec_context *ctx)
474474
475475static int aq_mdo_upd_secy (struct macsec_context * ctx )
476476{
477- struct aq_nic_s * nic = netdev_priv (ctx -> netdev );
477+ struct aq_nic_s * nic = macsec_netdev_priv (ctx -> netdev );
478478 const struct macsec_secy * secy = ctx -> secy ;
479479 int txsc_idx ;
480480 int ret = 0 ;
@@ -528,7 +528,7 @@ static int aq_clear_txsc(struct aq_nic_s *nic, const int txsc_idx,
528528
529529static int aq_mdo_del_secy (struct macsec_context * ctx )
530530{
531- struct aq_nic_s * nic = netdev_priv (ctx -> netdev );
531+ struct aq_nic_s * nic = macsec_netdev_priv (ctx -> netdev );
532532 int ret = 0 ;
533533
534534 if (!nic -> macsec_cfg )
@@ -576,7 +576,7 @@ static int aq_update_txsa(struct aq_nic_s *nic, const unsigned int sc_idx,
576576
577577static int aq_mdo_add_txsa (struct macsec_context * ctx )
578578{
579- struct aq_nic_s * nic = netdev_priv (ctx -> netdev );
579+ struct aq_nic_s * nic = macsec_netdev_priv (ctx -> netdev );
580580 struct aq_macsec_cfg * cfg = nic -> macsec_cfg ;
581581 const struct macsec_secy * secy = ctx -> secy ;
582582 struct aq_macsec_txsc * aq_txsc ;
@@ -603,7 +603,7 @@ static int aq_mdo_add_txsa(struct macsec_context *ctx)
603603
604604static int aq_mdo_upd_txsa (struct macsec_context * ctx )
605605{
606- struct aq_nic_s * nic = netdev_priv (ctx -> netdev );
606+ struct aq_nic_s * nic = macsec_netdev_priv (ctx -> netdev );
607607 struct aq_macsec_cfg * cfg = nic -> macsec_cfg ;
608608 const struct macsec_secy * secy = ctx -> secy ;
609609 struct aq_macsec_txsc * aq_txsc ;
@@ -652,7 +652,7 @@ static int aq_clear_txsa(struct aq_nic_s *nic, struct aq_macsec_txsc *aq_txsc,
652652
653653static int aq_mdo_del_txsa (struct macsec_context * ctx )
654654{
655- struct aq_nic_s * nic = netdev_priv (ctx -> netdev );
655+ struct aq_nic_s * nic = macsec_netdev_priv (ctx -> netdev );
656656 struct aq_macsec_cfg * cfg = nic -> macsec_cfg ;
657657 int txsc_idx ;
658658 int ret = 0 ;
@@ -744,7 +744,7 @@ static int aq_set_rxsc(struct aq_nic_s *nic, const u32 rxsc_idx)
744744
745745static int aq_mdo_add_rxsc (struct macsec_context * ctx )
746746{
747- struct aq_nic_s * nic = netdev_priv (ctx -> netdev );
747+ struct aq_nic_s * nic = macsec_netdev_priv (ctx -> netdev );
748748 struct aq_macsec_cfg * cfg = nic -> macsec_cfg ;
749749 const u32 rxsc_idx_max = aq_sc_idx_max (cfg -> sc_sa );
750750 u32 rxsc_idx ;
@@ -775,7 +775,7 @@ static int aq_mdo_add_rxsc(struct macsec_context *ctx)
775775
776776static int aq_mdo_upd_rxsc (struct macsec_context * ctx )
777777{
778- struct aq_nic_s * nic = netdev_priv (ctx -> netdev );
778+ struct aq_nic_s * nic = macsec_netdev_priv (ctx -> netdev );
779779 int rxsc_idx ;
780780 int ret = 0 ;
781781
@@ -838,7 +838,7 @@ static int aq_clear_rxsc(struct aq_nic_s *nic, const int rxsc_idx,
838838
839839static int aq_mdo_del_rxsc (struct macsec_context * ctx )
840840{
841- struct aq_nic_s * nic = netdev_priv (ctx -> netdev );
841+ struct aq_nic_s * nic = macsec_netdev_priv (ctx -> netdev );
842842 enum aq_clear_type clear_type = AQ_CLEAR_SW ;
843843 int rxsc_idx ;
844844 int ret = 0 ;
@@ -906,8 +906,8 @@ static int aq_update_rxsa(struct aq_nic_s *nic, const unsigned int sc_idx,
906906
907907static int aq_mdo_add_rxsa (struct macsec_context * ctx )
908908{
909+ struct aq_nic_s * nic = macsec_netdev_priv (ctx -> netdev );
909910 const struct macsec_rx_sc * rx_sc = ctx -> sa .rx_sa -> sc ;
910- struct aq_nic_s * nic = netdev_priv (ctx -> netdev );
911911 const struct macsec_secy * secy = ctx -> secy ;
912912 struct aq_macsec_rxsc * aq_rxsc ;
913913 int rxsc_idx ;
@@ -933,8 +933,8 @@ static int aq_mdo_add_rxsa(struct macsec_context *ctx)
933933
934934static int aq_mdo_upd_rxsa (struct macsec_context * ctx )
935935{
936+ struct aq_nic_s * nic = macsec_netdev_priv (ctx -> netdev );
936937 const struct macsec_rx_sc * rx_sc = ctx -> sa .rx_sa -> sc ;
937- struct aq_nic_s * nic = netdev_priv (ctx -> netdev );
938938 struct aq_macsec_cfg * cfg = nic -> macsec_cfg ;
939939 const struct macsec_secy * secy = ctx -> secy ;
940940 int rxsc_idx ;
@@ -982,8 +982,8 @@ static int aq_clear_rxsa(struct aq_nic_s *nic, struct aq_macsec_rxsc *aq_rxsc,
982982
983983static int aq_mdo_del_rxsa (struct macsec_context * ctx )
984984{
985+ struct aq_nic_s * nic = macsec_netdev_priv (ctx -> netdev );
985986 const struct macsec_rx_sc * rx_sc = ctx -> sa .rx_sa -> sc ;
986- struct aq_nic_s * nic = netdev_priv (ctx -> netdev );
987987 struct aq_macsec_cfg * cfg = nic -> macsec_cfg ;
988988 int rxsc_idx ;
989989 int ret = 0 ;
@@ -1000,7 +1000,7 @@ static int aq_mdo_del_rxsa(struct macsec_context *ctx)
10001000
10011001static int aq_mdo_get_dev_stats (struct macsec_context * ctx )
10021002{
1003- struct aq_nic_s * nic = netdev_priv (ctx -> netdev );
1003+ struct aq_nic_s * nic = macsec_netdev_priv (ctx -> netdev );
10041004 struct aq_macsec_common_stats * stats = & nic -> macsec_cfg -> stats ;
10051005 struct aq_hw_s * hw = nic -> aq_hw ;
10061006
@@ -1020,7 +1020,7 @@ static int aq_mdo_get_dev_stats(struct macsec_context *ctx)
10201020
10211021static int aq_mdo_get_tx_sc_stats (struct macsec_context * ctx )
10221022{
1023- struct aq_nic_s * nic = netdev_priv (ctx -> netdev );
1023+ struct aq_nic_s * nic = macsec_netdev_priv (ctx -> netdev );
10241024 struct aq_macsec_tx_sc_stats * stats ;
10251025 struct aq_hw_s * hw = nic -> aq_hw ;
10261026 struct aq_macsec_txsc * aq_txsc ;
@@ -1044,7 +1044,7 @@ static int aq_mdo_get_tx_sc_stats(struct macsec_context *ctx)
10441044
10451045static int aq_mdo_get_tx_sa_stats (struct macsec_context * ctx )
10461046{
1047- struct aq_nic_s * nic = netdev_priv (ctx -> netdev );
1047+ struct aq_nic_s * nic = macsec_netdev_priv (ctx -> netdev );
10481048 struct aq_macsec_cfg * cfg = nic -> macsec_cfg ;
10491049 struct aq_macsec_tx_sa_stats * stats ;
10501050 struct aq_hw_s * hw = nic -> aq_hw ;
@@ -1084,7 +1084,7 @@ static int aq_mdo_get_tx_sa_stats(struct macsec_context *ctx)
10841084
10851085static int aq_mdo_get_rx_sc_stats (struct macsec_context * ctx )
10861086{
1087- struct aq_nic_s * nic = netdev_priv (ctx -> netdev );
1087+ struct aq_nic_s * nic = macsec_netdev_priv (ctx -> netdev );
10881088 struct aq_macsec_cfg * cfg = nic -> macsec_cfg ;
10891089 struct aq_macsec_rx_sa_stats * stats ;
10901090 struct aq_hw_s * hw = nic -> aq_hw ;
@@ -1129,7 +1129,7 @@ static int aq_mdo_get_rx_sc_stats(struct macsec_context *ctx)
11291129
11301130static int aq_mdo_get_rx_sa_stats (struct macsec_context * ctx )
11311131{
1132- struct aq_nic_s * nic = netdev_priv (ctx -> netdev );
1132+ struct aq_nic_s * nic = macsec_netdev_priv (ctx -> netdev );
11331133 struct aq_macsec_cfg * cfg = nic -> macsec_cfg ;
11341134 struct aq_macsec_rx_sa_stats * stats ;
11351135 struct aq_hw_s * hw = nic -> aq_hw ;
@@ -1399,7 +1399,7 @@ static void aq_check_txsa_expiration(struct aq_nic_s *nic)
13991399#define AQ_LOCKED_MDO_DEF (mdo ) \
14001400static int aq_locked_mdo_##mdo(struct macsec_context *ctx) \
14011401{ \
1402- struct aq_nic_s *nic = netdev_priv (ctx->netdev); \
1402+ struct aq_nic_s *nic = macsec_netdev_priv (ctx->netdev); \
14031403 int ret; \
14041404 mutex_lock(&nic->macsec_mutex); \
14051405 ret = aq_mdo_##mdo(ctx); \
0 commit comments