ieee80211.c (165574) | ieee80211.c (165825) |
---|---|
1/*- 2 * Copyright (c) 2001 Atsushi Onoe 3 * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 17 unchanged lines hidden (view full) --- 26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2001 Atsushi Onoe 3 * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 17 unchanged lines hidden (view full) --- 26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: head/sys/net80211/ieee80211.c 165574 2006-12-28 01:31:26Z sam $"); | 34__FBSDID("$FreeBSD: head/sys/net80211/ieee80211.c 165825 2007-01-06 05:38:18Z mjacob $"); |
35 36/* 37 * IEEE 802.11 generic handler 38 */ 39 40#include <sys/param.h> 41#include <sys/systm.h> 42#include <sys/kernel.h> --- 273 unchanged lines hidden (view full) --- 316 return (freq - 5000) / 5; 317 } 318} 319 320/* 321 * Convert channel to IEEE channel number. 322 */ 323int | 35 36/* 37 * IEEE 802.11 generic handler 38 */ 39 40#include <sys/param.h> 41#include <sys/systm.h> 42#include <sys/kernel.h> --- 273 unchanged lines hidden (view full) --- 316 return (freq - 5000) / 5; 317 } 318} 319 320/* 321 * Convert channel to IEEE channel number. 322 */ 323int |
324ieee80211_chan2ieee(struct ieee80211com *ic, struct ieee80211_channel *c) | 324ieee80211_chan2ieee(struct ieee80211com *ic, const struct ieee80211_channel *c) |
325{ 326 if (ic->ic_channels <= c && c <= &ic->ic_channels[IEEE80211_CHAN_MAX]) 327 return c - ic->ic_channels; 328 else if (c == IEEE80211_CHAN_ANYC) 329 return IEEE80211_CHAN_ANY; 330 else if (c != NULL) { 331 if_printf(ic->ic_ifp, "invalid channel freq %u flags %x\n", 332 c->ic_freq, c->ic_flags); --- 787 unchanged lines hidden --- | 325{ 326 if (ic->ic_channels <= c && c <= &ic->ic_channels[IEEE80211_CHAN_MAX]) 327 return c - ic->ic_channels; 328 else if (c == IEEE80211_CHAN_ANYC) 329 return IEEE80211_CHAN_ANY; 330 else if (c != NULL) { 331 if_printf(ic->ic_ifp, "invalid channel freq %u flags %x\n", 332 c->ic_freq, c->ic_flags); --- 787 unchanged lines hidden --- |