aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/etherswitch/etherswitch.c
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2013-05-08 20:46:54 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2013-05-08 20:46:54 +0000
commita48a9355ef875dfdcf5759a4fb401b4d3b83a36c (patch)
treef46e6a9e51654bb8eb5453d71ae3f0af8f087b23 /sys/dev/etherswitch/etherswitch.c
parentb96e78e02cf491d1ec1976b239bff22600bb655c (diff)
Notes
Diffstat (limited to 'sys/dev/etherswitch/etherswitch.c')
-rw-r--r--sys/dev/etherswitch/etherswitch.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/dev/etherswitch/etherswitch.c b/sys/dev/etherswitch/etherswitch.c
index 01a94afd2c3f8..c2f2860dccd1b 100644
--- a/sys/dev/etherswitch/etherswitch.c
+++ b/sys/dev/etherswitch/etherswitch.c
@@ -200,6 +200,7 @@ etherswitchioctl(struct cdev *cdev, u_long cmd, caddr_t data, int flags, struct
struct etherswitch_softc *sc = cdev->si_drv1;
device_t dev = sc->sc_dev;
device_t etherswitch = device_get_parent(dev);
+ etherswitch_conf_t conf;
etherswitch_info_t *info;
etherswitch_reg_t *reg;
etherswitch_phyreg_t *phyreg;
@@ -251,6 +252,16 @@ etherswitchioctl(struct cdev *cdev, u_long cmd, caddr_t data, int flags, struct
error = ETHERSWITCH_WRITEPHYREG(etherswitch, phyreg->phy, phyreg->reg, phyreg->val);
break;
+ case IOETHERSWITCHGETCONF:
+ bzero(&conf, sizeof(etherswitch_conf_t));
+ error = ETHERSWITCH_GETCONF(etherswitch, &conf);
+ bcopy(&conf, data, sizeof(etherswitch_conf_t));
+ break;
+
+ case IOETHERSWITCHSETCONF:
+ error = ETHERSWITCH_SETCONF(etherswitch, (etherswitch_conf_t *)data);
+ break;
+
default:
error = ENOTTY;
}