Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Nov 2008 22:39:53 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 153248 for review
Message-ID:  <200811192239.mAJMdrAI082433@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=153248

Change 153248 by sam@sam_ebb on 2008/11/19 22:39:17

	add frequency mapping for the zcomax gz-901; probably need to
	cleanup this stuff to be more generic

Affected files ...

.. //depot/projects/vap/sys/dev/ath/if_ath.c#125 edit

Differences ...

==== //depot/projects/vap/sys/dev/ath/if_ath.c#125 (text+ko) ====

@@ -120,6 +120,7 @@
      HAL_MODE_11NA_HT40PLUS | HAL_MODE_11NA_HT40MINUS)
 
 #define	CTRY_XR9	5001		/* Ubiquiti XR9 */
+#define	CTRY_GZ901	5002		/* ZComax GZ-901 */
 
 static struct ieee80211vap *ath_vap_create(struct ieee80211com *,
 		    const char name[IFNAMSIZ], int unit, int opmode,
@@ -1381,9 +1382,11 @@
 
 	if (IEEE80211_IS_CHAN_GSM(chan)) {
 		if (ic->ic_regdomain.country == CTRY_XR9)
-			hc->channel = 2427 + (chan->ic_freq - 907);
+			hc->channel = 1520 + chan->ic_freq;
+		else if (ic->ic_regdomain.country == CTRY_GZ901)
+			hc->channel = 1544 + chan->ic_freq;
 		else
-			hc->channel = 2422 + (922 - chan->ic_freq);
+			hc->channel = 3344 - chan->ic_freq;
 	} else
 		hc->channel = chan->ic_freq;
 #undef N
@@ -5990,9 +5993,11 @@
 			 * We define special country codes to deal with this. 
 			 */
 			if (cc == CTRY_XR9)
-				ichan->ic_freq = 907 + (ichan->ic_freq - 2427);
+				ichan->ic_freq = ichan->ic_freq - 1520;
+			else if (cc == CTRY_GZ901)
+				ichan->ic_freq = ichan->ic_freq - 1544;
 			else
-				ichan->ic_freq = 922 + (2422 - ichan->ic_freq);
+				ichan->ic_freq = 3344 - ichan->ic_freq;
 			ichan->ic_flags |= IEEE80211_CHAN_GSM;
 			ichan->ic_ieee = ieee80211_mhz2ieee(ichan->ic_freq,
 						    ichan->ic_flags);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811192239.mAJMdrAI082433>