debug.c 1.4 KB

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