-/* $OpenBSD: pgt.c,v 1.51 2008/08/27 09:05:03 damien Exp $ */
+/* $OpenBSD: pgt.c,v 1.52 2008/08/29 12:14:53 damien Exp $ */
/*
* Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org>
preamble = PGT_OID_PREAMBLE_MODE_SHORT;
DPRINTF(("IEEE80211_MODE_11G\n"));
break;
- case IEEE80211_MODE_FH:
- /* FALLTHROUGH */
case IEEE80211_MODE_TURBO: /* not handled */
/* FALLTHROUGH */
case IEEE80211_MODE_AUTO:
-/* $OpenBSD: ieee80211.c,v 1.34 2008/08/27 09:05:04 damien Exp $ */
+/* $OpenBSD: ieee80211.c,v 1.35 2008/08/29 12:14:53 damien Exp $ */
/* $NetBSD: ieee80211.c,v 1.19 2004/06/06 05:45:29 dyoung Exp $ */
/*-
ic->ic_modecaps |= 1<<IEEE80211_MODE_11B;
if (IEEE80211_IS_CHAN_PUREG(c))
ic->ic_modecaps |= 1<<IEEE80211_MODE_11G;
- if (IEEE80211_IS_CHAN_FHSS(c))
- ic->ic_modecaps |= 1<<IEEE80211_MODE_FH;
if (IEEE80211_IS_CHAN_T(c))
ic->ic_modecaps |= 1<<IEEE80211_MODE_TURBO;
}
IFM_IEEE80211_11A,
IFM_IEEE80211_11B,
IFM_IEEE80211_11G,
- IFM_IEEE80211_FH,
IFM_IEEE80211_11A | IFM_IEEE80211_TURBO,
};
if ((ic->ic_modecaps & (1<<mode)) == 0)
case IFM_IEEE80211_11G:
newphymode = IEEE80211_MODE_11G;
break;
- case IFM_IEEE80211_FH:
- newphymode = IEEE80211_MODE_FH;
- break;
case IFM_AUTO:
newphymode = IEEE80211_MODE_AUTO;
break;
case IEEE80211_MODE_11G:
imr->ifm_active |= IFM_IEEE80211_11G;
break;
- case IEEE80211_MODE_FH:
- imr->ifm_active |= IFM_IEEE80211_FH;
- break;
case IEEE80211_MODE_TURBO:
imr->ifm_active |= IFM_IEEE80211_11A
| IFM_IEEE80211_TURBO;
{ 3, { 12, 24, 48 } }, /* IEEE80211_MODE_11A */
{ 2, { 2, 4 } }, /* IEEE80211_MODE_11B */
{ 4, { 2, 4, 11, 22 } }, /* IEEE80211_MODE_11G */
- { 2, { 2, 4 } }, /* IEEE80211_MODE_FH */
{ 0 }, /* IEEE80211_MODE_TURBO */
};
enum ieee80211_phymode mode;
IEEE80211_CHAN_A, /* IEEE80211_MODE_11A */
IEEE80211_CHAN_B, /* IEEE80211_MODE_11B */
IEEE80211_CHAN_PUREG, /* IEEE80211_MODE_11G */
- IEEE80211_CHAN_FHSS, /* IEEE80211_MODE_FH */
IEEE80211_CHAN_T, /* IEEE80211_MODE_TURBO */
};
const struct ieee80211_channel *c;
return IEEE80211_MODE_TURBO;
else if (IEEE80211_IS_CHAN_5GHZ(chan))
return IEEE80211_MODE_11A;
- else if (IEEE80211_IS_CHAN_FHSS(chan))
- return IEEE80211_MODE_FH;
else if (chan->ic_flags & (IEEE80211_CHAN_OFDM|IEEE80211_CHAN_DYN))
return IEEE80211_MODE_11G;
else
u_int m; /* rate + mode */
u_int r; /* if_media rate */
} rates[] = {
- { 2 | IFM_IEEE80211_FH, IFM_IEEE80211_FH1 },
- { 4 | IFM_IEEE80211_FH, IFM_IEEE80211_FH2 },
{ 2 | IFM_IEEE80211_11B, IFM_IEEE80211_DS1 },
{ 4 | IFM_IEEE80211_11B, IFM_IEEE80211_DS2 },
{ 11 | IFM_IEEE80211_11B, IFM_IEEE80211_DS5 },
case IEEE80211_MODE_11B:
mask |= IFM_IEEE80211_11B;
break;
- case IEEE80211_MODE_FH:
- mask |= IFM_IEEE80211_FH;
- break;
case IEEE80211_MODE_AUTO:
- /* NB: ic may be NULL for some drivers */
- if (ic && ic->ic_phytype == IEEE80211_T_FH) {
- mask |= IFM_IEEE80211_FH;
- break;
- }
/* NB: hack, 11g matches both 11b+11a rates */
/* FALLTHROUGH */
case IEEE80211_MODE_11G:
{ IFM_AUTO, -1 },
{ IFM_MANUAL, 0 },
{ IFM_NONE, 0 },
- { IFM_IEEE80211_FH1, 2 },
- { IFM_IEEE80211_FH2, 4 },
{ IFM_IEEE80211_DS1, 2 },
{ IFM_IEEE80211_DS2, 4 },
{ IFM_IEEE80211_DS5, 11 },
-/* $OpenBSD: ieee80211_input.c,v 1.102 2008/08/28 17:56:24 damien Exp $ */
+/* $OpenBSD: ieee80211_input.c,v 1.103 2008/08/29 12:14:53 damien Exp $ */
/*-
* Copyright (c) 2001 Atsushi Onoe
* [2] Capability
* [tlv] Service Set Identifier (SSID)
* [tlv] Supported rates
- * [tlv*] Frequency-Hopping (FH) Parameter Set
* [tlv*] DS Parameter Set (802.11g)
* [tlv] ERP Information (802.11g)
* [tlv] Extended Supported Rates (802.11g)
const u_int8_t *frm, *efrm;
const u_int8_t *tstamp, *ssid, *rates, *xrates, *edcaie, *wmmie;
const u_int8_t *rsnie, *wpaie;
- u_int16_t capinfo, bintval, fhdwell;
- u_int8_t chan, bchan, fhindex, erp;
+ u_int16_t capinfo, bintval;
+ u_int8_t chan, bchan, erp;
int is_new;
/*
ssid = rates = xrates = edcaie = wmmie = rsnie = wpaie = NULL;
bchan = ieee80211_chan2ieee(ic, ic->ic_bss->ni_chan);
chan = bchan;
- fhdwell = 0;
- fhindex = 0;
erp = 0;
while (frm + 2 <= efrm) {
if (frm + 2 + frm[1] > efrm) {
case IEEE80211_ELEMID_RATES:
rates = frm;
break;
- case IEEE80211_ELEMID_FHPARMS:
- if (ic->ic_phytype != IEEE80211_T_FH)
- break;
- if (frm[1] < 5) {
- ic->ic_stats.is_rx_elem_toosmall++;
- break;
- }
- fhdwell = LE_READ_2(frm + 2);
- chan = IEEE80211_FH_CHAN(frm[4], frm[5]);
- fhindex = frm[6];
- break;
case IEEE80211_ELEMID_DSPARMS:
- if (ic->ic_phytype == IEEE80211_T_FH)
- break;
if (frm[1] < 1) {
ic->ic_stats.is_rx_elem_toosmall++;
break;
}
if ((ic->ic_state != IEEE80211_S_SCAN ||
!(ic->ic_caps & IEEE80211_C_SCANALL)) &&
- chan != bchan && ic->ic_phytype != IEEE80211_T_FH) {
+ chan != bchan) {
/*
* Frame was received on a channel different from the
* one indicated in the DS params element id;
* silently discard it.
*
* NB: this can happen due to signal leakage.
- * But we should take it for FH phy because
- * the rssi value should be correct even for
- * different hop pattern in FH.
*/
DPRINTF(("ignore %s on channel %u marked for channel %u\n",
isprobe ? "probe response" : "beacon", bchan, chan));
ni->ni_capinfo = capinfo;
/* XXX validate channel # */
ni->ni_chan = &ic->ic_channels[chan];
- ni->ni_fhdwell = fhdwell;
- ni->ni_fhindex = fhindex;
ni->ni_erp = erp;
/* NB: must be after ni_chan is setup */
ieee80211_setup_rates(ic, ni, rates, xrates, IEEE80211_F_DOSORT);
ni->ni_intval = bintval;
ni->ni_capinfo = capinfo;
ni->ni_chan = ic->ic_bss->ni_chan;
- ni->ni_fhdwell = ic->ic_bss->ni_fhdwell;
- ni->ni_fhindex = ic->ic_bss->ni_fhindex;
end:
resp = reassoc ? IEEE80211_FC0_SUBTYPE_REASSOC_RESP :
IEEE80211_FC0_SUBTYPE_ASSOC_RESP;
-/* $OpenBSD: ieee80211_ioctl.c,v 1.23 2008/08/27 09:05:04 damien Exp $ */
+/* $OpenBSD: ieee80211_ioctl.c,v 1.24 2008/08/29 12:14:53 damien Exp $ */
/* $NetBSD: ieee80211_ioctl.c,v 1.15 2004/05/06 02:58:16 dyoung Exp $ */
/*-
bcopy(ni->ni_tstamp, nr->nr_tstamp, sizeof(nr->nr_tstamp));
nr->nr_intval = ni->ni_intval;
nr->nr_capinfo = ni->ni_capinfo;
- nr->nr_fhdwell = ni->ni_fhdwell;
- nr->nr_fhindex = ni->ni_fhindex;
nr->nr_erp = ni->ni_erp;
nr->nr_pwrsave = ni->ni_pwrsave;
nr->nr_associd = ni->ni_associd;
/* Node information */
ni->ni_intval = nr->nr_intval;
ni->ni_capinfo = nr->nr_capinfo;
- ni->ni_fhdwell = nr->nr_fhdwell;
- ni->ni_fhindex = nr->nr_fhindex;
ni->ni_erp = nr->nr_erp;
ni->ni_pwrsave = nr->nr_pwrsave;
ni->ni_associd = nr->nr_associd;
-/* $OpenBSD: ieee80211_node.c,v 1.44 2008/08/27 09:05:04 damien Exp $ */
+/* $OpenBSD: ieee80211_node.c,v 1.45 2008/08/29 12:14:53 damien Exp $ */
/* $NetBSD: ieee80211_node.c,v 1.14 2004/05/09 09:18:47 dyoung Exp $ */
/*-
/* schedule a GTK/IGTK rekeying after 3600s */
timeout_add(&ic->ic_rsn_timeout, 3600 * hz);
}
- if (ic->ic_phytype == IEEE80211_T_FH) {
- ni->ni_fhdwell = 200; /* XXX */
- ni->ni_fhindex = 1;
- }
ieee80211_new_state(ic, IEEE80211_S_RUN, -1);
}
#endif /* IEEE80211_STA_ONLY */
-/* $OpenBSD: ieee80211_node.h,v 1.31 2008/08/12 18:22:41 damien Exp $ */
+/* $OpenBSD: ieee80211_node.h,v 1.32 2008/08/29 12:14:53 damien Exp $ */
/* $NetBSD: ieee80211_node.h,v 1.9 2004/04/30 22:57:32 dyoung Exp $ */
/*-
struct ieee80211_rateset ni_rates; /* negotiated rate set */
u_int8_t *ni_country; /* country information XXX */
struct ieee80211_channel *ni_chan;
- u_int16_t ni_fhdwell; /* FH only */
- u_int8_t ni_fhindex; /* FH only */
u_int8_t ni_erp; /* 11g only */
#ifdef notyet
-/* $OpenBSD: ieee80211_output.c,v 1.72 2008/08/27 09:05:04 damien Exp $ */
+/* $OpenBSD: ieee80211_output.c,v 1.73 2008/08/29 12:14:53 damien Exp $ */
/* $NetBSD: ieee80211_output.c,v 1.13 2004/05/31 11:02:55 dyoung Exp $ */
/*-
* 11A 15 1023
* 11B 31 1023
* 11G 15* 1023 (*) aCWmin(1)
- * FH 15 1023
* Turbo A/G 7 1023 (Atheros proprietary mode)
*/
static const struct ieee80211_edca_ac_params
ieee80211_edca_table[IEEE80211_MODE_MAX][EDCA_NUM_AC] = {
- [IEEE80211_MODE_FH] = {
- [EDCA_AC_BK] = { 4, 10, 7, 0 },
- [EDCA_AC_BE] = { 4, 10, 3, 0 },
- [EDCA_AC_VI] = { 3, 4, 2, 0 },
- [EDCA_AC_VO] = { 2, 3, 2, 0 }
- },
[IEEE80211_MODE_11B] = {
[EDCA_AC_BK] = { 5, 10, 7, 0 },
[EDCA_AC_BE] = { 5, 10, 3, 0 },
#ifndef IEEE80211_STA_ONLY
static const struct ieee80211_edca_ac_params
ieee80211_qap_edca_table[IEEE80211_MODE_MAX][EDCA_NUM_AC] = {
- [IEEE80211_MODE_FH] = {
- [EDCA_AC_BK] = { 4, 10, 7, 0 },
- [EDCA_AC_BE] = { 4, 6, 3, 0 },
- [EDCA_AC_VI] = { 3, 4, 1, 0 },
- [EDCA_AC_VO] = { 2, 3, 1, 0 }
- },
[IEEE80211_MODE_11B] = {
[EDCA_AC_BK] = { 5, 10, 7, 0 },
[EDCA_AC_BE] = { 5, 7, 3, 0 },
}
#ifndef IEEE80211_STA_ONLY
-/*
- * Add a FH Parameter Set element to a frame (see 7.3.2.3).
- */
-u_int8_t *
-ieee80211_add_fh_params(u_int8_t *frm, struct ieee80211com *ic,
- const struct ieee80211_node *ni)
-{
- u_int chan = ieee80211_chan2ieee(ic, ni->ni_chan);
-
- *frm++ = IEEE80211_ELEMID_FHPARMS;
- *frm++ = 5;
- LE_WRITE_2(frm, ni->ni_fhdwell); frm += 2;
- *frm++ = IEEE80211_FH_CHANSET(chan);
- *frm++ = IEEE80211_FH_CHANPAT(chan);
- *frm++ = ni->ni_fhindex;
- return frm;
-}
-
/*
* Add a DS Parameter Set element to a frame (see 7.3.2.4).
*/
* [2] Capability
* [tlv] Service Set Identifier (SSID)
* [tlv] Supported rates
- * [tlv*] Frequency-Hopping (FH) Parameter Set
* [tlv*] DS Parameter Set (802.11g)
* [tlv] ERP Information (802.11g)
* [tlv] Extended Supported Rates (802.11g)
8 + 2 + 2 +
2 + ni->ni_esslen +
2 + min(rs->rs_nrates, IEEE80211_RATE_SIZE) +
- 2 + ((ic->ic_phytype == IEEE80211_T_FH) ? 5 : 1) +
+ 2 + 1 +
((ic->ic_opmode == IEEE80211_M_IBSS) ? 2 + 2 : 0) +
((ic->ic_curmode == IEEE80211_MODE_11G) ? 2 + 1 : 0) +
((rs->rs_nrates > IEEE80211_RATE_SIZE) ?
frm = ieee80211_add_ssid(frm, ic->ic_bss->ni_essid,
ic->ic_bss->ni_esslen);
frm = ieee80211_add_rates(frm, rs);
- if (ic->ic_phytype == IEEE80211_T_FH)
- frm = ieee80211_add_fh_params(frm, ic, ni);
- else
- frm = ieee80211_add_ds_params(frm, ic, ni);
+ frm = ieee80211_add_ds_params(frm, ic, ni);
if (ic->ic_opmode == IEEE80211_M_IBSS)
frm = ieee80211_add_ibss_params(frm, ni);
if (ic->ic_curmode == IEEE80211_MODE_11G)
* [2] Capability
* [tlv] Service Set Identifier (SSID)
* [tlv] Supported rates
- * [tlv*] Frequency-Hopping (FH) Parameter Set
* [tlv*] DS Parameter Set (802.11g)
* [tlv*] IBSS Parameter Set
* [tlv] Traffic Indication Map (TIM)
8 + 2 + 2 +
2 + ((ic->ic_flags & IEEE80211_F_HIDENWID) ? 0 : ni->ni_esslen) +
2 + min(rs->rs_nrates, IEEE80211_RATE_SIZE) +
- 2 + ((ic->ic_phytype == IEEE80211_T_FH) ? 5 : 1) +
+ 2 + 1 +
2 + ((ic->ic_opmode == IEEE80211_M_IBSS) ? 2 : 254) +
((ic->ic_curmode == IEEE80211_MODE_11G) ? 2 + 1 : 0) +
((rs->rs_nrates > IEEE80211_RATE_SIZE) ?
else
frm = ieee80211_add_ssid(frm, ni->ni_essid, ni->ni_esslen);
frm = ieee80211_add_rates(frm, rs);
- if (ic->ic_phytype == IEEE80211_T_FH)
- frm = ieee80211_add_fh_params(frm, ic, ni);
- else
- frm = ieee80211_add_ds_params(frm, ic, ni);
+ frm = ieee80211_add_ds_params(frm, ic, ni);
if (ic->ic_opmode == IEEE80211_M_IBSS)
frm = ieee80211_add_ibss_params(frm, ni);
else
-/* $OpenBSD: ieee80211_proto.c,v 1.34 2008/08/27 09:05:04 damien Exp $ */
+/* $OpenBSD: ieee80211_proto.c,v 1.35 2008/08/29 12:14:53 damien Exp $ */
/* $NetBSD: ieee80211_proto.c,v 1.8 2004/04/30 23:58:20 dyoung Exp $ */
/*-
"11a", /* IEEE80211_MODE_11A */
"11b", /* IEEE80211_MODE_11B */
"11g", /* IEEE80211_MODE_11G */
- "fh", /* IEEE80211_MODE_FH */
"turbo", /* IEEE80211_MODE_TURBO */
};
-/* $OpenBSD: ieee80211_var.h,v 1.49 2008/08/29 08:40:53 damien Exp $ */
+/* $OpenBSD: ieee80211_var.h,v 1.50 2008/08/29 12:14:53 damien Exp $ */
/* $NetBSD: ieee80211_var.h,v 1.7 2004/05/06 03:07:10 dyoung Exp $ */
/*-
enum ieee80211_phytype {
IEEE80211_T_DS, /* direct sequence spread spectrum */
- IEEE80211_T_FH, /* frequency hopping */
IEEE80211_T_OFDM, /* frequency division multiplexing */
IEEE80211_T_TURBO, /* high rate OFDM, aka turbo mode */
IEEE80211_T_XR /* extended range mode */
IEEE80211_MODE_11A = 1, /* 5GHz, OFDM */
IEEE80211_MODE_11B = 2, /* 2GHz, CCK */
IEEE80211_MODE_11G = 3, /* 2GHz, OFDM */
- IEEE80211_MODE_FH = 4, /* 2GHz, GFSK */
- IEEE80211_MODE_TURBO = 5 /* 5GHz, OFDM, 2x clock */
+ IEEE80211_MODE_TURBO = 4 /* 5GHz, OFDM, 2x clock */
};
#define IEEE80211_MODE_MAX (IEEE80211_MODE_TURBO+1)
#define IEEE80211_CHAN_5GHZ 0x0100 /* 5 GHz spectrum channel */
#define IEEE80211_CHAN_PASSIVE 0x0200 /* Only passive scan allowed */
#define IEEE80211_CHAN_DYN 0x0400 /* Dynamic CCK-OFDM channel */
-#define IEEE80211_CHAN_GFSK 0x0800 /* GFSK channel (FHSS PHY) */
#define IEEE80211_CHAN_XR 0x1000 /* Extended range OFDM channel */
/*
* Useful combinations of channel characteristics.
*/
-#define IEEE80211_CHAN_FHSS \
- (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_GFSK)
#define IEEE80211_CHAN_A \
(IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_OFDM)
#define IEEE80211_CHAN_B \
#define IEEE80211_CHAN_TG \
(IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_OFDM | IEEE80211_CHAN_TURBO)
-#define IEEE80211_IS_CHAN_FHSS(_c) \
- (((_c)->ic_flags & IEEE80211_CHAN_FHSS) == IEEE80211_CHAN_FHSS)
#define IEEE80211_IS_CHAN_A(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_A) == IEEE80211_CHAN_A)
#define IEEE80211_IS_CHAN_B(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_OFDM) != 0)
#define IEEE80211_IS_CHAN_CCK(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_CCK) != 0)
-#define IEEE80211_IS_CHAN_GFSK(_c) \
- (((_c)->ic_flags & IEEE80211_CHAN_GFSK) != 0)
#define IEEE80211_IS_CHAN_XR(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_XR) != 0)
-/* ni_chan encoding for FH phy */
-#define IEEE80211_FH_CHANMOD 80
-#define IEEE80211_FH_CHAN(set,pat) (((set)-1)*IEEE80211_FH_CHANMOD+(pat))
-#define IEEE80211_FH_CHANSET(chan) ((chan)/IEEE80211_FH_CHANMOD+1)
-#define IEEE80211_FH_CHANPAT(chan) ((chan)%IEEE80211_FH_CHANMOD)
-
/*
* EDCA AC parameters.
*/