Lines Matching refs:ll

89 	struct ll_struct *ll = hu->priv;
105 skb_queue_tail(&ll->txq, skb);
113 struct ll_struct *ll;
117 ll = kzalloc(sizeof(*ll), GFP_KERNEL);
118 if (!ll)
121 skb_queue_head_init(&ll->txq);
122 skb_queue_head_init(&ll->tx_wait_q);
123 spin_lock_init(&ll->hcill_lock);
125 ll->hcill_state = HCILL_AWAKE;
127 hu->priv = ll;
142 struct ll_struct *ll = hu->priv;
146 skb_queue_purge(&ll->tx_wait_q);
147 skb_queue_purge(&ll->txq);
155 struct ll_struct *ll = hu->priv;
159 skb_queue_purge(&ll->tx_wait_q);
160 skb_queue_purge(&ll->txq);
162 kfree_skb(ll->rx_skb);
174 kfree(ll);
186 static void __ll_do_awake(struct ll_struct *ll)
190 while ((skb = skb_dequeue(&ll->tx_wait_q)))
191 skb_queue_tail(&ll->txq, skb);
193 ll->hcill_state = HCILL_AWAKE;
202 struct ll_struct *ll = hu->priv;
207 spin_lock_irqsave(&ll->hcill_lock, flags);
209 switch (ll->hcill_state) {
233 ll->hcill_state);
238 __ll_do_awake(ll);
241 spin_unlock_irqrestore(&ll->hcill_lock, flags);
253 struct ll_struct *ll = hu->priv;
258 spin_lock_irqsave(&ll->hcill_lock, flags);
261 if (ll->hcill_state != HCILL_AWAKE)
263 ll->hcill_state);
272 ll->hcill_state = HCILL_ASLEEP;
275 spin_unlock_irqrestore(&ll->hcill_lock, flags);
287 struct ll_struct *ll = hu->priv;
292 spin_lock_irqsave(&ll->hcill_lock, flags);
295 if (ll->hcill_state != HCILL_ASLEEP_TO_AWAKE)
297 ll->hcill_state);
300 __ll_do_awake(ll);
302 spin_unlock_irqrestore(&ll->hcill_lock, flags);
313 struct ll_struct *ll = hu->priv;
321 spin_lock_irqsave(&ll->hcill_lock, flags);
324 switch (ll->hcill_state) {
327 skb_queue_tail(&ll->txq, skb);
332 skb_queue_tail(&ll->tx_wait_q, skb);
338 ll->hcill_state = HCILL_ASLEEP_TO_AWAKE;
343 skb_queue_tail(&ll->tx_wait_q, skb);
347 ll->hcill_state);
352 spin_unlock_irqrestore(&ll->hcill_lock, flags);
360 struct ll_struct *ll = hu->priv;
370 ll->hcill_state);
427 struct ll_struct *ll = hu->priv;
432 ll->rx_skb = h4_recv_buf(hu->hdev, ll->rx_skb, data, count,
434 if (IS_ERR(ll->rx_skb)) {
435 int err = PTR_ERR(ll->rx_skb);
437 ll->rx_skb = NULL;
446 struct ll_struct *ll = hu->priv;
448 return skb_dequeue(&ll->txq);