Daniel Drake wrote:
Please test this driver snapshot:
http://dsd.object4.net/zd1211rw-zd1211b-al7230b.tar.bz2


Missed a bit, please add the attached patch on top.


>From 601b87b68b0dbed5a408826cf909ca89f2963542 Mon Sep 17 00:00:00 2001
From: Daniel Drake <[EMAIL PROTECTED]>
Date: Sun, 1 Apr 2007 13:01:49 -0400
Subject: [PATCH] fix radio on

Signed-off-by: Daniel Drake <[EMAIL PROTECTED]>
---
 zd_rf_al7230b.c |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/zd_rf_al7230b.c b/zd_rf_al7230b.c
index 895af8b..5e5e9dd 100644
--- a/zd_rf_al7230b.c
+++ b/zd_rf_al7230b.c
@@ -414,7 +414,7 @@ static int zd1211b_al7230b_set_channel(struct zd_rf *rf, u8 channel)
 	return zd1211b_al7230b_finalize(chip);
 }
 
-static int al7230b_switch_radio_on(struct zd_rf *rf)
+static int zd1211_al7230b_switch_radio_on(struct zd_rf *rf)
 {
 	struct zd_chip *chip = zd_rf_to_chip(rf);
 	static const struct zd_ioreq16 ioreqs[] = {
@@ -425,6 +425,17 @@ static int al7230b_switch_radio_on(struct zd_rf *rf)
 	return zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs));
 }
 
+static int zd1211b_al7230b_switch_radio_on(struct zd_rf *rf)
+{
+	struct zd_chip *chip = zd_rf_to_chip(rf);
+	static const struct zd_ioreq16 ioreqs[] = {
+		{ CR11,  0x00 },
+		{ CR251, 0x7f },
+	};
+
+	return zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs));
+}
+
 static int al7230b_switch_radio_off(struct zd_rf *rf)
 {
 	struct zd_chip *chip = zd_rf_to_chip(rf);
@@ -464,15 +475,16 @@ int zd_rf_init_al7230b(struct zd_rf *rf)
 
 	if (chip->is_zd1211b) {
 		rf->init_hw = zd1211b_al7230b_init_hw;
+		rf->switch_radio_on = zd1211b_al7230b_switch_radio_on;
 		rf->set_channel = zd1211b_al7230b_set_channel;
 		rf->patch_6m_band_edge = zd1211b_al7230b_patch_6m;
 	} else {
 		rf->init_hw = zd1211_al7230b_init_hw;
+		rf->switch_radio_on = zd1211_al7230b_switch_radio_on;
 		rf->set_channel = zd1211_al7230b_set_channel;
 		rf->patch_6m_band_edge = zd_rf_generic_patch_6m;
 	}
 
-	rf->switch_radio_on = al7230b_switch_radio_on;
 	rf->switch_radio_off = al7230b_switch_radio_off;
 
 	return 0;
-- 
1.5.0.6

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Zd1211-devs mailing list - http://zd1211.ath.cx/
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/zd1211-devs

Reply via email to