ieee80211_regdomain.c (187635) | ieee80211_regdomain.c (187800) |
---|---|
1/*- 2 * Copyright (c) 2005-2008 Sam Leffler, Errno Consulting 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 10 unchanged lines hidden (view full) --- 19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 */ 25 26#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2005-2008 Sam Leffler, Errno Consulting 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 10 unchanged lines hidden (view full) --- 19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 */ 25 26#include <sys/cdefs.h> |
27__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_regdomain.c 187635 2009-01-23 18:16:14Z sam $"); | 27__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_regdomain.c 187800 2009-01-27 23:19:36Z sam $"); |
28 29/* 30 * IEEE 802.11 regdomain support. 31 */ 32#include "opt_wlan.h" 33 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/kernel.h> 37 38#include <sys/socket.h> 39 40#include <net/if.h> 41#include <net/if_media.h> 42 43#include <net80211/ieee80211_var.h> 44#include <net80211/ieee80211_regdomain.h> 45 46static void | 28 29/* 30 * IEEE 802.11 regdomain support. 31 */ 32#include "opt_wlan.h" 33 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/kernel.h> 37 38#include <sys/socket.h> 39 40#include <net/if.h> 41#include <net/if_media.h> 42 43#include <net80211/ieee80211_var.h> 44#include <net80211/ieee80211_regdomain.h> 45 46static void |
47null_getradiocaps(struct ieee80211com *ic, int *n, struct ieee80211_channel *c) | 47null_getradiocaps(struct ieee80211com *ic, int maxchan, 48 int *n, struct ieee80211_channel *c) |
48{ 49 /* just feed back the current channel list */ | 49{ 50 /* just feed back the current channel list */ |
50 *n = ic->ic_nchans; 51 memcpy(c, ic->ic_channels, 52 ic->ic_nchans*sizeof(struct ieee80211_channel)); | 51 *n = ic->ic_nchans; /* XXX return count copied? */ 52 if (maxchan > ic->ic_nchans) 53 maxchan = ic->ic_nchans; 54 memcpy(c, ic->ic_channels, maxchan*sizeof(struct ieee80211_channel)); |
53} 54 55static int 56null_setregdomain(struct ieee80211com *ic, 57 struct ieee80211_regdomain *rd, 58 int nchans, struct ieee80211_channel chans[]) 59{ 60 return 0; /* accept anything */ --- 375 unchanged lines hidden --- | 55} 56 57static int 58null_setregdomain(struct ieee80211com *ic, 59 struct ieee80211_regdomain *rd, 60 int nchans, struct ieee80211_channel chans[]) 61{ 62 return 0; /* accept anything */ --- 375 unchanged lines hidden --- |