summaryrefslogtreecommitdiffstats
path: root/bcmdhd/dhdutil/dhdu_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'bcmdhd/dhdutil/dhdu_common.h')
-rw-r--r--bcmdhd/dhdutil/dhdu_common.h59
1 files changed, 55 insertions, 4 deletions
diff --git a/bcmdhd/dhdutil/dhdu_common.h b/bcmdhd/dhdutil/dhdu_common.h
index d1a70f0..6ea2ca2 100644
--- a/bcmdhd/dhdutil/dhdu_common.h
+++ b/bcmdhd/dhdutil/dhdu_common.h
@@ -1,7 +1,7 @@
/*
- * Common code for dhd command line utility.
+ * Linux port of dhd command line utility, hacked from wl utility.
*
- * Copyright (C) 1999-2011, Broadcom Corporation
+ * Copyright (C) 2012, Broadcom Corporation
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: dhdu_common.h,v 1.4.34.1 2011-02-05 00:43:28 Exp $
+ * $Id: dhdu_common.h 308298 2012-01-14 01:35:34Z $
*/
/* Common header file for dhdu_linux.c and dhdu_ndis.c */
@@ -23,15 +23,66 @@
#ifndef _dhdu_common_h
#define _dhdu_common_h
+#if !defined(RWL_WIFI) && !defined(RWL_SOCKET) && !defined(RWL_SERIAL)
+
+#define NO_REMOTE 0
+#define REMOTE_SERIAL 1
+#define REMOTE_SOCKET 2
+#define REMOTE_WIFI 3
+#define REMOTE_DONGLE 4
+
+/* For cross OS support */
+#define LINUX_OS 1
+#define WIN32_OS 2
+#define MAC_OSX 3
+#define BACKLOG 4
+#define WINVISTA_OS 5
+#define INDONGLE 6
+
+#define RWL_WIFI_ACTION_CMD "wifiaction"
+#define RWL_WIFI_GET_ACTION_CMD "rwlwifivsaction"
+#define RWL_DONGLE_SET_CMD "dongleset"
+
+#define SUCCESS 1
+#define FAIL -1
+#define NO_PACKET -2
+#define SERIAL_PORT_ERR -3
+
+/* Added for debug utility support */
+#define ERR stderr
+#define OUTPUT stdout
+#define DEBUG_ERR 0x0001
+#define DEBUG_INFO 0x0002
+#define DEBUG_DBG 0x0004
+
+#define DPRINT_ERR if (defined_debug & DEBUG_ERR) \
+ fprintf
+#define DPRINT_INFO if (defined_debug & DEBUG_INFO) \
+ fprintf
+#define DPRINT_DBG if (defined_debug & DEBUG_DBG) \
+ fprintf
+
+extern int wl_get(void *wl, int cmd, void *buf, int len);
+extern int wl_set(void *wl, int cmd, void *buf, int len);
+#endif
+
/* DHD utility function declarations */
extern int dhd_check(void *dhd);
extern int dhd_atoip(const char *a, struct ipv4_addr *n);
extern int dhd_option(char ***pargv, char **pifname, int *phelp);
void dhd_usage(cmd_t *port_cmds);
-static int process_args(struct ifreq* ifr, char **argv);
+/* Remote DHD declarations */
+int remote_type = NO_REMOTE;
+extern char *g_rwl_buf_mac;
+extern char* g_rwl_device_name_serial;
+unsigned short g_rwl_servport;
+char *g_rwl_servIP = NULL;
+unsigned short defined_debug = DEBUG_ERR | DEBUG_INFO;
+static int process_args(struct ifreq* ifr, char **argv);
+
#define dtoh32(i) i
#define dtoh16(i) i