2 * hostapd / IEEE 802.11 MLME
3 * Copyright 2003-2006, Jouni Malinen <j@w1.fi>
4 * Copyright 2003-2004, Instant802 Networks, Inc.
5 * Copyright 2005-2006, Devicescape Software, Inc.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
11 * Alternatively, this software may be distributed under the terms of BSD
14 * See README and COPYING for more details.
20 #include "ieee802_11.h"
26 static const char * mlme_auth_alg_str(int alg
)
31 case WLAN_AUTH_SHARED_KEY
:
40 * mlme_authenticate_indication - Report the establishment of an authentication
41 * relationship with a specific peer MAC entity
45 * MLME calls this function as a result of the establishment of an
46 * authentication relationship with a specific peer MAC entity that
47 * resulted from an authentication procedure that was initiated by
48 * that specific peer MAC entity.
50 * PeerSTAAddress = sta->addr
51 * AuthenticationType = sta->auth_alg (WLAN_AUTH_OPEN / WLAN_AUTH_SHARED_KEY)
53 void mlme_authenticate_indication(struct hostapd_data
*hapd
,
56 hostapd_logger(hapd
, sta
->addr
, HOSTAPD_MODULE_MLME
,
58 "MLME-AUTHENTICATE.indication(" MACSTR
", %s)",
59 MAC2STR(sta
->addr
), mlme_auth_alg_str(sta
->auth_alg
));
60 mlme_deletekeys_request(hapd
, sta
);
65 * mlme_deauthenticate_indication - Report the invalidation of an
66 * authentication relationship with a specific peer MAC entity
69 * @reason_code: ReasonCode from Deauthentication frame
71 * MLME calls this function as a result of the invalidation of an
72 * authentication relationship with a specific peer MAC entity.
74 * PeerSTAAddress = sta->addr
76 void mlme_deauthenticate_indication(struct hostapd_data
*hapd
,
77 struct sta_info
*sta
, u16 reason_code
)
79 hostapd_logger(hapd
, sta
->addr
, HOSTAPD_MODULE_MLME
,
81 "MLME-DEAUTHENTICATE.indication(" MACSTR
", %d)",
82 MAC2STR(sta
->addr
), reason_code
);
83 mlme_deletekeys_request(hapd
, sta
);
88 * mlme_associate_indication - Report the establishment of an association with
89 * a specific peer MAC entity
93 * MLME calls this function as a result of the establishment of an
94 * association with a specific peer MAC entity that resulted from an
95 * association procedure that was initiated by that specific peer MAC entity.
97 * PeerSTAAddress = sta->addr
99 void mlme_associate_indication(struct hostapd_data
*hapd
, struct sta_info
*sta
)
101 hostapd_logger(hapd
, sta
->addr
, HOSTAPD_MODULE_MLME
,
103 "MLME-ASSOCIATE.indication(" MACSTR
")",
105 mlme_deletekeys_request(hapd
, sta
);
110 * mlme_reassociate_indication - Report the establishment of an reassociation
111 * with a specific peer MAC entity
113 * @sta: peer STA data
115 * MLME calls this function as a result of the establishment of an
116 * reassociation with a specific peer MAC entity that resulted from a
117 * reassociation procedure that was initiated by that specific peer MAC entity.
119 * PeerSTAAddress = sta->addr
121 * sta->previous_ap contains the "Current AP" information from ReassocReq.
123 void mlme_reassociate_indication(struct hostapd_data
*hapd
,
124 struct sta_info
*sta
)
126 hostapd_logger(hapd
, sta
->addr
, HOSTAPD_MODULE_MLME
,
128 "MLME-REASSOCIATE.indication(" MACSTR
")",
130 mlme_deletekeys_request(hapd
, sta
);
135 * mlme_disassociate_indication - Report disassociation with a specific peer
138 * @sta: Peer STA data
139 * @reason_code: ReasonCode from Disassociation frame
141 * MLME calls this function as a result of the invalidation of an association
142 * relationship with a specific peer MAC entity.
144 * PeerSTAAddress = sta->addr
146 void mlme_disassociate_indication(struct hostapd_data
*hapd
,
147 struct sta_info
*sta
, u16 reason_code
)
149 hostapd_logger(hapd
, sta
->addr
, HOSTAPD_MODULE_MLME
,
151 "MLME-DISASSOCIATE.indication(" MACSTR
", %d)",
152 MAC2STR(sta
->addr
), reason_code
);
153 mlme_deletekeys_request(hapd
, sta
);
157 void mlme_michaelmicfailure_indication(struct hostapd_data
*hapd
,
160 hostapd_logger(hapd
, addr
, HOSTAPD_MODULE_MLME
,
162 "MLME-MichaelMICFailure.indication(" MACSTR
")",
167 void mlme_deletekeys_request(struct hostapd_data
*hapd
, struct sta_info
*sta
)
169 hostapd_logger(hapd
, sta
->addr
, HOSTAPD_MODULE_MLME
,
171 "MLME-DELETEKEYS.request(" MACSTR
")",
175 wpa_remove_ptk(sta
->wpa_sm
);