Deleted Added
full compact
ifieee80211.c (178354) ifieee80211.c (179958)
1/*
2 * Copyright 2001 The Aerospace Corporation. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 10 unchanged lines hidden (view full) ---

19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
1/*
2 * Copyright 2001 The Aerospace Corporation. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 10 unchanged lines hidden (view full) ---

19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
27 * $FreeBSD: head/sbin/ifconfig/ifieee80211.c 178354 2008-04-20 20:35:46Z sam $
27 * $FreeBSD: head/sbin/ifconfig/ifieee80211.c 179958 2008-06-23 16:08:40Z thompsa $
28 */
29
30/*-
31 * Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc.
32 * All rights reserved.
33 *
34 * This code is derived from software contributed to The NetBSD Foundation
35 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,

--- 625 unchanged lines hidden (view full) ---

661static void
662set80211channel(const char *val, int d, int s, const struct afswtch *rafp)
663{
664 struct ieee80211_channel chan;
665
666 memset(&chan, 0, sizeof(chan));
667 if (!isanyarg(val)) {
668 int v, flags;
28 */
29
30/*-
31 * Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc.
32 * All rights reserved.
33 *
34 * This code is derived from software contributed to The NetBSD Foundation
35 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,

--- 625 unchanged lines hidden (view full) ---

661static void
662set80211channel(const char *val, int d, int s, const struct afswtch *rafp)
663{
664 struct ieee80211_channel chan;
665
666 memset(&chan, 0, sizeof(chan));
667 if (!isanyarg(val)) {
668 int v, flags;
669 char *ep;
669
670 getchaninfo(s);
670
671 getchaninfo(s);
671 v = atoi(val);
672 v = strtol(val, &ep, 10);
673 if (val[0] == '\0' || ep[0] != '\0' || errno == ERANGE)
674 errx(1, "invalid channel number");
672 flags = getchannelflags(val, v);
673 if (v > 255) { /* treat as frequency */
674 mapfreq(&chan, v, flags);
675 } else {
676 mapchan(&chan, v, flags);
677 }
678 } else {
679 chan.ic_freq = IEEE80211_CHAN_ANY;

--- 3847 unchanged lines hidden ---
675 flags = getchannelflags(val, v);
676 if (v > 255) { /* treat as frequency */
677 mapfreq(&chan, v, flags);
678 } else {
679 mapchan(&chan, v, flags);
680 }
681 } else {
682 chan.ic_freq = IEEE80211_CHAN_ANY;

--- 3847 unchanged lines hidden ---