irlan_event.c 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*********************************************************************
  2. *
  3. * Filename: irlan_event.c
  4. * Version:
  5. * Description:
  6. * Status: Experimental.
  7. * Author: Dag Brattli <dagb@cs.uit.no>
  8. * Created at: Tue Oct 20 09:10:16 1998
  9. * Modified at: Sat Oct 30 12:59:01 1999
  10. * Modified by: Dag Brattli <dagb@cs.uit.no>
  11. *
  12. * Copyright (c) 1998-1999 Dag Brattli, All Rights Reserved.
  13. *
  14. * This program is free software; you can redistribute it and/or
  15. * modify it under the terms of the GNU General Public License as
  16. * published by the Free Software Foundation; either version 2 of
  17. * the License, or (at your option) any later version.
  18. *
  19. * Neither Dag Brattli nor University of Tromsø admit liability nor
  20. * provide warranty for any of this software. This material is
  21. * provided "AS-IS" and at no charge.
  22. *
  23. ********************************************************************/
  24. #include <net/irda/irlan_event.h>
  25. const char * const irlan_state[] = {
  26. "IRLAN_IDLE",
  27. "IRLAN_QUERY",
  28. "IRLAN_CONN",
  29. "IRLAN_INFO",
  30. "IRLAN_MEDIA",
  31. "IRLAN_OPEN",
  32. "IRLAN_WAIT",
  33. "IRLAN_ARB",
  34. "IRLAN_DATA",
  35. "IRLAN_CLOSE",
  36. "IRLAN_SYNC",
  37. };
  38. void irlan_next_client_state(struct irlan_cb *self, IRLAN_STATE state)
  39. {
  40. pr_debug("%s(), %s\n", __func__ , irlan_state[state]);
  41. IRDA_ASSERT(self != NULL, return;);
  42. IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
  43. self->client.state = state;
  44. }
  45. void irlan_next_provider_state(struct irlan_cb *self, IRLAN_STATE state)
  46. {
  47. pr_debug("%s(), %s\n", __func__ , irlan_state[state]);
  48. IRDA_ASSERT(self != NULL, return;);
  49. IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
  50. self->provider.state = state;
  51. }