PKG_CONFIG_PATH=""
AC_SUBST(IWMXSDK_CFLAGS)
AC_SUBST(IWMXSDK_LIBS)
+ CPPFLAGS_save=$CPPFLAGS
+ CPPFLAGS="$IWMXSDK_CFLAGS $CPPFLAGS"
+ AH_TEMPLATE([HAVE_IWMXSDK_STATUS_IDLE],
+ [WIMAX_API_DEVICE_STATUS_Connection_Idle is present])
+ AC_CHECK_DECL(WIMAX_API_DEVICE_STATUS_Connection_Idle,
+ [AC_DEFINE([HAVE_IWMXSDK_STATUS_IDLE], [1], [])],
+ [],
+ [[#include <WiMaxType.h>]])
+ CPPFLAGS=$CPPFLAGS_save
fi
AM_CONDITIONAL(IWMX, test "${enable_iwmx}" = "yes")
* 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;
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:
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";
}
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");
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,
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;
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,
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);