struct switch_attrlist {
/* filled in by the driver */
int n_attr;
- struct switch_attr *attr;
+ const struct switch_attr *attr;
};
int (*get_vlan_ports)(struct switch_dev *dev, struct switch_val *val);
int (*set_vlan_ports)(struct switch_dev *dev, struct switch_val *val);
+ int (*get_port_pvid)(struct switch_dev *dev, int port, int *val);
+ int (*set_port_pvid)(struct switch_dev *dev, int port, int val);
int (*apply_config)(struct switch_dev *dev);
};
};
struct switch_val {
- struct switch_attr *attr;
+ const struct switch_attr *attr;
int port_vlan;
int len;
union {
const char *name;
const char *description;
- int (*set)(struct switch_dev *dev, struct switch_attr *attr, struct switch_val *val);
- int (*get)(struct switch_dev *dev, struct switch_attr *attr, struct switch_val *val);
+ int (*set)(struct switch_dev *dev, const struct switch_attr *attr, struct switch_val *val);
+ int (*get)(struct switch_dev *dev, const struct switch_attr *attr, struct switch_val *val);
/* for driver internal use */
int id;