public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: y@hauke-m.de
To: lrodriguez@atheros.com
Cc: linux-wireless@vger.kernel.org, mcgrof@infradead.org,
	Hauke Mehrtens <hauke@hauke-m.de>
Subject: [PATCH 2/3] compat-wireless-stable-2.6.33.y: Activate libertas
Date: Mon,  1 Feb 2010 23:25:32 +0100	[thread overview]
Message-ID: <1265063133-29682-2-git-send-email-y> (raw)
In-Reply-To: <1265063133-29682-1-git-send-email-y>

From: Hauke Mehrtens <hauke@hauke-m.de>

This is a backport of compat-wireless commit 67228098e77852a0cf50c7c6c413fa601bd6f5b1 and 79cfcf76ef0f275146f0cd0a9ad55134310fdfb3

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 patches/19-kfifo.patch            |   47 +++++++++++++++++++++++++++++++++++++
 patches/99-change-makefiles.patch |    9 ++----
 2 files changed, 50 insertions(+), 6 deletions(-)
 create mode 100644 patches/19-kfifo.patch

diff --git a/patches/19-kfifo.patch b/patches/19-kfifo.patch
new file mode 100644
index 0000000..341ef09
--- /dev/null
+++ b/patches/19-kfifo.patch
@@ -0,0 +1,47 @@
+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
+@@ -120,7 +120,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
+@@ -886,8 +886,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;
+ 	}
+@@ -903,7 +909,12 @@ static void lbs_free_adapter(struct lbs_
+ 	lbs_deb_enter(LBS_DEB_MAIN);
+ 
+ 	lbs_free_cmd_buffer(priv);
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33))
+ 	kfifo_free(&priv->event_fifo);
++#else
++	if (priv->event_fifo)
++		kfifo_free(priv->event_fifo);
++#endif
+ 	del_timer(&priv->command_timer);
+ 	del_timer(&priv->auto_deepsleep_timer);
+ 	kfree(priv->networks);
diff --git a/patches/99-change-makefiles.patch b/patches/99-change-makefiles.patch
index ea19a86..2de20be 100644
--- a/patches/99-change-makefiles.patch
+++ b/patches/99-change-makefiles.patch
@@ -40,7 +40,7 @@ only the wireless stuff.
  
 --- a/drivers/net/wireless/Makefile
 +++ b/drivers/net/wireless/Makefile
-@@ -5,36 +5,16 @@
+@@ -5,33 +5,16 @@
  obj-$(CONFIG_IPW2100) += ipw2x00/
  obj-$(CONFIG_IPW2200) += ipw2x00/
  
@@ -71,12 +71,9 @@ only the wireless stuff.
  obj-$(CONFIG_USB_NET_RNDIS_WLAN)	+= rndis_wlan.o
  
 -obj-$(CONFIG_USB_ZD1201)	+= zd1201.o
--obj-$(CONFIG_LIBERTAS)		+= libertas/
--
--obj-$(CONFIG_LIBERTAS_THINFIRM)	+= libertas_tf/
- 
- obj-$(CONFIG_ADM8211)	+= adm8211.o
+ obj-$(CONFIG_LIBERTAS)		+= libertas/
  
+ obj-$(CONFIG_LIBERTAS_THINFIRM)	+= libertas_tf/
 --- a/net/wireless/Makefile
 +++ b/net/wireless/Makefile
 @@ -4,11 +4,6 @@ obj-$(CONFIG_LIB80211_CRYPT_WEP) += lib8
-- 
1.6.3.3


  reply	other threads:[~2010-02-01 22:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-01 22:25 [PATCH 1/3] compat-wireless-stable-2.6.33.y: Activate ssb y
2010-02-01 22:25 ` y [this message]
2010-02-01 22:25 ` [PATCH 3/3] compat-wireless-stable-2.6.33.y: activate usbnet for kernel > 2.6.28 y
2010-02-14 21:31 ` [PATCH 1/3] compat-wireless-stable-2.6.33.y: Activate ssb Hauke Mehrtens
2010-02-16 19:03   ` Luis R. Rodriguez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1265063133-29682-2-git-send-email-y \
    --to=y@hauke-m.de \
    --cc=hauke@hauke-m.de \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lrodriguez@atheros.com \
    --cc=mcgrof@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox