1c46917bbSLuis R. Rodriguez /*
2c46917bbSLuis R. Rodriguez * Copyright (c) 2009 Atheros Communications Inc.
3c46917bbSLuis R. Rodriguez *
4c46917bbSLuis R. Rodriguez * Permission to use, copy, modify, and/or distribute this software for any
5c46917bbSLuis R. Rodriguez * purpose with or without fee is hereby granted, provided that the above
6c46917bbSLuis R. Rodriguez * copyright notice and this permission notice appear in all copies.
7c46917bbSLuis R. Rodriguez *
8c46917bbSLuis R. Rodriguez * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9c46917bbSLuis R. Rodriguez * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10c46917bbSLuis R. Rodriguez * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11c46917bbSLuis R. Rodriguez * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12c46917bbSLuis R. Rodriguez * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13c46917bbSLuis R. Rodriguez * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14c46917bbSLuis R. Rodriguez * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15c46917bbSLuis R. Rodriguez */
16c46917bbSLuis R. Rodriguez
17ee40fa06SPaul Gortmaker #include <linux/export.h>
18c46917bbSLuis R. Rodriguez #include "ath.h"
1992c68a66SBen Greear
ath_opmode_to_string(enum nl80211_iftype opmode)2092c68a66SBen Greear const char *ath_opmode_to_string(enum nl80211_iftype opmode)
2192c68a66SBen Greear {
2292c68a66SBen Greear switch (opmode) {
2392c68a66SBen Greear case NL80211_IFTYPE_UNSPECIFIED:
2492c68a66SBen Greear return "UNSPEC";
2592c68a66SBen Greear case NL80211_IFTYPE_ADHOC:
2692c68a66SBen Greear return "ADHOC";
2792c68a66SBen Greear case NL80211_IFTYPE_STATION:
2892c68a66SBen Greear return "STATION";
2992c68a66SBen Greear case NL80211_IFTYPE_AP:
3092c68a66SBen Greear return "AP";
3192c68a66SBen Greear case NL80211_IFTYPE_AP_VLAN:
3292c68a66SBen Greear return "AP-VLAN";
3392c68a66SBen Greear case NL80211_IFTYPE_WDS:
3492c68a66SBen Greear return "WDS";
3592c68a66SBen Greear case NL80211_IFTYPE_MONITOR:
3692c68a66SBen Greear return "MONITOR";
3792c68a66SBen Greear case NL80211_IFTYPE_MESH_POINT:
3892c68a66SBen Greear return "MESH";
3992c68a66SBen Greear case NL80211_IFTYPE_P2P_CLIENT:
4092c68a66SBen Greear return "P2P-CLIENT";
4192c68a66SBen Greear case NL80211_IFTYPE_P2P_GO:
4292c68a66SBen Greear return "P2P-GO";
439b412590SBertold Van den Bergh case NL80211_IFTYPE_OCB:
449b412590SBertold Van den Bergh return "OCB";
4592c68a66SBen Greear default:
46908ebfb9SJoe Perches return "UNKNOWN";
4792c68a66SBen Greear }
4892c68a66SBen Greear }
4992c68a66SBen Greear EXPORT_SYMBOL(ath_opmode_to_string);
50