aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files/include
diff options
context:
space:
mode:
authorJohn Crispin <john@phrozen.org>2016-08-16 10:19:13 +0200
committerJohn Crispin <john@phrozen.org>2016-08-16 10:20:01 +0200
commit99a188828713d6ff9c541590b08d4e63ef52f6d7 (patch)
treeefe6ec0d17b98554bc810ed0e68e0a1f98f2d6a8 /target/linux/generic/files/include
parent58466208909d5b9264537256b353b3c3db57ef0e (diff)
downloadupstream-99a188828713d6ff9c541590b08d4e63ef52f6d7.tar.gz
upstream-99a188828713d6ff9c541590b08d4e63ef52f6d7.tar.bz2
upstream-99a188828713d6ff9c541590b08d4e63ef52f6d7.zip
swconfig: revert the portmapping patches, they seem to cause a segfault
Revert "kernel/swconfig: remove obsolete portmapping feature from swconfig" This reverts commit 675407baa44a8700de20b6b2857009a552a807ba. Revert "swconfig: remove obsolete portmapping feature" This reverts commit fca1eb349ef31b133a62880cbd562d6bf17500aa. Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'target/linux/generic/files/include')
-rw-r--r--target/linux/generic/files/include/linux/switch.h7
-rw-r--r--target/linux/generic/files/include/uapi/linux/switch.h9
2 files changed, 16 insertions, 0 deletions
diff --git a/target/linux/generic/files/include/linux/switch.h b/target/linux/generic/files/include/linux/switch.h
index a381fd006c..dda4820a7a 100644
--- a/target/linux/generic/files/include/linux/switch.h
+++ b/target/linux/generic/files/include/linux/switch.h
@@ -105,6 +105,7 @@ struct switch_dev_ops {
};
struct switch_dev {
+ struct device_node *of_node;
const struct switch_dev_ops *ops;
/* will be automatically filled */
char devname[IFNAMSIZ];
@@ -125,6 +126,7 @@ struct switch_dev {
struct mutex sw_mutex;
struct switch_port *portbuf;
+ struct switch_portmap *portmap;
struct switch_port_link linkbuf;
char buf[128];
@@ -139,6 +141,11 @@ struct switch_port {
u32 flags;
};
+struct switch_portmap {
+ u32 virt;
+ const char *s;
+};
+
struct switch_val {
const struct switch_attr *attr;
int port_vlan;
diff --git a/target/linux/generic/files/include/uapi/linux/switch.h b/target/linux/generic/files/include/uapi/linux/switch.h
index 2a67da2e9d..ea449653fa 100644
--- a/target/linux/generic/files/include/uapi/linux/switch.h
+++ b/target/linux/generic/files/include/uapi/linux/switch.h
@@ -39,6 +39,7 @@ enum {
SWITCH_ATTR_NAME,
SWITCH_ATTR_VLANS,
SWITCH_ATTR_PORTS,
+ SWITCH_ATTR_PORTMAP,
SWITCH_ATTR_CPU_PORT,
/* attributes */
SWITCH_ATTR_OP_ID,
@@ -56,6 +57,14 @@ enum {
SWITCH_ATTR_MAX
};
+enum {
+ /* port map */
+ SWITCH_PORTMAP_PORTS,
+ SWITCH_PORTMAP_SEGMENT,
+ SWITCH_PORTMAP_VIRT,
+ SWITCH_PORTMAP_MAX
+};
+
/* commands */
enum {
SWITCH_CMD_UNSPEC,