From 69ec1f8e5ef7b95277493860211da3552877ea6c Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Thu, 6 Jan 2011 18:16:52 +0100 Subject: [PATCH] compat-wireless: use backported kfifo Now compat contains a backport of the kfifo implementation and we do not have to patch the driver to use the old interface. Signed-off-by: Hauke Mehrtens --- config.mk | 4 ++++ patches/19-kfifo.patch | 53 ------------------------------------------ 2 files changed, 4 insertions(+), 53 deletions(-) delete mode 100644 patches/19-kfifo.patch diff --git a/config.mk b/config.mk index 1f959084f551..7a29d469439e 100644 --- a/config.mk +++ b/config.mk @@ -107,6 +107,10 @@ ifdef CONFIG_FW_LOADER endif #CONFIG_FW_LOADER endif #CONFIG_COMPAT_KERNEL_33 +ifdef CONFIG_COMPAT_KERNEL_36 +CONFIG_COMPAT_KFIFO=m +endif #CONFIG_COMPAT_KERNEL_36 + # Wireless subsystem stuff CONFIG_MAC80211=m diff --git a/patches/19-kfifo.patch b/patches/19-kfifo.patch deleted file mode 100644 index d9d25eee02aa..000000000000 --- a/patches/19-kfifo.patch +++ /dev/null @@ -1,53 +0,0 @@ -These parts of the new generic kernel FIFO implementation (kfifo) can -not be backported easily with defines in the compat module. - ---- a/drivers/net/wireless/libertas/dev.h -+++ b/drivers/net/wireless/libertas/dev.h -@@ -121,7 +121,11 @@ struct lbs_private { - u32 resp_len[2]; - - /* Events sent from hardware to driver */ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) - struct kfifo event_fifo; -+#else -+ struct kfifo *event_fifo; -+#endif - - /** thread to service interrupts */ - struct task_struct *main_thread; ---- a/drivers/net/wireless/libertas/main.c -+++ b/drivers/net/wireless/libertas/main.c -@@ -753,8 +753,14 @@ static int lbs_init_adapter(struct lbs_p - priv->resp_len[0] = priv->resp_len[1] = 0; - - /* Create the event FIFO */ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) - ret = kfifo_alloc(&priv->event_fifo, sizeof(u32) * 16, GFP_KERNEL); - if (ret) { -+#else -+ priv->event_fifo = kfifo_alloc(sizeof(u32) * 16, GFP_KERNEL, NULL); -+ if (IS_ERR(priv->event_fifo)) { -+ ret = -ENOMEM; -+#endif - lbs_pr_err("Out of memory allocating event FIFO buffer\n"); - goto out; - } ---- a/drivers/net/wireless/rt2x00/rt2x00dev.c -+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c -@@ -808,10 +808,16 @@ static int rt2x00lib_probe_hw(struct rt2 - * queues gets reported before we've got a chance to handle - * them) 24*4=384 tx status reports need to be cached. - */ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) - status = kfifo_alloc(&rt2x00dev->txstatus_fifo, 512, - GFP_KERNEL); - if (status) - return status; -+#else -+ rt2x00dev->txstatus_fifo = kfifo_alloc(512, GFP_KERNEL, NULL); -+ if (IS_ERR(rt2x00dev->txstatus_fifo)) -+ return PTR_ERR(rt2x00dev->txstatus_fifo); -+#endif - - /* tasklet for processing the tx status reports. */ - if (rt2x00dev->ops->lib->txstatus_tasklet) -- 2.30.2