Lines Matching refs:skb

70 static int wl1251_tx_id(struct wl1251 *wl, struct sk_buff *skb)  in wl1251_tx_id()  argument
76 wl->tx_frames[i] = skb; in wl1251_tx_id()
148 static int wl1251_tx_fill_hdr(struct wl1251 *wl, struct sk_buff *skb, in wl1251_tx_fill_hdr() argument
156 if (!skb) in wl1251_tx_fill_hdr()
159 id = wl1251_tx_id(wl, skb); in wl1251_tx_fill_hdr()
163 fc = *(u16 *)skb->data; in wl1251_tx_fill_hdr()
164 tx_hdr = (struct tx_double_buffer_desc *) skb_push(skb, in wl1251_tx_fill_hdr()
167 tx_hdr->length = cpu_to_le16(skb->len - sizeof(*tx_hdr)); in wl1251_tx_fill_hdr()
173 tx_hdr->xmit_queue = wl1251_tx_get_queue(skb_get_queue_mapping(skb)); in wl1251_tx_fill_hdr()
182 static int wl1251_tx_send_packet(struct wl1251 *wl, struct sk_buff *skb, in wl1251_tx_send_packet() argument
189 if (!skb) in wl1251_tx_send_packet()
192 tx_hdr = (struct tx_double_buffer_desc *) skb->data; in wl1251_tx_send_packet()
201 fc = *(__le16 *)(skb->data + sizeof(*tx_hdr)); in wl1251_tx_send_packet()
207 pos = skb_push(skb, WL1251_TKIP_IV_SPACE); in wl1251_tx_send_packet()
216 if (unlikely((long)skb->data & 0x03)) { in wl1251_tx_send_packet()
217 int offset = (4 - (long)skb->data) & 0x03; in wl1251_tx_send_packet()
221 if (skb_cloned(skb) || (skb_tailroom(skb) < offset)) { in wl1251_tx_send_packet()
222 struct sk_buff *newskb = skb_copy_expand(skb, 0, 3, in wl1251_tx_send_packet()
232 dev_kfree_skb_any(skb); in wl1251_tx_send_packet()
233 wl->tx_frames[tx_hdr->id] = skb = newskb; in wl1251_tx_send_packet()
235 offset = (4 - (long)skb->data) & 0x03; in wl1251_tx_send_packet()
241 unsigned char *src = skb->data; in wl1251_tx_send_packet()
242 skb_reserve(skb, offset); in wl1251_tx_send_packet()
243 memmove(skb->data, src, skb->len); in wl1251_tx_send_packet()
244 tx_hdr = (struct tx_double_buffer_desc *) skb->data; in wl1251_tx_send_packet()
249 len = WL1251_TX_ALIGN(skb->len); in wl1251_tx_send_packet()
257 wl1251_mem_write(wl, addr, skb->data, len); in wl1251_tx_send_packet()
260 "queue %d", tx_hdr->id, skb, tx_hdr->length, in wl1251_tx_send_packet()
306 static int wl1251_tx_frame(struct wl1251 *wl, struct sk_buff *skb) in wl1251_tx_frame() argument
312 info = IEEE80211_SKB_CB(skb); in wl1251_tx_frame()
334 ret = wl1251_tx_fill_hdr(wl, skb, info); in wl1251_tx_frame()
338 ret = wl1251_tx_send_packet(wl, skb, info); in wl1251_tx_frame()
350 struct sk_buff *skb; in wl1251_tx_work() local
359 while ((skb = skb_dequeue(&wl->tx_queue))) { in wl1251_tx_work()
367 ret = wl1251_tx_frame(wl, skb); in wl1251_tx_work()
369 skb_queue_head(&wl->tx_queue, skb); in wl1251_tx_work()
372 dev_kfree_skb(skb); in wl1251_tx_work()
416 struct sk_buff *skb; in wl1251_tx_packet_cb() local
420 skb = wl->tx_frames[result->id]; in wl1251_tx_packet_cb()
421 if (skb == NULL) { in wl1251_tx_packet_cb()
426 info = IEEE80211_SKB_CB(skb); in wl1251_tx_packet_cb()
440 frame = skb_pull(skb, sizeof(struct tx_double_buffer_desc)); in wl1251_tx_packet_cb()
443 hdrlen = ieee80211_get_hdrlen_from_skb(skb); in wl1251_tx_packet_cb()
445 skb_pull(skb, WL1251_TKIP_IV_SPACE); in wl1251_tx_packet_cb()
450 result->id, skb, result->ack_failures, result->rate, in wl1251_tx_packet_cb()
454 ieee80211_tx_status(wl->hw, skb); in wl1251_tx_packet_cb()
565 struct sk_buff *skb; in wl1251_tx_flush() local
571 while ((skb = skb_dequeue(&wl->tx_queue))) { in wl1251_tx_flush()
572 info = IEEE80211_SKB_CB(skb); in wl1251_tx_flush()
574 wl1251_debug(DEBUG_TX, "flushing skb 0x%p", skb); in wl1251_tx_flush()
579 ieee80211_tx_status(wl->hw, skb); in wl1251_tx_flush()
584 skb = wl->tx_frames[i]; in wl1251_tx_flush()
585 info = IEEE80211_SKB_CB(skb); in wl1251_tx_flush()
590 ieee80211_tx_status(wl->hw, skb); in wl1251_tx_flush()