From be5359fb8513a3fbdcc529d54064023a77bc0475 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Mon, 24 Jun 2002 07:50:41 +0000 Subject: On REASREQ packets, handled them earlier in processing the association request. We need to eat the MAC address of the packet before we go looking at the SSID and such. Doing do is sufficient to make Cisco cards assocaite with prism II cards. The submitter says that Linux does the same thing. Submitted by: jhay --- sys/dev/wi/wi_hostap.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'sys') diff --git a/sys/dev/wi/wi_hostap.c b/sys/dev/wi/wi_hostap.c index 905e991e2070..7c6633e1fbe3 100644 --- a/sys/dev/wi/wi_hostap.c +++ b/sys/dev/wi/wi_hostap.c @@ -693,6 +693,17 @@ wihap_assoc_req(struct wi_softc *sc, struct wi_frame *rxfrm, /* Pull out request parameters. */ capinfo = take_hword(&pkt, &len); lstintvl = take_hword(&pkt, &len); + + if ((rxfrm->wi_frame_ctl & htole16(WI_FCTL_STYPE)) == + htole16(WI_STYPE_MGMT_REASREQ)) { + if (len < 6) + return; + /* Eat the MAC address of the current AP */ + take_hword(&pkt, &len); + take_hword(&pkt, &len); + take_hword(&pkt, &len); + } + if ((ssid_len = take_tlv(&pkt, &len, IEEE80211_ELEMID_SSID, ssid, sizeof(ssid) - 1))<0) return; @@ -701,13 +712,6 @@ wihap_assoc_req(struct wi_softc *sc, struct wi_frame *rxfrm, rates, sizeof(rates)))<0) return; - if ((rxfrm->wi_frame_ctl & htole16(WI_FCTL_STYPE)) == - htole16(WI_STYPE_MGMT_REASREQ)) { - /* Reassociation Request-- * Current AP. (Ignore?) */ - if (len < 6) - return; - } - if (sc->arpcom.ac_if.if_flags & IFF_DEBUG) printf("wihap_assoc_req: from station %6D\n", rxfrm->wi_addr2, ":"); -- cgit v1.3