Index: chromeos/drivers/ath6kl/os/linux/hci_bridge.c |
diff --git a/chromeos/drivers/ath6kl/os/linux/hci_bridge.c b/chromeos/drivers/ath6kl/os/linux/hci_bridge.c |
index f54c7202229a70446c6bdfdcd48beae66e51c97f..5cdc3b85a6f6c3973fa09bf796f9afa856700983 100644 |
--- a/chromeos/drivers/ath6kl/os/linux/hci_bridge.c |
+++ b/chromeos/drivers/ath6kl/os/linux/hci_bridge.c |
@@ -1,15 +1,18 @@ |
//------------------------------------------------------------------------------ |
-// <copyright file="hci_bridge.c" company="Atheros"> |
-// Copyright (c) 2009 Atheros Corporation. All rights reserved. |
+// Copyright (c) 2009-2010 Atheros Corporation. All rights reserved. |
// |
-// This program is free software; you can redistribute it and/or modify |
-// it under the terms of the GNU General Public License version 2 as |
-// published by the Free Software Foundation; |
// |
-// Software distributed under the License is distributed on an "AS |
-// IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or |
-// implied. See the License for the specific language governing |
-// rights and limitations under the License. |
+// Permission to use, copy, modify, and/or distribute this software for any |
+// purpose with or without fee is hereby granted, provided that the above |
+// copyright notice and this permission notice appear in all copies. |
+// |
+// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
+// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
+// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
+// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
+// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
+// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
+// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
// |
// |
//------------------------------------------------------------------------------ |
@@ -51,31 +54,20 @@ |
#include <net/bluetooth/bluetooth.h> |
#include <net/bluetooth/hci_core.h> |
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) |
/* only build on newer kernels which have BT configured */ |
#if defined(CONFIG_BT_MODULE) || defined(CONFIG_BT) |
#define CONFIG_BLUEZ_HCI_BRIDGE |
#endif |
-#endif |
#ifdef EXPORT_HCI_BRIDGE_INTERFACE |
unsigned int ar3khcibaud = 0; |
unsigned int hciuartscale = 0; |
unsigned int hciuartstep = 0; |
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) |
module_param(ar3khcibaud, int, 0644); |
module_param(hciuartscale, int, 0644); |
module_param(hciuartstep, int, 0644); |
#else |
- |
-#define __user |
-/* for linux 2.4 and lower */ |
-MODULE_PARM(ar3khcibaud, "i"); |
-MODULE_PARM(hciuartscale, "i"); |
-MODULE_PARM(hciuartstep, "i"); |
-#endif |
-#else |
extern unsigned int ar3khcibaud; |
extern unsigned int hciuartscale; |
extern unsigned int hciuartstep; |
@@ -221,9 +213,8 @@ static void RefillRecvBuffers(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, |
} |
#define HOST_INTEREST_ITEM_ADDRESS(ar, item) \ |
- (((ar)->arTargetType == TARGET_TYPE_AR6001) ? AR6001_HOST_INTEREST_ITEM_ADDRESS(item) : \ |
(((ar)->arTargetType == TARGET_TYPE_AR6002) ? AR6002_HOST_INTEREST_ITEM_ADDRESS(item) : \ |
- (((ar)->arTargetType == TARGET_TYPE_AR6003) ? AR6003_HOST_INTEREST_ITEM_ADDRESS(item) : 0))) |
+ (((ar)->arTargetType == TARGET_TYPE_AR6003) ? AR6003_HOST_INTEREST_ITEM_ADDRESS(item) : 0)) |
static A_STATUS ar6000_hci_transport_ready(HCI_TRANSPORT_HANDLE HCIHandle, |
HCI_TRANSPORT_PROPERTIES *pProps, |
void *pContext) |
@@ -237,8 +228,8 @@ static A_STATUS ar6000_hci_transport_ready(HCI_TRANSPORT_HANDLE HCIHandle, |
A_MEMCPY(&pHcidevInfo->HCIProps,pProps,sizeof(*pProps)); |
- AR_DEBUG_PRINTF(ATH_DEBUG_HCI_BRIDGE,("HCI ready (hci:0x%X, headroom:%d, tailroom:%d blockpad:%d) \n", |
- (A_UINT32)HCIHandle, |
+ AR_DEBUG_PRINTF(ATH_DEBUG_HCI_BRIDGE,("HCI ready (hci:0x%lX, headroom:%d, tailroom:%d blockpad:%d) \n", |
+ (unsigned long)HCIHandle, |
pHcidevInfo->HCIProps.HeadRoom, |
pHcidevInfo->HCIProps.TailRoom, |
pHcidevInfo->HCIProps.IOBlockPad)); |
@@ -807,7 +798,7 @@ static int bt_send_frame(struct sk_buff *skb) |
type, |
AR6K_CONTROL_PKT_TAG); /* HCI packets cannot be dropped */ |
- AR_DEBUG_PRINTF(ATH_DEBUG_HCI_SEND, ("HCI Bridge: bt_send_frame skb:0x%X \n",(A_UINT32)txSkb)); |
+ AR_DEBUG_PRINTF(ATH_DEBUG_HCI_SEND, ("HCI Bridge: bt_send_frame skb:0x%lX \n",(unsigned long)txSkb)); |
AR_DEBUG_PRINTF(ATH_DEBUG_HCI_SEND, ("HCI Bridge: type:%d, Total Length:%d Bytes \n", |
type, txSkb->len)); |
@@ -901,7 +892,7 @@ static A_STATUS bt_setup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo) |
/* save the device, we'll register this later */ |
pHcidevInfo->pBtStackHCIDev = pHciDev; |
SET_HCIDEV_DEV(pHciDev,osDevInfo.pOSDevice); |
- pHciDev->type = HCI_VIRTUAL; |
+ SET_HCI_BUS_TYPE(pHciDev, HCI_VIRTUAL, HCI_BREDR); |
pHciDev->driver_data = pHcidevInfo; |
pHciDev->open = bt_open; |
pHciDev->close = bt_close; |
@@ -1149,5 +1140,5 @@ hcibridge_cleanup_module(void) |
module_init(hcibridge_init_module); |
module_exit(hcibridge_cleanup_module); |
-MODULE_LICENSE("GPL and additional rights"); |
+MODULE_LICENSE("Dual BSD/GPL"); |
#endif |