summaryrefslogtreecommitdiff
path: root/patches/0050-iov_iter/bluetooth.patch
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2018-09-17 23:31:36 +0200
committerJohannes Berg <johannes.berg@intel.com>2018-09-19 11:04:33 +0200
commitab3fd3b9a801a9faa2619e2e65207e736f859a6d (patch)
treef0a6425fe00ba440e966570e662e6ff9c738d230 /patches/0050-iov_iter/bluetooth.patch
parent30a378636e473278ff65800b1fe58822e36d716c (diff)
backports: Remove unused parts
This removes parts which were only used by subsystems which are not included in backports any more, for example media, bluetooth and Ethernet. The patches which are removed in this commit are not applied to the kernel tree anyway with the default configuration because non of the files get copied. The freezer, media, regulator and sound parts were only used by the already removed media drivers. The flow dissector file is not copied any more. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'patches/0050-iov_iter/bluetooth.patch')
-rw-r--r--patches/0050-iov_iter/bluetooth.patch197
1 files changed, 0 insertions, 197 deletions
diff --git a/patches/0050-iov_iter/bluetooth.patch b/patches/0050-iov_iter/bluetooth.patch
deleted file mode 100644
index 87506ff1..00000000
--- a/patches/0050-iov_iter/bluetooth.patch
+++ /dev/null
@@ -1,197 +0,0 @@
---- a/include/net/bluetooth/l2cap.h
-+++ b/include/net/bluetooth/l2cap.h
-@@ -619,6 +619,12 @@ struct l2cap_ops {
- struct sk_buff *(*alloc_skb) (struct l2cap_chan *chan,
- unsigned long hdr_len,
- unsigned long len, int nb);
-+#if LINUX_VERSION_IS_LESS(3,19,0)
-+ int (*memcpy_fromiovec) (struct l2cap_chan *chan,
-+ unsigned char *kdata,
-+ struct iovec *iov,
-+ int len);
-+#endif
- };
-
- struct l2cap_conn {
-@@ -912,6 +918,33 @@ static inline long l2cap_chan_no_get_snd
- return 0;
- }
-
-+#if LINUX_VERSION_IS_LESS(3,19,0)
-+static inline int l2cap_chan_no_memcpy_fromiovec(struct l2cap_chan *chan,
-+ unsigned char *kdata,
-+ struct iovec *iov,
-+ int len)
-+{
-+ /* Following is safe since for compiler definitions of kvec and
-+ * iovec are identical, yielding the same in-core layout and alignment
-+ */
-+ struct kvec *vec = (struct kvec *)iov;
-+
-+ while (len > 0) {
-+ if (vec->iov_len) {
-+ int copy = min_t(unsigned int, len, vec->iov_len);
-+ memcpy(kdata, vec->iov_base, copy);
-+ len -= copy;
-+ kdata += copy;
-+ vec->iov_base += copy;
-+ vec->iov_len -= copy;
-+ }
-+ vec++;
-+ }
-+
-+ return 0;
-+}
-+#endif
-+
- extern bool disable_ertm;
-
- int l2cap_init_sockets(void);
---- a/net/bluetooth/6lowpan.c
-+++ b/net/bluetooth/6lowpan.c
-@@ -515,11 +515,18 @@ static int send_pkt(struct l2cap_chan *c
- */
- chan->data = skb;
-
-+#if LINUX_VERSION_IS_LESS(3,19,0)
-+ memset(&msg, 0, sizeof(msg));
-+ msg.msg_iov = (struct iovec *) &iv;
-+ msg.msg_iovlen = 1;
-+#endif
- iv.iov_base = skb->data;
- iv.iov_len = skb->len;
-
-+#if LINUX_VERSION_IS_GEQ(3,19,0)
- memset(&msg, 0, sizeof(msg));
- iov_iter_kvec(&msg.msg_iter, WRITE | ITER_KVEC, &iv, 1, skb->len);
-+#endif
-
- err = l2cap_chan_send(chan, &msg, skb->len);
- if (err > 0) {
-@@ -1017,6 +1024,9 @@ static const struct l2cap_ops bt_6lowpan
- .suspend = chan_suspend_cb,
- .get_sndtimeo = chan_get_sndtimeo_cb,
- .alloc_skb = chan_alloc_skb_cb,
-+#if LINUX_VERSION_IS_LESS(3,19,0)
-+ .memcpy_fromiovec = l2cap_chan_no_memcpy_fromiovec,
-+#endif
-
- .teardown = l2cap_chan_no_teardown,
- .defer = l2cap_chan_no_defer,
---- a/net/bluetooth/a2mp.c
-+++ b/net/bluetooth/a2mp.c
-@@ -63,7 +63,12 @@ static void a2mp_send(struct amp_mgr *mg
-
- memset(&msg, 0, sizeof(msg));
-
-+#if LINUX_VERSION_IS_GEQ(3,19,0)
- iov_iter_kvec(&msg.msg_iter, WRITE | ITER_KVEC, &iv, 1, total_len);
-+#else
-+ msg.msg_iov = (struct iovec *) &iv;
-+ msg.msg_iovlen = 1;
-+#endif
-
- l2cap_chan_send(chan, &msg, total_len);
-
-@@ -753,6 +758,9 @@ static const struct l2cap_ops a2mp_chan_
- .resume = l2cap_chan_no_resume,
- .set_shutdown = l2cap_chan_no_set_shutdown,
- .get_sndtimeo = l2cap_chan_no_get_sndtimeo,
-+#if LINUX_VERSION_IS_LESS(3,19,0)
-+ .memcpy_fromiovec = l2cap_chan_no_memcpy_fromiovec,
-+#endif
- };
-
- static struct l2cap_chan *a2mp_chan_open(struct l2cap_conn *conn, bool locked)
---- a/net/bluetooth/l2cap_core.c
-+++ b/net/bluetooth/l2cap_core.c
-@@ -2126,7 +2126,12 @@ static inline int l2cap_skbuff_fromiovec
- struct sk_buff **frag;
- int sent = 0;
-
-+#if LINUX_VERSION_IS_GEQ(3,19,0)
- if (copy_from_iter(skb_put(skb, count), count, &msg->msg_iter) != count)
-+#else
-+ if (chan->ops->memcpy_fromiovec(chan, skb_put(skb, count),
-+ msg->msg_iov, count))
-+#endif
- return -EFAULT;
-
- sent += count;
-@@ -2146,8 +2151,13 @@ static inline int l2cap_skbuff_fromiovec
-
- *frag = tmp;
-
-+#if LINUX_VERSION_IS_GEQ(3,19,0)
- if (copy_from_iter(skb_put(*frag, count), count,
- &msg->msg_iter) != count)
-+#else
-+ if (chan->ops->memcpy_fromiovec(chan, skb_put(*frag, count),
-+ msg->msg_iov, count))
-+#endif
- return -EFAULT;
-
- sent += count;
---- a/net/bluetooth/l2cap_sock.c
-+++ b/net/bluetooth/l2cap_sock.c
-@@ -1383,6 +1383,15 @@ static struct sk_buff *l2cap_sock_alloc_
- return skb;
- }
-
-+#if LINUX_VERSION_IS_LESS(3,19,0)
-+static int l2cap_sock_memcpy_fromiovec_cb(struct l2cap_chan *chan,
-+ unsigned char *kdata,
-+ struct iovec *iov, int len)
-+{
-+ return memcpy_fromiovec(kdata, iov, len);
-+}
-+#endif
-+
- static void l2cap_sock_ready_cb(struct l2cap_chan *chan)
- {
- struct sock *sk = chan->data;
-@@ -1467,6 +1476,9 @@ static const struct l2cap_ops l2cap_chan
- .set_shutdown = l2cap_sock_set_shutdown_cb,
- .get_sndtimeo = l2cap_sock_get_sndtimeo_cb,
- .alloc_skb = l2cap_sock_alloc_skb_cb,
-+#if LINUX_VERSION_IS_LESS(3,19,0)
-+ .memcpy_fromiovec = l2cap_sock_memcpy_fromiovec_cb,
-+#endif
- };
-
- static void l2cap_sock_destruct(struct sock *sk)
---- a/net/bluetooth/smp.c
-+++ b/net/bluetooth/smp.c
-@@ -612,7 +612,12 @@ static void smp_send_cmd(struct l2cap_co
-
- memset(&msg, 0, sizeof(msg));
-
-+#if LINUX_VERSION_IS_GEQ(3,19,0)
- iov_iter_kvec(&msg.msg_iter, WRITE | ITER_KVEC, iv, 2, 1 + len);
-+#else
-+ msg.msg_iov = (struct iovec *) &iv;
-+ msg.msg_iovlen = 2;
-+#endif
-
- l2cap_chan_send(chan, &msg, 1 + len);
-
-@@ -3066,6 +3071,9 @@ static const struct l2cap_ops smp_chan_o
- .suspend = l2cap_chan_no_suspend,
- .set_shutdown = l2cap_chan_no_set_shutdown,
- .get_sndtimeo = l2cap_chan_no_get_sndtimeo,
-+#if LINUX_VERSION_IS_LESS(3,19,0)
-+ .memcpy_fromiovec = l2cap_chan_no_memcpy_fromiovec,
-+#endif
- };
-
- static inline struct l2cap_chan *smp_new_conn_cb(struct l2cap_chan *pchan)
-@@ -3114,6 +3122,9 @@ static const struct l2cap_ops smp_root_c
- .resume = l2cap_chan_no_resume,
- .set_shutdown = l2cap_chan_no_set_shutdown,
- .get_sndtimeo = l2cap_chan_no_get_sndtimeo,
-+#if LINUX_VERSION_IS_LESS(3,19,0)
-+ .memcpy_fromiovec = l2cap_chan_no_memcpy_fromiovec,
-+#endif
- };
-
- static struct l2cap_chan *smp_add_cid(struct hci_dev *hdev, u16 cid)