summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2008-09-03 19:53:38 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2008-09-03 19:53:38 +0000
commitc0f37b1a30e7432b9171c654b15c52f080c662bc (patch)
tree7969fbd515873529929869d703f7ca764da638c8
parent984b5384dcc90aa164fa19cd817fa117c0ebb2f4 (diff)
third parameter of ieee80211_get_assoc_req() is a management frame
subtype, not a boolean indicating assoc or reassoc. rename the parameter and use if (type == IEEE80211_FC0_SUBTYPE_REASSOC_REQ) instead of if (reassoc). it worked only because IEEE80211_FC0_SUBTYPE_ASSOC_REQ is equal to 0.
-rw-r--r--sys/net80211/ieee80211_output.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c
index 4ac87deb5a2..7accd434342 100644
--- a/sys/net80211/ieee80211_output.c
+++ b/sys/net80211/ieee80211_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_output.c,v 1.76 2008/09/01 19:55:21 damien Exp $ */
+/* $OpenBSD: ieee80211_output.c,v 1.77 2008/09/03 19:53:37 damien Exp $ */
/* $NetBSD: ieee80211_output.c,v 1.13 2004/05/31 11:02:55 dyoung Exp $ */
/*-
@@ -1196,7 +1196,7 @@ ieee80211_get_deauth(struct ieee80211com *ic, struct ieee80211_node *ni,
*/
struct mbuf *
ieee80211_get_assoc_req(struct ieee80211com *ic, struct ieee80211_node *ni,
- int reassoc)
+ int type)
{
const struct ieee80211_rateset *rs = &ni->ni_rates;
struct mbuf *m;
@@ -1205,7 +1205,7 @@ ieee80211_get_assoc_req(struct ieee80211com *ic, struct ieee80211_node *ni,
m = ieee80211_getmgmt(M_DONTWAIT, MT_DATA,
2 + 2 +
- ((reassoc == IEEE80211_FC0_SUBTYPE_REASSOC_REQ) ?
+ ((type == IEEE80211_FC0_SUBTYPE_REASSOC_REQ) ?
IEEE80211_ADDR_LEN : 0) +
2 + ni->ni_esslen +
2 + min(rs->rs_nrates, IEEE80211_RATE_SIZE) +
@@ -1233,7 +1233,7 @@ ieee80211_get_assoc_req(struct ieee80211com *ic, struct ieee80211_node *ni,
capinfo |= IEEE80211_CAPINFO_SHORT_SLOTTIME;
LE_WRITE_2(frm, capinfo); frm += 2;
LE_WRITE_2(frm, ic->ic_lintval); frm += 2;
- if (reassoc) {
+ if (type == IEEE80211_FC0_SUBTYPE_REASSOC_REQ) {
IEEE80211_ADDR_COPY(frm, ic->ic_bss->ni_bssid);
frm += IEEE80211_ADDR_LEN;
}