Home
last modified time | relevance | path

Searched refs:pkt_len (Results 1 – 25 of 143) sorted by relevance

123456

/drivers/isdn/hisax/
Dhisax_debug.h41 dump_packet(const char *name, const u_char *data, int pkt_len) in dump_packet() argument
45 if (pkt_len) { in dump_packet()
48 printk(KERN_DEBUG "%s: length=%d,data=", name, pkt_len); in dump_packet()
50 if (pkt_len > DUMP_HDR_SIZE + DUMP_TLR_SIZE) { in dump_packet()
54 len1 = pkt_len > DUMP_HDR_SIZE ? DUMP_HDR_SIZE : pkt_len; in dump_packet()
62 for (i = pkt_len-DUMP_TLR_SIZE; i < pkt_len; ++i) { in dump_packet()
/drivers/net/ethernet/dec/tulip/
Dinterrupt.c146 short pkt_len; in tulip_poll() local
163 pkt_len = ((status >> 16) & 0x7ff) - 4; in tulip_poll()
177 pkt_len > 1518) { in tulip_poll()
194 if (pkt_len > 1518 || in tulip_poll()
210 if (pkt_len < tulip_rx_copybreak && in tulip_poll()
211 (skb = netdev_alloc_skb(dev, pkt_len + 2)) != NULL) { in tulip_poll()
215 pkt_len, PCI_DMA_FROMDEVICE); in tulip_poll()
218 pkt_len); in tulip_poll()
219 skb_put(skb, pkt_len); in tulip_poll()
221 memcpy(skb_put(skb, pkt_len), in tulip_poll()
[all …]
Dxircom_cb.c1108 short pkt_len = ((status >> 16) & 0x7ff) - 4; in investigate_read_descriptor() local
1112 if (pkt_len > 1518) { in investigate_read_descriptor()
1113 netdev_err(dev, "Packet length %i is bogus\n", pkt_len); in investigate_read_descriptor()
1114 pkt_len = 1518; in investigate_read_descriptor()
1117 skb = netdev_alloc_skb(dev, pkt_len + 2); in investigate_read_descriptor()
1125 pkt_len); in investigate_read_descriptor()
1126 skb_put(skb, pkt_len); in investigate_read_descriptor()
1130 dev->stats.rx_bytes += pkt_len; in investigate_read_descriptor()
/drivers/usb/serial/
Dsafe_serial.c238 int pkt_len; in safe_prepare_write_buffer() local
250 pkt_len = size; in safe_prepare_write_buffer()
251 memset(buf + count, '0', pkt_len - count - trailer_len); in safe_prepare_write_buffer()
253 pkt_len = count + trailer_len; in safe_prepare_write_buffer()
257 buf[pkt_len - 2] = count << 2; in safe_prepare_write_buffer()
258 buf[pkt_len - 1] = 0; in safe_prepare_write_buffer()
261 fcs = fcs_compute10(buf, pkt_len, CRC10_INITFCS); in safe_prepare_write_buffer()
262 buf[pkt_len - 2] |= fcs >> 8; in safe_prepare_write_buffer()
263 buf[pkt_len - 1] |= fcs & 0xff; in safe_prepare_write_buffer()
265 return pkt_len; in safe_prepare_write_buffer()
/drivers/net/wireless/rsi/
Drsi_91x_main.c70 u32 pkt_len, in rsi_prepare_skb() argument
78 if (WARN(!pkt_len, "%s: Dummy pkt received", __func__)) in rsi_prepare_skb()
81 if (pkt_len > (RSI_RCV_BUFFER_LEN * 4)) { in rsi_prepare_skb()
83 __func__, pkt_len); in rsi_prepare_skb()
84 pkt_len = RSI_RCV_BUFFER_LEN * 4; in rsi_prepare_skb()
87 pkt_len -= extended_desc; in rsi_prepare_skb()
88 skb = dev_alloc_skb(pkt_len + FRAME_DESC_SZ); in rsi_prepare_skb()
93 skb_put(skb, pkt_len); in rsi_prepare_skb()
/drivers/net/wireless/ti/wlcore/
Drx.c51 static u32 wlcore_rx_get_align_buf_size(struct wl1271 *wl, u32 pkt_len) in wlcore_rx_get_align_buf_size() argument
54 return ALIGN(pkt_len, WL12XX_BUS_BLOCK_SIZE); in wlcore_rx_get_align_buf_size()
56 return pkt_len; in wlcore_rx_get_align_buf_size()
220 u32 pkt_len, align_pkt_len; in wlcore_rx() local
231 pkt_len = wlcore_rx_get_buf_size(wl, des); in wlcore_rx()
233 pkt_len); in wlcore_rx()
261 pkt_len = wlcore_rx_get_buf_size(wl, des); in wlcore_rx()
271 pkt_len, rx_align, in wlcore_rx()
284 pkt_offset += wlcore_rx_get_align_buf_size(wl, pkt_len); in wlcore_rx()
/drivers/net/wireless/ath/ath5k/
Ddesc.c77 unsigned int pkt_len, unsigned int hdr_len, in ath5k_hw_setup_2word_tx_desc() argument
118 frame_len = pkt_len - padsize + FCS_LEN; in ath5k_hw_setup_2word_tx_desc()
129 pkt_len = roundup(pkt_len, 4); in ath5k_hw_setup_2word_tx_desc()
131 if (pkt_len & ~AR5K_2W_TX_DESC_CTL1_BUF_LEN) in ath5k_hw_setup_2word_tx_desc()
134 tx_ctl->tx_control_1 = pkt_len & AR5K_2W_TX_DESC_CTL1_BUF_LEN; in ath5k_hw_setup_2word_tx_desc()
243 unsigned int pkt_len, unsigned int hdr_len, in ath5k_hw_setup_4word_tx_desc() argument
294 frame_len = pkt_len - padsize + FCS_LEN; in ath5k_hw_setup_4word_tx_desc()
305 pkt_len = roundup(pkt_len, 4); in ath5k_hw_setup_4word_tx_desc()
307 if (pkt_len & ~AR5K_4W_TX_DESC_CTL1_BUF_LEN) in ath5k_hw_setup_4word_tx_desc()
310 txctl1 = pkt_len & AR5K_4W_TX_DESC_CTL1_BUF_LEN; in ath5k_hw_setup_4word_tx_desc()
/drivers/net/wireless/mwifiex/
Dsdio.c388 u8 *buffer, u32 pkt_len, u32 port) in mwifiex_write_data_sync() argument
397 BLOCK_MODE) ? (pkt_len / in mwifiex_write_data_sync()
398 MWIFIEX_SDIO_BLOCK_SIZE) : pkt_len; in mwifiex_write_data_sync()
566 u8 *payload, u32 pkt_len, u32 port) in mwifiex_write_data_to_card() argument
572 ret = mwifiex_write_data_sync(adapter, payload, pkt_len, port); in mwifiex_write_data_to_card()
1090 u32 total_pkt_len, pkt_len; in mwifiex_deaggr_sdio_pkt() local
1112 pkt_len = le16_to_cpu(*(__le16 *)(data + SDIO_HEADER_OFFSET)); in mwifiex_deaggr_sdio_pkt()
1115 if ((pkt_len + SDIO_HEADER_OFFSET) > blk_size) { in mwifiex_deaggr_sdio_pkt()
1119 __func__, pkt_len, blk_size); in mwifiex_deaggr_sdio_pkt()
1122 skb_deaggr = mwifiex_alloc_dma_align_buf(pkt_len, in mwifiex_deaggr_sdio_pkt()
[all …]
Dutil.c386 u16 pkt_len; in mwifiex_process_mgmt_packet() local
402 skb_pull(skb, sizeof(pkt_len)); in mwifiex_process_mgmt_packet()
404 pkt_len = le16_to_cpu(rx_pd->rx_pkt_length); in mwifiex_process_mgmt_packet()
409 pkt_len, rx_pd)) in mwifiex_process_mgmt_packet()
415 pkt_len - sizeof(struct ieee80211_hdr)); in mwifiex_process_mgmt_packet()
417 pkt_len -= ETH_ALEN + sizeof(pkt_len); in mwifiex_process_mgmt_packet()
418 rx_pd->rx_pkt_length = cpu_to_le16(pkt_len); in mwifiex_process_mgmt_packet()
421 CAL_RSSI(rx_pd->snr, rx_pd->nf), skb->data, pkt_len, in mwifiex_process_mgmt_packet()
/drivers/net/wireless/mediatek/mt7601u/
Dtx.c101 int pkt_len = (unsigned long)info->status.status_driver_data[0]; in mt7601u_tx_skb_remove_dma_overhead() local
107 skb_trim(skb, pkt_len); in mt7601u_tx_skb_remove_dma_overhead()
140 int pkt_len) in mt7601u_push_txwi() argument
191 pkt_len |= MT76_SET(MT_TXWI_LEN_PKTID, pkt_id); in mt7601u_push_txwi()
192 txwi->len_ctl = cpu_to_le16(pkt_len); in mt7601u_push_txwi()
207 int pkt_len = skb->len; in mt7601u_tx() local
211 info->status.status_driver_data[0] = (void *)(unsigned long)pkt_len; in mt7601u_tx()
227 txwi = mt7601u_push_txwi(dev, skb, sta, wcid, pkt_len); in mt7601u_tx()
/drivers/net/wireless/libertas/
Dtx.c70 uint16_t pkt_len; in lbs_hard_start_xmit() local
115 pkt_len = skb->len; in lbs_hard_start_xmit()
125 pkt_len -= sizeof(*rtap_hdr); in lbs_hard_start_xmit()
134 txpd->tx_packet_length = cpu_to_le16(pkt_len); in lbs_hard_start_xmit()
146 priv->tx_pending_len = pkt_len + sizeof(struct txpd); in lbs_hard_start_xmit()
/drivers/net/appletalk/
Dcops.c747 int pkt_len = 0; in cops_rx() local
782 pkt_len = inb(ioaddr) & 0xFF; in cops_rx()
784 pkt_len = inb(ioaddr) & 0x00FF; in cops_rx()
785 pkt_len |= (inb(ioaddr) << 8); in cops_rx()
790 skb = dev_alloc_skb(pkt_len); in cops_rx()
796 while(pkt_len--) /* Discard packet */ in cops_rx()
802 skb_put(skb, pkt_len); in cops_rx()
805 insb(ioaddr, skb->data, pkt_len); /* Eat the Data */ in cops_rx()
813 if(pkt_len < 0 || pkt_len > MAX_LLAP_SIZE) in cops_rx()
816 dev->name, pkt_len); in cops_rx()
/drivers/staging/rtl8712/
Dxmit_linux.c53 pfile->pkt_len = pfile->buf_len = pktptr->len; in _r8712_open_pktfile()
64 skb_copy_bits(pfile->pkt, pfile->buf_len - pfile->pkt_len, in _r8712_pktfile_read()
67 pfile->pkt_len -= len; in _r8712_pktfile_read()
73 if (pfile->pkt_len == 0) in r8712_endofpktfile()
/drivers/net/hamradio/
Dhdlcdrv.c147 int pkt_len; in hdlc_rx_flag() local
154 pkt_len = s->hdlcrx.len - 2 + 1; /* KISS kludge */ in hdlc_rx_flag()
155 if (!(skb = dev_alloc_skb(pkt_len))) { in hdlc_rx_flag()
160 cp = skb_put(skb, pkt_len); in hdlc_rx_flag()
162 memcpy(cp, s->hdlcrx.buffer, pkt_len - 1); in hdlc_rx_flag()
270 int pkt_len; in hdlcdrv_transmitter() local
313 pkt_len = skb->len-1; /* strip KISS byte */ in hdlcdrv_transmitter()
314 if (pkt_len >= HDLCDRV_MAXFLEN || pkt_len < 2) { in hdlcdrv_transmitter()
322 pkt_len); in hdlcdrv_transmitter()
325 append_crc_ccitt(s->hdlctx.buffer, pkt_len); in hdlcdrv_transmitter()
[all …]
/drivers/net/caif/
Dcaif_spi.c530 int pkt_len = 0; in cfspi_rxfrm() local
542 pkt_len = *src; in cfspi_rxfrm()
543 pkt_len |= ((*(src+1)) << 8) & 0xFF00; in cfspi_rxfrm()
544 pkt_len += 2; /* Add FCS fields. */ in cfspi_rxfrm()
548 skb = netdev_alloc_skb(cfspi->ndev, pkt_len + 1); in cfspi_rxfrm()
551 dst = skb_put(skb, pkt_len); in cfspi_rxfrm()
552 memcpy(dst, src, pkt_len); in cfspi_rxfrm()
553 src += pkt_len; in cfspi_rxfrm()
568 cfspi->ndev->stats.rx_bytes += pkt_len; in cfspi_rxfrm()
576 epad = PAD_POW2((pkt_len + spad), spi_down_tail_align); in cfspi_rxfrm()
/drivers/input/touchscreen/
Dusbtouchscreen.c1334 int pkt_len, pos, buf_len, tmp; in usbtouch_process_multi() local
1339 pkt_len = usbtouch->type->get_pkt_len( in usbtouch_process_multi()
1343 if (unlikely(!pkt_len)) in usbtouch_process_multi()
1347 if (unlikely(pkt_len < 0)) { in usbtouch_process_multi()
1348 int append = -pkt_len; in usbtouch_process_multi()
1356 pkt_len = usbtouch->type->get_pkt_len( in usbtouch_process_multi()
1358 if (pkt_len < 0) in usbtouch_process_multi()
1363 tmp = pkt_len - usbtouch->buf_len; in usbtouch_process_multi()
1367 usbtouch_process_pkt(usbtouch, usbtouch->buffer, pkt_len); in usbtouch_process_multi()
1380 pkt_len = usbtouch->type->get_pkt_len(buffer + pos, in usbtouch_process_multi()
[all …]
/drivers/net/ethernet/8390/
Dlib8390.c664 int pkt_len, pkt_stat; in ei_receive() local
695 pkt_len = rx_frame.count - sizeof(struct e8390_pkt_hdr); in ei_receive()
698 next_frame = this_frame + 1 + ((pkt_len+4)>>8); in ei_receive()
713 if (pkt_len < 60 || pkt_len > 1518) { in ei_receive()
723 skb = netdev_alloc_skb(dev, pkt_len + 2); in ei_receive()
727 pkt_len); in ei_receive()
732 skb_put(skb, pkt_len); /* Make room */ in ei_receive()
733 ei_block_input(dev, pkt_len, skb, current_offset + sizeof(rx_frame)); in ei_receive()
738 dev->stats.rx_bytes += pkt_len; in ei_receive()
/drivers/net/ethernet/3com/
D3c515.c1294 short pkt_len = rx_status & 0x1fff; in corkscrew_rx() local
1297 skb = netdev_alloc_skb(dev, pkt_len + 5 + 2); in corkscrew_rx()
1300 pkt_len, rx_status); in corkscrew_rx()
1305 skb_put(skb, pkt_len), in corkscrew_rx()
1306 (pkt_len + 3) >> 2); in corkscrew_rx()
1311 dev->stats.rx_bytes += pkt_len; in corkscrew_rx()
1318 pr_debug("%s: Couldn't allocate a sk_buff of size %d.\n", dev->name, pkt_len); in corkscrew_rx()
1359 short pkt_len = rx_status & 0x1fff; in boomerang_rx() local
1362 dev->stats.rx_bytes += pkt_len; in boomerang_rx()
1365 pkt_len, rx_status); in boomerang_rx()
[all …]
/drivers/staging/rtl8188eu/os_dep/
Dxmit_linux.c42 pfile->pkt_len = pktptr->len; in _rtw_open_pktfile()
58 skb_copy_bits(pfile->pkt, pfile->buf_len-pfile->pkt_len, rmem, len); in _rtw_pktfile_read()
61 pfile->pkt_len -= len; in _rtw_pktfile_read()
69 return pfile->pkt_len == 0; in rtw_endofpktfile()
Dusb_ops_linux.c25 static void interrupt_handler_8188eu(struct adapter *adapt, u16 pkt_len, u8 *pbuf) in interrupt_handler_8188eu() argument
29 if (pkt_len != INTERRUPT_MSG_FORMAT_LEN) { in interrupt_handler_8188eu()
30 DBG_88E("%s Invalid interrupt content length (%d)!\n", __func__, pkt_len); in interrupt_handler_8188eu()
96 pkt_offset = RXDESC_SIZE + pattrib->drvinfo_sz + pattrib->shift_sz + pattrib->pkt_len; in recvbuf2recvframe()
98 if ((pattrib->pkt_len <= 0) || (pkt_offset > transfer_len)) { in recvbuf2recvframe()
112 skb_len = pattrib->pkt_len; in recvbuf2recvframe()
188 pattrib->pkt_len, in recvbuf2recvframe()
193 interrupt_handler_8188eu(adapt, pattrib->pkt_len, precvframe->rx_data); in recvbuf2recvframe()
/drivers/staging/rtl8188eu/hal/
Drtl8188e_rxdesc.c97 pattrib->pkt_len = (u16)(le32_to_cpu(report.rxdw0) & 0x00003fff);/* u16)prxreport->pktlen; */ in update_recvframe_attrib_88e()
121 pattrib->pkt_len = TX_RPT1_PKT_LEN; in update_recvframe_attrib_88e()
124 pattrib->pkt_len = (u16)(le32_to_cpu(report.rxdw0) & 0x3FF);/* Rx length[9:0] */ in update_recvframe_attrib_88e()
134 pattrib->pkt_len = (u16)(le32_to_cpu(report.rxdw0) & 0x00003fff);/* u16)prxreport->pktlen; */ in update_recvframe_attrib_88e()
/drivers/net/ethernet/cavium/liquidio/
Docteon_droq.c587 u32 pkt_len = 0; in octeon_droq_fast_process_packets() local
621 pkt_len = (u32)info->length; in octeon_droq_fast_process_packets()
627 skb_put(nicbuf, pkt_len); in octeon_droq_fast_process_packets()
634 pkt_len = 0; in octeon_droq_fast_process_packets()
638 while (pkt_len < info->length) { in octeon_droq_fast_process_packets()
641 cpy_len = ((pkt_len + in octeon_droq_fast_process_packets()
644 ((u32)info->length - pkt_len) : in octeon_droq_fast_process_packets()
663 pkt_len += cpy_len; in octeon_droq_fast_process_packets()
673 nicbuf, pkt_len, in octeon_droq_fast_process_packets()
/drivers/net/ethernet/amd/
Dsun3lance.c807 short pkt_len = (head->msg_length & 0xfff) - 4; in lance_rx() local
810 if (pkt_len < 60) { in lance_rx()
815 skb = netdev_alloc_skb(dev, pkt_len + 2); in lance_rx()
836 pkt_len, data); in lance_rx()
841 … printk( "%s: RX pkt %d type 0x%04x len %d\n ", dev->name, entry, ((u_short *)data)[6], pkt_len); in lance_rx()
846 skb_put( skb, pkt_len ); /* Make room */ in lance_rx()
849 pkt_len); in lance_rx()
854 dev->stats.rx_bytes += pkt_len; in lance_rx()
/drivers/net/ethernet/samsung/sxgbe/
Dsxgbe_desc.h46 } pkt_len; member
109 u32 pkt_len:14; member
171 int buf1_len, int pkt_len, int cksum);
/drivers/misc/
Dhpilo.c438 int err, found, cnt, pkt_id, pkt_len; in ilo_read() local
463 &pkt_len, &pkt); in ilo_read()
474 if (pkt_len < len) in ilo_read()
475 len = pkt_len; in ilo_read()
488 int err, pkt_id, pkt_len; in ilo_write() local
498 if (!ilo_pkt_dequeue(hw, driver_ccb, SENDQ, &pkt_id, &pkt_len, &pkt)) in ilo_write()
502 if (pkt_len < len) in ilo_write()
503 len = pkt_len; in ilo_write()

123456