diff options
author | sam <sam@FreeBSD.org> | 2008-11-30 18:27:10 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2008-11-30 18:27:10 +0000 |
commit | e26a733b642467a31b60a334b5222325133c61a2 (patch) | |
tree | 4902e1b3ce96a5816864928a9d76e33dd9cb16e3 /sys/dev/ath | |
parent | 69d880d8768b72b5ee37ef5536acc33067d9a96b (diff) | |
download | FreeBSD-src-e26a733b642467a31b60a334b5222325133c61a2.zip FreeBSD-src-e26a733b642467a31b60a334b5222325133c61a2.tar.gz |
add frequency mapping for the Zcomax GZ-901
Diffstat (limited to 'sys/dev/ath')
-rw-r--r-- | sys/dev/ath/if_ath.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index 7efe8aa..115034e 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -115,6 +115,7 @@ CTASSERT(ATH_BCBUF <= 8); (((u_int8_t *)(p))[2] << 16) | (((u_int8_t *)(p))[3] << 24))) #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, @@ -1339,9 +1340,11 @@ ath_mapchan(const struct ieee80211com *ic, 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 @@ -5927,9 +5930,11 @@ getchannels(struct ath_softc *sc, int *nchans, struct ieee80211_channel chans[], * 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); |