From: Marek Vasut <marek.vasut@gmail.com>
To: linux-wireless@vger.kernel.org, libertas-dev@lists.infradead.org
Cc: hs4233@mail.mn-solutions.de
Subject: [PATCH] Marvell CF8381
Date: Sun, 22 Mar 2009 01:27:21 +0100 [thread overview]
Message-ID: <200903220127.21836.marek.vasut@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 66 bytes --]
Hi,
I've finally got this card working ...
See the patches below.
[-- Attachment #2: 0002-Add-support-for-CF8381-WiFi-card.patch --]
[-- Type: text/x-diff, Size: 2035 bytes --]
From 31724e385f974b334b3a77949ab8aca1cad97e6e Mon Sep 17 00:00:00 2001
From: Marek Vasut <marek.vasut@gmail.com>
Date: Sat, 21 Mar 2009 20:53:25 +0100
Subject: [PATCH 2/2] Add support for CF8381 WiFi card
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
drivers/net/wireless/libertas/if_cs.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c
index 3f02e6a..6d00d82 100644
--- a/drivers/net/wireless/libertas/if_cs.c
+++ b/drivers/net/wireless/libertas/if_cs.c
@@ -273,7 +273,14 @@ static int if_cs_poll_while_fw_download(struct if_cs_card *card, uint addr, u8 r
*/
#define IF_CS_PRODUCT_ID 0x0000001C
#define IF_CS_CF8385_B1_REV 0x12
+#define IF_CS_CF8381_B3_REV 0x04
+/*
+ * Used to detect other cards than CF8385 since their revisions of silicon
+ * doesn't match those from CF8385, eg. CF8381 B3 works with this driver.
+ */
+#define CF8381_MANFID 0x02db
+#define CF8381_CARDID 0x6064
/********************************************************************/
/* I/O and interrupt handling */
@@ -859,7 +866,9 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
p_dev->io.BasePort1 + p_dev->io.NumPorts1 - 1);
/* Check if we have a current silicon */
- if (if_cs_read8(card, IF_CS_PRODUCT_ID) < IF_CS_CF8385_B1_REV) {
+ if (!(p_dev->manf_id == CF8381_MANFID &&
+ p_dev->card_id == CF8381_CARDID) &&
+ (if_cs_read8(card, IF_CS_PRODUCT_ID) < IF_CS_CF8385_B1_REV)) {
lbs_pr_err("old chips like 8385 rev B1 aren't supported\n");
ret = -ENODEV;
goto out2;
@@ -950,6 +959,7 @@ static void if_cs_detach(struct pcmcia_device *p_dev)
/********************************************************************/
static struct pcmcia_device_id if_cs_ids[] = {
+ PCMCIA_DEVICE_MANF_CARD(CF8381_MANFID, CF8381_CARDID),
PCMCIA_DEVICE_MANF_CARD(0x02df, 0x8103),
PCMCIA_DEVICE_NULL,
};
--
1.6.2
[-- Attachment #3: 0001-Correct-return-value-of-firmware-loading-functions-h.patch --]
[-- Type: text/x-diff, Size: 973 bytes --]
From f87515bca27571370323292f07526820823b0553 Mon Sep 17 00:00:00 2001
From: Marek Vasut <marek.vasut@gmail.com>
Date: Sat, 21 Mar 2009 19:20:30 +0100
Subject: [PATCH 1/2] Correct return value of firmware loading functions handling bug
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
drivers/net/wireless/libertas/if_cs.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c
index 842a08d..3f02e6a 100644
--- a/drivers/net/wireless/libertas/if_cs.c
+++ b/drivers/net/wireless/libertas/if_cs.c
@@ -867,9 +867,9 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
/* Load the firmware early, before calling into libertas.ko */
ret = if_cs_prog_helper(card);
- if (ret == 0)
+ if (ret >= 0)
ret = if_cs_prog_real(card);
- if (ret)
+ if (ret < 0)
goto out2;
/* Make this card known to the libertas driver */
--
1.6.2
next reply other threads:[~2009-03-22 0:27 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-22 0:27 Marek Vasut [this message]
2009-03-22 4:11 ` [PATCH] Marvell CF8381 Marek Vasut
2009-03-22 8:04 ` Johannes Berg
2009-03-22 13:01 ` Marek Vasut
2009-03-22 13:03 ` Johannes Berg
2009-03-23 12:27 ` Holger Schurig
2009-03-23 16:15 ` Dan Williams
2009-03-23 21:58 ` Marek Vasut
2009-03-23 23:08 ` Dan Williams
2009-03-23 23:42 ` Marek Vasut
2009-03-24 10:26 ` Dan Williams
2009-03-24 20:01 ` John W. Linville
2009-03-24 20:33 ` Marek Vasut
2009-03-23 12:13 ` Holger Schurig
2009-03-23 14:34 ` Marek Vasut
2009-03-23 15:57 ` [PATCH1/2] Fix return value handling Marek Vasut
2009-03-23 15:59 ` Marek Vasut
2009-03-23 16:11 ` Dan Williams
2009-03-23 15:59 ` [PATCH] Marvell CF8381 and CF8305 Marek Vasut
2009-03-23 16:00 ` Marek Vasut
2009-03-23 16:06 ` Holger Schurig
2009-03-23 17:09 ` Marek Vasut
2009-03-23 17:19 ` Dan Williams
2009-03-23 17:39 ` Marek Vasut
2009-03-23 16:58 ` Dan Williams
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=200903220127.21836.marek.vasut@gmail.com \
--to=marek.vasut@gmail.com \
--cc=hs4233@mail.mn-solutions.de \
--cc=libertas-dev@lists.infradead.org \
--cc=linux-wireless@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.