diff options
author | sam <sam@FreeBSD.org> | 2006-12-01 17:58:33 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2006-12-01 17:58:33 +0000 |
commit | b49de5db1b4d4480a6cae31b21e80f67fb5efc7a (patch) | |
tree | c3d2cdb88fec7bb0b8716093d7b8e07735ffc38c /sys/net80211 | |
parent | a46bddd7e4f844c71a433fcb1fae69dc31ff1b79 (diff) | |
download | FreeBSD-src-b49de5db1b4d4480a6cae31b21e80f67fb5efc7a.zip FreeBSD-src-b49de5db1b4d4480a6cae31b21e80f67fb5efc7a.tar.gz |
back out use of LLC_SNAPFRAMELEN now that sizeof(struct llc) isn't
padded on arm
Diffstat (limited to 'sys/net80211')
-rw-r--r-- | sys/net80211/ieee80211_input.c | 2 | ||||
-rw-r--r-- | sys/net80211/ieee80211_output.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index dc52797..511e6e1 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -746,7 +746,7 @@ ieee80211_decap(struct ieee80211com *ic, struct mbuf *m, int hdrlen) if (llc->llc_dsap == LLC_SNAP_LSAP && llc->llc_ssap == LLC_SNAP_LSAP && llc->llc_control == LLC_UI && llc->llc_snap.org_code[0] == 0 && llc->llc_snap.org_code[1] == 0 && llc->llc_snap.org_code[2] == 0) { - m_adj(m, hdrlen + LLC_SNAPFRAMELEN - sizeof(*eh)); + m_adj(m, hdrlen + sizeof(struct llc) - sizeof(*eh)); llc = NULL; } else { m_adj(m, hdrlen - sizeof(*eh)); diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index 6d07346..76101be 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -500,7 +500,7 @@ static struct mbuf * ieee80211_mbuf_adjust(struct ieee80211com *ic, int hdrsize, struct ieee80211_key *key, struct mbuf *m) { -#define TO_BE_RECLAIMED (sizeof(struct ether_header) - LLC_SNAPFRAMELEN) +#define TO_BE_RECLAIMED (sizeof(struct ether_header) - sizeof(struct llc)) int needed_space = hdrsize; if (key != NULL) { @@ -527,7 +527,7 @@ ieee80211_mbuf_adjust(struct ieee80211com *ic, int hdrsize, * We know we are called just before stripping an Ethernet * header and prepending an LLC header. This means we know * there will be - * sizeof(struct ether_header) - LLC_SNAPFRAMELEN + * sizeof(struct ether_header) - sizeof(struct llc) * bytes recovered to which we need additional space for the * 802.11 header and any crypto header. */ @@ -675,7 +675,7 @@ ieee80211_encap(struct ieee80211com *ic, struct mbuf *m, } /* NB: this could be optimized because of ieee80211_mbuf_adjust */ - m_adj(m, sizeof(struct ether_header) - LLC_SNAPFRAMELEN); + m_adj(m, sizeof(struct ether_header) - sizeof(struct llc)); llc = mtod(m, struct llc *); llc->llc_dsap = llc->llc_ssap = LLC_SNAP_LSAP; llc->llc_control = LLC_UI; |