summaryrefslogtreecommitdiff
path: root/sys/net80211
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2008-08-15 08:15:28 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2008-08-15 08:15:28 +0000
commit8a34f1107b9cb68b973cb9616f98b5c7c2b459e7 (patch)
treef6b18843c42642e74a2da665661d47100d95f998 /sys/net80211
parent2eda1337ba22cdf0842d21329706bd7e24a410b4 (diff)
use LLC_SNAPFRAMELEN here too.
Diffstat (limited to 'sys/net80211')
-rw-r--r--sys/net80211/ieee80211_output.c8
-rw-r--r--sys/net80211/ieee80211_pae_output.c6
2 files changed, 7 insertions, 7 deletions
diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c
index 60c2ed4de77..46f873a6156 100644
--- a/sys/net80211/ieee80211_output.c
+++ b/sys/net80211/ieee80211_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_output.c,v 1.70 2008/08/12 19:56:59 damien Exp $ */
+/* $OpenBSD: ieee80211_output.c,v 1.71 2008/08/15 08:15:27 damien Exp $ */
/* $NetBSD: ieee80211_output.c,v 1.13 2004/05/31 11:02:55 dyoung Exp $ */
/*-
@@ -547,7 +547,7 @@ ieee80211_encap(struct ifnet *ifp, struct mbuf *m, struct ieee80211_node **pni)
hdrlen = sizeof(struct ieee80211_frame);
addqos = 0;
}
- m_adj(m, sizeof(struct ether_header) - sizeof(struct llc));
+ m_adj(m, sizeof(struct ether_header) - LLC_SNAPFRAMELEN);
llc = mtod(m, struct llc *);
llc->llc_dsap = llc->llc_ssap = LLC_SNAP_LSAP;
llc->llc_control = LLC_UI;
@@ -1181,7 +1181,7 @@ ieee80211_get_assoc_req(struct ieee80211com *ic, struct ieee80211_node *ni,
u_int16_t capinfo;
m = ieee80211_getmgmt(M_DONTWAIT, MT_DATA,
- 2 + 2 +
+ 2 + 2 +
((reassoc == IEEE80211_FC0_SUBTYPE_REASSOC_REQ) ?
IEEE80211_ADDR_LEN : 0) +
2 + ni->ni_esslen +
@@ -1251,7 +1251,7 @@ ieee80211_get_assoc_resp(struct ieee80211com *ic, struct ieee80211_node *ni,
u_int8_t *frm;
m = ieee80211_getmgmt(M_DONTWAIT, MT_DATA,
- 2 + 2 + 2 +
+ 2 + 2 + 2 +
2 + min(rs->rs_nrates, IEEE80211_RATE_SIZE) +
((rs->rs_nrates > IEEE80211_RATE_SIZE) ?
2 + rs->rs_nrates - IEEE80211_RATE_SIZE : 0) +
diff --git a/sys/net80211/ieee80211_pae_output.c b/sys/net80211/ieee80211_pae_output.c
index 6d307870996..20610e5a186 100644
--- a/sys/net80211/ieee80211_pae_output.c
+++ b/sys/net80211/ieee80211_pae_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_pae_output.c,v 1.11 2008/08/12 19:51:19 damien Exp $ */
+/* $OpenBSD: ieee80211_pae_output.c,v 1.12 2008/08/15 08:15:27 damien Exp $ */
/*-
* Copyright (c) 2007,2008 Damien Bergamini <damien.bergamini@free.fr>
@@ -235,7 +235,7 @@ ieee80211_get_eapol_key(int flags, int type, u_int pktlen)
struct mbuf *m;
/* reserve space for 802.11 encapsulation and EAPOL-Key header */
- pktlen += sizeof(struct ieee80211_frame) + sizeof(struct llc) +
+ pktlen += sizeof(struct ieee80211_frame) + LLC_SNAPFRAMELEN +
sizeof(struct ieee80211_eapol_key);
if (pktlen > MCLBYTES)
@@ -248,7 +248,7 @@ ieee80211_get_eapol_key(int flags, int type, u_int pktlen)
if (!(m->m_flags & M_EXT))
return m_free(m);
}
- m->m_data += sizeof(struct ieee80211_frame) + sizeof(struct llc);
+ m->m_data += sizeof(struct ieee80211_frame) + LLC_SNAPFRAMELEN;
return m;
}