wnm_sta.c revision 1.1 1 1.1 christos /*
2 1.1 christos * wpa_supplicant - WNM
3 1.1 christos * Copyright (c) 2011-2012, Qualcomm Atheros, Inc.
4 1.1 christos *
5 1.1 christos * This software may be distributed under the terms of the BSD license.
6 1.1 christos * See README for more details.
7 1.1 christos */
8 1.1 christos
9 1.1 christos #include "utils/includes.h"
10 1.1 christos
11 1.1 christos #include "utils/common.h"
12 1.1 christos #include "common/ieee802_11_defs.h"
13 1.1 christos #include "rsn_supp/wpa.h"
14 1.1 christos #include "wpa_supplicant_i.h"
15 1.1 christos #include "driver_i.h"
16 1.1 christos #include "scan.h"
17 1.1 christos
18 1.1 christos #define MAX_TFS_IE_LEN 1024
19 1.1 christos
20 1.1 christos
21 1.1 christos /* get the TFS IE from driver */
22 1.1 christos static int ieee80211_11_get_tfs_ie(struct wpa_supplicant *wpa_s, u8 *buf,
23 1.1 christos u16 *buf_len, enum wnm_oper oper)
24 1.1 christos {
25 1.1 christos wpa_printf(MSG_DEBUG, "%s: TFS get operation %d", __func__, oper);
26 1.1 christos
27 1.1 christos return wpa_drv_wnm_oper(wpa_s, oper, wpa_s->bssid, buf, buf_len);
28 1.1 christos }
29 1.1 christos
30 1.1 christos
31 1.1 christos /* set the TFS IE to driver */
32 1.1 christos static int ieee80211_11_set_tfs_ie(struct wpa_supplicant *wpa_s,
33 1.1 christos const u8 *addr, u8 *buf, u16 *buf_len,
34 1.1 christos enum wnm_oper oper)
35 1.1 christos {
36 1.1 christos wpa_printf(MSG_DEBUG, "%s: TFS set operation %d", __func__, oper);
37 1.1 christos
38 1.1 christos return wpa_drv_wnm_oper(wpa_s, oper, addr, buf, buf_len);
39 1.1 christos }
40 1.1 christos
41 1.1 christos
42 1.1 christos /* MLME-SLEEPMODE.request */
43 1.1 christos int ieee802_11_send_wnmsleep_req(struct wpa_supplicant *wpa_s,
44 1.1 christos u8 action, u16 intval, struct wpabuf *tfs_req)
45 1.1 christos {
46 1.1 christos struct ieee80211_mgmt *mgmt;
47 1.1 christos int res;
48 1.1 christos size_t len;
49 1.1 christos struct wnm_sleep_element *wnmsleep_ie;
50 1.1 christos u8 *wnmtfs_ie;
51 1.1 christos u8 wnmsleep_ie_len;
52 1.1 christos u16 wnmtfs_ie_len; /* possibly multiple IE(s) */
53 1.1 christos enum wnm_oper tfs_oper = action == 0 ? WNM_SLEEP_TFS_REQ_IE_ADD :
54 1.1 christos WNM_SLEEP_TFS_REQ_IE_NONE;
55 1.1 christos
56 1.1 christos wpa_printf(MSG_DEBUG, "WNM: Request to send WNM-Sleep Mode Request "
57 1.1 christos "action=%s to " MACSTR,
58 1.1 christos action == 0 ? "enter" : "exit",
59 1.1 christos MAC2STR(wpa_s->bssid));
60 1.1 christos
61 1.1 christos /* WNM-Sleep Mode IE */
62 1.1 christos wnmsleep_ie_len = sizeof(struct wnm_sleep_element);
63 1.1 christos wnmsleep_ie = os_zalloc(sizeof(struct wnm_sleep_element));
64 1.1 christos if (wnmsleep_ie == NULL)
65 1.1 christos return -1;
66 1.1 christos wnmsleep_ie->eid = WLAN_EID_WNMSLEEP;
67 1.1 christos wnmsleep_ie->len = wnmsleep_ie_len - 2;
68 1.1 christos wnmsleep_ie->action_type = action;
69 1.1 christos wnmsleep_ie->status = WNM_STATUS_SLEEP_ACCEPT;
70 1.1 christos wnmsleep_ie->intval = host_to_le16(intval);
71 1.1 christos wpa_hexdump(MSG_DEBUG, "WNM: WNM-Sleep Mode element",
72 1.1 christos (u8 *) wnmsleep_ie, wnmsleep_ie_len);
73 1.1 christos
74 1.1 christos /* TFS IE(s) */
75 1.1 christos if (tfs_req) {
76 1.1 christos wnmtfs_ie_len = wpabuf_len(tfs_req);
77 1.1 christos wnmtfs_ie = os_malloc(wnmtfs_ie_len);
78 1.1 christos if (wnmtfs_ie == NULL) {
79 1.1 christos os_free(wnmsleep_ie);
80 1.1 christos return -1;
81 1.1 christos }
82 1.1 christos os_memcpy(wnmtfs_ie, wpabuf_head(tfs_req), wnmtfs_ie_len);
83 1.1 christos } else {
84 1.1 christos wnmtfs_ie = os_zalloc(MAX_TFS_IE_LEN);
85 1.1 christos if (wnmtfs_ie == NULL) {
86 1.1 christos os_free(wnmsleep_ie);
87 1.1 christos return -1;
88 1.1 christos }
89 1.1 christos if (ieee80211_11_get_tfs_ie(wpa_s, wnmtfs_ie, &wnmtfs_ie_len,
90 1.1 christos tfs_oper)) {
91 1.1 christos wnmtfs_ie_len = 0;
92 1.1 christos os_free(wnmtfs_ie);
93 1.1 christos wnmtfs_ie = NULL;
94 1.1 christos }
95 1.1 christos }
96 1.1 christos wpa_hexdump(MSG_DEBUG, "WNM: TFS Request element",
97 1.1 christos (u8 *) wnmtfs_ie, wnmtfs_ie_len);
98 1.1 christos
99 1.1 christos mgmt = os_zalloc(sizeof(*mgmt) + wnmsleep_ie_len + wnmtfs_ie_len);
100 1.1 christos if (mgmt == NULL) {
101 1.1 christos wpa_printf(MSG_DEBUG, "MLME: Failed to allocate buffer for "
102 1.1 christos "WNM-Sleep Request action frame");
103 1.1 christos os_free(wnmsleep_ie);
104 1.1 christos os_free(wnmtfs_ie);
105 1.1 christos return -1;
106 1.1 christos }
107 1.1 christos
108 1.1 christos os_memcpy(mgmt->da, wpa_s->bssid, ETH_ALEN);
109 1.1 christos os_memcpy(mgmt->sa, wpa_s->own_addr, ETH_ALEN);
110 1.1 christos os_memcpy(mgmt->bssid, wpa_s->bssid, ETH_ALEN);
111 1.1 christos mgmt->frame_control = IEEE80211_FC(WLAN_FC_TYPE_MGMT,
112 1.1 christos WLAN_FC_STYPE_ACTION);
113 1.1 christos mgmt->u.action.category = WLAN_ACTION_WNM;
114 1.1 christos mgmt->u.action.u.wnm_sleep_req.action = WNM_SLEEP_MODE_REQ;
115 1.1 christos mgmt->u.action.u.wnm_sleep_req.dialogtoken = 1;
116 1.1 christos os_memcpy(mgmt->u.action.u.wnm_sleep_req.variable, wnmsleep_ie,
117 1.1 christos wnmsleep_ie_len);
118 1.1 christos /* copy TFS IE here */
119 1.1 christos if (wnmtfs_ie_len > 0) {
120 1.1 christos os_memcpy(mgmt->u.action.u.wnm_sleep_req.variable +
121 1.1 christos wnmsleep_ie_len, wnmtfs_ie, wnmtfs_ie_len);
122 1.1 christos }
123 1.1 christos
124 1.1 christos len = 1 + sizeof(mgmt->u.action.u.wnm_sleep_req) + wnmsleep_ie_len +
125 1.1 christos wnmtfs_ie_len;
126 1.1 christos
127 1.1 christos res = wpa_drv_send_action(wpa_s, wpa_s->assoc_freq, 0, wpa_s->bssid,
128 1.1 christos wpa_s->own_addr, wpa_s->bssid,
129 1.1 christos &mgmt->u.action.category, len, 0);
130 1.1 christos if (res < 0)
131 1.1 christos wpa_printf(MSG_DEBUG, "Failed to send WNM-Sleep Request "
132 1.1 christos "(action=%d, intval=%d)", action, intval);
133 1.1 christos
134 1.1 christos os_free(wnmsleep_ie);
135 1.1 christos os_free(wnmtfs_ie);
136 1.1 christos os_free(mgmt);
137 1.1 christos
138 1.1 christos return res;
139 1.1 christos }
140 1.1 christos
141 1.1 christos
142 1.1 christos static void wnm_sleep_mode_enter_success(struct wpa_supplicant *wpa_s,
143 1.1 christos u8 *tfsresp_ie_start,
144 1.1 christos u8 *tfsresp_ie_end)
145 1.1 christos {
146 1.1 christos wpa_drv_wnm_oper(wpa_s, WNM_SLEEP_ENTER_CONFIRM,
147 1.1 christos wpa_s->bssid, NULL, NULL);
148 1.1 christos /* remove GTK/IGTK ?? */
149 1.1 christos
150 1.1 christos /* set the TFS Resp IE(s) */
151 1.1 christos if (tfsresp_ie_start && tfsresp_ie_end &&
152 1.1 christos tfsresp_ie_end - tfsresp_ie_start >= 0) {
153 1.1 christos u16 tfsresp_ie_len;
154 1.1 christos tfsresp_ie_len = (tfsresp_ie_end + tfsresp_ie_end[1] + 2) -
155 1.1 christos tfsresp_ie_start;
156 1.1 christos wpa_printf(MSG_DEBUG, "TFS Resp IE(s) found");
157 1.1 christos /* pass the TFS Resp IE(s) to driver for processing */
158 1.1 christos if (ieee80211_11_set_tfs_ie(wpa_s, wpa_s->bssid,
159 1.1 christos tfsresp_ie_start,
160 1.1 christos &tfsresp_ie_len,
161 1.1 christos WNM_SLEEP_TFS_RESP_IE_SET))
162 1.1 christos wpa_printf(MSG_DEBUG, "WNM: Fail to set TFS Resp IE");
163 1.1 christos }
164 1.1 christos }
165 1.1 christos
166 1.1 christos
167 1.1 christos static void wnm_sleep_mode_exit_success(struct wpa_supplicant *wpa_s,
168 1.1 christos const u8 *frm, u16 key_len_total)
169 1.1 christos {
170 1.1 christos u8 *ptr, *end;
171 1.1 christos u8 gtk_len;
172 1.1 christos
173 1.1 christos wpa_drv_wnm_oper(wpa_s, WNM_SLEEP_EXIT_CONFIRM, wpa_s->bssid,
174 1.1 christos NULL, NULL);
175 1.1 christos
176 1.1 christos /* Install GTK/IGTK */
177 1.1 christos
178 1.1 christos /* point to key data field */
179 1.1 christos ptr = (u8 *) frm + 1 + 1 + 2;
180 1.1 christos end = ptr + key_len_total;
181 1.1 christos wpa_hexdump_key(MSG_DEBUG, "WNM: Key Data", ptr, key_len_total);
182 1.1 christos
183 1.1 christos while (ptr + 1 < end) {
184 1.1 christos if (ptr + 2 + ptr[1] > end) {
185 1.1 christos wpa_printf(MSG_DEBUG, "WNM: Invalid Key Data element "
186 1.1 christos "length");
187 1.1 christos if (end > ptr) {
188 1.1 christos wpa_hexdump(MSG_DEBUG, "WNM: Remaining data",
189 1.1 christos ptr, end - ptr);
190 1.1 christos }
191 1.1 christos break;
192 1.1 christos }
193 1.1 christos if (*ptr == WNM_SLEEP_SUBELEM_GTK) {
194 1.1 christos if (ptr[1] < 11 + 5) {
195 1.1 christos wpa_printf(MSG_DEBUG, "WNM: Too short GTK "
196 1.1 christos "subelem");
197 1.1 christos break;
198 1.1 christos }
199 1.1 christos gtk_len = *(ptr + 4);
200 1.1 christos if (ptr[1] < 11 + gtk_len ||
201 1.1 christos gtk_len < 5 || gtk_len > 32) {
202 1.1 christos wpa_printf(MSG_DEBUG, "WNM: Invalid GTK "
203 1.1 christos "subelem");
204 1.1 christos break;
205 1.1 christos }
206 1.1 christos wpa_wnmsleep_install_key(
207 1.1 christos wpa_s->wpa,
208 1.1 christos WNM_SLEEP_SUBELEM_GTK,
209 1.1 christos ptr);
210 1.1 christos ptr += 13 + gtk_len;
211 1.1 christos #ifdef CONFIG_IEEE80211W
212 1.1 christos } else if (*ptr == WNM_SLEEP_SUBELEM_IGTK) {
213 1.1 christos if (ptr[1] < 2 + 6 + WPA_IGTK_LEN) {
214 1.1 christos wpa_printf(MSG_DEBUG, "WNM: Too short IGTK "
215 1.1 christos "subelem");
216 1.1 christos break;
217 1.1 christos }
218 1.1 christos wpa_wnmsleep_install_key(wpa_s->wpa,
219 1.1 christos WNM_SLEEP_SUBELEM_IGTK, ptr);
220 1.1 christos ptr += 10 + WPA_IGTK_LEN;
221 1.1 christos #endif /* CONFIG_IEEE80211W */
222 1.1 christos } else
223 1.1 christos break; /* skip the loop */
224 1.1 christos }
225 1.1 christos }
226 1.1 christos
227 1.1 christos
228 1.1 christos static void ieee802_11_rx_wnmsleep_resp(struct wpa_supplicant *wpa_s,
229 1.1 christos const u8 *frm, int len)
230 1.1 christos {
231 1.1 christos /*
232 1.1 christos * Action [1] | Diaglog Token [1] | Key Data Len [2] | Key Data |
233 1.1 christos * WNM-Sleep Mode IE | TFS Response IE
234 1.1 christos */
235 1.1 christos u8 *pos = (u8 *) frm; /* point to action field */
236 1.1 christos u16 key_len_total = le_to_host16(*((u16 *)(frm+2)));
237 1.1 christos struct wnm_sleep_element *wnmsleep_ie = NULL;
238 1.1 christos /* multiple TFS Resp IE (assuming consecutive) */
239 1.1 christos u8 *tfsresp_ie_start = NULL;
240 1.1 christos u8 *tfsresp_ie_end = NULL;
241 1.1 christos
242 1.1 christos wpa_printf(MSG_DEBUG, "action=%d token = %d key_len_total = %d",
243 1.1 christos frm[0], frm[1], key_len_total);
244 1.1 christos pos += 4 + key_len_total;
245 1.1 christos if (pos > frm + len) {
246 1.1 christos wpa_printf(MSG_INFO, "WNM: Too short frame for Key Data field");
247 1.1 christos return;
248 1.1 christos }
249 1.1 christos while (pos - frm < len) {
250 1.1 christos u8 ie_len = *(pos + 1);
251 1.1 christos if (pos + 2 + ie_len > frm + len) {
252 1.1 christos wpa_printf(MSG_INFO, "WNM: Invalid IE len %u", ie_len);
253 1.1 christos break;
254 1.1 christos }
255 1.1 christos wpa_hexdump(MSG_DEBUG, "WNM: Element", pos, 2 + ie_len);
256 1.1 christos if (*pos == WLAN_EID_WNMSLEEP)
257 1.1 christos wnmsleep_ie = (struct wnm_sleep_element *) pos;
258 1.1 christos else if (*pos == WLAN_EID_TFS_RESP) {
259 1.1 christos if (!tfsresp_ie_start)
260 1.1 christos tfsresp_ie_start = pos;
261 1.1 christos tfsresp_ie_end = pos;
262 1.1 christos } else
263 1.1 christos wpa_printf(MSG_DEBUG, "EID %d not recognized", *pos);
264 1.1 christos pos += ie_len + 2;
265 1.1 christos }
266 1.1 christos
267 1.1 christos if (!wnmsleep_ie) {
268 1.1 christos wpa_printf(MSG_DEBUG, "No WNM-Sleep IE found");
269 1.1 christos return;
270 1.1 christos }
271 1.1 christos
272 1.1 christos if (wnmsleep_ie->status == WNM_STATUS_SLEEP_ACCEPT ||
273 1.1 christos wnmsleep_ie->status == WNM_STATUS_SLEEP_EXIT_ACCEPT_GTK_UPDATE) {
274 1.1 christos wpa_printf(MSG_DEBUG, "Successfully recv WNM-Sleep Response "
275 1.1 christos "frame (action=%d, intval=%d)",
276 1.1 christos wnmsleep_ie->action_type, wnmsleep_ie->intval);
277 1.1 christos if (wnmsleep_ie->action_type == WNM_SLEEP_MODE_ENTER) {
278 1.1 christos wnm_sleep_mode_enter_success(wpa_s, tfsresp_ie_start,
279 1.1 christos tfsresp_ie_end);
280 1.1 christos } else if (wnmsleep_ie->action_type == WNM_SLEEP_MODE_EXIT) {
281 1.1 christos wnm_sleep_mode_exit_success(wpa_s, frm, key_len_total);
282 1.1 christos }
283 1.1 christos } else {
284 1.1 christos wpa_printf(MSG_DEBUG, "Reject recv WNM-Sleep Response frame "
285 1.1 christos "(action=%d, intval=%d)",
286 1.1 christos wnmsleep_ie->action_type, wnmsleep_ie->intval);
287 1.1 christos if (wnmsleep_ie->action_type == WNM_SLEEP_MODE_ENTER)
288 1.1 christos wpa_drv_wnm_oper(wpa_s, WNM_SLEEP_ENTER_FAIL,
289 1.1 christos wpa_s->bssid, NULL, NULL);
290 1.1 christos else if (wnmsleep_ie->action_type == WNM_SLEEP_MODE_EXIT)
291 1.1 christos wpa_drv_wnm_oper(wpa_s, WNM_SLEEP_EXIT_FAIL,
292 1.1 christos wpa_s->bssid, NULL, NULL);
293 1.1 christos }
294 1.1 christos }
295 1.1 christos
296 1.1 christos
297 1.1 christos static void wnm_send_bss_transition_mgmt_resp(struct wpa_supplicant *wpa_s,
298 1.1 christos u8 dialog_token, u8 status,
299 1.1 christos u8 delay, const u8 *target_bssid)
300 1.1 christos {
301 1.1 christos u8 buf[1000], *pos;
302 1.1 christos struct ieee80211_mgmt *mgmt;
303 1.1 christos size_t len;
304 1.1 christos
305 1.1 christos wpa_printf(MSG_DEBUG, "WNM: Send BSS Transition Management Response "
306 1.1 christos "to " MACSTR " dialog_token=%u status=%u delay=%d",
307 1.1 christos MAC2STR(wpa_s->bssid), dialog_token, status, delay);
308 1.1 christos
309 1.1 christos mgmt = (struct ieee80211_mgmt *) buf;
310 1.1 christos os_memset(&buf, 0, sizeof(buf));
311 1.1 christos os_memcpy(mgmt->da, wpa_s->bssid, ETH_ALEN);
312 1.1 christos os_memcpy(mgmt->sa, wpa_s->own_addr, ETH_ALEN);
313 1.1 christos os_memcpy(mgmt->bssid, wpa_s->bssid, ETH_ALEN);
314 1.1 christos mgmt->frame_control = IEEE80211_FC(WLAN_FC_TYPE_MGMT,
315 1.1 christos WLAN_FC_STYPE_ACTION);
316 1.1 christos mgmt->u.action.category = WLAN_ACTION_WNM;
317 1.1 christos mgmt->u.action.u.bss_tm_resp.action = WNM_BSS_TRANS_MGMT_RESP;
318 1.1 christos mgmt->u.action.u.bss_tm_resp.dialog_token = dialog_token;
319 1.1 christos mgmt->u.action.u.bss_tm_resp.status_code = status;
320 1.1 christos mgmt->u.action.u.bss_tm_resp.bss_termination_delay = delay;
321 1.1 christos pos = mgmt->u.action.u.bss_tm_resp.variable;
322 1.1 christos if (target_bssid) {
323 1.1 christos os_memcpy(pos, target_bssid, ETH_ALEN);
324 1.1 christos pos += ETH_ALEN;
325 1.1 christos }
326 1.1 christos
327 1.1 christos len = pos - (u8 *) &mgmt->u.action.category;
328 1.1 christos
329 1.1 christos wpa_drv_send_action(wpa_s, wpa_s->assoc_freq, 0, wpa_s->bssid,
330 1.1 christos wpa_s->own_addr, wpa_s->bssid,
331 1.1 christos &mgmt->u.action.category, len, 0);
332 1.1 christos }
333 1.1 christos
334 1.1 christos
335 1.1 christos static void ieee802_11_rx_bss_trans_mgmt_req(struct wpa_supplicant *wpa_s,
336 1.1 christos const u8 *pos, const u8 *end,
337 1.1 christos int reply)
338 1.1 christos {
339 1.1 christos u8 dialog_token;
340 1.1 christos u8 mode;
341 1.1 christos u16 disassoc_timer;
342 1.1 christos
343 1.1 christos if (pos + 5 > end)
344 1.1 christos return;
345 1.1 christos
346 1.1 christos dialog_token = pos[0];
347 1.1 christos mode = pos[1];
348 1.1 christos disassoc_timer = WPA_GET_LE16(pos + 2);
349 1.1 christos
350 1.1 christos wpa_printf(MSG_DEBUG, "WNM: BSS Transition Management Request: "
351 1.1 christos "dialog_token=%u request_mode=0x%x "
352 1.1 christos "disassoc_timer=%u validity_interval=%u",
353 1.1 christos dialog_token, mode, disassoc_timer, pos[4]);
354 1.1 christos pos += 5;
355 1.1 christos if (mode & 0x08)
356 1.1 christos pos += 12; /* BSS Termination Duration */
357 1.1 christos if (mode & 0x10) {
358 1.1 christos char url[256];
359 1.1 christos if (pos + 1 > end || pos + 1 + pos[0] > end) {
360 1.1 christos wpa_printf(MSG_DEBUG, "WNM: Invalid BSS Transition "
361 1.1 christos "Management Request (URL)");
362 1.1 christos return;
363 1.1 christos }
364 1.1 christos os_memcpy(url, pos + 1, pos[0]);
365 1.1 christos url[pos[0]] = '\0';
366 1.1 christos wpa_msg(wpa_s, MSG_INFO, "WNM: ESS Disassociation Imminent - "
367 1.1 christos "session_info_url=%s", url);
368 1.1 christos }
369 1.1 christos
370 1.1 christos if (mode & 0x04) {
371 1.1 christos wpa_msg(wpa_s, MSG_INFO, "WNM: Disassociation Imminent - "
372 1.1 christos "Disassociation Timer %u", disassoc_timer);
373 1.1 christos if (disassoc_timer && !wpa_s->scanning) {
374 1.1 christos /* TODO: mark current BSS less preferred for
375 1.1 christos * selection */
376 1.1 christos wpa_printf(MSG_DEBUG, "Trying to find another BSS");
377 1.1 christos wpa_supplicant_req_scan(wpa_s, 0, 0);
378 1.1 christos }
379 1.1 christos }
380 1.1 christos
381 1.1 christos if (reply) {
382 1.1 christos /* TODO: add support for reporting Accept */
383 1.1 christos wnm_send_bss_transition_mgmt_resp(wpa_s, dialog_token,
384 1.1 christos 1 /* Reject - unspecified */,
385 1.1 christos 0, NULL);
386 1.1 christos }
387 1.1 christos }
388 1.1 christos
389 1.1 christos
390 1.1 christos void ieee802_11_rx_wnm_action(struct wpa_supplicant *wpa_s,
391 1.1 christos struct rx_action *action)
392 1.1 christos {
393 1.1 christos const u8 *pos, *end;
394 1.1 christos u8 act;
395 1.1 christos
396 1.1 christos if (action->data == NULL || action->len == 0)
397 1.1 christos return;
398 1.1 christos
399 1.1 christos pos = action->data;
400 1.1 christos end = pos + action->len;
401 1.1 christos act = *pos++;
402 1.1 christos
403 1.1 christos wpa_printf(MSG_DEBUG, "WNM: RX action %u from " MACSTR,
404 1.1 christos act, MAC2STR(action->sa));
405 1.1 christos if (wpa_s->wpa_state < WPA_ASSOCIATED ||
406 1.1 christos os_memcmp(action->sa, wpa_s->bssid, ETH_ALEN) != 0) {
407 1.1 christos wpa_printf(MSG_DEBUG, "WNM: Ignore unexpected WNM Action "
408 1.1 christos "frame");
409 1.1 christos return;
410 1.1 christos }
411 1.1 christos
412 1.1 christos switch (act) {
413 1.1 christos case WNM_BSS_TRANS_MGMT_REQ:
414 1.1 christos ieee802_11_rx_bss_trans_mgmt_req(wpa_s, pos, end,
415 1.1 christos !(action->da[0] & 0x01));
416 1.1 christos break;
417 1.1 christos case WNM_SLEEP_MODE_RESP:
418 1.1 christos ieee802_11_rx_wnmsleep_resp(wpa_s, action->data, action->len);
419 1.1 christos break;
420 1.1 christos default:
421 1.1 christos break;
422 1.1 christos }
423 1.1 christos }
424