From 158159191395eea3263cc2ac2cace04d7e772454 Mon Sep 17 00:00:00 2001 From: "Luis R. Rodriguez" Date: Fri, 22 Oct 2010 19:24:45 -0700 Subject: [PATCH] compat-wireless: refresh crap patches Signed-off-by: Luis R. Rodriguez --- ...-debugfs-interface-to-dump-registers.patch | 8 +-- crap/0002-ath9k-Add-pktlog-support.patch | 8 +-- crap/0003-btusb-Add-fw-load-support.patch | 63 ++++++++----------- 3 files changed, 33 insertions(+), 46 deletions(-) diff --git a/crap/0001-ath9k-Add-debugfs-interface-to-dump-registers.patch b/crap/0001-ath9k-Add-debugfs-interface-to-dump-registers.patch index c882d1464b7c..7d55d3a44733 100644 --- a/crap/0001-ath9k-Add-debugfs-interface-to-dump-registers.patch +++ b/crap/0001-ath9k-Add-debugfs-interface-to-dump-registers.patch @@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau #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, }; @@ -83,7 +83,7 @@ Signed-off-by: Felix Fietkau 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; @@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau 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; @@ -105,7 +105,7 @@ Signed-off-by: Felix Fietkau --- 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; diff --git a/crap/0002-ath9k-Add-pktlog-support.patch b/crap/0002-ath9k-Add-pktlog-support.patch index 0cecf3421c81..4d79125ea88e 100644 --- a/crap/0002-ath9k-Add-pktlog-support.patch +++ b/crap/0002-ath9k-Add-pktlog-support.patch @@ -87,7 +87,7 @@ Signed-off-by: Vasanthakumar Thiagarajan { 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); @@ -161,7 +161,7 @@ Signed-off-by: Vasanthakumar Thiagarajan 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; @@ -1232,7 +1232,7 @@ Signed-off-by: Vasanthakumar Thiagarajan { 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]; @@ -1346,7 +1346,7 @@ Signed-off-by: Vasanthakumar Thiagarajan 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); } diff --git a/crap/0003-btusb-Add-fw-load-support.patch b/crap/0003-btusb-Add-fw-load-support.patch index 87276c9662b9..8c34bfda6fb1 100644 --- a/crap/0003-btusb-Add-fw-load-support.patch +++ b/crap/0003-btusb-Add-fw-load-support.patch @@ -30,34 +30,30 @@ Subject: [PATCH] Added support to load firmware to target RAM from btusb transpo 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 #include +#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) }, @@ -81,18 +77,18 @@ index d22ce3c..13e0fb8 100644 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) { @@ -107,20 +103,20 @@ index d22ce3c..13e0fb8 100644 + } + 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) { @@ -134,20 +130,20 @@ index d22ce3c..13e0fb8 100644 + } + 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) { @@ -159,8 +155,8 @@ index d22ce3c..13e0fb8 100644 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; @@ -173,10 +169,7 @@ index d22ce3c..13e0fb8 100644 + } 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 @@ @@ -379,9 +372,6 @@ index 0000000..a9a586a +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 @@ @@ -424,6 +414,3 @@ index 0000000..5c1136a +void ath_fw_unload(void *pdata, bool bsuspend); + +#endif /* _FWLOAD_H_ */ --- -1.6.3.3 - -- 2.30.2