summaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/sja1105/sja1105_dynamic_config.h
diff options
context:
space:
mode:
authorVladimir Oltean2019-06-02 23:11:56 +0200
committerDavid S. Miller2019-06-04 20:49:19 +0200
commit90c96cca351a0d0bfd24a56a516e046a23684677 (patch)
tree45472949f75ec667120ac0c15ba9fde3440e9088 /drivers/net/dsa/sja1105/sja1105_dynamic_config.h
parentnet: dsa: sja1105: Add missing L2 Forwarding Table definitions for P/Q/R/S (diff)
downloadkernel-qcow2-linux-90c96cca351a0d0bfd24a56a516e046a23684677.tar.gz
kernel-qcow2-linux-90c96cca351a0d0bfd24a56a516e046a23684677.tar.xz
kernel-qcow2-linux-90c96cca351a0d0bfd24a56a516e046a23684677.zip
net: dsa: sja1105: Plug in support for TCAM searches via the dynamic interface
Only a single dynamic configuration table of the SJA1105 P/Q/R/S supports this operation: the FDB. To keep the existing structure in place (sja1105_dynamic_config_read and sja1105_dynamic_config_write) and not introduce any new function, a convention is made for sja1105_dynamic_config_read that a negative index argument denotes a search for the entry provided as argument. Signed-off-by: Vladimir Oltean <olteanv@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/sja1105/sja1105_dynamic_config.h')
-rw-r--r--drivers/net/dsa/sja1105/sja1105_dynamic_config.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/dsa/sja1105/sja1105_dynamic_config.h b/drivers/net/dsa/sja1105/sja1105_dynamic_config.h
index 49c611eb02cb..740dadf43f01 100644
--- a/drivers/net/dsa/sja1105/sja1105_dynamic_config.h
+++ b/drivers/net/dsa/sja1105/sja1105_dynamic_config.h
@@ -7,6 +7,9 @@
#include "sja1105.h"
#include <linux/packing.h>
+/* Special index that can be used for sja1105_dynamic_config_read */
+#define SJA1105_SEARCH -1
+
struct sja1105_dyn_cmd;
struct sja1105_dynamic_table_ops {