void *connman_device_get_data(struct connman_device *device);
void connman_device_set_data(struct connman_device *device, void *data);
+int connman_device_set_regdom(struct connman_device *device,
+ const char *alpha2);
+
struct connman_device_driver {
const char *name;
enum connman_device_type type;
const char *ssid, unsigned int ssid_len,
const char *identity, const char* passphrase,
void *user_data);
+ int (*set_regdom) (struct connman_device *device,
+ const char *alpha2);
};
int connman_device_driver_register(struct connman_device_driver *driver);
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;