diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/iwmx.c | 3 | ||||
-rw-r--r-- | plugins/iwmxsdk.c | 18 |
2 files changed, 18 insertions, 3 deletions
diff --git a/plugins/iwmx.c b/plugins/iwmx.c index ccbd1d21..74e9786c 100644 --- a/plugins/iwmx.c +++ b/plugins/iwmx.c @@ -299,6 +299,7 @@ void __iwmx_cm_state_change(struct wmxsdk *wmxsdk, * For practical effects, some states are the same */ +#if HAVE_IWMXSDK_STATUS_IDLE /* Conection_Idle is the same as Data_Connected */ if (__old_status == WIMAX_API_DEVICE_STATUS_Connection_Idle) old_status = WIMAX_API_DEVICE_STATUS_Data_Connected; @@ -308,7 +309,7 @@ void __iwmx_cm_state_change(struct wmxsdk *wmxsdk, new_status = WIMAX_API_DEVICE_STATUS_Data_Connected; else new_status = __new_status; - +#endif /* #if HAVE_IWMXSDK_STATUS_IDLE */ /* Radio off: all are just RF_OFF_SW (the highest) */ switch (__old_status) { case WIMAX_API_DEVICE_STATUS_RF_OFF_HW_SW: diff --git a/plugins/iwmxsdk.c b/plugins/iwmxsdk.c index 60466e5c..7888c09a 100644 --- a/plugins/iwmxsdk.c +++ b/plugins/iwmxsdk.c @@ -98,8 +98,10 @@ const char *iwmx_sdk_dev_status_to_str(WIMAX_API_DEVICE_STATUS status) return "Connection in progress"; case WIMAX_API_DEVICE_STATUS_Data_Connected: return "Layer 2 connected"; +#if HAVE_IWMXSDK_STATUS_IDLE case WIMAX_API_DEVICE_STATUS_Connection_Idle: return "Idle connection"; +#endif /* #if HAVE_IWMXSDK_STATUS_IDLE */ default: return "unknown state"; } @@ -298,7 +300,9 @@ int iwmx_sdk_rf_state_set(struct wmxsdk *wmxsdk, WIMAX_API_RF_STATE rf_state) case WIMAX_API_DEVICE_STATUS_Scanning: case WIMAX_API_DEVICE_STATUS_Connecting: case WIMAX_API_DEVICE_STATUS_Data_Connected: +#if HAVE_IWMXSDK_STATUS_IDLE case WIMAX_API_DEVICE_STATUS_Connection_Idle: +#endif if (rf_state == WIMAX_API_RF_ON) { result = 0; DBG("radio is already on\n"); @@ -346,7 +350,10 @@ static void __iwmx_sdk_connect_cb(struct WIMAX_API_DEVICE_ID *device_id, status = iwmx_cm_status_get(wmxsdk); if (resp == WIMAX_API_CONNECTION_SUCCESS) { if (status != WIMAX_API_DEVICE_STATUS_Data_Connected - && status != WIMAX_API_DEVICE_STATUS_Connection_Idle) +#if HAVE_IWMXSDK_STATUS_IDLE + && status != WIMAX_API_DEVICE_STATUS_Connection_Idle +#endif + ) connman_error("wmxsdk: error: connect worked, but state" " didn't change (now it is %d [%s])\n", status, @@ -406,7 +413,9 @@ int iwmx_sdk_connect(struct wmxsdk *wmxsdk, struct connman_network *nw) result = -EINPROGRESS; goto error_cant_do; case WIMAX_API_DEVICE_STATUS_Data_Connected: +#if HAVE_IWMXSDK_STATUS_IDLE case WIMAX_API_DEVICE_STATUS_Connection_Idle: +#endif connman_error("wmxsdk: BUG? need to disconnect?\n"); result = -EINVAL; goto error_cant_do; @@ -459,7 +468,10 @@ static void __iwmx_sdk_disconnect_cb(struct WIMAX_API_DEVICE_ID *device_id, status = iwmx_cm_status_get(wmxsdk); if (resp == WIMAX_API_CONNECTION_SUCCESS) { if (status == WIMAX_API_DEVICE_STATUS_Data_Connected - || status == WIMAX_API_DEVICE_STATUS_Connection_Idle) +#if HAVE_IWMXSDK_STATUS_IDLE + || status == WIMAX_API_DEVICE_STATUS_Connection_Idle +#endif + ) connman_error("wmxsdk: error: disconnect worked, " "but state didn't change (now it is " "%d [%s])\n", status, @@ -510,7 +522,9 @@ int iwmx_sdk_disconnect(struct wmxsdk *wmxsdk) goto error_cant_do; case WIMAX_API_DEVICE_STATUS_Connecting: case WIMAX_API_DEVICE_STATUS_Data_Connected: +#if HAVE_IWMXSDK_STATUS_IDLE case WIMAX_API_DEVICE_STATUS_Connection_Idle: +#endif break; default: g_assert(1); |