compat-wireless: deactivate CONFIG_BT_RFCOMM_TTY for old kernel versions.
authorHauke Mehrtens <hauke@hauke-m.de>
Sun, 22 Apr 2012 22:03:17 +0000 (00:03 +0200)
committerLuis R. Rodriguez <mcgrof@frijolero.org>
Mon, 23 Apr 2012 23:26:32 +0000 (16:26 -0700)
net/bluetooth/rfcomm/tty.c does not build on older kernel versions.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
config.mk
patches/08-rename-config-options.patch

index a718257023d597c9565220c4832dc6533d4dbb33..584189b224766ea04cfdcb87af5484707dd91716 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -194,7 +194,9 @@ export CONFIG_LIB80211_CRYPT_TKIP=m
 
 export CONFIG_BT=m
 export CONFIG_BT_RFCOMM=m
-export CONFIG_BT_RFCOMM_TTY=y
+ifndef CONFIG_COMPAT_KERNEL_2_6_33
+export CONFIG_COMPAT_BT_RFCOMM_TTY=y
+endif #CONFIG_COMPAT_KERNEL_2_6_33
 export CONFIG_BT_BNEP=m
 export CONFIG_BT_BNEP_MC_FILTER=y
 export CONFIG_BT_BNEP_PROTO_FILTER=y
index da639892e4588d7feefed9fc2f4323d6e89ea2a4..bb24d7f99ea098d72ec33df7bb01d101f77cef57 100644 (file)
@@ -133,3 +133,33 @@ CONFIG_BT_HIDP does not build with older kernel versions.
  int ath_rate_control_register(void);
  void ath_rate_control_unregister(void);
  #else
+--- a/net/bluetooth/rfcomm/Makefile
++++ b/net/bluetooth/rfcomm/Makefile
+@@ -5,4 +5,4 @@
+ obj-$(CONFIG_BT_RFCOMM) += rfcomm.o
+ rfcomm-y                      := core.o sock.o
+-rfcomm-$(CONFIG_BT_RFCOMM_TTY)        += tty.o
++rfcomm-$(CONFIG_COMPAT_BT_RFCOMM_TTY) += tty.o
+--- a/include/net/bluetooth/rfcomm.h
++++ b/include/net/bluetooth/rfcomm.h
+@@ -357,7 +357,7 @@ struct rfcomm_dev_list_req {
+ int  rfcomm_dev_ioctl(struct sock *sk, unsigned int cmd, void __user *arg);
+-#ifdef CONFIG_BT_RFCOMM_TTY
++#ifdef CONFIG_COMPAT_BT_RFCOMM_TTY
+ int  rfcomm_init_ttys(void);
+ void rfcomm_cleanup_ttys(void);
+ #else
+--- a/net/bluetooth/rfcomm/sock.c
++++ b/net/bluetooth/rfcomm/sock.c
+@@ -873,7 +873,7 @@ static int rfcomm_sock_ioctl(struct sock
+       err = bt_sock_ioctl(sock, cmd, arg);
+       if (err == -ENOIOCTLCMD) {
+-#ifdef CONFIG_BT_RFCOMM_TTY
++#ifdef CONFIG_COMPAT_BT_RFCOMM_TTY
+               lock_sock(sk);
+               err = rfcomm_dev_ioctl(sk, cmd, (void __user *) arg);
+               release_sock(sk);