1 These parts of the new generic kernel FIFO implementation (kfifo) can
2 not be backported easily with defines in the compat module.
4 --- a/drivers/net/wireless/libertas/dev.h
5 +++ b/drivers/net/wireless/libertas/dev.h
6 @@ -118,7 +118,11 @@ struct lbs_private {
9 /* Events sent from hardware to driver */
10 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33))
11 struct kfifo event_fifo;
13 + struct kfifo *event_fifo;
16 /** thread to service interrupts */
17 struct task_struct *main_thread;
18 --- a/drivers/net/wireless/libertas/main.c
19 +++ b/drivers/net/wireless/libertas/main.c
20 @@ -855,8 +855,14 @@ static int lbs_init_adapter(struct lbs_p
21 priv->resp_len[0] = priv->resp_len[1] = 0;
23 /* Create the event FIFO */
24 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33))
25 ret = kfifo_alloc(&priv->event_fifo, sizeof(u32) * 16, GFP_KERNEL);
28 + priv->event_fifo = kfifo_alloc(sizeof(u32) * 16, GFP_KERNEL, NULL);
29 + if (IS_ERR(priv->event_fifo)) {
32 lbs_pr_err("Out of memory allocating event FIFO buffer\n");
35 @@ -872,7 +878,12 @@ static void lbs_free_adapter(struct lbs_
36 lbs_deb_enter(LBS_DEB_MAIN);
38 lbs_free_cmd_buffer(priv);
39 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33))
40 kfifo_free(&priv->event_fifo);
42 + if (priv->event_fifo)
43 + kfifo_free(priv->event_fifo);
45 del_timer(&priv->command_timer);
46 del_timer(&priv->auto_deepsleep_timer);
47 kfree(priv->networks);