Deleted Added
full compact
ieee80211_adhoc.c (218927) ieee80211_adhoc.c (218958)
1/*-
2 * Copyright (c) 2007-2009 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

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

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#ifdef __FreeBSD__
1/*-
2 * Copyright (c) 2007-2009 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

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

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#ifdef __FreeBSD__
28__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_adhoc.c 218927 2011-02-21 19:59:43Z bschmidt $");
28__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_adhoc.c 218958 2011-02-22 19:05:42Z bschmidt $");
29#endif
30
31/*
32 * IEEE 802.11 IBSS mode support.
33 */
34#include "opt_inet.h"
35#include "opt_wlan.h"
36

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

820 * the transmit side.
821 */
822 ieee80211_send_proberesp(vap, wh->i_addr2,
823 is11bclient(rates, xrates) ? IEEE80211_SEND_LEGACY_11B : 0);
824 break;
825
826 case IEEE80211_FC0_SUBTYPE_ACTION:
827 case IEEE80211_FC0_SUBTYPE_ACTION_NOACK:
29#endif
30
31/*
32 * IEEE 802.11 IBSS mode support.
33 */
34#include "opt_inet.h"
35#include "opt_wlan.h"
36

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

820 * the transmit side.
821 */
822 ieee80211_send_proberesp(vap, wh->i_addr2,
823 is11bclient(rates, xrates) ? IEEE80211_SEND_LEGACY_11B : 0);
824 break;
825
826 case IEEE80211_FC0_SUBTYPE_ACTION:
827 case IEEE80211_FC0_SUBTYPE_ACTION_NOACK:
828 if (vap->iv_state == IEEE80211_S_RUN) {
829 if (ieee80211_parse_action(ni, m0) == 0)
830 (void)ic->ic_recv_action(ni, wh, frm, efrm);
831 } else {
828 if (ni == vap->iv_bss) {
832 IEEE80211_DISCARD(vap, IEEE80211_MSG_INPUT,
829 IEEE80211_DISCARD(vap, IEEE80211_MSG_INPUT,
830 wh, NULL, "%s", "unknown node");
831 vap->iv_stats.is_rx_mgtdiscard++;
832 } else if (!IEEE80211_ADDR_EQ(vap->iv_myaddr, wh->i_addr1) &&
833 !IEEE80211_IS_MULTICAST(wh->i_addr1)) {
834 IEEE80211_DISCARD(vap, IEEE80211_MSG_INPUT,
835 wh, NULL, "%s", "not for us");
836 vap->iv_stats.is_rx_mgtdiscard++;
837 } else if (vap->iv_state != IEEE80211_S_RUN) {
838 IEEE80211_DISCARD(vap, IEEE80211_MSG_INPUT,
833 wh, NULL, "wrong state %s",
834 ieee80211_state_name[vap->iv_state]);
835 vap->iv_stats.is_rx_mgtdiscard++;
839 wh, NULL, "wrong state %s",
840 ieee80211_state_name[vap->iv_state]);
841 vap->iv_stats.is_rx_mgtdiscard++;
842 } else {
843 if (ieee80211_parse_action(ni, m0) == 0)
844 (void)ic->ic_recv_action(ni, wh, frm, efrm);
836 }
837 break;
838
839 case IEEE80211_FC0_SUBTYPE_ASSOC_REQ:
840 case IEEE80211_FC0_SUBTYPE_ASSOC_RESP:
841 case IEEE80211_FC0_SUBTYPE_REASSOC_REQ:
842 case IEEE80211_FC0_SUBTYPE_REASSOC_RESP:
843 case IEEE80211_FC0_SUBTYPE_ATIM:

--- 71 unchanged lines hidden ---
845 }
846 break;
847
848 case IEEE80211_FC0_SUBTYPE_ASSOC_REQ:
849 case IEEE80211_FC0_SUBTYPE_ASSOC_RESP:
850 case IEEE80211_FC0_SUBTYPE_REASSOC_REQ:
851 case IEEE80211_FC0_SUBTYPE_REASSOC_RESP:
852 case IEEE80211_FC0_SUBTYPE_ATIM:

--- 71 unchanged lines hidden ---