Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bcdfbf8d authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Revert "macsec: use DEV_STATS_INC()"



This reverts commit 3a3bb438 which is
commit 32d0a49d36a2a306c2e47fe5659361e424f0ed3f upstream.

It breaks the build, so remove it from the Android kernel for now.  If
it is needed in the future, it can come back in way that actually works.

Fixes: 3a3bb438 ("macsec: use DEV_STATS_INC()")
Change-Id: I0c532c24cee9dce526dd9b974c77b13b97c5b564
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 8e2d221d
Loading
Loading
Loading
Loading
+14 −14
Original line number Diff line number Diff line
@@ -825,7 +825,7 @@ static bool macsec_post_decrypt(struct sk_buff *skb, struct macsec_secy *secy, u
		u64_stats_update_begin(&rxsc_stats->syncp);
		rxsc_stats->stats.InPktsLate++;
		u64_stats_update_end(&rxsc_stats->syncp);
		DEV_STATS_INC(secy->netdev, rx_dropped);
		secy->netdev->stats.rx_dropped++;
		return false;
	}

@@ -849,7 +849,7 @@ static bool macsec_post_decrypt(struct sk_buff *skb, struct macsec_secy *secy, u
			rxsc_stats->stats.InPktsNotValid++;
			u64_stats_update_end(&rxsc_stats->syncp);
			this_cpu_inc(rx_sa->stats->InPktsNotValid);
			DEV_STATS_INC(secy->netdev, rx_errors);
			secy->netdev->stats.rx_errors++;
			return false;
		}

@@ -1079,7 +1079,7 @@ static void handle_not_macsec(struct sk_buff *skb)
			u64_stats_update_begin(&secy_stats->syncp);
			secy_stats->stats.InPktsNoTag++;
			u64_stats_update_end(&secy_stats->syncp);
			DEV_STATS_INC(macsec->secy.netdev, rx_dropped);
			macsec->secy.netdev->stats.rx_dropped++;
			continue;
		}

@@ -1191,7 +1191,7 @@ static rx_handler_result_t macsec_handle_frame(struct sk_buff **pskb)
		u64_stats_update_begin(&secy_stats->syncp);
		secy_stats->stats.InPktsBadTag++;
		u64_stats_update_end(&secy_stats->syncp);
		DEV_STATS_INC(secy->netdev, rx_errors);
		secy->netdev->stats.rx_errors++;
		goto drop_nosa;
	}

@@ -1208,7 +1208,7 @@ static rx_handler_result_t macsec_handle_frame(struct sk_buff **pskb)
			u64_stats_update_begin(&rxsc_stats->syncp);
			rxsc_stats->stats.InPktsNotUsingSA++;
			u64_stats_update_end(&rxsc_stats->syncp);
			DEV_STATS_INC(secy->netdev, rx_errors);
			secy->netdev->stats.rx_errors++;
			if (active_rx_sa)
				this_cpu_inc(active_rx_sa->stats->InPktsNotUsingSA);
			goto drop_nosa;
@@ -1239,7 +1239,7 @@ static rx_handler_result_t macsec_handle_frame(struct sk_buff **pskb)
			u64_stats_update_begin(&rxsc_stats->syncp);
			rxsc_stats->stats.InPktsLate++;
			u64_stats_update_end(&rxsc_stats->syncp);
			DEV_STATS_INC(macsec->secy.netdev, rx_dropped);
			macsec->secy.netdev->stats.rx_dropped++;
			goto drop;
		}
	}
@@ -1280,7 +1280,7 @@ static rx_handler_result_t macsec_handle_frame(struct sk_buff **pskb)
	if (ret == NET_RX_SUCCESS)
		count_rx(dev, len);
	else
		DEV_STATS_INC(macsec->secy.netdev, rx_dropped);
		macsec->secy.netdev->stats.rx_dropped++;

	rcu_read_unlock();

@@ -1317,7 +1317,7 @@ static rx_handler_result_t macsec_handle_frame(struct sk_buff **pskb)
			u64_stats_update_begin(&secy_stats->syncp);
			secy_stats->stats.InPktsNoSCI++;
			u64_stats_update_end(&secy_stats->syncp);
			DEV_STATS_INC(macsec->secy.netdev, rx_errors);
			macsec->secy.netdev->stats.rx_errors++;
			continue;
		}

@@ -1336,7 +1336,7 @@ static rx_handler_result_t macsec_handle_frame(struct sk_buff **pskb)
			secy_stats->stats.InPktsUnknownSCI++;
			u64_stats_update_end(&secy_stats->syncp);
		} else {
			DEV_STATS_INC(macsec->secy.netdev, rx_dropped);
			macsec->secy.netdev->stats.rx_dropped++;
		}
	}

@@ -2770,7 +2770,7 @@ static netdev_tx_t macsec_start_xmit(struct sk_buff *skb,

	if (!secy->operational) {
		kfree_skb(skb);
		DEV_STATS_INC(dev, tx_dropped);
		dev->stats.tx_dropped++;
		return NETDEV_TX_OK;
	}

@@ -2778,7 +2778,7 @@ static netdev_tx_t macsec_start_xmit(struct sk_buff *skb,
	skb = macsec_encrypt(skb, dev);
	if (IS_ERR(skb)) {
		if (PTR_ERR(skb) != -EINPROGRESS)
			DEV_STATS_INC(dev, tx_dropped);
			dev->stats.tx_dropped++;
		return NETDEV_TX_OK;
	}

@@ -2996,9 +2996,9 @@ static void macsec_get_stats64(struct net_device *dev,
		s->tx_bytes   += tmp.tx_bytes;
	}

	s->rx_dropped = atomic_long_read(&dev->stats.__rx_dropped);
	s->tx_dropped = atomic_long_read(&dev->stats.__tx_dropped);
	s->rx_errors = atomic_long_read(&dev->stats.__rx_errors);
	s->rx_dropped = dev->stats.rx_dropped;
	s->tx_dropped = dev->stats.tx_dropped;
	s->rx_errors = dev->stats.rx_errors;
}

static int macsec_get_iflink(const struct net_device *dev)