diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2014-02-21 20:39:27 +0100 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2014-02-24 01:35:23 +0100 |
commit | 8e946501aef6e3dd5bac12eb45d24df8248672b0 (patch) | |
tree | 5acad1bbc1f71ad268585a96c1168c7ceed1de06 /patches/collateral-evolutions/network/16-bluetooth | |
parent | 38009d04f323751d21d01857d3df7dd4571408f4 (diff) |
backports: refresh patches on next-20140221backports-20140221
manual changes were needed on these files:
* patches/backport-adjustments/flow_dissector.patch
* patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_hidp_core.patch
* patches/collateral-evolutions/network/83-select_queue/mac80211.patch
* patches/collateral-evolutions/network/83-select_queue/mwifiex.patch
* patches/collateral-evolutions/network/85-hid_ll_driver/net_bluetooth_hidp_core.patch
1 2.6.25 [ OK ]
2 2.6.26 [ OK ]
3 2.6.27 [ OK ]
4 2.6.28 [ OK ]
5 2.6.29 [ OK ]
6 2.6.30 [ OK ]
7 2.6.31 [ OK ]
8 2.6.32 [ OK ]
9 2.6.33 [ OK ]
10 2.6.34 [ OK ]
11 2.6.35 [ OK ]
12 2.6.36 [ OK ]
13 2.6.37 [ OK ]
14 2.6.38 [ OK ]
15 2.6.39 [ OK ]
16 3.0.101 [ OK ]
17 3.1.10 [ OK ]
18 3.2.54 [ OK ]
19 3.3.8 [ OK ]
20 3.4.79 [ OK ]
21 3.5.7 [ OK ]
22 3.6.11 [ OK ]
23 3.7.10 [ OK ]
24 3.8.13 [ OK ]
25 3.9.11 [ OK ]
26 3.10.29 [ OK ]
27 3.11.10 [ OK ]
28 3.12.10 [ OK ]
29 3.13.2 [ OK ]
30 3.14-rc1 [ OK ]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'patches/collateral-evolutions/network/16-bluetooth')
5 files changed, 10 insertions, 179 deletions
diff --git a/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_hci_sock.patch b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_hci_sock.patch index 268f6479..5798965c 100644 --- a/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_hci_sock.patch +++ b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_hci_sock.patch @@ -1,6 +1,6 @@ --- a/net/bluetooth/hci_sock.c +++ b/net/bluetooth/hci_sock.c -@@ -1002,8 +1002,13 @@ drop: +@@ -1003,8 +1003,13 @@ drop: goto done; } @@ -14,7 +14,7 @@ { struct hci_ufilter uf = { .opcode = 0 }; struct sock *sk = sock->sk; -@@ -1177,8 +1182,12 @@ static struct proto hci_sk_proto = { +@@ -1178,8 +1183,12 @@ static struct proto hci_sk_proto = { .obj_size = sizeof(struct hci_pinfo) }; diff --git a/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_hidp_core.patch b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_hidp_core.patch deleted file mode 100644 index 068243f1..00000000 --- a/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_hidp_core.patch +++ /dev/null @@ -1,169 +0,0 @@ ---- a/net/bluetooth/hidp/core.c -+++ b/net/bluetooth/hidp/core.c -@@ -268,6 +268,7 @@ static int hidp_hidinput_event(struct in - return hidp_send_report(session, field->report); - } - -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,38)) - static int hidp_get_raw_report(struct hid_device *hid, - unsigned char report_number, - unsigned char *data, size_t count, -@@ -352,6 +353,7 @@ err: - mutex_unlock(&session->report_mutex); - return ret; - } -+#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,38)) */ - - static int hidp_set_raw_report(struct hid_device *hid, unsigned char reportnum, - unsigned char *data, size_t count, -@@ -418,6 +420,7 @@ err: - return ret; - } - -+#if defined(CPTCFG_BACKPORT_OPTION_BT_SOCK_CREATE_NEEDS_KERN) - static int hidp_output_raw_report(struct hid_device *hid, unsigned char *data, size_t count, - unsigned char report_type) - { -@@ -475,6 +478,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) -+{ -+ if (hidp_send_ctrl_message(hid->driver_data, -+ HIDP_TRANS_SET_REPORT | HIDP_DATA_RTYPE_FEATURE, -+ data, count)) -+ return -ENOMEM; -+ return count; -+} -+#endif - - static int hidp_raw_request(struct hid_device *hid, unsigned char reportnum, - __u8 *buf, size_t len, unsigned char rtype, -@@ -786,6 +799,87 @@ static void hidp_close(struct hid_device - { - } - -+#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,27)) -+static const struct { -+ __u16 idVendor; -+ __u16 idProduct; -+ unsigned quirks; -+} hidp_blacklist[] = { -+ /* Apple wireless Mighty Mouse */ -+ { 0x05ac, 0x030c, HID_QUIRK_MIGHTYMOUSE | HID_QUIRK_INVERT_HWHEEL }, -+ -+ { } /* Terminating entry */ -+}; -+static void hidp_setup_quirks(struct hid_device *hid) -+{ -+ unsigned int n; -+ -+ for (n = 0; hidp_blacklist[n].idVendor; n++) -+ if (hidp_blacklist[n].idVendor == le16_to_cpu(hid->vendor) && -+ hidp_blacklist[n].idProduct == le16_to_cpu(hid->product)) -+ hid->quirks = hidp_blacklist[n].quirks; -+} -+ -+static int hidp_setup_hid(struct hidp_session *session, -+ struct hidp_connadd_req *req) -+{ -+ struct hid_device *hid; -+ struct hid_report *report; -+ bdaddr_t src, dst; -+ unsigned char *buf; -+ -+ buf = kmalloc(req->rd_size, GFP_KERNEL); -+ if (!buf) -+ return -ENOMEM; -+ -+ if (copy_from_user(buf, req->rd_data, req->rd_size)) { -+ kfree(buf); -+ return -EFAULT; -+ } -+ -+ hid = hid_parse_report(buf, req->rd_size); -+ kfree(buf); -+ if (!session->hid) -+ return -EINVAL; -+ -+ session->hid = hid; -+ -+ hid->driver_data = session; -+ -+ baswap(&src, &bt_sk(session->ctrl_sock->sk)->src); -+ baswap(&dst, &bt_sk(session->ctrl_sock->sk)->dst); -+ -+ hid->bus = BUS_BLUETOOTH; -+ hid->vendor = req->vendor; -+ hid->product = req->product; -+ hid->version = req->version; -+ hid->country = req->country; -+ -+ strlcpy(hid->name, req->name, 128); -+ strlcpy(hid->phys, batostr(&src), 64); -+ strlcpy(hid->uniq, batostr(&dst), 64); -+ -+ hid->dev = hidp_get_device(session); -+ hid->hid_open = hidp_open; -+ hid->hid_close = hidp_close; -+ -+ hid->hidinput_input_event = hidp_hidinput_event; -+ -+ hidp_setup_quirks(hid); -+ -+ list_for_each_entry(report, &hid->report_enum[HID_INPUT_REPORT].report_list, list) -+ hidp_send_report(session, report); -+ -+ list_for_each_entry(report, &hid->report_enum[HID_FEATURE_REPORT].report_list, list) -+ hidp_send_report(session, report); -+ -+ if (hidinput_connect(hid) == 0) -+ hid->claimed |= HID_CLAIMED_INPUT; -+ -+ return 0; -+} -+#else -+ - static int hidp_parse(struct hid_device *hid) - { - struct hidp_session *session = hid->driver_data; -@@ -865,7 +959,9 @@ static int hidp_setup_hid(struct hidp_se - hid->dev.parent = &session->conn->hcon->dev; - 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; - - /* True if device is blacklisted in drivers/hid/hid-core.c */ -@@ -883,6 +979,7 @@ fault: - - return err; - } -+#endif - - /* initialize session devices */ - static int hidp_session_dev_init(struct hidp_session *session, -@@ -945,10 +1042,17 @@ static int hidp_session_dev_add(struct h - /* remove HID/input devices from their bus systems */ - static void hidp_session_dev_del(struct hidp_session *session) - { -- if (session->hid) -+ if (session->hid) { -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)) - hid_destroy_device(session->hid); -- else if (session->input) -+#else -+ if (session->hid->claimed & HID_CLAIMED_INPUT) -+ hidinput_disconnect(session->hid); -+ hid_free_device(session->hid); -+#endif -+ } else if (session->input) { - input_unregister_device(session->input); -+ } - } - - /* diff --git a/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_l2cap_sock.patch b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_l2cap_sock.patch index 2bd33d2a..e5e7c75f 100644 --- a/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_l2cap_sock.patch +++ b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_l2cap_sock.patch @@ -1,6 +1,6 @@ --- a/net/bluetooth/l2cap_sock.c +++ b/net/bluetooth/l2cap_sock.c -@@ -749,8 +749,13 @@ static int l2cap_sock_setsockopt_old(str +@@ -733,8 +733,13 @@ static int l2cap_sock_setsockopt_old(str return err; } @@ -14,7 +14,7 @@ { struct sock *sk = sock->sk; struct l2cap_chan *chan = l2cap_pi(sk)->chan; -@@ -1553,8 +1558,12 @@ static struct sock *l2cap_sock_alloc(str +@@ -1527,8 +1532,12 @@ static struct sock *l2cap_sock_alloc(str return sk; } @@ -27,7 +27,7 @@ { struct sock *sk; -@@ -1566,7 +1575,11 @@ static int l2cap_sock_create(struct net +@@ -1540,7 +1549,11 @@ static int l2cap_sock_create(struct net sock->type != SOCK_DGRAM && sock->type != SOCK_RAW) return -ESOCKTNOSUPPORT; diff --git a/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_rfcomm_sock.patch b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_rfcomm_sock.patch index bbb4cf9a..f6b84b57 100644 --- a/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_rfcomm_sock.patch +++ b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_rfcomm_sock.patch @@ -1,6 +1,6 @@ --- a/net/bluetooth/rfcomm/sock.c +++ b/net/bluetooth/rfcomm/sock.c -@@ -305,8 +305,13 @@ static struct sock *rfcomm_sock_alloc(st +@@ -310,8 +310,13 @@ static struct sock *rfcomm_sock_alloc(st return sk; } @@ -14,7 +14,7 @@ { struct sock *sk; -@@ -675,7 +680,11 @@ static int rfcomm_sock_setsockopt_old(st +@@ -681,7 +686,11 @@ static int rfcomm_sock_setsockopt_old(st return err; } diff --git a/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_rfcomm_tty.patch b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_rfcomm_tty.patch index 1013610a..286e1670 100644 --- a/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_rfcomm_tty.patch +++ b/patches/collateral-evolutions/network/16-bluetooth/net_bluetooth_rfcomm_tty.patch @@ -1,6 +1,6 @@ --- a/net/bluetooth/rfcomm/tty.c +++ b/net/bluetooth/rfcomm/tty.c -@@ -796,7 +796,11 @@ static int rfcomm_tty_write_room(struct +@@ -822,7 +822,11 @@ static int rfcomm_tty_write_room(struct return room; } @@ -12,7 +12,7 @@ { BT_DBG("tty %p cmd 0x%02x", tty, cmd); -@@ -1045,7 +1049,11 @@ static void rfcomm_tty_hangup(struct tty +@@ -1071,7 +1075,11 @@ static void rfcomm_tty_hangup(struct tty tty_port_hangup(&dev->port); } @@ -24,7 +24,7 @@ { struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data; -@@ -1054,7 +1062,11 @@ static int rfcomm_tty_tiocmget(struct tt +@@ -1080,7 +1088,11 @@ static int rfcomm_tty_tiocmget(struct tt return dev->modem_status; } |