PKG_CONFIG_PATH=""
AC_SUBST(IWMXSDK_CFLAGS)
AC_SUBST(IWMXSDK_LIBS)
+
+ # Fix API compat breakage from 1.4 to 1.5...
CPPFLAGS_save=$CPPFLAGS
CPPFLAGS="$IWMXSDK_CFLAGS $CPPFLAGS"
AH_TEMPLATE([HAVE_IWMXSDK_STATUS_IDLE],
[AC_DEFINE([HAVE_IWMXSDK_STATUS_IDLE], [1], [])],
[],
[[#include <WiMaxType.h>]])
+
+ AH_TEMPLATE([HAVE_WIMAX_API_DEVICE_ID],
+ [WIMAX_API_DEVICE_ID is present])
+ AC_CHECK_TYPE(WIMAX_API_DEVICE_ID,
+ [AC_DEFINE([HAVE_WIMAX_API_DEVICE_ID], [1], [])],
+ [],
+ [[#include <WiMaxType.h>]])
+
+ AH_TEMPLATE([HAVE_WIMAX_API_HW_DEVICE_ID],
+ [WIMAX_API_HW_DEVICE_ID is present])
+ AC_CHECK_TYPE(WIMAX_API_HW_DEVICE_ID,
+ [AC_DEFINE([HAVE_WIMAX_API_HW_DEVICE_ID], [1], [])],
+ [],
+ [[#include <WiMaxType.h>]])
+
+ AH_TEMPLATE([HAVE_WIMAX_API_NSP_INFO_EX],
+ [WIMAX_API_NSP_INFO_EX is present])
+ AC_CHECK_TYPE(WIMAX_API_NSP_INFO_EX,
+ [AC_DEFINE([HAVE_WIMAX_API_NSP_INFO_EX], [1], [])],
+ [],
+ [[#include <WiMaxType.h>]
+ [#include <WiMaxTypesEx.h>]])
+
+ AH_TEMPLATE([HAVE_WIMAX_API_CONNECTED_NSP_INFO],
+ [WIMAX_API_CONNECTED_NSP_INFO is present])
+ AC_CHECK_TYPE(WIMAX_API_CONNECTED_NSP_INFO,
+ [AC_DEFINE([HAVE_WIMAX_API_CONNECTED_NSP_INFO], [1], [])],
+ [],
+ [[#include <WiMaxType.h>]])
+
CPPFLAGS=$CPPFLAGS_save
fi
AM_CONDITIONAL(IWMX, test "${enable_iwmx}" = "yes")
#include <connman/inet.h>
#include <connman/log.h>
+#include <WiMaxType.h>
#include <WiMaxAPI.h>
#include <WiMaxAPIEx.h>
/* Yes, this is dirty; see above on IWMX_SDK_DEV_MAX*/
static struct wmxsdk g_iwmx_sdk_devs[IWMX_SDK_DEV_MAX];
-static struct wmxsdk *deviceid_to_wmxsdk(struct WIMAX_API_DEVICE_ID *device_id)
+static struct wmxsdk *deviceid_to_wmxsdk(WIMAX_API_DEVICE_ID *device_id)
{
return container_of(device_id, struct wmxsdk, device_id);
}
-static struct WIMAX_API_DEVICE_ID g_api;
+static WIMAX_API_DEVICE_ID g_api;
/*
{
struct connman_network *nw;
- struct WIMAX_API_CONNECTED_NSP_INFO nsp_info;
+ WIMAX_API_CONNECTED_NSP_INFO nsp_info;
WIMAX_API_RET r;
char errstr[512];
UINT32 errstr_size = sizeof(errstr);
* change callback is called and that will fiddle with the connman
* internals.
*/
-static void __iwmx_sdk_rf_state_cb(struct WIMAX_API_DEVICE_ID *device_id,
- WIMAX_API_RF_STATE rf_state)
+static void __iwmx_sdk_rf_state_cb(WIMAX_API_DEVICE_ID *device_id,
+ WIMAX_API_RF_STATE rf_state)
{
DBG("rf_state changed to %d\n", rf_state);
}
* from disconnecting to something else); the state change callback is
* called and that will fiddle with the connman internals.
*/
-static void __iwmx_sdk_connect_cb(struct WIMAX_API_DEVICE_ID *device_id,
- WIMAX_API_NETWORK_CONNECTION_RESP resp)
+static void __iwmx_sdk_connect_cb(WIMAX_API_DEVICE_ID *device_id,
+ WIMAX_API_NETWORK_CONNECTION_RESP resp)
{
WIMAX_API_DEVICE_STATUS status;
struct wmxsdk *wmxsdk = deviceid_to_wmxsdk(device_id);
* We just update the result of the command and wake up anybody who is
* waiting for this conditional variable.
*/
-static void __iwmx_sdk_disconnect_cb(struct WIMAX_API_DEVICE_ID *device_id,
- WIMAX_API_NETWORK_CONNECTION_RESP resp)
+static void __iwmx_sdk_disconnect_cb(WIMAX_API_DEVICE_ID *device_id,
+ WIMAX_API_NETWORK_CONNECTION_RESP resp)
{
struct wmxsdk *wmxsdk = deviceid_to_wmxsdk(device_id);
WIMAX_API_DEVICE_STATUS status;
*
* Just pass them to the state transition handler
*/
-static void __iwmx_sdk_state_change_cb(struct WIMAX_API_DEVICE_ID *device_id,
+static void __iwmx_sdk_state_change_cb(WIMAX_API_DEVICE_ID *device_id,
WIMAX_API_DEVICE_STATUS status,
WIMAX_API_STATUS_REASON reason,
WIMAX_API_CONNECTION_PROGRESS_INFO pi)
* From here we update the connman core idea of which networks are
* available.
*/
-static void __iwmx_sdk_scan_common_cb(struct WIMAX_API_DEVICE_ID *device_id,
- struct WIMAX_API_NSP_INFO_EX *nsp_list,
- UINT32 nsp_list_size)
+static void __iwmx_sdk_scan_common_cb(WIMAX_API_DEVICE_ID *device_id,
+ WIMAX_API_NSP_INFO_EX *nsp_list,
+ UINT32 nsp_list_size)
{
struct wmxsdk *wmxsdk = deviceid_to_wmxsdk(device_id);
unsigned itr;
g_static_mutex_lock(&wmxsdk->network_mutex);
for (itr = 0; itr < nsp_list_size; itr++) {
int strength;
- struct WIMAX_API_NSP_INFO_EX *nsp_info = &nsp_list[itr];
+ WIMAX_API_NSP_INFO_EX *nsp_info = &nsp_list[itr];
snprintf(station_name, sizeof(station_name),
"%s", (char *)nsp_info->NSPName);
/* CAPI is reporing link quality as zero -- if it is
*
* We treat them same as wide, so we just call that.
*/
-static void __iwmx_sdk_wide_scan_cb(struct WIMAX_API_DEVICE_ID *device_id,
- struct WIMAX_API_NSP_INFO_EX *nsp_list,
- UINT32 nsp_list_size)
+static void __iwmx_sdk_wide_scan_cb(WIMAX_API_DEVICE_ID *device_id,
+ WIMAX_API_NSP_INFO_EX *nsp_list,
+ UINT32 nsp_list_size)
{
__iwmx_sdk_scan_common_cb(device_id, nsp_list, nsp_list_size);
}
*
* We treat them same as wide, so we just call that.
*/
-static void __iwmx_sdk_scan_cb(struct WIMAX_API_DEVICE_ID *device_id,
- struct WIMAX_API_NSP_INFO_EX *nsp_list,
+static void __iwmx_sdk_scan_cb(WIMAX_API_DEVICE_ID *device_id,
+ WIMAX_API_NSP_INFO_EX *nsp_list,
UINT32 nsp_list_size, UINT32 searchProgress)
{
__iwmx_sdk_scan_common_cb(device_id, nsp_list, nsp_list_size);
int result;
UINT32 nsp_list_length = 10;
- struct WIMAX_API_NSP_INFO_EX nsp_list[10]; /* FIXME: up to 32? */
+ WIMAX_API_NSP_INFO_EX nsp_list[10]; /* FIXME: up to 32? */
WIMAX_API_RET r;
char errstr[512];
return;
}
-static void iwmx_sdk_addremove_cb(struct WIMAX_API_DEVICE_ID *devid,
- BOOL presence)
+static void iwmx_sdk_addremove_cb(WIMAX_API_DEVICE_ID *devid,
+ BOOL presence)
{
unsigned int cnt;
WIMAX_API_RET r;
- struct WIMAX_API_HW_DEVICE_ID device_id_list[5];
+ WIMAX_API_HW_DEVICE_ID device_id_list[5];
UINT32 device_id_list_size = ARRAY_SIZE(device_id_list);
char errstr[512];
DBG("No WiMAX devices reported\n");
else
for (cnt = 0; cnt < device_id_list_size; cnt++) {
- struct WIMAX_API_HW_DEVICE_ID *dev =
+ WIMAX_API_HW_DEVICE_ID *dev =
device_id_list + cnt;
DBG("#%u index #%u device %s\n",
cnt, dev->deviceIndex, dev->deviceName);
}
if (presence) {
- struct WIMAX_API_HW_DEVICE_ID *dev =
+ WIMAX_API_HW_DEVICE_ID *dev =
device_id_list + devid->deviceIndex;
iwmx_sdk_dev_add(devid->deviceIndex, dev->deviceIndex,
dev->deviceName);
char errstr[512];
UINT32 errstr_size = sizeof(errstr);
- struct WIMAX_API_HW_DEVICE_ID device_id_list[5];
+ WIMAX_API_HW_DEVICE_ID device_id_list[5];
UINT32 device_id_list_size = ARRAY_SIZE(device_id_list);
memset(&g_api, 0, sizeof(g_api));
DBG("No WiMAX devices reported\n");
else
for (cnt = 0; cnt < device_id_list_size; cnt++) {
- struct WIMAX_API_HW_DEVICE_ID *dev =
+ WIMAX_API_HW_DEVICE_ID *dev =
device_id_list + cnt;
DBG("#%u index #%u device %s\n",
cnt, dev->deviceIndex, dev->deviceName);