ieee80211_ioctl.c (264901) | ieee80211_ioctl.c (264991) |
---|---|
1/*- 2 * Copyright (c) 2001 Atsushi Onoe 3 * Copyright (c) 2002-2009 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: --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2001 Atsushi Onoe 3 * Copyright (c) 2002-2009 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: --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_ioctl.c 264901 2014-04-24 23:12:40Z adrian $"); | 28__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_ioctl.c 264991 2014-04-26 23:22:49Z ian $"); |
29 30/* 31 * IEEE 802.11 ioctl support (FreeBSD-specific) 32 */ 33 34#include "opt_inet.h" 35#include "opt_wlan.h" 36 --- 560 unchanged lines hidden (view full) --- 597 598 if (ireq->i_len != sizeof(struct ieee80211_channel)) 599 return EINVAL; 600 /* 601 * vap's may have different operating channels when HT is 602 * in use. When in RUN state report the vap-specific channel. 603 * Otherwise return curchan. 604 */ | 29 30/* 31 * IEEE 802.11 ioctl support (FreeBSD-specific) 32 */ 33 34#include "opt_inet.h" 35#include "opt_wlan.h" 36 --- 560 unchanged lines hidden (view full) --- 597 598 if (ireq->i_len != sizeof(struct ieee80211_channel)) 599 return EINVAL; 600 /* 601 * vap's may have different operating channels when HT is 602 * in use. When in RUN state report the vap-specific channel. 603 * Otherwise return curchan. 604 */ |
605 if (vap->iv_state == IEEE80211_S_RUN | vap->iv_state == IEEE80211_S_SLEEP) | 605 if (vap->iv_state == IEEE80211_S_RUN || vap->iv_state == IEEE80211_S_SLEEP) |
606 c = vap->iv_bss->ni_chan; 607 else 608 c = ic->ic_curchan; 609 return copyout(c, ireq->i_data, sizeof(*c)); 610} 611 612static int 613getappie(const struct ieee80211_appie *aie, struct ieee80211req *ireq) --- 2825 unchanged lines hidden --- | 606 c = vap->iv_bss->ni_chan; 607 else 608 c = ic->ic_curchan; 609 return copyout(c, ireq->i_data, sizeof(*c)); 610} 611 612static int 613getappie(const struct ieee80211_appie *aie, struct ieee80211req *ireq) --- 2825 unchanged lines hidden --- |