• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/src/linux/linux-2.6/drivers/net/irda/

Lines Matching refs:fsm

30 /* substate handler of the config-fsm to handle the cases where we want
36 struct sir_fsm *fsm = &dev->fsm;
41 next_state = fsm->substate; /* default: stay in current substate */
44 switch(fsm->substate) {
86 fsm->substate = next_state;
98 * On entry, fsm->sem is always locked and the netdev xmit queue stopped.
104 struct sir_dev *dev = container_of(work, struct sir_dev, fsm.work.work);
105 struct sir_fsm *fsm = &dev->fsm;
114 __FUNCTION__, fsm->state, fsm->substate);
116 next_state = fsm->state;
119 switch(fsm->state) {
125 fsm->result = -EINVAL;
132 ret = sirdev_get_dongle(dev, fsm->param);
134 fsm->result = ret;
146 fsm->substate = SIRDEV_STATE_DONGLE_RESET;
149 fsm->param = 9600;
156 fsm->result = -EINVAL;
163 fsm->result = ret;
172 (fsm->param&0x02) ? TRUE : FALSE,
173 (fsm->param&0x01) ? TRUE : FALSE);
178 fsm->substate = SIRDEV_STATE_WAIT_XMIT;
185 fsm->result = ret;
193 fsm->substate = SIRDEV_STATE_DONGLE_RESET;
197 dev->speed = fsm->param;
206 fsm->result = ret;
217 fsm->substate = SIRDEV_STATE_DONGLE_SPEED;
224 ret = dev->dongle_drv->set_speed(dev, fsm->param);
226 fsm->result = ret;
253 fsm->result = -EINVAL;
257 IRDA_ERROR("%s - error: %d\n", __FUNCTION__, fsm->result);
265 up(&fsm->sem);
268 fsm->state = next_state;
271 queue_delayed_work(irda_sir_wq, &fsm->work, msecs_to_jiffies(delay));
281 struct sir_fsm *fsm = &dev->fsm;
285 if (down_trylock(&fsm->sem)) {
290 down(&fsm->sem);
293 if (fsm->state == SIRDEV_STATE_DEAD) {
296 up(&fsm->sem);
303 fsm->state = initial_state;
304 fsm->param = param;
305 fsm->result = 0;
307 INIT_DELAYED_WORK(&fsm->work, sirdev_config_fsm);
308 queue_delayed_work(irda_sir_wq, &fsm->work, 0);
345 down(&dev->fsm.sem); /* block until config change completed */
346 err = dev->fsm.result;
347 up(&dev->fsm.sem);
606 /* Failed to initiate the speed change, likely the fsm
610 * fsm completes and wakes the queue.
835 down(&dev->fsm.sem); /* block on pending config completion */
856 up(&dev->fsm.sem);
897 init_MUTEX(&dev->fsm.sem);
943 down(&dev->fsm.sem);
944 dev->fsm.state = SIRDEV_STATE_DEAD; /* mark staled */
947 up(&dev->fsm.sem);