diff --git a/dongle_infrastructure.c b/dongle_infrastructure.c index 33f40a28cf3386097c41e59c4879a31bcbaee752..cfffd0b727e4acf6cbaa47b6c0ed1105b17b3678 100644 --- a/dongle_infrastructure.c +++ b/dongle_infrastructure.c @@ -79,7 +79,7 @@ int set_pin(struct ubus_context *ctx, struct ubus_object *obj, goto fail_input; } - if (!pin_status(&bb, global_dev->ip)) { + if (!pin_status(&bb, global_dev)) { ubus_send_reply(ctx, req, bb.head); goto disabled; } @@ -189,7 +189,7 @@ int enable_pin(struct ubus_context *ctx, struct ubus_object *obj, goto fail_input; } - if (pin_status(&bb, global_dev->ip)) { + if (pin_status(&bb, global_dev)) { debug_print("pin already enabled"); ubus_send_reply(ctx, req, bb.head); goto enabled; @@ -244,7 +244,7 @@ int verify_pin(struct ubus_context *ctx, struct ubus_object *obj, goto fail_input; } - if (!pin_status(&bb, global_dev->ip)) { + if (!pin_status(&bb, global_dev)) { debug_print("pin disabled"); ubus_send_reply(ctx, req, bb.head); goto disabled; @@ -471,7 +471,7 @@ int connect_network(struct ubus_context *ctx, struct ubus_object *obj, { struct json_object *response; - response = mobile_connect_network_zte(global_dev->ip); + response = mobile_connect_network(global_dev); if (!response) goto fail_unknown; @@ -487,7 +487,7 @@ int disconnect_network(struct ubus_context *ctx, struct ubus_object *obj, { struct json_object *response; - response = mobile_disconnect_network_zte(global_dev->ip); + response = mobile_disconnect_network(global_dev); if (!response) goto fail_unknown; @@ -503,7 +503,7 @@ int modem_state(struct ubus_context *ctx, struct ubus_object *obj, { struct json_object *response; - response = mobile_get_modem_state_zte(global_dev->ip); + response = mobile_get_modem_state(global_dev); if (!response) goto fail_unknown; @@ -519,7 +519,7 @@ int enable_roaming(struct ubus_context *ctx, struct ubus_object *obj, { struct json_object *response; - response = mobile_enable_roaming_zte(global_dev->ip); + response = mobile_enable_roaming(global_dev); if (!response) goto fail_unknown; @@ -535,7 +535,7 @@ int disable_roaming(struct ubus_context *ctx, struct ubus_object *obj, { struct json_object *response; - response = mobile_disable_roaming_zte(global_dev->ip); + response = mobile_disable_roaming(global_dev); if (!response) goto fail_unknown; @@ -551,7 +551,7 @@ int roam_status(struct ubus_context *ctx, struct ubus_object *obj, { struct json_object *response; - response = mobile_get_roam_status_zte(global_dev->ip); + response = mobile_get_roam_status(global_dev); if (!response) goto fail_unknown; diff --git a/libmobile_wrapper.h b/libmobile_wrapper.h index d2dac90429e1ab67c3516abf03ac27847b111ec7..6b55576952c78c2522fad544c799d342253b7067 100644 --- a/libmobile_wrapper.h +++ b/libmobile_wrapper.h @@ -34,5 +34,11 @@ struct json_object *mobile_set_apn_profile(struct device *dev, char *name); struct json_object *mobile_create_apn_profile(struct device *dev, char *profile_name, char *wan_apn, char *pdp_type); struct json_object *mobile_get_current_apn(struct device *dev); struct json_object *mobile_get_rssi(struct device *dev); +struct json_object *mobile_connect_network(struct device *dev); +struct json_object *mobile_disconnect_network(struct device *dev); +struct json_object *mobile_get_modem_state(struct device *dev); +struct json_object *mobile_enable_roaming(struct device *dev); +struct json_object *mobile_disable_roaming(struct device *dev); +struct json_object *mobile_get_roam_status(struct device *dev); struct json_object *mobile_get_pin_status(struct device *dev); #endif \ No newline at end of file