2 * Common driver-related functions
3 * Copyright (c) 2003-2011, Jouni Malinen <j@w1.fi>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
9 * Alternatively, this software may be distributed under the terms of BSD
12 * See README and COPYING for more details.
16 #include "utils/common.h"
19 void wpa_scan_results_free(struct wpa_scan_results *res)
26 for (i = 0; i < res->num; i++)
33 const char * event_to_string(enum wpa_event_type event)
35 #define E2S(n) case EVENT_ ## n: return #n
39 E2S(MICHAEL_MIC_FAILURE);
42 E2S(INTERFACE_STATUS);
54 E2S(WPS_BUTTON_PUSHED);
59 E2S(REMAIN_ON_CHANNEL);
60 E2S(CANCEL_REMAIN_ON_CHANNEL);
66 E2S(INTERFACE_ENABLED);
67 E2S(INTERFACE_DISABLED);
68 E2S(CHANNEL_LIST_CHANGED);
69 E2S(INTERFACE_UNAVAILABLE);
75 E2S(P2P_GO_NEG_REQ_RX);
76 E2S(P2P_GO_NEG_COMPLETED);
77 E2S(P2P_PROV_DISC_REQUEST);
78 E2S(P2P_PROV_DISC_RESPONSE);
82 E2S(DRIVER_GTK_REKEY);
83 E2S(SCHED_SCAN_STOPPED);
84 E2S(DRIVER_CLIENT_POLL_OK);