diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net80211/ieee80211.c | 29 | ||||
-rw-r--r-- | sys/net80211/ieee80211.h | 9 | ||||
-rw-r--r-- | sys/net80211/ieee80211_crypto.c | 8 | ||||
-rw-r--r-- | sys/net80211/ieee80211_input.c | 55 | ||||
-rw-r--r-- | sys/net80211/ieee80211_ioctl.h | 5 | ||||
-rw-r--r-- | sys/net80211/ieee80211_node.c | 39 | ||||
-rw-r--r-- | sys/net80211/ieee80211_node.h | 14 | ||||
-rw-r--r-- | sys/net80211/ieee80211_output.c | 87 | ||||
-rw-r--r-- | sys/net80211/ieee80211_proto.c | 18 | ||||
-rw-r--r-- | sys/net80211/ieee80211_regdomain.c | 79 | ||||
-rw-r--r-- | sys/net80211/ieee80211_rssadapt.c | 17 | ||||
-rw-r--r-- | sys/net80211/ieee80211_rssadapt.h | 4 | ||||
-rw-r--r-- | sys/net80211/ieee80211_var.h | 4 |
13 files changed, 193 insertions, 175 deletions
diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c index c20e8a6c507..10207cc4bf1 100644 --- a/sys/net80211/ieee80211.c +++ b/sys/net80211/ieee80211.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211.c,v 1.12 2005/09/08 12:44:55 jsg Exp $ */ +/* $OpenBSD: ieee80211.c,v 1.13 2005/09/08 13:24:52 reyk Exp $ */ /* $NetBSD: ieee80211.c,v 1.19 2004/06/06 05:45:29 dyoung Exp $ */ /*- @@ -73,7 +73,7 @@ int ieee80211_debug = 0; #endif -int ieee80211_cache_size = IEEE80211_CACHE_SIZE; +int ieee80211_cache_size = IEEE80211_CACHE_SIZE; struct ieee80211com_head ieee80211com_head = LIST_HEAD_INITIALIZER(ieee80211com_head); @@ -179,7 +179,7 @@ ieee80211_ifdetach(struct ifnet *ifp) ieee80211_crypto_detach(ifp); ieee80211_node_detach(ifp); LIST_REMOVE(ic, ic_list); - ifmedia_delete_instance(&ic->ic_media, IFM_INST_ANY); + ifmedia_delete_instance(&ic->ic_media, IFM_INST_ANY); #if NBPFILTER > 0 bpfdetach(ifp); #endif @@ -630,11 +630,14 @@ ieee80211_setbasicrates(struct ieee80211com *ic) rs = &ic->ic_sup_rates[mode]; for (i = 0; i < rs->rs_nrates; i++) { rs->rs_rates[i] &= IEEE80211_RATE_VAL; - for (j = 0; j < basic[mode].rs_nrates; j++) - if (basic[mode].rs_rates[j] == rs->rs_rates[i]) { - rs->rs_rates[i] |= IEEE80211_RATE_BASIC; + for (j = 0; j < basic[mode].rs_nrates; j++) { + if (basic[mode].rs_rates[j] == + rs->rs_rates[i]) { + rs->rs_rates[i] |= + IEEE80211_RATE_BASIC; break; } + } } } } @@ -714,16 +717,15 @@ ieee80211_setmode(struct ieee80211com *ic, enum ieee80211_phymode mode) * available channel from the active list. This is likely * not the right one. */ - if (ic->ic_ibss_chan == NULL || - isclr(ic->ic_chan_active, ieee80211_chan2ieee(ic, ic->ic_ibss_chan))) { + if (ic->ic_ibss_chan == NULL || isclr(ic->ic_chan_active, + ieee80211_chan2ieee(ic, ic->ic_ibss_chan))) { for (i = 0; i <= IEEE80211_CHAN_MAX; i++) if (isset(ic->ic_chan_active, i)) { ic->ic_ibss_chan = &ic->ic_channels[i]; break; } - if ((ic->ic_ibss_chan == NULL) || - isclr(ic->ic_chan_active, - ieee80211_chan2ieee(ic, ic->ic_ibss_chan))) + if ((ic->ic_ibss_chan == NULL) || isclr(ic->ic_chan_active, + ieee80211_chan2ieee(ic, ic->ic_ibss_chan))) panic("Bad IBSS channel %u\n", ieee80211_chan2ieee(ic, ic->ic_ibss_chan)); } @@ -760,7 +762,7 @@ ieee80211_setmode(struct ieee80211com *ic, enum ieee80211_phymode mode) #undef N } -enum ieee80211_phymode +enum ieee80211_phymode ieee80211_next_mode(struct ifnet *ifp) { struct ieee80211com *ic = (void *)ifp; @@ -834,7 +836,8 @@ ieee80211_chan2mode(struct ieee80211com *ic, struct ieee80211_channel *chan) * ieee80211 rate is in unit of 0.5Mbps. */ int -ieee80211_rate2media(struct ieee80211com *ic, int rate, enum ieee80211_phymode mode) +ieee80211_rate2media(struct ieee80211com *ic, int rate, + enum ieee80211_phymode mode) { #define N(a) (sizeof(a) / sizeof(a[0])) static const struct { diff --git a/sys/net80211/ieee80211.h b/sys/net80211/ieee80211.h index 042a860e083..a72aad7890d 100644 --- a/sys/net80211/ieee80211.h +++ b/sys/net80211/ieee80211.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211.h,v 1.9 2005/05/25 07:40:49 reyk Exp $ */ +/* $OpenBSD: ieee80211.h,v 1.10 2005/09/08 13:24:52 reyk Exp $ */ /* $NetBSD: ieee80211.h,v 1.6 2004/04/30 23:51:53 dyoung Exp $ */ /*- @@ -314,7 +314,10 @@ typedef u_int8_t *ieee80211_mgt_beacon_t; /* bit 12 is reserved */ #define IEEE80211_CAPINFO_DSSSOFDM 0x2000 /* bits 14-15 are reserved */ -#define IEEE80211_CAPINFO_BITS "\20\01ESS\02IBSS\03POLLABLE\04POLLREQ\05PRIVACY\06SHORT_PREAMBLE\07PBCC\10CHNL_AGILITY\13SHORT_SLOTTIME\14RSN\16DSSSOFDM" +#define IEEE80211_CAPINFO_BITS \ + "\20\01ESS\02IBSS\03POLLABLE\04POLLREQ\05PRIVACY" \ + "\06SHORT_PREAMBLE\07PBCC\10CHNL_AGILITY" \ + "\13SHORT_SLOTTIME\14RSN\16DSSSOFDM" /* * Channel attributes @@ -626,7 +629,7 @@ enum { */ #define IEEE80211_AID_MAX 2007 #define IEEE80211_AID_DEF 1800 - + #define IEEE80211_AID(b) ((b) &~ 0xc000) #define IEEE80211_AID_SET(b, w) \ ((w)[IEEE80211_AID(b) / 32] |= (1 << (IEEE80211_AID(b) % 32))) diff --git a/sys/net80211/ieee80211_crypto.c b/sys/net80211/ieee80211_crypto.c index c5cb257c7cc..b71ccc595c3 100644 --- a/sys/net80211/ieee80211_crypto.c +++ b/sys/net80211/ieee80211_crypto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_crypto.c,v 1.6 2005/09/08 12:44:55 jsg Exp $ */ +/* $OpenBSD: ieee80211_crypto.c,v 1.7 2005/09/08 13:24:52 reyk Exp $ */ /* $NetBSD: ieee80211_crypto.c,v 1.5 2003/12/14 09:56:53 dyoung Exp $ */ /*- @@ -96,7 +96,9 @@ ieee80211_crypto_detach(struct ifnet *ifp) } /* Round up to a multiple of IEEE80211_WEP_KEYLEN + IEEE80211_WEP_IVLEN */ -#define klen_round(x) (((x) + (IEEE80211_WEP_KEYLEN + IEEE80211_WEP_IVLEN - 1)) & ~(IEEE80211_WEP_KEYLEN + IEEE80211_WEP_IVLEN - 1)) +#define klen_round(x) \ + (((x) + (IEEE80211_WEP_KEYLEN + IEEE80211_WEP_IVLEN - 1)) & \ + ~(IEEE80211_WEP_KEYLEN + IEEE80211_WEP_IVLEN - 1)) struct mbuf * ieee80211_wep_crypt(struct ifnet *ifp, struct mbuf *m0, int txflag) @@ -274,7 +276,7 @@ ieee80211_wep_crypt(struct ifnet *ifp, struct mbuf *m0, int txflag) m_freem(m0); return n0; - fail: + fail: m_freem(m0); m_freem(n0); return NULL; diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index 7cff8b38eca..9ab720414f7 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -1,5 +1,5 @@ /* $NetBSD: ieee80211_input.c,v 1.24 2004/05/31 11:12:24 dyoung Exp $ */ -/* $OpenBSD: ieee80211_input.c,v 1.9 2005/09/08 12:44:55 jsg Exp $ */ +/* $OpenBSD: ieee80211_input.c,v 1.10 2005/09/08 13:24:52 reyk Exp $ */ /*- * Copyright (c) 2001 Atsushi Onoe @@ -70,8 +70,8 @@ #include <dev/rndvar.h> const struct timeval ieee80211_merge_print_intvl = { - .tv_sec = 1, - .tv_usec = 0 + .tv_sec = 1, + .tv_usec = 0 }; static void ieee80211_recv_pspoll(struct ieee80211com *, @@ -354,7 +354,7 @@ ieee80211_input(struct ifnet *ifp, struct mbuf *m, struct ieee80211_node *ni, if (ifp->if_bpf && m1 == NULL) bpf_mtap(ifp->if_bpf, m); #endif - ether_input_mbuf(ifp, m); + ether_input_mbuf(ifp, m); } return; @@ -434,9 +434,9 @@ ieee80211_input(struct ifnet *ifp, struct mbuf *m, struct ieee80211_node *ni, /* should not come here */ break; } - err: + err: ifp->if_ierrors++; - out: + out: if (m != NULL) { #if NBPFILTER > 0 if (ic->ic_rawbpf) @@ -810,10 +810,10 @@ ieee80211_auth_shared(struct ieee80211com *ic, struct ieee80211_frame *wh, ni->ni_challenge[i] = arc4random(); if (ifp->if_flags & IFF_DEBUG) printf("%s: station %s shared key " - "%sauthentication\n", ifp->if_xname, - ether_sprintf(ni->ni_macaddr), - ni->ni_state != IEEE80211_STA_CACHE ? - "" : "re"); + "%sauthentication\n", ifp->if_xname, + ether_sprintf(ni->ni_macaddr), + ni->ni_state != IEEE80211_STA_CACHE ? + "" : "re"); break; case IEEE80211_AUTH_SHARED_RESPONSE: if (ni == ic->ic_bss) { @@ -828,7 +828,7 @@ ieee80211_auth_shared(struct ieee80211com *ic, struct ieee80211_frame *wh, return; } if (memcmp(ni->ni_challenge, &challenge[2], - challenge[1]) != 0) { + challenge[1]) != 0) { IEEE80211_DPRINTF(("%s: challenge mismatch\n", __func__)); ic->ic_stats.is_rx_auth_fail++; @@ -976,7 +976,8 @@ ieee80211_recv_mgmt(struct ieee80211com *ic, struct mbuf *m0, case IEEE80211_ELEMID_FHPARMS: if (ic->ic_phytype == IEEE80211_T_FH) { fhdwell = (frm[3] << 8) | frm[2]; - chan = IEEE80211_FH_CHAN(frm[4], frm[5]); + chan = IEEE80211_FH_CHAN(frm[4], + frm[5]); fhindex = frm[6]; } break; @@ -1021,12 +1022,12 @@ ieee80211_recv_mgmt(struct ieee80211com *ic, struct mbuf *m0, #endif isclr(ic->ic_chan_active, chan)) { IEEE80211_DPRINTF(("%s: ignore %s with invalid channel " - "%u\n", __func__, - ISPROBE(subtype) ? "probe response" : "beacon", chan)); + "%u\n", __func__, ISPROBE(subtype) ? + "probe response" : "beacon", chan)); ic->ic_stats.is_rx_badchan++; return; } - if (!(ic->ic_caps & IEEE80211_C_SCANALL) && + if (!(ic->ic_caps & IEEE80211_C_SCANALL) && (chan != bchan && ic->ic_phytype != IEEE80211_T_FH)) { /* * Frame was received on a channel different from the @@ -1039,8 +1040,8 @@ ieee80211_recv_mgmt(struct ieee80211com *ic, struct mbuf *m0, * different hop pattern in FH. */ IEEE80211_DPRINTF(("%s: ignore %s on channel %u marked " - "for channel %u\n", __func__, - ISPROBE(subtype) ? "probe response" : "beacon", bchan, chan)); + "for channel %u\n", __func__, ISPROBE(subtype) ? + "probe response" : "beacon", bchan, chan)); ic->ic_stats.is_rx_chanmismatch++; return; } @@ -1107,7 +1108,8 @@ ieee80211_recv_mgmt(struct ieee80211com *ic, struct mbuf *m0, 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); + ieee80211_setup_rates(ic, ni, rates, xrates, + IEEE80211_F_DOSORT); /* * When scanning we record results (nodes) with a zero * refcnt. Otherwise we want to hold the reference for @@ -1464,7 +1466,7 @@ ieee80211_recv_mgmt(struct ieee80211com *ic, struct mbuf *m0, static void ieee80211_recv_pspoll(struct ieee80211com *ic, struct mbuf *m0, int rssi, - u_int32_t rstamp) + u_int32_t rstamp) { struct ifnet *ifp = &ic->ic_if; struct ieee80211_frame *wh; @@ -1480,7 +1482,7 @@ ieee80211_recv_pspoll(struct ieee80211com *ic, struct mbuf *m0, int rssi, if ((ni = ieee80211_find_node(ic, wh->i_addr2)) == NULL) { if (ifp->if_flags & IFF_DEBUG) printf("%s: station %s sent bogus power save poll\n", - ifp->if_xname, ether_sprintf(wh->i_addr2)); + ifp->if_xname, ether_sprintf(wh->i_addr2)); return; } @@ -1488,16 +1490,15 @@ ieee80211_recv_pspoll(struct ieee80211com *ic, struct mbuf *m0, int rssi, if ((aid & 0xc000) != 0xc000) { if (ifp->if_flags & IFF_DEBUG) printf("%s: station %s sent bogus aid %x\n", - ifp->if_xname, ether_sprintf(wh->i_addr2), aid); + ifp->if_xname, ether_sprintf(wh->i_addr2), aid); return; } if (aid != ni->ni_associd) { if (ifp->if_flags & IFF_DEBUG) printf("%s: station %s aid %x doesn't match pspoll " - "aid %x\n", - ifp->if_xname, ether_sprintf(wh->i_addr2), - ni->ni_associd, aid); + "aid %x\n", ifp->if_xname, + ether_sprintf(wh->i_addr2), ni->ni_associd, aid); return; } @@ -1507,8 +1508,8 @@ ieee80211_recv_pspoll(struct ieee80211com *ic, struct mbuf *m0, int rssi, if (m == NULL) { if (ifp->if_flags & IFF_DEBUG) printf("%s: station %s sent pspoll, " - "but no packets are saved\n", - ifp->if_xname, ether_sprintf(wh->i_addr2)); + "but no packets are saved\n", + ifp->if_xname, ether_sprintf(wh->i_addr2)); return; } wh = mtod(m, struct ieee80211_frame *); @@ -1527,7 +1528,7 @@ ieee80211_recv_pspoll(struct ieee80211com *ic, struct mbuf *m0, int rssi, if (ifp->if_flags & IFF_DEBUG) printf("%s: enqueued power saving packet for station %s\n", - ifp->if_xname, ether_sprintf(ni->ni_macaddr)); + ifp->if_xname, ether_sprintf(ni->ni_macaddr)); IF_ENQUEUE(&ic->ic_pwrsaveq, m); (*ifp->if_start)(ifp); diff --git a/sys/net80211/ieee80211_ioctl.h b/sys/net80211/ieee80211_ioctl.h index b81a4214f40..36ab89006c9 100644 --- a/sys/net80211/ieee80211_ioctl.h +++ b/sys/net80211/ieee80211_ioctl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_ioctl.h,v 1.4 2005/05/25 07:40:49 reyk Exp $ */ +/* $OpenBSD: ieee80211_ioctl.h,v 1.5 2005/09/08 13:24:52 reyk Exp $ */ /* $NetBSD: ieee80211_ioctl.h,v 1.7 2004/04/30 22:51:04 dyoung Exp $ */ /*- @@ -216,7 +216,8 @@ struct ieee80211_nodereq { }; #define IEEE80211_NODEREQ_STATE(_s) (1 << _s) -#define IEEE80211_NODEREQ_STATE_BITS "\20\01CACHE\02BSS\03AUTH\04ASSOC\05COLLECT" +#define IEEE80211_NODEREQ_STATE_BITS \ + "\20\01CACHE\02BSS\03AUTH\04ASSOC\05COLLECT" #define IEEE80211_NODEREQ_STA 0x00 /* station */ #define IEEE80211_NODEREQ_AP 0x01 /* access point */ diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index 7d4d41f45e3..e6568c2a001 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_node.c,v 1.9 2005/09/08 12:44:55 jsg Exp $ */ +/* $OpenBSD: ieee80211_node.c,v 1.10 2005/09/08 13:24:53 reyk Exp $ */ /* $NetBSD: ieee80211_node.c,v 1.14 2004/05/09 09:18:47 dyoung Exp $ */ /*- @@ -71,17 +71,17 @@ static struct ieee80211_node *ieee80211_node_alloc(struct ieee80211com *); static void ieee80211_node_free(struct ieee80211com *, struct ieee80211_node *); static void ieee80211_node_copy(struct ieee80211com *, - struct ieee80211_node *, const struct ieee80211_node *); + struct ieee80211_node *, const struct ieee80211_node *); static u_int8_t ieee80211_node_getrssi(struct ieee80211com *, - struct ieee80211_node *); - + struct ieee80211_node *); static void ieee80211_setup_node(struct ieee80211com *ic, - struct ieee80211_node *ni, u_int8_t *macaddr); + struct ieee80211_node *ni, u_int8_t *macaddr); static void ieee80211_free_node(struct ieee80211com *, - struct ieee80211_node *); -static struct ieee80211_node *ieee80211_alloc_node_helper(struct ieee80211com *); + struct ieee80211_node *); +static struct ieee80211_node * + ieee80211_alloc_node_helper(struct ieee80211com *); static void ieee80211_node_cleanup(struct ieee80211com *, - struct ieee80211_node *); + struct ieee80211_node *); #define M_80211_NODE M_DEVBUF @@ -153,8 +153,8 @@ ieee80211_node_detach(struct ifnet *ifp) } ieee80211_free_allnodes(ic); IEEE80211_NODE_LOCK_DESTROY(ic); - if (ic->ic_aid_bitmap != NULL) - FREE(ic->ic_aid_bitmap, M_DEVBUF); + if (ic->ic_aid_bitmap != NULL) + FREE(ic->ic_aid_bitmap, M_DEVBUF); } /* @@ -299,8 +299,8 @@ ieee80211_create_ibss(struct ieee80211com* ic, struct ieee80211_channel *chan) int ieee80211_match_bss(struct ieee80211com *ic, struct ieee80211_node *ni) { - u_int8_t rate; - int fail; + u_int8_t rate; + int fail; fail = 0; if (isclr(ic->ic_chan_active, ieee80211_chan2ieee(ic, ni->ni_chan))) @@ -408,7 +408,7 @@ ieee80211_end_scan(struct ifnet *ifp) } if (ni == NULL) { IEEE80211_DPRINTF(("%s: no scan candidate\n", __func__)); - notfound: + notfound: if (ic->ic_opmode == IEEE80211_M_IBSS && (ic->ic_flags & IEEE80211_F_IBSSON) && ic->ic_des_esslen != 0) { @@ -516,10 +516,10 @@ ieee80211_node_alloc(struct ieee80211com *ic) static void ieee80211_node_cleanup(struct ieee80211com *ic, struct ieee80211_node *ni) { - if (ni->ni_challenge != NULL) { - FREE(ni->ni_challenge, M_DEVBUF); - ni->ni_challenge = NULL; - } + if (ni->ni_challenge != NULL) { + FREE(ni->ni_challenge, M_DEVBUF); + ni->ni_challenge = NULL; + } } static void @@ -772,7 +772,7 @@ ieee80211_find_rxnode(struct ieee80211com *ic, struct ieee80211_frame *wh) u_int8_t *bssid; if (!ieee80211_needs_rxnode(ic, wh, &bssid)) - return ieee80211_ref_node(ic->ic_bss); + return ieee80211_ref_node(ic->ic_bss); IEEE80211_NODE_LOCK(ic); ni = _ieee80211_find_node(ic, wh->i_addr2); @@ -943,7 +943,8 @@ ieee80211_clean_nodes(struct ieee80211com *ic) } void -ieee80211_iterate_nodes(struct ieee80211com *ic, ieee80211_iter_func *f, void *arg) +ieee80211_iterate_nodes(struct ieee80211com *ic, ieee80211_iter_func *f, + void *arg) { struct ieee80211_node *ni; diff --git a/sys/net80211/ieee80211_node.h b/sys/net80211/ieee80211_node.h index b13a3c50d8f..577ddf102ca 100644 --- a/sys/net80211/ieee80211_node.h +++ b/sys/net80211/ieee80211_node.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_node.h,v 1.6 2005/09/08 08:36:12 reyk Exp $ */ +/* $OpenBSD: ieee80211_node.h,v 1.7 2005/09/08 13:24:53 reyk Exp $ */ /* $NetBSD: ieee80211_node.h,v 1.9 2004/04/30 22:57:32 dyoung Exp $ */ /*- @@ -37,8 +37,8 @@ #ifndef _NET80211_IEEE80211_NODE_H_ #define _NET80211_IEEE80211_NODE_H_ -#define IEEE80211_PSCAN_WAIT 5 /* passive scan wait */ -#define IEEE80211_TRANS_WAIT 5 /* transition wait */ +#define IEEE80211_PSCAN_WAIT 5 /* passive scan wait */ +#define IEEE80211_TRANS_WAIT 5 /* transition wait */ #define IEEE80211_INACT_WAIT 5 /* inactivity timer interval */ #define IEEE80211_INACT_MAX (300/IEEE80211_INACT_WAIT) #define IEEE80211_CACHE_SIZE 100 @@ -193,11 +193,11 @@ extern struct ieee80211_node *ieee80211_find_rxnode(struct ieee80211com *, struct ieee80211_frame *); extern struct ieee80211_node *ieee80211_find_txnode(struct ieee80211com *, u_int8_t *); -extern struct ieee80211_node *ieee80211_find_node_for_beacon( - struct ieee80211com *, u_int8_t *macaddr, - struct ieee80211_channel *, char *ssid); +extern struct ieee80211_node * + ieee80211_find_node_for_beacon(struct ieee80211com *, + u_int8_t *, struct ieee80211_channel *, char *); extern struct ieee80211_node * ieee80211_lookup_node(struct ieee80211com *, - u_int8_t *macaddr, struct ieee80211_channel *); + u_int8_t *, struct ieee80211_channel *); extern void ieee80211_release_node(struct ieee80211com *, struct ieee80211_node *); extern void ieee80211_free_allnodes(struct ieee80211com *); diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index ca7f2433d5e..37d1f5af9a5 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_output.c,v 1.12 2005/09/08 12:44:55 jsg Exp $ */ +/* $OpenBSD: ieee80211_output.c,v 1.13 2005/09/08 13:24:53 reyk Exp $ */ /* $NetBSD: ieee80211_output.c,v 1.13 2004/05/31 11:02:55 dyoung Exp $ */ /*- @@ -78,7 +78,7 @@ ieee80211_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, u_int dlt = 0; int s, error = 0; struct m_tag *mtag; - + /* Interface has to be up and running */ if ((ifp->if_flags & (IFF_UP | IFF_RUNNING)) != (IFF_UP | IFF_RUNNING)) { @@ -227,10 +227,10 @@ ieee80211_encap(struct ifnet *ifp, struct mbuf *m, struct ieee80211_node **pni) /* Handle raw frames if mbuf is tagged as 802.11 */ if ((mtag = m_tag_find(m, PACKET_TAG_DLT, NULL)) != NULL) { dlt = *(u_int *)(mtag + 1); - + if (!(dlt == DLT_IEEE802_11 || dlt == DLT_IEEE802_11_RADIO)) goto fallback; - + wh = mtod(m, struct ieee80211_frame *); if (m->m_pkthdr.len < sizeof(struct ieee80211_frame_min)) @@ -379,9 +379,11 @@ ieee80211_compute_duration1(int len, int use_ack, uint32_t flags, int rate, pre = IEEE80211_DUR_DS_SIFS; if ((flags & IEEE80211_F_SHPREAMBLE) != 0) - pre += IEEE80211_DUR_DS_SHORT_PREAMBLE + IEEE80211_DUR_DS_FAST_PLCPHDR; + pre += IEEE80211_DUR_DS_SHORT_PREAMBLE + + IEEE80211_DUR_DS_FAST_PLCPHDR; else - pre += IEEE80211_DUR_DS_LONG_PREAMBLE + IEEE80211_DUR_DS_SLOW_PLCPHDR; + pre += IEEE80211_DUR_DS_LONG_PREAMBLE + + IEEE80211_DUR_DS_SLOW_PLCPHDR; d->d_residue = 0; data_dur = (bitlen * 2) / rate; @@ -605,14 +607,14 @@ ieee80211_send_mgmt(struct ieee80211com *ic, struct ieee80211_node *ni, * [tlv] extended supported rates */ m = ieee80211_getmbuf(M_DONTWAIT, MT_DATA, - 2 + ic->ic_des_esslen - + 2 + IEEE80211_RATE_SIZE - + 2 + (IEEE80211_RATE_MAXSIZE - IEEE80211_RATE_SIZE)); + 2 + ic->ic_des_esslen + 2 + IEEE80211_RATE_SIZE + + 2 + (IEEE80211_RATE_MAXSIZE - IEEE80211_RATE_SIZE)); if (m == NULL) senderr(ENOMEM, is_tx_nombuf); m->m_data += sizeof(struct ieee80211_frame); frm = mtod(m, u_int8_t *); - frm = ieee80211_add_ssid(frm, ic->ic_des_essid, ic->ic_des_esslen); + frm = ieee80211_add_ssid(frm, ic->ic_des_essid, + ic->ic_des_esslen); mode = ieee80211_chan2mode(ic, ni->ni_chan); frm = ieee80211_add_rates(frm, &ic->ic_sup_rates[mode]); frm = ieee80211_add_xrates(frm, &ic->ic_sup_rates[mode]); @@ -634,12 +636,10 @@ ieee80211_send_mgmt(struct ieee80211com *ic, struct ieee80211_node *ni, * [tlv] extended supported rates */ m = ieee80211_getmbuf(M_DONTWAIT, MT_DATA, - 8 + 2 + 2 + 2 - + 2 + ni->ni_esslen - + 2 + IEEE80211_RATE_SIZE - + (ic->ic_phytype == IEEE80211_T_FH ? 7 : 3) - + 6 - + 2 + (IEEE80211_RATE_MAXSIZE - IEEE80211_RATE_SIZE)); + 8 + 2 + 2 + 2 + 2 + ni->ni_esslen + + 2 + IEEE80211_RATE_SIZE + + (ic->ic_phytype == IEEE80211_T_FH ? 7 : 3) + 6 + + 2 + (IEEE80211_RATE_MAXSIZE - IEEE80211_RATE_SIZE)); if (m == NULL) senderr(ENOMEM, is_tx_nombuf); m->m_data += sizeof(struct ieee80211_frame); @@ -666,15 +666,15 @@ ieee80211_send_mgmt(struct ieee80211com *ic, struct ieee80211_node *ni, frm = ieee80211_add_rates(frm, &ic->ic_bss->ni_rates); if (ic->ic_phytype == IEEE80211_T_FH) { - *frm++ = IEEE80211_ELEMID_FHPARMS; - *frm++ = 5; - *frm++ = ni->ni_fhdwell & 0x00ff; - *frm++ = (ni->ni_fhdwell >> 8) & 0x00ff; - *frm++ = IEEE80211_FH_CHANSET( + *frm++ = IEEE80211_ELEMID_FHPARMS; + *frm++ = 5; + *frm++ = ni->ni_fhdwell & 0x00ff; + *frm++ = (ni->ni_fhdwell >> 8) & 0x00ff; + *frm++ = IEEE80211_FH_CHANSET( ieee80211_chan2ieee(ic, ni->ni_chan)); - *frm++ = IEEE80211_FH_CHANPAT( + *frm++ = IEEE80211_FH_CHANPAT( ieee80211_chan2ieee(ic, ni->ni_chan)); - *frm++ = ni->ni_fhindex; + *frm++ = ni->ni_fhindex; } else { *frm++ = IEEE80211_ELEMID_DSPARMS; *frm++ = 1; @@ -692,7 +692,7 @@ ieee80211_send_mgmt(struct ieee80211com *ic, struct ieee80211_node *ni, *frm++ = 0; /* DTIM count */ *frm++ = 1; /* DTIM period */ *frm++ = 0; /* bitmap control */ - *frm++ = 0; /* Partial Virtual Bitmap (variable length) */ + *frm++ = 0; /* Partial Virtual Bitmap (variable) */ } frm = ieee80211_add_xrates(frm, &ic->ic_bss->ni_rates); m->m_pkthdr.len = m->m_len = frm - mtod(m, u_int8_t *); @@ -720,8 +720,8 @@ ieee80211_send_mgmt(struct ieee80211com *ic, struct ieee80211_node *ni, } frm = mtod(m, u_int8_t *); ((u_int16_t *)frm)[0] = - (is_shared_key) ? htole16(IEEE80211_AUTH_ALG_SHARED) - : htole16(IEEE80211_AUTH_ALG_OPEN); + (is_shared_key) ? htole16(IEEE80211_AUTH_ALG_SHARED) : + htole16(IEEE80211_AUTH_ALG_OPEN); ((u_int16_t *)frm)[1] = htole16(arg); /* sequence number */ ((u_int16_t *)frm)[2] = 0; /* status */ @@ -765,12 +765,10 @@ ieee80211_send_mgmt(struct ieee80211com *ic, struct ieee80211_node *ni, * [tlv] extended supported rates */ m = ieee80211_getmbuf(M_DONTWAIT, MT_DATA, - sizeof(capinfo) - + sizeof(u_int16_t) - + IEEE80211_ADDR_LEN - + 2 + ni->ni_esslen - + 2 + IEEE80211_RATE_SIZE - + 2 + (IEEE80211_RATE_MAXSIZE - IEEE80211_RATE_SIZE)); + sizeof(capinfo) + sizeof(u_int16_t) + + IEEE80211_ADDR_LEN + 2 + ni->ni_esslen + + 2 + IEEE80211_RATE_SIZE + 2 + + (IEEE80211_RATE_MAXSIZE - IEEE80211_RATE_SIZE)); if (m == NULL) senderr(ENOMEM, is_tx_nombuf); m->m_data += sizeof(struct ieee80211_frame); @@ -822,11 +820,9 @@ ieee80211_send_mgmt(struct ieee80211com *ic, struct ieee80211_node *ni, * [tlv] extended supported rates */ m = ieee80211_getmbuf(M_DONTWAIT, MT_DATA, - sizeof(capinfo) - + sizeof(u_int16_t) - + sizeof(u_int16_t) - + 2 + IEEE80211_RATE_SIZE - + 2 + (IEEE80211_RATE_MAXSIZE - IEEE80211_RATE_SIZE)); + sizeof(capinfo) + sizeof(u_int16_t) + + sizeof(u_int16_t) + 2 + IEEE80211_RATE_SIZE + + 2 + (IEEE80211_RATE_MAXSIZE - IEEE80211_RATE_SIZE)); if (m == NULL) senderr(ENOMEM, is_tx_nombuf); m->m_data += sizeof(struct ieee80211_frame); @@ -900,9 +896,8 @@ ieee80211_beacon_alloc(struct ieee80211com *ic, struct ieee80211_node *ni) if (rs->rs_nrates > IEEE80211_RATE_SIZE) pktlen += 2; m = ieee80211_getmbuf(M_DONTWAIT, MT_DATA, - 2 + ic->ic_des_esslen - + 2 + IEEE80211_RATE_SIZE - + 2 + (IEEE80211_RATE_MAXSIZE - IEEE80211_RATE_SIZE)); + 2 + ic->ic_des_esslen + 2 + IEEE80211_RATE_SIZE + + 2 + (IEEE80211_RATE_MAXSIZE - IEEE80211_RATE_SIZE)); if (m == NULL) return NULL; @@ -977,7 +972,7 @@ ieee80211_beacon_alloc(struct ieee80211com *ic, struct ieee80211_node *ni) void ieee80211_pwrsave(struct ieee80211com *ic, struct ieee80211_node *ni, - struct mbuf *m) + struct mbuf *m) { /* Store the new packet on our queue, changing the TIM if necessary */ @@ -989,11 +984,11 @@ ieee80211_pwrsave(struct ieee80211com *ic, struct ieee80211_node *ni, m_freem(m); if (ic->ic_if.if_flags & IFF_DEBUG) printf("%s: station %s power save queue overflow" - " of size %d drops %d\n", - ic->ic_if.if_xname, - ether_sprintf(ni->ni_macaddr), - IEEE80211_PS_MAX_QUEUE, - ni->ni_savedq.ifq_drops); + " of size %d drops %d\n", + ic->ic_if.if_xname, + ether_sprintf(ni->ni_macaddr), + IEEE80211_PS_MAX_QUEUE, + ni->ni_savedq.ifq_drops); } else { /* Similar to ieee80211_mgmt_output, store the node in * the rcvif field. diff --git a/sys/net80211/ieee80211_proto.c b/sys/net80211/ieee80211_proto.c index 1cb566f8eda..a08a19d42f3 100644 --- a/sys/net80211/ieee80211_proto.c +++ b/sys/net80211/ieee80211_proto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_proto.c,v 1.7 2005/09/08 12:44:55 jsg Exp $ */ +/* $OpenBSD: ieee80211_proto.c,v 1.8 2005/09/08 13:24:53 reyk Exp $ */ /* $NetBSD: ieee80211_proto.c,v 1.8 2004/04/30 23:58:20 dyoung Exp $ */ /*- @@ -206,7 +206,8 @@ ieee80211_dump_pkt(u_int8_t *buf, int len, int rate, int rssi) } int -ieee80211_fix_rate(struct ieee80211com *ic, struct ieee80211_node *ni, int flags) +ieee80211_fix_rate(struct ieee80211com *ic, struct ieee80211_node *ni, + int flags) { #define RV(v) ((v) & IEEE80211_RATE_VAL) int i, j, ignore, error; @@ -225,7 +226,8 @@ ieee80211_fix_rate(struct ieee80211com *ic, struct ieee80211_node *ni, int flags * Sort rates. */ for (j = i + 1; j < nrs->rs_nrates; j++) { - if (RV(nrs->rs_rates[i]) > RV(nrs->rs_rates[j])) { + if (RV(nrs->rs_rates[i]) > + RV(nrs->rs_rates[j])) { r = nrs->rs_rates[i]; nrs->rs_rates[i] = nrs->rs_rates[j]; nrs->rs_rates[j] = r; @@ -304,18 +306,21 @@ ieee80211_fix_rate(struct ieee80211com *ic, struct ieee80211_node *ni, int flags } static int -ieee80211_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int mgt) +ieee80211_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, + int mgt) { struct ifnet *ifp = &ic->ic_if; struct ieee80211_node *ni; enum ieee80211_state ostate; + u_int mbps; int s; ostate = ic->ic_state; IEEE80211_DPRINTF(("%s: %s -> %s\n", __func__, - ieee80211_state_name[ostate], ieee80211_state_name[nstate])); + ieee80211_state_name[ostate], ieee80211_state_name[nstate])); ic->ic_state = nstate; /* state transition */ ni = ic->ic_bss; /* NB: no reference held */ + mbps = IEEE80211_RATE2MBS(ni->ni_rates.rs_rates[ni->ni_txrate]); switch (nstate) { case IEEE80211_S_INIT: switch (ostate) { @@ -504,8 +509,7 @@ ieee80211_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int mgt ieee80211_print_essid(ic->ic_bss->ni_essid, ni->ni_esslen); printf(" channel %d start %uMb\n", - ieee80211_chan2ieee(ic, ni->ni_chan), - IEEE80211_RATE2MBS(ni->ni_rates.rs_rates[ni->ni_txrate])); + ieee80211_chan2ieee(ic, ni->ni_chan), mbps); } ic->ic_mgt_timer = 0; (*ifp->if_start)(ifp); diff --git a/sys/net80211/ieee80211_regdomain.c b/sys/net80211/ieee80211_regdomain.c index f52046a7ebb..676b21dd61f 100644 --- a/sys/net80211/ieee80211_regdomain.c +++ b/sys/net80211/ieee80211_regdomain.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_regdomain.c,v 1.4 2005/02/17 23:52:05 reyk Exp $ */ +/* $OpenBSD: ieee80211_regdomain.c,v 1.5 2005/09/08 13:24:53 reyk Exp $ */ /* * Copyright (c) 2004, 2005 Reyk Floeter <reyk@vantronix.net> @@ -67,7 +67,7 @@ bsearch(const void *key, const void *base0, size_t nmemb, size_t size, const char *base = base0; int lim, cmp; const void *p; - + for (lim = nmemb; lim != 0; lim >>= 1) { p = base + (lim >> 1) * size; cmp = (*compar)(key, p); @@ -85,15 +85,15 @@ bsearch(const void *key, const void *base0, size_t nmemb, size_t size, int ieee80211_regdomain_compare_cn(const void *a, const void *b) { - return(strcmp(((const struct ieee80211_countryname*)a)->cn_name, - ((const struct ieee80211_countryname*)b)->cn_name)); + return (strcmp(((const struct ieee80211_countryname*)a)->cn_name, + ((const struct ieee80211_countryname*)b)->cn_name)); } int ieee80211_regdomain_compare_rn(const void *a, const void *b) { - return(strcmp(((const struct ieee80211_regdomainname*)a)->rn_name, - ((const struct ieee80211_regdomainname*)b)->rn_name)); + return (strcmp(((const struct ieee80211_regdomainname*)a)->rn_name, + ((const struct ieee80211_regdomainname*)b)->rn_name)); } u_int16_t @@ -101,27 +101,31 @@ ieee80211_name2countrycode(const char *name) { const struct ieee80211_countryname key = { CTRY_DEFAULT, name }, *value; - if((value = bsearch(&key, &ieee80211_r_ctry, - sizeof(ieee80211_r_ctry) / sizeof(ieee80211_r_ctry[0]), - sizeof(struct ieee80211_countryname), - ieee80211_regdomain_compare_cn)) != NULL) - return(value->cn_code); + if ((value = bsearch(&key, &ieee80211_r_ctry, + sizeof(ieee80211_r_ctry) / sizeof(ieee80211_r_ctry[0]), + sizeof(struct ieee80211_countryname), + ieee80211_regdomain_compare_cn)) != NULL) + return (value->cn_code); - return(CTRY_DEFAULT); + return (CTRY_DEFAULT); } u_int32_t ieee80211_name2regdomain(const char *name) { - const struct ieee80211_regdomainname key = { DMN_DEFAULT, name }, *value; + const struct ieee80211_regdomainname *value; + struct ieee80211_regdomainname key; + + key.rn_domain = DMN_DEFAULT; + key.rn_name = name; - if((value = bsearch(&key, &ieee80211_r_names, - sizeof(ieee80211_r_names) / sizeof(ieee80211_r_names[0]), - sizeof(struct ieee80211_regdomainname), - ieee80211_regdomain_compare_rn)) != NULL) - return((u_int32_t)value->rn_domain); + if ((value = bsearch(&key, &ieee80211_r_names, + sizeof(ieee80211_r_names) / sizeof(ieee80211_r_names[0]), + sizeof(struct ieee80211_regdomainname), + ieee80211_regdomain_compare_rn)) != NULL) + return ((u_int32_t)value->rn_domain); - return((u_int32_t)DMN_DEFAULT); + return ((u_int32_t)DMN_DEFAULT); } const char * @@ -130,11 +134,12 @@ ieee80211_countrycode2name(u_int16_t code) int i; /* Linear search over the table */ - for(i = 0; i < (sizeof(ieee80211_r_ctry) / sizeof(ieee80211_r_ctry[0])); i++) - if(ieee80211_r_ctry[i].cn_code == code) - return(ieee80211_r_ctry[i].cn_name); + for (i = 0; i < (sizeof(ieee80211_r_ctry) / + sizeof(ieee80211_r_ctry[0])); i++) + if (ieee80211_r_ctry[i].cn_code == code) + return (ieee80211_r_ctry[i].cn_name); - return(NULL); + return (NULL); } const char * @@ -143,31 +148,33 @@ ieee80211_regdomain2name(u_int32_t regdomain) int i; /* Linear search over the table */ - for(i = 0; i < (sizeof(ieee80211_r_names) / + for (i = 0; i < (sizeof(ieee80211_r_names) / sizeof(ieee80211_r_names[0])); i++) - if(ieee80211_r_names[i].rn_domain == regdomain) - return(ieee80211_r_names[i].rn_name); + if (ieee80211_r_names[i].rn_domain == regdomain) + return (ieee80211_r_names[i].rn_name); - return(ieee80211_r_names[0].rn_name); + return (ieee80211_r_names[0].rn_name); } u_int32_t ieee80211_regdomain2flag(u_int16_t regdomain, u_int16_t mhz) { int i; - - for(i = 0; i < (sizeof(ieee80211_r_map) / + + for (i = 0; i < (sizeof(ieee80211_r_map) / sizeof(ieee80211_r_map[0])); i++) { - if(ieee80211_r_map[i].rm_domain == regdomain) { - if(mhz >= 2000 && mhz <= 3000) - return((u_int32_t)ieee80211_r_map[i].rm_domain_2ghz); - if(mhz >= IEEE80211_CHANNELS_5GHZ_MIN && + if (ieee80211_r_map[i].rm_domain == regdomain) { + if (mhz >= 2000 && mhz <= 3000) + return ((u_int32_t) + ieee80211_r_map[i].rm_domain_2ghz); + if (mhz >= IEEE80211_CHANNELS_5GHZ_MIN && mhz <= IEEE80211_CHANNELS_5GHZ_MAX) - return((u_int32_t)ieee80211_r_map[i].rm_domain_5ghz); + return ((u_int32_t) + ieee80211_r_map[i].rm_domain_5ghz); } } - return((u_int32_t)DMN_DEBUG); + return ((u_int32_t)DMN_DEBUG); } u_int32_t @@ -180,5 +187,5 @@ ieee80211_countrycode2regdomain(u_int16_t code) if (ieee80211_r_ctry[i].cn_code == code) return (ieee80211_r_ctry[i].cn_domain); - return((u_int32_t)DMN_DEFAULT); + return ((u_int32_t)DMN_DEFAULT); } diff --git a/sys/net80211/ieee80211_rssadapt.c b/sys/net80211/ieee80211_rssadapt.c index e264e62d137..bccf443d9ca 100644 --- a/sys/net80211/ieee80211_rssadapt.c +++ b/sys/net80211/ieee80211_rssadapt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_rssadapt.c,v 1.3 2005/09/08 12:44:55 jsg Exp $ */ +/* $OpenBSD: ieee80211_rssadapt.c,v 1.4 2005/09/08 13:24:53 reyk Exp $ */ /* $NetBSD: ieee80211_rssadapt.c,v 1.7 2004/05/25 04:33:59 dyoung Exp $ */ /*- @@ -51,9 +51,9 @@ #ifdef interpolate #undef interpolate #endif -#define interpolate(parm, old, new) ((parm##_old * (old) + \ - (parm##_denom - parm##_old) * (new)) / \ - parm##_denom) +#define interpolate(parm, old, new) \ + ((parm##_old * (old) + \ + (parm##_denom - parm##_old) * (new)) / parm##_denom) #ifdef IEEE80211_DEBUG static struct timeval lastrateadapt; /* time of last rate adaptation msg */ @@ -163,7 +163,7 @@ ieee80211_rssadapt_input(struct ieee80211com *ic, struct ieee80211_node *ni, #endif ra->ra_avg_rssi = interpolate(master_expavgctl.rc_avgrssi, - ra->ra_avg_rssi, (rssi << 8)); + ra->ra_avg_rssi, (rssi << 8)); RSSADAPT_PRINTF(("%s: src %s rssi %d avg %d -> %d\n", ic->ic_if.if_xname, ether_sprintf(ni->ni_macaddr), @@ -191,7 +191,7 @@ ieee80211_rssadapt_lower_rate(struct ieee80211com *ic, RSSADAPT_PRINTF(("ieee80211_rssadapt_lower_rate: " "%s rate #%d > #%d out of bounds\n", ether_sprintf(ni->ni_macaddr), id->id_rateidx, - rs->rs_nrates - 1)); + rs->rs_nrates - 1)); return; } @@ -206,7 +206,7 @@ ieee80211_rssadapt_lower_rate(struct ieee80211com *ic, last_thr = ra->ra_rate_thresh[thridx][id->id_rateidx]; ra->ra_rate_thresh[thridx][id->id_rateidx] = interpolate(master_expavgctl.rc_thresh, last_thr, - (id->id_rssi << 8)); + (id->id_rssi << 8)); RSSADAPT_PRINTF(("%s: dst %s rssi %d threshold[%d, %d.%d] %d -> %d\n", ic->ic_if.if_xname, ether_sprintf(ni->ni_macaddr), @@ -265,7 +265,8 @@ ieee80211_rssadapt_raise_rate(struct ieee80211com *ic, printf("%s: dst %s thresholds\n", ic->ic_if.if_xname, ether_sprintf(ni->ni_macaddr)); for (i = 0; i < IEEE80211_RSSADAPT_BKTS; i++) { - printf("%d-byte", IEEE80211_RSSADAPT_BKT0 << (IEEE80211_RSSADAPT_BKTPOWER * i)); + printf("%d-byte", IEEE80211_RSSADAPT_BKT0 << + (IEEE80211_RSSADAPT_BKTPOWER * i)); for (j = 0; j < rs->rs_nrates; j++) { rate = (rs->rs_rates[j] & IEEE80211_RATE_VAL); printf(", T[%d.%d] = %d", rate / 2, diff --git a/sys/net80211/ieee80211_rssadapt.h b/sys/net80211/ieee80211_rssadapt.h index 37816630557..21f4bc61776 100644 --- a/sys/net80211/ieee80211_rssadapt.h +++ b/sys/net80211/ieee80211_rssadapt.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_rssadapt.h,v 1.1 2004/06/22 22:53:52 millert Exp $ */ +/* $OpenBSD: ieee80211_rssadapt.h,v 1.2 2005/09/08 13:24:53 reyk Exp $ */ /* $NetBSD: ieee80211_rssadapt.h,v 1.3 2004/05/06 03:03:20 dyoung Exp $ */ /*- @@ -71,7 +71,7 @@ struct ieee80211_rssadapt { u_int32_t ra_pktrate; /* RSSI threshold for each Tx rate */ u_int16_t ra_rate_thresh[IEEE80211_RSSADAPT_BKTS] - [IEEE80211_RATE_SIZE]; + [IEEE80211_RATE_SIZE]; struct timeval ra_last_raise; struct timeval ra_raise_interval; }; diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h index b86198bb7af..ba58778e531 100644 --- a/sys/net80211/ieee80211_var.h +++ b/sys/net80211/ieee80211_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_var.h,v 1.10 2005/09/07 05:40:11 jsg Exp $ */ +/* $OpenBSD: ieee80211_var.h,v 1.11 2005/09/08 13:24:53 reyk Exp $ */ /* $NetBSD: ieee80211_var.h,v 1.7 2004/05/06 03:07:10 dyoung Exp $ */ /*- @@ -77,7 +77,7 @@ enum ieee80211_phymode { enum ieee80211_opmode { IEEE80211_M_STA = 1, /* infrastructure station */ - IEEE80211_M_IBSS = 0, /* IBSS (adhoc) station */ + IEEE80211_M_IBSS = 0, /* IBSS (adhoc) station */ IEEE80211_M_AHDEMO = 3, /* Old lucent compatible adhoc demo */ IEEE80211_M_HOSTAP = 6, /* Software Access Point */ IEEE80211_M_MONITOR = 8 /* Monitor mode */ |