blob: 9a1cc11c16f6a590d33b44729d5757e52eed8b24 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*********************************************************************
YOSHIFUJI Hideaki6819bc22007-02-09 23:24:53 +09002 *
Linus Torvalds1da177e2005-04-16 15:20:36 -07003 * Filename: irlan_event.c
YOSHIFUJI Hideaki6819bc22007-02-09 23:24:53 +09004 * Version:
5 * Description:
Linus Torvalds1da177e2005-04-16 15:20:36 -07006 * 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>
YOSHIFUJI Hideaki6819bc22007-02-09 23:24:53 +090011 *
Linus Torvalds1da177e2005-04-16 15:20:36 -070012 * Copyright (c) 1998-1999 Dag Brattli, All Rights Reserved.
YOSHIFUJI Hideaki6819bc22007-02-09 23:24:53 +090013 *
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
Linus Torvalds1da177e2005-04-16 15:20:36 -070017 * the License, or (at your option) any later version.
YOSHIFUJI Hideaki6819bc22007-02-09 23:24:53 +090018 *
Jan Engelhardt96de0e22007-10-19 23:21:04 +020019 * Neither Dag Brattli nor University of Tromsø admit liability nor
YOSHIFUJI Hideaki6819bc22007-02-09 23:24:53 +090020 * provide warranty for any of this software. This material is
Linus Torvalds1da177e2005-04-16 15:20:36 -070021 * provided "AS-IS" and at no charge.
YOSHIFUJI Hideaki6819bc22007-02-09 23:24:53 +090022 *
Linus Torvalds1da177e2005-04-16 15:20:36 -070023 ********************************************************************/
24
25#include <net/irda/irlan_event.h>
26
Joe Perches55b18042010-09-13 18:24:01 +000027const char * const irlan_state[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -070028 "IRLAN_IDLE",
29 "IRLAN_QUERY",
30 "IRLAN_CONN",
31 "IRLAN_INFO",
32 "IRLAN_MEDIA",
33 "IRLAN_OPEN",
34 "IRLAN_WAIT",
35 "IRLAN_ARB",
36 "IRLAN_DATA",
37 "IRLAN_CLOSE",
38 "IRLAN_SYNC",
39};
40
YOSHIFUJI Hideaki6819bc22007-02-09 23:24:53 +090041void irlan_next_client_state(struct irlan_cb *self, IRLAN_STATE state)
Linus Torvalds1da177e2005-04-16 15:20:36 -070042{
Joe Perches955a9d202014-11-11 14:44:57 -080043 pr_debug("%s(), %s\n", __func__ , irlan_state[state]);
Linus Torvalds1da177e2005-04-16 15:20:36 -070044
45 IRDA_ASSERT(self != NULL, return;);
46 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
47
48 self->client.state = state;
49}
50
YOSHIFUJI Hideaki6819bc22007-02-09 23:24:53 +090051void irlan_next_provider_state(struct irlan_cb *self, IRLAN_STATE state)
Linus Torvalds1da177e2005-04-16 15:20:36 -070052{
Joe Perches955a9d202014-11-11 14:44:57 -080053 pr_debug("%s(), %s\n", __func__ , irlan_state[state]);
Linus Torvalds1da177e2005-04-16 15:20:36 -070054
55 IRDA_ASSERT(self != NULL, return;);
56 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
57
58 self->provider.state = state;
59}
60