* [PATCH 0/7] compat-wireless: some general fixes
@ 2011-02-21 22:31 Hauke Mehrtens
2011-02-21 22:31 ` [PATCH 1/7] compat-wireless: rename some config options Hauke Mehrtens
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Hauke Mehrtens @ 2011-02-21 22:31 UTC (permalink / raw
To: mcgrof, lrodriguez; +Cc: linux-wireless, Hauke Mehrtens
These fixes are needed to make compat-wireless work again. This
replaces the patches send on 17. Feburay. To remove 08-rename-config-
options.patch we need the KConfig system and it would also fix some
other problems. To make things work again the patches for compat are
also needed.
Hauke Mehrtens (7):
compat-wireless: rename some config options
compat-wireless: backport pm ops for atlx
compat-wireless: some updates to bluetooth patch
compat-wireless: brcm80211 fix is in upstream now
compat-wireless: Add drivers/net/wireless/rtlwifi/rtl8192c
compat-wireless: generate CONFIG_COMPAT_KERNEL_39
compat-wireless: build ath9k common when no pci is available
config.mk | 28 +++---
patches/08-rename-config-options.patch | 132 ++++++++++++++++++++++++++
patches/08-rename-iwl4965-config.patch | 63 ------------
patches/11-dev-pm-ops.patch | 33 ++++++-
patches/16-bluetooth.patch | 130 +++++++++++++++++---------
patches/38-brcm80211-mac80211-backport.patch | 14 ---
patches/99-change-makefiles.patch | 2 +-
scripts/admin-update.sh | 1 +
scripts/driver-select | 4 +-
9 files changed, 265 insertions(+), 142 deletions(-)
create mode 100644 patches/08-rename-config-options.patch
delete mode 100644 patches/08-rename-iwl4965-config.patch
delete mode 100644 patches/38-brcm80211-mac80211-backport.patch
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/7] compat-wireless: rename some config options
2011-02-21 22:31 [PATCH 0/7] compat-wireless: some general fixes Hauke Mehrtens
@ 2011-02-21 22:31 ` Hauke Mehrtens
2011-02-21 22:31 ` [PATCH 2/7] compat-wireless: backport pm ops for atlx Hauke Mehrtens
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Hauke Mehrtens @ 2011-02-21 22:31 UTC (permalink / raw
To: mcgrof, lrodriguez; +Cc: linux-wireless, Hauke Mehrtens
Some config options have to be renamed to deactivate then, when they are
activated in the kernel config or for changing them from m to y.
* The zd1211rw works only with kernel > 2.6.27
* CONFIG_BT_L2CAP and CONFIG_BT_SCO are boolean now, but often set to m
in the kernel config.
* CONFIG_BT_HIDP does not build with older kernel versions.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
config.mk | 12 ++--
patches/08-rename-config-options.patch | 132 ++++++++++++++++++++++++++++++++
patches/08-rename-iwl4965-config.patch | 63 ---------------
patches/99-change-makefiles.patch | 2 +-
scripts/driver-select | 4 +-
5 files changed, 141 insertions(+), 72 deletions(-)
create mode 100644 patches/08-rename-config-options.patch
delete mode 100644 patches/08-rename-iwl4965-config.patch
diff --git a/config.mk b/config.mk
index e7f04ea..2485336 100644
--- a/config.mk
+++ b/config.mk
@@ -159,8 +159,8 @@ CONFIG_LIB80211_CRYPT_TKIP=m
# CONFIG_LIB80211_DEBUG=y
CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
+CONFIG_COMPAT_BT_L2CAP=y
+CONFIG_COMPAT_BT_SCO=y
CONFIG_BT_RFCOMM=m
CONFIG_BT_RFCOMM_TTY=y
CONFIG_BT_BNEP=m
@@ -170,7 +170,9 @@ CONFIG_BT_BNEP_PROTO_FILTER=y
ifdef CONFIG_ISDN_CAPI
CONFIG_BT_CMTP=m
endif #CONFIG_ISDN_CAPI
-CONFIG_BT_HIDP=m
+ifndef CONFIG_COMPAT_KERNEL_28
+CONFIG_COMPAT_BT_HIDP=m
+endif #CONFIG_COMPAT_KERNEL_28
CONFIG_BT_HCIUART=M
CONFIG_BT_HCIUART_H4=y
@@ -388,10 +390,8 @@ CONFIG_EEPROM_93CX6=m
# USB Drivers
ifdef CONFIG_USB
ifndef CONFIG_COMPAT_KERNEL_29
-CONFIG_ZD1211RW=m
+CONFIG_COMPAT_ZD1211RW=m
# CONFIG_ZD1211RW_DEBUG=y
-else
-CONFIG_ZD1211RW=n
endif #CONFIG_COMPAT_KERNEL_29
# Sorry, rndis_wlan uses cancel_work_sync which is new and can't be done in compat...
diff --git a/patches/08-rename-config-options.patch b/patches/08-rename-config-options.patch
new file mode 100644
index 0000000..a81e0bf
--- /dev/null
+++ b/patches/08-rename-config-options.patch
@@ -0,0 +1,132 @@
+In kernel 2.6.26 and older CONFIG_IWL4965 was build as an extra
+module, but now it is directly included in the iwlagn.
+
+CONFIG_IWL4965 has to be set to y, to build correctly.
+
+zd1211rw does not build with kernel < 2.6.28, but it is often activated
+in the kernel config of older kernels. We rename the option to
+deactivate it on older kernels.
+CONFIG_BT_L2CAP and CONFIG_BT_SCO are boolean now, but often set to m
+in the kernel config.
+
+CONFIG_BT_HIDP does not build with older kernel versions.
+
+--- a/drivers/net/wireless/Makefile
++++ b/drivers/net/wireless/Makefile
+@@ -21,7 +21,7 @@ obj-$(CONFIG_PRISM54) += prism54/
+ obj-$(CONFIG_HOSTAP) += hostap/
+ obj-$(CONFIG_B43) += b43/
+ obj-$(CONFIG_B43LEGACY) += b43legacy/
+-obj-$(CONFIG_ZD1211RW) += zd1211rw/
++obj-$(CONFIG_COMPAT_ZD1211RW) += zd1211rw/
+ obj-$(CONFIG_RTL8180) += rtl818x/
+ obj-$(CONFIG_RTL8187) += rtl818x/
+ obj-$(CONFIG_RTL8192CE) += rtlwifi/
+@@ -41,7 +41,7 @@ obj-$(CONFIG_ADM8211) += adm8211.o
+
+ obj-$(CONFIG_MWL8K) += mwl8k.o
+
+-obj-$(CONFIG_IWLWIFI) += iwlwifi/
++obj-$(CONFIG_COMPAT_IWLWIFI) += iwlwifi/
+ obj-$(CONFIG_RT2X00) += rt2x00/
+
+ obj-$(CONFIG_P54_COMMON) += p54/
+--- a/drivers/net/wireless/iwlwifi/Makefile
++++ b/drivers/net/wireless/iwlwifi/Makefile
+@@ -1,9 +1,9 @@
+-obj-$(CONFIG_IWLWIFI) += iwlcore.o
++obj-$(CONFIG_COMPAT_IWLWIFI) += iwlcore.o
+ iwlcore-objs := iwl-core.o iwl-eeprom.o iwl-hcmd.o iwl-power.o
+ iwlcore-objs += iwl-rx.o iwl-tx.o iwl-sta.o
+ iwlcore-objs += iwl-scan.o iwl-led.o
+ iwlcore-$(CONFIG_IWL3945) += iwl-legacy.o
+-iwlcore-$(CONFIG_IWL4965) += iwl-legacy.o
++iwlcore-$(CONFIG_COMPAT_IWL4965) += iwl-legacy.o
+ iwlcore-$(CONFIG_IWLWIFI_DEBUGFS) += iwl-debugfs.o
+ iwlcore-$(CONFIG_IWLWIFI_DEVICE_TRACING) += iwl-devtrace.o
+
+@@ -21,7 +21,7 @@ iwlagn-objs += iwl-agn-lib.o iwl-agn-rx
+ iwlagn-objs += iwl-agn-tt.o iwl-agn-sta.o iwl-agn-eeprom.o
+ iwlagn-$(CONFIG_IWLWIFI_DEBUGFS) += iwl-agn-debugfs.o
+
+-iwlagn-$(CONFIG_IWL4965) += iwl-4965.o
++iwlagn-$(CONFIG_COMPAT_IWL4965) += iwl-4965.o
+ iwlagn-$(CONFIG_IWL5000) += iwl-agn-rxon.o iwl-agn-hcmd.o iwl-agn-ict.o
+ iwlagn-$(CONFIG_IWL5000) += iwl-5000.o
+ iwlagn-$(CONFIG_IWL5000) += iwl-6000.o
+--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
++++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
+@@ -4121,7 +4121,7 @@ static int iwl_pci_probe(struct pci_dev
+ #ifdef CONFIG_IWL5000
+ iwlagn_hw_ops.hw_scan = NULL;
+ #endif
+-#ifdef CONFIG_IWL4965
++#ifdef CONFIG_COMPAT_IWL4965
+ iwl4965_hw_ops.hw_scan = NULL;
+ #endif
+ }
+@@ -4502,10 +4502,10 @@ static void __devexit iwl_pci_remove(str
+
+ /* Hardware specific file defines the PCI IDs table for that hardware module */
+ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = {
+-#ifdef CONFIG_IWL4965
++#ifdef CONFIG_COMPAT_IWL4965
+ {IWL_PCI_DEVICE(0x4229, PCI_ANY_ID, iwl4965_agn_cfg)},
+ {IWL_PCI_DEVICE(0x4230, PCI_ANY_ID, iwl4965_agn_cfg)},
+-#endif /* CONFIG_IWL4965 */
++#endif /* CONFIG_COMPAT_IWL4965 */
+ #ifdef CONFIG_IWL5000
+ /* 5100 Series WiFi */
+ {IWL_PCI_DEVICE(0x4232, 0x1201, iwl5100_agn_cfg)}, /* Mini Card */
+--- a/drivers/net/wireless/zd1211rw/Makefile
++++ b/drivers/net/wireless/zd1211rw/Makefile
+@@ -1,4 +1,4 @@
+-obj-$(CONFIG_ZD1211RW) += zd1211rw.o
++obj-$(CONFIG_COMPAT_ZD1211RW) += zd1211rw.o
+
+ zd1211rw-objs := zd_chip.o zd_mac.o \
+ zd_rf_al2230.o zd_rf_rf2959.o \
+--- a/include/net/bluetooth/bluetooth.h
++++ b/include/net/bluetooth/bluetooth.h
+@@ -205,7 +205,7 @@ extern void bt_sysfs_cleanup(void);
+
+ extern struct dentry *bt_debugfs;
+
+-#ifdef CONFIG_BT_L2CAP
++#ifdef CONFIG_COMPAT_BT_L2CAP
+ int l2cap_init(void);
+ void l2cap_exit(void);
+ #else
+@@ -219,7 +219,7 @@ static inline void l2cap_exit(void)
+ }
+ #endif
+
+-#ifdef CONFIG_BT_SCO
++#ifdef CONFIG_COMPAT_BT_SCO
+ int sco_init(void);
+ void sco_exit(void);
+ #else
+--- a/net/bluetooth/Makefile
++++ b/net/bluetooth/Makefile
+@@ -6,8 +6,8 @@ obj-$(CONFIG_BT) += bluetooth.o
+ obj-$(CONFIG_BT_RFCOMM) += rfcomm/
+ obj-$(CONFIG_BT_BNEP) += bnep/
+ obj-$(CONFIG_BT_CMTP) += cmtp/
+-obj-$(CONFIG_BT_HIDP) += hidp/
++obj-$(CONFIG_COMPAT_BT_HIDP) += hidp/
+
+ bluetooth-y := af_bluetooth.o hci_core.o hci_conn.o hci_event.o mgmt.o hci_sock.o hci_sysfs.o lib.o
+-bluetooth-$(CONFIG_BT_L2CAP) += l2cap_core.o l2cap_sock.o
+-bluetooth-$(CONFIG_BT_SCO) += sco.o
++bluetooth-$(CONFIG_COMPAT_BT_L2CAP) += l2cap_core.o l2cap_sock.o
++bluetooth-$(CONFIG_COMPAT_BT_SCO) += sco.o
+--- a/net/bluetooth/hidp/Makefile
++++ b/net/bluetooth/hidp/Makefile
+@@ -2,6 +2,6 @@
+ # Makefile for the Linux Bluetooth HIDP layer
+ #
+
+-obj-$(CONFIG_BT_HIDP) += hidp.o
++obj-$(CONFIG_COMPAT_BT_HIDP) += hidp.o
+
+ hidp-objs := core.o sock.o
diff --git a/patches/08-rename-iwl4965-config.patch b/patches/08-rename-iwl4965-config.patch
deleted file mode 100644
index 61a0f1e..0000000
--- a/patches/08-rename-iwl4965-config.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-In kernel 2.6.26 and older CONFIG_IWL4965 was build as an extra
-module, but now it is directly included in the iwlagn.
-
-CONFIG_IWL4965 has to be set to y, to build correctly.
-
---- a/drivers/net/wireless/Makefile
-+++ b/drivers/net/wireless/Makefile
-@@ -41,7 +41,7 @@ obj-$(CONFIG_ADM8211) += adm8211.o
-
- obj-$(CONFIG_MWL8K) += mwl8k.o
-
--obj-$(CONFIG_IWLWIFI) += iwlwifi/
-+obj-$(CONFIG_COMPAT_IWLWIFI) += iwlwifi/
- obj-$(CONFIG_RT2X00) += rt2x00/
-
- obj-$(CONFIG_P54_COMMON) += p54/
---- a/drivers/net/wireless/iwlwifi/Makefile
-+++ b/drivers/net/wireless/iwlwifi/Makefile
-@@ -1,9 +1,9 @@
--obj-$(CONFIG_IWLWIFI) += iwlcore.o
-+obj-$(CONFIG_COMPAT_IWLWIFI) += iwlcore.o
- iwlcore-objs := iwl-core.o iwl-eeprom.o iwl-hcmd.o iwl-power.o
- iwlcore-objs += iwl-rx.o iwl-tx.o iwl-sta.o
- iwlcore-objs += iwl-scan.o iwl-led.o
- iwlcore-$(CONFIG_IWL3945) += iwl-legacy.o
--iwlcore-$(CONFIG_IWL4965) += iwl-legacy.o
-+iwlcore-$(CONFIG_COMPAT_IWL4965) += iwl-legacy.o
- iwlcore-$(CONFIG_IWLWIFI_DEBUGFS) += iwl-debugfs.o
- iwlcore-$(CONFIG_IWLWIFI_DEVICE_TRACING) += iwl-devtrace.o
-
-@@ -21,7 +21,7 @@ iwlagn-objs += iwl-agn-lib.o iwl-agn-rx
- iwlagn-objs += iwl-agn-tt.o iwl-agn-sta.o iwl-agn-eeprom.o
- iwlagn-$(CONFIG_IWLWIFI_DEBUGFS) += iwl-agn-debugfs.o
-
--iwlagn-$(CONFIG_IWL4965) += iwl-4965.o
-+iwlagn-$(CONFIG_COMPAT_IWL4965) += iwl-4965.o
- iwlagn-$(CONFIG_IWL5000) += iwl-agn-rxon.o iwl-agn-hcmd.o iwl-agn-ict.o
- iwlagn-$(CONFIG_IWL5000) += iwl-5000.o
- iwlagn-$(CONFIG_IWL5000) += iwl-6000.o
---- a/drivers/net/wireless/iwlwifi/iwl-agn.c
-+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
-@@ -4080,7 +4080,7 @@ static int iwl_pci_probe(struct pci_dev
- #ifdef CONFIG_IWL5000
- iwlagn_hw_ops.hw_scan = NULL;
- #endif
--#ifdef CONFIG_IWL4965
-+#ifdef CONFIG_COMPAT_IWL4965
- iwl4965_hw_ops.hw_scan = NULL;
- #endif
- }
-@@ -4461,10 +4461,10 @@ static void __devexit iwl_pci_remove(str
-
- /* Hardware specific file defines the PCI IDs table for that hardware module */
- static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = {
--#ifdef CONFIG_IWL4965
-+#ifdef CONFIG_COMPAT_IWL4965
- {IWL_PCI_DEVICE(0x4229, PCI_ANY_ID, iwl4965_agn_cfg)},
- {IWL_PCI_DEVICE(0x4230, PCI_ANY_ID, iwl4965_agn_cfg)},
--#endif /* CONFIG_IWL4965 */
-+#endif /* CONFIG_COMPAT_IWL4965 */
- #ifdef CONFIG_IWL5000
- /* 5100 Series WiFi */
- {IWL_PCI_DEVICE(0x4232, 0x1201, iwl5100_agn_cfg)}, /* Mini Card */
diff --git a/patches/99-change-makefiles.patch b/patches/99-change-makefiles.patch
index 585ff03..187c110 100644
--- a/patches/99-change-makefiles.patch
+++ b/patches/99-change-makefiles.patch
@@ -63,7 +63,7 @@ only the wireless stuff.
-obj-$(CONFIG_HOSTAP) += hostap/
obj-$(CONFIG_B43) += b43/
obj-$(CONFIG_B43LEGACY) += b43legacy/
- obj-$(CONFIG_ZD1211RW) += zd1211rw/
+ obj-$(CONFIG_COMPAT_ZD1211RW) += zd1211rw/
@@ -26,13 +16,8 @@ obj-$(CONFIG_RTL8180) += rtl818x/
obj-$(CONFIG_RTL8187) += rtl818x/
obj-$(CONFIG_RTL8192CE) += rtlwifi/
diff --git a/scripts/driver-select b/scripts/driver-select
index 0d5a38b..b18869e 100755
--- a/scripts/driver-select
+++ b/scripts/driver-select
@@ -306,7 +306,7 @@ case $1 in
# Group drivers
atheros)
select_drivers CONFIG_ATH_COMMON \
- CONFIG_ZD1211RW
+ CONFIG_COMPAT_ZD1211RW
disable_staging
disable_var_01
;;
@@ -383,7 +383,7 @@ case $1 in
select_driver CONFIG_NOTHING
;;
zd1211rw)
- select_driver CONFIG_ZD1211RW
+ select_driver CONFIG_COMPAT_ZD1211RW
disable_staging
disable_var_01
;;
--
1.7.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/7] compat-wireless: backport pm ops for atlx
2011-02-21 22:31 [PATCH 0/7] compat-wireless: some general fixes Hauke Mehrtens
2011-02-21 22:31 ` [PATCH 1/7] compat-wireless: rename some config options Hauke Mehrtens
@ 2011-02-21 22:31 ` Hauke Mehrtens
2011-02-21 22:31 ` [PATCH 3/7] compat-wireless: some updates to bluetooth patch Hauke Mehrtens
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Hauke Mehrtens @ 2011-02-21 22:31 UTC (permalink / raw
To: mcgrof, lrodriguez; +Cc: linux-wireless, Hauke Mehrtens
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
patches/11-dev-pm-ops.patch | 33 +++++++++++++++++++++++++++++----
1 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/patches/11-dev-pm-ops.patch b/patches/11-dev-pm-ops.patch
index 89a3edc..4f06028 100644
--- a/patches/11-dev-pm-ops.patch
+++ b/patches/11-dev-pm-ops.patch
@@ -32,6 +32,31 @@ calls on compat code with only slight modifications.
};
/*
+--- a/drivers/net/atlx/atl1.c
++++ b/drivers/net/atlx/atl1.c
+@@ -2839,6 +2839,9 @@ static int atl1_resume(struct device *de
+ return 0;
+ }
+
++compat_pci_suspend(atl1_suspend)
++compat_pci_resume(atl1_resume)
++
+ static SIMPLE_DEV_PM_OPS(atl1_pm_ops, atl1_suspend, atl1_resume);
+ #define ATL1_PM_OPS (&atl1_pm_ops)
+
+@@ -3101,7 +3104,12 @@ static struct pci_driver atl1_driver = {
+ .probe = atl1_probe,
+ .remove = __devexit_p(atl1_remove),
+ .shutdown = atl1_shutdown,
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
+ .driver.pm = ATL1_PM_OPS,
++#elif defined(CONFIG_PM_SLEEP)
++ .suspend = atl1_suspend_compat,
++ .resume = atl1_resume_compat,
++#endif
+ };
+
+ /*
--- a/drivers/net/wireless/ath/ath5k/pci.c
+++ b/drivers/net/wireless/ath/ath5k/pci.c
@@ -287,6 +287,9 @@ static int ath5k_pci_resume(struct devic
@@ -94,7 +119,7 @@ calls on compat code with only slight modifications.
int ath_pci_init(void)
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
-@@ -4663,7 +4663,12 @@ static struct pci_driver iwl_driver = {
+@@ -4704,7 +4704,12 @@ static struct pci_driver iwl_driver = {
.id_table = iwl_hw_card_ids,
.probe = iwl_pci_probe,
.remove = __devexit_p(iwl_pci_remove),
@@ -109,7 +134,7 @@ calls on compat code with only slight modifications.
static int __init iwl_init(void)
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
-@@ -2105,14 +2105,16 @@ int iwl_pci_resume(struct device *device
+@@ -2101,14 +2101,16 @@ int iwl_pci_resume(struct device *device
}
EXPORT_SYMBOL(iwl_pci_resume);
@@ -136,7 +161,7 @@ calls on compat code with only slight modifications.
#endif /* CONFIG_PM */
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
-@@ -620,7 +620,12 @@ __le32 iwl_add_beacon_time(struct iwl_pr
+@@ -621,7 +621,12 @@ __le32 iwl_add_beacon_time(struct iwl_pr
#ifdef CONFIG_PM
int iwl_pci_suspend(struct device *device);
int iwl_pci_resume(struct device *device);
@@ -151,7 +176,7 @@ calls on compat code with only slight modifications.
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
-@@ -4271,7 +4271,12 @@ static struct pci_driver iwl3945_driver
+@@ -4277,7 +4277,12 @@ static struct pci_driver iwl3945_driver
.id_table = iwl3945_hw_card_ids,
.probe = iwl3945_pci_probe,
.remove = __devexit_p(iwl3945_pci_remove),
--
1.7.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/7] compat-wireless: some updates to bluetooth patch
2011-02-21 22:31 [PATCH 0/7] compat-wireless: some general fixes Hauke Mehrtens
2011-02-21 22:31 ` [PATCH 1/7] compat-wireless: rename some config options Hauke Mehrtens
2011-02-21 22:31 ` [PATCH 2/7] compat-wireless: backport pm ops for atlx Hauke Mehrtens
@ 2011-02-21 22:31 ` Hauke Mehrtens
2011-02-21 22:31 ` [PATCH 4/7] compat-wireless: brcm80211 fix is in upstream now Hauke Mehrtens
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Hauke Mehrtens @ 2011-02-21 22:31 UTC (permalink / raw
To: mcgrof, lrodriguez; +Cc: linux-wireless, Hauke Mehrtens
* rfkill_backport.h will be included in rfkill.h
* tty does not have a dev member on older kernel versions
* hid->hid_get_raw_report was introduced in very recent kernel versions
* the signature of some callback functions changed
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
patches/16-bluetooth.patch | 130 +++++++++++++++++++++++++++++---------------
1 files changed, 87 insertions(+), 43 deletions(-)
diff --git a/patches/16-bluetooth.patch b/patches/16-bluetooth.patch
index d54e517..57863ac 100644
--- a/patches/16-bluetooth.patch
+++ b/patches/16-bluetooth.patch
@@ -17,7 +17,17 @@ here still, but for now we keep this here.
tty_driver_flush_buffer(tty);
return 0;
-@@ -497,7 +502,11 @@ static int hci_uart_tty_ioctl(struct tty
+@@ -398,7 +403,9 @@ static int hci_uart_register_dev(struct
+ hdev->flush = hci_uart_flush;
+ hdev->send = hci_uart_send_frame;
+ hdev->destruct = hci_uart_destruct;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)
+ hdev->parent = hu->tty->dev;
++#endif
+
+ hdev->owner = THIS_MODULE;
+
+@@ -498,7 +505,11 @@ static int hci_uart_tty_ioctl(struct tty
return hu->hdev_flags;
default:
@@ -82,21 +92,6 @@ here still, but for now we keep this here.
atomic_inc(&session->terminate);
cmtp_schedule(session);
---- a/net/bluetooth/hci_core.c
-+++ b/net/bluetooth/hci_core.c
-@@ -40,7 +40,12 @@
- #include <linux/workqueue.h>
- #include <linux/interrupt.h>
- #include <linux/notifier.h>
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31))
- #include <linux/rfkill.h>
-+#else
-+#include <linux/rfkill_backport.h>
-+#endif
-+
- #include <net/sock.h>
-
- #include <asm/system.h>
--- a/net/bluetooth/hci_sock.c
+++ b/net/bluetooth/hci_sock.c
@@ -605,7 +605,11 @@ drop:
@@ -164,17 +159,17 @@ here still, but for now we keep this here.
};
--- a/net/bluetooth/hidp/core.c
+++ b/net/bluetooth/hidp/core.c
-@@ -316,6 +316,7 @@ static int hidp_send_report(struct hidp_
- return hidp_queue_report(session, buf, rsize);
+@@ -397,6 +397,7 @@ err_eio:
+ return -EIO;
}
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
static int hidp_output_raw_report(struct hid_device *hid, unsigned char *data, size_t count,
unsigned char report_type)
{
-@@ -335,6 +336,16 @@ static int hidp_output_raw_report(struct
- return -ENOMEM;
- return count;
+@@ -456,6 +457,16 @@ err:
+ mutex_unlock(&session->report_mutex);
+ return ret;
}
+#elif (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27))
+static int hidp_output_raw_report(struct hid_device *hid, unsigned char *data, size_t count)
@@ -189,7 +184,7 @@ here still, but for now we keep this here.
static void hidp_idle_timeout(unsigned long arg)
{
-@@ -600,8 +611,14 @@ static int hidp_session(void *arg)
+@@ -752,8 +763,14 @@ static int hidp_session(void *arg)
}
if (session->hid) {
@@ -204,7 +199,7 @@ here still, but for now we keep this here.
}
/* Wakeup user-space polling for socket errors */
-@@ -714,6 +731,70 @@ static void hidp_close(struct hid_device
+@@ -866,6 +883,70 @@ static void hidp_close(struct hid_device
{
}
@@ -275,7 +270,17 @@ here still, but for now we keep this here.
static int hidp_parse(struct hid_device *hid)
{
struct hidp_session *session = hid->driver_data;
-@@ -814,6 +895,7 @@ fault:
+@@ -950,7 +1031,9 @@ static int hidp_setup_hid(struct hidp_se
+ hid->dev.parent = hidp_get_device(session);
+ hid->ll_driver = &hidp_hid_driver;
+
++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,38))
+ hid->hid_get_raw_report = hidp_get_raw_report;
++#endif
+ hid->hid_output_raw_report = hidp_output_raw_report;
+
+ return 0;
+@@ -961,6 +1044,7 @@ fault:
return err;
}
@@ -283,7 +288,7 @@ here still, but for now we keep this here.
int hidp_add_connection(struct hidp_connadd_req *req, struct socket *ctrl_sock, struct socket *intr_sock)
{
-@@ -832,6 +914,39 @@ int hidp_add_connection(struct hidp_conn
+@@ -979,6 +1063,39 @@ int hidp_add_connection(struct hidp_conn
BT_DBG("rd_data %p rd_size %d", req->rd_data, req->rd_size);
@@ -323,7 +328,7 @@ here still, but for now we keep this here.
down_write(&hidp_session_sem);
s = __hidp_get_session(&bt_sk(ctrl_sock->sk)->dst);
-@@ -859,6 +974,7 @@ int hidp_add_connection(struct hidp_conn
+@@ -1010,6 +1127,7 @@ int hidp_add_connection(struct hidp_conn
session->flags = req->flags & (1 << HIDP_BLUETOOTH_VENDOR_ID);
session->idle_to = req->idle_to;
@@ -331,7 +336,7 @@ here still, but for now we keep this here.
if (req->rd_size > 0) {
err = hidp_setup_hid(session, req);
if (err && err != -ENODEV)
-@@ -870,6 +986,16 @@ int hidp_add_connection(struct hidp_conn
+@@ -1021,6 +1139,16 @@ int hidp_add_connection(struct hidp_conn
if (err < 0)
goto purge;
}
@@ -348,7 +353,7 @@ here still, but for now we keep this here.
__hidp_link_session(session);
-@@ -901,6 +1027,7 @@ unlink:
+@@ -1066,6 +1194,7 @@ unlink:
session->input = NULL;
}
@@ -356,7 +361,7 @@ here still, but for now we keep this here.
if (session->hid) {
hid_destroy_device(session->hid);
session->hid = NULL;
-@@ -912,10 +1039,15 @@ unlink:
+@@ -1077,10 +1206,15 @@ unlink:
purge:
skb_queue_purge(&session->ctrl_transmit);
skb_queue_purge(&session->intr_transmit);
@@ -372,7 +377,7 @@ here still, but for now we keep this here.
input_free_device(session->input);
kfree(session);
return err;
-@@ -1005,6 +1137,7 @@ int hidp_get_conninfo(struct hidp_connin
+@@ -1170,6 +1304,7 @@ int hidp_get_conninfo(struct hidp_connin
return err;
}
@@ -380,7 +385,7 @@ here still, but for now we keep this here.
static const struct hid_device_id hidp_table[] = {
{ HID_BLUETOOTH_DEVICE(HID_ANY_ID, HID_ANY_ID) },
{ }
-@@ -1014,6 +1147,7 @@ static struct hid_driver hidp_driver = {
+@@ -1179,6 +1314,7 @@ static struct hid_driver hidp_driver = {
.name = "generic-bluetooth",
.id_table = hidp_table,
};
@@ -388,7 +393,7 @@ here still, but for now we keep this here.
static int __init hidp_init(void)
{
-@@ -1023,11 +1157,14 @@ static int __init hidp_init(void)
+@@ -1186,11 +1322,14 @@ static int __init hidp_init(void)
BT_INFO("HIDP (Human Interface Emulation) ver %s", VERSION);
@@ -403,7 +408,7 @@ here still, but for now we keep this here.
if (ret)
goto err_drv;
-@@ -1035,13 +1172,16 @@ static int __init hidp_init(void)
+@@ -1198,13 +1337,16 @@ static int __init hidp_init(void)
err_drv:
hid_unregister_driver(&hidp_driver);
err:
@@ -450,7 +455,7 @@ here still, but for now we keep this here.
struct bt_security sec;
--- a/net/bluetooth/rfcomm/tty.c
+++ b/net/bluetooth/rfcomm/tty.c
-@@ -733,8 +733,12 @@ static int rfcomm_tty_open(struct tty_st
+@@ -735,8 +735,12 @@ static int rfcomm_tty_open(struct tty_st
remove_wait_queue(&dev->wait, &wait);
if (err == 0)
@@ -463,7 +468,7 @@ here still, but for now we keep this here.
rfcomm_tty_copy_pending(dev);
-@@ -754,7 +758,11 @@ static void rfcomm_tty_close(struct tty_
+@@ -756,7 +760,11 @@ static void rfcomm_tty_close(struct tty_
if (atomic_dec_and_test(&dev->opened)) {
if (dev->tty_dev->parent)
@@ -475,9 +480,45 @@ here still, but for now we keep this here.
/* Close DLC and dettach TTY */
rfcomm_dlc_close(dev->dlc, 0);
+@@ -832,7 +840,11 @@ static int rfcomm_tty_write_room(struct
+ return room;
+ }
+
++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,38))
+ static int rfcomm_tty_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg)
++#else
++static int rfcomm_tty_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd, unsigned long arg)
++#endif
+ {
+ BT_DBG("tty %p cmd 0x%02x", tty, cmd);
+
+@@ -1091,7 +1103,11 @@ static void rfcomm_tty_hangup(struct tty
+ }
+ }
+
++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,38))
+ static int rfcomm_tty_tiocmget(struct tty_struct *tty)
++#else
++static int rfcomm_tty_tiocmget(struct tty_struct *tty, struct file *filp)
++#endif
+ {
+ struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data;
+
+@@ -1100,7 +1116,11 @@ static int rfcomm_tty_tiocmget(struct tt
+ return dev->modem_status;
+ }
+
++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,38))
+ static int rfcomm_tty_tiocmset(struct tty_struct *tty, unsigned int set, unsigned int clear)
++#else
++static int rfcomm_tty_tiocmset(struct tty_struct *tty, struct file *filp, unsigned int set, unsigned int clear)
++#endif
+ {
+ struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data;
+ struct rfcomm_dlc *dlc = dev->dlc;
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
-@@ -430,8 +430,12 @@ static struct sock *sco_sock_alloc(struc
+@@ -428,8 +428,12 @@ static struct sock *sco_sock_alloc(struc
return sk;
}
@@ -490,7 +531,7 @@ here still, but for now we keep this here.
{
struct sock *sk;
-@@ -647,7 +651,11 @@ static int sco_sock_sendmsg(struct kiocb
+@@ -645,7 +649,11 @@ static int sco_sock_sendmsg(struct kiocb
return err;
}
@@ -504,7 +545,7 @@ here still, but for now we keep this here.
int err = 0;
--- a/net/bluetooth/bnep/sock.c
+++ b/net/bluetooth/bnep/sock.c
-@@ -195,8 +195,12 @@ static struct proto bnep_proto = {
+@@ -196,8 +196,12 @@ static struct proto bnep_proto = {
.obj_size = sizeof(struct bt_sock)
};
@@ -549,19 +590,22 @@ here still, but for now we keep this here.
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
-@@ -520,7 +520,11 @@ static int l2cap_sock_getsockopt(struct
+@@ -610,7 +610,14 @@ static int l2cap_sock_setsockopt_old(str
return err;
}
++
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31))
- static int l2cap_sock_setsockopt_old(struct socket *sock, int optname, char __user *optval, unsigned int optlen)
+ static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname, char __user *optval, unsigned int optlen)
+#else
+static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname, char __user *optval, int optlen)
+#endif
++
++
{
struct sock *sk = sock->sk;
- struct l2cap_options opts;
-@@ -1067,8 +1071,12 @@ struct sock *l2cap_sock_alloc(struct net
+ struct bt_security sec;
+@@ -1073,8 +1080,12 @@ struct sock *l2cap_sock_alloc(struct net
return sk;
}
@@ -574,7 +618,7 @@ here still, but for now we keep this here.
{
struct sock *sk;
-@@ -1080,7 +1088,11 @@ static int l2cap_sock_create(struct net
+@@ -1086,7 +1097,11 @@ static int l2cap_sock_create(struct net
sock->type != SOCK_DGRAM && sock->type != SOCK_RAW)
return -ESOCKTNOSUPPORT;
--
1.7.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/7] compat-wireless: brcm80211 fix is in upstream now
2011-02-21 22:31 [PATCH 0/7] compat-wireless: some general fixes Hauke Mehrtens
` (2 preceding siblings ...)
2011-02-21 22:31 ` [PATCH 3/7] compat-wireless: some updates to bluetooth patch Hauke Mehrtens
@ 2011-02-21 22:31 ` Hauke Mehrtens
2011-02-21 22:31 ` [PATCH 5/7] compat-wireless: Add drivers/net/wireless/rtlwifi/rtl8192c Hauke Mehrtens
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Hauke Mehrtens @ 2011-02-21 22:31 UTC (permalink / raw
To: mcgrof, lrodriguez; +Cc: linux-wireless, Hauke Mehrtens
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
patches/38-brcm80211-mac80211-backport.patch | 14 --------------
1 files changed, 0 insertions(+), 14 deletions(-)
delete mode 100644 patches/38-brcm80211-mac80211-backport.patch
diff --git a/patches/38-brcm80211-mac80211-backport.patch b/patches/38-brcm80211-mac80211-backport.patch
deleted file mode 100644
index 329a119..0000000
--- a/patches/38-brcm80211-mac80211-backport.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-This patch is a temporary solution as long as staging uses an older
-version of mac80211.
-
---- a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
-+++ b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
-@@ -2312,7 +2312,7 @@ static s32 wl_inform_single_bss(struct w
- notif_bss_info->frame_len =
- offsetof(struct ieee80211_mgmt,
- u.beacon.variable) + wl_get_ielen(wl);
-- freq = ieee80211_channel_to_frequency(notif_bss_info->channel);
-+ freq = ieee80211_channel_to_frequency(notif_bss_info->channel, notif_bss_info->band);
- channel = ieee80211_get_channel(wiphy, freq);
-
- WL_DBG("SSID : \"%s\", rssi %d, channel %d, capability : 0x04%x, bssid %pM\n",
--
1.7.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 5/7] compat-wireless: Add drivers/net/wireless/rtlwifi/rtl8192c
2011-02-21 22:31 [PATCH 0/7] compat-wireless: some general fixes Hauke Mehrtens
` (3 preceding siblings ...)
2011-02-21 22:31 ` [PATCH 4/7] compat-wireless: brcm80211 fix is in upstream now Hauke Mehrtens
@ 2011-02-21 22:31 ` Hauke Mehrtens
2011-02-21 22:31 ` [PATCH 6/7] compat-wireless: generate CONFIG_COMPAT_KERNEL_39 Hauke Mehrtens
2011-02-21 22:31 ` [PATCH 7/7] compat-wireless: build ath9k common when no pci is available Hauke Mehrtens
6 siblings, 0 replies; 8+ messages in thread
From: Hauke Mehrtens @ 2011-02-21 22:31 UTC (permalink / raw
To: mcgrof, lrodriguez; +Cc: linux-wireless, Hauke Mehrtens
This directory is needed for rtlwifi.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
scripts/admin-update.sh | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/scripts/admin-update.sh b/scripts/admin-update.sh
index 6fe49ce..d0eda2f 100755
--- a/scripts/admin-update.sh
+++ b/scripts/admin-update.sh
@@ -232,6 +232,7 @@ DRIVERS="$DRIVERS drivers/net/wireless/rtl818x"
DRIVERS="$DRIVERS drivers/net/wireless/rtl818x/rtl8180"
DRIVERS="$DRIVERS drivers/net/wireless/rtl818x/rtl8187"
DRIVERS="$DRIVERS drivers/net/wireless/rtlwifi"
+DRIVERS="$DRIVERS drivers/net/wireless/rtlwifi/rtl8192c"
DRIVERS="$DRIVERS drivers/net/wireless/rtlwifi/rtl8192ce"
DRIVERS="$DRIVERS drivers/net/wireless/libertas_tf"
DRIVERS="$DRIVERS drivers/net/wireless/ipw2x00"
--
1.7.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 6/7] compat-wireless: generate CONFIG_COMPAT_KERNEL_39
2011-02-21 22:31 [PATCH 0/7] compat-wireless: some general fixes Hauke Mehrtens
` (4 preceding siblings ...)
2011-02-21 22:31 ` [PATCH 5/7] compat-wireless: Add drivers/net/wireless/rtlwifi/rtl8192c Hauke Mehrtens
@ 2011-02-21 22:31 ` Hauke Mehrtens
2011-02-21 22:31 ` [PATCH 7/7] compat-wireless: build ath9k common when no pci is available Hauke Mehrtens
6 siblings, 0 replies; 8+ messages in thread
From: Hauke Mehrtens @ 2011-02-21 22:31 UTC (permalink / raw
To: mcgrof, lrodriguez; +Cc: linux-wireless, Hauke Mehrtens
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
config.mk | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/config.mk b/config.mk
index 2485336..08941b9 100644
--- a/config.mk
+++ b/config.mk
@@ -20,7 +20,7 @@ endif
# as I suspect all users of this package want 802.11e (WME) and
# 802.11n (HT) support.
ifneq ($(wildcard $(KLIB_BUILD)/Makefile),)
-COMPAT_LATEST_VERSION = 38
+COMPAT_LATEST_VERSION = 39
KERNEL_SUBLEVEL := $(shell $(MAKE) -C $(KLIB_BUILD) kernelversion | sed -n 's/^2\.6\.\([0-9]\+\).*/\1/p')
COMPAT_VERSIONS := $(shell I=$(COMPAT_LATEST_VERSION); while [ "$$I" -gt $(KERNEL_SUBLEVEL) ]; do echo $$I; I=$$(($$I - 1)); done)
$(foreach ver,$(COMPAT_VERSIONS),$(eval CONFIG_COMPAT_KERNEL_$(ver)=y))
--
1.7.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 7/7] compat-wireless: build ath9k common when no pci is available
2011-02-21 22:31 [PATCH 0/7] compat-wireless: some general fixes Hauke Mehrtens
` (5 preceding siblings ...)
2011-02-21 22:31 ` [PATCH 6/7] compat-wireless: generate CONFIG_COMPAT_KERNEL_39 Hauke Mehrtens
@ 2011-02-21 22:31 ` Hauke Mehrtens
6 siblings, 0 replies; 8+ messages in thread
From: Hauke Mehrtens @ 2011-02-21 22:31 UTC (permalink / raw
To: mcgrof, lrodriguez; +Cc: linux-wireless, Hauke Mehrtens
ath9k_common.ko and ath9k_hw.ko are not depending on pci or usb.
This patch fixes build of ath9k_htc.ko for a kernel without pci support.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
config.mk | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/config.mk b/config.mk
index 08941b9..2a1bf54 100644
--- a/config.mk
+++ b/config.mk
@@ -211,21 +211,14 @@ endif
# mac80211 test driver
CONFIG_MAC80211_HWSIM=m
-# PCI Drivers
-ifdef CONFIG_PCI
-
CONFIG_ATH5K=m
-CONFIG_ATH5K_PCI=y
# CONFIG_ATH5K_DEBUG=y
# CONFIG_ATH5K_AHB=y
CONFIG_ATH9K_HW=m
-CONFIG_ATH9K=m
-# Note: once ath9k_htc is added we'll have to move
-# CONFIG_ATH9K_COMMON to an area that doesn't depend on PCI
-# as you could then have ath9k disabled but ath9k_htc enabled.
CONFIG_ATH9K_COMMON=m
# CONFIG_ATH9K_DEBUGFS=y
# CONFIG_ATH9K_PKTLOG=y
+
# Disable this to get minstrel as default, we leave the ath9k
# rate control algorithm as the default for now as that is also
# default upstream on the kernel. We will move this to minstrel
@@ -234,6 +227,11 @@ CONFIG_ATH9K_COMMON=m
# for long range considerations.
CONFIG_ATH9K_RATE_CONTROL=y
+# PCI Drivers
+ifdef CONFIG_PCI
+
+CONFIG_ATH5K_PCI=y
+CONFIG_ATH9K=m
CONFIG_COMPAT_IWLWIFI=m
# CONFIG_IWLWIFI_DEBUG=y
--
1.7.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-02-21 22:31 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-21 22:31 [PATCH 0/7] compat-wireless: some general fixes Hauke Mehrtens
2011-02-21 22:31 ` [PATCH 1/7] compat-wireless: rename some config options Hauke Mehrtens
2011-02-21 22:31 ` [PATCH 2/7] compat-wireless: backport pm ops for atlx Hauke Mehrtens
2011-02-21 22:31 ` [PATCH 3/7] compat-wireless: some updates to bluetooth patch Hauke Mehrtens
2011-02-21 22:31 ` [PATCH 4/7] compat-wireless: brcm80211 fix is in upstream now Hauke Mehrtens
2011-02-21 22:31 ` [PATCH 5/7] compat-wireless: Add drivers/net/wireless/rtlwifi/rtl8192c Hauke Mehrtens
2011-02-21 22:31 ` [PATCH 6/7] compat-wireless: generate CONFIG_COMPAT_KERNEL_39 Hauke Mehrtens
2011-02-21 22:31 ` [PATCH 7/7] compat-wireless: build ath9k common when no pci is available Hauke Mehrtens
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).