summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/bcm4329/include/bcmsdbus.h
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2010-05-19 18:53:11 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:38:18 -0800
commit1e0997302f2a73fa504a27100b10439d71f39114 (patch)
tree45c5b808e0d0b1a169f1f00c030905d977677be6 /drivers/net/wireless/bcm4329/include/bcmsdbus.h
parentbe23db9ad8c1938c8efc6337b2c9c89daf07256e (diff)
network: wireless: bcm4329: Add bcm4329 driver
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> network: wireless: bcm4329: Add "HANG" event and console monitoring Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> network: wireless: bcm4329: Remove unnecessary set_freezable() calls Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> network: wireless: bcm4329: Update to Version 4.218.238 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> network: wireless: bcm4329: Fix MAC address import Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> network: wireless: bcm4329: Fix wlan card removal Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> network: wireless: bcm4329: Update to Version 4.218.239 Add reading mac address from platform data Add dhd_os_proto_block protection for dhd_preinit_ioctls Revert dhdsdio_clk() changes Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Add SoftAP MAC address randomization Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> network: wireless: bcm4329: Add 2.6.35 compatibility and fix memory leak in set_multicast_list Signed-off-by: Dmitry Shmidt <dimitrysh@android.com> Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> network: wireless: bcm4329: Reduce driver loading time Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> network: wireless: bcm4329: Set special OUI: 02:1A:11:FH:HH:HH for SoftAP Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> network: wireless: bcm4329: Fix BUS DOWN in IOCTL Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> network: wireless: bcm4329: Add driver SETSUSPEND command Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix packet filter to only filter out non-unicast frames Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Add wakelock processing in ioctl and messaging Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Update to 4.218.245 (combo scan) Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Update to Version 4.218.246 and setband fix Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Add wakelock processing to WEXT requests Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Force scan when driver is loaded Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix scan timeout for abg case Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix dhd_bus_watchdog() race conditions Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix unregister_early_suspend() in dhd_detach() Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Add memory barriers to wait functions Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix "setsuspend" behavior Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Increase PMU_MAX_TRANSITION_DLY to 1 sec Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Turn OFF packet filtering during DHCP session Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Disable packet filtering Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Send "HANG" message only once Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Update to Version 4.218.248 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix HW_OOB interrupt processing Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix interrupt enabling for level interrupt Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> Revert "net: wireless: bcm4329: Fix interrupt enabling for level interrupt" This reverts commit 261d21bbfffef6261696d0d13672d2e4f9d76f05. Revert "net: wireless: bcm4329: Fix HW_OOB interrupt processing" This reverts commit 8bd035daa820dc5612ae311262c71dc133871046. net: wireless: bcm4329: Fix HW_OOB interrupt processing Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix roaming failure case Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix roaming setting on resume Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Add debug print for cscan failure Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Ignore error if scan results are empty Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Enable packet filtering during low power mode Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Update to Version 4.218.248.6 Fix watchdog time rescheduling, fix first scan no-return Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix interrupt enabling in case of error Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix setting HT clock race conditions Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix setting HT clock race conditions in driver start Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Update to Version 4.218.248-10 Add KEEP_ALIVE feature, fix 'driver rssi' processing, fix roaming processing Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Improve BT-coex for eSCO Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix race conditions for sysioc_thread Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Update to version 4.218.248-11 Check for 'driver start' failure, Set keep-alive feature forever Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Check for out of bounds in scan results parsing Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Add check for out of bounds scan buffer Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Update to version 4.218.248-12 - Fix crash during Specific Scan handling - Fix potential insmod crash by increase Registration Timeout to 12 sec - Added max time restriction to PNO scan timer - New IWPRIV "AP_STA_DISASSOC" to disassoc STAs in SoftAP mode - Add new setting to SoftAP "AP_SET_CFG" to enable Hidden SSID - Fixs bugs for SoftAP AP_SET_MAC_FLTR iwpriv commnd - Add STAs rssi filed to SoftAP "AP_GET_STA_LIST" IWPRIV commnd Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix watchdog termination after 'driver stop' Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Enable KEEP_ALIVE feature Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Add FW Reload event processing Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix Softap start/stop race conditions Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Set first channel passive scan to 30 ms Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Update to Version 4.218.248-15 - Increase default Listen Interval to 20 Beacons - Add logic to adjust SKIP_DTIM if Listen Interval < DTIM * DTIM_SKIP to avoid data lost due to fact that packet maybe not retrieved during Listen Interval and AP may toss it - Fix problem with Hidden AP setting after AP reconfigure - Add new SoftAP optional parameter as COUNTRY to pass country code to SoftAP Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Improve way to detect BT SCO connection for BT-coex Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Use non-DFS channels only for US Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Add 'setdfschannels' command Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix watchdog syncronization during start/stop Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix driver 'start' retry ability Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Fix memory leak in case of dhd_bus_init() failure Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Add CONFIG_FIRST_SCAN option Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Update to Version 4.218.248-17 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> net: wireless: bcm4329: Update to version 4.218.248-18 - Improve BT-coex to differentiate HID and SCO device during DHCP session - Enforce DTIM=1 for any SoftAP settings to optimize internal memory logic Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'drivers/net/wireless/bcm4329/include/bcmsdbus.h')
-rw-r--r--drivers/net/wireless/bcm4329/include/bcmsdbus.h117
1 files changed, 117 insertions, 0 deletions
diff --git a/drivers/net/wireless/bcm4329/include/bcmsdbus.h b/drivers/net/wireless/bcm4329/include/bcmsdbus.h
new file mode 100644
index 000000000000..b7b67bc66248
--- /dev/null
+++ b/drivers/net/wireless/bcm4329/include/bcmsdbus.h
@@ -0,0 +1,117 @@
+/*
+ * Definitions for API from sdio common code (bcmsdh) to individual
+ * host controller drivers.
+ *
+ * Copyright (C) 1999-2010, Broadcom Corporation
+ *
+ * Unless you and Broadcom execute a separate written software license
+ * agreement governing use of this software, this software is licensed to you
+ * under the terms of the GNU General Public License version 2 (the "GPL"),
+ * available at http://www.broadcom.com/licenses/GPLv2.php, with the
+ * following added to such license:
+ *
+ * As a special exception, the copyright holders of this software give you
+ * permission to link this software with independent modules, and to copy and
+ * distribute the resulting executable under terms of your choice, provided that
+ * you also meet, for each linked independent module, the terms and conditions of
+ * the license of that module. An independent module is a module which is not
+ * derived from this software. The special exception does not apply to any
+ * modifications of the software.
+ *
+ * Notwithstanding the above, under no circumstances may you combine this
+ * software in any way with any other Broadcom software provided under a license
+ * other than the GPL, without Broadcom's express prior written consent.
+ *
+ * $Id: bcmsdbus.h,v 13.11.14.2.6.6 2009/10/27 17:20:28 Exp $
+ */
+
+#ifndef _sdio_api_h_
+#define _sdio_api_h_
+
+
+#define SDIOH_API_RC_SUCCESS (0x00)
+#define SDIOH_API_RC_FAIL (0x01)
+#define SDIOH_API_SUCCESS(status) (status == 0)
+
+#define SDIOH_READ 0 /* Read request */
+#define SDIOH_WRITE 1 /* Write request */
+
+#define SDIOH_DATA_FIX 0 /* Fixed addressing */
+#define SDIOH_DATA_INC 1 /* Incremental addressing */
+
+#define SDIOH_CMD_TYPE_NORMAL 0 /* Normal command */
+#define SDIOH_CMD_TYPE_APPEND 1 /* Append command */
+#define SDIOH_CMD_TYPE_CUTTHRU 2 /* Cut-through command */
+
+#define SDIOH_DATA_PIO 0 /* PIO mode */
+#define SDIOH_DATA_DMA 1 /* DMA mode */
+
+
+typedef int SDIOH_API_RC;
+
+/* SDio Host structure */
+typedef struct sdioh_info sdioh_info_t;
+
+/* callback function, taking one arg */
+typedef void (*sdioh_cb_fn_t)(void *);
+
+/* attach, return handler on success, NULL if failed.
+ * The handler shall be provided by all subsequent calls. No local cache
+ * cfghdl points to the starting address of pci device mapped memory
+ */
+extern sdioh_info_t * sdioh_attach(osl_t *osh, void *cfghdl, uint irq);
+extern SDIOH_API_RC sdioh_detach(osl_t *osh, sdioh_info_t *si);
+extern SDIOH_API_RC sdioh_interrupt_register(sdioh_info_t *si, sdioh_cb_fn_t fn, void *argh);
+extern SDIOH_API_RC sdioh_interrupt_deregister(sdioh_info_t *si);
+
+/* query whether SD interrupt is enabled or not */
+extern SDIOH_API_RC sdioh_interrupt_query(sdioh_info_t *si, bool *onoff);
+
+/* enable or disable SD interrupt */
+extern SDIOH_API_RC sdioh_interrupt_set(sdioh_info_t *si, bool enable_disable);
+
+#if defined(DHD_DEBUG)
+extern bool sdioh_interrupt_pending(sdioh_info_t *si);
+#endif
+
+/* read or write one byte using cmd52 */
+extern SDIOH_API_RC sdioh_request_byte(sdioh_info_t *si, uint rw, uint fnc, uint addr, uint8 *byte);
+
+/* read or write 2/4 bytes using cmd53 */
+extern SDIOH_API_RC sdioh_request_word(sdioh_info_t *si, uint cmd_type, uint rw, uint fnc,
+ uint addr, uint32 *word, uint nbyte);
+
+/* read or write any buffer using cmd53 */
+extern SDIOH_API_RC sdioh_request_buffer(sdioh_info_t *si, uint pio_dma, uint fix_inc,
+ uint rw, uint fnc_num, uint32 addr, uint regwidth, uint32 buflen, uint8 *buffer,
+ void *pkt);
+
+/* get cis data */
+extern SDIOH_API_RC sdioh_cis_read(sdioh_info_t *si, uint fuc, uint8 *cis, uint32 length);
+
+extern SDIOH_API_RC sdioh_cfg_read(sdioh_info_t *si, uint fuc, uint32 addr, uint8 *data);
+extern SDIOH_API_RC sdioh_cfg_write(sdioh_info_t *si, uint fuc, uint32 addr, uint8 *data);
+
+/* query number of io functions */
+extern uint sdioh_query_iofnum(sdioh_info_t *si);
+
+/* handle iovars */
+extern int sdioh_iovar_op(sdioh_info_t *si, const char *name,
+ void *params, int plen, void *arg, int len, bool set);
+
+/* Issue abort to the specified function and clear controller as needed */
+extern int sdioh_abort(sdioh_info_t *si, uint fnc);
+
+/* Start and Stop SDIO without re-enumerating the SD card. */
+extern int sdioh_start(sdioh_info_t *si, int stage);
+extern int sdioh_stop(sdioh_info_t *si);
+
+/* Reset and re-initialize the device */
+extern int sdioh_sdio_reset(sdioh_info_t *si);
+
+/* Helper function */
+void *bcmsdh_get_sdioh(bcmsdh_info_t *sdh);
+
+
+
+#endif /* _sdio_api_h_ */