Deleted Added
full compact
ieee80211_adhoc.c (241138) ieee80211_adhoc.c (244060)
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 241138 2012-10-02 17:45:19Z adrian $");
28__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_adhoc.c 244060 2012-12-09 22:56:29Z adrian $");
29#endif
30
31/*
32 * IEEE 802.11 IBSS mode support.
33 */
34#include "opt_inet.h"
35#include "opt_wlan.h"
36

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

58#include <net80211/ieee80211_adhoc.h>
59#include <net80211/ieee80211_input.h>
60#ifdef IEEE80211_SUPPORT_SUPERG
61#include <net80211/ieee80211_superg.h>
62#endif
63#ifdef IEEE80211_SUPPORT_TDMA
64#include <net80211/ieee80211_tdma.h>
65#endif
29#endif
30
31/*
32 * IEEE 802.11 IBSS mode support.
33 */
34#include "opt_inet.h"
35#include "opt_wlan.h"
36

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

58#include <net80211/ieee80211_adhoc.h>
59#include <net80211/ieee80211_input.h>
60#ifdef IEEE80211_SUPPORT_SUPERG
61#include <net80211/ieee80211_superg.h>
62#endif
63#ifdef IEEE80211_SUPPORT_TDMA
64#include <net80211/ieee80211_tdma.h>
65#endif
66#include <net80211/ieee80211_sta.h>
66
67#define IEEE80211_RATE2MBS(r) (((r) & IEEE80211_RATE_VAL) / 2)
68
69static void adhoc_vattach(struct ieee80211vap *);
70static int adhoc_newstate(struct ieee80211vap *, enum ieee80211_state, int);
71static int adhoc_input(struct ieee80211_node *, struct mbuf *, int, int);
72static void adhoc_recv_mgmt(struct ieee80211_node *, struct mbuf *,
73 int subtype, int, int);

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

740 ieee80211_init_neighbor(ni, wh, &scan);
741 } else {
742 /*
743 * Record tsf for potential resync.
744 */
745 memcpy(ni->ni_tstamp.data, scan.tstamp,
746 sizeof(ni->ni_tstamp));
747 }
67
68#define IEEE80211_RATE2MBS(r) (((r) & IEEE80211_RATE_VAL) / 2)
69
70static void adhoc_vattach(struct ieee80211vap *);
71static int adhoc_newstate(struct ieee80211vap *, enum ieee80211_state, int);
72static int adhoc_input(struct ieee80211_node *, struct mbuf *, int, int);
73static void adhoc_recv_mgmt(struct ieee80211_node *, struct mbuf *,
74 int subtype, int, int);

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

741 ieee80211_init_neighbor(ni, wh, &scan);
742 } else {
743 /*
744 * Record tsf for potential resync.
745 */
746 memcpy(ni->ni_tstamp.data, scan.tstamp,
747 sizeof(ni->ni_tstamp));
748 }
749 if (scan.wme != NULL &&
750 (ni->ni_flags & IEEE80211_NODE_QOS) &&
751 ieee80211_parse_wmeparams(vap, scan.wme, wh) > 0) {
752 ieee80211_wme_updateparams(vap);
753 }
754#ifdef IEEE80211_SUPPORT_SUPERG
755 if (scan.ath != NULL) {
756 ieee80211_parse_athparams(ni, scan.ath, wh);
757 }
758#endif
748 if (ni != NULL) {
749 IEEE80211_RSSI_LPF(ni->ni_avgrssi, rssi);
750 ni->ni_noise = nf;
751 }
752 }
753 break;
754 }
755

--- 164 unchanged lines hidden ---
759 if (ni != NULL) {
760 IEEE80211_RSSI_LPF(ni->ni_avgrssi, rssi);
761 ni->ni_noise = nf;
762 }
763 }
764 break;
765 }
766

--- 164 unchanged lines hidden ---