Deleted Added
full compact
ieee80211_sta.c (241138) ieee80211_sta.c (244060)
1/*-
2 * Copyright (c) 2007-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

--- 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-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

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

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

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

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

58
59#include <net80211/ieee80211_var.h>
60#include <net80211/ieee80211_sta.h>
61#include <net80211/ieee80211_input.h>
62#ifdef IEEE80211_SUPPORT_SUPERG
63#include <net80211/ieee80211_superg.h>
64#endif
65#include <net80211/ieee80211_ratectl.h>
66#include <net80211/ieee80211_sta.h>
66
67#define IEEE80211_RATE2MBS(r) (((r) & IEEE80211_RATE_VAL) / 2)
68
69static void sta_vattach(struct ieee80211vap *);
70static void sta_beacon_miss(struct ieee80211vap *);
71static int sta_newstate(struct ieee80211vap *, enum ieee80211_state, int);
72static int sta_input(struct ieee80211_node *, struct mbuf *, int, int);
73static void sta_recv_mgmt(struct ieee80211_node *, struct mbuf *,

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

1081 * using the mgt frame timeout to trigger the
1082 * state transition.
1083 */
1084 if (vap->iv_state == IEEE80211_S_AUTH)
1085 ieee80211_new_state(vap, IEEE80211_S_SCAN,
1086 IEEE80211_SCAN_FAIL_STATUS);
1087}
1088
67
68#define IEEE80211_RATE2MBS(r) (((r) & IEEE80211_RATE_VAL) / 2)
69
70static void sta_vattach(struct ieee80211vap *);
71static void sta_beacon_miss(struct ieee80211vap *);
72static int sta_newstate(struct ieee80211vap *, enum ieee80211_state, int);
73static int sta_input(struct ieee80211_node *, struct mbuf *, int, int);
74static void sta_recv_mgmt(struct ieee80211_node *, struct mbuf *,

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

1082 * using the mgt frame timeout to trigger the
1083 * state transition.
1084 */
1085 if (vap->iv_state == IEEE80211_S_AUTH)
1086 ieee80211_new_state(vap, IEEE80211_S_SCAN,
1087 IEEE80211_SCAN_FAIL_STATUS);
1088}
1089
1089static int
1090int
1090ieee80211_parse_wmeparams(struct ieee80211vap *vap, uint8_t *frm,
1091 const struct ieee80211_frame *wh)
1092{
1093#define MS(_v, _f) (((_v) & _f) >> _f##_S)
1094 struct ieee80211_wme_state *wme = &vap->iv_ic->ic_wme;
1095 u_int len = frm[1], qosinfo;
1096 int i;
1097

--- 706 unchanged lines hidden ---
1091ieee80211_parse_wmeparams(struct ieee80211vap *vap, uint8_t *frm,
1092 const struct ieee80211_frame *wh)
1093{
1094#define MS(_v, _f) (((_v) & _f) >> _f##_S)
1095 struct ieee80211_wme_state *wme = &vap->iv_ic->ic_wme;
1096 u_int len = frm[1], qosinfo;
1097 int i;
1098

--- 706 unchanged lines hidden ---