summaryrefslogtreecommitdiff
path: root/src/device.c
diff options
context:
space:
mode:
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>2012-07-04 16:48:00 +0300
committerMarcel Holtmann <marcel@holtmann.org>2012-07-05 09:04:53 +0200
commit89077bfd2abf7984027552c8cee223a0c6dab57c (patch)
treeda4908880e94df66cd735bb5b469005586e88211 /src/device.c
parentcebd23c090f3026b2496e1f0e4a18c42d34ccd14 (diff)
downloadconnman-89077bfd2abf7984027552c8cee223a0c6dab57c.tar.gz
connman-89077bfd2abf7984027552c8cee223a0c6dab57c.tar.bz2
connman-89077bfd2abf7984027552c8cee223a0c6dab57c.zip
device: Add driver capability to set regulatory domain on device basis
Diffstat (limited to 'src/device.c')
-rw-r--r--src/device.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/device.c b/src/device.c
index f2f3ce5e..43ebb6c4 100644
--- a/src/device.c
+++ b/src/device.c
@@ -1045,6 +1045,22 @@ struct connman_device *__connman_device_find_device(
return NULL;
}
+/**
+ * connman_device_set_regdom
+ * @device: device structure
+ * @alpha2: string representing regulatory domain
+ *
+ * Set regulatory domain on device basis
+ */
+int connman_device_set_regdom(struct connman_device *device,
+ const char *alpha2)
+{
+ if (device->driver == NULL || device->driver->set_regdom == NULL)
+ return -ENOTSUP;
+
+ return device->driver->set_regdom(device, alpha2);
+}
+
int __connman_device_request_scan(enum connman_service_type type)
{
connman_bool_t success = FALSE;