Lines Matching refs:st

157 	struct cisco_state *st = state(hdlc);  in cisco_rx()  local
222 spin_lock(&st->lock); in cisco_rx()
223 st->rxseq = ntohl(cisco_data->par1); in cisco_rx()
225 if (ack && (ack == st->txseq || in cisco_rx()
227 ack == st->txseq - 1)) { in cisco_rx()
228 st->last_poll = jiffies; in cisco_rx()
229 if (!st->up) { in cisco_rx()
238 st->up = 1; in cisco_rx()
241 spin_unlock(&st->lock); in cisco_rx()
264 struct cisco_state *st = state(hdlc); in cisco_timer() local
266 spin_lock(&st->lock); in cisco_timer()
267 if (st->up && in cisco_timer()
268 time_after(jiffies, st->last_poll + st->settings.timeout * HZ)) { in cisco_timer()
269 st->up = 0; in cisco_timer()
274 cisco_keepalive_send(dev, CISCO_KEEPALIVE_REQ, htonl(++st->txseq), in cisco_timer()
275 htonl(st->rxseq)); in cisco_timer()
276 spin_unlock(&st->lock); in cisco_timer()
278 st->timer.expires = jiffies + st->settings.interval * HZ; in cisco_timer()
279 st->timer.function = cisco_timer; in cisco_timer()
280 st->timer.data = arg; in cisco_timer()
281 add_timer(&st->timer); in cisco_timer()
289 struct cisco_state *st = state(hdlc); in cisco_start() local
292 spin_lock_irqsave(&st->lock, flags); in cisco_start()
293 st->up = st->txseq = st->rxseq = 0; in cisco_start()
294 spin_unlock_irqrestore(&st->lock, flags); in cisco_start()
296 init_timer(&st->timer); in cisco_start()
297 st->timer.expires = jiffies + HZ; /* First poll after 1 s */ in cisco_start()
298 st->timer.function = cisco_timer; in cisco_start()
299 st->timer.data = (unsigned long)dev; in cisco_start()
300 add_timer(&st->timer); in cisco_start()
308 struct cisco_state *st = state(hdlc); in cisco_stop() local
311 del_timer_sync(&st->timer); in cisco_stop()
313 spin_lock_irqsave(&st->lock, flags); in cisco_stop()
315 st->up = st->txseq = 0; in cisco_stop()
316 spin_unlock_irqrestore(&st->lock, flags); in cisco_stop()