Lines Matching refs:self
34 static void state_s_disconnect (struct iriap_cb *self, IRIAP_EVENT event,
36 static void state_s_connecting (struct iriap_cb *self, IRIAP_EVENT event,
38 static void state_s_call (struct iriap_cb *self, IRIAP_EVENT event,
41 static void state_s_make_call (struct iriap_cb *self, IRIAP_EVENT event,
43 static void state_s_calling (struct iriap_cb *self, IRIAP_EVENT event,
45 static void state_s_outstanding (struct iriap_cb *self, IRIAP_EVENT event,
47 static void state_s_replying (struct iriap_cb *self, IRIAP_EVENT event,
49 static void state_s_wait_for_call(struct iriap_cb *self, IRIAP_EVENT event,
51 static void state_s_wait_active (struct iriap_cb *self, IRIAP_EVENT event,
54 static void state_r_disconnect (struct iriap_cb *self, IRIAP_EVENT event,
56 static void state_r_call (struct iriap_cb *self, IRIAP_EVENT event,
58 static void state_r_waiting (struct iriap_cb *self, IRIAP_EVENT event,
60 static void state_r_wait_active (struct iriap_cb *self, IRIAP_EVENT event,
62 static void state_r_receiving (struct iriap_cb *self, IRIAP_EVENT event,
64 static void state_r_execute (struct iriap_cb *self, IRIAP_EVENT event,
66 static void state_r_returning (struct iriap_cb *self, IRIAP_EVENT event,
69 static void (*iriap_state[])(struct iriap_cb *self, IRIAP_EVENT event,
96 void iriap_next_client_state(struct iriap_cb *self, IRIAP_STATE state) in iriap_next_client_state() argument
98 IRDA_ASSERT(self != NULL, return;); in iriap_next_client_state()
99 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); in iriap_next_client_state()
101 self->client_state = state; in iriap_next_client_state()
104 void iriap_next_call_state(struct iriap_cb *self, IRIAP_STATE state) in iriap_next_call_state() argument
106 IRDA_ASSERT(self != NULL, return;); in iriap_next_call_state()
107 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); in iriap_next_call_state()
109 self->call_state = state; in iriap_next_call_state()
112 void iriap_next_server_state(struct iriap_cb *self, IRIAP_STATE state) in iriap_next_server_state() argument
114 IRDA_ASSERT(self != NULL, return;); in iriap_next_server_state()
115 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); in iriap_next_server_state()
117 self->server_state = state; in iriap_next_server_state()
120 void iriap_next_r_connect_state(struct iriap_cb *self, IRIAP_STATE state) in iriap_next_r_connect_state() argument
122 IRDA_ASSERT(self != NULL, return;); in iriap_next_r_connect_state()
123 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); in iriap_next_r_connect_state()
125 self->r_connect_state = state; in iriap_next_r_connect_state()
128 void iriap_do_client_event(struct iriap_cb *self, IRIAP_EVENT event, in iriap_do_client_event() argument
131 IRDA_ASSERT(self != NULL, return;); in iriap_do_client_event()
132 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); in iriap_do_client_event()
134 (*iriap_state[ self->client_state]) (self, event, skb); in iriap_do_client_event()
137 void iriap_do_call_event(struct iriap_cb *self, IRIAP_EVENT event, in iriap_do_call_event() argument
140 IRDA_ASSERT(self != NULL, return;); in iriap_do_call_event()
141 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); in iriap_do_call_event()
143 (*iriap_state[ self->call_state]) (self, event, skb); in iriap_do_call_event()
146 void iriap_do_server_event(struct iriap_cb *self, IRIAP_EVENT event, in iriap_do_server_event() argument
149 IRDA_ASSERT(self != NULL, return;); in iriap_do_server_event()
150 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); in iriap_do_server_event()
152 (*iriap_state[ self->server_state]) (self, event, skb); in iriap_do_server_event()
155 void iriap_do_r_connect_event(struct iriap_cb *self, IRIAP_EVENT event, in iriap_do_r_connect_event() argument
158 IRDA_ASSERT(self != NULL, return;); in iriap_do_r_connect_event()
159 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); in iriap_do_r_connect_event()
161 (*iriap_state[ self->r_connect_state]) (self, event, skb); in iriap_do_r_connect_event()
171 static void state_s_disconnect(struct iriap_cb *self, IRIAP_EVENT event, in state_s_disconnect() argument
174 IRDA_ASSERT(self != NULL, return;); in state_s_disconnect()
175 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); in state_s_disconnect()
179 iriap_next_client_state(self, S_CONNECTING); in state_s_disconnect()
180 IRDA_ASSERT(self->request_skb == NULL, return;); in state_s_disconnect()
184 self->request_skb = skb; in state_s_disconnect()
185 iriap_connect_request(self); in state_s_disconnect()
201 static void state_s_connecting(struct iriap_cb *self, IRIAP_EVENT event, in state_s_connecting() argument
204 IRDA_ASSERT(self != NULL, return;); in state_s_connecting()
205 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); in state_s_connecting()
212 iriap_do_call_event(self, IAP_CALL_REQUEST, skb); in state_s_connecting()
214 iriap_next_client_state(self, S_CALL); in state_s_connecting()
218 iriap_next_call_state(self, S_MAKE_CALL); in state_s_connecting()
219 iriap_next_client_state(self, S_DISCONNECT); in state_s_connecting()
234 static void state_s_call(struct iriap_cb *self, IRIAP_EVENT event, in state_s_call() argument
237 IRDA_ASSERT(self != NULL, return;); in state_s_call()
242 iriap_next_call_state(self, S_MAKE_CALL); in state_s_call()
243 iriap_next_client_state(self, S_DISCONNECT); in state_s_call()
257 static void state_s_make_call(struct iriap_cb *self, IRIAP_EVENT event, in state_s_make_call() argument
262 IRDA_ASSERT(self != NULL, return;); in state_s_make_call()
267 tx_skb = self->request_skb; in state_s_make_call()
268 self->request_skb = NULL; in state_s_make_call()
270 irlmp_data_request(self->lsap, tx_skb); in state_s_make_call()
271 iriap_next_call_state(self, S_OUTSTANDING); in state_s_make_call()
285 static void state_s_calling(struct iriap_cb *self, IRIAP_EVENT event, in state_s_calling() argument
297 static void state_s_outstanding(struct iriap_cb *self, IRIAP_EVENT event, in state_s_outstanding() argument
300 IRDA_ASSERT(self != NULL, return;); in state_s_outstanding()
307 iriap_next_call_state(self, S_WAIT_FOR_CALL); in state_s_outstanding()
320 static void state_s_replying(struct iriap_cb *self, IRIAP_EVENT event, in state_s_replying() argument
332 static void state_s_wait_for_call(struct iriap_cb *self, IRIAP_EVENT event, in state_s_wait_for_call() argument
345 static void state_s_wait_active(struct iriap_cb *self, IRIAP_EVENT event, in state_s_wait_active() argument
363 static void state_r_disconnect(struct iriap_cb *self, IRIAP_EVENT event, in state_r_disconnect() argument
379 irlmp_connect_response(self->lsap, tx_skb); in state_r_disconnect()
382 iriap_next_server_state(self, R_CALL); in state_r_disconnect()
388 iriap_next_r_connect_state(self, R_RECEIVING); in state_r_disconnect()
399 static void state_r_call(struct iriap_cb *self, IRIAP_EVENT event, in state_r_call() argument
407 iriap_next_server_state(self, R_DISCONNECT); in state_r_call()
408 iriap_next_r_connect_state(self, R_WAITING); in state_r_call()
423 static void state_r_waiting(struct iriap_cb *self, IRIAP_EVENT event, in state_r_waiting() argument
429 static void state_r_wait_active(struct iriap_cb *self, IRIAP_EVENT event, in state_r_wait_active() argument
441 static void state_r_receiving(struct iriap_cb *self, IRIAP_EVENT event, in state_r_receiving() argument
448 iriap_next_r_connect_state(self, R_EXECUTE); in state_r_receiving()
450 iriap_call_indication(self, skb); in state_r_receiving()
464 static void state_r_execute(struct iriap_cb *self, IRIAP_EVENT event, in state_r_execute() argument
470 IRDA_ASSERT(self != NULL, return;); in state_r_execute()
471 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); in state_r_execute()
479 iriap_next_r_connect_state(self, R_RECEIVING); in state_r_execute()
485 irlmp_data_request(self->lsap, skb); in state_r_execute()
493 static void state_r_returning(struct iriap_cb *self, IRIAP_EVENT event, in state_r_returning() argument