svn commit: r193420 - head/sys/dev/usb/wlan

Weongyo Jeong weongyo at FreeBSD.org
Thu Jun 4 02:49:51 UTC 2009


Author: weongyo
Date: Thu Jun  4 02:49:50 2009
New Revision: 193420
URL: http://svn.freebsd.org/changeset/base/193420

Log:
  reimplements RF logic for GCT chipset (as known as UW2453) to support
  ICIDU NI-707503 which is donated by Nick Hibma (great thanks!).  Though
  it has a MAXIM RF (0x8) there's some success reports with using GCT RF
  (0x9) codes and it worked well for ICIDU NI-707503 too.  So codes for
  MAXIM and GCT RFs are integrated.
  
  Before this commit, if I rememeber correctly, MAXIM RF is never tested
  that it seems it's a first report working with FreeBSD.

Modified:
  head/sys/dev/usb/wlan/if_zyd.c
  head/sys/dev/usb/wlan/if_zydreg.h

Modified: head/sys/dev/usb/wlan/if_zyd.c
==============================================================================
--- head/sys/dev/usb/wlan/if_zyd.c	Thu Jun  4 01:55:13 2009	(r193419)
+++ head/sys/dev/usb/wlan/if_zyd.c	Thu Jun  4 02:49:50 2009	(r193420)
@@ -190,9 +190,10 @@ static int	zyd_al2210_set_channel(struct
 static int	zyd_gct_init(struct zyd_rf *);
 static int	zyd_gct_switch_radio(struct zyd_rf *, int);
 static int	zyd_gct_set_channel(struct zyd_rf *, uint8_t);
-static int	zyd_maxim_init(struct zyd_rf *);
-static int	zyd_maxim_switch_radio(struct zyd_rf *, int);
-static int	zyd_maxim_set_channel(struct zyd_rf *, uint8_t);
+static int	zyd_gct_mode(struct zyd_rf *);
+static int	zyd_gct_set_channel_synth(struct zyd_rf *, int, int);
+static int	zyd_gct_write(struct zyd_rf *, uint16_t);
+static int	zyd_gct_txgain(struct zyd_rf *, uint8_t);
 static int	zyd_maxim2_init(struct zyd_rf *);
 static int	zyd_maxim2_switch_radio(struct zyd_rf *, int);
 static int	zyd_maxim2_set_channel(struct zyd_rf *, uint8_t);
@@ -1421,11 +1422,14 @@ fail:
 static int
 zyd_gct_init(struct zyd_rf *rf)
 {
+#define	ZYD_GCT_INTR_REG	0x85c1
 #define N(a)	(sizeof(a) / sizeof((a)[0]))
 	struct zyd_softc *sc = rf->rf_sc;
 	static const struct zyd_phy_pair phyini[] = ZYD_GCT_PHY;
 	static const uint32_t rfini[] = ZYD_GCT_RF;
-	int i, error;
+	static const uint16_t vco[11][7] = ZYD_GCT_VCO;
+	int i, idx = -1, error;
+	uint16_t data;
 
 	/* init RF-dependent PHY registers */
 	for (i = 0; i < N(phyini); i++)
@@ -1436,122 +1440,153 @@ zyd_gct_init(struct zyd_rf *rf)
 		if ((error = zyd_rfwrite(sc, rfini[i])) != 0)
 			return (error);
 	}
+
+	error = zyd_gct_mode(rf);
+	if (error != 0)
+		return (error);
+
+	for (i = 0; i < N(vco) - 1; i++) {
+		error = zyd_gct_set_channel_synth(rf, 1, 0);
+		if (error != 0)
+			goto fail;
+		error = zyd_gct_write(rf, vco[i][0]);
+		if (error != 0)
+			goto fail;
+		zyd_write16_m(sc, ZYD_GCT_INTR_REG, 0xf);
+		zyd_read16_m(sc, ZYD_GCT_INTR_REG, &data);
+		if ((data & 0xf) == 0) {
+			idx = i;
+			break;
+		}
+	}
+	if (idx == -1) {
+		error = zyd_gct_set_channel_synth(rf, 1, 1);
+		if (error != 0)
+			goto fail;
+		error = zyd_gct_write(rf, 0x6662);
+		if (error != 0)
+			goto fail;
+	}
+
+	rf->idx = idx;
+	zyd_write16_m(sc, ZYD_CR203, 0x6);
 fail:
 	return (error);
 #undef N
+#undef ZYD_GCT_INTR_REG
 }
 
 static int
-zyd_gct_switch_radio(struct zyd_rf *rf, int on)
+zyd_gct_mode(struct zyd_rf *rf)
 {
-	/* vendor driver does nothing for this RF chip */
+#define N(a)	(sizeof(a) / sizeof((a)[0]))
+	struct zyd_softc *sc = rf->rf_sc;
+	static const uint32_t mode[] = {
+		0x25f98, 0x25f9a, 0x25f94, 0x27fd4
+	};
+	int i, error;
 
-	return (0);
+	for (i = 0; i < N(mode); i++) {
+		if ((error = zyd_rfwrite(sc, mode[i])) != 0)
+			break;
+	}
+	return (error);
+#undef N
 }
 
 static int
-zyd_gct_set_channel(struct zyd_rf *rf, uint8_t chan)
+zyd_gct_set_channel_synth(struct zyd_rf *rf, int chan, int acal)
 {
-	int error;
+	int error, idx = chan - 1;
 	struct zyd_softc *sc = rf->rf_sc;
-	static const uint32_t rfprog[] = ZYD_GCT_CHANTABLE;
+	static uint32_t acal_synth[] = ZYD_GCT_CHANNEL_ACAL;
+	static uint32_t std_synth[] = ZYD_GCT_CHANNEL_STD;
+	static uint32_t div_synth[] = ZYD_GCT_CHANNEL_DIV;
 
-	error = zyd_rfwrite(sc, 0x1c0000);
-	if (error != 0)
-		goto fail;
-	error = zyd_rfwrite(sc, rfprog[chan - 1]);
+	error = zyd_rfwrite(sc,
+	    (acal == 1) ? acal_synth[idx] : std_synth[idx]);
 	if (error != 0)
-		goto fail;
-	error = zyd_rfwrite(sc, 0x1c0008);
-fail:
-	return (error);
+		return (error);
+	return zyd_rfwrite(sc, div_synth[idx]);
 }
 
-/*
- * Maxim RF methods.
- */
 static int
-zyd_maxim_init(struct zyd_rf *rf)
+zyd_gct_write(struct zyd_rf *rf, uint16_t value)
 {
-#define N(a)	(sizeof(a) / sizeof((a)[0]))
 	struct zyd_softc *sc = rf->rf_sc;
-	static const struct zyd_phy_pair phyini[] = ZYD_MAXIM_PHY;
-	static const uint32_t rfini[] = ZYD_MAXIM_RF;
-	uint16_t tmp;
-	int i, error;
 
-	/* init RF-dependent PHY registers */
-	for (i = 0; i < N(phyini); i++)
-		zyd_write16_m(sc, phyini[i].reg, phyini[i].val);
-
-	zyd_read16_m(sc, ZYD_CR203, &tmp);
-	zyd_write16_m(sc, ZYD_CR203, tmp & ~(1 << 4));
-
-	/* init maxim radio */
-	for (i = 0; i < N(rfini); i++) {
-		if ((error = zyd_rfwrite(sc, rfini[i])) != 0)
-			return (error);
-	}
-	zyd_read16_m(sc, ZYD_CR203, &tmp);
-	zyd_write16_m(sc, ZYD_CR203, tmp | (1 << 4));
-fail:
-	return (error);
-#undef N
+	return zyd_rfwrite(sc, 0x300000 | 0x40000 | value);
 }
 
 static int
-zyd_maxim_switch_radio(struct zyd_rf *rf, int on)
+zyd_gct_switch_radio(struct zyd_rf *rf, int on)
 {
+#define N(a)	(sizeof(a) / sizeof((a)[0]))
+	int error;
+	struct zyd_softc *sc = rf->rf_sc;
 
-	/* vendor driver does nothing for this RF chip */
-	return (0);
+	error = zyd_rfwrite(sc, on ? 0x25f94 : 0x25f90);
+	if (error != 0)
+		return (error);
+
+	zyd_write16_m(sc, ZYD_CR11, on ? 0x00 : 0x04);
+	zyd_write16_m(sc, ZYD_CR251,
+	    on ? ((sc->sc_macrev == ZYD_ZD1211B) ? 0x7f : 0x3f) : 0x2f);
+fail:
+	return (error);
 }
 
 static int
-zyd_maxim_set_channel(struct zyd_rf *rf, uint8_t chan)
+zyd_gct_set_channel(struct zyd_rf *rf, uint8_t chan)
 {
 #define N(a)	(sizeof(a) / sizeof((a)[0]))
+	int error, i;
 	struct zyd_softc *sc = rf->rf_sc;
-	static const struct zyd_phy_pair phyini[] = ZYD_MAXIM_PHY;
-	static const uint32_t rfini[] = ZYD_MAXIM_RF;
-	static const struct {
-		uint32_t	r1, r2;
-	} rfprog[] = ZYD_MAXIM_CHANTABLE;
-	uint16_t tmp;
-	int i, error;
-
-	/*
-	 * Do the same as we do when initializing it, except for the channel
-	 * values coming from the two channel tables.
-	 */
-
-	/* init RF-dependent PHY registers */
-	for (i = 0; i < N(phyini); i++)
-		zyd_write16_m(sc, phyini[i].reg, phyini[i].val);
-
-	zyd_read16_m(sc, ZYD_CR203, &tmp);
-	zyd_write16_m(sc, ZYD_CR203, tmp & ~(1 << 4));
+	static const struct zyd_phy_pair cmd[] = {
+		{ ZYD_CR80, 0x30 }, { ZYD_CR81, 0x30 }, { ZYD_CR79, 0x58 },
+		{ ZYD_CR12, 0xf0 }, { ZYD_CR77, 0x1b }, { ZYD_CR78, 0x58 },
+	};
+	static const uint16_t vco[11][7] = ZYD_GCT_VCO;
 
-	/* first two values taken from the chantables */
-	error = zyd_rfwrite(sc, rfprog[chan - 1].r1);
+	error = zyd_gct_set_channel_synth(rf, chan, 0);
 	if (error != 0)
 		goto fail;
-	error = zyd_rfwrite(sc, rfprog[chan - 1].r2);
+	error = zyd_gct_write(rf, (rf->idx == -1) ? 0x6662 :
+	    vco[rf->idx][((chan - 1) / 2)]);
 	if (error != 0)
 		goto fail;
-
-	/* init maxim radio - skipping the two first values */
-	for (i = 2; i < N(rfini); i++) {
-		if ((error = zyd_rfwrite(sc, rfini[i])) != 0)
-			return (error);
-	}
-	zyd_read16_m(sc, ZYD_CR203, &tmp);
-	zyd_write16_m(sc, ZYD_CR203, tmp | (1 << 4));
+	error = zyd_gct_mode(rf);
+	if (error != 0)
+		return (error);
+	for (i = 0; i < N(cmd); i++)
+		zyd_write16_m(sc, cmd[i].reg, cmd[i].val);
+	error = zyd_gct_txgain(rf, chan);
+	if (error != 0)
+		return (error);
+	zyd_write16_m(sc, ZYD_CR203, 0x6);
 fail:
 	return (error);
 #undef N
 }
 
+static int
+zyd_gct_txgain(struct zyd_rf *rf, uint8_t chan)
+{
+#define N(a)	(sizeof(a) / sizeof((a)[0]))
+	struct zyd_softc *sc = rf->rf_sc;
+	static uint32_t txgain[] = ZYD_GCT_TXGAIN;
+	uint8_t idx = sc->sc_pwrint[chan - 1];
+
+	if (idx >= N(txgain)) {
+		device_printf(sc->sc_dev, "could not set TX gain (%d %#x)\n",
+		    chan, idx);
+		return 0;
+	}
+
+	return zyd_rfwrite(sc, 0x700000 | txgain[idx]);
+#undef N
+}
+
 /*
  * Maxim2 RF methods.
  */
@@ -1643,6 +1678,7 @@ zyd_rf_attach(struct zyd_softc *sc, uint
 	struct zyd_rf *rf = &sc->sc_rf;
 
 	rf->rf_sc = sc;
+	rf->update_pwr = 1;
 
 	switch (type) {
 	case ZYD_RF_RFMD:
@@ -1676,17 +1712,13 @@ zyd_rf_attach(struct zyd_softc *sc, uint
 		rf->set_channel  = zyd_al2210_set_channel;
 		rf->width        = 24;	/* 24-bit RF values */
 		break;
+	case ZYD_RF_MAXIM_NEW:
 	case ZYD_RF_GCT:
 		rf->init         = zyd_gct_init;
 		rf->switch_radio = zyd_gct_switch_radio;
 		rf->set_channel  = zyd_gct_set_channel;
-		rf->width        = 21;	/* 21-bit RF values */
-		break;
-	case ZYD_RF_MAXIM_NEW:
-		rf->init         = zyd_maxim_init;
-		rf->switch_radio = zyd_maxim_switch_radio;
-		rf->set_channel  = zyd_maxim_set_channel;
-		rf->width        = 18;	/* 18-bit RF values */
+		rf->width        = 24;	/* 24-bit RF values */
+		rf->update_pwr   = 0;
 		break;
 	case ZYD_RF_MAXIM_NEW2:
 		rf->init         = zyd_maxim2_init;
@@ -2066,16 +2098,21 @@ zyd_set_chan(struct zyd_softc *sc, struc
 	if (error != 0)
 		goto fail;
 
-	/* update Tx power */
-	zyd_write16_m(sc, ZYD_CR31, sc->sc_pwrint[chan - 1]);
+	if (rf->update_pwr) {
+		/* update Tx power */
+		zyd_write16_m(sc, ZYD_CR31, sc->sc_pwrint[chan - 1]);
 
-	if (sc->sc_macrev == ZYD_ZD1211B) {
-		zyd_write16_m(sc, ZYD_CR67, sc->sc_ofdm36_cal[chan - 1]);
-		zyd_write16_m(sc, ZYD_CR66, sc->sc_ofdm48_cal[chan - 1]);
-		zyd_write16_m(sc, ZYD_CR65, sc->sc_ofdm54_cal[chan - 1]);
-		zyd_write16_m(sc, ZYD_CR68, sc->sc_pwrcal[chan - 1]);
-		zyd_write16_m(sc, ZYD_CR69, 0x28);
-		zyd_write16_m(sc, ZYD_CR69, 0x2a);
+		if (sc->sc_macrev == ZYD_ZD1211B) {
+			zyd_write16_m(sc, ZYD_CR67,
+			    sc->sc_ofdm36_cal[chan - 1]);
+			zyd_write16_m(sc, ZYD_CR66,
+			    sc->sc_ofdm48_cal[chan - 1]);
+			zyd_write16_m(sc, ZYD_CR65,
+			    sc->sc_ofdm54_cal[chan - 1]);
+			zyd_write16_m(sc, ZYD_CR68, sc->sc_pwrcal[chan - 1]);
+			zyd_write16_m(sc, ZYD_CR69, 0x28);
+			zyd_write16_m(sc, ZYD_CR69, 0x2a);
+		}
 	}
 	if (sc->sc_cckgain) {
 		/* set CCK baseband gain from EEPROM */

Modified: head/sys/dev/usb/wlan/if_zydreg.h
==============================================================================
--- head/sys/dev/usb/wlan/if_zydreg.h	Thu Jun  4 01:55:13 2009	(r193419)
+++ head/sys/dev/usb/wlan/if_zydreg.h	Thu Jun  4 02:49:50 2009	(r193420)
@@ -840,82 +840,75 @@
 
 #define ZYD_GCT_PHY							\
 {									\
-	{ ZYD_CR47,  0x1e }, { ZYD_CR15, 0xdc }, { ZYD_CR113, 0xc0 },	\
-	{ ZYD_CR20,  0x0c }, { ZYD_CR17, 0x65 }, { ZYD_CR34,  0x04 },	\
-	{ ZYD_CR35,  0x35 }, { ZYD_CR24, 0x20 }, { ZYD_CR9,   0xe0 },	\
-	{ ZYD_CR127, 0x02 }, { ZYD_CR10, 0x91 }, { ZYD_CR23,  0x7f },	\
-	{ ZYD_CR27,  0x10 }, { ZYD_CR28, 0x7a }, { ZYD_CR79,  0xb5 },	\
-	{ ZYD_CR64,  0x80 }, { ZYD_CR33, 0x28 }, { ZYD_CR38,  0x30 }	\
+	{ ZYD_CR10,  0x89 }, { ZYD_CR15,  0x20 }, { ZYD_CR17,  0x28 },	\
+	{ ZYD_CR23,  0x38 }, { ZYD_CR24,  0x20 }, { ZYD_CR26,  0x93 },	\
+	{ ZYD_CR27,  0x15 }, { ZYD_CR28,  0x3e }, { ZYD_CR29,  0x00 },	\
+	{ ZYD_CR33,  0x28 }, { ZYD_CR34,  0x30 }, { ZYD_CR35,  0x43 },	\
+	{ ZYD_CR41,  0x24 }, { ZYD_CR44,  0x32 }, { ZYD_CR46,  0x92 },	\
+	{ ZYD_CR47,  0x1e }, { ZYD_CR48,  0x04 }, { ZYD_CR49,  0xfa },	\
+	{ ZYD_CR79,  0x58 }, { ZYD_CR80,  0x30 }, { ZYD_CR81,  0x30 },	\
+	{ ZYD_CR87,  0x0a }, { ZYD_CR89,  0x04 }, { ZYD_CR91,  0x00 },	\
+	{ ZYD_CR92,  0x0a }, { ZYD_CR98,  0x8d }, { ZYD_CR99,  0x28 },	\
+	{ ZYD_CR100, 0x02 }, { ZYD_CR101, 0x09 }, { ZYD_CR102, 0x27 },	\
+	{ ZYD_CR106, 0x1c }, { ZYD_CR107, 0x1c }, { ZYD_CR109, 0x13 },	\
+	{ ZYD_CR110, 0x1f }, { ZYD_CR111, 0x13 }, { ZYD_CR112, 0x1f },	\
+	{ ZYD_CR113, 0x27 }, { ZYD_CR114, 0x23 }, { ZYD_CR115, 0x24 },	\
+	{ ZYD_CR116, 0x24 }, { ZYD_CR117, 0xfa }, { ZYD_CR118, 0xf0 },	\
+	{ ZYD_CR119, 0x1a }, { ZYD_CR120, 0x4f }, { ZYD_CR121, 0x1f },	\
+	{ ZYD_CR122, 0xf0 }, { ZYD_CR123, 0x57 }, { ZYD_CR125, 0xad },	\
+	{ ZYD_CR126, 0x6c }, { ZYD_CR127, 0x03 }, { ZYD_CR128, 0x14 },	\
+	{ ZYD_CR129, 0x12 }, { ZYD_CR130, 0x10 }, { ZYD_CR137, 0x50 },	\
+	{ ZYD_CR138, 0xa8 }, { ZYD_CR144, 0xac }, { ZYD_CR146, 0x20 },	\
+	{ ZYD_CR252, 0xff }, { ZYD_CR253, 0xff }			\
 }
 
 #define ZYD_GCT_RF							\
 {									\
-	0x1f0000, 0x1f0000, 0x1f0200, 0x1f0600, 0x1f8600, 0x1f8600,	\
-	0x002050, 0x1f8000, 0x1f8200, 0x1f8600, 0x1c0000, 0x10c458,	\
-	0x088e92, 0x187b82, 0x0401b4, 0x140816, 0x0c7000, 0x1c0000,	\
-	0x02ccae, 0x128023, 0x0a0000, 0x1a0000, 0x06e380, 0x16cb94,	\
-	0x0e1740, 0x014980, 0x116240, 0x090000, 0x192304, 0x05112f,	\
-	0x0d54a8, 0x0f8000, 0x1c0008, 0x1c0000, 0x1a0000, 0x1c0008,	\
-	0x150000, 0x0c7000, 0x150800, 0x150000				\
+	0x40002b, 0x519e4f, 0x6f81ad, 0x73fffe, 0x25f9c, 0x100047,	\
+	0x200999, 0x307602, 0x346063,					\
 }
 
-#define ZYD_GCT_CHANTABLE						\
+#define	ZYD_GCT_VCO							\
 {									\
-	0x1a0000, 0x1a8000, 0x1a4000, 0x1ac000,	0x1a2000, 0x1aa000,	\
-	0x1a6000, 0x1ae000, 0x1a1000, 0x1a9000, 0x1a5000, 0x1ad000,	\
-	0x1a3000, 0x1ab000						\
+	{ 0x664d, 0x604d, 0x6675, 0x6475, 0x6655, 0x6455, 0x6665 },	\
+	{ 0x666d, 0x606d, 0x664d, 0x644d, 0x6675, 0x6475, 0x6655 },	\
+	{ 0x665d, 0x605d, 0x666d, 0x646d, 0x664d, 0x644d, 0x6675 },	\
+	{ 0x667d, 0x607d, 0x665d, 0x645d, 0x666d, 0x646d, 0x664d },	\
+	{ 0x6643, 0x6043, 0x667d, 0x647d, 0x665d, 0x645d, 0x666d },	\
+	{ 0x6663, 0x6063, 0x6643, 0x6443, 0x667d, 0x647d, 0x665d },	\
+	{ 0x6653, 0x6053, 0x6663, 0x6463, 0x6643, 0x6443, 0x667d },	\
+	{ 0x6673, 0x6073, 0x6653, 0x6453, 0x6663, 0x6463, 0x6643 },	\
+	{ 0x664b, 0x604b, 0x6673, 0x6473, 0x6653, 0x6453, 0x6663 },	\
+	{ 0x666b, 0x606b, 0x664b, 0x644b, 0x6673, 0x6473, 0x6653 },	\
+	{ 0x665b, 0x605b, 0x666b, 0x646b, 0x664b, 0x644b, 0x6673 }	\
 }
 
-#define ZYD_MAXIM_PHY							\
+#define	ZYD_GCT_TXGAIN							\
 {									\
-	{ ZYD_CR23,  0x40 }, { ZYD_CR15,  0x20 }, { ZYD_CR28,  0x3e },	\
-	{ ZYD_CR29,  0x00 }, { ZYD_CR26,  0x11 }, { ZYD_CR44,  0x33 },	\
-	{ ZYD_CR106, 0x2a }, { ZYD_CR107, 0x1a }, { ZYD_CR109, 0x2b },	\
-	{ ZYD_CR110, 0x2b }, { ZYD_CR111, 0x2b }, { ZYD_CR112, 0x2b },	\
-	{ ZYD_CR10,  0x89 }, { ZYD_CR17,  0x20 }, { ZYD_CR26,  0x93 },	\
-	{ ZYD_CR34,  0x30 }, { ZYD_CR35,  0x40 }, { ZYD_CR41,  0x24 },	\
-	{ ZYD_CR44,  0x32 }, { ZYD_CR46,  0x90 }, { ZYD_CR89,  0x18 },	\
-	{ ZYD_CR92,  0x0a }, { ZYD_CR101, 0x13 }, { ZYD_CR102, 0x27 },	\
-	{ ZYD_CR106, 0x20 }, { ZYD_CR107, 0x24 }, { ZYD_CR109, 0x09 },	\
-	{ ZYD_CR110, 0x13 }, { ZYD_CR111, 0x13 }, { ZYD_CR112, 0x13 },	\
-	{ ZYD_CR113, 0x27 }, { ZYD_CR114, 0x27 }, { ZYD_CR115, 0x24 },	\
-	{ ZYD_CR116, 0x24 }, { ZYD_CR117, 0xf4 }, { ZYD_CR118, 0xfa },	\
-	{ ZYD_CR120, 0x4f }, { ZYD_CR121, 0x77 }, { ZYD_CR122, 0xfe },	\
-	{ ZYD_CR10,  0x89 }, { ZYD_CR17,  0x20 }, { ZYD_CR26,  0x93 },	\
-	{ ZYD_CR34,  0x30 }, { ZYD_CR35,  0x40 }, { ZYD_CR41,  0x24 },	\
-	{ ZYD_CR44,  0x32 }, { ZYD_CR46,  0x90 }, { ZYD_CR89,  0x18 },	\
-	{ ZYD_CR92,  0x0a }, { ZYD_CR101, 0x13 }, { ZYD_CR102, 0x27 },	\
-	{ ZYD_CR106, 0x20 }, { ZYD_CR107, 0x24 }, { ZYD_CR109, 0x13 },	\
-	{ ZYD_CR110, 0x27 }, { ZYD_CR111, 0x27 }, { ZYD_CR112, 0x13 },	\
-	{ ZYD_CR113, 0x27 }, { ZYD_CR114, 0x27 }, { ZYD_CR115, 0x24 },	\
-	{ ZYD_CR116, 0x24 }, { ZYD_CR117, 0xf4 }, { ZYD_CR118, 0x00 },	\
-	{ ZYD_CR120, 0x4f }, { ZYD_CR121, 0x06 }, { ZYD_CR122, 0xfe },	\
-	{ ZYD_CR150, 0x0d }						\
+	0x0e313, 0x0fb13, 0x0e093, 0x0f893, 0x0ea93, 0x1f093, 0x1f493,	\
+	0x1f693, 0x1f393, 0x1f35b, 0x1e6db, 0x1ff3f, 0x1ffff, 0x361d7,	\
+	0x37fbf, 0x3ff8b, 0x3ff33, 0x3fb3f, 0x3ffff			\
 }
 
-#define ZYD_MAXIM_RF							\
+#define	ZYD_GCT_CHANNEL_ACAL						\
 {									\
-	0x00ccd4, 0x030a03, 0x000400, 0x000ca1, 0x010072, 0x018645,	\
-	0x004006, 0x0000a7, 0x008258, 0x003fc9, 0x00040a, 0x00000b,	\
-	0x00026c							\
+	0x106847, 0x106847, 0x106867, 0x106867, 0x106867, 0x106867,	\
+	0x106857, 0x106857, 0x106857, 0x106857, 0x106877, 0x106877,	\
+	0x106877, 0x10684f						\
 }
 
-#define ZYD_MAXIM_CHANTABLE	\
-{				\
-	{ 0x0ccd4, 0x30a03 },	\
-	{ 0x22224, 0x00a13 },	\
-	{ 0x37774, 0x10a13 },	\
-	{ 0x0ccd4, 0x30a13 },	\
-	{ 0x22224, 0x00a23 },	\
-	{ 0x37774, 0x10a23 },	\
-	{ 0x0ccd4, 0x30a23 },	\
-	{ 0x22224, 0x00a33 },	\
-	{ 0x37774, 0x10a33 },	\
-	{ 0x0ccd4, 0x30a33 },	\
-	{ 0x22224, 0x00a43 },	\
-	{ 0x37774, 0x10a43 },	\
-	{ 0x0ccd4, 0x30a43 },	\
-	{ 0x199a4, 0x20a53 }	\
+#define	ZYD_GCT_CHANNEL_STD						\
+{									\
+	0x100047, 0x100047, 0x100067, 0x100067, 0x100067, 0x100067,	\
+	0x100057, 0x100057, 0x100057, 0x100057, 0x100077, 0x100077,	\
+	0x100077, 0x10004f						\
+}
+
+#define	ZYD_GCT_CHANNEL_DIV						\
+{									\
+	0x200999, 0x20099b, 0x200998, 0x20099a, 0x200999, 0x20099b,	\
+	0x200998, 0x20099a, 0x200999, 0x20099b, 0x200998, 0x20099a,	\
+	0x200999, 0x200ccc						\
 }
 
 #define ZYD_MAXIM2_PHY							\
@@ -1226,6 +1219,8 @@ struct zyd_rf {
 	/* RF attributes */
 	struct zyd_softc	*rf_sc;	/* back-pointer */
 	int			width;
+	int			idx;	/* for GIT RF */
+	int			update_pwr;
 };
 
 struct zyd_rq {


More information about the svn-src-head mailing list