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