summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/bcmdhd/dhd.h
diff options
context:
space:
mode:
authorLin Ma <linm@broadcom.com>2011-06-27 18:53:59 -0700
committerDmitry Shmidt <dimitrysh@google.com>2011-07-01 17:03:37 -0700
commit3f409b9c1f6300114f8de2f52f518decafdeb451 (patch)
tree78c238ac7200247e4b47e689ccd6e61725c130ed /drivers/net/wireless/bcmdhd/dhd.h
parent0db1fec422e22f9c7726f3c3a091bc834121728a (diff)
Update to 5.90.125.32:
* Move Android specific functions to wl_android (wifi control functions, wifi device, pre-alloc buffer.) * Link Android start/stop commands to interface up/down (download firmware when primary interfacde is up.) * Fix a issue in driver unload, the same IRQ can not be disabled twice (set_irq_wake) Change-Id: Id49c4f746f69371323c9a34834c3b628b78ff713 Signed-off-by: Howard M. Harte <hharte@broadcom.com> Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'drivers/net/wireless/bcmdhd/dhd.h')
-rw-r--r--drivers/net/wireless/bcmdhd/dhd.h28
1 files changed, 23 insertions, 5 deletions
diff --git a/drivers/net/wireless/bcmdhd/dhd.h b/drivers/net/wireless/bcmdhd/dhd.h
index f7a103acc44..4a7f571c766 100644
--- a/drivers/net/wireless/bcmdhd/dhd.h
+++ b/drivers/net/wireless/bcmdhd/dhd.h
@@ -93,9 +93,21 @@ enum dhd_prealloc_index {
DHD_PREALLOC_DATABUF,
DHD_PREALLOC_OSL_BUF
};
-#ifdef DHD_USE_STATIC_BUF
-extern void * dhd_os_prealloc(int section, unsigned long size);
-#endif
+
+#if defined(DHD_USE_STATIC_BUF)
+
+uint8* dhd_os_prealloc(void *osh, int section, uint size);
+void dhd_os_prefree(void *osh, void *addr, uint size);
+#define DHD_OS_PREALLOC(osh, section, size) dhd_os_prealloc(osh, section, size)
+#define DHD_OS_PREFREE(osh, addr, size) dhd_os_prefree(osh, addr, size)
+
+#else
+
+#define DHD_OS_PREALLOC(osh, section, size) MALLOC(osh, size)
+#define DHD_OS_PREFREE(osh, addr, size) MFREE(osh, addr, size)
+
+#endif /* defined(DHD_USE_STATIC_BUF) */
+
/* Common structure for module and instance linkage */
typedef struct dhd_pub {
/* Linkage ponters */
@@ -272,8 +284,11 @@ extern unsigned long dhd_os_spin_lock(dhd_pub_t *pub);
extern void dhd_os_spin_unlock(dhd_pub_t *pub, unsigned long flags);
-extern void dhd_os_start_lock(dhd_pub_t *pub);
-extern void dhd_os_start_unlock(dhd_pub_t *pub);
+/* interface operations (register, remove) should be atomic, use this lock to prevent race
+ * condition among wifi on/off and interface operation functions
+ */
+void dhd_net_if_lock(struct net_device *dev);
+void dhd_net_if_unlock(struct net_device *dev);
typedef struct dhd_if_event {
uint8 ifidx;
@@ -519,6 +534,9 @@ extern char nv_path[MOD_PARAM_PATHLEN];
extern char fw_path2[MOD_PARAM_PATHLEN];
#endif
+/* Flag to indicate if we should download firmware on driver load */
+extern uint dhd_download_fw_on_driverload;
+
/* For supporting multiple interfaces */
#define DHD_MAX_IFS 16
#define DHD_DEL_IF -0xe