1*ebacd801SBjoern A. Zeeb /*
2*ebacd801SBjoern A. Zeeb * Copyright (c) 2009 Atheros Communications Inc.
3*ebacd801SBjoern A. Zeeb *
4*ebacd801SBjoern A. Zeeb * Permission to use, copy, modify, and/or distribute this software for any
5*ebacd801SBjoern A. Zeeb * purpose with or without fee is hereby granted, provided that the above
6*ebacd801SBjoern A. Zeeb * copyright notice and this permission notice appear in all copies.
7*ebacd801SBjoern A. Zeeb *
8*ebacd801SBjoern A. Zeeb * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9*ebacd801SBjoern A. Zeeb * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10*ebacd801SBjoern A. Zeeb * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11*ebacd801SBjoern A. Zeeb * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12*ebacd801SBjoern A. Zeeb * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13*ebacd801SBjoern A. Zeeb * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14*ebacd801SBjoern A. Zeeb * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15*ebacd801SBjoern A. Zeeb */
16*ebacd801SBjoern A. Zeeb
17*ebacd801SBjoern A. Zeeb #include <linux/export.h>
18*ebacd801SBjoern A. Zeeb #include "ath.h"
19*ebacd801SBjoern A. Zeeb
ath_opmode_to_string(enum nl80211_iftype opmode)20*ebacd801SBjoern A. Zeeb const char *ath_opmode_to_string(enum nl80211_iftype opmode)
21*ebacd801SBjoern A. Zeeb {
22*ebacd801SBjoern A. Zeeb switch (opmode) {
23*ebacd801SBjoern A. Zeeb case NL80211_IFTYPE_UNSPECIFIED:
24*ebacd801SBjoern A. Zeeb return "UNSPEC";
25*ebacd801SBjoern A. Zeeb case NL80211_IFTYPE_ADHOC:
26*ebacd801SBjoern A. Zeeb return "ADHOC";
27*ebacd801SBjoern A. Zeeb case NL80211_IFTYPE_STATION:
28*ebacd801SBjoern A. Zeeb return "STATION";
29*ebacd801SBjoern A. Zeeb case NL80211_IFTYPE_AP:
30*ebacd801SBjoern A. Zeeb return "AP";
31*ebacd801SBjoern A. Zeeb case NL80211_IFTYPE_AP_VLAN:
32*ebacd801SBjoern A. Zeeb return "AP-VLAN";
33*ebacd801SBjoern A. Zeeb case NL80211_IFTYPE_WDS:
34*ebacd801SBjoern A. Zeeb return "WDS";
35*ebacd801SBjoern A. Zeeb case NL80211_IFTYPE_MONITOR:
36*ebacd801SBjoern A. Zeeb return "MONITOR";
37*ebacd801SBjoern A. Zeeb case NL80211_IFTYPE_MESH_POINT:
38*ebacd801SBjoern A. Zeeb return "MESH";
39*ebacd801SBjoern A. Zeeb case NL80211_IFTYPE_P2P_CLIENT:
40*ebacd801SBjoern A. Zeeb return "P2P-CLIENT";
41*ebacd801SBjoern A. Zeeb case NL80211_IFTYPE_P2P_GO:
42*ebacd801SBjoern A. Zeeb return "P2P-GO";
43*ebacd801SBjoern A. Zeeb case NL80211_IFTYPE_OCB:
44*ebacd801SBjoern A. Zeeb return "OCB";
45*ebacd801SBjoern A. Zeeb default:
46*ebacd801SBjoern A. Zeeb return "UNKNOWN";
47*ebacd801SBjoern A. Zeeb }
48*ebacd801SBjoern A. Zeeb }
49*ebacd801SBjoern A. Zeeb EXPORT_SYMBOL(ath_opmode_to_string);
50