net: dsa: sja1105: make dp->priv point directly to sja1105_tagger_data

The design of the sja1105 tagger dp->priv is that each port has a
separate struct sja1105_port, and the sp->data pointer points to a
common struct sja1105_tagger_data.

We have removed all per-port members accessible by the tagger, and now
only struct sja1105_tagger_data remains. Make dp->priv point directly to
this.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Vladimir Oltean
2021-12-10 01:34:42 +02:00
committed by David S. Miller
parent 6f6770ab1c
commit bfcf142522
5 changed files with 37 additions and 49 deletions

View File

@@ -43,9 +43,7 @@ struct sja1105_deferred_xmit_work {
struct kthread_work work;
};
/* Global tagger data: each struct sja1105_port has a reference to
* the structure defined in struct sja1105_private.
*/
/* Global tagger data */
struct sja1105_tagger_data {
struct sk_buff *stampable_skb;
/* Protects concurrent access to the meta state machine
@@ -72,10 +70,6 @@ struct sja1105_skb_cb {
#define SJA1105_SKB_CB(skb) \
((struct sja1105_skb_cb *)((skb)->cb))
struct sja1105_port {
struct sja1105_tagger_data *data;
};
/* Timestamps are in units of 8 ns clock ticks (equivalent to
* a fixed 125 MHz clock).
*/