#ifdef CONFIG_ATH_DEBUG
static ssize_t read_file_debug(struct file *file, char __user *user_buf,
-@@ -961,6 +975,40 @@ static const struct file_operations fops
+@@ -871,6 +885,40 @@ static const struct file_operations fops
.llseek = default_llseek,
};
int ath9k_init_debug(struct ath_hw *ah)
{
struct ath_common *common = ath9k_hw_common(ah);
-@@ -1025,6 +1073,11 @@ int ath9k_init_debug(struct ath_hw *ah)
+@@ -931,6 +979,11 @@ int ath9k_init_debug(struct ath_hw *ah)
goto err;
sc->debug.regidx = 0;
return 0;
err:
ath9k_exit_debug(ah);
-@@ -1036,6 +1089,7 @@ void ath9k_exit_debug(struct ath_hw *ah)
+@@ -942,6 +995,7 @@ void ath9k_exit_debug(struct ath_hw *ah)
struct ath_common *common = ath9k_hw_common(ah);
struct ath_softc *sc = (struct ath_softc *) common->priv;
--- a/drivers/net/wireless/ath/ath9k/debug.h
+++ b/drivers/net/wireless/ath/ath9k/debug.h
-@@ -168,6 +168,14 @@ struct ath_stats {
+@@ -160,6 +160,14 @@ struct ath_stats {
struct ath9k_debug {
struct dentry *debugfs_phy;
u32 regidx;
{
struct ar9003_txs *ads;
-@@ -305,6 +306,7 @@ static int ar9003_hw_proc_txdesc(struct
+@@ -305,6 +306,7 @@ static int ar9003_hw_proc_txdesc(struct
ts->tid = MS(ads->status8, AR_TxTid);
static inline void ath9k_hw_set11n_txdesc(struct ath_hw *ah, void *ds,
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
-@@ -2129,7 +2129,7 @@ void ath9k_hw_setrxfilter(struct ath_hw
+@@ -2129,7 +2129,7 @@ void ath9k_hw_setrxfilter(struct ath_hw
phybits |= AR_PHY_ERR_RADAR;
if (bits & ATH9K_RX_FILTER_PHYERR)
phybits |= AR_PHY_ERR_OFDM_TIMING | AR_PHY_ERR_CCK_TIMING;
{
u32 best_thruput, this_thruput, now_msec;
u8 rate, next_rate, best_rate, maxindex, minindex;
-@@ -690,6 +690,8 @@ static u8 ath_rc_get_highest_rix(struct
+@@ -690,6 +690,8 @@ static u8 ath_rc_get_highest_rix(struct
rate = ath_rc_priv->valid_rate_index[0];
bf->bf_buf_addr = dma_map_single(sc->dev, requeue_skb->data,
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
-@@ -436,6 +436,8 @@ static void ath_tx_complete_aggr(struct
+@@ -436,6 +436,8 @@ static void ath_tx_complete_aggr(struct
list_move_tail(&bf->list, &bf_head);
}
create mode 100644 drivers/bluetooth/fwload.c
create mode 100644 drivers/bluetooth/fwload.h
-diff --git a/drivers/bluetooth/Makefile b/drivers/bluetooth/Makefile
-index 71bdf13..5a55cbb 100644
--- a/drivers/bluetooth/Makefile
+++ b/drivers/bluetooth/Makefile
-@@ -13,6 +13,7 @@ obj-$(CONFIG_BT_HCIBLUECARD) += bluecard_cs.o
+@@ -13,6 +13,7 @@ obj-$(CONFIG_BT_HCIBLUECARD) += bluecard
obj-$(CONFIG_BT_HCIBTUART) += btuart_cs.o
-
+
obj-$(CONFIG_BT_HCIBTUSB) += btusb.o
+obj-$(CONFIG_BT_HCIBTUSB) += fwload.o
obj-$(CONFIG_BT_HCIBTSDIO) += btsdio.o
-
+
obj-$(CONFIG_BT_ATH3K) += ath3k.o
-diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
-index d22ce3c..13e0fb8 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -34,6 +34,7 @@
-
+
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
+#include "fwload.h"
-
+
#define VERSION "0.6"
-
+
@@ -55,6 +56,26 @@ static struct usb_driver btusb_driver;
#define BTUSB_BROKEN_ISOC 0x20
#define BTUSB_WRONG_SCO_MTU 0x40
-
+
+static struct usb_device_id ath_table[] = {
+ /* Atheros AR3011 */
+ { USB_DEVICE(0x0CF3, 0x3002) },
static struct usb_device_id btusb_table[] = {
/* Generic Bluetooth USB device */
{ USB_DEVICE_INFO(0xe0, 0x01, 0x01) },
-@@ -863,6 +884,7 @@ static int btusb_probe(struct usb_interface *intf,
+@@ -869,6 +890,7 @@ static int btusb_probe(struct usb_interf
struct btusb_data *data;
struct hci_dev *hdev;
int i, err;
+ const struct usb_device_id *match;
-
+
BT_DBG("intf %p id %p", intf, id);
-
-@@ -922,6 +944,19 @@ static int btusb_probe(struct usb_interface *intf,
+
+@@ -928,6 +950,19 @@ static int btusb_probe(struct usb_interf
data->udev = interface_to_usbdev(intf);
data->intf = intf;
-
+
+ for (i = 0; btusb_fwcbs[i].fwfile; i++) {
+ match = usb_match_id(intf, btusb_fwcbs[i].usb_id_table);
+ if (match) {
+ }
+
spin_lock_init(&data->lock);
-
+
INIT_WORK(&data->work, btusb_work);
-@@ -1030,12 +1065,26 @@ static void btusb_disconnect(struct usb_interface *intf)
+@@ -1038,12 +1073,26 @@ static void btusb_disconnect(struct usb_
{
struct btusb_data *data = usb_get_intfdata(intf);
struct hci_dev *hdev;
+ const struct usb_device_id *match;
+ int i;
-
+
BT_DBG("intf %p", intf);
-
+
if (!data)
return;
-
+
+ for (i = 0; btusb_fwcbs[i].fwfile; i++) {
+ match = usb_match_id(intf, btusb_fwcbs[i].usb_id_table);
+ if (match) {
+ }
+
hdev = data->hdev;
-
+
__hci_dev_hold(hdev);
-@@ -1061,12 +1110,22 @@ static void btusb_disconnect(struct usb_interface *intf)
+@@ -1069,12 +1118,22 @@ static void btusb_disconnect(struct usb_
static int btusb_suspend(struct usb_interface *intf, pm_message_t message)
{
struct btusb_data *data = usb_get_intfdata(intf);
+ const struct usb_device_id *match;
+ int i;
-
+
BT_DBG("intf %p", intf);
-
+
if (data->suspend_count++)
return 0;
-
+
+ for (i = 0; btusb_fwcbs[i].fwfile; i++) {
+ match = usb_match_id(intf, btusb_fwcbs[i].usb_id_table);
+ if (match) {
spin_lock_irq(&data->txlock);
if (!((message.event & PM_EVENT_AUTO) && data->tx_in_flight)) {
set_bit(BTUSB_SUSPENDING, &data->flags);
-@@ -1179,6 +1238,14 @@ static int __init btusb_init(void)
-
+@@ -1187,6 +1246,14 @@ static int __init btusb_init(void)
+
static void __exit btusb_exit(void)
{
+ int i;
+ }
usb_deregister(&btusb_driver);
}
-
-diff --git a/drivers/bluetooth/fwload.c b/drivers/bluetooth/fwload.c
-new file mode 100644
-index 0000000..a9a586a
+
--- /dev/null
+++ b/drivers/bluetooth/fwload.c
@@ -0,0 +1,199 @@
+MODULE_DESCRIPTION("Firmware load driver");
+MODULE_VERSION(VERSION);
+MODULE_LICENSE("GPL");
-diff --git a/drivers/bluetooth/fwload.h b/drivers/bluetooth/fwload.h
-new file mode 100644
-index 0000000..5c1136a
--- /dev/null
+++ b/drivers/bluetooth/fwload.h
@@ -0,0 +1,39 @@
+void ath_fw_unload(void *pdata, bool bsuspend);
+
+#endif /* _FWLOAD_H_ */
---
-1.6.3.3
-