From b4fd4ddb491c1ccfefb721f8ed92885f99005217 Mon Sep 17 00:00:00 2001 From: "Luis R. Rodriguez" Date: Thu, 10 Dec 2009 09:51:54 -0800 Subject: [PATCH] Use linux-next instead of two separte trees No need to use two separate trees, so just use linux-next for both 802.11 updates and bluetooth updates. What helps also is we'll be now using wireless-next for a clean wireless history for pull requests for some drivesr that choose to send pull requests and updates do go to linux-next for 802.11 updates in at about 1-2 days. Bluetooth pushes changes to linux-next on a less regular basis due to the smaller amount of changes kept track of on that tree. What this means to users of compat-wireless is they'll get more ready code being tested and used. The simplicity of maintaining a tree with only one tree for upstream code outweighs the benefit of getting the few random extra patches not yet queued up in linux-next. Signed-off-by: Luis R. Rodriguez --- compat/patches/01-netdev.patch | 30 +- compat/patches/03-rfkill.patch | 6 +- .../patches/07-change-default-rate-alg.patch | 8 +- compat/patches/08-rename-iwl4965-config.patch | 6 +- .../10-add-wext-handlers-to-netdev.patch | 6 +- compat/patches/14-device-type.patch | 12 +- compat/patches/17-bluetooth.patch | 299 +++++++++--------- scripts/admin-update.sh | 32 +- 8 files changed, 188 insertions(+), 211 deletions(-) diff --git a/compat/patches/01-netdev.patch b/compat/patches/01-netdev.patch index b66e9b024105..93f9439c9184 100644 --- a/compat/patches/01-netdev.patch +++ b/compat/patches/01-netdev.patch @@ -36,9 +36,9 @@ without creating a headache on maintenance of the pathes. retval = rndis_command(dev, u.header, CONTROL_BUFFER_SIZE); if (unlikely(retval < 0)) { ---- a/drivers/net/usb/usbnet.c 2009-08-18 16:13:32.161376062 -0700 -+++ b/drivers/net/usb/usbnet.c 2009-08-18 16:13:32.761354961 -0700 -@@ -1196,6 +1196,7 @@ +--- a/drivers/net/usb/usbnet.c 2009-12-10 08:40:23.000000000 -0800 ++++ b/drivers/net/usb/usbnet.c 2009-12-10 08:40:24.000000000 -0800 +@@ -1260,6 +1260,7 @@ } EXPORT_SYMBOL_GPL(usbnet_disconnect); @@ -46,7 +46,7 @@ without creating a headache on maintenance of the pathes. static const struct net_device_ops usbnet_netdev_ops = { .ndo_open = usbnet_open, .ndo_stop = usbnet_stop, -@@ -1205,6 +1206,7 @@ +@@ -1269,6 +1270,7 @@ .ndo_set_mac_address = eth_mac_addr, .ndo_validate_addr = eth_validate_addr, }; @@ -54,7 +54,7 @@ without creating a headache on maintenance of the pathes. /*-------------------------------------------------------------------------*/ -@@ -1275,7 +1277,15 @@ +@@ -1348,7 +1350,15 @@ net->features |= NETIF_F_HIGHDMA; #endif @@ -100,8 +100,8 @@ without creating a headache on maintenance of the pathes. tmp = RNDIS_PACKET_TYPE_DIRECTED | RNDIS_PACKET_TYPE_BROADCAST; retval = rndis_set_oid(usbdev, OID_GEN_CURRENT_PACKET_FILTER, &tmp, ---- a/net/mac80211/iface.c 2009-11-13 11:36:21.000000000 -0800 -+++ b/net/mac80211/iface.c 2009-11-13 11:36:21.000000000 -0800 +--- a/net/mac80211/iface.c 2009-12-10 08:41:38.000000000 -0800 ++++ b/net/mac80211/iface.c 2009-12-10 08:41:39.000000000 -0800 @@ -644,6 +644,7 @@ WARN_ON(flushed); } @@ -157,7 +157,7 @@ without creating a headache on maintenance of the pathes. sdata->u.mntr_flags = MONITOR_FLAG_CONTROL | MONITOR_FLAG_OTHER_BSS; break; -@@ -778,6 +798,8 @@ +@@ -774,6 +794,8 @@ return -ENOMEM; dev_net_set(ndev, wiphy_net(local->hw.wiphy)); @@ -166,7 +166,7 @@ without creating a headache on maintenance of the pathes. ndev->needed_headroom = local->tx_headroom + 4*6 /* four MAC addresses */ + 2 + 2 + 2 + 2 /* ctl, dur, seq, qos */ -@@ -786,6 +808,7 @@ +@@ -782,6 +804,7 @@ - ETH_HLEN /* ethernet hard_header_len */ + IEEE80211_ENCRYPT_HEADROOM; ndev->needed_tailroom = IEEE80211_ENCRYPT_TAILROOM; @@ -174,7 +174,7 @@ without creating a headache on maintenance of the pathes. ret = dev_alloc_name(ndev, ndev->name); if (ret < 0) -@@ -826,6 +849,10 @@ +@@ -821,6 +844,10 @@ if (ret) goto fail; @@ -185,9 +185,9 @@ without creating a headache on maintenance of the pathes. if (ieee80211_vif_is_mesh(&sdata->vif) && params && params->mesh_id_len) ieee80211_sdata_set_mesh_id(sdata, ---- a/drivers/net/b44.c 2009-09-23 10:29:49.423721274 -0700 -+++ b/drivers/net/b44.c 2009-09-23 10:29:49.503708316 -0700 -@@ -2119,6 +2119,7 @@ +--- a/drivers/net/b44.c 2009-12-10 08:42:34.000000000 -0800 ++++ b/drivers/net/b44.c 2009-12-10 08:42:34.000000000 -0800 +@@ -2116,6 +2116,7 @@ return err; } @@ -195,7 +195,7 @@ without creating a headache on maintenance of the pathes. static const struct net_device_ops b44_netdev_ops = { .ndo_open = b44_open, .ndo_stop = b44_close, -@@ -2134,6 +2135,7 @@ +@@ -2131,6 +2132,7 @@ .ndo_poll_controller = b44_poll_controller, #endif }; @@ -203,7 +203,7 @@ without creating a headache on maintenance of the pathes. static int __devinit b44_init_one(struct ssb_device *sdev, const struct ssb_device_id *ent) -@@ -2173,9 +2175,26 @@ +@@ -2170,9 +2172,26 @@ bp->rx_pending = B44_DEF_RX_RING_PENDING; bp->tx_pending = B44_DEF_TX_RING_PENDING; diff --git a/compat/patches/03-rfkill.patch b/compat/patches/03-rfkill.patch index a444a6543649..a221dff8c46a 100644 --- a/compat/patches/03-rfkill.patch +++ b/compat/patches/03-rfkill.patch @@ -206,9 +206,9 @@ This would do the policing from within mac80211. #include #include #include ---- a/drivers/net/wireless/ath/ath9k/hw.c 2009-11-02 08:06:38.000000000 -0800 -+++ b/drivers/net/wireless/ath/ath9k/hw.c 2009-11-02 08:06:39.000000000 -0800 -@@ -3251,7 +3251,7 @@ +--- a/drivers/net/wireless/ath/ath9k/hw.c 2009-12-10 08:43:21.000000000 -0800 ++++ b/drivers/net/wireless/ath/ath9k/hw.c 2009-12-10 08:43:22.000000000 -0800 +@@ -3260,7 +3260,7 @@ pCap->hw_caps |= ATH9K_HW_CAP_ENHANCEDPM; diff --git a/compat/patches/07-change-default-rate-alg.patch b/compat/patches/07-change-default-rate-alg.patch index 241cdad95c96..159b9317a971 100644 --- a/compat/patches/07-change-default-rate-alg.patch +++ b/compat/patches/07-change-default-rate-alg.patch @@ -10,8 +10,8 @@ and define CONFIG_COMPAT_MAC80211_RC_DEFAULT on config.mk. Through the compat autoconf we then get it also defined there at compilation time. ---- a/net/mac80211/rate.c -+++ b/net/mac80211/rate.c +--- a/net/mac80211/rate.c 2009-12-10 08:44:19.000000000 -0800 ++++ b/net/mac80211/rate.c 2009-12-10 08:46:38.000000000 -0800 @@ -22,7 +22,7 @@ struct rate_control_alg { static LIST_HEAD(rate_ctrl_algs); static DEFINE_MUTEX(rate_ctrl_mutex); @@ -21,7 +21,7 @@ at compilation time. module_param(ieee80211_default_rc_algo, charp, 0644); MODULE_PARM_DESC(ieee80211_default_rc_algo, "Default rate control algorithm for mac80211 to use"); -@@ -117,8 +117,8 @@ ieee80211_rate_control_ops_get(const char *name) +@@ -118,8 +118,8 @@ ieee80211_rate_control_ops_get(const cha ops = ieee80211_try_rate_control_ops_get(ieee80211_default_rc_algo); /* try built-in one if specific alg requested but not found */ @@ -29,6 +29,6 @@ at compilation time. - ops = ieee80211_try_rate_control_ops_get(CONFIG_MAC80211_RC_DEFAULT); + if (!ops && strlen(CONFIG_COMPAT_MAC80211_RC_DEFAULT)) + ops = ieee80211_try_rate_control_ops_get(CONFIG_COMPAT_MAC80211_RC_DEFAULT); + kparam_unblock_sysfs_write(ieee80211_default_rc_algo); return ops; - } diff --git a/compat/patches/08-rename-iwl4965-config.patch b/compat/patches/08-rename-iwl4965-config.patch index f896939738ac..7e5cf752a8c2 100644 --- a/compat/patches/08-rename-iwl4965-config.patch +++ b/compat/patches/08-rename-iwl4965-config.patch @@ -14,9 +14,9 @@ CONFIG_IWL4965 has to be set to y, to build correctly. iwlagn-$(CONFIG_IWL5000) += iwl-5000.o iwlagn-$(CONFIG_IWL5000) += iwl-6000.o iwlagn-$(CONFIG_IWL5000) += iwl-1000.o ---- a/drivers/net/wireless/iwlwifi/iwl-agn.c 2009-11-13 11:38:35.000000000 -0800 -+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c 2009-11-13 11:38:36.000000000 -0800 -@@ -3586,10 +3586,10 @@ +--- a/drivers/net/wireless/iwlwifi/iwl-agn.c 2009-12-10 08:47:49.000000000 -0800 ++++ b/drivers/net/wireless/iwlwifi/iwl-agn.c 2009-12-10 08:47:51.000000000 -0800 +@@ -3590,10 +3590,10 @@ static void __devexit iwl_pci_remove(str /* Hardware specific file defines the PCI IDs table for that hardware module */ static struct pci_device_id iwl_hw_card_ids[] = { diff --git a/compat/patches/10-add-wext-handlers-to-netdev.patch b/compat/patches/10-add-wext-handlers-to-netdev.patch index e5112e34640e..e5ab4f11f6ef 100644 --- a/compat/patches/10-add-wext-handlers-to-netdev.patch +++ b/compat/patches/10-add-wext-handlers-to-netdev.patch @@ -11,9 +11,9 @@ users use wext again. We only do this for kernels <= 2.6.32 as 2.6.33 will use the struct wiphy wireless handler. ---- a/net/wireless/core.c 2009-11-02 08:08:20.000000000 -0800 -+++ b/net/wireless/core.c 2009-11-02 08:08:21.000000000 -0800 -@@ -676,6 +676,10 @@ +--- a/net/wireless/core.c 2009-12-10 09:02:05.000000000 -0800 ++++ b/net/wireless/core.c 2009-12-10 09:02:08.000000000 -0800 +@@ -683,6 +683,10 @@ wdev->sme_state = CFG80211_SME_IDLE; mutex_unlock(&rdev->devlist_mtx); #ifdef CONFIG_CFG80211_WEXT diff --git a/compat/patches/14-device-type.patch b/compat/patches/14-device-type.patch index e8b97e3ba984..676d7a46e9d0 100644 --- a/compat/patches/14-device-type.patch +++ b/compat/patches/14-device-type.patch @@ -6,10 +6,10 @@ SET_NETDEV_DEVTYPE() be a no-op this means the wireless type we define is unused so we ucomment it simply to avoid a compile warning. ---- a/net/mac80211/iface.c 2009-11-13 11:40:39.000000000 -0800 -+++ b/net/mac80211/iface.c 2009-11-13 11:40:39.000000000 -0800 -@@ -778,9 +778,11 @@ - return 0; +--- a/net/wireless/core.c 2009-12-10 09:17:21.000000000 -0800 ++++ b/net/wireless/core.c 2009-12-10 09:17:28.000000000 -0800 +@@ -635,9 +635,11 @@ + dev_put(wdev->netdev); } +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)) @@ -18,5 +18,5 @@ compile warning. }; +#endif - int ieee80211_if_add(struct ieee80211_local *local, const char *name, - struct net_device **new_dev, enum nl80211_iftype type, + static int cfg80211_netdev_notifier_call(struct notifier_block * nb, + unsigned long state, diff --git a/compat/patches/17-bluetooth.patch b/compat/patches/17-bluetooth.patch index add4292466d0..f2f6e785f31b 100644 --- a/compat/patches/17-bluetooth.patch +++ b/compat/patches/17-bluetooth.patch @@ -27,34 +27,32 @@ diff -Nur a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c break; }; -diff -Nur a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c ---- a/net/bluetooth/af_bluetooth.c 2009-11-25 11:24:43.000000000 +0530 -+++ b/net/bluetooth/af_bluetooth.c 2009-12-01 16:13:22.000000000 +0530 -@@ -337,7 +337,11 @@ - if (sk->sk_state == BT_LISTEN) - return -EINVAL; - +--- a/net/bluetooth/af_bluetooth.c 2009-12-10 09:20:31.000000000 -0800 ++++ b/net/bluetooth/af_bluetooth.c 2009-12-10 09:20:33.000000000 -0800 +@@ -338,7 +338,11 @@ int bt_sock_ioctl(struct socket *sock, u + if (sk->sk_state == BT_LISTEN) + return -EINVAL; + +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31)) - amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk); + amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk); +#else + amount = sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc); +#endif - if (amount < 0) - amount = 0; - err = put_user(amount, (int __user *) arg); -diff -Nur a/net/bluetooth/bnep/core.c b/net/bluetooth/bnep/core.c ---- a/net/bluetooth/bnep/core.c 2009-11-25 11:24:43.000000000 +0530 -+++ b/net/bluetooth/bnep/core.c 2009-12-03 14:51:50.000000000 +0530 -@@ -533,9 +533,11 @@ - return conn ? &conn->dev : NULL; + if (amount < 0) + amount = 0; + err = put_user(amount, (int __user *) arg); +--- a/net/bluetooth/bnep/core.c 2009-12-10 09:22:58.000000000 -0800 ++++ b/net/bluetooth/bnep/core.c 2009-12-10 09:22:59.000000000 -0800 +@@ -536,9 +536,11 @@ static struct device *bnep_get_device(st + return conn ? &conn->dev : NULL; } - + +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)) static struct device_type bnep_type = { - .name = "bluetooth", + .name = "bluetooth", }; +#endif - + int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock) { diff -Nur a/net/bluetooth/bnep/netdev.c b/net/bluetooth/bnep/netdev.c @@ -150,21 +148,20 @@ diff -Nur a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c #include #include -diff -Nur a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c ---- a/net/bluetooth/hci_sock.c 2009-11-25 11:24:43.000000000 +0530 -+++ b/net/bluetooth/hci_sock.c 2009-11-25 11:44:07.000000000 +0530 -@@ -466,7 +466,11 @@ - goto done; +--- a/net/bluetooth/hci_sock.c 2009-12-10 09:40:08.000000000 -0800 ++++ b/net/bluetooth/hci_sock.c 2009-12-10 09:40:59.000000000 -0800 +@@ -471,7 +471,11 @@ + goto done; } - + +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31)) static int hci_sock_setsockopt(struct socket *sock, int level, int optname, char __user *optval, unsigned int len) +#else +static int hci_sock_setsockopt(struct socket *sock, int level, int optname, char __user *optval, int len) +#endif { - struct hci_ufilter uf = { .opcode = 0 }; - struct sock *sk = sock->sk; + struct hci_ufilter uf = { .opcode = 0 }; + struct sock *sk = sock->sk; diff -Nur a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c --- a/net/bluetooth/hci_sysfs.c 2009-11-25 11:24:43.000000000 +0530 +++ b/net/bluetooth/hci_sysfs.c 2009-11-27 15:19:26.000000000 +0530 @@ -204,13 +201,12 @@ diff -Nur a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c &bt_host_group, NULL }; -diff -Nur a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c ---- a/net/bluetooth/hidp/core.c 2009-11-25 11:24:43.000000000 +0530 -+++ b/net/bluetooth/hidp/core.c 2009-11-30 16:14:52.000000000 +0530 -@@ -576,10 +576,16 @@ - session->input = NULL; - } - +--- a/net/bluetooth/hidp/core.c 2009-12-10 09:43:25.000000000 -0800 ++++ b/net/bluetooth/hidp/core.c 2009-12-10 09:45:09.000000000 -0800 +@@ -583,10 +583,16 @@ static int hidp_session(void *arg) + session->input = NULL; + } + - if (session->hid) { - hid_destroy_device(session->hid); - session->hid = NULL; @@ -225,20 +221,20 @@ diff -Nur a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c + hid_free_device(session->hid); +#endif + } - - /* Wakeup user-space polling for socket errors */ - session->intr_sock->sk->sk_err = EUNATCH; -@@ -691,6 +697,7 @@ + + /* Wakeup user-space polling for socket errors */ + session->intr_sock->sk->sk_err = EUNATCH; +@@ -698,6 +704,7 @@ static void hidp_close(struct hid_device { } - + +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)) static int hidp_parse(struct hid_device *hid) { - struct hidp_session *session = hid->driver_data; -@@ -755,15 +762,44 @@ + struct hidp_session *session = hid->driver_data; +@@ -762,15 +769,44 @@ static struct hid_ll_driver hidp_hid_dri }; - + static int hidp_setup_hid(struct hidp_session *session, +#else +static const struct { @@ -262,39 +258,39 @@ diff -Nur a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c +} +static void hidp_setup_hid(struct hidp_session *session, +#endif - struct hidp_connadd_req *req) + struct hidp_connadd_req *req) { +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)) - struct hid_device *hid; + struct hid_device *hid; - bdaddr_t src, dst; - int err; + int err; +#else + struct hid_device *hid = session->hid; + struct hid_report *report; +#endif + bdaddr_t src, dst; - + +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)) - hid = hid_allocate_device(); - if (IS_ERR(hid)) - return PTR_ERR(session->hid); + hid = hid_allocate_device(); + if (IS_ERR(hid)) + return PTR_ERR(session->hid); +#endif - - session->hid = hid; - session->req = req; -@@ -782,6 +818,8 @@ - strncpy(hid->phys, batostr(&src), 64); - strncpy(hid->uniq, batostr(&dst), 64); - + + session->hid = hid; + session->req = req; +@@ -789,6 +825,8 @@ static int hidp_setup_hid(struct hidp_se + strncpy(hid->phys, batostr(&src), 64); + strncpy(hid->uniq, batostr(&dst), 64); + + +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)) - hid->dev.parent = hidp_get_device(session); - hid->ll_driver = &hidp_hid_driver; - -@@ -796,6 +834,24 @@ - session->hid = NULL; - - return err; + hid->dev.parent = hidp_get_device(session); + hid->ll_driver = &hidp_hid_driver; + +@@ -805,6 +843,24 @@ failed: + session->hid = NULL; + + return err; +#else + hid->dev = hidp_get_device(session); + hid->hid_open = hidp_open; @@ -314,12 +310,12 @@ diff -Nur a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c + hid->claimed |= HID_CLAIMED_INPUT; +#endif } - + int hidp_add_connection(struct hidp_connadd_req *req, struct socket *ctrl_sock, struct socket *intr_sock) -@@ -815,6 +871,39 @@ - - BT_DBG("rd_data %p rd_size %d", req->rd_data, req->rd_size); - +@@ -824,6 +880,39 @@ int hidp_add_connection(struct hidp_conn + + BT_DBG("rd_data %p rd_size %d", req->rd_data, req->rd_size); + +#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,27)) + if (req->rd_size > 0) { + unsigned char *buf = kmalloc(req->rd_size, GFP_KERNEL); @@ -353,21 +349,21 @@ diff -Nur a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c + } + } +#endif - down_write(&hidp_session_sem); - - s = __hidp_get_session(&bt_sk(ctrl_sock->sk)->dst); -@@ -842,6 +931,7 @@ - session->flags = req->flags & (1 << HIDP_BLUETOOTH_VENDOR_ID); - session->idle_to = req->idle_to; - + down_write(&hidp_session_sem); + + s = __hidp_get_session(&bt_sk(ctrl_sock->sk)->dst); +@@ -851,6 +940,7 @@ int hidp_add_connection(struct hidp_conn + session->flags = req->flags & (1 << HIDP_BLUETOOTH_VENDOR_ID); + session->idle_to = req->idle_to; + +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)) - if (req->rd_size > 0) { - err = hidp_setup_hid(session, req); - if (err && err != -ENODEV) -@@ -853,6 +943,16 @@ - if (err < 0) - goto purge; - } + if (req->rd_size > 0) { + err = hidp_setup_hid(session, req); + if (err && err != -ENODEV) +@@ -862,6 +952,16 @@ int hidp_add_connection(struct hidp_conn + if (err < 0) + goto purge; + } +#else + if (session->input) { + err = hidp_setup_input(session, req); @@ -378,111 +374,109 @@ diff -Nur a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c + if (session->hid) + hidp_setup_hid(session, req); +#endif - - __hidp_link_session(session); - -@@ -884,6 +984,7 @@ - session->input = NULL; - } - + + __hidp_link_session(session); + +@@ -893,6 +993,7 @@ unlink: + session->input = NULL; + } + +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)) - if (session->hid) { - hid_destroy_device(session->hid); - session->hid = NULL; -@@ -892,10 +993,15 @@ + if (session->hid) { + hid_destroy_device(session->hid); + session->hid = NULL; +@@ -901,10 +1002,15 @@ unlink: purge: - skb_queue_purge(&session->ctrl_transmit); - skb_queue_purge(&session->intr_transmit); + skb_queue_purge(&session->ctrl_transmit); + skb_queue_purge(&session->intr_transmit); +#endif - + failed: - up_write(&hidp_session_sem); - + up_write(&hidp_session_sem); + +#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,27)) + if (session->hid) + hid_free_device(session->hid); +#endif - input_free_device(session->input); - kfree(session); - return err; -@@ -985,6 +1091,7 @@ - return err; + input_free_device(session->input); + kfree(session); + return err; +@@ -994,6 +1100,7 @@ int hidp_get_conninfo(struct hidp_connin + return err; } - + +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)) static const struct hid_device_id hidp_table[] = { - { HID_BLUETOOTH_DEVICE(HID_ANY_ID, HID_ANY_ID) }, - { } -@@ -994,6 +1101,7 @@ - .name = "generic-bluetooth", - .id_table = hidp_table, + { HID_BLUETOOTH_DEVICE(HID_ANY_ID, HID_ANY_ID) }, + { } +@@ -1003,6 +1110,7 @@ static struct hid_driver hidp_driver = { + .name = "generic-bluetooth", + .id_table = hidp_table, }; +#endif - + static int __init hidp_init(void) { -@@ -1003,11 +1111,14 @@ - - BT_INFO("HIDP (Human Interface Emulation) ver %s", VERSION); - +@@ -1012,11 +1120,14 @@ static int __init hidp_init(void) + + BT_INFO("HIDP (Human Interface Emulation) ver %s", VERSION); + +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)) - ret = hid_register_driver(&hidp_driver); - if (ret) - goto err; + ret = hid_register_driver(&hidp_driver); + if (ret) + goto err; +#endif - - ret = hidp_init_sockets(); + + ret = hidp_init_sockets(); +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)) - if (ret) - goto err_drv; - -@@ -1015,13 +1126,16 @@ + if (ret) + goto err_drv; + +@@ -1024,13 +1135,16 @@ static int __init hidp_init(void) err_drv: - hid_unregister_driver(&hidp_driver); + hid_unregister_driver(&hidp_driver); err: +#endif - return ret; + return ret; } - + static void __exit hidp_exit(void) { - hidp_cleanup_sockets(); + hidp_cleanup_sockets(); +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)) - hid_unregister_driver(&hidp_driver); + hid_unregister_driver(&hidp_driver); +#endif } - + module_init(hidp_init); -diff -Nur a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c ---- a/net/bluetooth/l2cap.c 2009-11-25 11:24:43.000000000 +0530 -+++ b/net/bluetooth/l2cap.c 2009-11-25 11:45:08.000000000 +0530 -@@ -1758,7 +1758,11 @@ - return err; +--- a/net/bluetooth/l2cap.c 2009-12-10 09:47:08.000000000 -0800 ++++ b/net/bluetooth/l2cap.c 2009-12-10 09:47:10.000000000 -0800 +@@ -1762,7 +1762,11 @@ static int l2cap_sock_setsockopt_old(str + return err; } - + +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31)) 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 bt_security sec; -diff -Nur a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c ---- a/net/bluetooth/rfcomm/sock.c 2009-11-25 11:24:43.000000000 +0530 -+++ b/net/bluetooth/rfcomm/sock.c 2009-11-25 14:55:56.000000000 +0530 -@@ -766,7 +766,11 @@ - return err; + struct sock *sk = sock->sk; + struct bt_security sec; +--- a/net/bluetooth/rfcomm/sock.c 2009-12-10 09:48:33.000000000 -0800 ++++ b/net/bluetooth/rfcomm/sock.c 2009-12-10 09:48:37.000000000 -0800 +@@ -767,7 +767,11 @@ static int rfcomm_sock_setsockopt_old(st + return err; } - + +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31)) static int rfcomm_sock_setsockopt(struct socket *sock, int level, int optname, char __user *optval, unsigned int optlen) +#else +static int rfcomm_sock_setsockopt(struct socket *sock, int level, int optname, char __user *optval, int optlen) +#endif { - struct sock *sk = sock->sk; - struct bt_security sec; + struct sock *sk = sock->sk; + struct bt_security sec; diff -Nur a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c --- a/net/bluetooth/rfcomm/tty.c 2009-11-25 11:24:43.000000000 +0530 +++ b/net/bluetooth/rfcomm/tty.c 2009-11-27 15:25:36.000000000 +0530 @@ -511,18 +505,17 @@ diff -Nur a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c /* Close DLC and dettach TTY */ rfcomm_dlc_close(dev->dlc, 0); -diff -Nur a/net/bluetooth/sco.c b/net/bluetooth/sco.c ---- a/net/bluetooth/sco.c 2009-11-25 11:24:43.000000000 +0530 -+++ b/net/bluetooth/sco.c 2009-11-25 11:45:30.000000000 +0530 -@@ -644,7 +644,11 @@ - return err; +--- a/net/bluetooth/sco.c 2009-12-10 09:49:34.000000000 -0800 ++++ b/net/bluetooth/sco.c 2009-12-10 09:49:36.000000000 -0800 +@@ -645,7 +645,11 @@ static int sco_sock_sendmsg(struct kiocb + return err; } - + +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31)) static int sco_sock_setsockopt(struct socket *sock, int level, int optname, char __user *optval, unsigned int optlen) +#else +static int sco_sock_setsockopt(struct socket *sock, int level, int optname, char __user *optval, int optlen) +#endif { - struct sock *sk = sock->sk; - int err = 0; + struct sock *sk = sock->sk; + int err = 0; diff --git a/scripts/admin-update.sh b/scripts/admin-update.sh index da3f594dde86..979477fc8ab4 100755 --- a/scripts/admin-update.sh +++ b/scripts/admin-update.sh @@ -63,22 +63,6 @@ else echo "You said to use git tree at: $GIT_TREE for wireless" fi -if [ -z $GIT_BT_TREE ]; then - GIT_BT_TREE="/home/$USER/bluetooth-testing/" - if [ ! -d $GIT_BT_TREE ]; then - echo "Please tell me where your bluetooth-testing git tree is." - echo "You can do this by exporting its location as follows:" - echo - echo " export GIT_BT_TREE=/home/$USER/bluetooth-testing/" - echo - echo "If you do not have one you can clone the repository:" - echo " git-clone $GIT_BT_URL" - exit 1 - fi -else - echo "You said to use git tree at: $GIT_BT_TREE for bluetooth" -fi - if [ -z $GIT_COMPAT_TREE ]; then GIT_COMPAT_TREE="/home/$USER/compat/" if [ ! -d $GIT_COMPAT_TREE ]; then @@ -151,8 +135,8 @@ done DIR="include/net/bluetooth" for i in $INCLUDE_NET_BT; do - echo "Copying $GIT_BT_TREE/$DIR/$i" - cp $GIT_BT_TREE/$DIR/$i $DIR/ + echo "Copying $GIT_TREE/$DIR/$i" + cp $GIT_TREE/$DIR/$i $DIR/ done DIR="include/linux/usb" @@ -178,9 +162,9 @@ done # net/bluetooth for i in $NET_BT_DIRS; do mkdir -p net/$i - echo "Copying $GIT_BT_TREE/net/$i/*.[ch]" - cp $GIT_BT_TREE/net/$i/*.[ch] net/$i/ - cp $GIT_BT_TREE/net/$i/Makefile net/$i/ + echo "Copying $GIT_TREE/net/$i/*.[ch]" + cp $GIT_TREE/net/$i/*.[ch] net/$i/ + cp $GIT_TREE/net/$i/Makefile net/$i/ rm -f net/$i/*.mod.c done @@ -195,9 +179,9 @@ done for i in $DRIVERS_BT; do mkdir -p $i - echo "Copying $GIT_BT_TREE/$i/*.[ch]" - cp $GIT_BT_TREE/$i/*.[ch] $i/ - cp $GIT_BT_TREE/$i/Makefile $i/ + echo "Copying $GIT_TREE/$i/*.[ch]" + cp $GIT_TREE/$i/*.[ch] $i/ + cp $GIT_TREE/$i/Makefile $i/ rm -f $i/*.mod.c done -- 2.30.2