compat-wireless: use other workqueue
authorHauke Mehrtens <hauke@hauke-m.de>
Thu, 22 Dec 2011 20:47:29 +0000 (21:47 +0100)
committerLuis R. Rodriguez <mcgrof@frijolero.org>
Fri, 23 Dec 2011 15:07:01 +0000 (07:07 -0800)
Old kernel versions do not support WQ_HIGHPRI and WQ_MEM_RECLAIM so we
should use create_singlethread_workqueue() which was used at this
position before.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
patches/46-use_other_workqueue.patch [new file with mode: 0644]

diff --git a/patches/46-use_other_workqueue.patch b/patches/46-use_other_workqueue.patch
new file mode 100644 (file)
index 0000000..4cfe4f6
--- /dev/null
@@ -0,0 +1,15 @@
+--- a/net/bluetooth/hci_core.c
++++ b/net/bluetooth/hci_core.c
+@@ -1534,8 +1534,12 @@ int hci_register_dev(struct hci_dev *hde
+       write_unlock_bh(&hci_dev_list_lock);
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
+       hdev->workqueue = alloc_workqueue(hdev->name, WQ_HIGHPRI | WQ_UNBOUND |
+                                                       WQ_MEM_RECLAIM, 1);
++#else
++      hdev->workqueue = create_singlethread_workqueue(hdev->name);
++#endif
+       if (!hdev->workqueue) {
+               error = -ENOMEM;
+               goto err;