swconfig: revert the portmapping patches, they seem to cause a segfault

Revert "kernel/swconfig: remove obsolete portmapping feature from swconfig"

This reverts commit 675407baa4.

Revert "swconfig: remove obsolete portmapping feature"

This reverts commit fca1eb349e.

Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
John Crispin
2016-08-16 10:19:13 +02:00
parent 5846620890
commit 99a1888287
8 changed files with 228 additions and 1 deletions

View File

@@ -129,6 +129,7 @@ struct switch_dev {
struct switch_attr *ops;
struct switch_attr *port_ops;
struct switch_attr *vlan_ops;
struct switch_portmap *maps;
struct switch_dev *next;
void *priv;
};
@@ -161,6 +162,11 @@ struct switch_port {
unsigned int flags;
};
struct switch_portmap {
unsigned int virt;
char *segment;
};
struct switch_port_link {
int link:1;
int duplex:1;
@@ -177,6 +183,12 @@ struct switch_port_link {
*/
void swlib_list(void);
/**
* swlib_print_portmap: get portmap
* @dev: switch device struct
*/
void swlib_print_portmap(struct switch_dev *dev, char *segment);
/**
* swlib_connect: connect to the switch through netlink
* @name: name of the ethernet interface,