summaryrefslogtreecommitdiff
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorMarc Yang <yangyang@marvell.com>2013-12-20 14:43:00 -0800
committerBitan Biswas <bbiswas@nvidia.com>2014-01-16 01:57:05 -0800
commit8726a5f0dc110cfe580ea7a748fe92395df7959b (patch)
tree8e427b4b9bddfee9d8daf43950a9839ecd7b100c /drivers/bluetooth
parent6f63c963f1b5d96aea584e515a000f5387ff3852 (diff)
net: wireless: Update SD8897 WLAN/BT driver to 463
Signed-off-by: Marc Yang <yangyang@marvell.com> - update SD8897 driver to 463 Bug 1318052 Change-Id: I00f81bc5219c670b2cf35e5ca5b57096dc7ca244 Signed-off-by: Manikanta <mmaddireddy@nvidia.com> Reviewed-on: http://git-master/r/355988 Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/sd8897/bt/bt_drv.h2
-rw-r--r--drivers/bluetooth/sd8897/bt/bt_init.c2
-rw-r--r--drivers/bluetooth/sd8897/bt/bt_main.c43
-rw-r--r--drivers/bluetooth/sd8897/bt/bt_proc.c2
-rw-r--r--drivers/bluetooth/sd8897/bt/bt_sdio.h2
-rw-r--r--drivers/bluetooth/sd8897/bt/bt_sdiommc.c24
-rw-r--r--drivers/bluetooth/sd8897/bt/hci_wrapper.h2
-rw-r--r--drivers/bluetooth/sd8897/bt/mbt_char.c2
-rw-r--r--drivers/bluetooth/sd8897/bt/mbt_char.h2
9 files changed, 41 insertions, 40 deletions
diff --git a/drivers/bluetooth/sd8897/bt/bt_drv.h b/drivers/bluetooth/sd8897/bt/bt_drv.h
index 2a8f8f5fbcf3..2b416a8aa3d0 100644
--- a/drivers/bluetooth/sd8897/bt/bt_drv.h
+++ b/drivers/bluetooth/sd8897/bt/bt_drv.h
@@ -2,7 +2,7 @@
* @brief This header file contains global constant/enum definitions,
* global variable declaration.
*
- * Copyright (C) 2007-2012, Marvell International Ltd.
+ * Copyright (C) 2007-2013, Marvell International Ltd.
*
* This software file (the "File") is distributed by Marvell International
* Ltd. under the terms of the GNU General Public License Version 2, June 1991
diff --git a/drivers/bluetooth/sd8897/bt/bt_init.c b/drivers/bluetooth/sd8897/bt/bt_init.c
index 13d7ed300974..942cf0da4bd4 100644
--- a/drivers/bluetooth/sd8897/bt/bt_init.c
+++ b/drivers/bluetooth/sd8897/bt/bt_init.c
@@ -3,7 +3,7 @@
* @brief This file contains the init functions for BlueTooth
* driver.
*
- * Copyright (C) 2011-2012, Marvell International Ltd.
+ * Copyright (C) 2011-2013, Marvell International Ltd.
*
* This software file (the "File") is distributed by Marvell International
* Ltd. under the terms of the GNU General Public License Version 2, June 1991
diff --git a/drivers/bluetooth/sd8897/bt/bt_main.c b/drivers/bluetooth/sd8897/bt/bt_main.c
index 7e79962de61a..086ca4bbbeeb 100644
--- a/drivers/bluetooth/sd8897/bt/bt_main.c
+++ b/drivers/bluetooth/sd8897/bt/bt_main.c
@@ -4,7 +4,7 @@
* driver. It includes init, exit, open, close and main
* thread etc..
*
- * Copyright (C) 2007-2012, Marvell International Ltd.
+ * Copyright (C) 2007-2013, Marvell International Ltd.
*
* This software file (the "File") is distributed by Marvell International
* Ltd. under the terms of the GNU General Public License Version 2, June 1991
@@ -29,7 +29,7 @@
*
* @section copyright_sec Copyright
*
- * Copyright (C) 2007-2012, Marvell International Ltd.
+ * Copyright (C) 2007-2013, Marvell International Ltd.
*
*/
@@ -245,7 +245,7 @@ check_evtpkt(bt_private * priv, struct sk_buff *skb)
struct hci_event_hdr *hdr = (struct hci_event_hdr *)skb->data;
struct hci_ev_cmd_complete *ec;
u16 opcode, ocf;
- u8 ret = BT_STATUS_SUCCESS;
+ int ret = BT_STATUS_SUCCESS;
ENTER();
if (!priv->bt_dev.sendcmdflag) {
ret = BT_STATUS_FAILURE;
@@ -339,7 +339,7 @@ exit:
int
bt_process_event(bt_private * priv, struct sk_buff *skb)
{
- u8 ret = BT_STATUS_SUCCESS;
+ int ret = BT_STATUS_SUCCESS;
struct m_dev *m_dev = &(priv->bt_dev.m_dev[BT_SEQ]);
BT_EVENT *pevent;
@@ -525,7 +525,7 @@ int
bt_send_reset_command(bt_private * priv)
{
struct sk_buff *skb = NULL;
- u8 ret = BT_STATUS_SUCCESS;
+ int ret = BT_STATUS_SUCCESS;
BT_HCI_CMD *pcmd;
ENTER();
skb = bt_skb_alloc(sizeof(BT_HCI_CMD), GFP_ATOMIC);
@@ -579,7 +579,7 @@ int
bt_send_module_cfg_cmd(bt_private * priv, int subcmd)
{
struct sk_buff *skb = NULL;
- u8 ret = BT_STATUS_SUCCESS;
+ int ret = BT_STATUS_SUCCESS;
BT_CMD *pcmd;
ENTER();
skb = bt_skb_alloc(sizeof(BT_CMD), GFP_ATOMIC);
@@ -633,7 +633,7 @@ int
bt_enable_ps(bt_private * priv)
{
struct sk_buff *skb = NULL;
- u8 ret = BT_STATUS_SUCCESS;
+ int ret = BT_STATUS_SUCCESS;
BT_CMD *pcmd;
ENTER();
skb = bt_skb_alloc(sizeof(BT_CMD), GFP_ATOMIC);
@@ -687,7 +687,7 @@ int
bt_send_hscfg_cmd(bt_private * priv)
{
struct sk_buff *skb = NULL;
- u8 ret = BT_STATUS_SUCCESS;
+ int ret = BT_STATUS_SUCCESS;
BT_CMD *pcmd;
ENTER();
skb = bt_skb_alloc(sizeof(BT_CMD), GFP_ATOMIC);
@@ -733,7 +733,7 @@ int
bt_send_sdio_pull_ctrl_cmd(bt_private * priv)
{
struct sk_buff *skb = NULL;
- u8 ret = BT_STATUS_SUCCESS;
+ int ret = BT_STATUS_SUCCESS;
BT_CMD *pcmd;
ENTER();
skb = bt_skb_alloc(sizeof(BT_CMD), GFP_ATOMIC);
@@ -787,7 +787,7 @@ int
fm_set_intr_mask(bt_private * priv, u32 mask)
{
struct sk_buff *skb = NULL;
- u8 ret = BT_STATUS_SUCCESS;
+ int ret = BT_STATUS_SUCCESS;
BT_CMD *pcmd;
ENTER();
@@ -834,7 +834,7 @@ int
bt_enable_hs(bt_private * priv)
{
struct sk_buff *skb = NULL;
- u8 ret = BT_STATUS_SUCCESS;
+ int ret = BT_STATUS_SUCCESS;
BT_CMD *pcmd;
ENTER();
skb = bt_skb_alloc(sizeof(BT_CMD), GFP_ATOMIC);
@@ -895,7 +895,7 @@ int
bt_set_ble_deepsleep(bt_private * priv, int mode)
{
struct sk_buff *skb = NULL;
- u8 ret = BT_STATUS_SUCCESS;
+ int ret = BT_STATUS_SUCCESS;
BT_BLE_CMD *pcmd;
ENTER();
skb = bt_skb_alloc(sizeof(BT_BLE_CMD), GFP_ATOMIC);
@@ -940,7 +940,7 @@ int
bt_get_fw_version(bt_private * priv)
{
struct sk_buff *skb = NULL;
- u8 ret = BT_STATUS_SUCCESS;
+ int ret = BT_STATUS_SUCCESS;
BT_HCI_CMD *pcmd;
ENTER();
skb = bt_skb_alloc(sizeof(BT_HCI_CMD), GFP_ATOMIC);
@@ -985,7 +985,7 @@ int
bt_set_mac_address(bt_private * priv, u8 * mac)
{
struct sk_buff *skb = NULL;
- u8 ret = BT_STATUS_SUCCESS;
+ int ret = BT_STATUS_SUCCESS;
BT_HCI_CMD *pcmd;
int i = 0;
ENTER();
@@ -1037,7 +1037,7 @@ int
bt_load_cal_data(bt_private * priv, u8 * config_data, u8 * mac)
{
struct sk_buff *skb = NULL;
- u8 ret = BT_STATUS_SUCCESS;
+ int ret = BT_STATUS_SUCCESS;
BT_CMD *pcmd;
int i = 0;
/* u8 config_data[28] = {0x37 0x01 0x1c 0x00 0xFF 0xFF 0xFF 0xFF 0x01
@@ -1101,7 +1101,7 @@ int
bt_load_cal_data_ext(bt_private * priv, u8 * config_data, u32 cfg_data_len)
{
struct sk_buff *skb = NULL;
- u8 ret = BT_STATUS_SUCCESS;
+ int ret = BT_STATUS_SUCCESS;
BT_CMD *pcmd;
ENTER();
@@ -1151,7 +1151,7 @@ int
bt_write_reg(bt_private * priv, u8 type, u32 offset, u16 value)
{
struct sk_buff *skb = NULL;
- u8 ret = BT_STATUS_SUCCESS;
+ int ret = BT_STATUS_SUCCESS;
BT_CSU_CMD *pcmd;
ENTER();
skb = bt_skb_alloc(sizeof(BT_CSU_CMD), GFP_ATOMIC);
@@ -1226,7 +1226,7 @@ bt_restore_tx_queue(bt_private * priv)
int
bt_prepare_command(bt_private * priv)
{
- u8 ret = BT_STATUS_SUCCESS;
+ int ret = BT_STATUS_SUCCESS;
ENTER();
if (priv->bt_dev.hscfgcmd) {
priv->bt_dev.hscfgcmd = 0;
@@ -1825,8 +1825,7 @@ sbi_register_conf_dpc(bt_private * priv)
}
}
#ifdef SDIO_SUSPEND_RESUME
-
- priv->bt_dev.gpio_gap = 0x0464;
+ priv->bt_dev.gpio_gap = 0x0864;
ret = bt_send_hscfg_cmd(priv);
if (ret < 0) {
PRINTM(FATAL, "Send HSCFG failed!\n");
@@ -1891,7 +1890,7 @@ sbi_register_conf_dpc(bt_private * priv)
/** chmod & chown for BT char device */
mbtchar_chown(dev_file, AID_SYSTEM, AID_BLUETOOTH);
- mbtchar_chmod(dev_file, 0666);
+ mbtchar_chmod(dev_file, 0660);
/** create proc device */
snprintf(priv->bt_dev.m_dev[BT_SEQ].name,
@@ -1949,7 +1948,7 @@ sbi_register_conf_dpc(bt_private * priv)
MODULE_NAME, fm_dev->name);
/** chmod for FM char device */
- mbtchar_chmod(dev_file, 0666);
+ mbtchar_chmod(dev_file, 0660);
/** create proc device */
snprintf(priv->bt_dev.m_dev[FM_SEQ].name,
diff --git a/drivers/bluetooth/sd8897/bt/bt_proc.c b/drivers/bluetooth/sd8897/bt/bt_proc.c
index ad9a6e9cd23d..7fd419bdc21e 100644
--- a/drivers/bluetooth/sd8897/bt/bt_proc.c
+++ b/drivers/bluetooth/sd8897/bt/bt_proc.c
@@ -2,7 +2,7 @@
*
* @brief This file handle the functions for proc files
*
- * Copyright (C) 2007-2012, Marvell International Ltd.
+ * Copyright (C) 2007-2013, Marvell International Ltd.
*
* This software file (the "File") is distributed by Marvell International
* Ltd. under the terms of the GNU General Public License Version 2, June 1991
diff --git a/drivers/bluetooth/sd8897/bt/bt_sdio.h b/drivers/bluetooth/sd8897/bt/bt_sdio.h
index e2227794e087..0eede2edd4dd 100644
--- a/drivers/bluetooth/sd8897/bt/bt_sdio.h
+++ b/drivers/bluetooth/sd8897/bt/bt_sdio.h
@@ -2,7 +2,7 @@
* @brief This file contains SDIO (interface) module
* related macros, enum, and structure.
*
- * Copyright (C) 2007-2012, Marvell International Ltd.
+ * Copyright (C) 2007-2013, Marvell International Ltd.
*
* This software file (the "File") is distributed by Marvell International
* Ltd. under the terms of the GNU General Public License Version 2, June 1991
diff --git a/drivers/bluetooth/sd8897/bt/bt_sdiommc.c b/drivers/bluetooth/sd8897/bt/bt_sdiommc.c
index 0d9f82eb3db2..59515f75d0cf 100644
--- a/drivers/bluetooth/sd8897/bt/bt_sdiommc.c
+++ b/drivers/bluetooth/sd8897/bt/bt_sdiommc.c
@@ -2,7 +2,7 @@
* @brief This file contains SDIO IF (interface) module
* related functions.
*
- * Copyright (C) 2007-2012, Marvell International Ltd.
+ * Copyright (C) 2007-2013, Marvell International Ltd.
*
* This software file (the "File") is distributed by Marvell International
* Ltd. under the terms of the GNU General Public License Version 2, June 1991
@@ -35,6 +35,7 @@ static char *fw_name;
/** request firmware nowait */
static int req_fw_nowait;
static int multi_fn = BIT(2);
+
#define DEFAULT_FW_NAME "mrvl/sd8897_uapsta.bin"
/** Function number 2 */
@@ -411,14 +412,16 @@ sd_verify_fw_download(bt_private * priv, int pollnum)
* @brief Transfers firmware to card
*
* @param priv A Pointer to bt_private structure
+ * @param fw A Pointer to fw image
+ * @param fw_len fw image len
* @return BT_STATUS_SUCCESS/BT_STATUS_FAILURE or other error no.
*/
static int
-sd_init_fw_dpc(bt_private * priv)
+sd_init_fw_dpc(bt_private * priv, u8 * fw, int fw_len)
{
struct sdio_mmc_card *card = (struct sdio_mmc_card *)priv->bt_dev.card;
- u8 *firmware = NULL;
- int firmwarelen;
+ u8 *firmware = fw;
+ int firmwarelen = fw_len;
u8 base0;
u8 base1;
int ret = BT_STATUS_SUCCESS;
@@ -433,8 +436,6 @@ sd_init_fw_dpc(bt_private * priv)
int tries = 0;
ENTER();
- firmware = (u8 *) priv->firmware->data;
- firmwarelen = priv->firmware->size;
PRINTM(INFO, "BT: Downloading FW image (%d bytes)\n", firmwarelen);
@@ -554,7 +555,7 @@ sd_init_fw_dpc(bt_private * priv)
offset += txlen;
} while (TRUE);
- PRINTM(INFO, "\nBT: FW download over, size %d bytes\n", offset);
+ PRINTM(MSG, "BT: FW download over, size %d bytes\n", offset);
ret = BT_STATUS_SUCCESS;
done:
@@ -614,7 +615,10 @@ sd_request_fw_dpc(const struct firmware *fw_firmware, void *context)
}
priv->firmware = fw_firmware;
- if (BT_STATUS_FAILURE == sd_init_fw_dpc(priv)) {
+
+ if (BT_STATUS_FAILURE ==
+ sd_init_fw_dpc(priv, (u8 *) priv->firmware->data,
+ priv->firmware->size)) {
PRINTM(ERROR,
"BT: sd_init_fw_dpc failed (download fw with nowait: %d). Terminating download\n",
req_fw_nowait);
@@ -1611,7 +1615,6 @@ sbi_download_fw(bt_private * priv)
struct m_dev *m_dev_bt = &(priv->bt_dev.m_dev[BT_SEQ]);
struct m_dev *m_dev_fm = &(priv->bt_dev.m_dev[FM_SEQ]);
struct m_dev *m_dev_nfc = &(priv->bt_dev.m_dev[NFC_SEQ]);
- int poll_num = MAX_FIRMWARE_POLL_TRIES;
u8 winner = 0;
ENTER();
@@ -1644,9 +1647,8 @@ sbi_download_fw(bt_private * priv)
if (winner) {
PRINTM(MSG, "BT is not the winner (0x%x). Skip FW download\n",
winner);
- poll_num = MAX_MULTI_INTERFACE_POLL_TRIES;
/* check if the fimware is downloaded successfully or not */
- if (sd_verify_fw_download(priv, poll_num)) {
+ if (sd_verify_fw_download(priv, MAX_MULTI_INTERFACE_POLL_TRIES)) {
PRINTM(FATAL, "BT: FW failed to be active in time!\n");
ret = BT_STATUS_FAILURE;
goto done;
diff --git a/drivers/bluetooth/sd8897/bt/hci_wrapper.h b/drivers/bluetooth/sd8897/bt/hci_wrapper.h
index b8870359559f..d81c91b312ab 100644
--- a/drivers/bluetooth/sd8897/bt/hci_wrapper.h
+++ b/drivers/bluetooth/sd8897/bt/hci_wrapper.h
@@ -1,7 +1,7 @@
/** @file hci_wrapper.h
* @brief This file contains HCI related definitions
*
- * Copyright (C) 2011-2012, Marvell International Ltd.
+ * Copyright (C) 2011-2013, Marvell International Ltd.
*
* This software file (the "File") is distributed by Marvell International
* Ltd. under the terms of the GNU General Public License Version 2, June 1991
diff --git a/drivers/bluetooth/sd8897/bt/mbt_char.c b/drivers/bluetooth/sd8897/bt/mbt_char.c
index 27afcf97774f..e0b8a1b0426b 100644
--- a/drivers/bluetooth/sd8897/bt/mbt_char.c
+++ b/drivers/bluetooth/sd8897/bt/mbt_char.c
@@ -2,7 +2,7 @@
*
* @brief This file contains the char device function calls
*
- * Copyright (C) 2010-2012, Marvell International Ltd.
+ * Copyright (C) 2010-2013, Marvell International Ltd.
*
* This software file (the "File") is distributed by Marvell International
* Ltd. under the terms of the GNU General Public License Version 2, June 1991
diff --git a/drivers/bluetooth/sd8897/bt/mbt_char.h b/drivers/bluetooth/sd8897/bt/mbt_char.h
index a6918f159794..ef48a3ad0e0c 100644
--- a/drivers/bluetooth/sd8897/bt/mbt_char.h
+++ b/drivers/bluetooth/sd8897/bt/mbt_char.h
@@ -2,7 +2,7 @@
*
* @brief This file contains mbtchar driver specific defines etc
*
- * Copyright (C) 2010-2012, Marvell International Ltd.
+ * Copyright (C) 2010-2013, Marvell International Ltd.
*
* This software file (the "File") is distributed by Marvell International
* Ltd. under the terms of the GNU General Public License Version 2, June 1991