PERFORCE change 153248 for review
Sam Leffler
sam at FreeBSD.org
Wed Nov 19 14:39:54 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=153248
Change 153248 by sam at 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);
More information about the p4-projects
mailing list