/linux-4.1.27/include/uapi/linux/tc_act/ |
H A D | tc_mirred.h | 8 #define TCA_EGRESS_REDIR 1 /* packet redirect to EGRESS*/ 9 #define TCA_EGRESS_MIRROR 2 /* mirror packet to EGRESS */ 10 #define TCA_INGRESS_REDIR 3 /* packet redirect to INGRESS*/ 11 #define TCA_INGRESS_MIRROR 4 /* mirror packet to INGRESS */
|
/linux-4.1.27/drivers/gpu/drm/amd/amdkfd/ |
H A D | kfd_packet_manager.c | 119 struct pm4_runlist *packet; pm_create_runlist() local 123 packet = (struct pm4_runlist *)buffer; pm_create_runlist() 126 packet->header.u32all = build_pm4_header(IT_RUN_LIST, pm_create_runlist() 129 packet->bitfields4.ib_size = ib_size_in_dwords; pm_create_runlist() 130 packet->bitfields4.chain = chain ? 1 : 0; pm_create_runlist() 131 packet->bitfields4.offload_polling = 0; pm_create_runlist() 132 packet->bitfields4.valid = 1; pm_create_runlist() 133 packet->ordinal2 = lower_32_bits(ib); pm_create_runlist() 134 packet->bitfields3.ib_base_hi = upper_32_bits(ib); pm_create_runlist() 142 struct pm4_map_process *packet; pm_create_map_process() local 148 packet = (struct pm4_map_process *)buffer; pm_create_map_process() 154 packet->header.u32all = build_pm4_header(IT_MAP_PROCESS, pm_create_map_process() 156 packet->bitfields2.diq_enable = (qpd->is_debug) ? 1 : 0; pm_create_map_process() 157 packet->bitfields2.process_quantum = 1; pm_create_map_process() 158 packet->bitfields2.pasid = qpd->pqm->process->pasid; pm_create_map_process() 159 packet->bitfields3.page_table_base = qpd->page_table_base; pm_create_map_process() 160 packet->bitfields10.gds_size = qpd->gds_size; pm_create_map_process() 161 packet->bitfields10.num_gws = qpd->num_gws; pm_create_map_process() 162 packet->bitfields10.num_oac = qpd->num_oac; pm_create_map_process() 166 packet->bitfields10.num_queues = num_queues; pm_create_map_process() 168 packet->sh_mem_config = qpd->sh_mem_config; pm_create_map_process() 169 packet->sh_mem_bases = qpd->sh_mem_bases; pm_create_map_process() 170 packet->sh_mem_ape1_base = qpd->sh_mem_ape1_base; pm_create_map_process() 171 packet->sh_mem_ape1_limit = qpd->sh_mem_ape1_limit; pm_create_map_process() 173 packet->gds_addr_lo = lower_32_bits(qpd->gds_context_area); pm_create_map_process() 174 packet->gds_addr_hi = upper_32_bits(qpd->gds_context_area); pm_create_map_process() 182 struct pm4_map_queues *packet; pm_create_map_queue() local 188 packet = (struct pm4_map_queues *)buffer; pm_create_map_queue() 191 packet->header.u32all = build_pm4_header(IT_MAP_QUEUES, pm_create_map_queue() 193 packet->bitfields2.alloc_format = pm_create_map_queue() 195 packet->bitfields2.num_queues = 1; pm_create_map_queue() 196 packet->bitfields2.queue_sel = pm_create_map_queue() 199 packet->bitfields2.vidmem = (q->properties.is_interop) ? pm_create_map_queue() 206 packet->bitfields2.engine_sel = pm_create_map_queue() 210 packet->bitfields2.engine_sel = pm_create_map_queue() 218 packet->mes_map_queues_ordinals[0].bitfields3.doorbell_offset = pm_create_map_queue() 221 packet->mes_map_queues_ordinals[0].mqd_addr_lo = pm_create_map_queue() 224 packet->mes_map_queues_ordinals[0].mqd_addr_hi = pm_create_map_queue() 227 packet->mes_map_queues_ordinals[0].wptr_addr_lo = pm_create_map_queue() 230 packet->mes_map_queues_ordinals[0].wptr_addr_hi = pm_create_map_queue() 265 /* build the run list ib packet */ list_for_each_entry() 268 /* build map process packet */ list_for_each_entry() 344 struct pm4_set_resources *packet; pm_send_set_resources() local 352 sizeof(*packet) / sizeof(uint32_t), pm_send_set_resources() 353 (unsigned int **)&packet); pm_send_set_resources() 354 if (packet == NULL) { pm_send_set_resources() 360 memset(packet, 0, sizeof(struct pm4_set_resources)); pm_send_set_resources() 361 packet->header.u32all = build_pm4_header(IT_SET_RESOURCES, pm_send_set_resources() 364 packet->bitfields2.queue_type = pm_send_set_resources() 366 packet->bitfields2.vmid_mask = res->vmid_mask; pm_send_set_resources() 367 packet->bitfields2.unmap_latency = KFD_UNMAP_LATENCY; pm_send_set_resources() 368 packet->bitfields7.oac_mask = res->oac_mask; pm_send_set_resources() 369 packet->bitfields8.gds_heap_base = res->gds_heap_base; pm_send_set_resources() 370 packet->bitfields8.gds_heap_size = res->gds_heap_size; pm_send_set_resources() 372 packet->gws_mask_lo = lower_32_bits(res->gws_mask); pm_send_set_resources() 373 packet->gws_mask_hi = upper_32_bits(res->gws_mask); pm_send_set_resources() 375 packet->queue_mask_lo = lower_32_bits(res->queue_mask); pm_send_set_resources() 376 packet->queue_mask_hi = upper_32_bits(res->queue_mask); pm_send_set_resources() 434 struct pm4_query_status *packet; pm_send_query_status() local 442 (unsigned int **)&packet); pm_send_query_status() 446 packet->header.u32all = build_pm4_header(IT_QUERY_STATUS, pm_send_query_status() 449 packet->bitfields2.context_id = 0; pm_send_query_status() 450 packet->bitfields2.interrupt_sel = pm_send_query_status() 452 packet->bitfields2.command = pm_send_query_status() 455 packet->addr_hi = upper_32_bits((uint64_t)fence_address); pm_send_query_status() 456 packet->addr_lo = lower_32_bits((uint64_t)fence_address); pm_send_query_status() 457 packet->data_hi = upper_32_bits((uint64_t)fence_value); pm_send_query_status() 458 packet->data_lo = lower_32_bits((uint64_t)fence_value); pm_send_query_status() 477 struct pm4_unmap_queues *packet; pm_send_unmap_queue() local 489 packet = (struct pm4_unmap_queues *)buffer; pm_send_unmap_queue() 492 packet->header.u32all = build_pm4_header(IT_UNMAP_QUEUES, pm_send_unmap_queue() 497 packet->bitfields2.engine_sel = pm_send_unmap_queue() 501 packet->bitfields2.engine_sel = pm_send_unmap_queue() 510 packet->bitfields2.action = pm_send_unmap_queue() 513 packet->bitfields2.action = pm_send_unmap_queue() 518 packet->bitfields2.queue_sel = pm_send_unmap_queue() 520 packet->bitfields2.num_queues = 1; pm_send_unmap_queue() 521 packet->bitfields3b.doorbell_offset0 = filter_param; pm_send_unmap_queue() 524 packet->bitfields2.queue_sel = pm_send_unmap_queue() 526 packet->bitfields3a.pasid = filter_param; pm_send_unmap_queue() 529 packet->bitfields2.queue_sel = pm_send_unmap_queue()
|
/linux-4.1.27/include/net/caif/ |
H A D | cfpkt.h | 13 /* Create a CAIF packet. 14 * len: Length of packet to be created 15 * @return New packet. 26 * Extract header from packet. 36 * Peek header from packet. 37 * Reads data from packet without changing packet. 47 * Extract header from trailer (end of packet). 57 * Add header to packet. 68 * Add trailer to packet. 79 * Pad trailer on packet. 80 * Moves data pointer in packet, no content copied. 89 * Add a single byte to packet body (tail). 98 * Add a data to packet body (tail). 101 * data Pointer to data to copy into the packet body. 108 * Checks whether there are more data to process in packet. 110 * @return true if more data are available in packet false otherwise 115 * Checks whether the packet is erroneous, 116 * i.e. if it has been attempted to extract more data than available in packet 124 * Get the packet length. 126 * @return Number of bytes in packet. 131 * Set the packet length, by adjusting the trailer pointer according to length. 134 * @return Number of bytes in packet. 139 * cfpkt_append - Appends a packet's data to another packet. 147 * @return The new appended packet. 153 * cfpkt_split - Split a packet into two packets at the specified split point. 155 * pos: Position to split packet in two parts. 156 * @return The new packet, containing the second part of the data. 161 * Iteration function, iterates the packet buffers from start to end. 178 /* Map from a "native" packet (e.g. Linux Socket Buffer) to a CAIF packet. 179 * dir - Direction indicating whether this packet is to be sent or received. 180 * nativepkt - The native packet to be transformed to a CAIF packet 185 /* Map from a CAIF packet to a "native" packet (e.g. Linux Socket Buffer). 186 * pkt - The CAIF packet to be transformed into a "native" packet. 187 * @return The native packet transformed from a CAIF packet. 192 * Returns packet information for a packet. 198 /** cfpkt_set_prio - set priority for a CAIF packet. 200 * @pkt: The CAIF packet to be adjusted.
|
H A D | caif_layer.h | 105 * Indicate if a packet is to be sent out or to be received in. 106 * @CAIF_DIR_IN: Incoming packet received. 107 * @CAIF_DIR_OUT: Outgoing packet to be transmitted. 143 * layer->up->receive(layer->up, packet); 146 * layer->dn->transmit(layer->dn, info, packet); 158 * - The CAIF packet (cfpkt) ownership is passed to the 160 * packet cannot be accessed after passing it to the 163 * - If parsing of the packet fails, the packet must be 167 * -EILSEQ, the packet is not freed. 184 * CAIF packet downwards in the stack. 186 * - The CAIF packet (cfpkt) ownership is passed to the 187 * transmit function. This means that the the packet 191 * - Upon error the packet ownership is still passed on, 192 * so the packet shall be freed where error is detected. 256 * packet. 264 * struct caif_payload_info - Payload information embedded in packet (sk_buff). 271 * Used by mux to insert channel id into the caif packet.
|
/linux-4.1.27/drivers/media/platform/vivid/ |
H A D | vivid-vbi-gen.c | 188 static void vivid_vbi_gen_set_time_of_day(u8 *packet) vivid_vbi_gen_set_time_of_day() argument 194 packet[0] = calc_parity(0x07); vivid_vbi_gen_set_time_of_day() 195 packet[1] = calc_parity(0x01); vivid_vbi_gen_set_time_of_day() 196 packet[2] = calc_parity(0x40 | tm.tm_min); vivid_vbi_gen_set_time_of_day() 197 packet[3] = calc_parity(0x40 | tm.tm_hour); vivid_vbi_gen_set_time_of_day() 198 packet[4] = calc_parity(0x40 | tm.tm_mday); vivid_vbi_gen_set_time_of_day() 201 packet[4] = calc_parity(0x60 | tm.tm_mday); vivid_vbi_gen_set_time_of_day() 202 packet[5] = calc_parity(0x40 | (1 + tm.tm_mon)); vivid_vbi_gen_set_time_of_day() 203 packet[6] = calc_parity(0x40 | (1 + tm.tm_wday)); vivid_vbi_gen_set_time_of_day() 204 packet[7] = calc_parity(0x40 | ((tm.tm_year - 90) & 0x3f)); vivid_vbi_gen_set_time_of_day() 205 packet[8] = calc_parity(0x0f); vivid_vbi_gen_set_time_of_day() 207 checksum += packet[i] & 0x7f; vivid_vbi_gen_set_time_of_day() 208 packet[9] = calc_parity(0x100 - checksum); vivid_vbi_gen_set_time_of_day() 210 packet[10] = calc_parity(0x07); vivid_vbi_gen_set_time_of_day() 211 packet[11] = calc_parity(0x04); vivid_vbi_gen_set_time_of_day() 213 packet[12] = calc_parity(0x40 | ((sys_tz.tz_minuteswest / 60) & 0x1f)); vivid_vbi_gen_set_time_of_day() 215 packet[12] = calc_parity(0x40 | ((24 + sys_tz.tz_minuteswest / 60) & 0x1f)); vivid_vbi_gen_set_time_of_day() 216 packet[13] = calc_parity(0); vivid_vbi_gen_set_time_of_day() 217 packet[14] = calc_parity(0x0f); vivid_vbi_gen_set_time_of_day() 219 checksum += packet[i] & 0x7f; vivid_vbi_gen_set_time_of_day() 220 packet[15] = calc_parity(0x100 - checksum); vivid_vbi_gen_set_time_of_day() 228 static void vivid_vbi_gen_teletext(u8 *packet, unsigned line, unsigned frame) vivid_vbi_gen_teletext() argument 233 packet[0] = hamming[1 + ((line & 1) << 3)]; vivid_vbi_gen_teletext() 234 packet[1] = hamming[line >> 1]; vivid_vbi_gen_teletext() 235 memset(packet + 2, 0x20, 40); vivid_vbi_gen_teletext() 238 packet[2] = hamming[frame % 10]; vivid_vbi_gen_teletext() 239 packet[3] = hamming[frame / 10]; vivid_vbi_gen_teletext() 240 packet[4] = hamming[0]; vivid_vbi_gen_teletext() 241 packet[5] = hamming[0]; vivid_vbi_gen_teletext() 242 packet[6] = hamming[0]; vivid_vbi_gen_teletext() 243 packet[7] = hamming[0]; vivid_vbi_gen_teletext() 244 packet[8] = hamming[0]; vivid_vbi_gen_teletext() 245 packet[9] = hamming[1]; vivid_vbi_gen_teletext() 248 packet += offset; vivid_vbi_gen_teletext() 249 memcpy(packet, "Page: 100 Row: 10", 17); vivid_vbi_gen_teletext() 250 packet[7] = '0' + frame / 10; vivid_vbi_gen_teletext() 251 packet[8] = '0' + frame % 10; vivid_vbi_gen_teletext() 252 packet[15] = '0' + line / 10; vivid_vbi_gen_teletext() 253 packet[16] = '0' + line % 10; vivid_vbi_gen_teletext() 255 packet[i] = calc_parity(packet[i]); vivid_vbi_gen_teletext()
|
/linux-4.1.27/include/uapi/linux/ |
H A D | net_tstamp.h | 56 * No outgoing packet will need hardware time stamping; 57 * should a packet arrive which asks for it, no hardware 64 * the sender of the packet decides which are to be 66 * before sending the packet. 82 /* time stamp no incoming packet at all */ 85 /* time stamp any incoming packet */ 91 /* PTP v1, UDP, any kind of event packet */ 93 /* PTP v1, UDP, Sync packet */ 95 /* PTP v1, UDP, Delay_req packet */ 97 /* PTP v2, UDP, any kind of event packet */ 99 /* PTP v2, UDP, Sync packet */ 101 /* PTP v2, UDP, Delay_req packet */ 104 /* 802.AS1, Ethernet, any kind of event packet */ 106 /* 802.AS1, Ethernet, Sync packet */ 108 /* 802.AS1, Ethernet, Delay_req packet */ 111 /* PTP v2/802.AS1, any layer, any kind of event packet */ 113 /* PTP v2/802.AS1, any layer, Sync packet */ 115 /* PTP v2/802.AS1, any layer, Delay_req packet */
|
H A D | netfilter_bridge.h | 15 /* If the packet is destined for this box. */ 17 /* If the packet is destined for another interface. */
|
H A D | ip6_tunnel.h | 9 /* don't add encapsulation limit if one isn't present in inner packet */ 11 /* copy the traffic class field from the inner packet */ 13 /* copy the flowlabel from the inner packet */ 17 /* copy DSCP from the outer packet */ 19 /* copy fwmark from inner packet */
|
H A D | gen_stats.h | 18 * struct gnet_stats_basic - byte/packet throughput statistics 34 * @pps: current packet rate 44 * @pps: current packet rate
|
H A D | ppp_defs.h | 46 #define PPP_COMP 0xfd /* compressed packet */ 80 NPMODE_PASS, /* pass the packet through */ 81 NPMODE_DROP, /* silently drop the packet */ 137 struct compstat c; /* packet compression statistics */ 138 struct compstat d; /* packet decompression statistics */ 143 * the last NP packet was sent or received. 146 __kernel_time_t xmit_idle; /* time since last NP packet sent */ 147 __kernel_time_t recv_idle; /* time since last NP packet received */
|
H A D | if_ether.h | 42 #define ETH_P_LOOP 0x0060 /* Ethernet Loopback packet */ 43 #define ETH_P_PUP 0x0200 /* Xerox PUP packet */ 44 #define ETH_P_PUPAT 0x0201 /* Xerox PUP Addr Trans packet */ 45 #define ETH_P_IP 0x0800 /* Internet Protocol packet */ 47 #define ETH_P_ARP 0x0806 /* Address Resolution packet */ 49 #define ETH_P_IEEEPUP 0x0a00 /* Xerox IEEE802.3 PUP packet */ 50 #define ETH_P_IEEEPUPAT 0x0a01 /* Xerox IEEE802.3 PUP Addr Trans packet */ 51 #define ETH_P_BATMAN 0x4305 /* B.A.T.M.A.N.-Advanced packet [ NOT AN OFFICIALLY REGISTERED ID ] */ 61 #define ETH_P_RARP 0x8035 /* Reverse Addr Res packet */ 93 #define ETH_P_LOOPBACK 0x9000 /* Ethernet loopback packet, per IEEE 802.3 */ 109 #define ETH_P_ALL 0x0003 /* Every packet (be careful!!!) */ 140 __be16 h_proto; /* packet type ID field */
|
H A D | firewire-cdev.h | 97 * struct fw_cdev_event_response - Sent when a response packet was received 179 * request but will not actually send a response packet. 206 * struct fw_cdev_event_iso_interrupt - Sent when an iso packet was completed 210 * @cycle: Cycle counter of the last completed packet 219 * up to the next interrupt packet.) 225 * the interrupt packet. The format of the timestamps is as described below for 231 * packet are returned in the @header field. The amount of header data per 232 * packet is as specified at iso context creation by 240 * Since version 2 of this ABI, the portion for each packet in _interrupt.header 241 * consists of the 1394 isochronous packet header, followed by a timestamp 243 * from the packet payload if &fw_cdev_create_iso_context.header_size > 8. 245 * Format of 1394 iso packet header: 16 bits data_length, 2 bits tag, 6 bits 247 * data_length is the actual received size of the packet without the four 248 * 1394 iso packet header bytes. 278 * The buffer is continuously filled with the following data, per packet: 279 * - the 1394 iso packet header as described at &fw_cdev_event_iso_interrupt, 281 * - packet payload (as many bytes as specified in the data_length field of 282 * the 1394 iso packet header) in big endian byte order, 287 * Hence the per-packet size is data_length (rounded up to a multiple of 4) + 8. 288 * When processing the data, stop before a packet that would cross the 291 * A packet near the end of a buffer chunk will typically spill over into the 293 * for this condition, assemble a broken-up packet from its parts, and not to 294 * re-queue any buffer chunks in which as yet unread packet parts reside. 332 * struct fw_cdev_event_phy_packet - A PHY packet was transmitted or received 341 * except in case of a ping packet: Then, @length is 4, and @data[0] is the 345 * consists of the two PHY packet quadlets, in host byte order. 439 * (2.6.33) - IR has always packet-per-buffer semantics now, not one of 440 * dual-buffer or packet-per-buffer depending on hardware 491 * struct fw_cdev_send_request - Send an asynchronous request packet 497 * @generation: The bus generation where packet is valid 515 * struct fw_cdev_send_response - Send an asynchronous response packet 730 * struct fw_cdev_iso_packet - Isochronous packet 737 * &struct fw_cdev_iso_packet is used to describe isochronous packet queues. 744 * bytes in @header that will be prepended to the packet's payload. These bytes 748 * The @control.SY and TAG fields are copied to the iso packet header. These 751 * The @control.SKIP flag specifies that no packet is to be sent in a frame. 754 * When a packet with the @control.INTERRUPT flag set has been completed, an 766 * packet with a sy field is received which matches &fw_cdev_start_iso.sync. 769 * one packet (in addition to payload quadlets that have been defined as headers 773 * be written to, not even by the next packet. I.e., packets received in 778 * When a packet with the @control.INTERRUPT flag set has been completed, an 780 * multiple receive packets is completed when its last packet is completed. 813 * of a mmap()'ed payload buffer. As part of transmit packet descriptors, 976 * struct fw_cdev_send_stream_packet - send an asynchronous stream packet 983 * @generation: The bus generation where packet is valid 986 * The %FW_CDEV_IOC_SEND_STREAM_PACKET ioctl sends an asynchronous stream packet 1003 * struct fw_cdev_send_phy_packet - send a PHY packet 1004 * @closure: Passed back to userspace in the PHY-packet-sent event 1005 * @data: First and second quadlet of the PHY packet 1006 * @generation: The bus generation where packet is valid 1008 * The %FW_CDEV_IOC_SEND_PHY_PACKET ioctl sends a PHY packet to all nodes 1026 * @closure: Passed back to userspace in phy packet events
|
H A D | dccp.h | 8 * struct dccp_hdr - generic part of DCCP packet header 10 * @dccph_sport - Relevant port on the endpoint that sent this packet 14 * @dccph_cscov - Parts of the packet that are covered by the Checksum field 17 * @dccph_type - packet type, see DCCP_PKT_ prefixed macros 50 * struct dccp_hdr_ext - the low bits of a 48 bit seq packet 52 * @dccph_seq_low - low 24 bits of a 48 bit seq packet
|
H A D | pg.h | 5 pg.h defines the user interface to the generic ATAPI packet 49 char packet[12]; /* packet command */ member in struct:pg_write_hdr
|
H A D | pktcdvd.h | 27 * How long we should hold a non-full packet before starting data gathering. 99 __u32 pkt_dev; /* in/out: Device nr for packet device */ 105 * packet ioctls
|
H A D | auto_fs4.h | 92 /* Daemon notification packet types */ 99 /* Kernel protocol version 4 packet types */ 104 /* Kernel protocol version 5 packet types */ 129 /* autofs v5 common packet struct */
|
H A D | if_x25.h | 2 * Linux X.25 packet to device interface
|
H A D | hdlcdrv.h | 2 * hdlcdrv.h -- HDLC packet radio network driver. 3 * The Linux soundcard driver for 1200 baud and 9600 baud packet radio
|
H A D | netfilter_decnet.h | 31 /* If the packet is destined for this box. */ 33 /* If the packet is destined for another interface. */
|
H A D | netfilter_ipv4.h | 46 /* If the packet is destined for this box. */ 48 /* If the packet is destined for another interface. */
|
H A D | netfilter_ipv6.h | 50 /* If the packet is destined for this box. */ 52 /* If the packet is destined for another interface. */
|
H A D | ppp-comp.h | 2 * ppp-comp.h - Definitions for doing PPP packet compression. 32 * Parts of a CCP packet.
|
H A D | openvswitch.h | 113 __u64 tx_errors; /* packet transmit problems */ 140 OVS_PACKET_CMD_EXECUTE /* Apply actions to a packet. */ 146 * packet as received, from the start of the Ethernet header onward. For 149 * the flow key extracted from the packet as originally received. 151 * extracted from the packet as nested %OVS_KEY_ATTR_* attributes. This allows 154 * @OVS_PACKET_ATTR_ACTIONS: Contains actions for the packet. Used 164 * extracted from the packet as nested %OVS_TUNNEL_KEY_ATTR_* attributes. 336 OVS_TUNNEL_KEY_ATTR_CSUM, /* No argument. CSUM packet. */ 450 * the system monotonic clock, at which a packet was last processed for this 451 * flow. Only present in notifications if a packet has been processed for this 511 * Executes the specified actions with the given probability on a per-packet 596 * @OVS_ACTION_ATTR_OUTPUT: Output packet to port. 597 * @OVS_ACTION_ATTR_USERSPACE: Send packet to userspace according to nested 605 * is copied from the value to the packet header field, rest of the bits are 609 * packet. 610 * @OVS_ACTION_ATTR_POP_VLAN: Pop the outermost 802.1Q header off the packet. 616 * indicate the new packet contents. 618 * packet's MPLS label stack. Set the encapsulating frame's ethertype to 619 * indicate the new packet contents. This could potentially still be
|
/linux-4.1.27/drivers/input/mouse/ |
H A D | touchkit_ps2.c | 49 #define TOUCHKIT_GET_TOUCHED(packet) (((packet)[0]) & 0x01) 50 #define TOUCHKIT_GET_X(packet) (((packet)[1] << 7) | (packet)[2]) 51 #define TOUCHKIT_GET_Y(packet) (((packet)[3] << 7) | (packet)[4]) 55 unsigned char *packet = psmouse->packet; touchkit_ps2_process_byte() local 61 input_report_abs(dev, ABS_X, TOUCHKIT_GET_X(packet)); touchkit_ps2_process_byte() 62 input_report_abs(dev, ABS_Y, TOUCHKIT_GET_Y(packet)); touchkit_ps2_process_byte() 63 input_report_key(dev, BTN_TOUCH, TOUCHKIT_GET_TOUCHED(packet)); touchkit_ps2_process_byte()
|
H A D | lifebook.c | 7 * TouchScreen detection, absolute mode setting and packet layout is taken from 139 unsigned char *packet = psmouse->packet; lifebook_process_byte() local 140 bool relative_packet = packet[0] & 0x08; lifebook_process_byte() 148 return (packet[0] & 0xf8) == 0x00 ? lifebook_process_byte() 153 return ((packet[2] & 0x30) << 2) == (packet[2] & 0xc0) ? lifebook_process_byte() 156 return (packet[3] & 0xf8) == 0xc0 ? lifebook_process_byte() 159 return (packet[4] & 0xc0) == (packet[2] & 0xc0) ? lifebook_process_byte() 162 if (((packet[5] & 0x30) << 2) != (packet[5] & 0xc0)) lifebook_process_byte() 164 if ((packet[5] & 0xc0) != (packet[1] & 0xc0)) lifebook_process_byte() 173 "got relative packet but no relative device set up\n"); lifebook_process_byte() 177 ((packet[1] & 0x3f) << 6) | (packet[2] & 0x3f)); lifebook_process_byte() 179 4096 - (((packet[4] & 0x3f) << 6) | (packet[5] & 0x3f))); lifebook_process_byte() 182 (packet[1] | ((packet[0] & 0x30) << 4))); lifebook_process_byte() 184 1024 - (packet[2] | ((packet[0] & 0xC0) << 2))); lifebook_process_byte() 186 input_report_key(dev1, BTN_TOUCH, packet[0] & 0x04); lifebook_process_byte() 193 ((packet[0] & 0x10) ? packet[1] - 256 : packet[1])); lifebook_process_byte() 195 -(int)((packet[0] & 0x20) ? packet[2] - 256 : packet[2])); lifebook_process_byte() 197 input_report_key(dev2, BTN_LEFT, packet[0] & 0x01); lifebook_process_byte() 198 input_report_key(dev2, BTN_RIGHT, packet[0] & 0x02); lifebook_process_byte() 345 * Use packet size = 3 even when using 6-byte protocol because lifebook_init()
|
H A D | elantech.c | 221 * Dump a complete mouse movement packet to the syslog 227 psmouse_printk(KERN_DEBUG, psmouse, "PS/2 packet ["); elantech_packet_dump() 229 printk("%s0x%02x ", i ? ", " : " ", psmouse->packet[i]); elantech_packet_dump() 241 unsigned char *packet = psmouse->packet; elantech_report_absolute_v1() local 249 fingers = ((packet[1] & 0x80) >> 7) + elantech_report_absolute_v1() 250 ((packet[1] & 0x30) >> 4); elantech_report_absolute_v1() 256 fingers = (packet[0] & 0xc0) >> 6; elantech_report_absolute_v1() 265 elantech_debug("discarding packet\n"); elantech_report_absolute_v1() 278 ((packet[1] & 0x0c) << 6) | packet[2]); elantech_report_absolute_v1() 280 etd->y_max - (((packet[1] & 0x03) << 8) | packet[3])); elantech_report_absolute_v1() 286 input_report_key(dev, BTN_LEFT, packet[0] & 0x01); elantech_report_absolute_v1() 287 input_report_key(dev, BTN_RIGHT, packet[0] & 0x02); elantech_report_absolute_v1() 292 input_report_key(dev, BTN_FORWARD, packet[0] & 0x40); elantech_report_absolute_v1() 294 input_report_key(dev, BTN_BACK, packet[0] & 0x80); elantech_report_absolute_v1() 329 unsigned char *packet = psmouse->packet; elantech_report_absolute_v2() local 334 fingers = (packet[0] & 0xc0) >> 6; elantech_report_absolute_v2() 342 if (packet[3] & 0x80) elantech_report_absolute_v2() 350 x1 = ((packet[1] & 0x0f) << 8) | packet[2]; elantech_report_absolute_v2() 355 y1 = etd->y_max - (((packet[4] & 0x0f) << 8) | packet[5]); elantech_report_absolute_v2() 357 pres = (packet[1] & 0xf0) | ((packet[4] & 0xf0) >> 4); elantech_report_absolute_v2() 358 width = ((packet[0] & 0x30) >> 2) | ((packet[3] & 0x30) >> 4); elantech_report_absolute_v2() 368 x1 = (((packet[0] & 0x10) << 4) | packet[1]) << 2; elantech_report_absolute_v2() 371 ((((packet[0] & 0x20) << 3) | packet[2]) << 2); elantech_report_absolute_v2() 376 x2 = (((packet[3] & 0x10) << 4) | packet[4]) << 2; elantech_report_absolute_v2() 379 ((((packet[3] & 0x20) << 3) | packet[5]) << 2); elantech_report_absolute_v2() 397 input_report_key(dev, BTN_LEFT, packet[0] & 0x01); elantech_report_absolute_v2() 398 input_report_key(dev, BTN_RIGHT, packet[0] & 0x02); elantech_report_absolute_v2() 427 unsigned char *packet = psmouse->packet; elantech_report_trackpoint() local 431 t = get_unaligned_le32(&packet[0]); elantech_report_trackpoint() 438 x = packet[4] - (int)((packet[1]^0x80) << 1); elantech_report_trackpoint() 439 y = (int)((packet[2]^0x80) << 1) - packet[5]; elantech_report_trackpoint() 441 input_report_key(tp_dev, BTN_LEFT, packet[0] & 0x01); elantech_report_trackpoint() 442 input_report_key(tp_dev, BTN_RIGHT, packet[0] & 0x02); elantech_report_trackpoint() 443 input_report_key(tp_dev, BTN_MIDDLE, packet[0] & 0x04); elantech_report_trackpoint() 453 /* Dump unexpected packet sequences if debug=1 (default) */ elantech_report_trackpoint() 470 unsigned char *packet = psmouse->packet; elantech_report_absolute_v3() local 475 fingers = (packet[0] & 0xc0) >> 6; elantech_report_absolute_v3() 484 x1 = ((packet[1] & 0x0f) << 8) | packet[2]; elantech_report_absolute_v3() 489 y1 = etd->y_max - (((packet[4] & 0x0f) << 8) | packet[5]); elantech_report_absolute_v3() 498 etd->mt[0].x = ((packet[1] & 0x0f) << 8) | packet[2]; elantech_report_absolute_v3() 504 (((packet[4] & 0x0f) << 8) | packet[5]); elantech_report_absolute_v3() 506 * wait for next packet elantech_report_absolute_v3() 514 x2 = ((packet[1] & 0x0f) << 8) | packet[2]; elantech_report_absolute_v3() 515 y2 = etd->y_max - (((packet[4] & 0x0f) << 8) | packet[5]); elantech_report_absolute_v3() 519 pres = (packet[1] & 0xf0) | ((packet[4] & 0xf0) >> 4); elantech_report_absolute_v3() 520 width = ((packet[0] & 0x30) >> 2) | ((packet[3] & 0x30) >> 4); elantech_report_absolute_v3() 534 input_report_key(dev, BTN_LEFT, packet[0] & 0x03); elantech_report_absolute_v3() 536 input_report_key(dev, BTN_LEFT, packet[0] & 0x01); elantech_report_absolute_v3() 537 input_report_key(dev, BTN_RIGHT, packet[0] & 0x02); elantech_report_absolute_v3() 550 unsigned char *packet = psmouse->packet; elantech_input_sync_v4() local 554 input_report_key(dev, BTN_LEFT, packet[0] & 0x03); elantech_input_sync_v4() 556 input_report_key(dev, BTN_LEFT, packet[0] & 0x01); elantech_input_sync_v4() 557 input_report_key(dev, BTN_RIGHT, packet[0] & 0x02); elantech_input_sync_v4() 558 input_report_key(dev, BTN_MIDDLE, packet[0] & 0x04); elantech_input_sync_v4() 568 unsigned char *packet = psmouse->packet; process_packet_status_v4() local 573 fingers = packet[1] & 0x1f; process_packet_status_v4() 588 unsigned char *packet = psmouse->packet; process_packet_head_v4() local 589 int id = ((packet[3] & 0xe0) >> 5) - 1; process_packet_head_v4() 595 etd->mt[id].x = ((packet[1] & 0x0f) << 8) | packet[2]; process_packet_head_v4() 596 etd->mt[id].y = etd->y_max - (((packet[4] & 0x0f) << 8) | packet[5]); process_packet_head_v4() 597 pres = (packet[1] & 0xf0) | ((packet[4] & 0xf0) >> 4); process_packet_head_v4() 598 traces = (packet[0] & 0xf0) >> 4; process_packet_head_v4() 617 unsigned char *packet = psmouse->packet; process_packet_motion_v4() local 621 id = ((packet[0] & 0xe0) >> 5) - 1; process_packet_motion_v4() 625 sid = ((packet[3] & 0xe0) >> 5) - 1; process_packet_motion_v4() 626 weight = (packet[0] & 0x10) ? ETP_WEIGHT_VALUE : 1; process_packet_motion_v4() 632 delta_x1 = (signed char)packet[1]; process_packet_motion_v4() 633 delta_y1 = (signed char)packet[2]; process_packet_motion_v4() 634 delta_x2 = (signed char)packet[4]; process_packet_motion_v4() 635 delta_y2 = (signed char)packet[5]; process_packet_motion_v4() 680 unsigned char *packet = psmouse->packet; elantech_packet_check_v1() local 686 p1 = (packet[0] & 0x20) >> 5; elantech_packet_check_v1() 687 p2 = (packet[0] & 0x10) >> 4; elantech_packet_check_v1() 690 p1 = (packet[0] & 0x10) >> 4; elantech_packet_check_v1() 691 p2 = (packet[0] & 0x20) >> 5; elantech_packet_check_v1() 694 p3 = (packet[0] & 0x04) >> 2; elantech_packet_check_v1() 696 return etd->parity[packet[1]] == p1 && elantech_packet_check_v1() 697 etd->parity[packet[2]] == p2 && elantech_packet_check_v1() 698 etd->parity[packet[3]] == p3; elantech_packet_check_v1() 704 * When we encounter packet that matches this exactly, it means the elantech_debounce_check_v2() 705 * hardware is in debounce status. Just ignore the whole packet. elantech_debounce_check_v2() 708 unsigned char *packet = psmouse->packet; elantech_debounce_check_v2() local 710 return !memcmp(packet, debounce_packet, sizeof(debounce_packet)); elantech_debounce_check_v2() 716 unsigned char *packet = psmouse->packet; elantech_packet_check_v2() local 728 return (packet[0] & 0x0c) == 0x04 && elantech_packet_check_v2() 729 (packet[3] & 0x0f) == 0x02; elantech_packet_check_v2() 731 if ((packet[0] & 0xc0) == 0x80) elantech_packet_check_v2() 732 return (packet[0] & 0x0c) == 0x0c && elantech_packet_check_v2() 733 (packet[3] & 0x0e) == 0x08; elantech_packet_check_v2() 735 return (packet[0] & 0x3c) == 0x3c && elantech_packet_check_v2() 736 (packet[1] & 0xf0) == 0x00 && elantech_packet_check_v2() 737 (packet[3] & 0x3e) == 0x38 && elantech_packet_check_v2() 738 (packet[4] & 0xf0) == 0x00; elantech_packet_check_v2() 742 * We check the constant bits to determine what packet type we get, 743 * so packet checking is mandatory for v3 and later hardware. 749 unsigned char *packet = psmouse->packet; elantech_packet_check_v3() local 755 if (!memcmp(packet, debounce_packet, sizeof(debounce_packet))) elantech_packet_check_v3() 763 if ((packet[3] & 0x09) == 0x08) elantech_packet_check_v3() 766 if ((packet[3] & 0x09) == 0x09) elantech_packet_check_v3() 769 if ((packet[0] & 0x0c) == 0x04 && (packet[3] & 0xcf) == 0x02) elantech_packet_check_v3() 772 if ((packet[0] & 0x0c) == 0x0c && (packet[3] & 0xce) == 0x0c) elantech_packet_check_v3() 774 if ((packet[3] & 0x0f) == 0x06) elantech_packet_check_v3() 784 unsigned char *packet = psmouse->packet; elantech_packet_check_v4() local 785 unsigned char packet_type = packet[3] & 0x03; elantech_packet_check_v4() 788 if (etd->tp_dev && (packet[3] & 0x0f) == 0x06) elantech_packet_check_v4() 792 * Sanity check based on the constant bits of a packet. elantech_packet_check_v4() 795 * every packet, regardless of the type. elantech_packet_check_v4() 798 sanity_check = ((packet[3] & 0x08) == 0x00); elantech_packet_check_v4() 800 sanity_check = ((packet[0] & 0x0c) == 0x04 && elantech_packet_check_v4() 801 (packet[3] & 0x1c) == 0x10); elantech_packet_check_v4() 1571 /* Turn on packet checking by default */ elantech_set_properties()
|
H A D | logips2pp.c | 39 * Process a PS2++ or PS2T++ packet. 45 unsigned char *packet = psmouse->packet; ps2pp_process_byte() local 51 * Full packet accumulated, process it ps2pp_process_byte() 54 if ((packet[0] & 0x48) == 0x48 && (packet[1] & 0x02) == 0x02) { ps2pp_process_byte() 56 /* Logitech extended packet */ ps2pp_process_byte() 57 switch ((packet[1] >> 4) | (packet[0] & 0x30)) { ps2pp_process_byte() 61 input_report_rel(dev, packet[2] & 0x80 ? REL_HWHEEL : REL_WHEEL, ps2pp_process_byte() 62 (int) (packet[2] & 8) - (int) (packet[2] & 7)); ps2pp_process_byte() 63 input_report_key(dev, BTN_SIDE, (packet[2] >> 4) & 1); ps2pp_process_byte() 64 input_report_key(dev, BTN_EXTRA, (packet[2] >> 5) & 1); ps2pp_process_byte() 70 input_report_key(dev, BTN_SIDE, (packet[2]) & 1); ps2pp_process_byte() 71 input_report_key(dev, BTN_EXTRA, (packet[2] >> 1) & 1); ps2pp_process_byte() 72 input_report_key(dev, BTN_BACK, (packet[2] >> 3) & 1); ps2pp_process_byte() 73 input_report_key(dev, BTN_FORWARD, (packet[2] >> 4) & 1); ps2pp_process_byte() 74 input_report_key(dev, BTN_TASK, (packet[2] >> 2) & 1); ps2pp_process_byte() 80 input_report_rel(dev, packet[2] & 0x08 ? REL_HWHEEL : REL_WHEEL, ps2pp_process_byte() 81 (int) ((packet[2] >> 4) & 8) - (int) ((packet[2] >> 4) & 7)); ps2pp_process_byte() 82 packet[0] = packet[2] | 0x08; ps2pp_process_byte() 87 "Received PS2++ packet #%x, but don't know how to handle.\n", ps2pp_process_byte() 88 (packet[1] >> 4) | (packet[0] & 0x30)); ps2pp_process_byte() 93 input_report_rel(dev, REL_X, packet[1] ? (int) packet[1] - (int) ((packet[0] << 4) & 0x100) : 0); ps2pp_process_byte() 94 input_report_rel(dev, REL_Y, packet[2] ? (int) ((packet[0] << 3) & 0x100) - (int) packet[2] : 0); ps2pp_process_byte() 97 input_report_key(dev, BTN_LEFT, packet[0] & 1); ps2pp_process_byte() 98 input_report_key(dev, BTN_MIDDLE, (packet[0] >> 2) & 1); ps2pp_process_byte() 99 input_report_key(dev, BTN_RIGHT, (packet[0] >> 1) & 1); ps2pp_process_byte()
|
H A D | focaltech.c | 81 * following absolute position packet for the finger where the 149 unsigned char *packet) focaltech_process_touch_packet() 153 unsigned char fingers = packet[1]; focaltech_process_touch_packet() 156 state->pressed = (packet[0] >> 4) & 1; focaltech_process_touch_packet() 173 unsigned char *packet) focaltech_process_abs_packet() 179 finger = (packet[1] >> 4) - 1; focaltech_process_abs_packet() 181 psmouse_err(psmouse, "Invalid finger in abs packet: %d\n", focaltech_process_abs_packet() 186 state->pressed = (packet[0] >> 4) & 1; focaltech_process_abs_packet() 188 state->fingers[finger].x = ((packet[1] & 0xf) << 8) | packet[2]; focaltech_process_abs_packet() 189 state->fingers[finger].y = (packet[3] << 8) | packet[4]; focaltech_process_abs_packet() 194 unsigned char *packet) focaltech_process_rel_packet() 200 state->pressed = packet[0] >> 7; focaltech_process_rel_packet() 201 finger1 = ((packet[0] >> 4) & 0x7) - 1; focaltech_process_rel_packet() 203 state->fingers[finger1].x += (char)packet[1]; focaltech_process_rel_packet() 204 state->fingers[finger1].y += (char)packet[2]; focaltech_process_rel_packet() 206 psmouse_err(psmouse, "First finger in rel packet invalid: %d\n", focaltech_process_rel_packet() 212 * packet only contains one finger. In this case, the second focaltech_process_rel_packet() 213 * finger index in the packet is 0 (we subtract 1 in the lines focaltech_process_rel_packet() 217 finger2 = ((packet[3] >> 4) & 0x7) - 1; focaltech_process_rel_packet() 219 state->fingers[finger2].x += (char)packet[4]; focaltech_process_rel_packet() 220 state->fingers[finger2].y += (char)packet[5]; focaltech_process_rel_packet() 226 unsigned char *packet = psmouse->packet; focaltech_process_packet() local 228 switch (packet[0] & 0xf) { focaltech_process_packet() 230 focaltech_process_touch_packet(psmouse, packet); focaltech_process_packet() 234 focaltech_process_abs_packet(psmouse, packet); focaltech_process_packet() 238 focaltech_process_rel_packet(psmouse, packet); focaltech_process_packet() 242 psmouse_err(psmouse, "Unknown packet type: %02x\n", packet[0]); focaltech_process_packet() 251 if (psmouse->pktcnt >= 6) { /* Full packet received */ focaltech_process_byte() 148 focaltech_process_touch_packet(struct psmouse *psmouse, unsigned char *packet) focaltech_process_touch_packet() argument 172 focaltech_process_abs_packet(struct psmouse *psmouse, unsigned char *packet) focaltech_process_abs_packet() argument 193 focaltech_process_rel_packet(struct psmouse *psmouse, unsigned char *packet) focaltech_process_rel_packet() argument
|
H A D | alps.c | 101 #define ALPS_PS2_INTERLEAVED 0x80 /* 3-byte PS/2 packet interleaved with 102 6-byte ALPS packet */ 246 unsigned char *packet = psmouse->packet; alps_process_packet_v1_v2() local 253 left = packet[2] & 0x10; alps_process_packet_v1_v2() 254 right = packet[2] & 0x08; alps_process_packet_v1_v2() 256 x = packet[1] | ((packet[0] & 0x07) << 7); alps_process_packet_v1_v2() 257 y = packet[4] | ((packet[3] & 0x07) << 7); alps_process_packet_v1_v2() 258 z = packet[5]; alps_process_packet_v1_v2() 260 left = packet[3] & 1; alps_process_packet_v1_v2() 261 right = packet[3] & 2; alps_process_packet_v1_v2() 262 middle = packet[3] & 4; alps_process_packet_v1_v2() 263 x = packet[1] | ((packet[2] & 0x78) << (7 - 3)); alps_process_packet_v1_v2() 264 y = packet[4] | ((packet[3] & 0x70) << (7 - 4)); alps_process_packet_v1_v2() 265 z = packet[5]; alps_process_packet_v1_v2() 269 back = packet[0] & 0x10; alps_process_packet_v1_v2() 270 forward = packet[2] & 4; alps_process_packet_v1_v2() 274 back = packet[3] & 4; alps_process_packet_v1_v2() 275 forward = packet[2] & 4; alps_process_packet_v1_v2() 280 ges = packet[2] & 1; alps_process_packet_v1_v2() 281 fin = packet[2] & 2; alps_process_packet_v1_v2() 295 left |= packet[0] & 1; alps_process_packet_v1_v2() 296 right |= packet[0] & 2; alps_process_packet_v1_v2() 297 middle |= packet[0] & 4; alps_process_packet_v1_v2() 334 input_report_rel(dev, REL_WHEEL, ((packet[2] << 1) & 0x08) - ((packet[0] >> 4) & 0x07)); alps_process_packet_v1_v2() 342 input_report_key(dev, BTN_0, packet[2] & 4); alps_process_packet_v1_v2() 343 input_report_key(dev, BTN_1, packet[0] & 0x10); alps_process_packet_v1_v2() 344 input_report_key(dev, BTN_2, packet[3] & 4); alps_process_packet_v1_v2() 345 input_report_key(dev, BTN_3, packet[0] & 0x20); alps_process_packet_v1_v2() 544 unsigned char *packet = psmouse->packet; alps_process_trackstick_packet_v3() local 548 /* It should be a DualPoint when received trackstick packet */ alps_process_trackstick_packet_v3() 551 "Rejected trackstick packet from non DualPoint device"); alps_process_trackstick_packet_v3() 555 /* Sanity check packet */ alps_process_trackstick_packet_v3() 556 if (!(packet[0] & 0x40)) { alps_process_trackstick_packet_v3() 557 psmouse_dbg(psmouse, "Bad trackstick packet, discarding\n"); alps_process_trackstick_packet_v3() 562 * There's a special packet that seems to indicate the end alps_process_trackstick_packet_v3() 565 if (packet[1] == 0x7f && packet[2] == 0x7f && packet[4] == 0x7f) alps_process_trackstick_packet_v3() 568 x = (s8)(((packet[0] & 0x20) << 2) | (packet[1] & 0x7f)); alps_process_trackstick_packet_v3() 569 y = (s8)(((packet[0] & 0x10) << 3) | (packet[2] & 0x7f)); alps_process_trackstick_packet_v3() 570 z = (packet[4] & 0x7c) >> 2; alps_process_trackstick_packet_v3() 588 * packet. alps_process_trackstick_packet_v3() 590 left = packet[3] & 0x01; alps_process_trackstick_packet_v3() 591 right = packet[3] & 0x02; alps_process_trackstick_packet_v3() 592 middle = packet[3] & 0x04; alps_process_trackstick_packet_v3() 648 /* Rushmore's packet decode has a bit difference with Pinnacle's */ alps_decode_rushmore() 697 unsigned char *packet = psmouse->packet; alps_process_touchpad_packet_v3_v5() local 704 priv->decode_fields(f, packet, psmouse); alps_process_touchpad_packet_v3_v5() 709 * that a bitmap packet should always follow a position packet with alps_process_touchpad_packet_v3_v5() 710 * bit 6 of packet[4] set. alps_process_touchpad_packet_v3_v5() 714 * Sometimes a position packet will indicate a multi-packet alps_process_touchpad_packet_v3_v5() 716 * packet. Check for this, and when it happens process the alps_process_touchpad_packet_v3_v5() 717 * position packet as usual. alps_process_touchpad_packet_v3_v5() 726 /* Now process position packet */ alps_process_touchpad_packet_v3_v5() 731 * Because Dolphin uses position packet's alps_process_touchpad_packet_v3_v5() 734 * packet decode first. alps_process_touchpad_packet_v3_v5() 763 memcpy(priv->multi_data, packet, sizeof(priv->multi_data)); alps_process_touchpad_packet_v3_v5() 770 * Sometimes the hardware sends a single packet with z = 0 alps_process_touchpad_packet_v3_v5() 791 unsigned char *packet = psmouse->packet; alps_process_packet_v3() local 801 if (packet[5] == 0x3f) { alps_process_packet_v3() 812 unsigned char *packet = psmouse->packet; alps_process_packet_v6() local 818 * We can use Byte5 to distinguish if the packet is from Touchpad alps_process_packet_v6() 823 if (packet[5] == 0x7F) { alps_process_packet_v6() 824 /* It should be a DualPoint when received Trackpoint packet */ alps_process_packet_v6() 827 "Rejected trackstick packet from non DualPoint device"); alps_process_packet_v6() 831 /* Trackpoint packet */ alps_process_packet_v6() 832 x = packet[1] | ((packet[3] & 0x20) << 2); alps_process_packet_v6() 833 y = packet[2] | ((packet[3] & 0x40) << 1); alps_process_packet_v6() 834 z = packet[4]; alps_process_packet_v6() 835 left = packet[3] & 0x01; alps_process_packet_v6() 836 right = packet[3] & 0x02; alps_process_packet_v6() 837 middle = packet[3] & 0x04; alps_process_packet_v6() 855 /* Touchpad packet */ alps_process_packet_v6() 856 x = packet[1] | ((packet[3] & 0x78) << 4); alps_process_packet_v6() 857 y = packet[2] | ((packet[4] & 0x78) << 4); alps_process_packet_v6() 858 z = packet[5]; alps_process_packet_v6() 859 left = packet[3] & 0x01; alps_process_packet_v6() 860 right = packet[3] & 0x02; alps_process_packet_v6() 885 unsigned char *packet = psmouse->packet; alps_process_packet_v4() local 892 * track our position in the bitmap packet. alps_process_packet_v4() 894 if (packet[6] & 0x40) { alps_process_packet_v4() 903 priv->multi_data[offset] = packet[6]; alps_process_packet_v4() 904 priv->multi_data[offset + 1] = packet[7]; alps_process_packet_v4() 920 f->left = !!(packet[4] & 0x01); alps_process_packet_v4() 921 f->right = !!(packet[4] & 0x02); alps_process_packet_v4() 923 f->st.x = ((packet[1] & 0x7f) << 4) | ((packet[3] & 0x30) >> 2) | alps_process_packet_v4() 924 ((packet[0] & 0x30) >> 4); alps_process_packet_v4() 925 f->st.y = ((packet[2] & 0x7f) << 4) | (packet[3] & 0x0f); alps_process_packet_v4() 926 f->pressure = packet[5] & 0x7f; alps_process_packet_v4() 935 return (psmouse->packet[2] & 0x40) == 0x40; alps_is_valid_package_v7() 937 return (psmouse->packet[3] & 0x48) == 0x48; alps_is_valid_package_v7() 939 return (psmouse->packet[5] & 0x40) == 0x00; alps_is_valid_package_v7() 1043 * touch coordinates we've available in the NEW packet alps_decode_packet_v7() 1046 * non NEW packet comes in alps_decode_packet_v7() 1084 unsigned char *packet = psmouse->packet; alps_process_trackstick_packet_v7() local 1088 /* It should be a DualPoint when received trackstick packet */ alps_process_trackstick_packet_v7() 1091 "Rejected trackstick packet from non DualPoint device"); alps_process_trackstick_packet_v7() 1095 x = ((packet[2] & 0xbf)) | ((packet[3] & 0x10) << 2); alps_process_trackstick_packet_v7() 1096 y = (packet[3] & 0x07) | (packet[4] & 0xb8) | alps_process_trackstick_packet_v7() 1097 ((packet[3] & 0x20) << 1); alps_process_trackstick_packet_v7() 1098 z = (packet[5] & 0x3f) | ((packet[3] & 0x80) >> 1); alps_process_trackstick_packet_v7() 1100 left = (packet[1] & 0x01); alps_process_trackstick_packet_v7() 1101 right = (packet[1] & 0x02) >> 1; alps_process_trackstick_packet_v7() 1102 middle = (packet[1] & 0x04) >> 2; alps_process_trackstick_packet_v7() 1122 if (priv->decode_fields(f, psmouse->packet, psmouse)) alps_process_touchpad_packet_v7() 1138 unsigned char *packet = psmouse->packet; alps_process_packet_v7() local 1140 if (packet[0] == 0x48 && (packet[4] & 0x47) == 0x06) alps_process_packet_v7() 1173 /* Current packet is 1Finger coordinate packet */ alps_decode_ss4_v2() 1258 unsigned char *packet = psmouse->packet; alps_process_packet_ss4_v2() local 1263 priv->decode_fields(f, packet, psmouse); alps_process_packet_ss4_v2() 1266 * Sometimes the first packet will indicate a multi-packet alps_process_packet_ss4_v2() 1267 * sequence, but sometimes the next multi-packet would not alps_process_packet_ss4_v2() 1269 * position packet as usual. alps_process_packet_ss4_v2() 1272 /* Now process the 1st packet */ alps_process_packet_ss4_v2() 1280 * "f.is_mp" would always be '0' after merging the 1st and 2nd packet. alps_process_packet_ss4_v2() 1281 * When it is set, it means 2nd packet comes without 1st packet come. alps_process_packet_ss4_v2() 1286 /* Save the first packet */ alps_process_packet_ss4_v2() 1289 memcpy(priv->multi_data, packet, sizeof(priv->multi_data)); alps_process_packet_ss4_v2() 1309 if (psmouse->pktcnt == 4 && ((psmouse->packet[3] & 0x08) != 0x08)) alps_is_valid_package_ss4_v2() 1311 if (psmouse->pktcnt == 6 && ((psmouse->packet[5] & 0x10) != 0x0)) alps_is_valid_package_ss4_v2() 1386 unsigned char packet[], alps_report_bare_ps2_packet() 1392 /* Figure out which device to use to report the bare packet */ alps_report_bare_ps2_packet() 1399 /* Register dev3 mouse if we received PS/2 packet first time */ alps_report_bare_ps2_packet() 1410 packet[0] & 1, packet[0] & 2, packet[0] & 4); alps_report_bare_ps2_packet() 1413 packet[1] ? packet[1] - ((packet[0] << 4) & 0x100) : 0); alps_report_bare_ps2_packet() 1415 packet[2] ? ((packet[0] << 3) & 0x100) - packet[2] : 0); alps_report_bare_ps2_packet() 1429 * Start a timer to flush the packet if it ends up last alps_handle_interleaved_ps2() 1430 * 6-byte packet in the stream. Timer needs to fire alps_handle_interleaved_ps2() 1440 if (psmouse->packet[6] & 0x80) { alps_handle_interleaved_ps2() 1444 * complete ALPS packet and this is start of the alps_handle_interleaved_ps2() 1445 * next packet or we got garbage. alps_handle_interleaved_ps2() 1448 if (((psmouse->packet[3] | alps_handle_interleaved_ps2() 1449 psmouse->packet[4] | alps_handle_interleaved_ps2() 1450 psmouse->packet[5]) & 0x80) || alps_handle_interleaved_ps2() 1451 (!alps_is_valid_first_byte(priv, psmouse->packet[6]))) { alps_handle_interleaved_ps2() 1453 "refusing packet %4ph (suspected interleaved ps/2)\n", alps_handle_interleaved_ps2() 1454 psmouse->packet + 3); alps_handle_interleaved_ps2() 1460 /* Continue with the next packet */ alps_handle_interleaved_ps2() 1461 psmouse->packet[0] = psmouse->packet[6]; alps_handle_interleaved_ps2() 1468 * packet in the middle of ALPS packet. alps_handle_interleaved_ps2() 1471 * packet followed by 3-byte packet from trackpoint. We alps_handle_interleaved_ps2() 1482 alps_report_bare_ps2_packet(psmouse, &psmouse->packet[3], alps_handle_interleaved_ps2() 1488 * packet again, which may happen if all buttons are alps_handle_interleaved_ps2() 1492 psmouse->packet[3] = psmouse->packet[6] & 0xf7; alps_handle_interleaved_ps2() 1511 * ALPS packet. alps_flush_packet() 1513 if ((psmouse->packet[3] | alps_flush_packet() 1514 psmouse->packet[4] | alps_flush_packet() 1515 psmouse->packet[5]) & 0x80) { alps_flush_packet() 1517 "refusing packet %3ph (suspected interleaved ps/2)\n", alps_flush_packet() 1518 psmouse->packet + 3); alps_flush_packet() 1533 * Check if we are dealing with a bare PS/2 packet, presumably from alps_process_byte() 1537 * Can not distinguish V8's first byte from PS/2 packet's alps_process_byte() 1541 (psmouse->packet[0] & 0xc8) == 0x08) { alps_process_byte() 1544 alps_report_bare_ps2_packet(psmouse, psmouse->packet, alps_process_byte() 1551 /* Check for PS/2 packet stuffed in the middle of ALPS packet. */ alps_process_byte() 1554 psmouse->pktcnt >= 4 && (psmouse->packet[3] & 0x0f) == 0x0f) { alps_process_byte() 1558 if (!alps_is_valid_first_byte(priv, psmouse->packet[0])) { alps_process_byte() 1560 "refusing packet[0] = %x (mask0 = %x, byte0 = %x)\n", alps_process_byte() 1561 psmouse->packet[0], priv->mask0, priv->byte0); alps_process_byte() 1568 (psmouse->packet[psmouse->pktcnt - 1] & 0x80)) { alps_process_byte() 1569 psmouse_dbg(psmouse, "refusing packet[%i] = %x\n", alps_process_byte() 1571 psmouse->packet[psmouse->pktcnt - 1]); alps_process_byte() 1578 * otherwise valid packet with 0xff. Given that the alps_process_byte() 1579 * next packet is very likely to be valid let's alps_process_byte() 1594 psmouse_dbg(psmouse, "refusing packet[%i] = %x\n", alps_process_byte() 1596 psmouse->packet[psmouse->pktcnt - 1]); alps_process_byte() 1906 * alps_poll() - poll the touchpad for current motion packet. 1912 unsigned char buf[sizeof(psmouse->packet)]; alps_poll() 1935 memcpy(psmouse->packet, buf, sizeof(buf)); alps_poll() 2104 * supported by this driver. If bit 1 isn't set the packet alps_setup_trackstick_v3() 2556 /* T.B.D. Decread noise packet number, delete in the future */ alps_hw_init_ss4_v2() 1385 alps_report_bare_ps2_packet(struct psmouse *psmouse, unsigned char packet[], bool report_buttons) alps_report_bare_ps2_packet() argument
|
H A D | sentelic.c | 40 #define GET_ABS_X(packet) ((packet[1] << 2) | ((packet[3] >> 2) & 0x03)) 41 #define GET_ABS_Y(packet) ((packet[2] << 2) | (packet[3] & 0x03)) 420 /* reconfigure horizontal scrolling packet output */ fsp_onpad_hscr() 647 static void fsp_packet_debug(struct psmouse *psmouse, unsigned char packet[]) fsp_packet_debug() argument 655 /* Interpret & dump the packet data. */ fsp_packet_debug() 656 switch (packet[0] >> FSP_PKT_TYPE_SHIFT) { fsp_packet_debug() 659 abs_x = GET_ABS_X(packet); fsp_packet_debug() 660 abs_y = GET_ABS_Y(packet); fsp_packet_debug() 679 packet[0], packet[1], packet[2], packet[3], abs_x, abs_y); fsp_packet_debug() 688 static void fsp_packet_debug(struct psmouse *psmouse, unsigned char packet[]) fsp_packet_debug() argument 708 unsigned char *packet = psmouse->packet; fsp_process_byte() local 717 * Full packet accumulated, process it fsp_process_byte() 720 fsp_packet_debug(psmouse, packet); fsp_process_byte() 722 switch (psmouse->packet[0] >> FSP_PKT_TYPE_SHIFT) { fsp_process_byte() 725 if ((packet[0] == 0x48 || packet[0] == 0x49) && fsp_process_byte() 726 packet[1] == 0 && packet[2] == 0) { fsp_process_byte() 732 packet[3] &= 0xf0; fsp_process_byte() 735 abs_x = GET_ABS_X(packet); fsp_process_byte() 736 abs_y = GET_ABS_Y(packet); fsp_process_byte() 738 if (packet[0] & FSP_PB0_MFMC) { fsp_process_byte() 740 * MFMC packet: assume that there are two fingers on fsp_process_byte() 745 /* MFMC packet */ fsp_process_byte() 746 if (packet[0] & FSP_PB0_MFMC_FGR2) { fsp_process_byte() 775 /* SFAC packet */ fsp_process_byte() 776 if ((packet[0] & (FSP_PB0_LBTN|FSP_PB0_PHY_BTN)) == fsp_process_byte() 782 packet[0] &= ~FSP_PB0_LBTN; fsp_process_byte() 794 if (fgrs == 1 || (fgrs == 2 && !(packet[0] & FSP_PB0_MFMC_FGR2))) { fsp_process_byte() 798 input_report_key(dev, BTN_LEFT, packet[0] & 0x01); fsp_process_byte() 799 input_report_key(dev, BTN_RIGHT, packet[0] & 0x02); fsp_process_byte() 808 packet[0] &= ~FSP_PB0_LBTN; fsp_process_byte() 812 /* normal packet */ fsp_process_byte() 813 /* special packet data translation from on-pad packets */ fsp_process_byte() 814 if (packet[3] != 0) { fsp_process_byte() 815 if (packet[3] & BIT(0)) fsp_process_byte() 817 if (packet[3] & BIT(1)) fsp_process_byte() 819 if (packet[3] & BIT(2)) fsp_process_byte() 821 if (packet[3] & BIT(3)) fsp_process_byte() 823 /* push back to packet queue */ fsp_process_byte() 825 packet[3] = button_status; fsp_process_byte() 826 rscroll = (packet[3] >> 4) & 1; fsp_process_byte() 827 lscroll = (packet[3] >> 5) & 1; fsp_process_byte() 833 (int)(packet[3] & 8) - (int)(packet[3] & 7)); fsp_process_byte() 841 input_report_key(dev, BTN_LEFT, packet[0] & 1); fsp_process_byte() 842 input_report_key(dev, BTN_MIDDLE, (packet[0] >> 2) & 1); fsp_process_byte() 843 input_report_key(dev, BTN_RIGHT, (packet[0] >> 1) & 1); fsp_process_byte() 845 rel_x = packet[1] ? (int)packet[1] - (int)((packet[0] << 4) & 0x100) : 0; fsp_process_byte() 846 rel_y = packet[2] ? (int)((packet[0] << 3) & 0x100) - (int)packet[2] : 0; fsp_process_byte() 879 "Unable to enable 4 bytes packet format.\n"); fsp_activate_protocol()
|
H A D | cypress_ps2.c | 127 memcpy(param, psmouse->packet, pktsize); cypress_ps2_read_cmd_status() 451 unsigned char *packet = psmouse->packet; cypress_parse_packet() local 452 unsigned char header_byte = packet[0]; cypress_parse_packet() 461 ((packet[1] & 0x70) << 4) | packet[2]; cypress_parse_packet() 463 ((packet[1] & 0x07) << 8) | packet[3]; cypress_parse_packet() 465 report_data->contacts[0].z = packet[4]; cypress_parse_packet() 469 ((packet[1] & 0x70) << 4) | packet[2]; cypress_parse_packet() 471 ((packet[1] & 0x07) << 8) | packet[3]; cypress_parse_packet() 473 report_data->contacts[0].z = packet[4]; cypress_parse_packet() 476 ((packet[5] & 0xf0) << 4) | packet[6]; cypress_parse_packet() 478 ((packet[5] & 0x0f) << 8) | packet[7]; cypress_parse_packet() 567 unsigned char *packet = psmouse->packet; cypress_validate_byte() local 573 if (index == 0 && (packet[0] & 0xfc) == 0) { cypress_validate_byte() 574 /* call packet process for reporting finger leave. */ cypress_validate_byte() 580 * Perform validation (and adjust packet size) based only on the cypress_validate_byte() 593 if ((packet[0] & 0x08) == 0x08) cypress_validate_byte() 596 contact_cnt = cypress_get_finger_count(packet[0]); cypress_validate_byte()
|
H A D | alps.h | 34 * enum SS4_PACKET_ID - defines the packet type for V8 109 * enum V7_PACKET_ID - defines the packet type for V7 115 * previous packet. 128 * @byte0: Helps figure out whether a position report packet matches the 181 * struct alps_fields - decoded version of the report packet 188 * @first_mp: Packet is the first of a multi-packet report. 189 * @is_mp: Packet is part of a multi-packet report. 230 * @byte0: Helps figure out whether a position report packet matches the 241 * @process_packet: Protocol-specific function to process a report packet. 242 * @decode_fields: Protocol-specific function to read packet bitfields. 244 * @prev_fin: Finger bit from previous packet. 245 * @multi_packet: Multi-packet data in progress. 246 * @multi_data: Saved multi-packet data. 247 * @f: Decoded packet data fields. 249 * @timer: Timer for flushing out the final report packet in the stream. 287 #define ALPS_QUIRK_TRACKSTICK_BUTTONS 1 /* trakcstick buttons in trackstick packet */
|
H A D | hgpk.c | 64 "delay (ms) before recal after packet spew detected"); 69 "interval (ms) during which recal will be restarted if packet received"); 241 /* we're not spewing, but this packet might be the start */ hgpk_spewing_hack() 263 psmouse_warn(psmouse, "packet spew detected (%d,%d)\n", hgpk_spewing_hack() 309 static bool hgpk_is_byte_valid(struct psmouse *psmouse, unsigned char *packet) hgpk_is_byte_valid() argument 317 valid = (packet[0] & 0x0C) == 0x08; hgpk_is_byte_valid() 322 packet[0] == HGPK_GS : !(packet[pktcnt - 1] & 0x80); hgpk_is_byte_valid() 327 packet[0] == HGPK_PT : !(packet[pktcnt - 1] & 0x80); hgpk_is_byte_valid() 338 priv->mode, pktcnt, 6, psmouse->packet); hgpk_is_byte_valid() 347 unsigned char *packet = psmouse->packet; hgpk_process_advanced_packet() local 348 int down = !!(packet[2] & 2); hgpk_process_advanced_packet() 349 int left = !!(packet[3] & 1); hgpk_process_advanced_packet() 350 int right = !!(packet[3] & 2); hgpk_process_advanced_packet() 351 int x = packet[1] | ((packet[2] & 0x78) << 4); hgpk_process_advanced_packet() 352 int y = packet[4] | ((packet[3] & 0x70) << 3); hgpk_process_advanced_packet() 355 int pt_down = !!(packet[2] & 1); hgpk_process_advanced_packet() 356 int finger_down = !!(packet[2] & 2); hgpk_process_advanced_packet() 357 int z = packet[5]; hgpk_process_advanced_packet() 381 * If this packet says that the finger was removed, reset our position hgpk_process_advanced_packet() 431 unsigned char *packet = psmouse->packet; hgpk_process_simple_packet() local 432 int left = packet[0] & 1; hgpk_process_simple_packet() 433 int right = (packet[0] >> 1) & 1; hgpk_process_simple_packet() 434 int x = packet[1] - ((packet[0] << 4) & 0x100); hgpk_process_simple_packet() 435 int y = ((packet[0] << 3) & 0x100) - packet[2]; hgpk_process_simple_packet() 437 if (packet[0] & 0xc0) hgpk_process_simple_packet() 440 packet[0], packet[1], packet[2]); hgpk_process_simple_packet() 467 if (!hgpk_is_byte_valid(psmouse, psmouse->packet)) hgpk_process_byte() 481 * ugh, got a packet inside our recalibration hgpk_process_byte() 485 "packet inside calibration window, queueing another recalibration\n"); hgpk_process_byte()
|
H A D | psmouse-base.c | 130 * relevant events to the input module once full packet has arrived. 136 unsigned char *packet = psmouse->packet; psmouse_process_byte() local 142 * Full packet accumulated, process it psmouse_process_byte() 150 input_report_rel(dev, REL_WHEEL, -(signed char) packet[3]); psmouse_process_byte() 157 switch (packet[3] & 0xC0) { psmouse_process_byte() 159 input_report_rel(dev, REL_WHEEL, (int) (packet[3] & 32) - (int) (packet[3] & 31)); psmouse_process_byte() 162 input_report_rel(dev, REL_HWHEEL, (int) (packet[3] & 32) - (int) (packet[3] & 31)); psmouse_process_byte() 166 input_report_rel(dev, REL_WHEEL, (int) (packet[3] & 8) - (int) (packet[3] & 7)); psmouse_process_byte() 167 input_report_key(dev, BTN_SIDE, (packet[3] >> 4) & 1); psmouse_process_byte() 168 input_report_key(dev, BTN_EXTRA, (packet[3] >> 5) & 1); psmouse_process_byte() 178 input_report_key(dev, BTN_SIDE, (packet[0] >> 6) & 1); psmouse_process_byte() 179 input_report_key(dev, BTN_EXTRA, (packet[0] >> 7) & 1); psmouse_process_byte() 186 input_report_key(dev, BTN_EXTRA, (packet[0] >> 3) & 1); psmouse_process_byte() 188 packet[1] |= (packet[0] & 0x40) << 1; psmouse_process_byte() 196 input_report_key(dev, BTN_SIDE, (packet[0] >> 3) & 1); psmouse_process_byte() 197 packet[0] |= 0x08; psmouse_process_byte() 204 input_report_key(dev, BTN_LEFT, packet[0] & 1); psmouse_process_byte() 205 input_report_key(dev, BTN_MIDDLE, (packet[0] >> 2) & 1); psmouse_process_byte() 206 input_report_key(dev, BTN_RIGHT, (packet[0] >> 1) & 1); psmouse_process_byte() 208 input_report_rel(dev, REL_X, packet[1] ? (int) packet[1] - (int) ((packet[0] << 4) & 0x100) : 0); psmouse_process_byte() 209 input_report_rel(dev, REL_Y, packet[2] ? (int) ((packet[0] << 3) & 0x100) - (int) packet[2] : 0); psmouse_process_byte() 331 psmouse->badbyte = psmouse->packet[0]; psmouse_interrupt() 337 psmouse->packet[psmouse->pktcnt++] = data; psmouse_interrupt() 341 if (unlikely(psmouse->packet[0] == PSMOUSE_RET_BAT && psmouse->pktcnt <= 2)) { psmouse_interrupt() 347 if (psmouse->packet[1] == PSMOUSE_RET_ID || psmouse_interrupt() 349 psmouse->packet[1] == PSMOUSE_RET_BAT)) { psmouse_interrupt() 361 psmouse->packet[psmouse->pktcnt++] = data; psmouse_interrupt() 370 psmouse->badbyte = psmouse->packet[0]; psmouse_interrupt() 474 return ps2_command(&psmouse->ps2dev, psmouse->packet, psmouse_poll() 1281 * transmitting motion packet. To avoid delay we use ps2_sendbyte() psmouse_resync() 1298 * Poll the mouse. If it was reset the packet will be shorter than psmouse_resync() 1475 * If mouse's packet size is 3 there is no point in polling the psmouse_switch_protocol()
|
/linux-4.1.27/drivers/net/wireless/ath/ath6kl/ |
H A D | htc_pipe.c | 25 struct htc_packet *packet); 29 static inline void restore_tx_packet(struct htc_packet *packet) restore_tx_packet() argument 31 if (packet->info.tx.flags & HTC_FLAGS_TX_FIXUP_NETBUF) { restore_tx_packet() 32 skb_pull(packet->skb, sizeof(struct htc_frame_hdr)); restore_tx_packet() 33 packet->info.tx.flags &= ~HTC_FLAGS_TX_FIXUP_NETBUF; restore_tx_packet() 40 struct htc_packet *packet; do_send_completion() local 65 packet = list_first_entry(queue_to_indicate, do_send_completion() 68 list_del(&packet->list); do_send_completion() 70 "%s: calling ep %d send complete callback on packet 0x%p\n", do_send_completion() 71 __func__, ep->eid, packet); do_send_completion() 72 ep->ep_cb.tx_complete(ep->target, packet); do_send_completion() 78 struct htc_packet *packet) send_packet_completion() 80 struct htc_endpoint *ep = &target->endpoint[packet->endpoint]; send_packet_completion() 83 restore_tx_packet(packet); send_packet_completion() 85 list_add_tail(&packet->list, &container); send_packet_completion() 98 struct htc_packet *packet; get_htc_packet_credit_based() local 109 /* get packet at head, but don't remove it */ get_htc_packet_credit_based() 110 packet = list_first_entry(&ep->txq, struct htc_packet, list); get_htc_packet_credit_based() 113 "%s: got head packet:0x%p , queue depth: %d\n", get_htc_packet_credit_based() 114 __func__, packet, get_queue_depth(&ep->txq)); get_htc_packet_credit_based() 116 transfer_len = packet->act_len + HTC_HDR_LENGTH; get_htc_packet_credit_based() 159 packet = list_first_entry(&ep->txq, struct htc_packet, list); get_htc_packet_credit_based() 161 list_del(&packet->list); get_htc_packet_credit_based() 162 /* save the number of credits this packet consumed */ get_htc_packet_credit_based() 163 packet->info.tx.cred_used = credits_required; get_htc_packet_credit_based() 165 packet->info.tx.flags = send_flags; get_htc_packet_credit_based() 166 packet->info.tx.seqno = ep->seqno; get_htc_packet_credit_based() 168 /* queue this packet into the caller's queue */ get_htc_packet_credit_based() 169 list_add_tail(&packet->list, queue); get_htc_packet_credit_based() 177 struct htc_packet *packet; get_htc_packet() local 186 packet = list_first_entry(&ep->txq, struct htc_packet, list); get_htc_packet() 187 list_del(&packet->list); get_htc_packet() 190 "%s: got packet:0x%p , new queue depth: %d\n", get_htc_packet() 191 __func__, packet, get_queue_depth(&ep->txq)); get_htc_packet() 192 packet->info.tx.seqno = ep->seqno; get_htc_packet() 193 packet->info.tx.flags = 0; get_htc_packet() 194 packet->info.tx.cred_used = 0; get_htc_packet() 197 /* queue this packet into the caller's queue */ get_htc_packet() 198 list_add_tail(&packet->list, queue); get_htc_packet() 211 struct htc_packet *packet; htc_issue_packets() local 218 packet = list_first_entry(pkt_queue, struct htc_packet, list); htc_issue_packets() 219 list_del(&packet->list); htc_issue_packets() 221 skb = packet->skb; htc_issue_packets() 228 payload_len = packet->act_len; htc_issue_packets() 239 packet->info.tx.flags |= HTC_FLAGS_TX_FIXUP_NETBUF; htc_issue_packets() 243 htc_hdr->flags = packet->info.tx.flags; htc_issue_packets() 244 htc_hdr->eid = (u8) packet->endpoint; htc_issue_packets() 246 htc_hdr->ctrl[1] = (u8) packet->info.tx.seqno; htc_issue_packets() 251 list_add_tail(&packet->list, &ep->pipe.tx_lookup_queue); htc_issue_packets() 270 list_del(&packet->list); htc_issue_packets() 273 ep->cred_dist.credits += packet->info.tx.cred_used; htc_issue_packets() 277 list_add(&packet->list, pkt_queue); htc_issue_packets() 287 __func__, packet, status); htc_issue_packets() 290 packet = list_first_entry(pkt_queue, htc_issue_packets() 292 list_del(&packet->list); htc_issue_packets() 293 packet->status = status; htc_issue_packets() 294 send_packet_completion(target, packet); htc_issue_packets() 306 struct htc_packet *packet, *tmp_pkt; htc_try_send() local 371 packet = list_first_entry(txq, htc_try_send() 375 list_move_tail(&packet->list, &send_queue); htc_try_send() 383 list_for_each_entry_safe(packet, tmp_pkt, list_for_each_entry_safe() 387 __func__, packet); list_for_each_entry_safe() 388 action = ep->ep_cb.tx_full(ep->target, packet); list_for_each_entry_safe() 390 /* callback wants the packet dropped */ list_for_each_entry_safe() 396 /* callback wants to keep this packet, list_for_each_entry_safe() 399 list_move_tail(&packet->list, list_for_each_entry_safe() 501 /* htc control packet manipulation */ destroy_htc_txctrl_packet() 502 static void destroy_htc_txctrl_packet(struct htc_packet *packet) destroy_htc_txctrl_packet() argument 505 skb = packet->skb; destroy_htc_txctrl_packet() 507 kfree(packet); destroy_htc_txctrl_packet() 512 struct htc_packet *packet = NULL; build_htc_txctrl_packet() local 515 packet = kzalloc(sizeof(struct htc_packet), GFP_KERNEL); build_htc_txctrl_packet() 516 if (packet == NULL) build_htc_txctrl_packet() 522 kfree(packet); build_htc_txctrl_packet() 525 packet->skb = skb; build_htc_txctrl_packet() 527 return packet; build_htc_txctrl_packet() 531 struct htc_packet *packet) htc_free_txctrl_packet() 533 destroy_htc_txctrl_packet(packet); htc_free_txctrl_packet() 542 struct htc_packet *packet) htc_txctrl_complete() 544 htc_free_txctrl_packet(target, packet); htc_txctrl_complete() 695 struct htc_packet *packet; htc_flush_tx_endpoint() local 699 packet = list_first_entry(&ep->txq, struct htc_packet, list); htc_flush_tx_endpoint() 700 list_del(&packet->list); htc_flush_tx_endpoint() 701 packet->status = 0; htc_flush_tx_endpoint() 702 send_packet_completion(target, packet); htc_flush_tx_endpoint() 710 * skb and lookup it's corresponding HTC packet buffer from a lookup list. 718 struct htc_packet *packet, *tmp_pkt, *found_packet = NULL; htc_lookup_tx_packet() local 725 * so the completed packet should be at the head of the list generally htc_lookup_tx_packet() 727 list_for_each_entry_safe(packet, tmp_pkt, &ep->pipe.tx_lookup_queue, htc_lookup_tx_packet() 730 if (skb == packet->skb) { htc_lookup_tx_packet() 732 list_del(&packet->list); htc_lookup_tx_packet() 733 found_packet = packet; htc_lookup_tx_packet() 748 struct htc_packet *packet; ath6kl_htc_pipe_tx_complete() local 760 packet = htc_lookup_tx_packet(target, ep, skb); ath6kl_htc_pipe_tx_complete() 761 if (packet == NULL) { ath6kl_htc_pipe_tx_complete() 766 packet->status = 0; ath6kl_htc_pipe_tx_complete() 767 send_packet_completion(target, packet); ath6kl_htc_pipe_tx_complete() 775 * non-TX credit case, we recheck after the packet completes ath6kl_htc_pipe_tx_complete() 787 struct htc_packet *packet, *tmp_pkt; htc_send_packets_multiple() local 792 /* get first packet to find out which ep the packets will go into */ htc_send_packets_multiple() 793 packet = list_first_entry(pkt_queue, struct htc_packet, list); htc_send_packets_multiple() 795 if (packet->endpoint >= ENDPOINT_MAX) { htc_send_packets_multiple() 799 ep = &target->endpoint[packet->endpoint]; htc_send_packets_multiple() 805 list_for_each_entry_safe(packet, tmp_pkt, pkt_queue, list) { list_for_each_entry_safe() 806 packet->status = -ENOMEM; list_for_each_entry_safe() 818 struct htc_packet *packet; alloc_htc_packet_container() local 826 packet = target->pipe.htc_packet_pool; alloc_htc_packet_container() 827 target->pipe.htc_packet_pool = (struct htc_packet *) packet->list.next; alloc_htc_packet_container() 831 packet->list.next = NULL; alloc_htc_packet_container() 832 return packet; alloc_htc_packet_container() 836 struct htc_packet *packet) free_htc_packet_container() 843 target->pipe.htc_packet_pool = packet; free_htc_packet_container() 844 packet->list.next = NULL; free_htc_packet_container() 847 packet->list.next = lh; free_htc_packet_container() 848 target->pipe.htc_packet_pool = packet; free_htc_packet_container() 922 struct htc_packet *packet; do_recv_completion() local 931 packet = list_first_entry(queue_to_indicate, do_recv_completion() 933 list_del(&packet->list); do_recv_completion() 934 ep->ep_cb.rx(ep->target, packet); do_recv_completion() 942 struct htc_packet *packet) recv_packet_completion() 946 list_add_tail(&packet->list, &container); recv_packet_completion() 959 struct htc_packet *packet; ath6kl_htc_pipe_rx_complete() local 1029 /* zero length packet with trailer, just drop these */ ath6kl_htc_pipe_rx_complete() 1073 packet = alloc_htc_packet_container(target); ath6kl_htc_pipe_rx_complete() 1074 if (packet == NULL) { ath6kl_htc_pipe_rx_complete() 1079 packet->status = 0; ath6kl_htc_pipe_rx_complete() 1080 packet->endpoint = htc_hdr->eid; ath6kl_htc_pipe_rx_complete() 1081 packet->pkt_cntxt = skb; ath6kl_htc_pipe_rx_complete() 1084 packet->buf = skb_push(skb, 0) + HTC_HDR_LENGTH; ath6kl_htc_pipe_rx_complete() 1085 packet->act_len = netlen - HTC_HDR_LENGTH - trailerlen; ath6kl_htc_pipe_rx_complete() 1093 recv_packet_completion(target, ep, packet); ath6kl_htc_pipe_rx_complete() 1095 /* recover the packet container */ ath6kl_htc_pipe_rx_complete() 1096 free_htc_packet_container(target, packet); ath6kl_htc_pipe_rx_complete() 1109 struct htc_packet *packet; htc_flush_rx_queue() local 1117 packet = list_first_entry(&ep->rx_bufq, htc_flush_rx_queue() 1119 list_del(&packet->list); htc_flush_rx_queue() 1122 packet->status = -ECANCELED; htc_flush_rx_queue() 1123 packet->act_len = 0; htc_flush_rx_queue() 1126 "Flushing RX packet:0x%p, length:%d, ep:%d\n", htc_flush_rx_queue() 1127 packet, packet->buf_len, htc_flush_rx_queue() 1128 packet->endpoint); htc_flush_rx_queue() 1131 list_add_tail(&packet->list, &container); htc_flush_rx_queue() 1133 /* give the packet back */ htc_flush_rx_queue() 1141 /* polling routine to wait for a control packet to be received */ htc_wait_recv_ctrl_message() 1171 struct htc_packet *packet) htc_rxctrl_complete() 1173 struct sk_buff *skb = packet->skb; htc_rxctrl_complete() 1175 if (packet->endpoint == ENDPOINT_0 && htc_rxctrl_complete() 1176 packet->status == -ECANCELED && htc_rxctrl_complete() 1233 struct htc_packet *packet = NULL; ath6kl_htc_pipe_conn_service() local 1264 /* allocate a packet to send to the target */ ath6kl_htc_pipe_conn_service() 1265 packet = htc_alloc_txctrl_packet(target); ath6kl_htc_pipe_conn_service() 1267 if (packet == NULL) { ath6kl_htc_pipe_conn_service() 1273 skb = packet->skb; ath6kl_htc_pipe_conn_service() 1301 set_htc_pkt_info(packet, NULL, (u8 *) conn_msg, ath6kl_htc_pipe_conn_service() 1305 status = ath6kl_htc_pipe_tx(target, packet); ath6kl_htc_pipe_conn_service() 1308 packet = NULL; ath6kl_htc_pipe_conn_service() 1410 if (packet != NULL) ath6kl_htc_pipe_conn_service() 1411 htc_free_txctrl_packet(target, packet); ath6kl_htc_pipe_conn_service() 1421 struct htc_packet *packet; ath6kl_htc_pipe_create() local 1438 packet = kzalloc(sizeof(struct htc_packet), GFP_KERNEL); ath6kl_htc_pipe_create() 1440 if (packet != NULL) ath6kl_htc_pipe_create() 1441 free_htc_packet_container(target, packet); ath6kl_htc_pipe_create() 1474 struct htc_packet *packet; ath6kl_htc_pipe_cleanup() local 1477 packet = alloc_htc_packet_container(target); ath6kl_htc_pipe_cleanup() 1478 if (packet == NULL) ath6kl_htc_pipe_cleanup() 1480 kfree(packet); ath6kl_htc_pipe_cleanup() 1493 struct htc_packet *packet; ath6kl_htc_pipe_start() local 1498 packet = htc_alloc_txctrl_packet(target); ath6kl_htc_pipe_start() 1499 if (packet == NULL) { ath6kl_htc_pipe_start() 1504 skb = packet->skb; ath6kl_htc_pipe_start() 1514 set_htc_pkt_info(packet, NULL, (u8 *) setup, ath6kl_htc_pipe_start() 1520 return ath6kl_htc_pipe_tx(target, packet); ath6kl_htc_pipe_start() 1552 struct htc_packet *packet) ath6kl_htc_pipe_tx() 1558 __func__, packet->endpoint, packet->buf, ath6kl_htc_pipe_tx() 1559 packet->act_len); ath6kl_htc_pipe_tx() 1562 list_add_tail(&packet->list, &queue); ath6kl_htc_pipe_tx() 1637 struct htc_packet *packet, *tmp_pkt, *first; ath6kl_htc_pipe_add_rxbuf_multiple() local 1666 list_for_each_entry_safe(packet, tmp_pkt, pkt_queue, list) { list_for_each_entry_safe() 1667 packet->status = -ECANCELED; list_for_each_entry_safe() 1686 struct htc_packet *packet, *tmp_pkt; ath6kl_htc_pipe_flush_rx_buf() local 1694 list_for_each_entry_safe(packet, tmp_pkt, ath6kl_htc_pipe_flush_rx_buf() 1696 list_del(&packet->list); ath6kl_htc_pipe_flush_rx_buf() 1700 packet, packet->buf_len, ath6kl_htc_pipe_flush_rx_buf() 1701 packet->endpoint); ath6kl_htc_pipe_flush_rx_buf() 1702 dev_kfree_skb(packet->pkt_cntxt); ath6kl_htc_pipe_flush_rx_buf() 77 send_packet_completion(struct htc_target *target, struct htc_packet *packet) send_packet_completion() argument 530 htc_free_txctrl_packet(struct htc_target *target, struct htc_packet *packet) htc_free_txctrl_packet() argument 541 htc_txctrl_complete(struct htc_target *target, struct htc_packet *packet) htc_txctrl_complete() argument 835 free_htc_packet_container(struct htc_target *target, struct htc_packet *packet) free_htc_packet_container() argument 940 recv_packet_completion(struct htc_target *target, struct htc_endpoint *ep, struct htc_packet *packet) recv_packet_completion() argument 1170 htc_rxctrl_complete(struct htc_target *context, struct htc_packet *packet) htc_rxctrl_complete() argument 1551 ath6kl_htc_pipe_tx(struct htc_target *target, struct htc_packet *packet) ath6kl_htc_pipe_tx() argument
|
H A D | htc_mbox.c | 359 static void ath6kl_htc_tx_prep_pkt(struct htc_packet *packet, u8 flags, ath6kl_htc_tx_prep_pkt() argument 364 packet->buf -= HTC_HDR_LENGTH; ath6kl_htc_tx_prep_pkt() 365 hdr = (struct htc_frame_hdr *)packet->buf; ath6kl_htc_tx_prep_pkt() 368 put_unaligned((u16)packet->act_len, &hdr->payld_len); ath6kl_htc_tx_prep_pkt() 370 hdr->eid = packet->endpoint; ath6kl_htc_tx_prep_pkt() 386 struct htc_packet *packet = NULL; htc_get_control_buf() local 398 packet = list_first_entry(buf_list, struct htc_packet, list); htc_get_control_buf() 399 list_del(&packet->list); htc_get_control_buf() 403 packet->buf = packet->buf_start + HTC_HDR_LENGTH; htc_get_control_buf() 405 return packet; htc_get_control_buf() 410 struct htc_packet *packet) htc_tx_comp_update() 412 packet->completion = NULL; htc_tx_comp_update() 413 packet->buf += HTC_HDR_LENGTH; htc_tx_comp_update() 415 if (!packet->status) htc_tx_comp_update() 419 packet->status, packet->endpoint, packet->act_len, htc_tx_comp_update() 420 packet->info.tx.cred_used); htc_tx_comp_update() 422 /* on failure to submit, reclaim credits for this packet */ htc_tx_comp_update() 425 packet->info.tx.cred_used; htc_tx_comp_update() 452 struct htc_packet *packet) htc_tx_comp_handler() 454 struct htc_endpoint *endpoint = &target->endpoint[packet->endpoint]; htc_tx_comp_handler() 458 packet->info.tx.seqno); htc_tx_comp_handler() 460 htc_tx_comp_update(target, endpoint, packet); htc_tx_comp_handler() 462 list_add_tail(&packet->list, &container); htc_tx_comp_handler() 471 struct htc_packet *packet; htc_async_tx_scat_complete() local 484 packet = scat_req->scat_list[0].packet; htc_async_tx_scat_complete() 485 endpoint = &target->endpoint[packet->endpoint]; htc_async_tx_scat_complete() 489 packet = scat_req->scat_list[i].packet; htc_async_tx_scat_complete() 490 if (!packet) { htc_async_tx_scat_complete() 495 packet->status = scat_req->status; htc_async_tx_scat_complete() 496 htc_tx_comp_update(target, endpoint, packet); htc_async_tx_scat_complete() 497 list_add_tail(&packet->list, &tx_compq); htc_async_tx_scat_complete() 508 struct htc_packet *packet) ath6kl_htc_tx_issue() 514 if (!packet->completion) ath6kl_htc_tx_issue() 517 send_len = packet->act_len + HTC_HDR_LENGTH; ath6kl_htc_tx_issue() 523 send_len, packet->info.tx.seqno, padded_len, ath6kl_htc_tx_issue() 530 packet->buf, padded_len, ath6kl_htc_tx_issue() 533 packet->status = status; ath6kl_htc_tx_issue() 534 packet->buf += HTC_HDR_LENGTH; ath6kl_htc_tx_issue() 538 packet->buf, padded_len, ath6kl_htc_tx_issue() 539 HIF_WR_ASYNC_BLOCK_INC, packet); ath6kl_htc_tx_issue() 541 trace_ath6kl_htc_tx(status, packet->endpoint, packet->buf, send_len); ath6kl_htc_tx_issue() 605 struct htc_packet *packet; ath6kl_htc_tx_pkts_get() local 613 packet = list_first_entry(&endpoint->txq, struct htc_packet, ath6kl_htc_tx_pkts_get() 617 "htc tx got packet 0x%p queue depth %d\n", ath6kl_htc_tx_pkts_get() 618 packet, get_queue_depth(&endpoint->txq)); ath6kl_htc_tx_pkts_get() 621 packet->act_len + HTC_HDR_LENGTH); ath6kl_htc_tx_pkts_get() 624 packet->endpoint, len, &req_cred)) ath6kl_htc_tx_pkts_get() 628 packet = list_first_entry(&endpoint->txq, struct htc_packet, ath6kl_htc_tx_pkts_get() 630 list_move_tail(&packet->list, queue); ath6kl_htc_tx_pkts_get() 632 /* save the number of credits this packet consumed */ ath6kl_htc_tx_pkts_get() 633 packet->info.tx.cred_used = req_cred; ath6kl_htc_tx_pkts_get() 636 packet->completion = htc_tx_comp_handler; ath6kl_htc_tx_pkts_get() 637 packet->context = target; ath6kl_htc_tx_pkts_get() 641 packet->info.tx.flags = flags; ath6kl_htc_tx_pkts_get() 642 packet->info.tx.seqno = endpoint->seqno; ath6kl_htc_tx_pkts_get() 664 * packet cannot be bundled unless we add htc_get_credit_padding() 685 struct htc_packet *packet; ath6kl_htc_tx_setup_scat_list() local 693 scat_req->scat_list[i].packet = NULL; ath6kl_htc_tx_setup_scat_list() 698 packet = list_first_entry(queue, struct htc_packet, list); ath6kl_htc_tx_setup_scat_list() 700 packet->act_len + HTC_HDR_LENGTH); ath6kl_htc_tx_setup_scat_list() 711 list_del(&packet->list); ath6kl_htc_tx_setup_scat_list() 713 scat_req->scat_list[i].packet = packet; ath6kl_htc_tx_setup_scat_list() 714 /* prepare packet and flag message as part of a send bundle */ ath6kl_htc_tx_setup_scat_list() 715 flags = packet->info.tx.flags | HTC_FLAGS_SEND_BUNDLE; ath6kl_htc_tx_setup_scat_list() 716 ath6kl_htc_tx_prep_pkt(packet, flags, ath6kl_htc_tx_setup_scat_list() 717 cred_pad, packet->info.tx.seqno); ath6kl_htc_tx_setup_scat_list() 719 ath6kl_htc_tx_buf_align(&packet->buf, ath6kl_htc_tx_setup_scat_list() 720 packet->act_len + HTC_HDR_LENGTH); ath6kl_htc_tx_setup_scat_list() 721 scat_req->scat_list[i].buf = packet->buf; ath6kl_htc_tx_setup_scat_list() 728 i, packet, packet->info.tx.seqno, len, rem_scat); ath6kl_htc_tx_setup_scat_list() 734 packet = scat_req->scat_list[i].packet; ath6kl_htc_tx_setup_scat_list() 735 if (packet) { ath6kl_htc_tx_setup_scat_list() 736 packet->buf += HTC_HDR_LENGTH; ath6kl_htc_tx_setup_scat_list() 737 list_add(&packet->list, queue); ath6kl_htc_tx_setup_scat_list() 762 struct htc_packet *packet; ath6kl_htc_tx_bundle() local 839 packet = scat_req->scat_list[i].packet; ath6kl_htc_tx_bundle() 840 trace_ath6kl_htc_tx(packet->status, packet->endpoint, ath6kl_htc_tx_bundle() 841 packet->buf, packet->act_len); ath6kl_htc_tx_bundle() 862 struct htc_packet *packet; ath6kl_htc_tx_from_queue() local 921 packet = list_first_entry(&txq, struct htc_packet, ath6kl_htc_tx_from_queue() 923 list_del(&packet->list); ath6kl_htc_tx_from_queue() 925 ath6kl_htc_tx_prep_pkt(packet, packet->info.tx.flags, ath6kl_htc_tx_from_queue() 926 0, packet->info.tx.seqno); ath6kl_htc_tx_from_queue() 927 status = ath6kl_htc_tx_issue(target, packet); ath6kl_htc_tx_from_queue() 930 packet->status = status; ath6kl_htc_tx_from_queue() 931 packet->completion(packet->context, packet); ath6kl_htc_tx_from_queue() 1124 struct htc_packet *packet) ath6kl_htc_mbox_tx() 1131 packet->endpoint, packet->buf, packet->act_len); ath6kl_htc_mbox_tx() 1133 if (packet->endpoint >= ENDPOINT_MAX) { ath6kl_htc_mbox_tx() 1138 endpoint = &target->endpoint[packet->endpoint]; ath6kl_htc_mbox_tx() 1140 if (!ath6kl_htc_tx_try(target, endpoint, packet)) { ath6kl_htc_mbox_tx() 1141 packet->status = (target->htc_flags & HTC_OP_STATE_STOPPING) ? ath6kl_htc_mbox_tx() 1144 list_add(&packet->list, &queue); ath6kl_htc_mbox_tx() 1155 struct htc_packet *packet, *tmp_pkt; ath6kl_htc_mbox_flush_txep() local 1169 list_for_each_entry_safe(packet, tmp_pkt, &endpoint->txq, list) { ath6kl_htc_mbox_flush_txep() 1171 (tag == packet->info.tx.tag)) ath6kl_htc_mbox_flush_txep() 1172 list_move_tail(&packet->list, &discard_q); ath6kl_htc_mbox_flush_txep() 1177 list_for_each_entry_safe(packet, tmp_pkt, &discard_q, list) { ath6kl_htc_mbox_flush_txep() 1178 packet->status = -ECANCELED; ath6kl_htc_mbox_flush_txep() 1179 list_del(&packet->list); ath6kl_htc_mbox_flush_txep() 1182 packet, packet->act_len, ath6kl_htc_mbox_flush_txep() 1183 packet->endpoint, packet->info.tx.tag); ath6kl_htc_mbox_flush_txep() 1186 list_add_tail(&packet->list, &container); ath6kl_htc_mbox_flush_txep() 1271 static int htc_add_rxbuf(struct htc_target *target, struct htc_packet *packet) htc_add_rxbuf() argument 1276 list_add_tail(&packet->list, &queue); htc_add_rxbuf() 1281 struct htc_packet *packet, htc_reclaim_rxbuf() 1284 if (packet->info.rx.rx_flags & HTC_RX_PKT_NO_RECYCLE) { htc_reclaim_rxbuf() 1285 htc_rxpkt_reset(packet); htc_reclaim_rxbuf() 1286 packet->status = -ECANCELED; htc_reclaim_rxbuf() 1287 ep->ep_cb.rx(ep->target, packet); htc_reclaim_rxbuf() 1289 htc_rxpkt_reset(packet); htc_reclaim_rxbuf() 1290 htc_add_rxbuf((void *)(target), packet); htc_reclaim_rxbuf() 1295 struct htc_packet *packet) reclaim_rx_ctrl_buf() 1298 list_add_tail(&packet->list, &target->free_ctrl_rxbuf); reclaim_rx_ctrl_buf() 1303 struct htc_packet *packet, ath6kl_htc_rx_packet() 1312 if (padded_len > packet->buf_len) { ath6kl_htc_rx_packet() 1313 ath6kl_err("not enough receive space for packet - padlen %d recvlen %d bufferlen %d\n", ath6kl_htc_rx_packet() 1314 padded_len, rx_len, packet->buf_len); ath6kl_htc_rx_packet() 1320 packet, packet->info.rx.exp_hdr, ath6kl_htc_rx_packet() 1325 packet->buf, padded_len, ath6kl_htc_rx_packet() 1328 packet->status = status; ath6kl_htc_rx_packet() 1340 struct htc_packet *packet) ath6kl_htc_rx_set_indicate() 1344 if (htc_hdr->eid == packet->endpoint) { ath6kl_htc_rx_set_indicate() 1346 packet->info.rx.indicat_flags |= ath6kl_htc_rx_set_indicate() 1372 struct htc_packet *packet; ath6kl_htc_rx_setup() local 1408 packet = ep_cb.rx_allocthresh(ep->target, ep->eid, ath6kl_htc_rx_setup() 1422 packet = NULL; ath6kl_htc_rx_setup() 1424 packet = list_first_entry(&ep->rx_bufq, ath6kl_htc_rx_setup() 1426 list_del(&packet->list); ath6kl_htc_rx_setup() 1430 if (!packet) { ath6kl_htc_rx_setup() 1437 packet->info.rx.rx_flags = 0; ath6kl_htc_rx_setup() 1438 packet->info.rx.indicat_flags = 0; ath6kl_htc_rx_setup() 1439 packet->status = 0; ath6kl_htc_rx_setup() 1447 packet->info.rx.rx_flags |= HTC_RX_PKT_NO_RECYCLE; ath6kl_htc_rx_setup() 1450 list_add_tail(&packet->list, queue); ath6kl_htc_rx_setup() 1458 packet->info.rx.rx_flags |= HTC_RX_PKT_REFRESH_HDR; ath6kl_htc_rx_setup() 1459 packet->info.rx.exp_hdr = 0xFFFFFFFF; ath6kl_htc_rx_setup() 1462 packet->info.rx.exp_hdr = *lk_ahds; ath6kl_htc_rx_setup() 1464 packet->act_len = le16_to_cpu(htc_hdr->payld_len) + ath6kl_htc_rx_setup() 1477 struct htc_packet *packet, *tmp_pkt; ath6kl_htc_rx_alloc() local 1516 * HTC header indicates that every packet to follow ath6kl_htc_rx_alloc() 1538 /* Setup packet buffers for each message */ ath6kl_htc_rx_alloc() 1559 list_for_each_entry_safe(packet, tmp_pkt, queue, list) { list_for_each_entry_safe() 1560 list_del(&packet->list); list_for_each_entry_safe() 1561 htc_reclaim_rxbuf(target, packet, list_for_each_entry_safe() 1562 &target->endpoint[packet->endpoint]); list_for_each_entry_safe() 1624 * indicating it arrived in an RX packet. htc_proc_cred_rpt() 1806 struct htc_packet *packet, ath6kl_htc_rx_process_hdr() 1812 struct htc_frame_hdr *htc_hdr = (struct htc_frame_hdr *)packet->buf; ath6kl_htc_rx_process_hdr() 1823 memcpy((u8 *)&lk_ahd, packet->buf, sizeof(lk_ahd)); ath6kl_htc_rx_process_hdr() 1825 if (packet->info.rx.rx_flags & HTC_RX_PKT_REFRESH_HDR) { ath6kl_htc_rx_process_hdr() 1828 * was unknown when this packet was grabbed as part of the ath6kl_htc_rx_process_hdr() 1831 packet->info.rx.exp_hdr = lk_ahd; ath6kl_htc_rx_process_hdr() 1832 packet->act_len = payload_len + HTC_HDR_LENGTH; ath6kl_htc_rx_process_hdr() 1835 if (packet->act_len > packet->buf_len) { ath6kl_htc_rx_process_hdr() 1842 packet->act_len = min(packet->act_len, packet->buf_len); ath6kl_htc_rx_process_hdr() 1847 if (packet->endpoint != htc_hdr->eid) { ath6kl_htc_rx_process_hdr() 1849 htc_hdr->eid, packet->endpoint); ath6kl_htc_rx_process_hdr() 1855 if (lk_ahd != packet->info.rx.exp_hdr) { ath6kl_htc_rx_process_hdr() 1857 __func__, packet, packet->info.rx.rx_flags); ath6kl_htc_rx_process_hdr() 1859 "", &packet->info.rx.exp_hdr, 4); ath6kl_htc_rx_process_hdr() 1875 if (packet->info.rx.rx_flags & HTC_RX_PKT_IGNORE_LOOKAHEAD) { ath6kl_htc_rx_process_hdr() 1880 status = htc_proc_trailer(target, packet->buf + HTC_HDR_LENGTH ath6kl_htc_rx_process_hdr() 1883 n_lkahds, packet->endpoint); ath6kl_htc_rx_process_hdr() 1888 packet->act_len -= htc_hdr->ctrl[0]; ath6kl_htc_rx_process_hdr() 1891 packet->buf += HTC_HDR_LENGTH; ath6kl_htc_rx_process_hdr() 1892 packet->act_len -= HTC_HDR_LENGTH; ath6kl_htc_rx_process_hdr() 1896 ath6kl_dbg_dump(ATH6KL_DBG_HTC, "htc rx bad packet", ath6kl_htc_rx_process_hdr() 1897 "", packet->buf, packet->act_len); ath6kl_htc_rx_process_hdr() 1903 struct htc_packet *packet) ath6kl_htc_rx_complete() 1906 "htc rx complete ep %d packet 0x%p\n", ath6kl_htc_rx_complete() 1907 endpoint->eid, packet); ath6kl_htc_rx_complete() 1909 endpoint->ep_cb.rx(endpoint->target, packet); ath6kl_htc_rx_complete() 1918 struct htc_packet *packet; ath6kl_htc_rx_bundle() local 1955 packet = list_first_entry(rxq, struct htc_packet, list); ath6kl_htc_rx_bundle() 1956 list_del(&packet->list); ath6kl_htc_rx_bundle() 1959 packet->act_len); ath6kl_htc_rx_bundle() 1962 list_add(&packet->list, rxq); ath6kl_htc_rx_bundle() 1971 * since we are fetching a bundle the last packet ath6kl_htc_rx_bundle() 1974 packet->info.rx.rx_flags |= ath6kl_htc_rx_bundle() 1977 /* NOTE: 1 HTC packet per scatter entry */ ath6kl_htc_rx_bundle() 1978 scat_req->scat_list[i].buf = packet->buf; ath6kl_htc_rx_bundle() 1981 packet->info.rx.rx_flags |= HTC_RX_PKT_PART_OF_BUNDLE; ath6kl_htc_rx_bundle() 1983 list_add_tail(&packet->list, sync_compq); ath6kl_htc_rx_bundle() 2010 struct htc_packet *packet, *tmp_pkt; ath6kl_htc_rx_process_packets() local 2014 list_for_each_entry_safe(packet, tmp_pkt, comp_pktq, list) { list_for_each_entry_safe() 2015 ep = &target->endpoint[packet->endpoint]; list_for_each_entry_safe() 2017 trace_ath6kl_htc_rx(packet->status, packet->endpoint, list_for_each_entry_safe() 2018 packet->buf, packet->act_len); list_for_each_entry_safe() 2020 /* process header for each of the recv packet */ list_for_each_entry_safe() 2021 status = ath6kl_htc_rx_process_hdr(target, packet, lk_ahds, list_for_each_entry_safe() 2026 list_del(&packet->list); list_for_each_entry_safe() 2030 * Last packet's more packet flag is set list_for_each_entry_safe() 2035 ep, packet); list_for_each_entry_safe() 2041 packet->info.rx.indicat_flags |= list_for_each_entry_safe() 2046 if (packet->info.rx.rx_flags & HTC_RX_PKT_PART_OF_BUNDLE) list_for_each_entry_safe() 2049 ath6kl_htc_rx_complete(ep, packet); list_for_each_entry_safe() 2063 struct htc_packet *packet, *tmp_pkt; ath6kl_htc_rx_fetch() local 2091 packet = list_first_entry(rx_pktq, struct htc_packet, ath6kl_htc_rx_fetch() 2095 packet->completion = NULL; ath6kl_htc_rx_fetch() 2099 * look_aheads in all packet ath6kl_htc_rx_fetch() 2103 packet->info.rx.rx_flags |= ath6kl_htc_rx_fetch() 2106 /* go fetch the packet */ ath6kl_htc_rx_fetch() 2107 status = ath6kl_htc_rx_packet(target, packet, ath6kl_htc_rx_fetch() 2108 packet->act_len); ath6kl_htc_rx_fetch() 2110 list_move_tail(&packet->list, &tmp_rxq); ath6kl_htc_rx_fetch() 2128 list_for_each_entry_safe(packet, tmp_pkt, rx_pktq, list) { list_for_each_entry_safe() 2129 list_del(&packet->list); list_for_each_entry_safe() 2130 htc_reclaim_rxbuf(target, packet, list_for_each_entry_safe() 2131 &target->endpoint[packet->endpoint]); list_for_each_entry_safe() 2134 list_for_each_entry_safe(packet, tmp_pkt, &tmp_rxq, list) { 2135 list_del(&packet->list); 2136 htc_reclaim_rxbuf(target, packet, 2137 &target->endpoint[packet->endpoint]); 2263 struct htc_packet *packet = NULL; htc_wait_for_ctrl_msg() local 2279 packet = htc_get_control_buf(target, false); htc_wait_for_ctrl_msg() 2281 if (!packet) htc_wait_for_ctrl_msg() 2284 packet->info.rx.rx_flags = 0; htc_wait_for_ctrl_msg() 2285 packet->info.rx.exp_hdr = look_ahead; htc_wait_for_ctrl_msg() 2286 packet->act_len = le16_to_cpu(htc_hdr->payld_len) + HTC_HDR_LENGTH; htc_wait_for_ctrl_msg() 2288 if (packet->act_len > packet->buf_len) htc_wait_for_ctrl_msg() 2292 packet->completion = NULL; htc_wait_for_ctrl_msg() 2295 if (ath6kl_htc_rx_packet(target, packet, packet->act_len)) htc_wait_for_ctrl_msg() 2298 trace_ath6kl_htc_rx(packet->status, packet->endpoint, htc_wait_for_ctrl_msg() 2299 packet->buf, packet->act_len); htc_wait_for_ctrl_msg() 2302 packet->status = ath6kl_htc_rx_process_hdr(target, packet, NULL, NULL); htc_wait_for_ctrl_msg() 2304 if (packet->status) { htc_wait_for_ctrl_msg() 2306 packet->status); htc_wait_for_ctrl_msg() 2310 return packet; htc_wait_for_ctrl_msg() 2313 if (packet != NULL) { htc_wait_for_ctrl_msg() 2314 htc_rxpkt_reset(packet); htc_wait_for_ctrl_msg() 2315 reclaim_rx_ctrl_buf(target, packet); htc_wait_for_ctrl_msg() 2346 struct htc_packet *packet, *tmp_pkt; ath6kl_htc_mbox_add_rxbuf_multiple() local 2349 list_for_each_entry_safe(packet, tmp_pkt, pkt_queue, list) { list_for_each_entry_safe() 2350 packet->status = -ECANCELED; list_for_each_entry_safe() 2351 list_del(&packet->list); list_for_each_entry_safe() 2352 ath6kl_htc_rx_complete(endpoint, packet); list_for_each_entry_safe() 2386 struct htc_packet *packet, *tmp_pkt; ath6kl_htc_mbox_flush_rx_buf() local 2396 list_for_each_entry_safe(packet, tmp_pkt, ath6kl_htc_mbox_flush_rx_buf() 2398 list_del(&packet->list); ath6kl_htc_mbox_flush_rx_buf() 2402 packet, packet->buf_len, ath6kl_htc_mbox_flush_rx_buf() 2403 packet->endpoint); ath6kl_htc_mbox_flush_rx_buf() 2407 * packet and packet->buf_start are allocated ath6kl_htc_mbox_flush_rx_buf() 2409 * rx_bufq, it is allocated as skb where packet is ath6kl_htc_mbox_flush_rx_buf() 2413 if (packet->endpoint == ENDPOINT_0) { ath6kl_htc_mbox_flush_rx_buf() 2414 kfree(packet->buf_start); ath6kl_htc_mbox_flush_rx_buf() 2415 kfree(packet); ath6kl_htc_mbox_flush_rx_buf() 2417 dev_kfree_skb(packet->pkt_cntxt); ath6kl_htc_mbox_flush_rx_buf() 2448 /* allocate a packet to send to the target */ ath6kl_htc_mbox_conn_service() 2660 struct htc_packet *packet = NULL; ath6kl_htc_mbox_wait_target() local 2667 packet = htc_wait_for_ctrl_msg(target); ath6kl_htc_mbox_wait_target() 2669 if (!packet) ath6kl_htc_mbox_wait_target() 2673 rdy_msg = (struct htc_ready_ext_msg *)packet->buf; ath6kl_htc_mbox_wait_target() 2676 (packet->act_len < sizeof(struct htc_ready_msg))) { ath6kl_htc_mbox_wait_target() 2694 if (packet->act_len >= sizeof(struct htc_ready_ext_msg)) { ath6kl_htc_mbox_wait_target() 2731 if (packet) { ath6kl_htc_mbox_wait_target() 2732 htc_rxpkt_reset(packet); ath6kl_htc_mbox_wait_target() 2733 reclaim_rx_ctrl_buf(target, packet); ath6kl_htc_mbox_wait_target() 2745 struct htc_packet *packet; ath6kl_htc_mbox_start() local 2758 while ((packet = htc_get_control_buf(target, false)) != NULL) { ath6kl_htc_mbox_start() 2759 status = htc_add_rxbuf(target, packet); ath6kl_htc_mbox_start() 2788 struct htc_packet *packet; ath6kl_htc_reset() local 2800 packet = kzalloc(sizeof(*packet), GFP_KERNEL); ath6kl_htc_reset() 2801 if (!packet) ath6kl_htc_reset() 2804 packet->buf_start = kzalloc(ctrl_bufsz, GFP_KERNEL); ath6kl_htc_reset() 2805 if (!packet->buf_start) { ath6kl_htc_reset() 2806 kfree(packet); ath6kl_htc_reset() 2810 packet->buf_len = ctrl_bufsz; ath6kl_htc_reset() 2812 packet->act_len = 0; ath6kl_htc_reset() 2813 packet->buf = packet->buf_start; ath6kl_htc_reset() 2814 packet->endpoint = ENDPOINT_0; ath6kl_htc_reset() 2815 list_add_tail(&packet->list, &target->free_ctrl_rxbuf); ath6kl_htc_reset() 2817 list_add_tail(&packet->list, &target->free_ctrl_txbuf); ath6kl_htc_reset() 2894 struct htc_packet *packet, *tmp_packet; ath6kl_htc_mbox_cleanup() local 2898 list_for_each_entry_safe(packet, tmp_packet, ath6kl_htc_mbox_cleanup() 2900 list_del(&packet->list); ath6kl_htc_mbox_cleanup() 2901 kfree(packet->buf_start); ath6kl_htc_mbox_cleanup() 2902 kfree(packet); ath6kl_htc_mbox_cleanup() 2905 list_for_each_entry_safe(packet, tmp_packet, ath6kl_htc_mbox_cleanup() 2907 list_del(&packet->list); ath6kl_htc_mbox_cleanup() 2908 kfree(packet->buf_start); ath6kl_htc_mbox_cleanup() 2909 kfree(packet); ath6kl_htc_mbox_cleanup() 408 htc_tx_comp_update(struct htc_target *target, struct htc_endpoint *endpoint, struct htc_packet *packet) htc_tx_comp_update() argument 451 htc_tx_comp_handler(struct htc_target *target, struct htc_packet *packet) htc_tx_comp_handler() argument 507 ath6kl_htc_tx_issue(struct htc_target *target, struct htc_packet *packet) ath6kl_htc_tx_issue() argument 1123 ath6kl_htc_mbox_tx(struct htc_target *target, struct htc_packet *packet) ath6kl_htc_mbox_tx() argument 1280 htc_reclaim_rxbuf(struct htc_target *target, struct htc_packet *packet, struct htc_endpoint *ep) htc_reclaim_rxbuf() argument 1294 reclaim_rx_ctrl_buf(struct htc_target *target, struct htc_packet *packet) reclaim_rx_ctrl_buf() argument 1302 ath6kl_htc_rx_packet(struct htc_target *target, struct htc_packet *packet, u32 rx_len) ath6kl_htc_rx_packet() argument 1338 ath6kl_htc_rx_set_indicate(u32 lk_ahd, struct htc_endpoint *endpoint, struct htc_packet *packet) ath6kl_htc_rx_set_indicate() argument 1805 ath6kl_htc_rx_process_hdr(struct htc_target *target, struct htc_packet *packet, u32 *next_lkahds, int *n_lkahds) ath6kl_htc_rx_process_hdr() argument 1902 ath6kl_htc_rx_complete(struct htc_endpoint *endpoint, struct htc_packet *packet) ath6kl_htc_rx_complete() argument
|
H A D | htc.h | 126 /* packet flags */ 285 /* caller's per packet specific context */ 310 /* endpoint that this packet was sent/recv'd from */ 325 * optimization for network-oriented data, the HTC packet 326 * can pass the network buffer corresponding to the HTC packet 405 * the number of credits that the current pending TX packet needs 534 struct htc_packet packet; member in struct:htc_control_buffer 544 HTC_SEND_QUEUE_OK = 0, /* packet was queued */ 545 HTC_SEND_QUEUE_DROP = 1, /* this packet should be dropped */ 555 int (*tx)(struct htc_target *target, struct htc_packet *packet); 635 static inline void set_htc_pkt_info(struct htc_packet *packet, void *context, set_htc_pkt_info() argument 639 packet->pkt_cntxt = context; set_htc_pkt_info() 640 packet->buf = buf; set_htc_pkt_info() 641 packet->act_len = len; set_htc_pkt_info() 642 packet->endpoint = eid; set_htc_pkt_info() 643 packet->info.tx.tag = tag; set_htc_pkt_info() 646 static inline void htc_rxpkt_reset(struct htc_packet *packet) htc_rxpkt_reset() argument 648 packet->buf = packet->buf_start; htc_rxpkt_reset() 649 packet->act_len = 0; htc_rxpkt_reset() 652 static inline void set_htc_rxpkt_info(struct htc_packet *packet, void *context, set_htc_rxpkt_info() argument 656 packet->pkt_cntxt = context; set_htc_rxpkt_info() 657 packet->buf = buf; set_htc_rxpkt_info() 658 packet->buf_start = buf; set_htc_rxpkt_info() 659 packet->buf_len = len; set_htc_rxpkt_info() 660 packet->endpoint = eid; set_htc_rxpkt_info()
|
H A D | txrx.c | 135 /* packet is in DIX format */ ath6kl_process_uapsdq() 138 /* packet is in 802.3 format */ ath6kl_process_uapsdq() 315 * are just going to drop this packet. ath6kl_control_tx() 471 /* allocate resource for this packet */ ath6kl_data_tx() 592 struct htc_packet *packet) ath6kl_tx_queue_full() 596 enum htc_endpoint_id endpoint = packet->endpoint; ath6kl_tx_queue_full() 612 if (packet->info.tx.tag == ATH6KL_CONTROL_PKT_TAG) ath6kl_tx_queue_full() 690 struct htc_packet *packet; ath6kl_tx_complete() local 708 packet = list_first_entry(packet_queue, struct htc_packet, ath6kl_tx_complete() 710 list_del(&packet->list); ath6kl_tx_complete() 712 if (WARN_ON_ONCE(packet->endpoint == ENDPOINT_UNUSED || ath6kl_tx_complete() 713 packet->endpoint >= ENDPOINT_MAX)) ath6kl_tx_complete() 716 ath6kl_cookie = (struct ath6kl_cookie *)packet->pkt_cntxt; ath6kl_tx_complete() 720 status = packet->status; ath6kl_tx_complete() 722 eid = packet->endpoint; ath6kl_tx_complete() 733 if (WARN_ON_ONCE(!status && (packet->act_len != skb->len))) { ath6kl_tx_complete() 753 (struct wmi_cmd_hdr *) packet->buf); ath6kl_tx_complete() 756 (struct wmi_data_hdr *) packet->buf); ath6kl_tx_complete() 767 /* a packet was flushed */ ath6kl_tx_complete() 777 __func__, skb, packet->buf, packet->act_len, ath6kl_tx_complete() 782 __func__, skb, packet->buf, packet->act_len, ath6kl_tx_complete() 885 struct htc_packet *packet; ath6kl_rx_refill() local 905 packet = (struct htc_packet *) skb->head; ath6kl_rx_refill() 911 set_htc_rxpkt_info(packet, skb, skb->data, ath6kl_rx_refill() 913 packet->skb = skb; ath6kl_rx_refill() 914 list_add_tail(&packet->list, &queue); ath6kl_rx_refill() 923 struct htc_packet *packet; ath6kl_refill_amsdu_rxbufs() local 931 packet = (struct htc_packet *) skb->head; ath6kl_refill_amsdu_rxbufs() 937 set_htc_rxpkt_info(packet, skb, skb->data, ath6kl_refill_amsdu_rxbufs() 939 packet->skb = skb; ath6kl_refill_amsdu_rxbufs() 942 list_add_tail(&packet->list, &ar->amsdu_rx_buffer_queue); ath6kl_refill_amsdu_rxbufs() 949 * Callback to allocate a receive buffer for a pending packet. We use a 957 struct htc_packet *packet = NULL; ath6kl_alloc_amsdu_rxbuf() local 976 packet = list_first_entry(&ar->amsdu_rx_buffer_queue, ath6kl_alloc_amsdu_rxbuf() 978 list_del(&packet->list); ath6kl_alloc_amsdu_rxbuf() 986 packet->endpoint = endpoint; ath6kl_alloc_amsdu_rxbuf() 992 return packet; ath6kl_alloc_amsdu_rxbuf() 1306 void ath6kl_rx(struct htc_target *target, struct htc_packet *packet) ath6kl_rx() argument 1309 struct sk_buff *skb = packet->pkt_cntxt; ath6kl_rx() 1315 int status = packet->status; ath6kl_rx() 1316 enum htc_endpoint_id ept = packet->endpoint; ath6kl_rx() 1329 __func__, ar, ept, skb, packet->buf, ath6kl_rx() 1330 packet->act_len, status); ath6kl_rx() 1332 if (status || packet->act_len < HTC_HDR_LENGTH) { ath6kl_rx() 1337 skb_put(skb, packet->act_len + HTC_HDR_LENGTH); ath6kl_rx() 1369 vif->net_stats.rx_bytes += packet->act_len; ath6kl_rx() 1395 ((packet->act_len < min_hdr_len) || ath6kl_rx() 1396 (packet->act_len > WMI_MAX_AMSDU_RX_DATA_FRAME_LENGTH))) { ath6kl_rx() 1513 if ((packet->act_len < min_hdr_len) || ath6kl_rx() 1514 (packet->act_len > ath6kl_rx() 1849 struct htc_packet *packet, *tmp_pkt; ath6kl_cleanup_amsdu_rxbufs() local 1857 list_for_each_entry_safe(packet, tmp_pkt, &ar->amsdu_rx_buffer_queue, ath6kl_cleanup_amsdu_rxbufs() 1859 list_del(&packet->list); ath6kl_cleanup_amsdu_rxbufs() 1861 dev_kfree_skb(packet->pkt_cntxt); ath6kl_cleanup_amsdu_rxbufs() 591 ath6kl_tx_queue_full(struct htc_target *target, struct htc_packet *packet) ath6kl_tx_queue_full() argument
|
/linux-4.1.27/arch/mips/include/asm/octeon/ |
H A D | cvmx-wqe.h | 43 #include <asm/octeon/cvmx-packet.h> 58 /* Use this struct if the hardware determines that the packet is IP */ 61 /* HW sets this to the number of buffers used by this packet */ 77 /* the packet needs to be decompressed */ 79 /* the packet is either TCP or UDP */ 81 /* the packet needs to be decrypted (ESP or AH) */ 83 /* the packet is IPv6 */ 93 * packet creation. 106 * the IP packet (as defined by the IP header 110 * - 8 = TCP FIN Only: the packet is TCP and only the 112 * - 9 = TCP No Flags: the packet is TCP and no flags 114 * - 10 = TCP FIN RST: the packet is TCP and both FIN 116 * - 11 = TCP SYN URG: the packet is TCP and both SYN 118 * - 12 = TCP SYN RST: the packet is TCP and both SYN 120 * - 13 = TCP SYN FIN: the packet is TCP and both SYN 124 /* set if the packet is a fragment */ 134 * - 3 = IP Malformed Header: the packet is not long 136 * - 4 = IP Malformed: the packet is not long enough 145 * Set if the hardware determined that the packet is a 150 * St if the hardware determined that the packet is a 155 * Set if the packet may not be IP (must be zero in 166 /* zero for packet submitted by hardware that isn't on 213 * the packet is ip. 219 * packet. 246 * packet creation. 251 * set if the hardware determined that the packet is 256 * set if the hardware determined that the packet is 261 * set if the hardware determined that the packet is a 266 * set if the hardware determined that the packet is a 271 * set if the packet may not be IP (must be one in 279 * - 1 = partial error: a packet was partially 282 * packet. 283 * - 2 = jabber error: the RGMII packet was too large 285 * - 3 = overrun error: the RGMII packet is longer 287 * - 4 = oversize error: the RGMII packet is longer 289 * - 5 = alignment error: the RGMII packet is not an 292 * - 6 = fragment error: the RGMII packet is shorter 294 * - 7 = GMX FCS error: the RGMII packet had an FCS 296 * - 8 = undersize error: the RGMII packet is shorter 298 * - 9 = extend error: the RGMII packet had an extend 300 * - 10 = length mismatch error: the RGMII packet had 304 * packet had one or more data reception errors 305 * (RXERR) or the SPI4 packet had one or more 308 * packet was not large enough to cover the 309 * skipped bytes or the SPI4 packet was 312 * RGMII packet had a studder error (data not 313 * repeated - 10/100M only) or the SPI4 packet 315 * - 16 = FCS error: a SPI4.2 packet had an FCS error. 316 * - 17 = Skip error: a packet was not large enough to 318 * - 18 = L2 header malformed: the packet is not long 328 * zero for packet submitted by hardware that isn't on 367 * HW WRITE: the following 64 bits are filled by HW when a packet arrives 394 * HW WRITE: the following 64 bits are filled by HW when a packet arrives 399 * HW sets to the total number of bytes in the packet 408 * HW sets this to what it thought the priority of the input packet was 436 * hardware when a packet arrives This indicates a variety of 442 * Pointer to the first segment of the packet. 448 * packet, up to (at most, but perhaps less) the amount 451 * If the packet is recognized to be IP, the hardware starts 454 * packet is not recognized to be IP, the hardware starts 455 * writing the beginning of the packet here.
|
H A D | cvmx-pko.h | 38 * of not affecting the tag state but doesn't preserve packet 106 * to the output queue. This will maintain packet ordering on 125 * This structure defines the address to use on a packet enqueue 149 * The output queue to send the packet to (0-127 are 170 * Structure of the first packet output command word. 187 * If set, subtract 1, if clear, subtract packet 196 /* If set, subtract 1, if clear, subtract packet size */ 206 * When set, packet data not allocated in L2 cache by 235 * buffers containing the packet. 239 * The total number of segs in the packet, if gather 277 * Call before any other calls to initialize the packet 284 * Enables the packet output hardware. It must already be 290 * Disables the packet output. Does not affect any configuration. 295 * Shutdown and free resources required by packet output. 317 * Ring the packet output doorbell. This tells the packet 322 * @port: Port the packet is for 323 * @queue: Queue the packet is for 346 * Prepare to send a packet. This may initiate a tag switch to 348 * performs other prep work for the packet send operation. 362 * packet ordering on output. 403 * Complete packet output. cvmx_pko_send_packet_prepare() must be 412 * @packet: Packet to send 423 union cvmx_buf_ptr packet, cvmx_pko_send_packet_finish() 431 pko_command.u64, packet.u64); cvmx_pko_send_packet_finish() 444 * Complete packet output. cvmx_pko_send_packet_prepare() must be 453 * @packet: Packet to send 466 union cvmx_buf_ptr packet, cvmx_pko_send_packet_finish3() 475 pko_command.u64, packet.u64, addr); cvmx_pko_send_packet_finish3() 620 * @packets_s: Maximum packet/sec 419 cvmx_pko_send_packet_finish( uint64_t port, uint64_t queue, cvmx_pko_command_word0_t pko_command, union cvmx_buf_ptr packet, cvmx_pko_lock_t use_locking) cvmx_pko_send_packet_finish() argument 462 cvmx_pko_send_packet_finish3( uint64_t port, uint64_t queue, cvmx_pko_command_word0_t pko_command, union cvmx_buf_ptr packet, uint64_t addr, cvmx_pko_lock_t use_locking) cvmx_pko_send_packet_finish3() argument
|
H A D | cvmx-pip.h | 49 * 1 = TCP (UDP) packet not long enough to cover TCP (UDP) 83 /* 3 = malformed (packet not long enough to cover IP hdr) */ 85 /* 4 = malformed (packet not long enough to cover len in IP hdr) */ 103 /* RGM+SPI 1 = partially received packet (buffering/bandwidth 106 /* RGM+SPI 2 = receive packet too large and truncated */ 141 * RGM 12 = packet was not large enough to pass the skipper - 153 * RGM+SPI+PCI 17 = packet was not large enough to pass the 158 * RGM+SPI+PCI 18 = malformed l2 (packet not long enough to 243 * to a packet by external hardware. 255 /* PIP parse mode for this packet */ 261 * beginning of the packet 266 /* POW input queue for this packet */ 268 /* POW input group for this packet */ 271 * Flag to store this packet in the work queue entry, 306 * Configure the global QoS packet watchers. Each watcher is 307 * capable of matching a field in a packet to determine the 481 * set in the final mask represent a byte used in the packet for 503 * offsetof() to determine the offsets into packet headers. 507 * byte at offset X from the beginning of the packet data.
|
H A D | cvmx-helper-util.h | 48 * Debug routine to dump the packet structure to the console 50 * @work: Work queue entry containing the packet to dump 61 * this many packet buffers free in FPA 0. 64 * than this many free packet buffers in FPA 0. 75 * this many packet buffers free in FPA 0. 78 * than this many free packet buffers in FPA 0. 144 * Free the packet buffers contained in a work queue entry. 147 * @work: Work queue entry with packet to free 163 * not a dynamic short packet. We need to check if it is a cvmx_helper_free_packet_data() 164 * packet received with IPD_CTL_STATUS[NO_WPTR]. If this is cvmx_helper_free_packet_data()
|
/linux-4.1.27/drivers/net/wireless/b43legacy/ |
H A D | pio.c | 56 const u8 *packet, tx_get_next_word() 67 source = packet; tx_get_next_word() 78 const u8 *packet, tx_data() 85 data = tx_get_next_word(txhdr, packet, tx_data() 93 data = tx_get_next_word(txhdr, packet, tx_data() 98 tx_octet(queue, packet[octets - tx_data() 117 struct b43legacy_pio_txpacket *packet) generate_cookie() 124 * for the packet index (in the cache). generate_cookie() 141 packetindex = pio_txpacket_getindex(packet); generate_cookie() 151 struct b43legacy_pio_txpacket **packet) parse_cookie() 176 *packet = &(queue->tx_packets_cache[packetindex]); parse_cookie() 187 struct b43legacy_pio_txpacket *packet, pio_tx_write_fragment() 201 generate_cookie(queue, packet)); pio_tx_write_fragment() 215 static void free_txpacket(struct b43legacy_pio_txpacket *packet, free_txpacket() argument 218 struct b43legacy_pioqueue *queue = packet->queue; free_txpacket() 220 if (packet->skb) { free_txpacket() 222 dev_kfree_skb_irq(packet->skb); free_txpacket() 224 dev_kfree_skb(packet->skb); free_txpacket() 226 list_move(&packet->list, &queue->txfree); free_txpacket() 230 static int pio_tx_packet(struct b43legacy_pio_txpacket *packet) pio_tx_packet() argument 232 struct b43legacy_pioqueue *queue = packet->queue; pio_tx_packet() 233 struct sk_buff *skb = packet->skb; pio_tx_packet() 240 "Dropping packet.\n"); pio_tx_packet() 242 free_txpacket(packet, 1); pio_tx_packet() 257 err = pio_tx_write_fragment(queue, skb, packet, pio_tx_packet() 260 /* Drop this packet, as we don't have the encryption key pio_tx_packet() 262 free_txpacket(packet, 1); pio_tx_packet() 266 /* Account for the packet size. pio_tx_packet() 273 * packet to the txrunning list. pio_tx_packet() 275 list_move_tail(&packet->list, &queue->txrunning); pio_tx_packet() 285 struct b43legacy_pio_txpacket *packet, *tmp_packet; tx_tasklet() local 296 list_for_each_entry_safe(packet, tmp_packet, &queue->txqueue, list) { tx_tasklet() 297 /* Try to transmit the packet. This can fail, if tx_tasklet() 299 * packet is left in the txqueue. tx_tasklet() 300 * If transmission succeed, the packet is moved to txrunning. tx_tasklet() 301 * If it is impossible to transmit the packet, it tx_tasklet() 304 err = pio_tx_packet(packet); tx_tasklet() 314 struct b43legacy_pio_txpacket *packet; setup_txqueues() local 319 packet = &(queue->tx_packets_cache[i]); setup_txqueues() 321 packet->queue = queue; setup_txqueues() 322 INIT_LIST_HEAD(&packet->list); setup_txqueues() 324 list_add(&packet->list, &queue->txfree); setup_txqueues() 383 struct b43legacy_pio_txpacket *packet, *tmp_packet; cancel_transfers() local 387 list_for_each_entry_safe(packet, tmp_packet, &queue->txrunning, list) cancel_transfers() 388 free_txpacket(packet, 0); cancel_transfers() 389 list_for_each_entry_safe(packet, tmp_packet, &queue->txqueue, list) cancel_transfers() 390 free_txpacket(packet, 0); cancel_transfers() 470 struct b43legacy_pio_txpacket *packet; b43legacy_pio_tx() local 475 packet = list_entry(queue->txfree.next, struct b43legacy_pio_txpacket, b43legacy_pio_tx() 477 packet->skb = skb; b43legacy_pio_tx() 479 list_move_tail(&packet->list, &queue->txqueue); b43legacy_pio_tx() 492 struct b43legacy_pio_txpacket *packet; b43legacy_pio_handle_txstatus() local 496 queue = parse_cookie(dev, status->cookie, &packet); b43legacy_pio_handle_txstatus() 499 if (!packet->skb) b43legacy_pio_handle_txstatus() 503 queue->tx_devq_used -= (packet->skb->len + b43legacy_pio_handle_txstatus() 506 info = IEEE80211_SKB_CB(packet->skb); b43legacy_pio_handle_txstatus() 538 ieee80211_tx_status_irqsafe(dev->wl->hw, packet->skb); b43legacy_pio_handle_txstatus() 539 packet->skb = NULL; b43legacy_pio_handle_txstatus() 541 free_txpacket(packet, 1); b43legacy_pio_handle_txstatus() 55 tx_get_next_word(const u8 *txhdr, const u8 *packet, size_t txhdr_size, unsigned int *pos) tx_get_next_word() argument 76 tx_data(struct b43legacy_pioqueue *queue, u8 *txhdr, const u8 *packet, unsigned int octets) tx_data() argument 116 generate_cookie(struct b43legacy_pioqueue *queue, struct b43legacy_pio_txpacket *packet) generate_cookie() argument 149 parse_cookie(struct b43legacy_wldev *dev, u16 cookie, struct b43legacy_pio_txpacket **packet) parse_cookie() argument 185 pio_tx_write_fragment(struct b43legacy_pioqueue *queue, struct sk_buff *skb, struct b43legacy_pio_txpacket *packet, size_t txhdr_size) pio_tx_write_fragment() argument
|
H A D | pio.h | 47 #define pio_txpacket_getindex(packet) ((int)((packet) - \ 48 (packet)->queue->tx_packets_cache)) 62 /* Used packet slots in the device internal TX buffer. */
|
/linux-4.1.27/net/sctp/ |
H A D | output.c | 60 static sctp_xmit_t __sctp_packet_append_chunk(struct sctp_packet *packet, 62 static sctp_xmit_t sctp_packet_can_append_data(struct sctp_packet *packet, 64 static void sctp_packet_append_data(struct sctp_packet *packet, 66 static sctp_xmit_t sctp_packet_will_fit(struct sctp_packet *packet, 70 static void sctp_packet_reset(struct sctp_packet *packet) sctp_packet_reset() argument 72 packet->size = packet->overhead; sctp_packet_reset() 73 packet->has_cookie_echo = 0; sctp_packet_reset() 74 packet->has_sack = 0; sctp_packet_reset() 75 packet->has_data = 0; sctp_packet_reset() 76 packet->has_auth = 0; sctp_packet_reset() 77 packet->ipfragok = 0; sctp_packet_reset() 78 packet->auth = NULL; sctp_packet_reset() 81 /* Config a packet. 84 struct sctp_packet *sctp_packet_config(struct sctp_packet *packet, sctp_packet_config() argument 89 pr_debug("%s: packet:%p vtag:0x%x\n", __func__, packet, vtag); sctp_packet_config() 91 packet->vtag = vtag; sctp_packet_config() 93 if (ecn_capable && sctp_packet_empty(packet)) { sctp_packet_config() 94 chunk = sctp_get_ecne_prepend(packet->transport->asoc); sctp_packet_config() 100 sctp_packet_append_chunk(packet, chunk); sctp_packet_config() 103 return packet; sctp_packet_config() 106 /* Initialize the packet structure. */ sctp_packet_init() 107 struct sctp_packet *sctp_packet_init(struct sctp_packet *packet, sctp_packet_init() argument 114 pr_debug("%s: packet:%p transport:%p\n", __func__, packet, transport); sctp_packet_init() 116 packet->transport = transport; sctp_packet_init() 117 packet->source_port = sport; sctp_packet_init() 118 packet->destination_port = dport; sctp_packet_init() 119 INIT_LIST_HEAD(&packet->chunk_list); sctp_packet_init() 127 packet->overhead = overhead; sctp_packet_init() 128 sctp_packet_reset(packet); sctp_packet_init() 129 packet->vtag = 0; sctp_packet_init() 131 return packet; sctp_packet_init() 134 /* Free a packet. */ sctp_packet_free() 135 void sctp_packet_free(struct sctp_packet *packet) sctp_packet_free() argument 139 pr_debug("%s: packet:%p\n", __func__, packet); sctp_packet_free() 141 list_for_each_entry_safe(chunk, tmp, &packet->chunk_list, list) { sctp_packet_free() 147 /* This routine tries to append the chunk to the offered packet. If adding 148 * the chunk causes the packet to exceed the path MTU and COOKIE_ECHO chunk 149 * is not present in the packet, it transmits the input packet. 150 * Data can be bundled with a packet containing a COOKIE_ECHO chunk as long 151 * as it can fit in the packet, but any more data that does not fit in this 152 * packet can be sent only after receiving the COOKIE_ACK. 154 sctp_xmit_t sctp_packet_transmit_chunk(struct sctp_packet *packet, sctp_packet_transmit_chunk() argument 161 pr_debug("%s: packet:%p chunk:%p\n", __func__, packet, chunk); sctp_packet_transmit_chunk() 163 switch ((retval = (sctp_packet_append_chunk(packet, chunk)))) { sctp_packet_transmit_chunk() 165 if (!packet->has_cookie_echo) { sctp_packet_transmit_chunk() 166 error = sctp_packet_transmit(packet); sctp_packet_transmit_chunk() 170 /* If we have an empty packet, then we can NOT ever sctp_packet_transmit_chunk() 174 retval = sctp_packet_append_chunk(packet, sctp_packet_transmit_chunk() 188 /* Try to bundle an auth chunk into the packet. */ sctp_packet_bundle_auth() 224 /* Try to bundle a SACK with the packet. */ sctp_packet_bundle_sack() 231 * bundle one in to the packet. sctp_packet_bundle_sack() 267 /* Append a chunk to the offered packet reporting back any inability to do 270 static sctp_xmit_t __sctp_packet_append_chunk(struct sctp_packet *packet, __sctp_packet_append_chunk() argument 276 /* Check to see if this chunk will fit into the packet */ __sctp_packet_append_chunk() 277 retval = sctp_packet_will_fit(packet, chunk, chunk_len); __sctp_packet_append_chunk() 281 /* We believe that this chunk is OK to add to the packet */ __sctp_packet_append_chunk() 284 /* Account for the data being in the packet */ __sctp_packet_append_chunk() 285 sctp_packet_append_data(packet, chunk); __sctp_packet_append_chunk() 287 packet->has_sack = 1; __sctp_packet_append_chunk() 289 packet->has_auth = 1; __sctp_packet_append_chunk() 290 /* Let it be knows that packet has DATA in it */ __sctp_packet_append_chunk() 291 packet->has_data = 1; __sctp_packet_append_chunk() 296 packet->has_cookie_echo = 1; __sctp_packet_append_chunk() 300 packet->has_sack = 1; __sctp_packet_append_chunk() 306 packet->has_auth = 1; __sctp_packet_append_chunk() 307 packet->auth = chunk; __sctp_packet_append_chunk() 312 list_add_tail(&chunk->list, &packet->chunk_list); __sctp_packet_append_chunk() 313 packet->size += chunk_len; __sctp_packet_append_chunk() 314 chunk->transport = packet->transport; __sctp_packet_append_chunk() 319 /* Append a chunk to the offered packet reporting back any inability to do 322 sctp_xmit_t sctp_packet_append_chunk(struct sctp_packet *packet, sctp_packet_append_chunk() argument 327 pr_debug("%s: packet:%p chunk:%p\n", __func__, packet, chunk); sctp_packet_append_chunk() 330 * bundle into this packet, check to see if we are allowed to sctp_packet_append_chunk() 334 retval = sctp_packet_can_append_data(packet, chunk); sctp_packet_append_chunk() 340 retval = sctp_packet_bundle_auth(packet, chunk); sctp_packet_append_chunk() 345 retval = sctp_packet_bundle_sack(packet, chunk); sctp_packet_append_chunk() 349 retval = __sctp_packet_append_chunk(packet, chunk); sctp_packet_append_chunk() 369 * the packet has been transmitted. sctp_packet_set_owner_w() 379 int sctp_packet_transmit(struct sctp_packet *packet) sctp_packet_transmit() argument 381 struct sctp_transport *tp = packet->transport; sctp_packet_transmit() 393 pr_debug("%s: packet:%p\n", __func__, packet); sctp_packet_transmit() 395 /* Do NOT generate a chunkless packet. */ sctp_packet_transmit() 396 if (list_empty(&packet->chunk_list)) sctp_packet_transmit() 400 chunk = list_entry(packet->chunk_list.next, struct sctp_chunk, list); sctp_packet_transmit() 404 nskb = alloc_skb(packet->size + MAX_HEADER, GFP_ATOMIC); sctp_packet_transmit() 409 skb_reserve(nskb, packet->overhead + MAX_HEADER); sctp_packet_transmit() 430 sh->source = htons(packet->source_port); sctp_packet_transmit() 431 sh->dest = htons(packet->destination_port); sctp_packet_transmit() 434 * After the packet is constructed (containing the SCTP common sctp_packet_transmit() 441 sh->vtag = htonl(packet->vtag); sctp_packet_transmit() 448 * chunks in one outbound SCTP packet. ... sctp_packet_transmit() 466 list_for_each_entry_safe(chunk, tmp, &packet->chunk_list, list) { sctp_packet_transmit() 490 * the auth into the packet. sctp_packet_transmit() 492 if (chunk == packet->auth) sctp_packet_transmit() 522 * chunks that are placed after the AUTH chunk in the SCTP packet. sctp_packet_transmit() 529 /* 2) Calculate the Adler-32 checksum of the whole packet, sctp_packet_transmit() 538 (dst_xfrm(dst) != NULL) || packet->ipfragok) { sctp_packet_transmit() 594 nskb->ignore_df = packet->ipfragok; sctp_packet_transmit() 598 sctp_packet_reset(packet); sctp_packet_transmit() 619 list_for_each_entry_safe(chunk, tmp, &packet->chunk_list, list) { sctp_packet_transmit() 635 static sctp_xmit_t sctp_packet_can_append_data(struct sctp_packet *packet, sctp_packet_can_append_data() argument 639 struct sctp_transport *transport = packet->transport; sctp_packet_can_append_data() 684 /* Nagle's algorithm to solve small-packet problem: sctp_packet_can_append_data() 694 if (!sctp_packet_empty(packet)) sctp_packet_can_append_data() 695 /* Append to packet */ sctp_packet_can_append_data() 706 * or delay in hopes of bundling a full sized packet. sctp_packet_can_append_data() 708 if (chunk->skb->len + q->out_qlen >= transport->pathmtu - packet->overhead) sctp_packet_can_append_data() 709 /* Enough data queued to fill a packet */ sctp_packet_can_append_data() 716 /* Defer until all data acked or packet full */ sctp_packet_can_append_data() 721 static void sctp_packet_append_data(struct sctp_packet *packet, sctp_packet_append_data() argument 724 struct sctp_transport *transport = packet->transport; sctp_packet_append_data() 749 static sctp_xmit_t sctp_packet_will_fit(struct sctp_packet *packet, sctp_packet_will_fit() argument 758 psize = packet->size; sctp_packet_will_fit() 759 pmtu = ((packet->transport->asoc) ? sctp_packet_will_fit() 760 (packet->transport->asoc->pathmtu) : sctp_packet_will_fit() 761 (packet->transport->pathmtu)); sctp_packet_will_fit() 769 * 1. The packet is empty (meaning this chunk is greater sctp_packet_will_fit() 772 * 3. The packet doesn't have any data in it yet and data sctp_packet_will_fit() 775 if (sctp_packet_empty(packet) || !sctp_chunk_is_data(chunk) || sctp_packet_will_fit() 776 (!packet->has_data && chunk->auth)) { sctp_packet_will_fit() 781 packet->ipfragok = 1; sctp_packet_will_fit()
|
H A D | inqueue.c | 67 /* If there is a packet which is currently being worked on, sctp_inq_free() 76 /* Put a new packet in an SCTP inqueue. 77 * We assume that packet->sctp_hdr is set and in host byte order. 81 /* Directly call the packet handling routine. */ sctp_inq_push() 105 /* If there is no more chunks in this packet, say so */ sctp_inq_peek() 132 /* There is a packet that we have been working on. sctp_inq_pop() 141 /* Nothing to do. Next chunk in the packet, please. */ sctp_inq_pop() 149 /* Do we need to take the next packet out of the queue to process? */ sctp_inq_pop() 162 /* This is the first chunk in the packet. */ sctp_inq_pop() 190 /* We are at the end of the packet, so mark the chunk sctp_inq_pop()
|
H A D | input.c | 78 /* Calculate the SCTP checksum of an SCTP packet. */ sctp_rcv_checksum() 105 * This is the routine which IP calls when receiving an SCTP packet. 159 /* If the packet is to or from a non-unicast address, sctp_rcv() 160 * silently discard the packet. sctp_rcv() 203 * An SCTP packet is called an "out of the blue" (OOTB) sctp_rcv() 204 * packet if it is correctly formed, i.e., passed the sctp_rcv() 207 * packet belongs. sctp_rcv() 223 /* Create an SCTP packet structure. */ sctp_rcv() 229 /* Remember what endpoint is to handle this packet. */ sctp_rcv() 327 * the new socket when we process the packet. sctp_backlog_rcv() 497 * packet. sctp_err_lookup() 515 * discard the packet. sctp_err_lookup() 651 * This function scans all the chunks in the OOTB packet to determine if 652 * the packet should be discarded right away. If a response might be needed 653 * for this packet, or, if further processing is possible, the packet will 658 * Return 1 - If the packet can be discarded right away. 667 /* Scan through all the chunks in the packet. */ sctp_rcv_ootb() 677 /* RFC 8.4, 2) If the OOTB packet contains an ABORT chunk, the sctp_rcv_ootb() 678 * receiver MUST silently discard the OOTB packet and take no sctp_rcv_ootb() 684 /* RFC 8.4, 6) If the packet contains a SHUTDOWN COMPLETE sctp_rcv_ootb() 685 * chunk, the receiver should silently discard the packet sctp_rcv_ootb() 693 * subsequent chunks in the packet. When INIT is first, sctp_rcv_ootb() 922 * source address of the packet (containing the INIT or 951 * RFC 2960 3 SCTP packet Format __sctp_rcv_init_lookup() 953 * Multiple chunks can be bundled into one SCTP packet up to __sctp_rcv_init_lookup() 956 * other chunk in a packet. See Section 6.10 for more details __sctp_rcv_init_lookup() 1023 * If the receiver does not find a STCB for a packet containing an AUTH 1061 /* If a packet arrives containing an AUTH chunk as __sctp_rcv_walk_lookup() 1065 * packet, then authentication is based on __sctp_rcv_walk_lookup() 1093 * There are circumstances when we need to look inside the SCTP packet
|
/linux-4.1.27/include/uapi/linux/netfilter/ |
H A D | xt_l2tp.h | 16 __u8 type; /* L2TP packet type */ 24 XT_L2TP_TYPE = (1 << 3), /* match L2TP packet type */
|
H A D | nfnetlink_queue.h | 8 NFQNL_MSG_PACKET, /* packet from kernel to userspace */ 17 __be32 packet_id; /* unique ID of packet in queue */ 47 NFQA_CAP_LEN, /* __u32 length of captured packet */ 108 /* packet appears to have wrong checksums, but they are ok */ 110 /* packet is GSO (i.e., exceeds device mtu) */
|
H A D | xt_TPROXY.h | 6 /* TPROXY target is capable of marking the packet to perform
|
H A D | xt_statistic.h | 29 __u32 packet; member in struct:xt_statistic_info::__anon13495::__anon13497
|
H A D | xt_hashlimit.h | 9 * seconds, or one packet every 59 hours. 12 /* packet length accounting is done in 16-byte steps */
|
H A D | nf_tables.h | 637 * @NFT_META_LEN: packet length (skb->len) 638 * @NFT_META_PROTOCOL: packet ethertype protocol (skb->protocol), invalid in OUTPUT 639 * @NFT_META_PRIORITY: packet priority (skb->priority) 640 * @NFT_META_MARK: packet mark (skb->mark) 641 * @NFT_META_IIF: packet input interface index (dev->ifindex) 642 * @NFT_META_OIF: packet output interface index (dev->ifindex) 643 * @NFT_META_IIFNAME: packet input interface name (dev->name) 644 * @NFT_META_OIFNAME: packet output interface name (dev->name) 645 * @NFT_META_IIFTYPE: packet input interface type (dev->type) 646 * @NFT_META_OIFTYPE: packet output interface type (dev->type) 649 * @NFT_META_NFTRACE: packet nftrace bit 650 * @NFT_META_RTCLASSID: realm value of packet's route (skb->dst->tclassid) 651 * @NFT_META_SECMARK: packet secmark (skb->secmark) 654 * @NFT_META_BRI_IIFNAME: packet input bridge interface name 655 * @NFT_META_BRI_OIFNAME: packet output bridge interface name 656 * @NFT_META_PKTTYPE: packet type (skb->pkt_type), special handling for loopback 658 * @NFT_META_IIFGROUP: packet input interface group 659 * @NFT_META_OIFGROUP: packet output interface group 862 * @NFTA_REJECT_TYPE: packet type to use (NLA_U32: nft_reject_types)
|
/linux-4.1.27/drivers/staging/rtl8192u/ |
H A D | r819xU_cmdpkt.h | 3 /* Different command packet have dedicated message length and definition. */ 17 /* Define element ID of command packet. */ 20 /* Define different command packet structure. */ 21 /* 1. RX side: TX feedback packet. */ 24 u8 element_id; /* Command packet type. */ 25 u8 length; /* Command packet length. */ 57 /* 2. RX side: Interrupt status packet. It includes Beacon State, 60 u8 element_id; /* Command packet type. */ 61 u8 length; /* Command packet length. */ 67 /* 3. TX side: Set configuration packet. */ 69 u8 element_id; /* Command packet type. */ 70 u8 length; /* Command packet length. */ 85 /* 4. Both side : TX/RX query configuraton packet. The query structure is the 89 /* 5. Multi packet feedback status. */ 95 u8 length; /* Command packet length */ 96 u8 element_id; /* Command packet type */ 135 u8 length; /* Command packet length */ 136 u8 element_id; /* Command packet type */ 147 u8 element_id; /* Command packet type */ 148 u8 length; /* Command packet length */
|
H A D | r819xU_cmdpkt.c | 6 * (RTL8190 TX/RX command packet handler Source C File) 8 * Note: The module is responsible for handling TX and RX command packet. 9 * 1. TX : Send set and query configuration command packet. 11 * command packet. 54 RT_TRACE(COMP_FIRMWARE, "=== NULL packet ======> tx full!\n"); SendTxCommandPacket() 89 /* When RF is off, we should not count the packet for hw/sw synchronize cmpk_count_txstatistic() 100 /* We can not know the packet length and transmit type: cmpk_count_txstatistic() 146 * ws-06-0063-rtl8190-command-packet-specification. 148 * We have to read 20 bytes in the command packet. 151 * u8 *pmsg - Msg Ptr of the command packet. 178 /* Collect info TX feedback packet to fill TCB. */ cmpk_handle_tx_feedback() 179 /* We can not know the packet length and transmit type: broadcast or uni cmpk_handle_tx_feedback() 213 * ws-07-0063-v06-rtl819x-command-packet-specification-070315.doc. 217 * u8 *pmsg - Message Pointer of the command packet. 280 * ws-06-0063-rtl8190-command-packet-specification. Please 283 * Input: u8 *pmsg - Message Pointer of the command packet. 320 * packet element id = RX_TX_STATUS. 345 /* When RF is off, we should not count the packet for hw/sw synchronize cmpk_count_tx_status() 383 * packet buffer operation load. 436 /* When RF is off, we should not count the packet for hw/sw synchronize cmpk_handle_tx_rate_history() 461 /* Collect CCK rate packet num */ cmpk_handle_tx_rate_history() 465 /* Collect OFDM rate packet num */ cmpk_handle_tx_rate_history() 479 * Overview: In the function, we will capture different RX command packet 480 * info. Every RX command packet element has different message 482 * command packet now. Please refer to document 483 * ws-06-0063-rtl8190-command-packet-specification. 507 return 0; /* This is not a command packet. */ cmpk_message_handle_rx() 509 /* 1. Read received command packet message length from RFD. */ cmpk_message_handle_rx() 515 /* 3. Read command packet element id and length. */ cmpk_message_handle_rx() 518 /* 4. Check every received command packet content according to different cmpk_message_handle_rx() 519 element type. Because FW may aggregate RX command packet to cmpk_message_handle_rx() 524 /* We support aggregation of different cmd in the same packet */ cmpk_message_handle_rx() 563 return 1; /* This is a command packet. */ cmpk_message_handle_rx() 569 return 1; /* This is a command packet. */ cmpk_message_handle_rx()
|
/linux-4.1.27/include/rxrpc/ |
H A D | packet.h | 0 /* packet.h: Rx packet layout and definitions 22 * on-the-wire Rx packet header 41 uint8_t type; /* packet type */ 51 #define RXRPC_N_PACKET_TYPES 14 /* number of packet types (incl type 0) */ 53 uint8_t flags; /* packet flags */ 54 #define RXRPC_CLIENT_INITIATED 0x01 /* signifies a packet generated by a client */ 55 #define RXRPC_REQUEST_ACK 0x02 /* request an unconditional ACK of this packet */ 56 #define RXRPC_LAST_PACKET 0x04 /* the last packet from this side for this call */ 58 #define RXRPC_JUMBO_PACKET 0x20 /* [DATA] this is a jumbo packet */ 77 * jumbo packet secondary header 86 uint8_t flags; /* packet flags (as per rxrpc_header) */ 91 #define RXRPC_JUMBO_DATALEN 1412 /* non-terminal jumbo packet data length */ 95 * on-the-wire Rx ACK packet data payload 99 __be16 bufferSpace; /* number of packet buffers available */ 102 __be32 firstPacket; /* sequence no of first ACK'd packet in attached list */ 103 __be32 previousPacket; /* sequence no of previous packet received */ 104 __be32 serial; /* serial no of packet that prompted this ACK */ 107 #define RXRPC_ACK_REQUESTED 1 /* ACK was requested on packet */ 108 #define RXRPC_ACK_DUPLICATE 2 /* duplicate packet received */ 109 #define RXRPC_ACK_OUT_OF_SEQUENCE 3 /* out of sequence packet received */ 110 #define RXRPC_ACK_EXCEEDS_WINDOW 4 /* packet received beyond end of ACK window */ 111 #define RXRPC_ACK_NOSPACE 5 /* packet discarded due to lack of buffer space */ 114 #define RXRPC_ACK_DELAY 8 /* nothing happened since received packet */ 133 __be32 jumbo_max; /* max packets to stick into a jumbo packet [AFS 3.5] */ 138 * Kerberos security type-2 challenge packet 149 * Kerberos security type-2 response packet 181 #define RX_DEBUGI_BADTYPE -8 /* bad debugging packet type */ 202 #define RXKADPACKETSHORT 19270401 /* packet too short for security challenge */ 205 #define RXKADOUTOFSEQUENCE 19270404 /* packet had bad sequence number */
|
/linux-4.1.27/drivers/infiniband/core/ |
H A D | user_mad.c | 59 MODULE_DESCRIPTION("InfiniBand userspace MAD packet access"); 165 struct ib_umad_packet *packet) queue_packet() 171 for (packet->mad.hdr.id = 0; queue_packet() 172 packet->mad.hdr.id < IB_UMAD_MAX_AGENTS; queue_packet() 173 packet->mad.hdr.id++) queue_packet() 174 if (agent == __get_agent(file, packet->mad.hdr.id)) { queue_packet() 175 list_add_tail(&packet->list, &file->recv_list); queue_packet() 187 struct ib_umad_packet *packet) dequeue_send() 190 list_del(&packet->list); dequeue_send() 198 struct ib_umad_packet *packet = send_wc->send_buf->context[0]; send_handler() local 200 dequeue_send(file, packet); send_handler() 201 ib_destroy_ah(packet->msg->ah); send_handler() 202 ib_free_send_mad(packet->msg); send_handler() 205 packet->length = IB_MGMT_MAD_HDR; send_handler() 206 packet->mad.hdr.status = ETIMEDOUT; send_handler() 207 if (!queue_packet(file, agent, packet)) send_handler() 210 kfree(packet); send_handler() 217 struct ib_umad_packet *packet; recv_handler() local 222 packet = kzalloc(sizeof *packet, GFP_KERNEL); recv_handler() 223 if (!packet) recv_handler() 226 packet->length = mad_recv_wc->mad_len; recv_handler() 227 packet->recv_wc = mad_recv_wc; recv_handler() 229 packet->mad.hdr.status = 0; recv_handler() 230 packet->mad.hdr.length = hdr_size(file) + mad_recv_wc->mad_len; recv_handler() 231 packet->mad.hdr.qpn = cpu_to_be32(mad_recv_wc->wc->src_qp); recv_handler() 232 packet->mad.hdr.lid = cpu_to_be16(mad_recv_wc->wc->slid); recv_handler() 233 packet->mad.hdr.sl = mad_recv_wc->wc->sl; recv_handler() 234 packet->mad.hdr.path_bits = mad_recv_wc->wc->dlid_path_bits; recv_handler() 235 packet->mad.hdr.pkey_index = mad_recv_wc->wc->pkey_index; recv_handler() 236 packet->mad.hdr.grh_present = !!(mad_recv_wc->wc->wc_flags & IB_WC_GRH); recv_handler() 237 if (packet->mad.hdr.grh_present) { recv_handler() 244 packet->mad.hdr.gid_index = ah_attr.grh.sgid_index; recv_handler() 245 packet->mad.hdr.hop_limit = ah_attr.grh.hop_limit; recv_handler() 246 packet->mad.hdr.traffic_class = ah_attr.grh.traffic_class; recv_handler() 247 memcpy(packet->mad.hdr.gid, &ah_attr.grh.dgid, 16); recv_handler() 248 packet->mad.hdr.flow_label = cpu_to_be32(ah_attr.grh.flow_label); recv_handler() 251 if (queue_packet(file, agent, packet)) recv_handler() 256 kfree(packet); recv_handler() 262 struct ib_umad_packet *packet, size_t count) copy_recv_mad() 268 recv_buf = &packet->recv_wc->recv_buf; copy_recv_mad() 269 if ((packet->length <= sizeof (*recv_buf->mad) && copy_recv_mad() 270 count < hdr_size(file) + packet->length) || copy_recv_mad() 271 (packet->length > sizeof (*recv_buf->mad) && copy_recv_mad() 275 if (copy_to_user(buf, &packet->mad, hdr_size(file))) copy_recv_mad() 279 seg_payload = min_t(int, packet->length, sizeof (*recv_buf->mad)); copy_recv_mad() 283 if (seg_payload < packet->length) { copy_recv_mad() 288 if (count < hdr_size(file) + packet->length) { copy_recv_mad() 298 for (left = packet->length - seg_payload, buf += seg_payload; copy_recv_mad() 308 return hdr_size(file) + packet->length; copy_recv_mad() 312 struct ib_umad_packet *packet, size_t count) copy_send_mad() 314 ssize_t size = hdr_size(file) + packet->length; copy_send_mad() 319 if (copy_to_user(buf, &packet->mad, hdr_size(file))) copy_send_mad() 324 if (copy_to_user(buf, packet->mad.data, packet->length)) copy_send_mad() 334 struct ib_umad_packet *packet; ib_umad_read() local 355 packet = list_entry(file->recv_list.next, struct ib_umad_packet, list); ib_umad_read() 356 list_del(&packet->list); ib_umad_read() 360 if (packet->recv_wc) ib_umad_read() 361 ret = copy_recv_mad(file, buf, packet, count); ib_umad_read() 363 ret = copy_send_mad(file, buf, packet, count); ib_umad_read() 366 /* Requeue packet */ ib_umad_read() 368 list_add(&packet->list, &file->recv_list); ib_umad_read() 371 if (packet->recv_wc) ib_umad_read() 372 ib_free_recv_mad(packet->recv_wc); ib_umad_read() 373 kfree(packet); ib_umad_read() 411 struct ib_umad_packet *packet) is_duplicate() 416 hdr = (struct ib_mad_hdr *) packet->mad.data; is_duplicate() 436 if (same_destination(&packet->mad.hdr, &sent_packet->mad.hdr)) is_duplicate() 447 struct ib_umad_packet *packet; ib_umad_write() local 458 packet = kzalloc(sizeof *packet + IB_MGMT_RMPP_HDR, GFP_KERNEL); ib_umad_write() 459 if (!packet) ib_umad_write() 462 if (copy_from_user(&packet->mad, buf, hdr_size(file))) { ib_umad_write() 467 if (packet->mad.hdr.id >= IB_UMAD_MAX_AGENTS) { ib_umad_write() 474 if (copy_from_user(packet->mad.data, buf, IB_MGMT_RMPP_HDR)) { ib_umad_write() 481 agent = __get_agent(file, packet->mad.hdr.id); ib_umad_write() 488 ah_attr.dlid = be16_to_cpu(packet->mad.hdr.lid); ib_umad_write() 489 ah_attr.sl = packet->mad.hdr.sl; ib_umad_write() 490 ah_attr.src_path_bits = packet->mad.hdr.path_bits; ib_umad_write() 492 if (packet->mad.hdr.grh_present) { ib_umad_write() 494 memcpy(ah_attr.grh.dgid.raw, packet->mad.hdr.gid, 16); ib_umad_write() 495 ah_attr.grh.sgid_index = packet->mad.hdr.gid_index; ib_umad_write() 496 ah_attr.grh.flow_label = be32_to_cpu(packet->mad.hdr.flow_label); ib_umad_write() 497 ah_attr.grh.hop_limit = packet->mad.hdr.hop_limit; ib_umad_write() 498 ah_attr.grh.traffic_class = packet->mad.hdr.traffic_class; ib_umad_write() 507 rmpp_mad = (struct ib_rmpp_mad *) packet->mad.data; ib_umad_write() 521 packet->msg = ib_create_send_mad(agent, ib_umad_write() 522 be32_to_cpu(packet->mad.hdr.qpn), ib_umad_write() 523 packet->mad.hdr.pkey_index, rmpp_active, ib_umad_write() 525 if (IS_ERR(packet->msg)) { ib_umad_write() 526 ret = PTR_ERR(packet->msg); ib_umad_write() 530 packet->msg->ah = ah; ib_umad_write() 531 packet->msg->timeout_ms = packet->mad.hdr.timeout_ms; ib_umad_write() 532 packet->msg->retries = packet->mad.hdr.retries; ib_umad_write() 533 packet->msg->context[0] = packet; ib_umad_write() 536 memcpy(packet->msg->mad, packet->mad.data, IB_MGMT_MAD_HDR); ib_umad_write() 539 if (copy_from_user(packet->msg->mad + copy_offset, ib_umad_write() 546 ret = copy_rmpp_mad(packet->msg, buf); ib_umad_write() 556 if (!ib_response_mad(packet->msg->mad)) { ib_umad_write() 557 tid = &((struct ib_mad_hdr *) packet->msg->mad)->tid; ib_umad_write() 567 list_add_tail(&packet->list, &file->send_list); ib_umad_write() 571 ret = is_duplicate(file, packet); ib_umad_write() 573 list_add_tail(&packet->list, &file->send_list); ib_umad_write() 581 ret = ib_post_send_mad(packet->msg, NULL); ib_umad_write() 589 dequeue_send(file, packet); ib_umad_write() 591 ib_free_send_mad(packet->msg); ib_umad_write() 597 kfree(packet); ib_umad_write() 969 struct ib_umad_packet *packet, *tmp; ib_umad_close() local 979 list_for_each_entry_safe(packet, tmp, &file->recv_list, list) { ib_umad_close() 980 if (packet->recv_wc) ib_umad_close() 981 ib_free_recv_mad(packet->recv_wc); ib_umad_close() 982 kfree(packet); ib_umad_close() 163 queue_packet(struct ib_umad_file *file, struct ib_mad_agent *agent, struct ib_umad_packet *packet) queue_packet() argument 186 dequeue_send(struct ib_umad_file *file, struct ib_umad_packet *packet) dequeue_send() argument 261 copy_recv_mad(struct ib_umad_file *file, char __user *buf, struct ib_umad_packet *packet, size_t count) copy_recv_mad() argument 311 copy_send_mad(struct ib_umad_file *file, char __user *buf, struct ib_umad_packet *packet, size_t count) copy_send_mad() argument 410 is_duplicate(struct ib_umad_file *file, struct ib_umad_packet *packet) is_duplicate() argument
|
/linux-4.1.27/drivers/tty/ipwireless/ |
H A D | hardware.c | 126 /* Number of bytes in NL packet header (cannot do 130 /* Number of bytes in NL packet header (cannot do 154 /* Network packet header of the first packet (a special case) */ 156 /* Network packet header of the following packets (if any) */ 158 /* Complete network packet (header + data) */ 238 /* Flag if hw is ready to send next packet */ 304 /* Count of packet fragments, starting at 0 */ 307 /* Called after packet is sent and before is freed */ 458 static void do_send_packet(struct ipw_hardware *hw, struct ipw_tx_packet *packet) do_send_packet() argument 461 unsigned short data_left = packet->length - packet->offset; do_send_packet() 466 (packet->fragment_count == 0) do_send_packet() 477 pkt.hdr_first.protocol = packet->protocol; do_send_packet() 478 pkt.hdr_first.address = packet->dest_addr; do_send_packet() 481 /* First packet? */ do_send_packet() 482 if (packet->fragment_count == 0) { do_send_packet() 484 pkt.hdr_first.length_lsb = (unsigned char) packet->length; do_send_packet() 486 (unsigned char) (packet->length >> 8); do_send_packet() 490 ((unsigned char *) packet) + sizeof(struct ipw_tx_packet) + do_send_packet() 491 packet->offset, fragment_data_len); do_send_packet() 492 packet->offset += fragment_data_len; do_send_packet() 493 packet->fragment_count++; do_send_packet() 495 /* Last packet? (May also be first packet.) */ do_send_packet() 496 if (packet->offset == packet->length) do_send_packet() 500 /* If this packet has unsent data, then re-queue it. */ do_send_packet() 501 if (packet->offset < packet->length) { do_send_packet() 509 list_add(&packet->queue, &hw->tx_queue[0]); do_send_packet() 513 if (packet->packet_callback) do_send_packet() 514 packet->packet_callback(packet->callback_data, do_send_packet() 515 packet->length); do_send_packet() 516 kfree(packet); do_send_packet() 547 * If 'packet' is NULL, then this function allocates a new packet, setting its 550 * If 'packet' is not NULL, then this function enlarges it if it doesn't 555 struct ipw_rx_packet *packet, pool_allocate() 559 if (!packet) { pool_allocate() 564 packet = list_first_entry(&hw->rx_pool, pool_allocate() 568 list_del(&packet->queue); pool_allocate() 579 packet = kmalloc(sizeof(struct ipw_rx_packet) pool_allocate() 581 if (!packet) pool_allocate() 583 packet->capacity = new_capacity; pool_allocate() 585 packet->length = 0; pool_allocate() 588 if (packet->length + minimum_free_space > packet->capacity) { pool_allocate() 589 struct ipw_rx_packet *old_packet = packet; pool_allocate() 591 packet = kmalloc(sizeof(struct ipw_rx_packet) + pool_allocate() 594 if (!packet) { pool_allocate() 598 memcpy(packet, old_packet, pool_allocate() 601 packet->capacity = old_packet->length + minimum_free_space; pool_allocate() 605 return packet; pool_allocate() 608 static void pool_free(struct ipw_hardware *hw, struct ipw_rx_packet *packet) pool_free() argument 611 kfree(packet); pool_free() 614 list_add(&packet->queue, &hw->rx_pool); pool_free() 625 struct ipw_rx_packet *packet = NULL; queue_received_packet() local 628 /* Discard packet if channel index is out of range. */ queue_received_packet() 631 ": data packet has bad address %u\n", address); queue_received_packet() 643 * Create a new packet, or assembler already contains one queue_received_packet() 649 ": no memory for incoming data packet, dropped!\n"); queue_received_packet() 655 /* Append this packet data onto existing data. */ queue_received_packet() 661 packet = *assem; queue_received_packet() 665 hw->rx_bytes_queued += packet->length; queue_received_packet() 669 /* If it's a CTRL packet, don't assemble, just queue it. */ queue_received_packet() 670 packet = pool_allocate(hw, NULL, length); queue_received_packet() 671 if (!packet) { queue_received_packet() 673 ": no memory for incoming ctrl packet, dropped!\n"); queue_received_packet() 676 packet->protocol = protocol; queue_received_packet() 677 packet->channel_idx = channel_idx; queue_received_packet() 678 memcpy((unsigned char *)packet + sizeof(struct ipw_rx_packet), queue_received_packet() 680 packet->length = length; queue_received_packet() 684 * If this is the last packet, then send the assembled packet on to the queue_received_packet() 687 if (packet) { queue_received_packet() 689 list_add_tail(&packet->queue, &hw->rx_queue); queue_received_packet() 710 struct ipw_rx_packet *packet = ipw_receive_data_work() local 716 list_del(&packet->queue); ipw_receive_data_work() 723 if (packet->protocol == TL_PROTOCOLID_COM_DATA) { ipw_receive_data_work() 733 packet->channel_idx, ipw_receive_data_work() 734 (unsigned char *)packet ipw_receive_data_work() 736 packet->length); ipw_receive_data_work() 740 hw->rx_bytes_queued -= packet->length; ipw_receive_data_work() 746 handle_received_CTRL_packet(hw, packet->channel_idx, ipw_receive_data_work() 747 (unsigned char *)packet ipw_receive_data_work() 749 packet->length); ipw_receive_data_work() 751 pool_free(hw, packet); ipw_receive_data_work() 774 ": control packet was %d bytes - wrong size!\n", handle_received_CTRL_packet() 811 const union nl_packet *packet, handle_received_packet() 814 unsigned int protocol = packet->hdr.protocol; handle_received_packet() 815 unsigned int address = packet->hdr.address; handle_received_packet() 819 int is_last = packet->hdr.packet_rank & NL_LAST_PACKET; handle_received_packet() 821 if (packet->hdr.packet_rank & NL_FIRST_PACKET) handle_received_packet() 826 data = packet->rawpkt + header_length; handle_received_packet() 851 * Retrieve a packet from the IPW hardware. 865 ": received a packet of %u bytes - longer than the MTU!\n", len); do_receive_packet() 881 ": received a packet of %u bytes - longer than the MTU!\n", len); do_receive_packet() 949 * Send pending packet up to given priority, prioritize SETUP data until 962 struct ipw_tx_packet *packet = NULL; send_pending_packet() local 964 /* Pick a packet */ send_pending_packet() 967 packet = list_first_entry( send_pending_packet() 973 list_del(&packet->queue); send_pending_packet() 978 if (!packet) { send_pending_packet() 987 do_send_packet(hw, packet); send_pending_packet() 1237 struct ipw_tx_packet *packet) send_packet() 1242 list_add_tail(&packet->queue, &hw->tx_queue[priority]); send_packet() 1249 /* Create data packet, non-atomic allocation */ alloc_data_packet() 1254 struct ipw_tx_packet *packet = kzalloc( alloc_data_packet() local 1258 if (!packet) alloc_data_packet() 1261 INIT_LIST_HEAD(&packet->queue); alloc_data_packet() 1262 packet->dest_addr = dest_addr; alloc_data_packet() 1263 packet->protocol = protocol; alloc_data_packet() 1264 packet->length = data_size; alloc_data_packet() 1266 return packet; alloc_data_packet() 1279 struct ipw_control_packet *packet = kzalloc(header_size, GFP_ATOMIC); alloc_ctrl_packet() local 1281 if (!packet) alloc_ctrl_packet() 1284 INIT_LIST_HEAD(&packet->header.queue); alloc_ctrl_packet() 1285 packet->header.dest_addr = dest_addr; alloc_ctrl_packet() 1286 packet->header.protocol = protocol; alloc_ctrl_packet() 1287 packet->header.length = header_size - sizeof(struct ipw_tx_packet); alloc_ctrl_packet() 1288 packet->body.sig_no = sig_no; alloc_ctrl_packet() 1290 return packet; alloc_ctrl_packet() 1298 struct ipw_tx_packet *packet; ipwireless_send_packet() local 1300 packet = alloc_data_packet(length, (channel_idx + 1), ipwireless_send_packet() 1302 if (!packet) ipwireless_send_packet() 1304 packet->packet_callback = callback; ipwireless_send_packet() 1305 packet->callback_data = callback_data; ipwireless_send_packet() 1306 memcpy((unsigned char *) packet + sizeof(struct ipw_tx_packet), data, ipwireless_send_packet() 1309 send_packet(hw, PRIO_DATA, packet); ipwireless_send_packet() 1316 struct ipw_control_packet *packet; set_control_line() local 1322 packet = alloc_ctrl_packet(sizeof(struct ipw_control_packet), set_control_line() 1324 if (!packet) set_control_line() 1326 packet->header.length = sizeof(struct ipw_control_packet_body); set_control_line() 1327 packet->body.value = (state == 0 ? 0 : 1); set_control_line() 1328 send_packet(hw, prio, &packet->header); set_control_line() 1407 /* generate config packet */ __handle_setup_get_version_rsp() 1432 /* generate open packet */ __handle_setup_get_version_rsp() 1491 ": not enough memory to alloc control packet\n"); __handle_setup_get_version_rsp() 1535 ": setup packet has bad address %d\n", address); handle_received_SETUP_packet() 1567 struct ipw_setup_reboot_msg_ack *packet; handle_received_SETUP_packet() local 1571 packet = alloc_ctrl_packet( handle_received_SETUP_packet() 1575 packet->header.length = handle_received_SETUP_packet() 1577 send_packet(hw, PRIO_SETUP, &packet->header); handle_received_SETUP_packet() 554 pool_allocate(struct ipw_hardware *hw, struct ipw_rx_packet *packet, int minimum_free_space) pool_allocate() argument 810 handle_received_packet(struct ipw_hardware *hw, const union nl_packet *packet, unsigned short len) handle_received_packet() argument 1236 send_packet(struct ipw_hardware *hw, int priority, struct ipw_tx_packet *packet) send_packet() argument
|
/linux-4.1.27/drivers/tty/hvc/ |
H A D | hvsi.c | 81 /* inbuf is for packet reassembly. leave a little room for leftovers. */ 88 atomic_t seqno; /* HVSI packet sequence number */ 158 static inline int len_packet(const uint8_t *packet) len_packet() argument 160 return (int)((struct hvsi_header *)packet)->len; len_packet() 163 static inline int is_header(const uint8_t *packet) is_header() argument 165 struct hvsi_header *header = (struct hvsi_header *)packet; is_header() 169 static inline int got_packet(const struct hvsi_struct *hp, uint8_t *packet) got_packet() argument 171 if (hp->inbuf_end < packet + sizeof(struct hvsi_header)) got_packet() 172 return 0; /* don't even have the packet header */ got_packet() 174 if (hp->inbuf_end < (packet + len_packet(packet))) got_packet() 175 return 0; /* don't have the rest of the packet */ got_packet() 194 #define dbg_dump_packet(packet) dump_packet(packet) 197 #define dbg_dump_packet(packet) do { } while (0) 219 static void dump_packet(uint8_t *packet) dump_packet() argument 221 struct hvsi_header *header = (struct hvsi_header *)packet; dump_packet() 226 dump_hex(packet, header->len); dump_packet() 238 static void hvsi_recv_control(struct hvsi_struct *hp, uint8_t *packet, hvsi_recv_control() argument 241 struct hvsi_control *header = (struct hvsi_control *)packet; hvsi_recv_control() 260 printk(KERN_WARNING "hvsi%i: unknown HVSI control packet: ", hvsi_recv_control() 262 dump_packet(packet); hvsi_recv_control() 267 static void hvsi_recv_response(struct hvsi_struct *hp, uint8_t *packet) hvsi_recv_response() argument 269 struct hvsi_query_response *resp = (struct hvsi_query_response *)packet; hvsi_recv_response() 285 dump_packet(packet); hvsi_recv_response() 293 struct hvsi_query_response packet __ALIGNED__; hvsi_version_respond() 296 packet.hdr.type = VS_QUERY_RESPONSE_PACKET_HEADER; hvsi_version_respond() 297 packet.hdr.len = sizeof(struct hvsi_query_response); hvsi_version_respond() 298 packet.hdr.seqno = atomic_inc_return(&hp->seqno); hvsi_version_respond() 299 packet.verb = VSV_SEND_VERSION_NUMBER; hvsi_version_respond() 300 packet.u.version = HVSI_VERSION; hvsi_version_respond() 301 packet.query_seqno = query_seqno+1; hvsi_version_respond() 303 pr_debug("%s: sending %i bytes\n", __func__, packet.hdr.len); hvsi_version_respond() 304 dbg_dump_hex((uint8_t*)&packet, packet.hdr.len); hvsi_version_respond() 306 wrote = hvc_put_chars(hp->vtermno, (char *)&packet, packet.hdr.len); hvsi_version_respond() 307 if (wrote != packet.hdr.len) { hvsi_version_respond() 316 static void hvsi_recv_query(struct hvsi_struct *hp, uint8_t *packet) hvsi_recv_query() argument 318 struct hvsi_query *query = (struct hvsi_query *)packet; hvsi_recv_query() 327 dump_packet(packet); hvsi_recv_query() 361 static bool hvsi_recv_data(struct hvsi_struct *hp, const uint8_t *packet) hvsi_recv_data() argument 363 const struct hvsi_header *header = (const struct hvsi_header *)packet; hvsi_recv_data() 364 const uint8_t *data = packet + sizeof(struct hvsi_header); hvsi_recv_data() 402 uint8_t *packet = hp->inbuf; hvsi_load_chunk() local 420 while ((packet < hp->inbuf_end) && got_packet(hp, packet)) { hvsi_load_chunk() 421 struct hvsi_header *header = (struct hvsi_header *)packet; hvsi_load_chunk() 423 if (!is_header(packet)) { hvsi_load_chunk() 424 printk(KERN_ERR "hvsi%i: got malformed packet\n", hp->index); hvsi_load_chunk() 426 while ((packet < hp->inbuf_end) && (!is_header(packet))) hvsi_load_chunk() 427 packet++; hvsi_load_chunk() 431 pr_debug("%s: handling %i-byte packet\n", __func__, hvsi_load_chunk() 432 len_packet(packet)); hvsi_load_chunk() 433 dbg_dump_packet(packet); hvsi_load_chunk() 439 flip = hvsi_recv_data(hp, packet); hvsi_load_chunk() 442 hvsi_recv_control(hp, packet, tty, handshake); hvsi_load_chunk() 445 hvsi_recv_response(hp, packet); hvsi_load_chunk() 448 hvsi_recv_query(hp, packet); hvsi_load_chunk() 451 printk(KERN_ERR "hvsi%i: unknown HVSI packet type 0x%x\n", hvsi_load_chunk() 453 dump_packet(packet); hvsi_load_chunk() 457 packet += len_packet(packet); hvsi_load_chunk() 465 compact_inbuf(hp, packet); hvsi_load_chunk() 553 struct hvsi_query packet __ALIGNED__; hvsi_query() 556 packet.hdr.type = VS_QUERY_PACKET_HEADER; hvsi_query() 557 packet.hdr.len = sizeof(struct hvsi_query); hvsi_query() 558 packet.hdr.seqno = atomic_inc_return(&hp->seqno); hvsi_query() 559 packet.verb = verb; hvsi_query() 561 pr_debug("%s: sending %i bytes\n", __func__, packet.hdr.len); hvsi_query() 562 dbg_dump_hex((uint8_t*)&packet, packet.hdr.len); hvsi_query() 564 wrote = hvc_put_chars(hp->vtermno, (char *)&packet, packet.hdr.len); hvsi_query() 565 if (wrote != packet.hdr.len) { hvsi_query() 596 struct hvsi_control packet __ALIGNED__; hvsi_set_mctrl() 599 packet.hdr.type = VS_CONTROL_PACKET_HEADER, hvsi_set_mctrl() 600 packet.hdr.seqno = atomic_inc_return(&hp->seqno); hvsi_set_mctrl() 601 packet.hdr.len = sizeof(struct hvsi_control); hvsi_set_mctrl() 602 packet.verb = VSV_SET_MODEM_CTL; hvsi_set_mctrl() 603 packet.mask = HVSI_TSDTR; hvsi_set_mctrl() 606 packet.word = HVSI_TSDTR; hvsi_set_mctrl() 608 pr_debug("%s: sending %i bytes\n", __func__, packet.hdr.len); hvsi_set_mctrl() 609 dbg_dump_hex((uint8_t*)&packet, packet.hdr.len); hvsi_set_mctrl() 611 wrote = hvc_put_chars(hp->vtermno, (char *)&packet, packet.hdr.len); hvsi_set_mctrl() 612 if (wrote != packet.hdr.len) { hvsi_set_mctrl() 639 * user" and "it was just reset before it saw our handshake packet".) hvsi_handshake() 677 struct hvsi_data packet __ALIGNED__; hvsi_put_chars() 682 packet.hdr.type = VS_DATA_PACKET_HEADER; hvsi_put_chars() 683 packet.hdr.seqno = atomic_inc_return(&hp->seqno); hvsi_put_chars() 684 packet.hdr.len = count + sizeof(struct hvsi_header); hvsi_put_chars() 685 memcpy(&packet.data, buf, count); hvsi_put_chars() 687 ret = hvc_put_chars(hp->vtermno, (char *)&packet, packet.hdr.len); hvsi_put_chars() 688 if (ret == packet.hdr.len) { hvsi_put_chars() 689 /* return the number of chars written, not the packet length */ hvsi_put_chars() 697 struct hvsi_control packet __ALIGNED__; hvsi_close_protocol() 699 packet.hdr.type = VS_CONTROL_PACKET_HEADER; hvsi_close_protocol() 700 packet.hdr.seqno = atomic_inc_return(&hp->seqno); hvsi_close_protocol() 701 packet.hdr.len = 6; hvsi_close_protocol() 702 packet.verb = VSV_CLOSE_PROTOCOL; hvsi_close_protocol() 704 pr_debug("%s: sending %i bytes\n", __func__, packet.hdr.len); hvsi_close_protocol() 705 dbg_dump_hex((uint8_t*)&packet, packet.hdr.len); hvsi_close_protocol() 707 hvc_put_chars(hp->vtermno, (char *)&packet, packet.hdr.len); hvsi_close_protocol()
|
H A D | hvsi_lib.c | 9 static int hvsi_send_packet(struct hvsi_priv *pv, struct hvsi_header *packet) hvsi_send_packet() argument 11 packet->seqno = cpu_to_be16(atomic_inc_return(&pv->seqno)); hvsi_send_packet() 14 return pv->put_chars(pv->termno, (char *)packet, packet->len); hvsi_send_packet() 138 pr_devel("HVSI@%x: Got packet type %x len %d bytes:\n", hvsi_check_packet() 141 /* We have a packet, yay ! Handle it */ hvsi_check_packet() 158 /* Swallow packet and retry */ hvsi_check_packet() 173 * a full packet and retry hvsi_get_packet() 199 /* Consume existing data packet */ hvsilib_get_chars() 211 /* Data packet fully consumed, move down remaning data */ hvsilib_get_chars() 219 /* Try to get another packet */ hvsilib_get_chars() 317 /* Try for up to 200ms, there can be a packet to hvsilib_establish() 327 /* Failed, send a close connection packet just hvsilib_establish()
|
/linux-4.1.27/include/linux/ |
H A D | smc91x.h | 23 #define RPC_LED_TX_RX (0x04) /* LED = TX or RX packet occurred */ 25 #define RPC_LED_TX (0x06) /* LED = TX packet occurred */ 26 #define RPC_LED_RX (0x07) /* LED = RX packet occurred */
|
H A D | ptp_classify.h | 33 #define PTP_CLASS_IPV4 0x10 /* event in an IPV4 UDP packet */ 34 #define PTP_CLASS_IPV6 0x20 /* event in an IPV6 UDP packet */ 35 #define PTP_CLASS_L2 0x30 /* event in a L2 packet */ 36 #define PTP_CLASS_PMASK 0x30 /* mask for the packet type field */ 37 #define PTP_CLASS_VLAN 0x40 /* event in a VLAN tagged packet */ 61 * ptp_classify_raw - classify a PTP packet 64 * Runs a minimal BPF dissector to classify a network packet to 68 * PTP_CLASS_V2_{L2,VLAN}, depending on the packet content.
|
H A D | ppp-comp.h | 2 * ppp-comp.h - Definitions for doing PPP packet compression. 52 /* Compress a packet */ 73 /* Decompress a packet. */ 77 /* Update state for an incompressible packet received */ 91 * decompressed packet if successful, otherwise DECOMP_ERROR
|
H A D | ppp_channel.h | 30 /* Send a packet (or multilink fragment) on this channel. 40 int mtu; /* max transmit packet size */ 52 /* Called by the channel to process a received PPP packet. 53 The packet should have just the 2-byte PPP protocol header. */ 57 that we may have missed a packet. */
|
H A D | arcdevice.h | 118 * These are the max/min lengths of packet payload, not including the 121 * Note: packet sizes 254, 255, 256 are impossible because of the way 126 #define MTU 253 /* normal packet max size */ 127 #define MinTU 257 /* extended packet min size */ 128 #define XMTU 508 /* extended packet max size */ 189 int mtu; /* largest possible packet */ 213 struct sk_buff *skb; /* packet data buffer */ 215 uint8_t lastpacket, /* number of last packet (from 1) */ 223 * if NULL, no packet is pending. 245 next_tx, /* buffer where a packet is ready to send */ 247 int lastload_dest, /* can last loaded packet be acked? */ 248 lasttrans_dest; /* can last TX'd packet be acked? */ 249 int timed_out; /* need to process TX timeout and drop packet */ 264 * buffer, or start receiving while we copy a received packet to 289 uint16_t sequence; /* sequence number (incs with each packet) */ 296 struct Outgoing outgoing; /* packet currently being sent */
|
H A D | hil_mlc.h | 48 * is an IN or EXPECT, and then sends the given packet. 55 /* HILSE_OUT_LAST sends the given command packet to 60 /* HILSE_OUT_DISC sends the given command packet to 70 /* HILSE_IN simply expects any non-errored packet to arrive 75 /* HILSE_EXPECT expects a particular packet to arrive 76 * within arg usecs, any other packet is considered an error. 96 hil_packet packet; /* Packet to send or to compare */ member in union:hilse_node::__anon11718 143 struct semaphore isem; /* Raised when a packet arrives */
|
/linux-4.1.27/drivers/isdn/sc/ |
H A D | Makefile | 9 sc-y := shmem.o init.o packet.o command.o event.o \
|
/linux-4.1.27/drivers/net/wan/lmc/ |
H A D | Makefile | 10 # Like above except every packet gets echoed to KERN_DEBUG
|
/linux-4.1.27/include/net/ |
H A D | firewire.h | 11 u8 max_rec; /* max packet size */ 22 __be16 h_proto; /* packet type ID field */
|
H A D | slhc_vj.h | 41 * Compressed packet format: 43 * The first octet contains the packet type (top 3 bits), TCP 47 * the compressed packet. The next two octets are the TCP checksum 62 * ack is more than 65535, an uncompressed packet is sent.) 68 * The top nibble of the first octet is the packet type. There are 70 * control flags set); uncompressed TCP (a normal IP/TCP packet but 72 * this type of packet syncs the sender & receiver); and compressed 77 * three bits are actual packet type. For backward compatibility 80 * means "IP packet". 93 /* Bits in first octet of compressed packet */ 94 #define NEW_C 0x40 /* flag bits for what changed in a packet */ 124 * basically a copy of the entire IP/TCP header from the last packet 131 struct iphdr cs_ip; /* ip/tcp hdr from most recent packet */
|
H A D | dn_route.h | 27 #define DN_RT_F_PID 0x07 /* Mask for packet type */ 29 #define DN_RT_F_VER 0x40 /* Version =0 discard packet if ==1 */ 32 #define DN_RT_F_RQR 0x08 /* Return packet to sender upon non-delivery */ 37 #define DN_RT_PKT_SHORT 0x02 /* Short routing packet */ 38 #define DN_RT_PKT_LONG 0x06 /* Long routing packet */ 41 #define DN_RT_PKT_CNTL 0x01 /* Set to 1 if a control packet */ 44 #define DN_RT_PKT_INIT 0x01 /* Initialisation packet */
|
/linux-4.1.27/drivers/input/joystick/ |
H A D | grip_mp.c | 58 * Multiport packet interpretation 61 #define PACKET_FULL 0x80000000 /* packet is full */ 71 #define IO_GOT_PACKET 0x0100 /* Got a packet */ 75 #define IO_RETRY 0x4000 /* Try again later to get packet */ 149 * Gets a 28-bit packet from the multiport. 151 * After getting a packet successfully, commands encoded by sendcode may 156 * Returns a packet status code indicating whether packet is valid, the transfer 163 static int mp_io(struct gameport* gameport, int sendflags, int sendcode, u32 *packet) mp_io() argument 166 u8 data_mask; /* packet data bits from raw_data */ mp_io() 167 u32 pkt; /* packet temporary storage */ mp_io() 168 int bits_per_read; /* num packet bits per gameport read */ mp_io() 174 *packet = 0; mp_io() 197 /* Determine packet transfer mode and prepare for packet construction. */ mp_io() 213 /* Construct a packet. Final data bits must be zero. */ mp_io() 241 /* Acknowledge packet receipt */ mp_io() 256 /* Return if we just wanted the packet or multiport wants to send more */ mp_io() 258 *packet = pkt; mp_io() 300 static int multiport_io(struct gameport* gameport, int sendflags, int sendcode, u32 *packet) multiport_io() argument 306 status = mp_io(gameport, sendflags, sendcode, packet); multiport_io() 315 * Returns true if a valid digital packet was received, false otherwise. 318 static int dig_mode_start(struct gameport *gameport, u32 *packet) dig_mode_start() argument 332 while (tries < 64 && bads < 8) { /* Reset multiport and try getting a packet */ dig_mode_start() 334 flags = multiport_io(gameport, IO_RESET, 0x27, packet); dig_mode_start() 354 * Returns the packet status. 360 u32 packet; get_and_decode_packet() local 364 /* Get a packet and check for validity */ get_and_decode_packet() 367 flags = multiport_io(grip->gameport, flags, 0, &packet); get_and_decode_packet() 370 if (packet & PACKET_MP_DONE) get_and_decode_packet() 380 slot = ((packet >> 21) & 0xf) - 1; get_and_decode_packet() 391 joytype = (packet >> 16) & 0x1f; get_and_decode_packet() 406 /* Interpret a grip pad packet */ get_and_decode_packet() 410 int dir = (packet >> 8) & 0xf; /* eight way directional value */ get_and_decode_packet() 411 port->buttons = (~packet) & 0xff; get_and_decode_packet() 437 printk(KERN_INFO "Got joy type 0x%x and packet 0x%x.\n", joytype, packet); get_and_decode_packet() 479 u32 packet; multiport_init() local 481 dig_mode = dig_mode_start(grip->gameport, &packet); multiport_init() 483 dig_mode = dig_mode_start(grip->gameport, &packet); multiport_init()
|
H A D | sidewinder.c | 55 #define SW_END 8 /* Number of bits before end of packet to kick */ 56 #define SW_FAIL 16 /* Number of packet read errors to fail and reinitialize */ 57 #define SW_BAD 2 /* Number of packet read errors to switch off 3d Pro optimization */ 58 #define SW_OK 64 /* Number of packet read successes to switch optimization back on */ 59 #define SW_LENGTH 512 /* Max number of bits in a packet */ 130 * sw_read_packet() is a function which reads either a data packet, or an 131 * identification packet from a SideWinder joystick. The protocol is very, 142 timeout = id ? gameport_time(gameport, SW_TIMEOUT * 1000) : 0; /* Set up global timeout for ID packet */ sw_read_packet() 143 kick = id ? gameport_time(gameport, SW_KICK) : 0; /* Set up kick timeout for ID packet */ sw_read_packet() 210 * Parameter 'pos' is bit number inside packet where to start at, 'num' is number 432 if (sw->type == SW_ID_3DP && sw->length == 66 && i != 66) { /* Broken packet, try to fix */ sw_read() 491 i = sw_read_packet(sw->gameport, buf, SW_LENGTH, 0); /* Read normal data packet */ sw_read() 493 sw_read_packet(sw->gameport, buf, SW_LENGTH, i); /* Read ID packet, this initializes the stick */ sw_read() 525 * sw_print_packet() prints the contents of a SideWinder packet. 532 printk(KERN_INFO "sidewinder.c: %s packet, %d bits. [", name, length); sw_print_packet() 567 * behavior for 3DP ID packet, and for example the FSP does this in 618 i = sw_read_packet(gameport, buf, SW_LENGTH, 0); /* Read normal packet */ sw_connect() 625 i = sw_read_packet(gameport, buf, SW_LENGTH, 0); /* Retry reading packet */ sw_connect() 635 m |= sw_guess_mode(idbuf, j); /* ID packet should carry mode info [3DP] */ sw_connect() 640 i = sw_read_packet(gameport, buf, SW_LENGTH, 0); /* Retry reading packet */ sw_connect() 659 i = sw_read_packet(gameport, buf, SW_LENGTH, 0); /* Read data packet */ sw_connect() 663 /* no sense to try detection for a packet shorter */ sw_connect() 676 case 45: /* Ambiguous packet length */ sw_connect()
|
/linux-4.1.27/drivers/usb/misc/sisusbvga/ |
H A D | sisusb.c | 552 struct sisusb_packet *packet) sisusb_send_packet() 559 packet->data = 0; sisusb_send_packet() 567 SISUSB_CORRECT_ENDIANNESS_PACKET(packet); sisusb_send_packet() 569 /* 1. send the packet */ sisusb_send_packet() 571 (char *)packet, NULL, 0, &bytes_transferred, 0, 0); sisusb_send_packet() 575 /* 2. if packet len == 6, it means we read, so wait for 32bit sisusb_send_packet() 576 * return value and write it to packet->data sisusb_send_packet() 581 packet->data = le32_to_cpu(tmp); sisusb_send_packet() 588 struct sisusb_packet *packet, sisusb_send_bridge_packet() 596 packet->data = 0; sisusb_send_bridge_packet() 604 SISUSB_CORRECT_ENDIANNESS_PACKET(packet); sisusb_send_bridge_packet() 606 /* 1. send the packet */ sisusb_send_bridge_packet() 608 (char *)packet, NULL, 0, &bytes_transferred, tflags, 0); sisusb_send_bridge_packet() 612 /* 2. if packet len == 6, it means we read, so wait for 32bit sisusb_send_bridge_packet() 613 * return value and write it to packet->data sisusb_send_bridge_packet() 618 packet->data = le32_to_cpu(tmp); sisusb_send_bridge_packet() 639 struct sisusb_packet packet; sisusb_write_memio_byte() local 642 packet.header = (1 << (addr & 3)) | (type << 6); sisusb_write_memio_byte() 643 packet.address = addr & ~3; sisusb_write_memio_byte() 644 packet.data = data << ((addr & 3) << 3); sisusb_write_memio_byte() 645 ret = sisusb_send_packet(sisusb, 10, &packet); sisusb_write_memio_byte() 652 struct sisusb_packet packet; sisusb_write_memio_word() local 655 packet.address = addr & ~3; sisusb_write_memio_word() 659 packet.header = (type << 6) | 0x0003; sisusb_write_memio_word() 660 packet.data = (u32)data; sisusb_write_memio_word() 661 ret = sisusb_send_packet(sisusb, 10, &packet); sisusb_write_memio_word() 664 packet.header = (type << 6) | 0x0006; sisusb_write_memio_word() 665 packet.data = (u32)data << 8; sisusb_write_memio_word() 666 ret = sisusb_send_packet(sisusb, 10, &packet); sisusb_write_memio_word() 669 packet.header = (type << 6) | 0x000c; sisusb_write_memio_word() 670 packet.data = (u32)data << 16; sisusb_write_memio_word() 671 ret = sisusb_send_packet(sisusb, 10, &packet); sisusb_write_memio_word() 674 packet.header = (type << 6) | 0x0008; sisusb_write_memio_word() 675 packet.data = (u32)data << 24; sisusb_write_memio_word() 676 ret = sisusb_send_packet(sisusb, 10, &packet); sisusb_write_memio_word() 677 packet.header = (type << 6) | 0x0001; sisusb_write_memio_word() 678 packet.address = (addr & ~3) + 4; sisusb_write_memio_word() 679 packet.data = (u32)data >> 8; sisusb_write_memio_word() 680 ret |= sisusb_send_packet(sisusb, 10, &packet); sisusb_write_memio_word() 689 struct sisusb_packet packet; sisusb_write_memio_24bit() local 692 packet.address = addr & ~3; sisusb_write_memio_24bit() 696 packet.header = (type << 6) | 0x0007; sisusb_write_memio_24bit() 697 packet.data = data & 0x00ffffff; sisusb_write_memio_24bit() 698 ret = sisusb_send_packet(sisusb, 10, &packet); sisusb_write_memio_24bit() 701 packet.header = (type << 6) | 0x000e; sisusb_write_memio_24bit() 702 packet.data = data << 8; sisusb_write_memio_24bit() 703 ret = sisusb_send_packet(sisusb, 10, &packet); sisusb_write_memio_24bit() 706 packet.header = (type << 6) | 0x000c; sisusb_write_memio_24bit() 707 packet.data = data << 16; sisusb_write_memio_24bit() 708 ret = sisusb_send_packet(sisusb, 10, &packet); sisusb_write_memio_24bit() 709 packet.header = (type << 6) | 0x0001; sisusb_write_memio_24bit() 710 packet.address = (addr & ~3) + 4; sisusb_write_memio_24bit() 711 packet.data = (data >> 16) & 0x00ff; sisusb_write_memio_24bit() 712 ret |= sisusb_send_packet(sisusb, 10, &packet); sisusb_write_memio_24bit() 715 packet.header = (type << 6) | 0x0008; sisusb_write_memio_24bit() 716 packet.data = data << 24; sisusb_write_memio_24bit() 717 ret = sisusb_send_packet(sisusb, 10, &packet); sisusb_write_memio_24bit() 718 packet.header = (type << 6) | 0x0003; sisusb_write_memio_24bit() 719 packet.address = (addr & ~3) + 4; sisusb_write_memio_24bit() 720 packet.data = (data >> 8) & 0xffff; sisusb_write_memio_24bit() 721 ret |= sisusb_send_packet(sisusb, 10, &packet); sisusb_write_memio_24bit() 730 struct sisusb_packet packet; sisusb_write_memio_long() local 733 packet.address = addr & ~3; sisusb_write_memio_long() 737 packet.header = (type << 6) | 0x000f; sisusb_write_memio_long() 738 packet.data = data; sisusb_write_memio_long() 739 ret = sisusb_send_packet(sisusb, 10, &packet); sisusb_write_memio_long() 742 packet.header = (type << 6) | 0x000e; sisusb_write_memio_long() 743 packet.data = data << 8; sisusb_write_memio_long() 744 ret = sisusb_send_packet(sisusb, 10, &packet); sisusb_write_memio_long() 745 packet.header = (type << 6) | 0x0001; sisusb_write_memio_long() 746 packet.address = (addr & ~3) + 4; sisusb_write_memio_long() 747 packet.data = data >> 24; sisusb_write_memio_long() 748 ret |= sisusb_send_packet(sisusb, 10, &packet); sisusb_write_memio_long() 751 packet.header = (type << 6) | 0x000c; sisusb_write_memio_long() 752 packet.data = data << 16; sisusb_write_memio_long() 753 ret = sisusb_send_packet(sisusb, 10, &packet); sisusb_write_memio_long() 754 packet.header = (type << 6) | 0x0003; sisusb_write_memio_long() 755 packet.address = (addr & ~3) + 4; sisusb_write_memio_long() 756 packet.data = data >> 16; sisusb_write_memio_long() 757 ret |= sisusb_send_packet(sisusb, 10, &packet); sisusb_write_memio_long() 760 packet.header = (type << 6) | 0x0008; sisusb_write_memio_long() 761 packet.data = data << 24; sisusb_write_memio_long() 762 ret = sisusb_send_packet(sisusb, 10, &packet); sisusb_write_memio_long() 763 packet.header = (type << 6) | 0x0007; sisusb_write_memio_long() 764 packet.address = (addr & ~3) + 4; sisusb_write_memio_long() 765 packet.data = data >> 8; sisusb_write_memio_long() 766 ret |= sisusb_send_packet(sisusb, 10, &packet); sisusb_write_memio_long() 787 struct sisusb_packet packet; sisusb_write_mem_bulk() local 895 packet.header = 0x001f; sisusb_write_mem_bulk() 896 packet.address = 0x000001d4; sisusb_write_mem_bulk() 897 packet.data = addr; sisusb_write_mem_bulk() 899 &packet, 0); sisusb_write_mem_bulk() 900 packet.header = 0x001f; sisusb_write_mem_bulk() 901 packet.address = 0x000001d0; sisusb_write_mem_bulk() 902 packet.data = (length & ~3); sisusb_write_mem_bulk() 904 &packet, 0); sisusb_write_mem_bulk() 905 packet.header = 0x001f; sisusb_write_mem_bulk() 906 packet.address = 0x000001c0; sisusb_write_mem_bulk() 907 packet.data = flag | 0x16; sisusb_write_mem_bulk() 909 &packet, 0); sisusb_write_mem_bulk() 936 packet.header = 0x001f; sisusb_write_mem_bulk() 937 packet.address = 0x00000194; sisusb_write_mem_bulk() 938 packet.data = addr; sisusb_write_mem_bulk() 940 &packet, 0); sisusb_write_mem_bulk() 941 packet.header = 0x001f; sisusb_write_mem_bulk() 942 packet.address = 0x00000190; sisusb_write_mem_bulk() 943 packet.data = (length & ~3); sisusb_write_mem_bulk() 945 &packet, 0); sisusb_write_mem_bulk() 947 packet.header = 0x001f; sisusb_write_mem_bulk() 948 packet.address = 0x00000180; sisusb_write_mem_bulk() 949 packet.data = flag | 0x16; sisusb_write_mem_bulk() 951 &packet, 0); sisusb_write_mem_bulk() 998 /* Remember: Read data in packet is in machine-endianess! So for 1005 struct sisusb_packet packet; sisusb_read_memio_byte() local 1008 CLEARPACKET(&packet); sisusb_read_memio_byte() 1009 packet.header = (1 << (addr & 3)) | (type << 6); sisusb_read_memio_byte() 1010 packet.address = addr & ~3; sisusb_read_memio_byte() 1011 ret = sisusb_send_packet(sisusb, 6, &packet); sisusb_read_memio_byte() 1012 *data = (u8)(packet.data >> ((addr & 3) << 3)); sisusb_read_memio_byte() 1019 struct sisusb_packet packet; sisusb_read_memio_word() local 1022 CLEARPACKET(&packet); sisusb_read_memio_word() 1024 packet.address = addr & ~3; sisusb_read_memio_word() 1028 packet.header = (type << 6) | 0x0003; sisusb_read_memio_word() 1029 ret = sisusb_send_packet(sisusb, 6, &packet); sisusb_read_memio_word() 1030 *data = (u16)(packet.data); sisusb_read_memio_word() 1033 packet.header = (type << 6) | 0x0006; sisusb_read_memio_word() 1034 ret = sisusb_send_packet(sisusb, 6, &packet); sisusb_read_memio_word() 1035 *data = (u16)(packet.data >> 8); sisusb_read_memio_word() 1038 packet.header = (type << 6) | 0x000c; sisusb_read_memio_word() 1039 ret = sisusb_send_packet(sisusb, 6, &packet); sisusb_read_memio_word() 1040 *data = (u16)(packet.data >> 16); sisusb_read_memio_word() 1043 packet.header = (type << 6) | 0x0008; sisusb_read_memio_word() 1044 ret = sisusb_send_packet(sisusb, 6, &packet); sisusb_read_memio_word() 1045 *data = (u16)(packet.data >> 24); sisusb_read_memio_word() 1046 packet.header = (type << 6) | 0x0001; sisusb_read_memio_word() 1047 packet.address = (addr & ~3) + 4; sisusb_read_memio_word() 1048 ret |= sisusb_send_packet(sisusb, 6, &packet); sisusb_read_memio_word() 1049 *data |= (u16)(packet.data << 8); sisusb_read_memio_word() 1058 struct sisusb_packet packet; sisusb_read_memio_24bit() local 1061 packet.address = addr & ~3; sisusb_read_memio_24bit() 1065 packet.header = (type << 6) | 0x0007; sisusb_read_memio_24bit() 1066 ret = sisusb_send_packet(sisusb, 6, &packet); sisusb_read_memio_24bit() 1067 *data = packet.data & 0x00ffffff; sisusb_read_memio_24bit() 1070 packet.header = (type << 6) | 0x000e; sisusb_read_memio_24bit() 1071 ret = sisusb_send_packet(sisusb, 6, &packet); sisusb_read_memio_24bit() 1072 *data = packet.data >> 8; sisusb_read_memio_24bit() 1075 packet.header = (type << 6) | 0x000c; sisusb_read_memio_24bit() 1076 ret = sisusb_send_packet(sisusb, 6, &packet); sisusb_read_memio_24bit() 1077 *data = packet.data >> 16; sisusb_read_memio_24bit() 1078 packet.header = (type << 6) | 0x0001; sisusb_read_memio_24bit() 1079 packet.address = (addr & ~3) + 4; sisusb_read_memio_24bit() 1080 ret |= sisusb_send_packet(sisusb, 6, &packet); sisusb_read_memio_24bit() 1081 *data |= ((packet.data & 0xff) << 16); sisusb_read_memio_24bit() 1084 packet.header = (type << 6) | 0x0008; sisusb_read_memio_24bit() 1085 ret = sisusb_send_packet(sisusb, 6, &packet); sisusb_read_memio_24bit() 1086 *data = packet.data >> 24; sisusb_read_memio_24bit() 1087 packet.header = (type << 6) | 0x0003; sisusb_read_memio_24bit() 1088 packet.address = (addr & ~3) + 4; sisusb_read_memio_24bit() 1089 ret |= sisusb_send_packet(sisusb, 6, &packet); sisusb_read_memio_24bit() 1090 *data |= ((packet.data & 0xffff) << 8); sisusb_read_memio_24bit() 1099 struct sisusb_packet packet; sisusb_read_memio_long() local 1102 packet.address = addr & ~3; sisusb_read_memio_long() 1106 packet.header = (type << 6) | 0x000f; sisusb_read_memio_long() 1107 ret = sisusb_send_packet(sisusb, 6, &packet); sisusb_read_memio_long() 1108 *data = packet.data; sisusb_read_memio_long() 1111 packet.header = (type << 6) | 0x000e; sisusb_read_memio_long() 1112 ret = sisusb_send_packet(sisusb, 6, &packet); sisusb_read_memio_long() 1113 *data = packet.data >> 8; sisusb_read_memio_long() 1114 packet.header = (type << 6) | 0x0001; sisusb_read_memio_long() 1115 packet.address = (addr & ~3) + 4; sisusb_read_memio_long() 1116 ret |= sisusb_send_packet(sisusb, 6, &packet); sisusb_read_memio_long() 1117 *data |= (packet.data << 24); sisusb_read_memio_long() 1120 packet.header = (type << 6) | 0x000c; sisusb_read_memio_long() 1121 ret = sisusb_send_packet(sisusb, 6, &packet); sisusb_read_memio_long() 1122 *data = packet.data >> 16; sisusb_read_memio_long() 1123 packet.header = (type << 6) | 0x0003; sisusb_read_memio_long() 1124 packet.address = (addr & ~3) + 4; sisusb_read_memio_long() 1125 ret |= sisusb_send_packet(sisusb, 6, &packet); sisusb_read_memio_long() 1126 *data |= (packet.data << 16); sisusb_read_memio_long() 1129 packet.header = (type << 6) | 0x0008; sisusb_read_memio_long() 1130 ret = sisusb_send_packet(sisusb, 6, &packet); sisusb_read_memio_long() 1131 *data = packet.data >> 24; sisusb_read_memio_long() 1132 packet.header = (type << 6) | 0x0007; sisusb_read_memio_long() 1133 packet.address = (addr & ~3) + 4; sisusb_read_memio_long() 1134 ret |= sisusb_send_packet(sisusb, 6, &packet); sisusb_read_memio_long() 1135 *data |= (packet.data << 8); sisusb_read_memio_long() 1375 struct sisusb_packet packet; sisusb_write_pci_config() local 1378 packet.header = 0x008f; sisusb_write_pci_config() 1379 packet.address = regnum | 0x10000; sisusb_write_pci_config() 1380 packet.data = data; sisusb_write_pci_config() 1381 ret = sisusb_send_packet(sisusb, 10, &packet); sisusb_write_pci_config() 1388 struct sisusb_packet packet; sisusb_read_pci_config() local 1391 packet.header = 0x008f; sisusb_read_pci_config() 1392 packet.address = (u32)regnum | 0x10000; sisusb_read_pci_config() 1393 ret = sisusb_send_packet(sisusb, 6, &packet); sisusb_read_pci_config() 1394 *data = packet.data; sisusb_read_pci_config() 2168 struct sisusb_packet packet; sisusb_do_init_gfxdevice() local 2173 packet.header = 0x001f; sisusb_do_init_gfxdevice() 2174 packet.address = 0x00000324; sisusb_do_init_gfxdevice() 2175 packet.data = 0x00000004; sisusb_do_init_gfxdevice() 2176 ret = sisusb_send_bridge_packet(sisusb, 10, &packet, 0); sisusb_do_init_gfxdevice() 2178 packet.header = 0x001f; sisusb_do_init_gfxdevice() 2179 packet.address = 0x00000364; sisusb_do_init_gfxdevice() 2180 packet.data = 0x00000004; sisusb_do_init_gfxdevice() 2181 ret |= sisusb_send_bridge_packet(sisusb, 10, &packet, 0); sisusb_do_init_gfxdevice() 2183 packet.header = 0x001f; sisusb_do_init_gfxdevice() 2184 packet.address = 0x00000384; sisusb_do_init_gfxdevice() 2185 packet.data = 0x00000004; sisusb_do_init_gfxdevice() 2186 ret |= sisusb_send_bridge_packet(sisusb, 10, &packet, 0); sisusb_do_init_gfxdevice() 2188 packet.header = 0x001f; sisusb_do_init_gfxdevice() 2189 packet.address = 0x00000100; sisusb_do_init_gfxdevice() 2190 packet.data = 0x00000700; sisusb_do_init_gfxdevice() 2191 ret |= sisusb_send_bridge_packet(sisusb, 10, &packet, 0); sisusb_do_init_gfxdevice() 2193 packet.header = 0x000f; sisusb_do_init_gfxdevice() 2194 packet.address = 0x00000004; sisusb_do_init_gfxdevice() 2195 ret |= sisusb_send_bridge_packet(sisusb, 6, &packet, 0); sisusb_do_init_gfxdevice() 2196 packet.data |= 0x17; sisusb_do_init_gfxdevice() 2197 ret |= sisusb_send_bridge_packet(sisusb, 10, &packet, 0); sisusb_do_init_gfxdevice() 2230 packet.header = 0x001f; sisusb_do_init_gfxdevice() 2231 packet.address = 0x00000050; sisusb_do_init_gfxdevice() 2232 packet.data = 0x000000ff; sisusb_do_init_gfxdevice() 2233 ret |= sisusb_send_bridge_packet(sisusb, 10, &packet, 0); sisusb_do_init_gfxdevice() 551 sisusb_send_packet(struct sisusb_usb_data *sisusb, int len, struct sisusb_packet *packet) sisusb_send_packet() argument 587 sisusb_send_bridge_packet(struct sisusb_usb_data *sisusb, int len, struct sisusb_packet *packet, unsigned int tflags) sisusb_send_bridge_packet() argument
|
/linux-4.1.27/net/batman-adv/ |
H A D | packet.h | 29 * payload packet 30 * @BATADV_UNICAST_4ADDR: unicast packet including the originator address of 32 * @BATADV_ICMP: unicast packet like IP ICMP used for ping or traceroute 33 * @BATADV_UNICAST_TVLV: unicast packet carrying TVLV containers 52 * enum batadv_subtype - packet subtype for unicast4addr 70 * @BATADV_NOT_BEST_NEXT_HOP: flag is set when ogm packet is forwarded and was 73 * is used, and the packet travels its first hop. 205 * struct batadv_ogm_packet - ogm (routing protocol) packet 206 * @packet_type: batman-adv packet type, part of the general header 208 * @ttl: time to live for this packet, part of the genereal header 232 * @packet_type: batman-adv packet type, part of the general header 234 * @ttl: time to live for this packet, part of the genereal header 235 * @msg_type: ICMP packet type 257 * batadv_icmp_packet - ICMP packet 258 * @packet_type: batman-adv packet type, part of the general header 260 * @ttl: time to live for this packet, part of the genereal header 261 * @msg_type: ICMP packet type 283 * batadv_icmp_packet_rr - ICMP RouteRecord packet 284 * @packet_type: batman-adv packet type, part of the general header 286 * @ttl: time to live for this packet, part of the genereal header 287 * @msg_type: ICMP packet type 310 /* All packet headers in front of an ethernet header have to be completely 323 * struct batadv_unicast_packet - unicast packet for network payload 324 * @packet_type: batman-adv packet type, part of the general header 326 * @ttl: time to live for this packet, part of the genereal header 328 * @dest: originator destination of the unicast packet 342 * struct batadv_unicast_4addr_packet - extended unicast packet 343 * @u: common unicast packet header 345 * @subtype: packet subtype 358 * struct batadv_frag_packet - fragmented packet 359 * @packet_type: batman-adv packet type, part of the general header 361 * @ttl: time to live for this packet, part of the genereal header 363 * @orig: originator of the fragment used when merging the packet 367 * @total_size: size of the merged packet 389 * struct batadv_bcast_packet - broadcast packet for network payload 390 * @packet_type: batman-adv packet type, part of the general header 392 * @ttl: time to live for this packet, part of the genereal header 395 * @orig: originator of the broadcast packet 410 * struct batadv_coded_packet - network coded packet 411 * @packet_type: batman-adv packet type, part of the general header 413 * @ttl: time to live for this packet, part of the genereal header 415 * @first_source: original source of first included packet 416 * @first_orig_dest: original destinal of first included packet 417 * @first_crc: checksum of first included packet 418 * @first_ttvn: tt-version number of first included packet 419 * @second_ttl: ttl of second packet 420 * @second_dest: second receiver of this coded packet 421 * @second_source: original source of second included packet 422 * @second_orig_dest: original destination of second included packet 423 * @second_crc: checksum of second included packet 424 * @second_ttvn: tt version number of second included packet 448 * struct batadv_unicast_tvlv - generic unicast packet with tvlv payload 449 * @packet_type: batman-adv packet type, part of the general header 451 * @ttl: time to live for this packet, part of the genereal header 452 * @reserved: reserved field (for packet alignment)
|
H A D | bitarray.c | 23 /* shift the packet array by n places. */ batadv_bitmap_shift_left() 32 /* receive and process one packet within the sequence number window. 75 /* received a much older packet. The other host either restarted batadv_bit_get_packet() 76 * or the old packet got delayed somewhere in the network. The batadv_bit_get_packet() 77 * packet should be dropped without calling this function if the batadv_bit_get_packet()
|
H A D | icmp_socket.c | 62 pr_err("Error - can't add another packet client: maximum number of clients reached\n"); batadv_socket_open() 165 "Error - can't send packet from char device: invalid packet size\n"); batadv_socket_write() 198 "Error - can't send packet from char device: got bogus packet type (expected: BAT_ICMP)\n"); batadv_socket_write() 207 "Error - can't send packet from char device: invalid packet size\n"); batadv_socket_write() 239 "Error - can't send packet from char device: got unknown message type\n"); batadv_socket_write() 315 * batadv_socket_receive_packet - schedule an icmp packet to be sent to userspace 317 * @socket_client: the socket this packet belongs to 318 * @icmph: pointer to the header of the icmp packet 319 * @icmp_len: total length of the icmp packet 372 * batadv_socket_receive_packet - schedule an icmp packet to be received 374 * @icmph: pointer to the header of the icmp packet 375 * @icmp_len: total length of the icmp packet
|
H A D | routing.c | 129 * 0 if the packet is to be accepted 130 * 1 if the packet is to be ignored. 143 "old packet received, start protection\n"); batadv_window_protected() 155 /* drop packet if it has not necessary minimum size */ batadv_check_management_packet() 161 /* packet with broadcast indication but unicast recipient */ batadv_check_management_packet() 165 /* packet with broadcast sender address */ batadv_check_management_packet() 181 * batadv_recv_my_icmp_packet - receive an icmp packet locally 183 * @skb: icmp packet to process 185 * Returns NET_RX_SUCCESS if the packet has been consumed or NET_RX_DROP 202 /* receive the packet */ batadv_recv_my_icmp_packet() 257 /* send TTL exceeded if packet is an echo request (traceroute) */ batadv_recv_icmp_ttl_exceeded() 259 pr_debug("Warning - can't forward icmp packet from %pM to %pM: ttl exceeded\n", batadv_recv_icmp_ttl_exceeded() 306 /* drop packet if it has not necessary minimum size */ batadv_recv_icmp_packet() 312 /* packet with unicast indication but broadcast recipient */ batadv_recv_icmp_packet() 316 /* packet with broadcast sender address */ batadv_recv_icmp_packet() 347 /* packet for me */ batadv_recv_icmp_packet() 382 * @skb: packet to check 385 * Check for short header and bad addresses in given packet. Returns negative 395 /* drop packet if it has not necessary minimum size */ batadv_check_unicast_packet() 401 /* packet with unicast indication but broadcast recipient */ batadv_check_unicast_packet() 405 /* packet with broadcast sender address */ batadv_check_unicast_packet() 420 * @recv_if: pointer to interface this packet was received on 568 pr_debug("Warning - can't forward unicast packet from %pM to %pM: ttl exceeded\n", batadv_route_unicast_packet() 595 /* other packet types not supported - yet */ batadv_route_unicast_packet() 635 * Returns true if the packet header has been updated, false otherwise 666 /* update the packet header */ batadv_reroute_unicast_packet() 705 * the packet to batadv_check_unicast_ttvn() 712 "Rerouting unicast packet to %pM (dst=%pM): Local Roaming\n", batadv_check_unicast_ttvn() 717 * table. If not, let the packet go untouched anyway because batadv_check_unicast_ttvn() 723 /* retrieve the TTVN known by this node for the packet destination. This batadv_check_unicast_ttvn() 725 * last time) the packet had an updated information or not batadv_check_unicast_ttvn() 732 * destination, the packet can immediately be dropped as it will batadv_check_unicast_ttvn() 742 /* check if the TTVN contained in the packet is fresher than what the batadv_check_unicast_ttvn() 750 /* the packet was forged based on outdated network information. Its batadv_check_unicast_ttvn() 757 "Rerouting unicast packet to %pM (dst=%pM): TTVN mismatch old_ttvn=%u new_ttvn=%u\n", batadv_check_unicast_ttvn() 763 /* the packet has not been re-routed: either the destination is batadv_check_unicast_ttvn() 765 * it is possible to drop the packet batadv_check_unicast_ttvn() 770 /* update the header in order to let the packet be delivered to this batadv_check_unicast_ttvn() 789 * @skb: unicast tvlv packet to process 790 * @recv_if: pointer to interface this packet was received on 792 * Returns NET_RX_SUCCESS if the packet has been consumed or NET_RX_DROP 836 /* Even though the packet is not for us, we might save it to use for batadv_recv_unicast_packet() 837 * decoding a later received coded packet batadv_recv_unicast_packet() 847 /* packet for me */ batadv_recv_unicast_packet() 878 * @skb: unicast tvlv packet to process 879 * @recv_if: pointer to interface this packet was received on 882 * Returns NET_RX_SUCCESS if the packet has been consumed or NET_RX_DROP 902 /* packet needs to be linearized to access the tvlv content */ batadv_recv_unicast_tvlv() 933 * the assembled packet will exceed our MTU; 2) Buffer fragment, if we till 969 /* Deliver merged packet to the appropriate handler, if it was batadv_recv_frag_packet() 997 /* drop packet if it has not necessary minimum size */ batadv_recv_bcast_packet() 1003 /* packet with broadcast indication but unicast recipient */ batadv_recv_bcast_packet() 1007 /* packet with broadcast sender address */ batadv_recv_bcast_packet() 1032 /* check whether the packet is a duplicate */ batadv_recv_bcast_packet() 1039 /* check whether the packet is old and the host just restarted. */ batadv_recv_bcast_packet() 1058 /* rebroadcast packet */ batadv_recv_bcast_packet()
|
H A D | bat_iv_ogm.c | 31 * @BATADV_NO_DUP: the packet is a duplicate 379 /* when do we schedule a ogm packet to be sent */ batadv_iv_ogm_fwd_send_time() 398 /* is there another aggregated packet here? */ batadv_iv_ogm_aggr_packet() 435 * ordinary base packet batadv_iv_ogm_send_to_if() 476 /* send a batman ogm packet */ batadv_iv_ogm_emit() 484 pr_err("Error - can't forward packet: incoming iface not specified\n"); batadv_iv_ogm_emit() 514 * existing forward packet 515 * @new_bat_ogm_packet: OGM packet to be aggregated 518 * @send_time: timestamp (jiffies) when the packet is to be sent 519 * @directlink: true if this is a direct link packet 520 * @if_incoming: interface where the packet was received 522 * @forw_packet: the forwarded packet which should be checked 545 /* we can aggregate the current packet to this aggregated packet batadv_iv_ogm_can_aggregate() 549 * - the resulting packet wont be bigger than batadv_iv_ogm_can_aggregate() 558 * -> aggregate packet if the current packet is batadv_iv_ogm_can_aggregate() 559 * a "global" packet as well as the base batadv_iv_ogm_can_aggregate() 560 * packet batadv_iv_ogm_can_aggregate() 566 /* packet is not leaving on the same interface. */ batadv_iv_ogm_can_aggregate() 586 /* if the incoming packet is sent via this one batadv_iv_ogm_can_aggregate() 612 * batadv_iv_ogm_aggregate_new - create a new aggregated packet and add this 613 * packet to it. 616 * @send_time: timestamp (jiffies) when the packet is to be sent 618 * @if_incoming: interface where the packet was received 640 /* own packet should always be scheduled */ batadv_iv_ogm_aggregate_new() 644 "batman packet queue full\n"); batadv_iv_ogm_aggregate_new() 685 /* save packet direct link flag status */ batadv_iv_ogm_aggregate_new() 689 /* add new packet to packet list */ batadv_iv_ogm_aggregate_new() 694 /* start timer for this packet */ batadv_iv_ogm_aggregate_new() 708 /* aggregate a new packet into the existing ogm packet */ batadv_iv_ogm_aggregate() 721 /* save packet direct link flag status */ batadv_iv_ogm_aggregate() 733 * @if_incoming: interface where the packet was received 736 * @send_time: timestamp (jiffies) when the packet is to be sent 745 /* _aggr -> pointer to the packet we want to aggregate with batadv_iv_ogm_queue_add() 758 /* find position for the packet in the forward queue */ batadv_iv_ogm_queue_add() 777 * suitable aggregation packet found batadv_iv_ogm_queue_add() 783 /* if we could not aggregate this packet with one of the others batadv_iv_ogm_queue_add() 818 /* Mark the forwarded packet when it is not coming from our batadv_iv_ogm_forward() 819 * best next hop. We still need to forward the packet for our batadv_iv_ogm_forward() 820 * neighbor link quality detection to work in case the packet batadv_iv_ogm_forward() 840 "Forwarding packet: tq: %i, ttl: %i\n", batadv_iv_ogm_forward() 959 * @orig_node: the orig node who originally emitted the ogm packet 962 * @batadv_ogm_packet: the ogm packet 963 * @if_incoming: interface where the packet was received 965 * @dup_status: the duplicate status of this ogm packet. 988 "update_originator(): Searching and updating originator entry of received packet\n"); batadv_iv_ogm_orig_update() 1118 * batadv_iv_ogm_calc_tq - calculate tq for current received ogm packet 1119 * @orig_node: the orig node who originally emitted the ogm packet 1120 * @orig_neigh_node: the orig node struct of the neighbor who sent the packet 1121 * @batadv_ogm_packet: the ogm packet 1122 * @if_incoming: interface where the packet was received 1177 /* find packet count of corresponding one hop neighbor */ batadv_iv_ogm_calc_tq() 1262 * batadv_iv_ogm_update_seqnos - process a batman packet for all interfaces, 1264 * @ethhdr: ethernet header of the packet 1265 * @batadv_ogm_packet: OGM packet to be considered 1266 * @if_incoming: interface on which the OGM packet was received 1305 /* signalize caller that the packet is to be dropped. */ batadv_iv_ogm_update_seqnos() 1369 * @if_incoming: the interface where this packet was received 1370 * @if_outgoing: the interface for which the packet should be considered 1411 "Drop packet: packet within seqno protection time (sender: %pM)\n", batadv_iv_ogm_process_per_outif() 1418 "Drop packet: originator packet with tq equal 0\n"); batadv_iv_ogm_process_per_outif() 1440 "Drop packet: ignoring all rebroadcast packets that may make me loop (sender: %pM)\n", batadv_iv_ogm_process_per_outif() 1467 /* drop packet if sender is not a direct neighbor and if we batadv_iv_ogm_process_per_outif() 1472 "Drop packet: OGM via unknown neighbor!\n"); batadv_iv_ogm_process_per_outif() 1511 "Drop packet: OGM from secondary interface and wrong outgoing interface\n"); batadv_iv_ogm_process_per_outif() 1521 "Forwarding packet: rebroadcast neighbor packet with direct link flag\n"); batadv_iv_ogm_process_per_outif() 1528 "Drop packet: not received via bidirectional link\n"); batadv_iv_ogm_process_per_outif() 1534 "Drop packet: duplicate packet received\n"); batadv_iv_ogm_process_per_outif() 1539 "Forwarding packet: rebroadcast originator packet\n"); batadv_iv_ogm_process_per_outif() 1564 * @if_incoming: the interface where this packet was receved 1583 /* Silently drop when the batman packet is actually not a batadv_iv_ogm_process() 1584 * correct packet. batadv_iv_ogm_process() 1586 * This might happen if a packet is padded (e.g. Ethernet has a batadv_iv_ogm_process() 1591 * batadv_ogm_packet to detect whether the packet is the last batadv_iv_ogm_process() 1592 * packet in an aggregation. Here we expect that the padding batadv_iv_ogm_process() 1607 "Received BATMAN packet via NB: %pM, IF: %s [%pM] (from OG: %pM, via prev OG: %pM, seqno %u, tq %d, TTL %d, V %d, IDF %d)\n", batadv_iv_ogm_process() 1638 "Drop packet: received my own broadcast (sender: %pM)\n", batadv_iv_ogm_process() 1657 * save packet seqno for bidirectional check batadv_iv_ogm_process() 1677 "Drop packet: originator packet from myself (via neighbor)\n"); batadv_iv_ogm_process() 1684 "Drop packet: ignoring all rebroadcast echos (sender: %pM)\n", batadv_iv_ogm_process() 1691 "Drop packet: ignoring all packets not forwarded from the best next hop (sender: %pM)\n", batadv_iv_ogm_process() 1732 /* did we receive a B.A.T.M.A.N. IV OGM packet on an interface batadv_iv_ogm_receive() 1963 /* batman originator packet */ batadv_iv_init()
|
H A D | distributed-arp-table.c | 147 * batadv_arp_hw_src - extract the hw_src field from an ARP packet 148 * @skb: ARP packet 149 * @hdr_size: size of the possible header before the ARP packet 151 * Returns the value of the hw_src field in the ARP packet. 164 * batadv_arp_ip_src - extract the ip_src field from an ARP packet 165 * @skb: ARP packet 166 * @hdr_size: size of the possible header before the ARP packet 168 * Returns the value of the ip_src field in the ARP packet. 176 * batadv_arp_hw_dst - extract the hw_dst field from an ARP packet 177 * @skb: ARP packet 178 * @hdr_size: size of the possible header before the ARP packet 180 * Returns the value of the hw_dst field in the ARP packet. 188 * batadv_arp_ip_dst - extract the ip_dst field from an ARP packet 189 * @skb: ARP packet 190 * @hdr_size: size of the possible header before the ARP packet 192 * Returns the value of the ip_dst field in the ARP packet. 321 * batadv_dbg_arp - print a debug message containing all the ARP packet details 323 * @skb: ARP packet 325 * @hdr_size: size of the possible header before the ARP packet 354 "* encapsulated within a UNICAST packet\n"); batadv_dbg_arp() 358 "* encapsulated within a UNICAST_4ADDR packet (src: %pM)\n", batadv_dbg_arp() 383 "* encapsulated within a BCAST packet (src: %pM)\n", batadv_dbg_arp() 388 "* encapsulated within an unknown packet type (0x%x)\n", batadv_dbg_arp() 565 * @packet_subtype: unicast4addr packet subtype to use 567 * This function copies the skb with pskb_copy() and is sent as unicast packet 570 * Returns true if the packet is sent to at least one candidate, false 611 /* count the sent packet */ batadv_dat_send_data() 623 /* packet sent to a candidate: return true */ batadv_dat_send_data() 795 * batadv_arp_get_type - parse an ARP packet and gets the type 797 * @skb: packet to analyse 798 * @hdr_size: size of the possible header before the ARP packet in the skb 800 * Returns the ARP type if the skb contains a valid ARP packet, 0 otherwise. 827 /* check whether the ARP packet carries a valid IP information */ batadv_arp_get_type() 870 * @skb: the buffer containing the packet to extract the VID from 871 * @hdr_size: the size of the batman-adv header encapsulating the packet 873 * If the packet embedded in the skb is vlan tagged this function returns the 883 * If the header contained in the packet is a VLAN one (which is longer) batadv_dat_get_vid() 897 * @skb: packet to check 940 * duplicate packet. batadv_dat_snoop_outgoing_arp_request() 944 * a packet coming from the wrong port. batadv_dat_snoop_outgoing_arp_request() 986 * @skb: packet to check 1042 * format based on the incoming request packet type. The assumption is batadv_dat_snoop_incoming_arp_request() 1043 * that a node not using the 4addr packet format doesn't support it. batadv_dat_snoop_incoming_arp_request() 1067 * @skb: packet to check 1109 * @skb: packet to check 1145 * packet to the interface batadv_dat_snoop_incoming_arp_reply() 1151 /* if ret == false -> packet has to be delivered to the interface */ batadv_dat_snoop_incoming_arp_reply() 1159 * @forw_packet: the broadcast packet 1161 * Returns true if the node can drop the packet, false otherwise. 1176 /* If this packet is an ARP_REQUEST and the node already has the batadv_dat_drop_broadcast_packet() 1177 * information that it is going to ask, then the packet can be dropped batadv_dat_drop_broadcast_packet()
|
H A D | network-coding.c | 43 /* Register our packet type */ batadv_nc_init() 211 * batadv_nc_packet_free - frees nc packet 212 * @nc_packet: the nc packet to free 532 * batadv_nc_send_packet - send non-coded packet and free nc_packet struct 533 * @nc_packet: the nc packet to send 547 * @nc_path: the nc path the packet belongs to 548 * @nc_packet: the nc packet to be checked 551 * timeout. If so, the packet is no longer kept and the entry deleted from the 571 /* purge nc packet */ batadv_nc_sniffed_purge() 582 * batadv_nc_fwd_flush - Checks the timestamp of the given nc packet. 584 * @nc_path: the nc path the packet belongs to 585 * @nc_packet: the nc packet to be checked 587 * Checks whether the given nc packet has hit its forward timeout. If so, the 588 * packet is no longer delayed, immediately sent and the entry deleted from the 607 /* Send packet */ batadv_nc_fwd_flush() 618 * batadv_nc_process_nc_paths - traverse given nc packet pool and free timed out 622 * @process_fn: Function called to process given nc packet. Should return true 623 * to encourage this function to proceed with the next packet. 708 * @ogm_packet: incoming ogm packet also used for the checks 746 * @orig_node: orig node originating the ogm packet 747 * @orig_neigh_node: neighboring orig node from which we received the ogm packet 788 * @orig_node: orig node originating the ogm packet 789 * @orig_neigh_node: neighboring orig node from which we received the ogm packet 853 * @orig_node: orig node originating the ogm packet 854 * @orig_neigh_node: neighboring orig node from which we received the ogm packet 856 * @ogm_packet: incoming ogm packet 974 /* randomize the estimated packet loss (max TQ - estimated TQ) */ batadv_nc_random_weight_tq() 977 /* normalize the randomized packet loss */ batadv_nc_random_weight_tq() 999 * batadv_nc_code_packets - code a received unicast_packet with an nc packet 1004 * @nc_packet: structure containing the packet to the skb can be coded with 1005 * @neigh_node: next hop to forward packet to 1100 /* coding_len is used when decoding the packet shorter packet */ batadv_nc_code_packets() 1115 /* Info about first unicast packet */ batadv_nc_code_packets() 1121 /* Info about second unicast packet */ batadv_nc_code_packets() 1176 /* Send the coded packet and return true */ batadv_nc_code_packets() 1197 * Whenever we network code a packet we have to check whether we received it in 1199 * some neighbors may also have received (overheard) the packet in the network 1201 * neighboring nodes was able to decode the packet, therefore we can only 1202 * re-code the packet if the source of the previous encoded packet is involved. 1203 * Since the source encoded the packet we can be certain it has all necessary 1206 * Returns true if coding of a decoded packet is allowed. 1218 * out_nc_node to retrieve a buffered packet that can be used for coding. 1293 * Returns an nc packet if a suitable coding packet was found, NULL otherwise. 1348 /* Set the mac header as if we actually sent the packet uncoded */ batadv_nc_skb_store_before_coding() 1356 /* Add the packet to the decoding packet pool */ batadv_nc_skb_store_before_coding() 1368 * @neigh_node: next hop to forward packet to 1373 * next hop that potentially sent a packet which our next hop also received 1376 * Returns true if the skb was consumed (encoded packet sent) or false otherwise 1415 /* out of mem ? Coding failed - we have to free the buffered packet batadv_nc_skb_dst_search() 1427 * @neigh_node: next hop to forward packet to 1428 * @packet_id: checksum to identify packet 1430 * Returns true if the packet was buffered or false in case of an error. 1450 /* Add coding packet to list */ batadv_nc_skb_add_to_path() 1459 * batadv_nc_skb_forward - try to code a packet or add it to the coding packet 1462 * @neigh_node: next hop to forward packet to 1464 * Returns true if the skb was consumed (encoded packet sent) or false otherwise 1471 struct batadv_unicast_packet *packet; batadv_nc_skb_forward() local 1483 packet = (struct batadv_unicast_packet *)payload; batadv_nc_skb_forward() 1484 if (packet->packet_type != BATADV_UNICAST) batadv_nc_skb_forward() 1501 packet_id = batadv_skb_crc32(skb, payload + sizeof(*packet)); batadv_nc_skb_forward() 1524 struct batadv_unicast_packet *packet; batadv_nc_skb_store_for_decoding() local 1534 /* Check for supported packet type */ batadv_nc_skb_store_for_decoding() 1536 packet = (struct batadv_unicast_packet *)payload; batadv_nc_skb_store_for_decoding() 1537 if (packet->packet_type != BATADV_UNICAST) batadv_nc_skb_store_for_decoding() 1561 packet_id = batadv_skb_crc32(skb, payload + sizeof(*packet)); batadv_nc_skb_store_for_decoding() 1577 * batadv_nc_skb_store_sniffed_unicast - check if a received unicast packet 1603 * Returns pointer to decoded unicast packet if the packet was decoded or NULL 1643 /* If we are the second destination the packet was overheard, batadv_nc_skb_decode_packet() 1665 * extract the missing packet from the received coded packet batadv_nc_skb_decode_packet() 1671 /* Resize decoded skb if decoded with larger packet */ batadv_nc_skb_decode_packet() 1678 /* Create decoded unicast packet */ batadv_nc_skb_decode_packet() 1692 * find the data needed to decode the coded packet 1694 * @ethhdr: pointer to the ethernet header inside the coded packet 1695 * @coded: coded packet we try to find decode data for 1697 * Returns pointer to nc packet if the needed data was found or NULL otherwise. 1714 /* Select the correct packet id based on the location of our mac-addr */ batadv_nc_find_decoding_packet() 1750 "No decoding packet found for %u\n", packet_id); batadv_nc_find_decoding_packet() 1756 * batadv_nc_recv_coded_packet - try to decode coded packet and enqueue the 1757 * resulting unicast packet 1758 * @skb: incoming coded packet 1759 * @recv_if: pointer to interface this packet was received on 1805 /* Decode the packet */ batadv_nc_recv_coded_packet() 1812 /* Mark packet as decoded to do correct recoding when forwarding */ batadv_nc_recv_coded_packet()
|
H A D | multicast.h | 22 * batadv_forw_mode - the way a packet should be forwarded as 23 * @BATADV_FORW_ALL: forward the packet to all nodes (currently via classic 25 * @BATADV_FORW_SINGLE: forward the packet to a single node (currently via the
|
H A D | send.c | 34 /* send out an already prepared packet to the given address via the 51 pr_warn("Interface %s is not up - can't send packet via that interface!\n", batadv_send_skb_packet() 88 * @orig_node: Final destination of the packet. 89 * @recv_if: Interface used when receiving the packet (can be NULL). 92 * skb on for preparation of MAC header. If the packet originated from this 117 /* Fragment and send packet. */ batadv_send_skb_to_orig() 124 /* try to network code the packet, if it is received on an interface batadv_send_skb_to_orig() 125 * (i.e. being forwarded). If the packet originates from this node or if batadv_send_skb_to_orig() 126 * network coding fails, then send the packet as usual. batadv_send_skb_to_orig() 164 /* batman packet type: unicast */ batadv_send_skb_push_fill_unicast() 197 * @packet_subtype: the unicast 4addr packet subtype to use 239 * @packet_type: the batman unicast packet type to use 240 * @packet_subtype: the unicast 4addr packet subtype (only relevant for unicast 242 * @orig_node: the originator to send the packet to 278 * should never be invoked with any other packet type batadv_send_skb_unicast() 290 * for this client. The destination will receive this packet and will batadv_send_skb_unicast() 312 * @packet_type: the batman unicast packet type to use 313 * @packet_subtype: the unicast 4addr packet subtype (only relevant for unicast 338 /* if we got an hint! let's send the packet to this client (if any) */ batadv_send_skb_via_tt_generic() 382 * packet queue batadv_schedule_bat_ogm() 406 /* add new packet to packet list */ _batadv_add_bcast_packet_to_list() 411 /* start timer for this packet */ _batadv_add_bcast_packet_to_list() 416 /* add a broadcast packet to the queue and setup timers. broadcast packets 436 "bcast packet queue full\n"); batadv_add_bcast_packet_to_list() 463 /* how often did we send the bcast packet ? */ batadv_add_bcast_packet_to_list() 507 /* rebroadcast packet */ batadv_send_outstanding_bcast_packet() 557 /* we have to have at least one packet in the queue to determine the batadv_send_outstanding_bat_ogm_packet() 570 /* don't count own packet */ batadv_send_outstanding_bat_ogm_packet() 619 /* free batman packet list */ batadv_purge_outstanding_packets()
|
H A D | types.h | 21 #include "packet.h" 39 * @BATADV_DHCP_NO: packet is not a dhcp message 63 * @ogm_buff: buffer holding the OGM packet 64 * @ogm_buff_len: length of the OGM packet buffer 82 * @batman_adv_ptype: packet type describing packets that should be processed by 112 * @last_ttl: ttl of last received packet 205 * @last_seen: time when last packet from this node was received 336 * @last_seen: when last packet via this neighbor was received 393 * @entrytime: time when the broadcast packet was received 405 * @BATADV_CNT_TX: transmitted payload traffic packet counter 407 * @BATADV_CNT_TX_DROPPED: dropped transmission payload traffic packet counter 408 * @BATADV_CNT_RX: received payload traffic packet counter 410 * @BATADV_CNT_FORWARD: forwarded payload traffic packet counter 412 * @BATADV_CNT_MGMT_TX: transmitted routing protocol traffic packet counter 414 * @BATADV_CNT_MGMT_RX: received routing protocol traffic packet counter 416 * @BATADV_CNT_FRAG_TX: transmitted fragment traffic packet counter 418 * @BATADV_CNT_FRAG_RX: received fragment traffic packet counter 420 * @BATADV_CNT_FRAG_FWD: forwarded fragment traffic packet counter 422 * @BATADV_CNT_TT_REQUEST_TX: transmitted tt req traffic packet counter 423 * @BATADV_CNT_TT_REQUEST_RX: received tt req traffic packet counter 424 * @BATADV_CNT_TT_RESPONSE_TX: transmitted tt resp traffic packet counter 425 * @BATADV_CNT_TT_RESPONSE_RX: received tt resp traffic packet counter 426 * @BATADV_CNT_TT_ROAM_ADV_TX: transmitted tt roam traffic packet counter 427 * @BATADV_CNT_TT_ROAM_ADV_RX: received tt roam traffic packet counter 428 * @BATADV_CNT_DAT_GET_TX: transmitted dht GET traffic packet counter 429 * @BATADV_CNT_DAT_GET_RX: received dht GET traffic packet counter 430 * @BATADV_CNT_DAT_PUT_TX: transmitted dht PUT traffic packet counter 431 * @BATADV_CNT_DAT_PUT_RX: received dht PUT traffic packet counter 432 * @BATADV_CNT_DAT_CACHED_REPLY_TX: transmitted dat cache reply traffic packet 434 * @BATADV_CNT_NC_CODE: transmitted nc-combined traffic packet counter 436 * @BATADV_CNT_NC_RECODE: transmitted nc-recombined traffic packet counter 439 * @BATADV_CNT_NC_DECODE: received and nc-decoded traffic packet counter 441 * @BATADV_CNT_NC_DECODE_FAILED: received and decode-failed traffic packet 544 * @bcast_duplist_curr: index of last broadcast packet added to bcast_duplist 665 * @max_fwd_delay: maximum packet forward delay to allow coding of packets 667 * @timestamp_fwd_flush: timestamp of last forward packet queue flush 668 * @timestamp_sniffed_purge: timestamp of last sniffed packet queue purge 720 * @packet_size_max: max packet size that can be transmitted via 734 * @bcast_seqno: last sent broadcast packet sequence number 735 * @bcast_queue_left: number of remaining buffered broadcast packet slots 736 * @batman_queue_left: number of remaining OGM packet slots 831 * @queue_list: packet queue for packets destined for this socket client 832 * @queue_len: number of packets in the packet queue (queue_list) 848 * struct batadv_socket_packet - layer2 icmp packet for socket client 850 * @icmp_len: size of the layer2 icmp packet 851 * @icmp_packet: layer2 icmp packet 1034 * @packet_list_lock: access lock for packet list 1051 * struct batadv_nc_packet - network coding packet used when coding and 1055 * @timestamp: field containing the info when the packet was added to path 1058 * @nc_path: pointer to path this nc packet is attached to 1082 * @send_time: execution time for delayed_work (packet sending) 1085 * @skb: bcast packet's skb buffer 1086 * @packet_len: size of aggregated OGM packet inside the skb buffer 1088 * @num_packets: counter for bcast packet retransmission 1089 * @delayed_work: work queue callback item for packet sending 1091 * locally generated packet 1092 * @if_outgoing: packet where the packet should be sent to, or NULL if
|
H A D | fragmentation.c | 69 * batadv_frag_size_limit - maximum possible size of packet to be fragmented 121 * fragments needed to merge the packet, the chain is moved to the passed head 136 /* Linearize packet to avoid linearizing 16 packets in a row when doing batadv_frag_insert_packet() 170 /* Drop packet if fragment already exists. */ batadv_frag_insert_packet() 199 /* Clear chain if total size of either the list or the packet batadv_frag_insert_packet() 200 * exceeds the maximum size of one merged packet. batadv_frag_insert_packet() 223 * @skb: packet with total size of skb after merging 233 struct batadv_frag_packet *packet; batadv_frag_merge_packets() local 239 packet = (struct batadv_frag_packet *)skb->data; batadv_frag_merge_packets() 240 size = ntohs(packet->total_size); batadv_frag_merge_packets() 289 * set *skb to merged packet; 2) Packet is buffered: Return true and set *skb 299 /* Add packet to buffer and table entry if merge is possible. */ batadv_frag_skb_buffer() 324 * Look up the next-hop of the fragments payload and check if the merged packet 337 struct batadv_frag_packet *packet; batadv_frag_skb_fwd() local 341 packet = (struct batadv_frag_packet *)skb->data; batadv_frag_skb_fwd() 342 orig_node_dst = batadv_orig_hash_find(bat_priv, packet->dest); batadv_frag_skb_fwd() 350 /* Forward the fragment, if the merged packet would be too big to batadv_frag_skb_fwd() 353 total_size = ntohs(packet->total_size); batadv_frag_skb_fwd() 359 packet->ttl--; batadv_frag_skb_fwd()
|
H A D | main.c | 272 * payload packet 296 * batadv_skb_set_priority - sets skb priority according to packet content 297 * @skb: the packet to be sent 298 * @offset: offset to the packet content 376 /* packet should hold at least type and version */ batadv_batman_skb_recv() 400 "Drop packet: incompatible batman version (%i)\n", batadv_batman_skb_recv() 418 * most probably dropped the packet for batadv_batman_skb_recv() 457 /* broadcast packet */ batadv_recv_handler_init() 461 /* unicast with 4 addresses packet */ batadv_recv_handler_init() 463 /* unicast packet */ batadv_recv_handler_init() 465 /* unicast tvlv packet */ batadv_recv_handler_init() 467 /* batman icmp packet */ batadv_recv_handler_init() 576 * batadv_skb_crc32 - calculate CRC32 of the whole packet and skip bytes in 801 * batadv_tvlv_realloc_packet_buff - reallocate packet buffer to accommodate 802 * requested packet size 803 * @packet_buff: packet buffer 804 * @packet_buff_len: packet buffer size 805 * @min_packet_len: requested packet minimum size 806 * @additional_packet_len: requested additional packet size on top of minimum 809 * Returns true of the packet buffer could be changed to the requested size, 835 * OGM packet buffer 837 * @packet_buff: ogm packet buffer 838 * @packet_buff_len: ogm packet buffer size including ogm header and tvlv 842 * The ogm packet might be enlarged or shrunk depending on the current size 892 * @ogm_source: flag indicating wether the tvlv is an ogm or a unicast packet 893 * @orig_node: orig node emitting the ogm packet 894 * @src: source mac address of the unicast packet 895 * @dst: destination mac address of the unicast packet 945 * @ogm_source: flag indicating wether the tvlv is an ogm or a unicast packet 946 * @orig_node: orig node emitting the ogm packet 947 * @src: source mac address of the unicast packet 948 * @dst: destination mac address of the unicast packet 1012 * @batadv_ogm_packet: ogm packet containing the tvlv containers 1013 * @orig_node: orig node emitting the ogm packet 1043 * source & destination of the unicast packet as well as the tvlv content 1110 * batadv_tvlv_unicast_send - send a unicast packet with tvlv payload to the 1113 * @src: source mac address of the unicast packet 1114 * @dst: destination mac address of the unicast packet 1176 * @skb: the buffer containing the packet 1179 * If the packet embedded in the skb is vlan tagged this function returns the
|
H A D | bitarray.h | 35 /* turn corresponding bit on, so we can remember that we got the packet */ batadv_set_bit() 45 /* receive and process one packet, returns 1 if received seq_num is considered
|
/linux-4.1.27/drivers/net/hyperv/ |
H A D | netvsc_drv.c | 237 struct hv_netvsc_packet *packet = (struct hv_netvsc_packet *)context; netvsc_xmit_completion() local 239 (unsigned long)packet->send_completion_tid; netvsc_xmit_completion() 280 struct hv_netvsc_packet *packet) init_page_array() 282 struct hv_page_buffer *pb = packet->page_buf; init_page_array() 288 /* The packet is laid out thus: init_page_array() 298 packet->rmsg_size = len; init_page_array() 299 packet->rmsg_pgcnt = slots_used; init_page_array() 377 struct hv_netvsc_packet *packet = NULL; netvsc_start_xmit() local 398 * of pages in a single packet. If skb is scattered around netvsc_start_xmit() 406 net_alert_ratelimited("packet too big: %u pages (%u bytes)\n", netvsc_start_xmit() 428 /* Use the headroom for building up the packet */ netvsc_start_xmit() 429 packet = (struct hv_netvsc_packet *)skb->head; netvsc_start_xmit() 431 packet->status = 0; netvsc_start_xmit() 432 packet->xmit_more = skb->xmit_more; netvsc_start_xmit() 434 packet->vlan_tci = skb->vlan_tci; netvsc_start_xmit() 435 packet->page_buf = page_buf; netvsc_start_xmit() 437 packet->q_idx = skb_get_queue_mapping(skb); netvsc_start_xmit() 439 packet->is_data_pkt = true; netvsc_start_xmit() 440 packet->total_data_buflen = skb->len; netvsc_start_xmit() 442 packet->rndis_msg = (struct rndis_message *)((unsigned long)packet + netvsc_start_xmit() 445 memset(packet->rndis_msg, 0, RNDIS_AND_PPI_SIZE); netvsc_start_xmit() 448 packet->send_completion = netvsc_xmit_completion; netvsc_start_xmit() 449 packet->send_completion_ctx = packet; netvsc_start_xmit() 450 packet->send_completion_tid = (unsigned long)skb; netvsc_start_xmit() 452 isvlan = packet->vlan_tci & VLAN_TAG_PRESENT; netvsc_start_xmit() 455 rndis_msg = packet->rndis_msg; netvsc_start_xmit() 457 rndis_msg->msg_len = packet->total_data_buflen; netvsc_start_xmit() 460 rndis_pkt->data_len = packet->total_data_buflen; netvsc_start_xmit() 481 vlan->vlanid = packet->vlan_tci & VLAN_VID_MASK; netvsc_start_xmit() 482 vlan->pri = (packet->vlan_tci & VLAN_PRIO_MASK) >> netvsc_start_xmit() 492 * GSO packet. netvsc_start_xmit() 575 packet->total_data_buflen = rndis_msg->msg_len; netvsc_start_xmit() 576 packet->page_buf_cnt = init_page_array(rndis_msg, rndis_msg_size, netvsc_start_xmit() 577 skb, packet); netvsc_start_xmit() 579 ret = netvsc_send(net_device_ctx->device_ctx, packet); netvsc_start_xmit() 639 * netvsc_recv_callback - Callback when we receive a packet from the 643 struct hv_netvsc_packet *packet, netvsc_recv_callback() 651 packet->status = NVSP_STAT_FAIL; netvsc_recv_callback() 656 skb = netdev_alloc_skb_ip_align(net, packet->total_data_buflen); netvsc_recv_callback() 659 packet->status = NVSP_STAT_FAIL; netvsc_recv_callback() 667 memcpy(skb_put(skb, packet->total_data_buflen), packet->data, netvsc_recv_callback() 668 packet->total_data_buflen); netvsc_recv_callback() 673 * Should we be dropping the packet if checksum netvsc_recv_callback() 682 if (packet->vlan_tci & VLAN_TAG_PRESENT) netvsc_recv_callback() 684 packet->vlan_tci); netvsc_recv_callback() 686 skb_record_rx_queue(skb, packet->channel-> netvsc_recv_callback() 690 net->stats.rx_bytes += packet->total_data_buflen; netvsc_recv_callback() 813 * Send GARP packet to network peers after migrations. 816 * another netif_notify_peers() into a delayed work, otherwise GARP packet 279 init_page_array(void *hdr, u32 len, struct sk_buff *skb, struct hv_netvsc_packet *packet) init_page_array() argument 642 netvsc_recv_callback(struct hv_device *device_obj, struct hv_netvsc_packet *packet, struct ndis_tcp_ip_checksum_info *csum_info) netvsc_recv_callback() argument
|
H A D | netvsc.c | 603 struct vmpacket_descriptor *packet) netvsc_send_completion() 612 nvsp_packet = (struct nvsp_message *)((unsigned long)packet + netvsc_send_completion() 613 (packet->offset8 << 3)); netvsc_send_completion() 635 packet->trans_id; netvsc_send_completion() 663 netdev_err(ndev, "Unknown send completion packet type- " netvsc_send_completion() 697 struct hv_netvsc_packet *packet) netvsc_copy_to_send_buf() 705 u32 remain = packet->total_data_buflen % net_device->pkt_align; netvsc_copy_to_send_buf() 706 u32 page_count = packet->cp_partial ? packet->rmsg_pgcnt : netvsc_copy_to_send_buf() 707 packet->page_buf_cnt; netvsc_copy_to_send_buf() 710 if (packet->is_data_pkt && packet->xmit_more && remain && netvsc_copy_to_send_buf() 711 !packet->cp_partial) { netvsc_copy_to_send_buf() 713 packet->rndis_msg->msg_len += padding; netvsc_copy_to_send_buf() 714 packet->total_data_buflen += padding; netvsc_copy_to_send_buf() 718 char *src = phys_to_virt(packet->page_buf[i].pfn << PAGE_SHIFT); netvsc_copy_to_send_buf() 719 u32 offset = packet->page_buf[i].offset; netvsc_copy_to_send_buf() 720 u32 len = packet->page_buf[i].len; netvsc_copy_to_send_buf() 736 struct hv_netvsc_packet *packet, netvsc_send_pkt() 740 struct vmbus_channel *out_channel = packet->channel; netvsc_send_pkt() 741 u16 q_idx = packet->q_idx; netvsc_send_pkt() 748 if (packet->is_data_pkt) { netvsc_send_pkt() 757 packet->send_buf_index; netvsc_send_pkt() 758 if (packet->send_buf_index == NETVSC_INVALID_INDEX) netvsc_send_pkt() 762 packet->total_data_buflen; netvsc_send_pkt() 764 if (packet->send_completion) netvsc_send_pkt() 765 req_id = (ulong)packet; netvsc_send_pkt() 772 if (packet->page_buf_cnt) { netvsc_send_pkt() 773 pgbuf = packet->cp_partial ? packet->page_buf + netvsc_send_pkt() 774 packet->rmsg_pgcnt : packet->page_buf; netvsc_send_pkt() 777 packet->page_buf_cnt, netvsc_send_pkt() 813 netdev_err(ndev, "Unable to send packet %p ret %d\n", netvsc_send_pkt() 814 packet, ret); netvsc_send_pkt() 821 struct hv_netvsc_packet *packet) netvsc_send() 826 u16 q_idx = packet->q_idx; netvsc_send() 827 u32 pktlen = packet->total_data_buflen, msd_len = 0; netvsc_send() 842 packet->q_idx = 0; netvsc_send() 844 packet->channel = out_channel; netvsc_send() 845 packet->send_buf_index = NETVSC_INVALID_INDEX; netvsc_send() 846 packet->cp_partial = false; netvsc_send() 855 try_batch = packet->is_data_pkt && msd_len > 0 && msdp->count < netvsc_send() 862 } else if (try_batch && msd_len + packet->rmsg_size < netvsc_send() 865 packet->cp_partial = true; netvsc_send() 867 } else if (packet->is_data_pkt && pktlen + net_device->pkt_align < netvsc_send() 881 packet); netvsc_send() 883 packet->send_buf_index = section_index; netvsc_send() 885 if (packet->cp_partial) { netvsc_send() 886 packet->page_buf_cnt -= packet->rmsg_pgcnt; netvsc_send() 887 packet->total_data_buflen = msd_len + packet->rmsg_size; netvsc_send() 889 packet->page_buf_cnt = 0; netvsc_send() 890 packet->total_data_buflen += msd_len; netvsc_send() 896 if (packet->xmit_more && !packet->cp_partial) { netvsc_send() 897 msdp->pkt = packet; netvsc_send() 900 cur_send = packet; netvsc_send() 908 cur_send = packet; netvsc_send() 980 struct vmpacket_descriptor *packet) netvsc_receive() 995 * packet netvsc_receive() 997 if (packet->type != VM_PKT_DATA_USING_XFER_PAGES) { netvsc_receive() 998 netdev_err(ndev, "Unknown packet type received - %d\n", netvsc_receive() 999 packet->type); netvsc_receive() 1003 nvsp_packet = (struct nvsp_message *)((unsigned long)packet + netvsc_receive() 1004 (packet->offset8 << 3)); netvsc_receive() 1006 /* Make sure this is a valid nvsp packet */ netvsc_receive() 1009 netdev_err(ndev, "Unknown nvsp packet type received-" netvsc_receive() 1014 vmxferpage_packet = (struct vmtransfer_page_packet_header *)packet; netvsc_receive() 1028 /* Initialize the netvsc packet */ netvsc_receive() 1127 "unhandled packet type %d, " netvsc_channel_cb() 1144 /* Handle large packet */ netvsc_channel_cb() 601 netvsc_send_completion(struct netvsc_device *net_device, struct hv_device *device, struct vmpacket_descriptor *packet) netvsc_send_completion() argument 694 netvsc_copy_to_send_buf(struct netvsc_device *net_device, unsigned int section_index, u32 pend_size, struct hv_netvsc_packet *packet) netvsc_copy_to_send_buf() argument 735 netvsc_send_pkt( struct hv_netvsc_packet *packet, struct netvsc_device *net_device) netvsc_send_pkt() argument 820 netvsc_send(struct hv_device *device, struct hv_netvsc_packet *packet) netvsc_send() argument 977 netvsc_receive(struct netvsc_device *net_device, struct vmbus_channel *channel, struct hv_device *device, struct vmpacket_descriptor *packet) netvsc_receive() argument
|
/linux-4.1.27/arch/um/drivers/ |
H A D | mconsole_user.c | 140 /* err can only be true on the first packet */ mconsole_reply_len() 182 struct mconsole_notify packet; mconsole_notify() local 202 packet.magic = MCONSOLE_MAGIC; mconsole_notify() 203 packet.version = MCONSOLE_VERSION; mconsole_notify() 204 packet.type = type; mconsole_notify() 205 len = (len > sizeof(packet.data)) ? sizeof(packet.data) : len; mconsole_notify() 206 packet.len = len; mconsole_notify() 207 memcpy(packet.data, data, len); mconsole_notify() 210 len = sizeof(packet) + packet.len - sizeof(packet.data); mconsole_notify() 211 n = sendto(notify_sock, &packet, len, 0, (struct sockaddr *) &target, mconsole_notify()
|
H A D | slip_common.h | 5 /* two bytes each for a (pathological) max packet of escaped chars + * 60 * For each byte in the packet, send the appropriate slip_esc()
|
/linux-4.1.27/drivers/media/rc/ |
H A D | iguanair.c | 55 struct send_packet *packet; member in struct:iguanair 80 struct packet { struct 87 struct packet header; 201 /* if we sent an nop packet, do not expect a response */ iguanair_irq_out() 202 if (urb->status == 0 && ir->packet->header.cmd == CMD_NOP) iguanair_irq_out() 228 * On cold boot, the iguanair initializes on the first packet iguanair_get_features() 229 * received but does not process that packet. Send an empty iguanair_get_features() 230 * packet. iguanair_get_features() 232 ir->packet->header.start = 0; iguanair_get_features() 233 ir->packet->header.direction = DIR_OUT; iguanair_get_features() 234 ir->packet->header.cmd = CMD_NOP; iguanair_get_features() 235 iguanair_send(ir, sizeof(ir->packet->header)); iguanair_get_features() 237 ir->packet->header.cmd = CMD_GET_VERSION; iguanair_get_features() 238 rc = iguanair_send(ir, sizeof(ir->packet->header)); iguanair_get_features() 253 ir->packet->header.cmd = CMD_GET_BUFSIZE; iguanair_get_features() 255 rc = iguanair_send(ir, sizeof(ir->packet->header)); iguanair_get_features() 267 ir->packet->header.cmd = CMD_GET_FEATURES; iguanair_get_features() 269 rc = iguanair_send(ir, sizeof(ir->packet->header)); iguanair_get_features() 278 ir->packet->header.start = 0; iguanair_receiver() 279 ir->packet->header.direction = DIR_OUT; iguanair_receiver() 280 ir->packet->header.cmd = enable ? CMD_RECEIVER_ON : CMD_RECEIVER_OFF; iguanair_receiver() 285 return iguanair_send(ir, sizeof(ir->packet->header)); iguanair_receiver() 327 ir->packet->busy7 = (4 - sevens) * 2; iguanair_set_tx_carrier() 328 ir->packet->busy4 = 110 - fours; iguanair_set_tx_carrier() 344 ir->packet->channels = mask << 4; iguanair_set_tx_mask() 369 ir->packet->payload[size++] = p | space; iguanair_tx() 375 ir->packet->header.start = 0; iguanair_tx() 376 ir->packet->header.direction = DIR_OUT; iguanair_tx() 377 ir->packet->header.cmd = CMD_SEND; iguanair_tx() 378 ir->packet->length = size; iguanair_tx() 382 rc = iguanair_send(ir, sizeof(*ir->packet) + size); iguanair_tx() 442 ir->packet = usb_alloc_coherent(udev, MAX_OUT_PACKET, GFP_KERNEL, iguanair_probe() 447 if (!ir->buf_in || !ir->packet || !ir->urb_in || !ir->urb_out) { iguanair_probe() 467 usb_fill_int_urb(ir->urb_out, udev, pipeout, ir->packet, MAX_OUT_PACKET, iguanair_probe() 530 usb_free_coherent(udev, MAX_OUT_PACKET, ir->packet, iguanair_probe() 549 usb_free_coherent(ir->udev, MAX_OUT_PACKET, ir->packet, ir->dma_out); iguanair_disconnect()
|
/linux-4.1.27/drivers/net/usb/ |
H A D | gl620a.c | 61 // max transmit packet number per transmit 63 // max packet length 82 struct gl_packet *packet; genelink_rx_fixup() local 93 // get the packet count of the received skb genelink_rx_fixup() 97 "genelink: invalid received packet count %u\n", genelink_rx_fixup() 102 // set the current packet pointer to the first packet genelink_rx_fixup() 103 packet = &header->packets; genelink_rx_fixup() 105 // decrement the length for the packet count size 4 bytes genelink_rx_fixup() 109 // get the packet length genelink_rx_fixup() 110 size = le32_to_cpu(packet->packet_length); genelink_rx_fixup() 112 // this may be a broken packet genelink_rx_fixup() 119 // allocate the skb for the individual packet genelink_rx_fixup() 123 // copy the packet data to the new skb genelink_rx_fixup() 125 packet->packet_data, size); genelink_rx_fixup() 129 // advance to the next packet genelink_rx_fixup() 130 packet = (struct gl_packet *)&packet->packet_data[size]; genelink_rx_fixup() 137 // skip the packet length field 4 bytes genelink_rx_fixup() 177 // attach the packet count to the header genelink_tx_fixup()
|
H A D | lg-vl600.c | 40 * replaces the standard ethernet header in a packet so only actual 90 * packet depend only on whether it is on the IN or OUT endpoint. */ vl600_bind() 113 struct vl600_pkt_hdr *packet; vl600_rx_fixup() local 124 /* Allow a packet (or multiple packets batched together) to be vl600_rx_fixup() 147 * otherwise we may run out of memory w/a bad packet */ vl600_rx_fixup() 162 "for packet assembly failed.\n", vl600_rx_fixup() 175 if (buf->len < sizeof(*packet)) { vl600_rx_fixup() 180 packet = (struct vl600_pkt_hdr *) buf->data; vl600_rx_fixup() 181 packet_len = sizeof(*packet) + le32_to_cpup(&packet->len); vl600_rx_fixup() 184 "Bad packet length stored in header\n"); vl600_rx_fixup() 189 * (sizeof(*packet) == sizeof(*ethhdr)), additionally vl600_rx_fixup() 196 /* Copy the addresses from packet contents */ vl600_rx_fixup() 217 /* Not the last packet in this batch */ vl600_rx_fixup() 253 struct vl600_pkt_hdr *packet; vl600_tx_fixup() local 293 /* Packet header is same size as ethernet packet header vl600_tx_fixup() 294 * (sizeof(*packet) == sizeof(struct ethhdr)), additionally the vl600_tx_fixup() 298 packet = (struct vl600_pkt_hdr *) skb->data; vl600_tx_fixup() 303 packet->h_proto = htons(ETH_P_IP); vl600_tx_fixup() 304 memset(&packet->dummy, 0, sizeof(packet->dummy)); vl600_tx_fixup() 305 packet->len = cpu_to_le32(orig_len); vl600_tx_fixup()
|
H A D | cx82310_eth.c | 71 /* create command packet */ cx82310_cmd() 76 /* send command packet */ cx82310_cmd() 130 #define partial_len data[0] /* length of partial packet data */ 132 #define partial_data data[2] /* partial packet data */ 215 * packet length at the beginning. 216 * The last packet might be incomplete (when it crosses the 4KB URB size), 218 * If a packet has odd length, there is one extra byte at the end (before next 219 * packet or at the end of the URB). 227 * If the last skb ended with an incomplete packet, this skb contains cx82310_rx_fixup() 228 * end of that packet at the beginning. cx82310_rx_fixup() 249 /* first two bytes are packet length */ cx82310_rx_fixup() 253 /* if last packet in the skb, let usbnet to process it */ cx82310_rx_fixup() 260 dev_err(&dev->udev->dev, "RX packet too long: %d B\n", cx82310_rx_fixup() 265 /* incomplete packet, save it for the next skb */ cx82310_rx_fixup() 280 /* process the packet */ cx82310_rx_fixup() 286 /* let usbnet process the last packet */ cx82310_rx_fixup()
|
H A D | cdc_eem.c | 113 * zero, stick two bytes of zero length EEM packet on the end. eem_tx_fixup() 154 /* EEM packet header format: eem_tx_fixup() 162 /* Bundle a zero length EEM packet if needed */ eem_tx_fixup() 180 * zero length EEM packet) that is not accounted as an rx_error. eem_rx_fixup() 192 * EEM packet header format: eem_rx_fixup() 201 * packet is data or command : eem_rx_fixup() 209 * EEM (link) command packet: eem_rx_fixup() 274 /* zero length EEM packet? */ eem_rx_fixup() 279 * EEM data packet header : eem_rx_fixup() 297 * headers, so "skb" is a data packet (or error). eem_rx_fixup()
|
H A D | sr9700.c | 390 * p0 : packet 0 sr9700_rx_fixup() 391 * p0b0 : packet 0 byte 0 sr9700_rx_fixup() 394 * b1: packet length (incl crc) low sr9700_rx_fixup() 395 * b2: packet length (incl crc) high sr9700_rx_fixup() 396 * b3..n-4: packet data sr9700_rx_fixup() 397 * bn-3..bn: ethernet packet crc sr9700_rx_fixup() 415 /* the last packet of current skb */ sr9700_rx_fixup() 446 /* SR9700 can only send out one ethernet packet at once. sr9700_tx_fixup() 451 * b1: packet length (incl crc) low sr9700_tx_fixup() 452 * b2: packet length (incl crc) high sr9700_tx_fixup() 453 * b3..n-4: packet data sr9700_tx_fixup() 454 * bn-3..bn: ethernet packet crc sr9700_tx_fixup() 471 /* usbnet adds padding if length is a multiple of packet size sr9700_tx_fixup()
|
/linux-4.1.27/arch/tile/include/hv/ |
H A D | netio_intf.h | 47 * per-packet NetIO operations. We still do pthread locking on things 81 /* Don't do any locking for per-packet NetIO operations. */ 102 /* Metadata packet checksum/ethertype flags. */ 122 /** The Ethernet packet type is unrecognized. */ 129 /* Metadata packet type flags. */ 131 /** Where the packet type bits are; this field is the index into 136 /** How many VLAN tags the packet has, and, if we have two, which one we 148 /** Which proprietary tags the packet has. */ 158 /** Whether a packet has an LLC + SNAP header. */ 185 /* Flags in minimal packet metadata. */ 187 /** We need an eDMA checksum on this packet. */ 193 /* Data within the packet information table. */ 209 /** The size of a memory buffer representing a small packet. 213 /** The size of a memory buffer representing a large packet. 217 /** The size of a memory buffer representing a jumbo packet. 245 /** No problems were detected with this packet. */ 247 /** The packet is undersized; this is expected behavior if the packet's 248 * ethertype is unrecognized, but otherwise the packet is likely corrupt. */ 250 /** The packet is oversized and some trailing bytes have been discarded. 253 them to make them meet the minimum Ethernet packet size. */ 255 /** The packet was judged to be corrupt by hardware (for instance, it had 321 * A packet size can always fit in a netio_size_t. 328 * @brief Ethernet standard (ingress) packet metadata. 332 * This is additional data associated with each packet. 345 /** The overall ordinal of the packet */ 347 /** The ordinal of the packet within the group */ 351 /** Flags pertaining to checksum calculation, packet type, etc. */ 372 * @brief Ethernet minimal (egress) packet metadata. 390 /** The offset of the L2 header from the start of the packet data. */ 392 /** The offset of the L3 header from the start of the packet data. */ 400 /** The L2 length of the packet. */ 417 * packet. It contains framing and status information. 439 * Returns the base address of the packet. 445 * Returns the base address of the packet. 451 * @brief An I/O notification packet (second word) 454 * packet. This is the virtual address of the packet buffer, plus some flag 455 * bits. (The virtual address of the packet is always 256-byte aligned so we 459 * NOTE: The low two bits must contain "__queue", so the "packet size" 471 /** Which queue the packet will be returned to once it is sent back to 481 /** If 1, this packet has minimal (egress) metadata; otherwise, it 485 /** Offset of the metadata within the packet. This value is multiplied 486 * by 64 and added to the base packet address to get the metadata 491 /** The top 24 bits of the packet's virtual address. */ 501 * @brief A handle for an I/O packet's storage. 505 * packet metadata removed. It is a much smaller type that exists to 508 * to transmit packet descriptors over the UDN. 528 * @brief A packet descriptor. 533 * This data structure represents a packet. The structure is manipulated 543 * received locally; it may read or write the packet's data, read its 544 * metadata, free the packet, send the packet, transfer the netio_pkt_t to 549 * tile frees or sends the same netio_pkt_t, the IPP's packet free lists will 551 * packet data must obey the memory coherency rules outlined in @ref input. 559 /** For an ingress packet (one with standard metadata), this is the 560 * notification header we got from the I/O shim. For an egress packet 561 * (one with minimal metadata), this word is zero if the packet has not 565 /** Virtual address of the packet buffer, plus state flags. */ 568 /** Metadata associated with the packet. */ 603 /** Return a pointer to the metadata for a packet. 608 * function must be called on an 'ingress' packet (i.e. one retrieved 611 * function on an 'egress' packet will cause an assertion failure. 614 * @return A pointer to the packet's standard metadata. 624 /** Return a pointer to the minimal metadata for a packet. 629 * function must be called on an 'egress' packet (i.e. one on which 632 * this function on an 'ingress' packet will cause an assertion failure. 635 * @return A pointer to the packet's standard metadata. 645 /** Determine whether a packet has 'minimal' metadata. 648 * This function will return nonzero if the packet is an 'egress' 649 * packet (i.e. one on which @ref netio_populate_buffer() or 651 * retrieved by @ref netio_get_buffer()), and zero if the packet 652 * is an 'ingress' packet (i.e. one retrieved by @ref netio_get_packet(), 653 * which has not been converted into an 'egress' packet). 656 * @return Nonzero if the packet has minimal metadata. 665 /** Return a handle for a packet's storage. 669 * @return A handle for the packet's storage. 680 /** A special reserved value indicating the absence of a packet handle. 687 /** Test whether a packet handle is valid. 690 * to indicate no packet at all. This function tests to see if a packet 696 * @return One if the packet handle is valid, else zero. 706 /** Return a pointer to the start of the packet's custom header. 710 * the custom header precedes the L2 header in the packet buffer. 714 * @return A pointer to start of the packet. 723 /** Return the length of the packet's custom header. 727 * the custom header precedes the L2 header in the packet buffer. 731 * @param[in] mda Pointer to packet's standard metadata. 733 * @return The length of the packet's custom header, in bytes. 749 /** Return the length of the packet, starting with the custom header. 753 * the custom header precedes the L2 header in the packet buffer. 756 * @param[in] mda Pointer to packet's standard metadata. 758 * @return The length of the packet, in bytes. 768 /** Return a pointer to the start of the packet's custom header. 772 * the custom header precedes the L2 header in the packet buffer. 775 * @param[in] mda Pointer to packet's standard metadata. 777 * @return A pointer to start of the packet. 786 /** Return the length of the packet's L2 (Ethernet plus VLAN or SNAP) header. 789 * @param[in] mda Pointer to packet's standard metadata. 791 * @return The length of the packet's L2 header, in bytes. 807 /** Return the length of the packet, starting with the L2 (Ethernet) header. 810 * @param[in] mda Pointer to packet's standard metadata. 812 * @return The length of the packet, in bytes. 822 /** Return a pointer to the start of the packet's L2 (Ethernet) header. 825 * @param[in] mda Pointer to packet's standard metadata. 827 * @return A pointer to start of the packet. 837 /** Retrieve the length of the packet, starting with the L3 (generally, 841 * @param[in] mda Pointer to packet's standard metadata. 843 * @return Length of the packet's L3 header and data, in bytes. 853 /** Return a pointer to the packet's L3 (generally, the IP) header. 858 * @param[in] mda Pointer to packet's standard metadata. 860 * @return A pointer to the packet's L3 header. 870 /** Return the ordinal of the packet. 873 * Each packet is given an ordinal number when it is delivered by the IPP. 875 * being incremented by 1 for each packet; the ordinal of the first packet 883 * @param[in] mda Pointer to packet's standard metadata. 885 * @return The packet's per-IPP packet ordinal. 894 /** Return the per-group ordinal of the packet. 897 * Each packet is given a per-group ordinal number when it is 898 * delivered by the IPP. By default, the group is the packet's VLAN, 901 * increasing, being incremented by 1 for each packet; the ordinal of 902 * the first packet distributed to a particular group is zero. 911 * @param[in] mda Pointer to packet's standard metadata. 913 * @return The packet's per-IPP, per-group ordinal. 922 /** Return the VLAN ID assigned to the packet. 925 * This value is usually contained within the packet header. 927 * This value will be zero if the packet does not have a VLAN tag, or if 928 * this value was not extracted from the packet. 930 * @param[in] mda Pointer to packet's standard metadata. 932 * @return The packet's VLAN ID. 959 /** Return the ethertype of the packet. 962 * This value is usually contained within the packet header. 967 * @param[in] mda Pointer to packet's standard metadata. 969 * @return The packet's ethertype. 985 /** Return the flow hash computed on the packet. 1010 * @param[in] mda Pointer to packet's standard metadata. 1012 * @return The packet's 32-bit flow hash. 1021 /** Return the first word of "user data" for the packet. 1033 * @param[in] mda Pointer to packet's standard metadata. 1035 * @return The packet's first word of "user data". 1044 /** Return the second word of "user data" for the packet. 1056 * @param[in] mda Pointer to packet's standard metadata. 1058 * @return The packet's second word of "user data". 1070 * @param[in] mda Pointer to packet's standard metadata. 1085 * @param[in] mda Pointer to packet's standard metadata. 1100 * @param[in] mda Pointer to packet's standard metadata. 1115 * @param[in] mda Pointer to packet's standard metadata. 1127 /** Determine whether the ethertype was recognized and L3 packet data was 1131 * @param[in] mda Pointer to packet's standard metadata. 1133 * @return Nonzero if the ethertype was recognized and L3 packet data was 1143 /** Retrieve the status of a packet and any errors that may have occurred 1153 * @param[in] mda Pointer to packet's standard metadata. 1155 * @return The packet's status. 1164 /** Report whether a packet is bad (i.e., was shorter than expected based on 1170 * @param[in] mda Pointer to packet's standard metadata. 1172 * @return Nonzero if the packet is bad and should be discarded. 1183 /** Return the length of the packet, starting with the L2 (Ethernet) header. 1186 * @param[in] mmd Pointer to packet's minimal metadata. 1188 * @return The length of the packet, in bytes. 1200 * @param[in] mmd Pointer to packet's minimal metadata. 1202 * @return The length of the packet's L2 header, in bytes. 1212 /** Return the length of the packet, starting with the L3 (IP) header. 1215 * @param[in] mmd Pointer to packet's minimal metadata. 1217 * @return Length of the packet's L3 header and data, in bytes. 1227 /** Return a pointer to the packet's L3 (generally, the IP) header. 1232 * @param[in] mmd Pointer to packet's minimal metadata. 1234 * @return A pointer to the packet's L3 header. 1243 /** Return a pointer to the packet's L2 (Ethernet) header. 1246 * @param[in] mmd Pointer to packet's minimal metadata. 1248 * @return A pointer to start of the packet. 1257 /** Retrieve the status of a packet and any errors that may have occurred 1268 * @return The packet's status. 1279 /** Report whether a packet is bad (i.e., was shorter than expected based on 1286 * @return Nonzero if the packet is bad and should be discarded. 1297 /** Return the length of the packet's custom header. 1301 * the custom header precedes the L2 header in the packet buffer. 1305 * @return The length of the packet's custom header, in bytes. 1316 /** Return the length of the packet, starting with the custom header. 1320 * the custom header precedes the L2 header in the packet buffer. 1324 * @return The length of the packet, in bytes. 1335 /** Return a pointer to the packet's custom header. 1339 * the custom header precedes the L2 header in the packet buffer. 1343 * @return A pointer to start of the packet. 1354 /** Return the length of the packet's L2 (Ethernet plus VLAN or SNAP) header. 1358 * @return The length of the packet's L2 header, in bytes. 1378 /** Return the length of the packet, starting with the L2 (Ethernet) header. 1382 * @return The length of the packet, in bytes. 1402 /** Return a pointer to the packet's L2 (Ethernet) header. 1406 * @return A pointer to start of the packet. 1426 /** Retrieve the length of the packet, starting with the L3 (generally, the IP) 1431 * @return Length of the packet's L3 header and data, in bytes. 1451 /** Return a pointer to the packet's L3 (generally, the IP) header. 1457 * @return A pointer to the packet's L3 header. 1477 /** Return the ordinal of the packet. 1480 * Each packet is given an ordinal number when it is delivered by the IPP. 1482 * being incremented by 1 for each packet; the ordinal of the first packet 1492 * @return The packet's per-IPP packet ordinal. 1503 /** Return the per-group ordinal of the packet. 1506 * Each packet is given a per-group ordinal number when it is 1507 * delivered by the IPP. By default, the group is the packet's VLAN, 1510 * increasing, being incremented by 1 for each packet; the ordinal of 1511 * the first packet distributed to a particular group is zero. 1521 * @return The packet's per-IPP, per-group ordinal. 1532 /** Return the VLAN ID assigned to the packet. 1535 * This is usually also contained within the packet header. If the packet 1539 * @return The packet's VLAN ID. 1550 /** Return the ethertype of the packet. 1557 * @return The packet's ethertype. 1568 /** Return the flow hash computed on the packet. 1594 * @return The packet's 32-bit flow hash. 1605 /** Return the first word of "user data" for the packet. 1618 * @return The packet's first word of "user data". 1629 /** Return the second word of "user data" for the packet. 1642 * @return The packet's second word of "user data". 1715 /** Determine whether the Ethertype was recognized and L3 packet data was 1720 * @return Nonzero if the Ethertype was recognized and L3 packet data was 1732 /** Set an egress packet's L2 length, using a metadata pointer to speed the 1736 * @param[in,out] mmd Pointer to packet's minimal metadata. 1748 /** Set an egress packet's L2 length. 1763 /** Set an egress packet's L2 header length, using a metadata pointer to 1768 * not the header length, is needed to transmit a packet. It may be useful if 1769 * the egress packet will later be processed by code which expects to use 1772 * @param[in,out] mmd Pointer to packet's minimal metadata. 1784 /** Set an egress packet's L2 header length. 1788 * not the header length, is needed to transmit a packet. It may be useful if 1789 * the egress packet will later be processed by code which expects to use 1804 /** Set up an egress packet for hardware checksum computation, using a 1810 * may specify the point in the packet where the checksum starts, the 1811 * number of bytes to be checksummed, and the two bytes in the packet 1816 * For some protocols, the packet checksum covers data which is not present 1817 * in the packet, or is at least not contiguous to the main data payload. 1819 * the source and destination IP addresses of the packet. To accommodate 1828 * so it will not be present in the packet upon completion of this routine. 1830 * @param[in,out] mmd Pointer to packet's minimal metadata. 1832 * @param[in] start Offset within L2 packet of the first byte to include in 1836 * @param[in] location Offset within L2 packet of the first of the two bytes 1839 * packet data is added. 1854 /** Set up an egress packet for hardware checksum computation. 1859 * may specify the point in the packet where the checksum starts, the 1860 * number of bytes to be checksummed, and the two bytes in the packet 1865 * For some protocols, the packet checksum covers data which is not present 1866 * in the packet, or is at least not contiguous to the main data payload. 1868 * the source and destination IP addresses of the packet. To accommodate 1877 * so it will not be present in the packet upon completion of this routine. 1880 * @param[in] start Offset within L2 packet of the first byte to include in 1884 * @param[in] location Offset within L2 packet of the first of the two bytes 1887 * packet data is added. 1899 /** Return the number of bytes which could be prepended to a packet, using a 1904 * @param[in,out] mda Pointer to packet's standard metadata. 1915 /** Return the number of bytes which could be prepended to a packet, using a 1921 * @param[in,out] mmd Pointer to packet's minimal metadata. 1931 /** Return the number of bytes which could be prepended to a packet. 1956 /** Flush a packet's minimal metadata from the cache, using a metadata pointer 1960 * @param[in] mmd Pointer to packet's minimal metadata. 1970 /** Invalidate a packet's minimal metadata from the cache, using a metadata 1974 * @param[in] mmd Pointer to packet's minimal metadata. 1984 /** Flush and then invalidate a packet's minimal metadata from the cache, 1988 * @param[in] mmd Pointer to packet's minimal metadata. 1998 /** Flush a packet's metadata from the cache, using a metadata pointer 2002 * @param[in] mda Pointer to packet's minimal metadata. 2011 /** Invalidate a packet's metadata from the cache, using a metadata 2015 * @param[in] mda Pointer to packet's metadata. 2024 /** Flush and then invalidate a packet's metadata from the cache, 2028 * @param[in] mda Pointer to packet's metadata. 2037 /** Flush a packet's minimal metadata from the cache. 2048 /** Invalidate a packet's minimal metadata from the cache. 2059 /** Flush and then invalidate a packet's minimal metadata from the cache. 2070 /** Flush a packet's metadata from the cache. 2081 /** Invalidate a packet's metadata from the cache. 2092 /** Flush and then invalidate a packet's metadata from the cache. 2237 /** Receive packet queue size. This specifies the maximum number 2240 algorithm calls for a packet to be sent to this queue, and this 2241 number of packets are already pending there, the new packet 2318 /** Total packet buffer size. This determines the total size, in bytes, 2336 In order to successfully allocate packet buffers, Linux must have 2408 /** Fixed virtual address for packet buffers. Only valid when 2415 Maximum number of outstanding send packet requests. This value is 2417 slots in the EPP's outgoing packet queue which this tile is allowed 2424 outgoing packet slots evenly between all tiles on the chip, is used. 2426 If a registration asks for more outgoing packet queue slots than are 2428 of packet queue slots which are available for all tiles for each EPP 2435 that they do not consume a default number of packet slots. Any tile 2450 /** Fail a registration request if we can't put packet buffers 2492 multiple of 16 MB, and the packet buffers will occupy @ref 2527 return NETIO_QUEUE_FULL once the outgoing packet queue in the EPP 2556 registered for packet reception or transmission. This flag is ignored 2564 registered for packet reception or transmission. This flag is ignored 2585 /** Maximum number of send buffers, per packet size. */ 2688 /** Low 8 bits of the packet address to send. The high bits are 2696 * this vector entry will be skipped and no packet will be transmitted. */ 2703 * @brief Initialize fields in a packet vector entry. 2709 * netio_send_packet_vector(). Note that the packet's attributes 2712 * be reflected in the packet which is actually transmitted. 2713 * Changes in the packet's contents, however, will be so reflected. 2714 * If this is NULL, no packet will be transmitted. 2771 /** Determine whether to send pause frames if the I/O shim packet FIFOs are 2868 * when the IPP does not have a free packet buffer of suitable size for an 2870 * for a packet, as defined by the group, bucket, and queue configuration, 2883 * packet. This value saturates at its maximum, and is cleared upon
|
H A D | drv_xgbe_impl.h | 52 #define SIZE_SMALL (1) /**< Small packet queue. */ 53 #define SIZE_LARGE (2) /**< Large packet queue. */ 54 #define SIZE_JUMBO (0) /**< Jumbo packet queue. */ 89 * structure) points to the next packet to be read. When the read offset is 109 * slots are invalid (do not contain a packet). 112 /** Byte offset of the next notify packet to be written: zero for the first 113 * packet on the queue, sizeof (netio_pkt_t) for the second packet on the 117 /** Offset of the packet after the last valid packet (i.e., when any 127 * obtained via requests to the IPP. (The elements of the queue are packet 151 * __last_buffer, is different than in the packet queue. Also, the offset 152 * used in the packet_queue is already scaled by the size of a packet; here we 230 /** The next incoming packet to be read. */ 259 /** Internal structure used to convey packet send information to the 266 uint16_t transfer_size; /**< Size of packet */ 267 uint32_t va; /**< VA of start of packet */ 278 * - As part of the flags passed to the various send packet fast I/O calls. 281 /** Need acknowledgement on this packet. Note that some code in the 285 /** Do checksum on this packet. (Only used with the __netio_send_cmd_t; 286 * normal packet sends use a special fast I/O index to denote checksumming, 290 /** Get a completion on this packet. Only used with multi-segment sends. */
|
H A D | drv_xgbe_intf.h | 28 * store packet buffers. 127 /** Supply packet arena. Write-only, takes an array of 159 NETIO_FASTIO_ALLOCATE = 0, /**< Get empty packet buffer */ 162 NETIO_FASTIO_SEND_PKT_NOCK = 3, /**< Send a packet, no checksum */ 163 NETIO_FASTIO_SEND_PKT_CK = 4, /**< Send a packet, with checksum */ 165 NETIO_FASTIO_SENDV_PKT = 6, /**< Sendv one packet */ 195 /** Allocate an empty packet. 197 * @param size Size of the packet to allocate. 204 * @param handle Handle for the packet to free. 216 /** Send packet, no checksum. 219 * @param size Size of the packet. 220 * @param va Virtual address of start of packet. 227 /** Send packet, calculate checksum. 230 * @param size Size of the packet. 231 * @param va Virtual address of start of packet. 259 /** Sendv packet with 1 or 2 segments. 275 /** Send packet on PCIe interface. 280 * @param va_F Virtual address of the packet buffer. 282 * @param len_F_L Length of the packet buffer in low 16 bits. 289 /** Sendv packet with 3 or 4 segments. 321 * packet sent. That increment may be less than nentries if an 347 /** Should this packet be sent directly from caches instead of DRAM, 348 * using hash-for-home to locate the packet data? 355 /** Is this the final buffer for this packet? 357 * A single packet can be split over several input buffers (a "gather" 359 * in a packet. 395 /** Should this packet be sent directly from caches instead of DRAM, 396 * using hash-for-home to locate the packet data? 418 * [40, 127], which are the smallest header for a TCP packet over 432 /** The number of bytes to use for the payload of each packet, 434 * This means that each Ethernet packet except the last will have a 446 * The packet header template logically follows frags[],
|
/linux-4.1.27/fs/ncpfs/ |
H A D | ncpsign_kernel.c | 93 /* Make a signature for the current packet and add it at the end of the */ 94 /* packet. */ __sign_packet() 95 void __sign_packet(struct ncp_server *server, const char *packet, size_t size, __u32 totalsize, void *sign_buff) { __sign_packet() argument 101 memcpy(data + 12, packet, size); __sign_packet() 104 memcpy(data + 12, packet, 52); __sign_packet() 110 int sign_verify_reply(struct ncp_server *server, const char *packet, size_t size, __u32 totalsize, const void *sign_buff) { sign_verify_reply() argument 117 memcpy(data + 12, packet, size); sign_verify_reply() 120 memcpy(data + 12, packet, 52); sign_verify_reply()
|
/linux-4.1.27/drivers/input/ |
H A D | mousedev.c | 74 struct mousedev_hw_data packet; member in struct:mousedev 144 mousedev->packet.dx = tmp / FRACTION_DENOM; mousedev_touchpad_event() 146 tmp - mousedev->packet.dx * FRACTION_DENOM; mousedev_touchpad_event() 161 mousedev->packet.dy = tmp / FRACTION_DENOM; mousedev_touchpad_event() 163 mousedev->packet.dy * FRACTION_DENOM; mousedev_touchpad_event() 186 mousedev->packet.x = ((value - min) * xres) / size; mousedev_abs_event() 187 mousedev->packet.abs_event = 1; mousedev_abs_event() 200 mousedev->packet.y = yres - ((value - min) * yres) / size; mousedev_abs_event() 201 mousedev->packet.abs_event = 1; mousedev_abs_event() 211 mousedev->packet.dx += value; mousedev_rel_event() 215 mousedev->packet.dy -= value; mousedev_rel_event() 219 mousedev->packet.dz -= value; mousedev_rel_event() 255 set_bit(index, &mousedev->packet.buttons); mousedev_key_event() 256 set_bit(index, &mousedev_mix->packet.buttons); mousedev_key_event() 258 clear_bit(index, &mousedev->packet.buttons); mousedev_key_event() 259 clear_bit(index, &mousedev_mix->packet.buttons); mousedev_key_event() 264 struct mousedev_hw_data *packet) mousedev_notify_readers() 278 if (client->ready && p->buttons != mousedev->packet.buttons) { mousedev_notify_readers() 286 if (packet->abs_event) { mousedev_notify_readers() 287 p->dx += packet->x - client->pos_x; mousedev_notify_readers() 288 p->dy += packet->y - client->pos_y; mousedev_notify_readers() 289 client->pos_x = packet->x; mousedev_notify_readers() 290 client->pos_y = packet->y; mousedev_notify_readers() 293 client->pos_x += packet->dx; mousedev_notify_readers() 296 client->pos_y += packet->dy; mousedev_notify_readers() 300 p->dx += packet->dx; mousedev_notify_readers() 301 p->dy += packet->dy; mousedev_notify_readers() 302 p->dz += packet->dz; mousedev_notify_readers() 303 p->buttons = mousedev->packet.buttons; mousedev_notify_readers() 331 * motion packet so we won't mess current position. mousedev_touchpad_touch() 333 set_bit(0, &mousedev->packet.buttons); mousedev_touchpad_touch() 334 set_bit(0, &mousedev_mix->packet.buttons); mousedev_touchpad_touch() 335 mousedev_notify_readers(mousedev, &mousedev_mix->packet); mousedev_touchpad_touch() 337 &mousedev_mix->packet); mousedev_touchpad_touch() 338 clear_bit(0, &mousedev->packet.buttons); mousedev_touchpad_touch() 339 clear_bit(0, &mousedev_mix->packet.buttons); mousedev_touchpad_touch() 396 mousedev_notify_readers(mousedev, &mousedev->packet); mousedev_event() 397 mousedev_notify_readers(mousedev_mix, &mousedev->packet); mousedev_event() 399 mousedev->packet.dx = mousedev->packet.dy = mousedev_event() 400 mousedev->packet.dz = 0; mousedev_event() 401 mousedev->packet.abs_event = 0; mousedev_event() 263 mousedev_notify_readers(struct mousedev *mousedev, struct mousedev_hw_data *packet) mousedev_notify_readers() argument
|
/linux-4.1.27/arch/tile/include/arch/ |
H A D | mpipe_shm.h | 28 * is used to specify the location of egress packet data to be sent out of 29 * the chip via one of the packet interfaces. 59 * packet but still wishes to return all of the associated buffers. 63 * Notification interrupt will be delivered when packet has been egressed. 69 * packet. 96 * packet, CSUM_START is still relative to the first byte in this 138 * field does not match the mPIPE's instance number when a packet is 147 * Always set to one by hardware in iDMA packet descriptors. For eDMA, 153 * Encoded size of buffer. Set by the ingress hardware for iDMA packet 155 * indicates a chained packet. If an eDMA descriptor is not chained and 170 * packet or egress command is chained across multiple buffers, with each 193 * The packet descriptor is filled by the mPIPE's classification, 207 * Notification ring into which this packet descriptor is written. 212 /** Source channel for this packet. Written by mPIPE DMA hardware. */ 225 * Written by the iDMA hardware. Asserted if packet was truncated due to 231 * to Tile memory. In general, this is the actual size of the packet as 232 * received from the MAC. But if the packet is truncated due to running 241 * other L2 error (bad length etc.) on the packet. 246 * Written by the iDMA hardware. Asserted if packet was not completely 253 * select the ring into which this packet descriptor is written. 272 * Written by classification program. Indicates whether packet and 289 * timestamp when the start of packet is received from the MAC. 295 * with custom data by classifier. When set, hardware inserts the packet 296 * sequence number when the packet descriptor is written to a 303 * while writing the packet. Software must still return any buffer 309 * incremented when the packet is sent. 341 * incremented when the packet is sent. 354 * value bits when viewed by Tile software match the packet byte order. 356 * earlier (more significant) bytes in the packet. To avoid classifier 359 * calculation. Thus, the CSUM_START byte of packet data is added to 417 * Sequence number applied when packet is distributed. Classifier 426 * Written by notification hardware. The packet sequence number is 427 * incremented for each packet that wasn't dropped. 439 * Written by hardware when the start-of-packet is received by the mPIPE 440 * from the MAC. This is the nanoseconds part of the packet timestamp. 444 * Written by hardware when the start-of-packet is received by the mPIPE 445 * from the MAC. This is the seconds part of the packet timestamp. 467 * field does not match the mPIPE's instance number when a packet is 476 * Always set to one by hardware in iDMA packet descriptors. For eDMA, 482 * Encoded size of buffer. Set by the ingress hardware for iDMA packet 484 * indicates a chained packet. If an eDMA descriptor is not chained and 499 * packet or egress command is chained across multiple buffers, with each
|
/linux-4.1.27/drivers/staging/octeon/ |
H A D | ethernet-rx.c | 83 * @work: Work queue entry pointing to the packet. 85 * Returns Non-zero if the packet can be dropped, zero otherwise. 102 * We received a packet with either an alignment error cvm_oct_check_rcv_error() 106 * packet to determine if we can remove a non spec cvm_oct_check_rcv_error() 107 * preamble and generate a correct packet. cvm_oct_check_rcv_error() 149 printk_ratelimited("Port %d unknown preamble, packet dropped\n", cvm_oct_check_rcv_error() 159 printk_ratelimited("Port %d receive error code %d, packet dropped\n", cvm_oct_check_rcv_error() 252 * in the FPA pool and the packet fits in a single cvm_oct_napi_poll() 264 * We have to copy the packet. First allocate cvm_oct_napi_poll() 274 * Check if we've received a packet that was cvm_oct_napi_poll() 282 * The beginning of the packet cvm_oct_napi_poll() 291 /* No packet buffers to free */ cvm_oct_napi_poll() 305 * segment size based on the packet pool cvm_oct_napi_poll() 318 * is left in the packet. cvm_oct_napi_poll() 322 /* Copy the data into the packet */ cvm_oct_napi_poll() 370 /* Drop any packet received for a device that isn't up */ cvm_oct_napi_poll() 372 printk_ratelimited("%s: Device not up, packet dropped\n", cvm_oct_napi_poll() 386 * Drop any packet received for a device that cvm_oct_napi_poll() 389 printk_ratelimited("Port %d not controlled by Linux, packet dropped\n", cvm_oct_napi_poll() 395 * packet buffer. cvm_oct_napi_poll() 475 /* Enable POW interrupt when our port has at least one packet */ cvm_oct_rx_initialize()
|
H A D | ethernet-tx.c | 74 /* Maximum number of SKBs to try to free per xmit packet. */ 152 * cvm_oct_xmit - transmit a packet 249 * the end of a <68 byte packet. As a workaround for this, we cvm_oct_xmit() 251 * mode. We don't handle the case of having a small packet but cvm_oct_xmit() 261 /* We only need to pad packet in half duplex mode */ cvm_oct_xmit() 280 pko_command.s.n2 = 1; /* Don't pollute L2 with the outgoing packet */ cvm_oct_xmit() 457 /* Drop this packet if we have too many already queued to the HW */ cvm_oct_xmit() 478 /* Send the packet to the output queue */ cvm_oct_xmit() 483 printk_ratelimited("%s: Failed to send the packet\n", cvm_oct_xmit() 551 * cvm_oct_xmit_pow - transmit a packet to the POW 574 /* Get a packet buffer */ cvm_oct_xmit_pow() 577 printk_ratelimited("%s: Failed to allocate a packet buffer\n", cvm_oct_xmit_pow() 589 * packet src and dest into the same 64bit word. The below cvm_oct_xmit_pow() 597 * We have to copy the packet since whoever processes this cvm_oct_xmit_pow() 598 * packet will free it to a hardware pool. We can't use the cvm_oct_xmit_pow() 642 /* No error, packet is internal */ cvm_oct_xmit_pow() 649 /* Assume Linux is sending a good packet */ cvm_oct_xmit_pow() 655 /* This is an IP packet */ cvm_oct_xmit_pow() 657 /* No error, packet is internal */ cvm_oct_xmit_pow() 659 /* No error, packet is internal */ cvm_oct_xmit_pow() 685 /* No error, packet is internal */ cvm_oct_xmit_pow() 687 /* No error, packet is internal */ cvm_oct_xmit_pow() 693 /* Submit the packet to the POW */ cvm_oct_xmit_pow()
|
/linux-4.1.27/drivers/media/usb/dvb-usb-v2/ |
H A D | anysee.h | 102 General reply packet(s) are always used if not own reply defined. 108 | | Just same reply packet as returned during previous transaction. 114 | 60 | packet sequence number 126 | 60 | packet sequence number 147 | 60 | packet sequence number 169 | 60 | packet sequence number 187 | 60 | packet sequence number 203 | 60 | packet sequence number 224 | 60 | packet sequence number 241 | 60 | packet sequence number 258 | 60 | packet sequence number 270 | 60 | packet sequence number 285 | 60 | packet sequence number 297 | 60 | packet sequence number 311 | 60 | packet sequence number 325 | 60 | packet sequence number
|
H A D | rtl28xxu.h | 168 #define EP0_SETUPA 0x20F8 /* EP 0 setup packet lower byte */ 169 #define EP0_SETUPB 0x20FC /* EP 0 setup packet higher byte */ 175 #define USB_EP0_MAXPKT 0x2118 /* EP 0 max packet size */ 190 #define USB_EPA_MAXPKT 0x2158 /* EP A max packet size */ 191 #define USB_EPA_MAXPKT_0 0x2158 /* EP A max packet size */ 192 #define USB_EPA_MAXPKT_1 0x2159 /* EP A max packet size */ 193 #define USB_EPA_MAXPKT_2 0x215A /* EP A max packet size */ 194 #define USB_EPA_MAXPKT_3 0x215B /* EP A max packet size */ 212 #define USB_PKTERR_CNT 0x2F94 /* packet error counter */
|
/linux-4.1.27/drivers/input/touchscreen/ |
H A D | elo.c | 96 "unexpected packet: 0x%02x\n", elo_process_data_10() 224 static int elo_command_10(struct elo *elo, unsigned char *packet) elo_command_10() argument 233 elo->expected_packet = toupper(packet[0]); elo_command_10() 241 csum += packet[i]; elo_command_10() 242 if (serio_write(elo->serio, packet[i])) elo_command_10() 253 memcpy(packet, elo->response, ELO10_PACKET_LEN); elo_command_10() 266 unsigned char packet[ELO10_PACKET_LEN] = { ELO10_ID_CMD }; elo_setup_10() local 268 if (elo_command_10(elo, packet)) elo_setup_10() 271 dev->id.version = (packet[5] << 8) | packet[4]; elo_setup_10() 275 if (packet[3] & ELO10_PRESSURE) elo_setup_10() 280 elo_types[(packet[1] -'0') & 0x03], elo_setup_10() 281 packet[5], packet[4], packet[3], packet[7]); elo_setup_10()
|
H A D | ads7846.c | 116 struct ads7846_packet *packet; member in struct:ads7846 695 struct ads7846_packet *packet = ts->packet; ads7846_read_state() local 710 packet->tc.ignore = true; ads7846_read_state() 728 packet->tc.ignore = true; ads7846_read_state() 734 packet->tc.ignore = false; ads7846_read_state() 749 struct ads7846_packet *packet = ts->packet; ads7846_report_state() local 759 x = *(u16 *)packet->tc.x_buf; ads7846_report_state() 760 y = *(u16 *)packet->tc.y_buf; ads7846_report_state() 764 x = packet->tc.x; ads7846_report_state() 765 y = packet->tc.y; ads7846_report_state() 766 z1 = packet->tc.z1; ads7846_report_state() 767 z2 = packet->tc.z2; ads7846_report_state() 799 if (packet->tc.ignore || Rt > ts->pressure_max) { ads7846_report_state() 801 packet->tc.ignore, Rt); ads7846_report_state() 979 struct ads7846_packet *packet = ts->packet; ads7846_setup_spi_msg() local 997 packet->read_y_cmd[0] = READ_Y(vref); ads7846_setup_spi_msg() 998 packet->read_y_cmd[1] = 0; ads7846_setup_spi_msg() 999 packet->read_y_cmd[2] = 0; ads7846_setup_spi_msg() 1000 x->tx_buf = &packet->read_y_cmd[0]; ads7846_setup_spi_msg() 1001 x->rx_buf = &packet->tc.y_buf[0]; ads7846_setup_spi_msg() 1006 packet->read_y = READ_Y(vref); ads7846_setup_spi_msg() 1007 x->tx_buf = &packet->read_y; ads7846_setup_spi_msg() 1012 x->rx_buf = &packet->tc.y; ads7846_setup_spi_msg() 1026 x->tx_buf = &packet->read_y; ads7846_setup_spi_msg() 1031 x->rx_buf = &packet->tc.y; ads7846_setup_spi_msg() 1043 packet->read_x_cmd[0] = READ_X(vref); ads7846_setup_spi_msg() 1044 packet->read_x_cmd[1] = 0; ads7846_setup_spi_msg() 1045 packet->read_x_cmd[2] = 0; ads7846_setup_spi_msg() 1046 x->tx_buf = &packet->read_x_cmd[0]; ads7846_setup_spi_msg() 1047 x->rx_buf = &packet->tc.x_buf[0]; ads7846_setup_spi_msg() 1053 packet->read_x = READ_X(vref); ads7846_setup_spi_msg() 1054 x->tx_buf = &packet->read_x; ads7846_setup_spi_msg() 1059 x->rx_buf = &packet->tc.x; ads7846_setup_spi_msg() 1069 x->tx_buf = &packet->read_x; ads7846_setup_spi_msg() 1074 x->rx_buf = &packet->tc.x; ads7846_setup_spi_msg() 1087 packet->read_z1 = READ_Z1(vref); ads7846_setup_spi_msg() 1088 x->tx_buf = &packet->read_z1; ads7846_setup_spi_msg() 1093 x->rx_buf = &packet->tc.z1; ads7846_setup_spi_msg() 1102 x->tx_buf = &packet->read_z1; ads7846_setup_spi_msg() 1107 x->rx_buf = &packet->tc.z1; ads7846_setup_spi_msg() 1118 packet->read_z2 = READ_Z2(vref); ads7846_setup_spi_msg() 1119 x->tx_buf = &packet->read_z2; ads7846_setup_spi_msg() 1124 x->rx_buf = &packet->tc.z2; ads7846_setup_spi_msg() 1133 x->tx_buf = &packet->read_z2; ads7846_setup_spi_msg() 1138 x->rx_buf = &packet->tc.z2; ads7846_setup_spi_msg() 1152 packet->pwrdown_cmd[0] = PWRDOWN; ads7846_setup_spi_msg() 1153 packet->pwrdown_cmd[1] = 0; ads7846_setup_spi_msg() 1154 packet->pwrdown_cmd[2] = 0; ads7846_setup_spi_msg() 1155 x->tx_buf = &packet->pwrdown_cmd[0]; ads7846_setup_spi_msg() 1159 packet->pwrdown = PWRDOWN; ads7846_setup_spi_msg() 1160 x->tx_buf = &packet->pwrdown; ads7846_setup_spi_msg() 1165 x->rx_buf = &packet->dummy; ads7846_setup_spi_msg() 1255 struct ads7846_packet *packet; ads7846_probe() local 1284 packet = kzalloc(sizeof(struct ads7846_packet), GFP_KERNEL); ads7846_probe() 1286 if (!ts || !packet || !input_dev) { ads7846_probe() 1293 ts->packet = packet; ads7846_probe() 1453 kfree(packet); ads7846_probe() 1487 kfree(ts->packet); ads7846_remove()
|
/linux-4.1.27/drivers/firewire/ |
H A D | nosy-user.h | 21 * quadlet-padded packet data... (little endian)
|
H A D | ohci.c | 353 ", reset packet generation = " __stringify(QUIRK_RESET_PACKET) 479 [0xa] = "async stream packet", [0xb] = "Lk resp", 727 * We search for the buffer that contains the last AR packet DMA data written 753 * The exception is when the DMA data for one packet is ar_search_last_active_buffer() 847 ar_context_abort(ctx, "invalid packet length"); handle_ar_packet() 880 * write ack_complete status at PHY packet reception. handle_ar_packet() 887 * The OHCI bus reset handler synthesizes a PHY packet with handle_ar_packet() 957 * all packets up to the buffer end here. If the last packet ar_context_tasklet() 1289 struct fw_packet *packet; member in struct:driver_data 1293 * This function apppends a packet to the DMA queue for transmission. 1295 * generation handling and locking around packet queue manipulation. 1298 struct fw_packet *packet) at_context_queue_packet() 1309 packet->ack = RCODE_SEND_ERROR; at_context_queue_packet() 1314 d[0].res_count = cpu_to_le16(packet->timestamp); at_context_queue_packet() 1322 tcode = (packet->header[0] >> 4) & 0x0f; at_context_queue_packet() 1334 header[0] = cpu_to_le32((packet->header[0] & 0xffff) | at_context_queue_packet() 1335 (packet->speed << 16)); at_context_queue_packet() 1336 header[1] = cpu_to_le32((packet->header[1] & 0xffff) | at_context_queue_packet() 1337 (packet->header[0] & 0xffff0000)); at_context_queue_packet() 1338 header[2] = cpu_to_le32(packet->header[2]); at_context_queue_packet() 1341 header[3] = cpu_to_le32(packet->header[3]); at_context_queue_packet() 1343 header[3] = (__force __le32) packet->header[3]; at_context_queue_packet() 1345 d[0].req_count = cpu_to_le16(packet->header_length); at_context_queue_packet() 1350 (packet->speed << 16)); at_context_queue_packet() 1351 header[1] = cpu_to_le32(packet->header[1]); at_context_queue_packet() 1352 header[2] = cpu_to_le32(packet->header[2]); at_context_queue_packet() 1355 if (is_ping_packet(&packet->header[1])) at_context_queue_packet() 1360 header[0] = cpu_to_le32((packet->header[0] & 0xffff) | at_context_queue_packet() 1361 (packet->speed << 16)); at_context_queue_packet() 1362 header[1] = cpu_to_le32(packet->header[0] & 0xffff0000); at_context_queue_packet() 1368 packet->ack = RCODE_SEND_ERROR; at_context_queue_packet() 1374 driver_data->packet = packet; at_context_queue_packet() 1375 packet->driver_data = driver_data; at_context_queue_packet() 1377 if (packet->payload_length > 0) { at_context_queue_packet() 1378 if (packet->payload_length > sizeof(driver_data->inline_data)) { at_context_queue_packet() 1380 packet->payload, at_context_queue_packet() 1381 packet->payload_length, at_context_queue_packet() 1384 packet->ack = RCODE_SEND_ERROR; at_context_queue_packet() 1387 packet->payload_bus = payload_bus; at_context_queue_packet() 1388 packet->payload_mapped = true; at_context_queue_packet() 1390 memcpy(driver_data->inline_data, packet->payload, at_context_queue_packet() 1391 packet->payload_length); at_context_queue_packet() 1395 d[2].req_count = cpu_to_le16(packet->payload_length); at_context_queue_packet() 1409 if (ohci->generation != packet->generation) { at_context_queue_packet() 1410 if (packet->payload_mapped) at_context_queue_packet() 1412 packet->payload_length, DMA_TO_DEVICE); at_context_queue_packet() 1413 packet->ack = RCODE_GENERATION; at_context_queue_packet() 1443 struct fw_packet *packet; handle_at_packet() local 1452 packet = driver_data->packet; handle_at_packet() 1453 if (packet == NULL) handle_at_packet() 1454 /* This packet was cancelled, just continue. */ handle_at_packet() 1457 if (packet->payload_mapped) handle_at_packet() 1458 dma_unmap_single(ohci->card.device, packet->payload_bus, handle_at_packet() 1459 packet->payload_length, DMA_TO_DEVICE); handle_at_packet() 1462 packet->timestamp = le16_to_cpu(last->res_count); handle_at_packet() 1464 log_ar_at_event(ohci, 'T', packet->speed, packet->header, evt); handle_at_packet() 1469 packet->ack = RCODE_CANCELLED; handle_at_packet() 1474 * The packet was flushed should give same error as handle_at_packet() 1477 packet->ack = RCODE_GENERATION; handle_at_packet() 1482 packet->ack = RCODE_GENERATION; handle_at_packet() 1488 packet->ack = RCODE_NO_ACK; handle_at_packet() 1499 packet->ack = evt - 0x10; handle_at_packet() 1504 packet->ack = RCODE_GENERATION; handle_at_packet() 1510 packet->ack = RCODE_SEND_ERROR; handle_at_packet() 1514 packet->callback(packet, &ohci->card, packet->ack); handle_at_packet() 1526 struct fw_packet *packet, u32 csr) handle_local_rom() 1531 tcode = HEADER_GET_TCODE(packet->header[0]); handle_local_rom() 1533 length = HEADER_GET_DATA_LENGTH(packet->header[3]); handle_local_rom() 1539 fw_fill_response(&response, packet->header, handle_local_rom() 1542 fw_fill_response(&response, packet->header, handle_local_rom() 1545 fw_fill_response(&response, packet->header, RCODE_COMPLETE, handle_local_rom() 1553 struct fw_packet *packet, u32 csr) handle_local_lock() 1560 tcode = HEADER_GET_TCODE(packet->header[0]); handle_local_lock() 1561 length = HEADER_GET_DATA_LENGTH(packet->header[3]); handle_local_lock() 1562 payload = packet->payload; handle_local_lock() 1563 ext_tcode = HEADER_GET_EXTENDED_TCODE(packet->header[3]); handle_local_lock() 1573 fw_fill_response(&response, packet->header, handle_local_lock() 1587 fw_fill_response(&response, packet->header, handle_local_lock() 1594 fw_fill_response(&response, packet->header, RCODE_BUSY, NULL, 0); handle_local_lock() 1600 static void handle_local_request(struct context *ctx, struct fw_packet *packet) handle_local_request() argument 1605 packet->ack = ACK_PENDING; handle_local_request() 1606 packet->callback(packet, &ctx->ohci->card, packet->ack); handle_local_request() 1611 HEADER_GET_OFFSET_HIGH(packet->header[1]) << 32) | handle_local_request() 1612 packet->header[2]; handle_local_request() 1617 handle_local_rom(ctx->ohci, packet, csr); handle_local_request() 1623 handle_local_lock(ctx->ohci, packet, csr); handle_local_request() 1627 fw_core_handle_request(&ctx->ohci->card, packet); handle_local_request() 1629 fw_core_handle_response(&ctx->ohci->card, packet); handle_local_request() 1634 packet->ack = ACK_COMPLETE; handle_local_request() 1635 packet->callback(packet, &ctx->ohci->card, packet->ack); handle_local_request() 1639 static void at_context_transmit(struct context *ctx, struct fw_packet *packet) at_context_transmit() argument 1646 if (HEADER_GET_DESTINATION(packet->header[0]) == ctx->ohci->node_id && at_context_transmit() 1647 ctx->ohci->generation == packet->generation) { at_context_transmit() 1649 handle_local_request(ctx, packet); at_context_transmit() 1653 ret = at_context_queue_packet(ctx, packet); at_context_transmit() 1657 packet->callback(packet, &ctx->ohci->card, packet->ack); at_context_transmit() 1942 * If the invalid data looks like a cycle start packet, bus_reset_work() 1999 ohci->generation = -1; /* prevent AT packet queueing */ bus_reset_work() 2539 static void ohci_send_request(struct fw_card *card, struct fw_packet *packet) ohci_send_request() argument 2543 at_context_transmit(&ohci->at_request_ctx, packet); ohci_send_request() 2546 static void ohci_send_response(struct fw_card *card, struct fw_packet *packet) ohci_send_response() argument 2550 at_context_transmit(&ohci->at_response_ctx, packet); ohci_send_response() 2553 static int ohci_cancel_packet(struct fw_card *card, struct fw_packet *packet) ohci_cancel_packet() argument 2557 struct driver_data *driver_data = packet->driver_data; ohci_cancel_packet() 2562 if (packet->ack != 0) ohci_cancel_packet() 2565 if (packet->payload_mapped) ohci_cancel_packet() 2566 dma_unmap_single(ohci->card.device, packet->payload_bus, ohci_cancel_packet() 2567 packet->payload_length, DMA_TO_DEVICE); ohci_cancel_packet() 2569 log_ar_at_event(ohci, 'T', packet->speed, packet->header, 0x20); ohci_cancel_packet() 2570 driver_data->packet = NULL; ohci_cancel_packet() 2571 packet->ack = RCODE_CANCELLED; ohci_cancel_packet() 2572 packet->callback(packet, &ohci->card, packet->ack); ohci_cancel_packet() 2761 ctx_hdr[0] = swab32(dma_hdr[1]); /* iso packet header */ copy_iso_headers() 2869 * If the packet has a header, the first OUTPUT_MORE/LAST descriptor's sync_it_packet_for_cpu() 3202 struct fw_iso_packet *packet, queue_iso_transmit() 3214 p = packet; queue_iso_transmit() 3306 struct fw_iso_packet *packet, queue_iso_packet_per_buffer() 3321 packet_count = packet->header_length / ctx->base.header_size; queue_iso_packet_per_buffer() 3328 payload_per_buffer = packet->payload_length / packet_count; queue_iso_packet_per_buffer() 3340 if (packet->skip && i == 0) queue_iso_packet_per_buffer() 3377 if (packet->interrupt && i == packet_count - 1) queue_iso_packet_per_buffer() 3387 struct fw_iso_packet *packet, queue_iso_buffer_fill() 3397 rest = packet->payload_length; queue_iso_buffer_fill() 3412 if (packet->skip && i == 0) queue_iso_buffer_fill() 3414 if (packet->interrupt && i == z - 1) queue_iso_buffer_fill() 3443 struct fw_iso_packet *packet, ohci_queue_iso() 3454 ret = queue_iso_transmit(ctx, packet, buffer, payload); ohci_queue_iso() 3457 ret = queue_iso_packet_per_buffer(ctx, packet, buffer, payload); ohci_queue_iso() 3460 ret = queue_iso_buffer_fill(ctx, packet, buffer, payload); ohci_queue_iso() 1297 at_context_queue_packet(struct context *ctx, struct fw_packet *packet) at_context_queue_packet() argument 1525 handle_local_rom(struct fw_ohci *ohci, struct fw_packet *packet, u32 csr) handle_local_rom() argument 1552 handle_local_lock(struct fw_ohci *ohci, struct fw_packet *packet, u32 csr) handle_local_lock() argument 3201 queue_iso_transmit(struct iso_context *ctx, struct fw_iso_packet *packet, struct fw_iso_buffer *buffer, unsigned long payload) queue_iso_transmit() argument 3305 queue_iso_packet_per_buffer(struct iso_context *ctx, struct fw_iso_packet *packet, struct fw_iso_buffer *buffer, unsigned long payload) queue_iso_packet_per_buffer() argument 3386 queue_iso_buffer_fill(struct iso_context *ctx, struct fw_iso_packet *packet, struct fw_iso_buffer *buffer, unsigned long payload) queue_iso_buffer_fill() argument 3442 ohci_queue_iso(struct fw_iso_context *base, struct fw_iso_packet *packet, struct fw_iso_buffer *buffer, unsigned long payload) ohci_queue_iso() argument
|
H A D | core-transaction.c | 123 * Cancel the packet transmission if it's still queued. That fw_cancel_transaction() 124 * will call the packet transmission callback which cancels fw_cancel_transaction() 128 if (card->driver->cancel_packet(card, &transaction->packet) == 0) fw_cancel_transaction() 132 * If the request packet has already been sent, we need to see fw_cancel_transaction() 177 static void transmit_complete_callback(struct fw_packet *packet, transmit_complete_callback() argument 181 container_of(packet, struct fw_transaction, packet); transmit_complete_callback() 211 static void fw_fill_request(struct fw_packet *packet, int tcode, int tlabel, fw_fill_request() argument 218 packet->header[0] = fw_fill_request() 222 packet->header_length = 4; fw_fill_request() 223 packet->payload = payload; fw_fill_request() 224 packet->payload_length = length; fw_fill_request() 235 packet->header[0] = fw_fill_request() 240 packet->header[1] = fw_fill_request() 242 packet->header[2] = fw_fill_request() 247 packet->header[3] = *(u32 *)payload; fw_fill_request() 248 packet->header_length = 16; fw_fill_request() 249 packet->payload_length = 0; fw_fill_request() 254 packet->header[3] = fw_fill_request() 257 packet->header_length = 16; fw_fill_request() 258 packet->payload = payload; fw_fill_request() 259 packet->payload_length = length; fw_fill_request() 263 packet->header_length = 12; fw_fill_request() 264 packet->payload_length = 0; fw_fill_request() 268 packet->header[3] = fw_fill_request() 271 packet->header_length = 16; fw_fill_request() 272 packet->payload_length = 0; fw_fill_request() 279 packet->speed = speed; fw_fill_request() 280 packet->generation = generation; fw_fill_request() 281 packet->ack = 0; fw_fill_request() 282 packet->payload_mapped = false; fw_fill_request() 303 * fw_send_request() - submit a request packet for transmission 316 * Submit a request packet into the asynchronous request transmission queue. 346 * than when the request packet actually hits the wire. On the other hand, 381 fw_fill_request(&t->packet, tcode, t->tlabel, fw_send_request() 384 t->packet.callback = transmit_complete_callback; fw_send_request() 390 card->driver->send_request(card, &t->packet); fw_send_request() 441 static void transmit_phy_packet_callback(struct fw_packet *packet, transmit_phy_packet_callback() argument 630 static void free_response_callback(struct fw_packet *packet, free_response_callback() argument 635 request = container_of(packet, struct fw_request, response); free_response_callback() 924 /* FIXME: send statically allocated busy packet. */ fw_core_handle_request() 974 * FIXME: sanity check packet, is length correct, does tcodes fw_core_handle_response() 1006 card->driver->cancel_packet(card, &t->packet); fw_core_handle_response()
|
/linux-4.1.27/net/nfc/hci/ |
H A D | hcp.c | 60 struct hcp_packet *packet; nfc_hci_hcp_message_tx() local 83 packet = (struct hcp_packet *)skb->data; nfc_hci_hcp_message_tx() 84 packet->header = pipe; nfc_hci_hcp_message_tx() 87 packet->message.header = HCP_HEADER(type, instruction); nfc_hci_hcp_message_tx() 89 memcpy(packet->message.data, ptr, nfc_hci_hcp_message_tx() 94 memcpy(&packet->message, ptr, data_link_len); nfc_hci_hcp_message_tx() 100 packet->header |= ~NFC_HCI_FRAGMENT; nfc_hci_hcp_message_tx()
|
/linux-4.1.27/include/linux/soc/ti/ |
H A D | knav_dma.h | 21 * PKTDMA descriptor manipulation macros for host packet descriptor 79 * @filt_einfo: Filter extended packet info 91 * @einfo_present: Extended packet info present 95 * @psinfo_at_sop: PS word located at start of packet 96 * @sop_offset: Start of packet offset 100 * @sz_thresh0: RX packet size threshold 0 101 * @sz_thresh1: RX packet size threshold 1 102 * @sz_thresh2: RX packet size threshold 2 134 * struct knav_dma_desc: Host packet descriptor layout 143 * @epib: Extended packet info block
|
/linux-4.1.27/net/ipv4/ |
H A D | xfrm4_input.c | 61 /* If it's a keepalive packet, then just eat it. 62 * If it's an encapsulated packet, then pass it to the 97 /* Check if this is a keepalive packet. If so, eat it. */ xfrm4_udp_encap_rcv() 104 /* Must be an IKE packet.. pass it through */ xfrm4_udp_encap_rcv() 108 /* Check if this is a keepalive packet. If so, eat it. */ xfrm4_udp_encap_rcv() 117 /* Must be an IKE packet.. pass it through */ xfrm4_udp_encap_rcv() 122 /* At this point we are sure that this is an ESPinUDP packet, xfrm4_udp_encap_rcv() 123 * so we need to remove 'len' bytes from the packet (the UDP xfrm4_udp_encap_rcv() 130 /* Now we can update and verify the packet length... */ xfrm4_udp_encap_rcv() 135 /* packet is too small!?! */ xfrm4_udp_encap_rcv()
|
/linux-4.1.27/fs/ecryptfs/ |
H A D | keystore.c | 112 ecryptfs_printk(KERN_ERR, "Five-byte packet length not " ecryptfs_parse_packet_length() 117 ecryptfs_printk(KERN_ERR, "Error parsing packet length\n"); ecryptfs_parse_packet_length() 130 * @packet_size_length: The number of bytes used to encode the packet 151 "Unsupported packet size: [%zd]\n", size); ecryptfs_write_packet_length() 158 char **packet, size_t *packet_len) write_tag_64_packet() 176 *packet = kmalloc(data_len, GFP_KERNEL); write_tag_64_packet() 177 message = *packet; write_tag_64_packet() 187 ecryptfs_printk(KERN_ERR, "Error generating tag 64 packet " write_tag_64_packet() 188 "header; cannot generate packet length\n"); write_tag_64_packet() 198 ecryptfs_printk(KERN_ERR, "Error generating tag 64 packet " write_tag_64_packet() 199 "header; cannot generate packet length\n"); write_tag_64_packet() 250 ecryptfs_printk(KERN_WARNING, "Error parsing packet length; " parse_tag_65_packet() 299 struct ecryptfs_crypt_stat *crypt_stat, char **packet, write_tag_66_packet() 319 *packet = kmalloc(data_len, GFP_KERNEL); write_tag_66_packet() 320 message = *packet; write_tag_66_packet() 330 ecryptfs_printk(KERN_ERR, "Error generating tag 66 packet " write_tag_66_packet() 331 "header; cannot generate packet length\n"); write_tag_66_packet() 341 ecryptfs_printk(KERN_ERR, "Error generating tag 66 packet " write_tag_66_packet() 342 "header; cannot generate packet length\n"); write_tag_66_packet() 400 ecryptfs_printk(KERN_WARNING, "Error parsing packet length; " parse_tag_67_packet() 613 * write_tag_70_packet - Write encrypted filename (EFN) packet against FNEK 618 * filename encryption key (FNEK) and stores it in a packet to @dest, 674 * Octets 1-N1: Tag 70 packet size (includes cipher identifier ecryptfs_write_tag_70_packet() 711 printk(KERN_ERR "%s: Error generating tag 70 packet " ecryptfs_write_tag_70_packet() 712 "header; cannot generate packet length; rc = [%d]\n", ecryptfs_write_tag_70_packet() 898 * parse_tag_70_packet - Parse and process FNEK-encrypted passphrase packet 903 * in the packet parsed 906 * packet 907 * @max_packet_size: The maximum legal size of the packet to be parsed 941 * Octets 1-N1: Tag 70 packet size (includes cipher identifier ecryptfs_parse_tag_70_packet() 949 printk(KERN_WARNING "%s: Invalid packet tag [0x%.2x]; must be " ecryptfs_parse_tag_70_packet() 959 printk(KERN_WARNING "%s: Error parsing packet length; " ecryptfs_parse_tag_70_packet() 967 printk(KERN_WARNING "%s: max_packet_size is [%zd]; real packet " ecryptfs_parse_tag_70_packet() 1073 printk(KERN_WARNING "%s: Invalid tag 70 packet; could not " ecryptfs_parse_tag_70_packet() 1164 ecryptfs_printk(KERN_ERR, "Failed to write tag 64 packet\n"); decrypt_pki_encrypted_session_key() 1175 ecryptfs_printk(KERN_ERR, "Failed to receive tag 65 packet " decrypt_pki_encrypted_session_key() 1183 printk(KERN_ERR "Failed to parse tag 65 packet; rc = [%d]\n", decrypt_pki_encrypted_session_key() 1226 * @crypt_stat: The cryptographic context to modify based on packet contents 1227 * @data: The raw bytes of the packet. 1230 * end of this list for this packet. 1235 * @packet_size: This function writes the size of the parsed packet 1237 * @max_packet_size: The maximum allowable packet size 1256 * packet tag 1 parse_tag_1_packet() 1259 * Max Tag 1 packet size (max 3 bytes) parse_tag_1_packet() 1265 * 12 bytes minimum packet size parse_tag_1_packet() 1268 printk(KERN_ERR "Invalid max packet size; must be >=12\n"); parse_tag_1_packet() 1292 printk(KERN_WARNING "Error parsing packet length; " parse_tag_1_packet() 1323 printk(KERN_WARNING "Tag 1 packet contains key larger " parse_tag_1_packet() 1357 * @crypt_stat: The cryptographic context to modify based on packet 1359 * @data: The raw bytes of the packet. 1362 * of this list for this packet. 1367 * @packet_size: This function writes the size of the parsed packet 1388 * packet tag 3 parse_tag_3_packet() 1391 * Max Tag 3 packet size (max 3 bytes) parse_tag_3_packet() 1400 * (ECRYPTFS_SALT_SIZE + 7) minimum packet size parse_tag_3_packet() 1403 printk(KERN_ERR "Max packet size too large\n"); parse_tag_3_packet() 1408 printk(KERN_ERR "First byte != 0x%.2x; invalid packet\n", parse_tag_3_packet() 1426 printk(KERN_WARNING "Error parsing packet length; rc = [%d]\n", parse_tag_3_packet() 1445 printk(KERN_WARNING "Tag 3 packet contains key larger " parse_tag_3_packet() 1533 * @data: The raw bytes of the packet 1535 * packet into this memory location 1541 * @packet_size: This function writes the size of the parsed packet 1559 * packet tag 11 parse_tag_11_packet() 1562 * Max Tag 11 packet size (max 3 bytes) parse_tag_11_packet() 1569 * We need at least 16 bytes of data for the packet to even be parse_tag_11_packet() 1573 printk(KERN_ERR "Maximum packet size too small\n"); parse_tag_11_packet() 1578 printk(KERN_WARNING "Invalid tag 11 packet format\n"); parse_tag_11_packet() 1585 printk(KERN_WARNING "Invalid tag 11 packet format\n"); parse_tag_11_packet() 1601 printk(KERN_ERR "Literal data section in tag 11 packet exceeds " parse_tag_11_packet() 1607 printk(KERN_WARNING "Unrecognizable packet\n"); parse_tag_11_packet() 1612 printk(KERN_WARNING "Unrecognizable packet\n"); parse_tag_11_packet() 1748 * @ecryptfs_dentry: The eCryptfs dentry associated with the packet set 1792 "tag 3 packet\n"); ecryptfs_parse_packet_set() 1806 "packet containing " ecryptfs_parse_packet_set() 1809 "tag 3 packet\n"); ecryptfs_parse_packet_set() 1836 "tag 1 packet\n"); ecryptfs_parse_packet_set() 1844 ecryptfs_printk(KERN_WARNING, "Invalid packet set " ecryptfs_parse_packet_set() 1849 ecryptfs_printk(KERN_DEBUG, "No packet at offset [%zd] " ecryptfs_parse_packet_set() 1984 ecryptfs_printk(KERN_ERR, "Error generating tag 66 packet\n"); pki_encrypt_session_key() 1995 ecryptfs_printk(KERN_ERR, "Failed to receive tag 67 packet " pki_encrypt_session_key() 2002 ecryptfs_printk(KERN_ERR, "Error parsing tag 67 packet\n"); pki_encrypt_session_key() 2009 * write_tag_1_packet - Write an RFC2440-compatible tag 1 (public key) packet 2010 * @dest: Buffer into which to write the packet 2014 * @auth_tok: The authentication token used for generating the tag 1 packet 2016 * @key_rec: The key record struct for the tag 1 packet 2018 * up constituting the packet; set to zero on error 2065 * packet tag 1 */ write_tag_1_packet() 2067 + 3 /* Max Tag 1 packet size */ write_tag_1_packet() 2084 ecryptfs_printk(KERN_ERR, "Error generating tag 1 packet " write_tag_1_packet() 2085 "header; cannot generate packet length\n"); write_tag_1_packet() 2106 * @dest: Target into which Tag 11 packet is to be written 2107 * @remaining_bytes: Maximum packet length 2110 * @packet_length: Length of the Tag 11 packet written; zero on error 2124 * packet tag 11 */ write_tag_11_packet() 2126 + 3 /* Max Tag 11 packet size */ write_tag_11_packet() 2144 printk(KERN_ERR "Error generating tag 11 packet header; cannot " write_tag_11_packet() 2145 "generate packet length. rc = [%d]\n", rc); write_tag_11_packet() 2167 * @dest: Buffer into which to write the packet 2173 * up constituting the packet; set to zero on error 2314 * packet tag 3 */ write_tag_3_packet() 2316 + 3 /* Max Tag 3 packet size */ write_tag_3_packet() 2332 /* Chop off the Tag 3 identifier(1) and Tag 3 packet size(3) write_tag_3_packet() 2333 * to get the number of octets in the actual Tag 3 packet */ write_tag_3_packet() 2338 printk(KERN_ERR "Error generating tag 3 packet header; cannot " write_tag_3_packet() 2339 "generate packet length. rc = [%d]\n", rc); write_tag_3_packet() 2384 * Generates a key packet set and writes it to the virtual address 2434 "writing tag 3 packet\n"); ecryptfs_generate_key_packet_set() 2438 /* Write auth tok signature packet */ ecryptfs_generate_key_packet_set() 2444 "auth tok signature packet\n"); ecryptfs_generate_key_packet_set() 2454 "writing tag 1 packet\n"); ecryptfs_generate_key_packet_set() 157 write_tag_64_packet(char *signature, struct ecryptfs_session_key *session_key, char **packet, size_t *packet_len) write_tag_64_packet() argument 298 write_tag_66_packet(char *signature, u8 cipher_code, struct ecryptfs_crypt_stat *crypt_stat, char **packet, size_t *packet_len) write_tag_66_packet() argument
|
H A D | miscdev.c | 192 * miscdevfs packet format: 198 * Octets 5-N1 not written if the packet type does not include a message 205 /* 4 + ECRYPTFS_MAX_ENCRYPTED_KEY_BYTES comes from tag 65 packet format */ 282 printk(KERN_WARNING "%s: Error writing packet length; " ecryptfs_miscdev_read() 334 * @seq: Sequence number for miscdev response packet 346 "[%zd]; data_size = [%zd]. Invalid packet.\n", __func__, ecryptfs_miscdev_response() 382 /* Likely a harmless MSG_HELO or MSG_QUIT - no packet length */ ecryptfs_miscdev_write() 385 printk(KERN_WARNING "%s: Acceptable packet size range is " ecryptfs_miscdev_write() 393 printk(KERN_WARNING "%s: Error while inspecting packet size\n", ecryptfs_miscdev_write() 401 printk(KERN_WARNING "%s: Error parsing packet length; " ecryptfs_miscdev_write() 408 printk(KERN_WARNING "%s: Invalid packet size [%zu]\n", __func__, ecryptfs_miscdev_write() 424 printk(KERN_WARNING "%s: Minimum acceptable packet " ecryptfs_miscdev_write() 426 "only [%zd]. Discarding response packet.\n", ecryptfs_miscdev_write()
|
/linux-4.1.27/tools/firewire/ |
H A D | nosy-dump.c | 47 static void decode_link_packet(struct link_packet *packet, size_t length, 53 static char *option_view = "packet"; 81 .descrip = "Specify view of bus traffic: packet, transaction or stats.", 89 .descrip = "Print each packet in hex.", 108 .descrip = "Verbose packet view.", 152 sa = malloc(sizeof *sa - sizeof sa->packet + length); subaction_create() 157 memcpy(&sa->packet, data, length); subaction_create() 243 decode_link_packet(&t->request->packet, t->request->length, handle_transaction() 246 decode_link_packet(&t->response->packet, t->request->length, handle_transaction() 253 print_packet((uint32_t *) &sa->packet, sa->length); handle_transaction() 255 print_packet((uint32_t *) &sa->packet, sa->length); handle_transaction() 328 /* negative means from end of packet. */ 519 if (prev->packet.common.tcode != sa->packet.common.tcode || handle_request_packet() 520 prev->packet.common.tlabel != sa->packet.common.tlabel) { handle_request_packet() 585 if (prev->packet.common.tcode != sa->packet.common.tcode || handle_response_packet() 586 prev->packet.common.tlabel != sa->packet.common.tlabel) { handle_response_packet() 599 if (packet_info[prev->packet.common.tcode].response_tcode != handle_response_packet() 600 sa->packet.common.tcode) { handle_response_packet() 657 get_bits(struct link_packet *packet, int offset, int width) get_bits() argument 659 uint32_t *data = (uint32_t *) packet; get_bits() 697 decode_link_packet(struct link_packet *packet, size_t length, decode_link_packet() argument 704 pi = &packet_info[packet->common.tcode]; decode_link_packet() 723 bits = get_bits(packet, offset, f->width); decode_link_packet() 727 dump_data((unsigned char *) packet + (offset / 8 + 4), data_length); decode_link_packet() 738 bits = get_bits(packet, offset, high_width); decode_link_packet() 740 get_bits(packet, offset + high_width, low_width); decode_link_packet() 742 bits = get_bits(packet, offset, f->width); decode_link_packet() 766 printf("short packet: "); print_packet() 774 /* phy packet are 3 quadlets: the 1 quadlet payload, print_packet() 792 printf("link-on packet, phy_id=%02x", pp->link_on.phy_id); print_packet() 813 printf("unknown phy packet: "); print_packet() 820 struct link_packet *packet = (struct link_packet *) data; print_packet() local 822 decode_link_packet(packet, length, 0, print_packet() 855 struct link_packet *packet = (struct link_packet *) data; print_stats() local 856 tcode_count[packet->common.tcode]++; print_stats()
|
H A D | decode-fcp.c | 49 /* negative means from end of packet. */ 147 (struct avc_frame *) t->request->packet.write_block.data; decode_avc() 176 (struct avc_frame *) t->request->packet.write_block.data; decode_fcp() 178 ((unsigned long long) t->request->packet.common.offset_high << 32) | decode_fcp() 179 t->request->packet.common.offset_low; decode_fcp() 181 if (t->request->packet.common.tcode != TCODE_WRITE_BLOCK_REQUEST) decode_fcp()
|
/linux-4.1.27/drivers/net/wireless/mwifiex/ |
H A D | uap_txrx.c | 28 * packet threshold and then deletes packet from this RA list. 107 "Tx: Bridge packet limit reached. Drop packet!\n"); mwifiex_uap_queue_bridged_pkt() 183 /* Update bridge packet statistics as the mwifiex_uap_queue_bridged_pkt() 184 * packet is not going to kernel/upper layer. mwifiex_uap_queue_bridged_pkt() 189 /* Sending bridge packet to TX queue, so save the packet mwifiex_uap_queue_bridged_pkt() 204 * This function contains logic for AP packet forwarding. 206 * If a packet is multicast/broadcast, it is sent to kernel/upper layer 209 * If a packet is unicast and RA is present in associated station list, 211 * If a packet is unicast and RA is not in associated station list, 212 * packet is forwarded to kernel to handle routing logic. 226 /* don't do packet forwarding in disconnected state */ mwifiex_handle_uap_rx_forward() 228 dev_err(adapter->dev, "drop packet in disconnected state.\n"); mwifiex_handle_uap_rx_forward() 240 /* Requeue Intra-BSS packet */ mwifiex_handle_uap_rx_forward() 251 * This function processes the packet received on AP interface. 254 * received buffer to ensure its a valid packet before processing it 255 * further. If the packet is determined to be aggregated, it is 256 * de-aggregated accordingly. Then skb is passed to AP packet forwarding logic. 279 "wrong rx packet: len=%d, offset=%d, length=%d\n", mwifiex_process_uap_rx_packet() 290 dev_err(adapter->dev, "Rx of mgmt packet failed"); mwifiex_process_uap_rx_packet() 339 * - Tx packet length and offset 357 dev_err(adapter->dev, "Tx: bad packet length: %d\n", skb->len); mwifiex_process_uap_txpd() 398 /* Set the packet type and add header for management frame */ mwifiex_process_uap_txpd()
|
H A D | sta_rx.c | 71 * This function processes the received packet and forwards it 74 * This function parses through the received packet and determines 75 * if it is a debug packet or normal packet. 78 * header bytes, reconstructs the packet as an ethernet frame or 169 dev_err(priv->adapter->dev, "recv packet failed\n"); mwifiex_process_rx_packet() 178 * received buffer to ensure its a valid packet, before processing it 179 * further. If the packet is determined to be aggregated, it is 207 "wrong rx packet: len=%d, rx_pkt_offset=%d, rx_pkt_length=%d\n", mwifiex_process_sta_rx_packet() 217 dev_err(adapter->dev, "Rx of mgmt packet failed"); mwifiex_process_sta_rx_packet() 223 * If the packet is not an unicast packet then send the packet mwifiex_process_sta_rx_packet()
|
/linux-4.1.27/arch/alpha/kernel/ |
H A D | err_ev7.c | 66 "IN LOGOUT FRAME (packet %d\n", ev7_collect_logout_frame_subpackets() 236 struct ev7_pal_subpacket *packet; ev7_process_pal_subpacket() local 245 packet = (struct ev7_pal_subpacket *)header->by_type.raw.data_start; ev7_process_pal_subpacket() 251 packet->by_type.logout.whami, ev7_process_pal_subpacket() 252 packet->by_type.logout.rbox_whami); ev7_process_pal_subpacket() 253 el_print_timestamp(&packet->by_type.logout.timestamp); ev7_process_pal_subpacket() 257 packet->by_type.logout.exc_addr, ev7_process_pal_subpacket() 258 packet->by_type.logout.halt_code); ev7_process_pal_subpacket() 260 packet->by_type.logout.subpacket_count); ev7_process_pal_subpacket()
|
/linux-4.1.27/drivers/media/usb/uvc/ |
H A D | uvc_isight.c | 23 * different packet format. Instead of sending a header at the 25 * single header per image (on its own in a packet), followed by 61 /* Synchronize to the input stream by waiting for a header packet. */ isight_decode() 64 uvc_trace(UVC_TRACE_FRAME, "Dropping packet (out of " isight_decode() 114 /* Decode the payload packet. uvc_video_decode_isight() 117 * reliably detected when the first packet of the new frame uvc_video_decode_isight()
|
/linux-4.1.27/arch/alpha/include/asm/ |
H A D | err_ev7.h | 5 * Data for el packet class PAL (14), type LOGOUT_FRAME (1) 20 * Data for el packet class PAL (14), type EV7_PROCESSOR (4) 51 * Data for el packet class PAL (14), type EV7_ZBOX (5) 84 * Data for el packet class PAL (14), type EV7_RBOX (6) 107 * Data for el packet class PAL (14), type EV7_IO (7) 172 * Data for generic el packet class PAL.
|
/linux-4.1.27/drivers/net/ethernet/amd/xgbe/ |
H A D | xgbe-drv.c | 1123 /* PTP v2, UDP, any kind of event packet */ xgbe_set_hwtstamp_settings() 1126 /* PTP v1, UDP, any kind of event packet */ xgbe_set_hwtstamp_settings() 1134 /* PTP v2, UDP, Sync packet */ xgbe_set_hwtstamp_settings() 1137 /* PTP v1, UDP, Sync packet */ xgbe_set_hwtstamp_settings() 1145 /* PTP v2, UDP, Delay_req packet */ xgbe_set_hwtstamp_settings() 1148 /* PTP v1, UDP, Delay_req packet */ xgbe_set_hwtstamp_settings() 1157 /* 802.AS1, Ethernet, any kind of event packet */ xgbe_set_hwtstamp_settings() 1164 /* 802.AS1, Ethernet, Sync packet */ xgbe_set_hwtstamp_settings() 1171 /* 802.AS1, Ethernet, Delay_req packet */ xgbe_set_hwtstamp_settings() 1179 /* PTP v2/802.AS1, any layer, any kind of event packet */ xgbe_set_hwtstamp_settings() 1189 /* PTP v2/802.AS1, any layer, Sync packet */ xgbe_set_hwtstamp_settings() 1199 /* PTP v2/802.AS1, any layer, Delay_req packet */ xgbe_set_hwtstamp_settings() 1223 struct xgbe_packet_data *packet) xgbe_prep_tx_tstamp() 1227 if (XGMAC_GET_BITS(packet->attributes, TX_PACKET_ATTRIBUTES, PTP)) { xgbe_prep_tx_tstamp() 1231 XGMAC_SET_BITS(packet->attributes, xgbe_prep_tx_tstamp() 1240 if (!XGMAC_GET_BITS(packet->attributes, TX_PACKET_ATTRIBUTES, PTP)) xgbe_prep_tx_tstamp() 1244 static void xgbe_prep_vlan(struct sk_buff *skb, struct xgbe_packet_data *packet) xgbe_prep_vlan() argument 1247 packet->vlan_ctag = skb_vlan_tag_get(skb); xgbe_prep_vlan() 1250 static int xgbe_prep_tso(struct sk_buff *skb, struct xgbe_packet_data *packet) xgbe_prep_tso() argument 1254 if (!XGMAC_GET_BITS(packet->attributes, TX_PACKET_ATTRIBUTES, xgbe_prep_tso() 1262 packet->header_len = skb_transport_offset(skb) + tcp_hdrlen(skb); xgbe_prep_tso() 1263 packet->tcp_header_len = tcp_hdrlen(skb); xgbe_prep_tso() 1264 packet->tcp_payload_len = skb->len - packet->header_len; xgbe_prep_tso() 1265 packet->mss = skb_shinfo(skb)->gso_size; xgbe_prep_tso() 1266 DBGPR(" packet->header_len=%u\n", packet->header_len); xgbe_prep_tso() 1267 DBGPR(" packet->tcp_header_len=%u, packet->tcp_payload_len=%u\n", xgbe_prep_tso() 1268 packet->tcp_header_len, packet->tcp_payload_len); xgbe_prep_tso() 1269 DBGPR(" packet->mss=%u\n", packet->mss); xgbe_prep_tso() 1272 * along with the extra bytes for each extra packet xgbe_prep_tso() 1274 packet->tx_packets = skb_shinfo(skb)->gso_segs; xgbe_prep_tso() 1275 packet->tx_bytes += (packet->tx_packets - 1) * packet->header_len; xgbe_prep_tso() 1288 DBGPR(" TSO packet to be processed\n"); xgbe_is_tso() 1295 struct xgbe_packet_data *packet) xgbe_packet_info() 1302 packet->skb = skb; xgbe_packet_info() 1305 packet->rdesc_count = 0; xgbe_packet_info() 1307 packet->tx_packets = 1; xgbe_packet_info() 1308 packet->tx_bytes = skb->len; xgbe_packet_info() 1314 packet->rdesc_count++; xgbe_packet_info() 1318 packet->rdesc_count++; xgbe_packet_info() 1320 XGMAC_SET_BITS(packet->attributes, TX_PACKET_ATTRIBUTES, xgbe_packet_info() 1322 XGMAC_SET_BITS(packet->attributes, TX_PACKET_ATTRIBUTES, xgbe_packet_info() 1325 XGMAC_SET_BITS(packet->attributes, TX_PACKET_ATTRIBUTES, xgbe_packet_info() 1334 packet->rdesc_count++; xgbe_packet_info() 1337 XGMAC_SET_BITS(packet->attributes, TX_PACKET_ATTRIBUTES, xgbe_packet_info() 1343 XGMAC_SET_BITS(packet->attributes, TX_PACKET_ATTRIBUTES, xgbe_packet_info() 1347 packet->rdesc_count++; xgbe_packet_info() 1354 packet->rdesc_count++; xgbe_packet_info() 1467 struct xgbe_packet_data *packet; xgbe_xmit() local 1476 packet = &ring->packet_data; xgbe_xmit() 1486 /* Calculate preliminary packet info */ xgbe_xmit() 1487 memset(packet, 0, sizeof(*packet)); xgbe_xmit() 1488 xgbe_packet_info(pdata, ring, skb, packet); xgbe_xmit() 1491 ret = xgbe_maybe_stop_tx_queue(channel, ring, packet->rdesc_count); xgbe_xmit() 1495 ret = xgbe_prep_tso(skb, packet); xgbe_xmit() 1497 netdev_err(netdev, "error processing TSO packet\n"); xgbe_xmit() 1501 xgbe_prep_vlan(skb, packet); xgbe_xmit() 1508 xgbe_prep_tx_tstamp(pdata, skb, packet); xgbe_xmit() 1511 netdev_tx_sent_queue(txq, packet->tx_bytes); xgbe_xmit() 1828 u8 *packet; xgbe_create_skb() local 1835 packet = page_address(rdata->rx.hdr.pa.pages) + xgbe_create_skb() 1839 skb_copy_to_linear_data(skb, packet, copy_len); xgbe_create_skb() 1919 struct xgbe_packet_data *packet; xgbe_rx_poll() local 1938 packet = &ring->packet_data; xgbe_rx_poll() 1950 memset(packet, 0, sizeof(*packet)); xgbe_rx_poll() 1970 incomplete = XGMAC_GET_BITS(packet->attributes, xgbe_rx_poll() 1973 context_next = XGMAC_GET_BITS(packet->attributes, xgbe_rx_poll() 1976 context = XGMAC_GET_BITS(packet->attributes, xgbe_rx_poll() 1984 if (error || packet->errors) { xgbe_rx_poll() 1985 if (packet->errors) xgbe_rx_poll() 1986 DBGPR("Error in received packet\n"); xgbe_rx_poll() 2036 DBGPR("packet length exceeds configured MTU\n"); xgbe_rx_poll() 2046 if (XGMAC_GET_BITS(packet->attributes, xgbe_rx_poll() 2050 if (XGMAC_GET_BITS(packet->attributes, xgbe_rx_poll() 2053 packet->vlan_ctag); xgbe_rx_poll() 2055 if (XGMAC_GET_BITS(packet->attributes, xgbe_rx_poll() 2060 packet->rx_tstamp); xgbe_rx_poll() 2065 if (XGMAC_GET_BITS(packet->attributes, xgbe_rx_poll() 2067 skb_set_hash(skb, packet->rss_hash, xgbe_rx_poll() 2068 packet->rss_hash_type); xgbe_rx_poll() 2202 netdev_alert(netdev, "%s packet of %d bytes\n", xgbe_print_pkt() 1221 xgbe_prep_tx_tstamp(struct xgbe_prv_data *pdata, struct sk_buff *skb, struct xgbe_packet_data *packet) xgbe_prep_tx_tstamp() argument 1293 xgbe_packet_info(struct xgbe_prv_data *pdata, struct xgbe_ring *ring, struct sk_buff *skb, struct xgbe_packet_data *packet) xgbe_packet_info() argument
|
H A D | xgbe-desc.c | 492 struct xgbe_packet_data *packet; xgbe_map_tx_skb() local 505 packet = &ring->packet_data; xgbe_map_tx_skb() 506 packet->rdesc_count = 0; xgbe_map_tx_skb() 507 packet->length = 0; xgbe_map_tx_skb() 509 tso = XGMAC_GET_BITS(packet->attributes, TX_PACKET_ATTRIBUTES, xgbe_map_tx_skb() 511 vlan = XGMAC_GET_BITS(packet->attributes, TX_PACKET_ATTRIBUTES, xgbe_map_tx_skb() 515 if ((tso && (packet->mss != ring->tx.cur_mss)) || xgbe_map_tx_skb() 516 (vlan && (packet->vlan_ctag != ring->tx.cur_vlan_ctag))) xgbe_map_tx_skb() 521 DBGPR(" TSO packet\n"); xgbe_map_tx_skb() 525 packet->header_len, DMA_TO_DEVICE); xgbe_map_tx_skb() 531 rdata->skb_dma_len = packet->header_len; xgbe_map_tx_skb() 533 offset = packet->header_len; xgbe_map_tx_skb() 535 packet->length += packet->header_len; xgbe_map_tx_skb() 541 /* Map the (remainder of the) packet */ xgbe_map_tx_skb() 559 packet->length += len; xgbe_map_tx_skb() 591 packet->length += len; xgbe_map_tx_skb() 606 packet->rdesc_count = cur_index - start_index; xgbe_map_tx_skb() 608 DBGPR("<--xgbe_map_tx_skb: count=%u\n", packet->rdesc_count); xgbe_map_tx_skb() 610 return packet->rdesc_count; xgbe_map_tx_skb()
|
/linux-4.1.27/include/linux/netfilter/ |
H A D | nf_conntrack_tcp.h | 20 u_int8_t last_dir; /* Direction of the last packet (enum ip_conntrack_dir) */ 22 u_int8_t last_index; /* Index of the last packet */
|
H A D | nf_conntrack_ftp.h | 24 /* For NAT to hook in when we find a packet which describes what other
|
/linux-4.1.27/arch/c6x/include/asm/ |
H A D | traps.h | 24 #define EXCEPT_CAUSE_EPX (1 << 2) /* execute packet exception */ 25 #define EXCEPT_CAUSE_FPX (1 << 1) /* fetch packet exception */
|
/linux-4.1.27/net/dccp/ccids/lib/ |
H A D | packet_history.h | 47 * @stamp: send time of packet with sequence number @seqno 69 /* Number of packets to wait after a missing packet (RFC 4342, 6.1) */ 73 * tfrc_rx_hist_entry - Store information about a single received packet 74 * @tfrchrx_seqno: DCCP packet sequence number 75 * @tfrchrx_ccval: window counter value of packet (RFC 4342, 8.1) 76 * @tfrchrx_ndp: the NDP count (if any) of the packet 77 * @tfrchrx_tstamp: actual receive time of packet 136 /* indicate whether previously a packet was detected missing */ tfrc_rx_hist_loss_pending()
|
/linux-4.1.27/drivers/net/ethernet/adi/ |
H A D | bfin_mac.h | 21 * enabled. Otherwize, corrupted RX packet will be sent up stack 51 /* use two descriptors for a packet */ 60 /* use two descriptors for a packet */ 66 unsigned char packet[1560]; member in struct:net_dma_desc_tx
|
/linux-4.1.27/net/netfilter/ |
H A D | xt_TRACE.c | 8 MODULE_DESCRIPTION("Xtables: packet flow tracing");
|
H A D | nf_nat_ftp.c | 57 /* So, this packet has hit the connection tracking matching code. 76 /* Connection will come from wherever this packet goes, hence !dir */ nf_nat_ftp() 81 /* When you see the packet, we need to NAT it the same as the nf_nat_ftp() 118 nf_ct_helper_log(skb, ct, "cannot mangle packet"); nf_nat_ftp()
|
H A D | xt_CONNSECMARK.c | 33 * If the packet has a security mark and the connection does not, copy 34 * the security mark from the packet to the connection. 51 * If packet has no security mark, and the connection does, restore the 52 * security mark from the connection to the packet.
|
/linux-4.1.27/sound/firewire/ |
H A D | packets-buffer.h | 10 * @packets: an array, with each element pointing to one packet
|
H A D | amdtp.h | 12 * @CIP_NONBLOCKING: In non-blocking mode, each packet contains 16 * @CIP_BLOCKING: In blocking mode, each packet contains either zero or 22 * @CIP_DBC_IS_END_EVENT: Only for in-stream. The value of dbc in an in-packet 23 * corresponds to the end of event in the packet. Out of IEC 61883. 29 * packet is not continuous from an initial value. 31 * packet is wrong but the others are correct. 57 * Format Dependent Field (FDF) of AMDTP packet header. In IEC 61883-6:2002, 92 * AMDTP packet can include channels for MIDI conformant data. 156 /* quirk: indicate the value of dbc field in a first packet. */ 205 * If this function returns true, the stream's packet queue has stopped due to
|
H A D | packets-buffer.c | 18 * @packet_size: the (maximum) size of a packet, in bytes 67 * iso_packets_buffer_destroy - frees packet buffer resources
|
/linux-4.1.27/drivers/net/wireless/ti/wl1251/ |
H A D | tx.h | 37 * and alternates between these two buffers on a per packet basis. 40 * 802.3 packet - maximum size Ethernet packet + header + descriptor. 50 * 3. Copy the packet (preceded by double_buffer_desc), if possible. 60 * 2. For each packet with a Tx Complete field set, the firmware adds the 64 * host to process the new data. Note: interrupt will be send per packet if 106 /* 2 bytes padding before packet header */ 136 /* Time in us that a packet can spend in the target */ 139 /* index of the TX queue used for this packet */ 142 /* Used to identify a packet */ 148 * The FW should cut the packet into fragments 183 * packet, including all retries and overheads.
|
H A D | rx.h | 35 * buffer is available and alternates between them on a per packet basis. 37 * 802.3 packet. 39 * 1) The target generates an interrupt each time a new packet is received. 41 * 2) The host reads the received packet from one of the double buffers. 43 * 4) The target prepares the next RX packet.
|
/linux-4.1.27/drivers/usb/serial/ |
H A D | garmin_gps.c | 59 #define EINVPKT 1000 /* invalid packet structure */ 62 /* size of the header of a packet using the usb protocol */ 65 /* max. possible size of a packet using the serial protocol */ 68 /* max. possible size of a packet with worst case stuffing */ 71 /* size of a buffer able to hold a complete (no stuffing) packet 73 * size, but in theory a packet may be 64k+12 bytes - if in 74 * later protocol versions larger packet sizes occur, this value 76 * large enough the store a complete packet inclusive header) */ 79 /* size of a buffer able to hold a complete (incl. stuffing) packet */ 82 /* where to place the packet id of a serial packet, so we can 83 * prepend the usb-packet header without the need to move the 100 /* packet ids used in private layer */ 235 * check if the usb-packet in buf contains an abort-transfer command. 263 * packet queue handling 267 * queue a received (usb-)packet for later processing 300 the device, convert and send the next packet to tty. */ pkt_add() 308 /* get the next pending packet */ pkt_pop() 344 /* send an ack packet back to the tty */ gsp_send_ack() 382 * called for a complete packet received from tty layer 384 * the complete packet (pktid ... cksum) is in garmin_data_p->inbuf starting 388 * the usb header: GSP_INITIAL_OFFSET + number of bytes in packet 456 * buf contains the data read, it may span more than one packet or even 462 * Once the record is complete, convert into a usb packet and send it 465 * If the input is an ack, just send the last queued packet to the 483 * new packet gsp_receive() 519 /* packet complete */ gsp_receive() 525 dev_dbg(dev, "ACK packet complete.\n"); gsp_receive() 528 dev_dbg(dev, "NAK packet complete.\n"); gsp_receive() 530 dev_dbg(dev, "packet complete - id=0x%X.\n", gsp_receive() 552 dev_dbg(dev, "%s - packet too large.\n", __func__); gsp_receive() 588 * Sends a usb packet to the tty 590 * Assumes, that all packages and at an usb-packet boundary. 592 * return <0 on error, 0 if packet is incomplete or > 0 if packet was sent 611 dev_dbg(dev, "packet too large\n"); gsp_send() 632 /* garmin_data_p->outbuffer now contains a complete packet */ gsp_send() 640 dev_dbg(dev, "not an application packet (%d)\n", gsp_send() 646 dev_dbg(dev, "packet-id %d too large\n", pktid); gsp_send() 651 dev_dbg(dev, "packet-size %d too large\n", datalen); gsp_send() 655 /* the serial protocol should be able to handle this packet */ gsp_send() 710 * Process the next pending data packet - if there is one 739 * The input data is expected to be in garmin usb-packet format. 741 * buf contains the data read, it may span more than one packet 762 /* seems to be an invalid packet, ignore rest nat_receive() 765 "%s - packet size too large: %d\n", nat_receive() 783 /* do we have a complete packet ? */ nat_receive() 1377 /* send the next queued packet to the tty port */ timeout_handler()
|
H A D | ssu100.c | 504 char *packet = (char *)urb->transfer_buffer; ssu100_process_read_urb() local 511 (packet[0] == 0x1b) && (packet[1] == 0x1b) && ssu100_process_read_urb() 512 ((packet[2] == 0x00) || (packet[2] == 0x01))) { ssu100_process_read_urb() 513 if (packet[2] == 0x00) ssu100_process_read_urb() 514 ssu100_update_lsr(port, packet[3], &flag); ssu100_process_read_urb() 515 if (packet[2] == 0x01) ssu100_process_read_urb() 516 ssu100_update_msr(port, packet[3]); ssu100_process_read_urb() 519 ch = packet + 4; ssu100_process_read_urb() 521 ch = packet; ssu100_process_read_urb()
|
/linux-4.1.27/arch/arm/mach-pxa/include/mach/ |
H A D | pxa25x-udc.h | 23 #define UDCCS0_OPR (1 << 0) /* OUT packet ready */ 24 #define UDCCS0_IPR (1 << 1) /* IN packet ready */ 38 #define UDCCS_BI_TPC (1 << 1) /* Transmit packet complete */ 43 #define UDCCS_BI_TSP (1 << 7) /* Transmit short packet */ 51 #define UDCCS_BO_RPC (1 << 1) /* Receive packet complete */ 56 #define UDCCS_BO_RSP (1 << 7) /* Receive short packet */ 64 #define UDCCS_II_TPC (1 << 1) /* Transmit packet complete */ 67 #define UDCCS_II_TSP (1 << 7) /* Transmit short packet */ 75 #define UDCCS_IO_RPC (1 << 1) /* Receive packet complete */ 79 #define UDCCS_IO_RSP (1 << 7) /* Receive short packet */ 87 #define UDCCS_INT_TPC (1 << 1) /* Transmit packet complete */ 92 #define UDCCS_INT_TSP (1 << 7) /* Transmit short packet */
|
/linux-4.1.27/drivers/net/ethernet/atheros/atlx/ |
H A D | atl2.h | 143 #define REG_TX_CUT_THRESH 0x1590 /* TxMac begin transmit packet 184 * packet */ 230 /* The size (in bytes) of a ethernet packet */ 255 unsigned ok:1; /* current packet transmitted without error */ 256 unsigned bcast:1; /* broadcast packet */ 257 unsigned mcast:1; /* multicast packet */ 260 unsigned defer:1; /* current packet is xmitted with defer */ 266 unsigned underun:1; /* current packet is aborted 302 unsigned pkt_size:11; /* packet size, max 2047 bytes */ 304 unsigned ok:1; /* current packet received ok without error */ 305 unsigned bcast:1; /* current packet is broadcast */ 306 unsigned mcast:1; /* current packet is multicast */ 309 unsigned crc:1; /* received a packet with crc error */ 310 unsigned code:1; /* received a packet with code error */ 311 unsigned runt:1; /* received a packet less than 64 bytes 313 unsigned frag:1; /* received a packet less than 64 bytes 316 unsigned align:1; /* this packet is alignment error */ 317 unsigned vlan:1; /* this packet has vlan */ 357 unsigned char packet[1536-sizeof(struct rx_pkt_status)]; member in struct:rx_desc 388 * packet will be discarded. */ 392 u8 ipgt; /* Desired back to back inter-packet gap. The
|
/linux-4.1.27/drivers/bluetooth/ |
H A D | hci_ll.c | 90 * Builds and sends an HCILL command packet. 102 /* allocate packet */ send_hcill_cmd() 105 BT_ERR("cannot allocate memory for HCILL packet"); send_hcill_cmd() 110 /* prepare packet */ send_hcill_cmd() 114 /* send packet */ send_hcill_cmd() 208 * have simultaneously sent a wake-up-indication packet. ll_device_want_to_wakeup() 270 /* actually send the sleep ack packet */ ll_device_want_to_sleep() 322 BT_DBG("device asleep, waking up and queueing packet"); ll_enqueue() 323 /* save packet for later */ ll_enqueue() 333 BT_DBG("device waking up, queueing packet"); ll_enqueue() 334 /* transient state; just keep packet for later */ ll_enqueue() 338 BT_ERR("illegal hcill state: %ld (losing packet)", ll->hcill_state); ll_enqueue() 433 BT_DBG("Event packet"); ll_recv() 440 BT_DBG("ACL packet"); ll_recv() 447 BT_DBG("SCO packet"); ll_recv() 455 BT_DBG("HCILL_GO_TO_SLEEP_IND packet"); ll_recv() 467 BT_DBG("HCILL_WAKE_UP_IND packet"); ll_recv() 473 BT_DBG("HCILL_WAKE_UP_ACK packet"); ll_recv() 479 BT_ERR("Unknown HCI packet type %2.2x", (__u8)*ptr); ll_recv() 487 /* Allocate packet */ ll_recv() 490 BT_ERR("Can't allocate mem for new packet"); ll_recv()
|
/linux-4.1.27/drivers/gpu/drm/ |
H A D | drm_mipi_dsi.c | 249 * mipi_dsi_packet_format_is_short - check if a packet is of the short format 250 * @type: MIPI DSI data type of the packet 252 * Return: true if the packet for the given data type is a short packet, false 285 * mipi_dsi_packet_format_is_long - check if a packet is of the long format 286 * @type: MIPI DSI data type of the packet 288 * Return: true if the packet for the given data type is a long packet, false 316 * mipi_dsi_create_packet - create a packet from a message according to the 318 * @packet: pointer to a DSI packet structure 319 * @msg: message to translate into a packet 323 int mipi_dsi_create_packet(struct mipi_dsi_packet *packet, mipi_dsi_create_packet() argument 326 if (!packet || !msg) mipi_dsi_create_packet() 337 memset(packet, 0, sizeof(*packet)); mipi_dsi_create_packet() 338 packet->header[0] = ((msg->channel & 0x3) << 6) | (msg->type & 0x3f); mipi_dsi_create_packet() 350 packet->header[1] = (msg->tx_len >> 0) & 0xff; mipi_dsi_create_packet() 351 packet->header[2] = (msg->tx_len >> 8) & 0xff; mipi_dsi_create_packet() 353 packet->payload_length = msg->tx_len; mipi_dsi_create_packet() 354 packet->payload = msg->tx_buf; mipi_dsi_create_packet() 358 packet->header[1] = (msg->tx_len > 0) ? tx[0] : 0; mipi_dsi_create_packet() 359 packet->header[2] = (msg->tx_len > 1) ? tx[1] : 0; mipi_dsi_create_packet() 362 packet->size = sizeof(packet->header) + packet->payload_length; mipi_dsi_create_packet() 370 * the payload in a long packet transmitted from the peripheral back to the 393 * mipi_dsi_generic_write() - transmit data using a generic write packet 436 * mipi_dsi_generic_read() - receive data using a generic read packet 593 * mipi_dsi_dcs_nop() - send DCS nop packet
|
/linux-4.1.27/drivers/input/serio/ |
H A D | hyperv-keyboard.c | 122 * If the host is giving us a bogus packet, hv_kbd_on_receive() 123 * drop the packet (hoping the problem hv_kbd_on_receive() 128 "Illegal protocol response packet (len: %d)\n", hv_kbd_on_receive() 141 * If the host is giving us a bogus packet, hv_kbd_on_receive() 142 * drop the packet (hoping the problem hv_kbd_on_receive() 147 "Illegal keyboard event packet (len: %d)\n", hv_kbd_on_receive() 204 * We have a packet that has "inband" data. The API used hv_kbd_handle_received_packet() 205 * for retrieving the packet guarantees that the complete hv_kbd_handle_received_packet() 206 * packet is read. So, minimally, we should be able to hv_kbd_handle_received_packet() 216 * host is not to be trusted? Simply dropping the packet, I hv_kbd_handle_received_packet() 219 * For now, I will just drop the packet! hv_kbd_handle_received_packet() 225 * Drop the packet and hope hv_kbd_handle_received_packet() 229 "Illegal packet (type: %d, tid: %llx, size: %d)\n", hv_kbd_handle_received_packet() 240 "unhandled packet type %d, tid %llx len %d\n", hv_kbd_handle_received_packet() 275 /* Handle large packet */ hv_kbd_on_channel_callback()
|
/linux-4.1.27/arch/mips/cavium-octeon/executive/ |
H A D | cvmx-helper-npi.c | 56 /* The packet engines didn't exist before pass 2 */ __cvmx_helper_npi_probe() 60 /* The packet engines didn't exist before pass 2 */ __cvmx_helper_npi_probe() 64 * Technically CN30XX, CN31XX, and CN50XX contain packet __cvmx_helper_npi_probe() 79 * Bringup and enable a NPI interface. After this call packet 91 * checking so packet < 64 bytes and jumbo frames don't get __cvmx_helper_npi_enable()
|
/linux-4.1.27/drivers/net/arcnet/ |
H A D | capmode.c | 2 * Linux ARCnet driver - "cap mode" packet encapsulation. 4 * application and the driver. After a transmit it sends a packet with protocol 5 * byte 0 back up to the userspace containing the sequence number of the packet 40 /* packet receiver */ rx() 50 BUGMSG(D_DURING, "it's a raw(cap) packet (length=%d)\n", length); rx() 59 BUGMSG(D_NORMAL, "Memory squeeze, dropping packet.\n"); rx() 106 BUGMSG(D_PROTO, "Preparing header for cap packet %x.\n", build_header() 113 * the actual packet sent) build_header() 142 /* hard header is not included in packet length */ prepare_tx() 150 BUGMSG(D_PROTO, "Sending for cap packet %x.\n", prepare_tx() 217 BUGMSG(D_PROTO, "Ackknowledge for cap packet %x.\n", ack_tx()
|
H A D | arc-rawmode.c | 2 * Linux ARCnet driver - "raw mode" packet encapsulation (no soft headers) 87 /* packet receiver */ rx() 96 BUGMSG(D_DURING, "it's a raw packet (length=%d)\n", length); rx() 105 BUGMSG(D_NORMAL, "Memory squeeze, dropping packet.\n"); rx() 146 * the actual packet sent) build_header() 177 length -= ARC_HDR_SIZE; /* hard header is not included in packet length */ prepare_tx()
|
H A D | rfc1201.c | 2 * Linux ARCnet driver - RFC1201 (standard) packet encapsulation 88 * Determine a packet's protocol ID. 133 /* packet receiver */ rx() 144 BUGMSG(D_DURING, "it's an RFC1201 packet (length=%d)\n", length); rx() 153 BUGMSG(D_DURING, "compensating for exception packet\n"); rx() 155 BUGMSG(D_EXTRA, "short RFC1201 exception packet from %02Xh", rx() 171 BUGMSG(D_EXTRA, "aborting assembly (seq=%d) for unsplit packet (splitflag=%d, seq=%d)\n", rx() 183 BUGMSG(D_NORMAL, "Memory squeeze, dropping packet.\n"); rx() 223 BUGMSG(D_NORMAL, "funny-shaped ARP packet. (%Xh, %Xh)\n", rx() 233 } else { /* split packet */ rx() 235 * NOTE: MSDOS ARP packet correction should only need to apply to rx() 238 * My interpretation of the RFC1201 document is that if a packet is rx() 251 BUGMSG(D_RX, "packet is split (splitflag=%d, seq=%d)\n", rx() 264 if (soft->split_flag & 1) { /* first packet in split */ rx() 281 BUGMSG(D_EXTRA, "incoming packet more than 16 segments; dropping. (splitflag=%d)\n", rx() 291 BUGMSG(D_NORMAL, "(split) memory squeeze, dropping packet.\n"); rx() 304 } else { /* not first packet */ rx() 417 * the actual packet sent) build_header() 452 } else if (softlen > MTU) { /* exception packet - add an extra header */ load_pkt() 485 length -= ARC_HDR_SIZE; /* hard header is not included in packet length */ prepare_tx() 488 /* need to do a split packet? */ prepare_tx() 503 /* just load the packet into the buffers and send it off */ prepare_tx() 527 if (!out->segnum) /* first packet; newsoft == soft */ continue_tx()
|
/linux-4.1.27/drivers/media/usb/gspca/ |
H A D | tv8532.c | 33 __u8 packet; member in struct:sd 230 /* CIF - 2 lines/packet */ sd_start() 234 /* CIF - 2 lines/packet */ sd_start() 251 sd->packet = 0; /* ignore the first packets */ sd_start() 262 u8 *data, /* isoc packet */ sd_pkt_scan() 263 int len) /* iso packet length */ sd_pkt_scan() 271 sd->packet = gspca_dev->pixfmt.height / 2; sd_pkt_scan() 273 } else if (sd->packet == 0) sd_pkt_scan() 275 sd->packet--; sd_pkt_scan() 276 if (sd->packet == 0) sd_pkt_scan() 279 /* each packet contains: sd_pkt_scan()
|
/linux-4.1.27/net/openvswitch/ |
H A D | datapath.h | 39 * struct dp_stats_percpu - per-cpu packet processing statistics for a given 51 * up per packet. 62 * struct datapath - datapath for flow-based packet switching 95 * @egress_tun_key: Tunnel information about this packet on egress path. 96 * NULL if the packet is not being tunneled. 97 * @input_vport: The original vport packet came in on. This value is cached 98 * when a packet is received by OVS. 107 * struct dp_upcall - metadata to include with a packet to send to userspace 111 * @portid: Netlink portid to which packet should be sent. If @portid is 0 112 * then no packet is sent and the packet is accounted in the datapath's @n_lost
|
/linux-4.1.27/drivers/infiniband/hw/ipath/ |
H A D | ipath_debug.h | 55 #define __IPATH_PKTDBG 0x80 /* print packet data */ 63 #define __IPATH_EPKTDBG 0x4000 /* print ethernet packet data */ 67 #define __IPATH_IPATHPD 0x80000 /* Ethernet (IPATH) packet dump */ 83 #define __IPATH_PKTDBG 0x0 /* print packet data */ 87 #define __IPATH_EPKTDBG 0x0 /* print ethernet packet data */ 91 #define __IPATH_IPATHPD 0x0 /* Ethernet (IPATH) packet dump on */ 92 #define __IPATH_IPATHTABLE 0x0 /* Ethernet (IPATH) packet dump on */
|
/linux-4.1.27/arch/x86/include/asm/ |
H A D | checksum_64.h | 19 * the last step before putting a checksum into a packet. 79 * @len: length of packet 80 * @proto: ip protocol of packet 105 * @len: length of packet 106 * @proto: ip protocol of packet 166 * @len: length of packet 167 * @proto: protocol of packet
|
/linux-4.1.27/drivers/net/wireless/ti/wlcore/ |
H A D | tx.h | 65 * Number of extra memory blocks to allocate for this packet 66 * in addition to the number of blocks derived from the packet 72 * this packet. Must be equal or greater than the actual 81 * this packet. 95 * this packet. 106 * On wl128x based devices, when TX packets are aggregated, each packet 115 /* Length of packet in words, including descriptor+header+data */ 122 /* Device time (in us) when the packet arrived to the driver */ 126 * packet can be transmitted is: start_time + (1024 * life_time) 133 /* The packet TID value (as User-Priority) */
|
/linux-4.1.27/fs/udf/ |
H A D | partition.c | 119 uint32_t packet; udf_get_pblock_spar15() local 124 packet = (block + offset) & ~(sdata->s_packet_len - 1); udf_get_pblock_spar15() 140 else if (origLoc == packet) udf_get_pblock_spar15() 144 else if (origLoc > packet) udf_get_pblock_spar15() 157 uint32_t packet; udf_relocate_blocks() local 170 packet = (old_block - map->s_partition_root) & udf_relocate_blocks() 201 cpu_to_le32(packet); udf_relocate_blocks() 216 } else if (origLoc == packet) { udf_relocate_blocks() 224 } else if (origLoc > packet) udf_relocate_blocks() 243 cpu_to_le32(packet); udf_relocate_blocks()
|
/linux-4.1.27/drivers/net/ethernet/smsc/ |
H A D | smc9194.c | 10 . 4608 byte packet memory. ( for the 91C92. Others have more ) 142 . 3 for packet dumps, etc. 179 a packet, I will store the skbuff here, until I get the 246 . This is a separate procedure to handle the receipt of a packet, to 252 . relating to a packet is sent. 271 . A rather simple routine to print out a packet for debugging purposes. 279 /* this is called to actually send the packet to the chip */ 283 . to store the packet, I call this routine, which either sends it 285 . packet */ 411 . multicast packet is accepted. Otherwise, it's dropped silently. 454 . Attempt to allocate memory for a packet, if chip-memory is not 460 . o if the saved_skb is not currently null, then drop this packet 462 . o if the saved_skb is null, then replace it with the current packet, 477 /* Well, I want to send the packet.. but I don't know smc_wait_to_send_packet() 483 printk(CARDNAME": Bad Craziness - sent packet while busy.\n" ); smc_wait_to_send_packet() 500 ** 'pages', minus 1 ( since a packet can't ever have 0 pages :) ) smc_wait_to_send_packet() 508 printk(CARDNAME": Far too big packet error.\n"); smc_wait_to_send_packet() 509 /* freeing the packet is a good thing here... but should smc_wait_to_send_packet() 517 /* either way, a packet is waiting now */ smc_wait_to_send_packet() 526 . wait a short amount of time.. if I can send a packet now, I send smc_wait_to_send_packet() 554 /* or YES! I can send the packet now.. */ smc_wait_to_send_packet() 563 . This sends the actual packet to the SMC9xxx chip. 568 . Now, find the packet number that the chip allocated 571 . Dump the packet to chip memory 572 . Check if a last byte is needed ( odd length packet ) 590 PRINTK((CARDNAME": In XMIT with no packet to send\n")); smc_hardware_send_packet() 596 /* If I get here, I _know_ there is a packet slot waiting for me */ smc_hardware_send_packet() 607 /* we have a packet address, so tell the card to use it */ smc_hardware_send_packet() 610 /* point to the beginning of the packet */ smc_hardware_send_packet() 613 PRINTK3((CARDNAME": Trying to xmit packet of length %x\n", length)); smc_hardware_send_packet() 618 /* send the packet length ( +6 for status, length and ctl byte ) smc_hardware_send_packet() 624 /* send the packet length ( +6 for status words, length, and ctl*/ smc_hardware_send_packet() 661 PRINTK2((CARDNAME": Sent packet of length %d\n", length)); smc_hardware_send_packet() 668 /* we can send another packet */ smc_hardware_send_packet() 975 . Interestingly, the DOS packet driver *SETS* the IRQ on the card to smc_probe() 1120 . Called by the kernel to send a packet out into the void 1143 . smc_rcv - receive a packet from the card 1145 . There is ( at least ) a packet waiting to be read from 1150 . o otherwise, read in the packet 1171 /* start reading from the start of the packet */ smc_rcv() 1182 . the packet length contains 3 extra words : smc_rcv() 1188 /* do stuff to make a new packet */ smc_rcv() 1254 /* error or good, tell the card to get rid of this packet */ smc_rcv() 1266 . Save pointer and packet no 1267 . Get the packet no from the top of the queue 1289 /* select this as the packet to read from */ smc_tx() 1292 /* read the first word from this packet */ smc_tx() 1309 netdev_info(dev, CARDNAME": Successful packet caused interrupt\n"); smc_tx() 1315 /* kill the packet */ smc_tx() 1319 /* one less packet waiting for me */ smc_tx() 1382 /* Got a packet(s). */ smc_interrupt()
|
/linux-4.1.27/drivers/net/wireless/libertas/ |
H A D | if_sdio.c | 143 * the image is downloaded, or reads RX packet length when 217 lbs_deb_sdio("response packet too large (%d bytes)\n", if_sdio_handle_cmd() 250 lbs_deb_sdio("response packet too large (%d bytes)\n", if_sdio_handle_data() 295 lbs_deb_sdio("event packet too small (%d bytes)\n", if_sdio_handle_event() 347 lbs_deb_sdio("invalid packet size (%d bytes) from firmware\n", if_sdio_card_to_host() 371 lbs_deb_sdio("packet of type %d and size %d bytes\n", if_sdio_card_to_host() 375 lbs_deb_sdio("packet fragment (%d > %d)\n", if_sdio_card_to_host() 382 lbs_deb_sdio("packet fragment (%d < %d)\n", if_sdio_card_to_host() 411 pr_err("problem fetching packet from firmware\n"); if_sdio_card_to_host() 421 struct if_sdio_packet *packet; if_sdio_host_to_card_worker() local 431 packet = card->packets; if_sdio_host_to_card_worker() 432 if (packet) if_sdio_host_to_card_worker() 433 card->packets = packet->next; if_sdio_host_to_card_worker() 436 if (!packet) if_sdio_host_to_card_worker() 444 packet->buffer, packet->nb); if_sdio_host_to_card_worker() 448 pr_err("error %d sending packet to firmware\n", ret); if_sdio_host_to_card_worker() 452 kfree(packet); if_sdio_host_to_card_worker() 751 * Scratch is also used to store the RX packet length, so we lose if_sdio_prog_firmware() 947 struct if_sdio_packet *packet, *cur; if_sdio_host_to_card() local 967 packet = kzalloc(sizeof(struct if_sdio_packet) + size, if_sdio_host_to_card() 969 if (!packet) { if_sdio_host_to_card() 974 packet->next = NULL; if_sdio_host_to_card() 975 packet->nb = size; if_sdio_host_to_card() 980 packet->buffer[0] = (nb + 4) & 0xff; if_sdio_host_to_card() 981 packet->buffer[1] = ((nb + 4) >> 8) & 0xff; if_sdio_host_to_card() 982 packet->buffer[2] = type; if_sdio_host_to_card() 983 packet->buffer[3] = 0; if_sdio_host_to_card() 985 memcpy(packet->buffer + 4, buf, nb); if_sdio_host_to_card() 990 card->packets = packet; if_sdio_host_to_card() 995 cur->next = packet; if_sdio_host_to_card() 1006 lbs_deb_sdio("unknown packet type %d\n", (int)type); if_sdio_host_to_card() 1188 struct if_sdio_packet *packet; if_sdio_probe() local 1286 packet = card->packets; if_sdio_probe() 1288 kfree(packet); if_sdio_probe() 1299 struct if_sdio_packet *packet; if_sdio_remove() local 1333 packet = card->packets; if_sdio_remove() 1335 kfree(packet); if_sdio_remove()
|
H A D | if_spi.c | 84 struct if_spi_packet *packet; free_if_spi_card() local 87 packet = container_of(cursor, struct if_spi_packet, list); free_if_spi_card() 88 list_del(&packet->list); free_if_spi_card() 89 kfree(packet); free_if_spi_card() 92 packet = container_of(cursor, struct if_spi_packet, list); free_if_spi_card() 93 list_del(&packet->list); free_if_spi_card() 94 kfree(packet); free_if_spi_card() 541 * Returns the length of the next packet the firmware expects us to send. 715 "%s: error: response packet too large: %d bytes, but maximum is %d\n", if_spi_c2h_cmd() 803 struct if_spi_packet *packet, int type) if_spi_h2c() 826 err = spu_write(card, port_reg, packet->buffer, packet->blen); if_spi_h2c() 831 kfree(packet); if_spi_h2c() 867 struct if_spi_packet *packet; if_spi_host_to_card_worker() local 914 packet = NULL; if_spi_host_to_card_worker() 917 packet = (struct if_spi_packet *)(card-> if_spi_host_to_card_worker() 919 list_del(&packet->list); if_spi_host_to_card_worker() 923 if (packet) if_spi_host_to_card_worker() 924 if_spi_h2c(card, packet, MVMS_CMD); if_spi_host_to_card_worker() 928 packet = NULL; if_spi_host_to_card_worker() 931 packet = (struct if_spi_packet *)(card-> if_spi_host_to_card_worker() 933 list_del(&packet->list); if_spi_host_to_card_worker() 937 if (packet) if_spi_host_to_card_worker() 938 if_spi_h2c(card, packet, MVMS_DAT); if_spi_host_to_card_worker() 962 struct if_spi_packet *packet; if_spi_host_to_card() local 974 packet = kzalloc(sizeof(struct if_spi_packet) + blen, GFP_ATOMIC); if_spi_host_to_card() 975 if (!packet) { if_spi_host_to_card() 979 packet->blen = blen; if_spi_host_to_card() 980 memcpy(packet->buffer, buf, nb); if_spi_host_to_card() 981 memset(packet->buffer + nb, 0, blen - nb); if_spi_host_to_card() 987 list_add_tail(&packet->list, &card->cmd_packet_list); if_spi_host_to_card() 993 list_add_tail(&packet->list, &card->data_packet_list); if_spi_host_to_card() 997 kfree(packet); if_spi_host_to_card() 802 if_spi_h2c(struct if_spi_card *card, struct if_spi_packet *packet, int type) if_spi_h2c() argument
|
/linux-4.1.27/drivers/net/ethernet/mellanox/mlx4/ |
H A D | en_selftest.c | 53 unsigned char *packet; mlx4_en_test_loopback_xmit() local 67 packet = (unsigned char *)skb_put(skb, packet_size); mlx4_en_test_loopback_xmit() 72 for (i = 0; i < packet_size; ++i) /* fill our packet */ mlx4_en_test_loopback_xmit() 73 packet[i] = (unsigned char)(i & 0xff); mlx4_en_test_loopback_xmit() 95 en_err(priv, "Transmitting loopback packet failed\n"); mlx4_en_test_loopback() 108 en_err(priv, "Loopback packet didn't arrive\n"); mlx4_en_test_loopback()
|
/linux-4.1.27/drivers/mfd/ |
H A D | cros_ec_i2c.c | 51 * allocate larger packet (one byte for checksum, one byte for cros_ec_cmd_xfer_i2c() 62 * allocate larger packet (one byte for checksum, one for cros_ec_cmd_xfer_i2c() 103 dev_err(ec_dev->dev, "packet too long (%d bytes, expected %d)", cros_ec_cmd_xfer_i2c() 109 /* copy response packet payload and compute checksum */ cros_ec_cmd_xfer_i2c() 115 dev_dbg(ec_dev->dev, "packet: %*ph, sum = %02x\n", cros_ec_cmd_xfer_i2c() 118 dev_err(ec_dev->dev, "bad packet checksum\n"); cros_ec_cmd_xfer_i2c()
|
/linux-4.1.27/drivers/crypto/amcc/ |
H A D | crypto4xx_core.h | 54 used by this packet */ 56 used by this packet */ 58 used by this packet */ 60 used by this packet */ 67 for this packet */ 76 void *pdr; /* base address of packet
|
/linux-4.1.27/net/dccp/ |
H A D | input.c | 54 * - CLOSED (may be a late or duplicate packet) dccp_rcv_close() 98 * Step 7: Check for unexpected packet types dccp_rcv_closereq() 100 * Send Sync packet acknowledging P.seqno dccp_rcv_closereq() 101 * Drop packet and return dccp_rcv_closereq() 206 * Drop packet and return dccp_check_seqno() 253 * Send Sync packet acknowledging S.GSR dccp_check_seqno() 255 * Send Sync packet acknowledging P.seqno dccp_check_seqno() 256 * Drop packet and return dccp_check_seqno() 265 DCCP_WARN("Step 6 failed for %s packet, " dccp_check_seqno() 311 * Drop packet and return __dccp_rcv_established() 332 * Send Sync packet acknowledging P.seqno __dccp_rcv_established() 333 * Drop packet and return __dccp_rcv_established() 439 * Set ISR, GSR from packet. ISS was set in dccp_v{4,6}_connect dccp_rcv_request_sent_state_process() 565 queued = 1; /* packet was queued dccp_rcv_respond_partopen_state_process() 587 * (* Must scan the packet's options to check for Init dccp_rcv_state_process() 597 * Set S.ISR, S.GSR, S.SWL, S.SWH from packet or Init dccp_rcv_state_process() 599 * (* A Response packet will be generated in Step 11 *) dccp_rcv_state_process() 602 * Drop packet and return dccp_rcv_state_process() 627 * Step 7: Check for unexpected packet types dccp_rcv_state_process() 631 * Send Sync packet acknowledging P.seqno dccp_rcv_state_process() 632 * Drop packet and return dccp_rcv_state_process() 653 * Drop packet and return dccp_rcv_state_process() 678 /* Step 8: if using Ack Vectors, mark packet acknowledgeable */ dccp_rcv_state_process() 712 * @delta: number of microseconds between packet and acknowledgment
|
/linux-4.1.27/net/rxrpc/ |
H A D | ar-input.c | 1 /* RxRPC packet reception 35 * queue a packet for recvmsg to pass to userspace 38 * - eats the packet whether successful or not 39 * - there must be just one reference to the packet, which the caller passes to 131 * process a DATA packet, posting the packet to the appropriate queue 132 * - eats the packet if successful 162 /* we may already have the packet in the out of sequence queue */ rxrpc_fast_process_data() 200 /* if the packet need security things doing to it, then it goes down rxrpc_fast_process_data() 228 /* if we've reached an out of sequence packet then we need to drain rxrpc_fast_process_data() 253 _debug("discard and ACK packet %p", skb); rxrpc_fast_process_data() 278 * reception of the first reply packet 307 * post an incoming packet to the nominated call to deal with 331 /* track the latest serial number on this connection for ACK packet rxrpc_fast_process_packet() 339 /* request ACK generation for any ACK or DATA packet that requests rxrpc_fast_process_packet() 411 /* data packet received beyond the last packet */ rxrpc_fast_process_packet() 448 * split up a jumbo data packet 465 * of the jumbo packet */ rxrpc_process_jumbo_packet() 516 * post an incoming packet to the appropriate call/socket to deal with 546 /* resend last packet of a completed call */ rxrpc_post_packet_to_call() 695 _net("Rx UDP packet from %08x:%04hu", rxrpc_data_ready() 726 /* This is a connection-level packet. These should be rxrpc_data_ready() 763 _debug("first packet"); rxrpc_data_ready()
|
/linux-4.1.27/drivers/macintosh/ |
H A D | adb-iop.c | 77 * This will be called when a packet has been successfully sent. 116 printk("adb_iop_listen %p: rcvd packet, %d bytes: %02X %02X", req, adb_iop_listen() 126 /* We need to send back a timeout packet to the IOP to shut */ adb_iop_listen() 155 * Start sending an ADB packet, IOP style 157 * There isn't much to do other than hand the packet over to the IOP 170 /* get the packet to send */ adb_iop_start() 177 printk("adb_iop_start %p: sending packet, %d bytes:", req, req->nbytes); adb_iop_start() 190 /* amsg.cmd a pointer to the beginning of a full ADB packet. */ adb_iop_start() 198 /* when the packet has been sent. */ adb_iop_start()
|
/linux-4.1.27/drivers/ide/ |
H A D | ide-floppy.h | 8 * Pages of the SELECT SENSE / MODE SENSE packet commands.
|
/linux-4.1.27/drivers/net/ethernet/toshiba/ |
H A D | ps3_gelic_net.h | 83 * wakeup trigger packet 85 * 10: ARP packet 88 GELIC_DESCR_RXVLNPKT = 0x00200000, /* VLAN packet */ 113 GELIC_DESCR_RXDRPPKT = 0x00100000, /* drop packet */ 114 GELIC_DESCR_RXIPFMTERR = 0x00080000, /* IP packet format error */ 116 GELIC_DESCR_RXDATAERR = 0x00020000, /* IP packet format error */ 146 * the packet 149 GELIC_DESCR_TX_DMA_TCP_CHKSUM = 0x00020000, /* TCP packet */ 150 GELIC_DESCR_TX_DMA_UDP_CHKSUM = 0x00030000, /* UDP packet */
|
/linux-4.1.27/drivers/net/ethernet/tundra/ |
H A D | tsi108_eth.h | 298 #define TSI108_TX_EOF (1 << 0) /* End of frame; last fragment of packet */ 299 #define TSI108_TX_SOF (1 << 1) /* Start of frame; first frag. of packet */ 302 #define TSI108_TX_PAD (1 << 4) /* Pad the packet if too short */ 303 #define TSI108_TX_CRC (1 << 5) /* Generate CRC for this packet */ 319 u16 vlan; /* VLAN, if override enabled for this packet */ 326 #define TSI108_RX_EOF (1 << 0) /* End of frame; last fragment of packet */ 327 #define TSI108_RX_SOF (1 << 1) /* Start of frame; first frag. of packet */ 328 #define TSI108_RX_VLAN (1 << 2) /* Set on SOF if packet has a VLAN */ 346 u16 vlan; /* VLAN of received packet, first frag only */
|
/linux-4.1.27/drivers/staging/gdm72xx/ |
H A D | sdio_boot.c | 91 len = img_len; /* the last packet */ download_image() 103 "send image error: packet number = %d ret = %d\n", download_image() 108 if (buf[3] == 2) /* The last packet */ download_image() 118 "receive ack error: packet number = %d ret = %d\n", download_image()
|
/linux-4.1.27/drivers/media/dvb-core/ |
H A D | dvb_ringbuffer.h | 141 * Write a packet into the ringbuffer. 152 * Read from a packet in the ringbuffer. Note: unlike dvb_ringbuffer_read(), this 154 * dvb_ringbuffer_pkt_dispose() to mark a packet as no longer required. 158 * <offset> Offset into packet to read from. 170 * Dispose of a packet in the ring buffer. 178 * Get the index of the next packet in a ringbuffer. 181 * <idx> Previous packet index, or -1 to return the first packet index. 182 * <pktlen> On success, will be updated to contain the length of the packet in bytes.
|
/linux-4.1.27/fs/cifs/ |
H A D | rfc1002pdu.h | 26 /* RFC 1002 session packet types */ 55 /* POSITIVE_SESSION_RESPONSE packet does not include trailer. 56 SESSION_KEEP_ALIVE packet also does not include a trailer. 57 Trailer for the SESSION_MESSAGE packet is SMB/CIFS header */
|
/linux-4.1.27/net/ipv4/netfilter/ |
H A D | iptable_nat.c | 70 /* Before packet filtering, change destination */ 78 /* After packet filtering, change source */ 86 /* Before packet filtering, change destination */ 94 /* After packet filtering, change source */
|
/linux-4.1.27/net/ipv6/netfilter/ |
H A D | ip6table_nat.c | 72 /* Before packet filtering, change destination */ 80 /* After packet filtering, change source */ 88 /* Before packet filtering, change destination */ 96 /* After packet filtering, change source */
|
/linux-4.1.27/net/netfilter/ipvs/ |
H A D | ip_vs_proto_ah_esp.c | 71 * We are not sure if the packet is from our ah_esp_conn_in_get() 74 IP_VS_DBG_BUF(12, "Unknown ISAKMP entry for outin packet " ah_esp_conn_in_get() 97 IP_VS_DBG_BUF(12, "Unknown ISAKMP entry for inout packet " ah_esp_conn_out_get() 115 * AH/ESP is only related traffic. Pass the packet to IP stack. ah_esp_conn_schedule()
|
/linux-4.1.27/net/sched/ |
H A D | cls_rsvp.c | 2 * net/sched/cls_rsvp.c Special RSVP packet classifier for IPv4.
|
H A D | cls_rsvp6.c | 2 * net/sched/cls_rsvp6.c Special RSVP packet classifier for IPv6.
|
/linux-4.1.27/net/vmw_vsock/ |
H A D | vmci_transport.h | 25 /* If the packet format changes in a release then this should change too. */ 62 /* Control packet type for STREAM sockets. DGRAMs have no control packets nor 63 * special packet header for data packets, they are just raw VMCI DGRAM 65 * while data is written and read directly from queue pairs with no packet
|
/linux-4.1.27/sound/usb/ |
H A D | card.h | 23 unsigned char datainterval; /* log_2 of data packet interval */ 25 unsigned int maxpacksize; /* max. packet size */ 88 unsigned int maxpacksize; /* max packet size in bytes */ 89 unsigned int maxframesize; /* max packet size in frames */ 91 unsigned int curpacksize; /* current packet size in bytes (for capture) */ 92 unsigned int curframesize; /* current packet size in frames (for capture) */ 93 unsigned int syncmaxsize; /* sync endpoint packet size */ 94 unsigned int fill_max:1; /* fill max packet size always */ 96 unsigned int datainterval; /* log_2 of data packet interval */
|
/linux-4.1.27/drivers/net/slip/ |
H A D | slhc.c | 220 * icp and isize are the original packet. 252 /* Bail if this packet isn't TCP, or is an IP fragment */ slhc_compress() 266 /* Bail if the TCP packet isn't `compressible' (i.e., ACK isn't set or slhc_compress() 278 * COMPRESSED_TCP or UNCOMPRESSED_TCP packet. Either way, slhc_compress() 306 * uncompressed packet that tells the other side what slhc_compress() 392 case 0: /* Nothing changed. If this packet contains data and the slhc_compress() 393 * last one didn't, this is probably a data packet following slhc_compress() 406 * send packet uncompressed. slhc_compress() 433 * state with this packet's header. slhc_compress() 438 /* We want to use the original packet as our compressed packet. slhc_compress() 465 /* Update connection state cs & send uncompressed packet (i.e., slhc_compress() 466 * a regular ip/tcp packet but with the 'conversation id' we hope slhc_compress() 497 /* We've got a compressed packet; read the change byte */ slhc_uncompress() 515 /* this packet has an implicit state index. If we've slhc_uncompress() 517 * explicit state index, we have to toss the packet. */ slhc_uncompress() 533 * the current one, because the packet wouldn't have been sent slhc_uncompress() 593 * packet. Put the reconstructed TCP and IP headers back on the slhc_uncompress() 594 * packet. Recalculate IP checksum (but not TCP checksum). slhc_uncompress() 642 /* The packet is shorter than a legal IP header */ slhc_remember() 676 /* Put headers back on packet slhc_remember()
|
/linux-4.1.27/drivers/usb/host/ |
H A D | fhci.h | 53 #define PKT_SET_HOST_LAST 0x04000000 /* Last data packet */ 54 #define PKT_HOST_DATA 0x02000000 /* Data packet */ 55 #define PKT_FIRST_IN_FRAME 0x01000000 /* First packet in the frame */ 56 #define PKT_TOKEN_FRAME 0x00800000 /* Token packet */ 57 #define PKT_ZLP 0x00400000 /* Zero length packet */ 58 #define PKT_IN_TOKEN_FRAME 0x00200000 /* IN token packet */ 59 #define PKT_OUT_TOKEN_FRAME 0x00100000 /* OUT token packet */ 60 #define PKT_SETUP_TOKEN_FRAME 0x00080000 /* SETUP token packet */ 61 #define PKT_STALL_FRAME 0x00040000 /* STALL packet */ 62 #define PKT_NACK_FRAME 0x00020000 /* NACK packet */ 65 #define PKT_HOST_COMMAND 0x00004000 /* Host command packet */ 66 #define PKT_DUMMY_PACKET 0x00002000 /* Dummy packet, used for mmm */ 67 #define PKT_LOW_SPEED_PACKET 0x00001000 /* Low-Speed packet */ 361 struct packet *pkt; 367 struct packet { struct 368 u8 *data; /* packet data */ 369 u32 len; /* packet length */ 370 u32 status; /* status of the packet - equivalent to the status 372 u32 info; /* packet information */ 543 u32 fhci_host_transaction(struct fhci_usb *usb, struct packet *pkt, 559 void fhci_transaction_confirm(struct fhci_usb *usb, struct packet *pkt);
|
/linux-4.1.27/drivers/w1/ |
H A D | w1_netlink.c | 217 } packet; w1_netlink_send_error() local 218 memcpy(&packet.cn, cn, sizeof(packet.cn)); w1_netlink_send_error() 219 memcpy(&packet.msg, msg, sizeof(packet.msg)); w1_netlink_send_error() 220 packet.cn.len = sizeof(packet.msg); w1_netlink_send_error() 221 packet.msg.len = 0; w1_netlink_send_error() 222 packet.msg.status = (u8)-error; w1_netlink_send_error() 223 cn_netlink_send(&packet.cn, portid, 0, GFP_KERNEL); w1_netlink_send_error() 238 } packet; w1_netlink_send() local 239 memset(&packet, 0, sizeof(packet)); w1_netlink_send() 241 packet.cn.id.idx = CN_W1_IDX; w1_netlink_send() 242 packet.cn.id.val = CN_W1_VAL; w1_netlink_send() 244 packet.cn.seq = dev->seq++; w1_netlink_send() 245 packet.cn.len = sizeof(*msg); w1_netlink_send() 247 memcpy(&packet.msg, msg, sizeof(*msg)); w1_netlink_send() 248 packet.msg.len = 0; w1_netlink_send() 250 cn_netlink_send(&packet.cn, 0, 0, GFP_KERNEL); w1_netlink_send() 261 /* Add cmd back if the packet was sent */ w1_send_slave()
|
/linux-4.1.27/drivers/net/ethernet/chelsio/cxgb4/ |
H A D | sge.c | 125 * This is the same as calc_tx_descs() for a TSO packet with 138 * Max Tx descriptor space we allow for an Ethernet packet to be inlined 159 * Rx buffer sizes for "useskbs" Free List buffers (one ingress packet pe skb 308 * deferred_unmap_destructor - unmap a packet when it is freed 309 * @skb: the packet 311 * This is the packet destructor used for Tx packets that need to remain 579 * (Re)populate an SGE free-buffer queue with up to @n new packet buffers, 767 * is_eth_imm - can an Ethernet packet be sent as immediate data? 768 * @skb: the packet 770 * Returns whether an Ethernet packet is small enough to fit as 785 * calc_tx_flits - calculate the number of flits for a packet Tx WR 786 * @skb: the packet 789 * packet, including the needed WR and CPL headers. 824 * calc_tx_descs - calculate the number of Tx descriptors for a packet 825 * @skb: the packet 828 * packet, including the needed WR and CPL headers. 836 * write_sgl - populate a scatter/gather list for a packet 837 * @skb: the packet 844 * Generates a gather list for the buffers that make up a packet. 846 * The SGL includes all of the packet's page fragments and the data in its 997 * inline_tx_skb - inline a packet's data into Tx descriptors 998 * @skb: the packet 999 * @q: the Tx queue where the packet will be inlined 1000 * @pos: starting position in the Tx queue where to inline the packet 1002 * Inline a packet's contents directly into Tx descriptors, starting at 1005 * in the middle of the packet we want to inline. 1032 * Figure out what HW csum a packet wants and return the appropriate control 1048 * and hope a bad packet is detected hwcsum() 1125 * t4_eth_xmit - add a packet to an Ethernet Tx queue 1126 * @skb: the packet 1129 * Add a packet to an SGE Ethernet Tx queue. Runs with softirqs disabled. 1151 * The chip min packet length is 10 octets but play safe and reject t4_eth_xmit() 1306 * is_imm - check whether a packet can be sent as immediate data 1307 * @skb: the packet 1309 * Returns true if a packet can be sent as a WR with immediate data. 1337 * ctrl_xmit - send a packet through an SGE control Tx queue 1339 * @skb: the packet 1341 * Send a packet through an SGE control Tx queue. Packets sent through 1435 * @skb: the packet containing the management message 1450 * is_ofld_imm - check whether a packet can be sent as immediate data 1451 * @skb: the packet 1453 * Returns true if a packet can be sent as an offload WR with immediate 1462 * calc_tx_flits_ofld - calculate # of flits for an offload packet 1463 * @skb: the packet 1465 * Returns the number of flits needed for the given offload packet. 1503 * @skb: the packet causing the queue to become full 1505 * Stops an offload Tx queue that has become full and modifies the packet 1521 * Services an offload Tx queue by moving packets from its packet queue 1590 * ofld_xmit - send a packet through an offload queue 1592 * @skb: the packet 1594 * Send an offload packet through an SGE offload queue. 1624 * skb_txq - return the Tx queue an offload packet should use 1625 * @skb: the packet 1627 * Returns the Tx queue an offload packet should use as indicated by bits 1628 * 1-15 in the packet's queue_mapping. 1636 * is_ctrl_pkt - return whether an offload packet is a control packet 1637 * @skb: the packet 1639 * Returns whether an offload packet should use an OFLD or a CTRL 1640 * Tx queue as indicated by bit 0 in the packet's queue_mapping. 1661 * t4_ofld_send - send an offload packet 1663 * @skb: the packet 1665 * Sends an offload packet. We use the packet queue_mapping to select the 1666 * appropriate Tx queue as follows: bit 0 indicates whether the packet 1680 * cxgb4_ofld_send - send an offload packet 1682 * @skb: the packet 1684 * Sends an offload packet. This is an exported version of @t4_ofld_send, 1713 * cxgb4_pktgl_to_skb - build an sk_buff from a packet gather list 1718 * Builds an sk_buff from the given packet gather list. Returns the 1754 * t4_pktgl_free - free a packet gather list 1757 * Releases the pages of a packet gather list. We do not own the last 1770 * Process an MPS trace packet. Give it an unused protocol number so it won't 1836 * t4_ethrx_handler - process an ingress ethernet packet 1837 * @q: the response queue that received the packet 1839 * @si: the gather list of packet fragments 1841 * Process an ingress ethernet packet and deliver it to the stack. 1925 * restore_rx_bufs - put back a packet's Rx buffers 1926 * @si: the packet gather list 1935 * that the current packet can't be processed right away afterall and we 2030 /* gather packet fragments */ process_responses() 2919 * process_responses() and that only packet data is going to the t4_sge_init_soft()
|
/linux-4.1.27/drivers/scsi/megaraid/ |
H A D | megaraid_mm.h | 42 * mimd_t : Old style ioctl packet structure (deprecated) 60 * : format. If we get this mimd packet, we will convert it into
|
/linux-4.1.27/arch/mips/include/asm/mach-lantiq/xway/ |
H A D | xway_dma.h | 26 #define LTQ_DMA_SOP BIT(29) /* start of packet */ 27 #define LTQ_DMA_EOP BIT(28) /* end of packet */
|
/linux-4.1.27/include/net/netfilter/ |
H A D | nf_nat_l4proto.h | 14 /* Translate a packet to the target according to manip type. 32 * incoming packet.
|
/linux-4.1.27/arch/arm64/include/asm/ |
H A D | kgdb.h | 68 * Size of I/O buffer for gdb packet. 78 * "'g' packet reply is too long"
|
/linux-4.1.27/net/bridge/netfilter/ |
H A D | nf_log_bridge.c | 71 /* Request to load the real packet loggers. */ nf_log_bridge_init() 94 MODULE_DESCRIPTION("Netfilter bridge packet logging");
|
/linux-4.1.27/security/selinux/ |
H A D | netlabel.c | 46 * @skb: the packet 142 * selinux_netlbl_err - Handle a NetLabel packet error 143 * @skb: the packet 148 * When a packet is dropped due to a call to avc_has_perm() pass the error 151 * present on the packet, NetLabel is smart enough to only act when it should. 189 * selinux_netlbl_skbuff_getsid - Get the sid of a packet using NetLabel 190 * @skb: the packet 197 * packet and use those attributes to determine the correct context/SID to 198 * assign to the packet. Returns zero on success, negative values on failure. 227 * selinux_netlbl_skbuff_setsid - Set the NetLabel on a packet given a sid 228 * @skb: the packet 233 * Call the NetLabel mechanism to set the label of a packet using @sid. 246 /* if this is a locally generated packet check to see if it is already selinux_netlbl_skbuff_setsid() 359 * @skb: the packet
|
/linux-4.1.27/drivers/firmware/ |
H A D | dell_rbu.c | 22 * The driver writes the incoming packet image by allocating a new packet 23 * on every time the packet data is written. This driver requires an 24 * application to break the BIOS image in to fixed sized packet chunks. 73 "BIOS image type. choose- mono or packet or init"); 127 "packet\n", __func__); create_packet() 168 "packet\n", __func__); create_packet() 176 pr_debug("packet 0x%lx below floor at 0x%lx.\n", create_packet() 196 /* initialize the newly created packet headers */ create_packet() 205 /* always free packet array */ create_packet() 207 pr_debug("freeing unused packet below floor 0x%lx.\n", create_packet() 245 /* this is the last packet */ packetize_data() 276 /* point to the offset in the packet buffer */ do_packet_read() 285 * packet and move on do_packet_read() 321 * last packet packet_read_list() 348 * zero out the RBU packet memory before freeing packet_empty_list() 535 else if (!strcmp(image_type, "packet")) read_rbu_data() 559 } else if (!strcmp(image_type, "packet")) { callbackfn_rbu() 610 else if (strstr(buffer, "packet")) write_rbu_image_type() 611 strcpy(image_type, "packet"); write_rbu_image_type()
|
/linux-4.1.27/arch/mips/include/uapi/asm/ |
H A D | ioctls.h | 36 #define TIOCPKT 0x5470 /* pty: set/clear packet mode */ 37 #define TIOCPKT_DATA 0x00 /* data packet */ 38 #define TIOCPKT_FLUSHREAD 0x01 /* flush packet */ 39 #define TIOCPKT_FLUSHWRITE 0x02 /* flush packet */ 91 #define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */
|
/linux-4.1.27/net/802/ |
H A D | fddi.c | 91 * Determine the packet's protocol ID and fill in skb fields. 92 * This routine is called before an incoming packet is passed 94 * the proper pointer to the start of packet data (skb->data). 104 * to start of packet data. Assume 802.2 SNAP frames for now. fddi_type_trans() 121 /* Set packet type based on destination address and flag settings */ fddi_type_trans()
|
/linux-4.1.27/drivers/media/usb/ttusb-dec/ |
H A D | ttusb_dec.c | 131 u8 packet[MAX_PVA_LENGTH + 4]; member in struct:ttusb_dec 424 printk("%s: packet too short - discarding\n", __func__); ttusb_dec_process_pva() 429 printk("%s: packet too long - discarding\n", __func__); ttusb_dec_process_pva() 518 static void ttusb_dec_process_filter(struct ttusb_dec *dec, u8 *packet, ttusb_dec_process_filter() argument 527 sid = packet[1]; ttusb_dec_process_filter() 540 filter->feed->cb.sec(&packet[2], length - 2, NULL, 0, ttusb_dec_process_filter() 551 printk("%s: odd sized packet - discarding\n", __func__); ttusb_dec_process_packet() 556 csum ^= ((dec->packet[i] << 8) + dec->packet[i + 1]); ttusb_dec_process_packet() 563 packet_id = dec->packet[dec->packet_length - 4] << 8; ttusb_dec_process_packet() 564 packet_id += dec->packet[dec->packet_length - 3]; ttusb_dec_process_packet() 579 ttusb_dec_process_pva(dec, dec->packet, ttusb_dec_process_packet() 585 ttusb_dec_process_filter(dec, dec->packet, ttusb_dec_process_packet() 638 dec->packet[dec->packet_length++] = *b++; ttusb_dec_process_urb_frame() 641 if (dec->packet[0] == 'A' && ttusb_dec_process_urb_frame() 642 dec->packet[1] == 'V') { ttusb_dec_process_urb_frame() 646 } else if (dec->packet[0] == 'S') { ttusb_dec_process_urb_frame() 650 } else if (dec->packet[0] == 0x00) { ttusb_dec_process_urb_frame() 656 printk("%s: unknown packet type: " ttusb_dec_process_urb_frame() 658 dec->packet[0], dec->packet[1]); ttusb_dec_process_urb_frame() 667 dec->packet[dec->packet_length++] = *b++; ttusb_dec_process_urb_frame() 673 (dec->packet[6] << 8) + ttusb_dec_process_urb_frame() 674 dec->packet[7]; ttusb_dec_process_urb_frame() 680 ((dec->packet[3] & 0x0f) << 8) + ttusb_dec_process_urb_frame() 681 dec->packet[4]; ttusb_dec_process_urb_frame() 692 memcpy(dec->packet + dec->packet_length, ttusb_dec_process_urb_frame() 699 memcpy(&dec->packet[dec->packet_length], ttusb_dec_process_urb_frame() 711 dec->packet[dec->packet_length++] = *b++; ttusb_dec_process_urb_frame() 728 printk("%s: illegal packet state encountered.\n", ttusb_dec_process_urb_frame()
|
/linux-4.1.27/drivers/net/ppp/ |
H A D | ppp_mppe.c | 109 int discard; /* stateful mode packet loss flag */ 129 #define MPPE_OVHD 2 /* MPPE overhead/packet */ 348 * every CCP Reset-Request; we only rekey on the next xmit packet. 362 * Compress (encrypt) a packet. 382 /* Make sure we have enough room to generate an encrypted packet. */ mppe_compress() 384 /* Drop the packet if we should encrypt it, but can't. */ mppe_compress() 408 ((state->ccount & 0xff) == 0xff) || /* "flag" packet */ mppe_compress() 424 /* Encrypt packet */ mppe_compress() 471 * Decompress (decrypt) an MPPE packet. 492 * Make sure we have enough room to decrypt the packet. mppe_decompress() 526 "flag packet!\n", state->unit); mppe_decompress() 536 /* Discard late packet */ mppe_decompress() 543 /* RFC 3078, sec 8.1. Rekey for every packet. */ mppe_decompress() 568 /* Rekey for every missed "flag" packet. */ mppe_decompress() 582 * peer need not send a Reset-Ack packet. But RFC 1962 mppe_decompress() 629 /* And finally, decrypt the rest of the packet. */ mppe_decompress() 642 /* good packet credit */ mppe_decompress() 653 * instances since it could just be due to packet corruption. mppe_decompress() 662 * packet. (How to do this?)
|
/linux-4.1.27/drivers/media/usb/stk1160/ |
H A D | stk1160-video.c | 35 int packet, int status) print_err_status() 66 if (packet < 0) print_err_status() 70 printk_ratelimited(KERN_INFO "URB packet %d, status %d [%s].\n", print_err_status() 71 packet, status, errmsg); print_err_status() 228 * Controls the isoc copy of each urb packet 241 /* Print status and drop current packet (or field?) */ stk1160_process_isoc() 253 /* Get packet actual length and pointer to data */ stk1160_process_isoc() 257 /* Empty packet */ stk1160_process_isoc() 262 * An 8-byte packet sequence means end of field. stk1160_process_isoc() 263 * So if we don't have any packet, we start receiving one now stk1160_process_isoc() 264 * and if we do have a packet, then we are done with it. stk1160_process_isoc() 267 * but not always 8-byte long so we don't check packet length. stk1160_process_isoc() 292 /* We set next packet parity and stk1160_process_isoc() 34 print_err_status(struct stk1160 *dev, int packet, int status) print_err_status() argument
|
/linux-4.1.27/fs/autofs4/ |
H A D | waitq.c | 140 * Kernel protocol v5 packet for handling indirect and direct autofs4_notify_daemon() 148 struct autofs_v5_packet *packet = &pkt.v5_pkt.v5_packet; autofs4_notify_daemon() local 151 pktsz = sizeof(*packet); autofs4_notify_daemon() 153 packet->wait_queue_token = wq->wait_queue_token; autofs4_notify_daemon() 154 packet->len = wq->name.len; autofs4_notify_daemon() 155 memcpy(packet->name, wq->name.name, wq->name.len); autofs4_notify_daemon() 156 packet->name[wq->name.len] = '\0'; autofs4_notify_daemon() 157 packet->dev = wq->dev; autofs4_notify_daemon() 158 packet->ino = wq->ino; autofs4_notify_daemon() 159 packet->uid = from_kuid_munged(user_ns, wq->uid); autofs4_notify_daemon() 160 packet->gid = from_kgid_munged(user_ns, wq->gid); autofs4_notify_daemon() 161 packet->pid = wq->pid; autofs4_notify_daemon() 162 packet->tgid = wq->tgid; autofs4_notify_daemon()
|
/linux-4.1.27/drivers/isdn/mISDN/ |
H A D | l1oip_core.c | 180 The "Time Base" is used to rearange packets and to detect packet loss. 183 for the initial "Time Base", but 0 should be used for the first packet. 184 In case of HDLC data, this timestamp counts the packet or byte number. 189 After initialisation, a timer of 15 seconds is started. Whenever a packet is 191 empty packet is transmitted. This keep the connection alive. 193 When a valid packet is received, a timer 65 seconds is started. The interface 199 To allow dynamic IP, the ID must be non 0. In this case, any packet with the 217 packet shall be sent to the socket, the hc->socket must be checked wheter not 344 /* send packet */ l1oip_socket_send() 346 printk(KERN_DEBUG "%s: sending packet to socket (len " l1oip_socket_send() 383 printk(KERN_WARNING "%s: packet error - channel %d out of " l1oip_socket_recv() 390 printk(KERN_WARNING "%s: packet error - channel %d not in " l1oip_socket_recv() 478 printk(KERN_WARNING "%s: packet error - length %d below " l1oip_socket_parse() 485 printk(KERN_WARNING "%s: packet error - unknown version %d\n", l1oip_socket_parse() 492 printk(KERN_WARNING "%s: packet error - received E1 packet " l1oip_socket_parse() 497 printk(KERN_WARNING "%s: packet error - received S0 packet " l1oip_socket_parse() 508 printk(KERN_WARNING "%s: packet error - remotecodec %d " l1oip_socket_parse() 518 printk(KERN_WARNING "%s: packet error - packet has id " l1oip_socket_parse() 523 printk(KERN_WARNING "%s: packet error - packet too " l1oip_socket_parse() 534 printk(KERN_WARNING "%s: packet error - ID mismatch, " l1oip_socket_parse() 541 printk(KERN_WARNING "%s: packet error - packet has no " l1oip_socket_parse() 549 printk(KERN_WARNING "%s: packet error - packet too short, " l1oip_socket_parse() 564 printk(KERN_WARNING "%s: packet error - packet too " l1oip_socket_parse() 575 printk(KERN_WARNING "%s: packet error - length %d at " l1oip_socket_parse() 581 printk(KERN_WARNING "%s: packet error - length %d at " l1oip_socket_parse() 583 "packet.\n", l1oip_socket_parse() 591 printk(KERN_WARNING "%s: packet error - packet too short, time " l1oip_socket_parse() 606 "received packet\n", __func__); l1oip_socket_parse() 612 /* distribute packet */ l1oip_socket_parse() 1497 bundle ? "bundled IP packet for all B-channels" : l1oip_init()
|
/linux-4.1.27/drivers/video/fbdev/ |
H A D | sh_mobile_hdmi.c | 37 bits 19..16 of 20-bit N for Audio Clock Regeneration packet */ 38 #define HDMI_20_BIT_N_FOR_AUDIO_RPKT_15_8 0x02 /* bits 15..8 of 20-bit N for Audio Clock Regeneration packet */ 39 #define HDMI_20_BIT_N_FOR_AUDIO_RPKT_7_0 0x03 /* bits 7..0 of 20-bit N for Audio Clock Regeneration packet */ 80 #define HDMI_CTRL_PKT_MANUAL_SEND_CONTROL 0x40 /* Control packet manual send control */ 81 #define HDMI_CTRL_PKT_AUTO_SEND 0x41 /* Control packet auto send with VSYNC control */ 99 #define HDMI_CTRL_PKT_BUF_INDEX 0x5F /* Control packet buffer index */ 100 #define HDMI_CTRL_PKT_BUF_ACCESS_HB0 0x60 /* Control packet data buffer access window - HB0 */ 101 #define HDMI_CTRL_PKT_BUF_ACCESS_HB1 0x61 /* Control packet data buffer access window - HB1 */ 102 #define HDMI_CTRL_PKT_BUF_ACCESS_HB2 0x62 /* Control packet data buffer access window - HB2 */ 103 #define HDMI_CTRL_PKT_BUF_ACCESS_PB0 0x63 /* Control packet data buffer access window - PB0 */ 104 #define HDMI_CTRL_PKT_BUF_ACCESS_PB1 0x64 /* Control packet data buffer access window - PB1 */ 105 #define HDMI_CTRL_PKT_BUF_ACCESS_PB2 0x65 /* Control packet data buffer access window - PB2 */ 106 #define HDMI_CTRL_PKT_BUF_ACCESS_PB3 0x66 /* Control packet data buffer access window - PB3 */ 107 #define HDMI_CTRL_PKT_BUF_ACCESS_PB4 0x67 /* Control packet data buffer access window - PB4 */ 108 #define HDMI_CTRL_PKT_BUF_ACCESS_PB5 0x68 /* Control packet data buffer access window - PB5 */ 109 #define HDMI_CTRL_PKT_BUF_ACCESS_PB6 0x69 /* Control packet data buffer access window - PB6 */ 110 #define HDMI_CTRL_PKT_BUF_ACCESS_PB7 0x6A /* Control packet data buffer access window - PB7 */ 111 #define HDMI_CTRL_PKT_BUF_ACCESS_PB8 0x6B /* Control packet data buffer access window - PB8 */ 112 #define HDMI_CTRL_PKT_BUF_ACCESS_PB9 0x6C /* Control packet data buffer access window - PB9 */ 113 #define HDMI_CTRL_PKT_BUF_ACCESS_PB10 0x6D /* Control packet data buffer access window - PB10 */ 114 #define HDMI_CTRL_PKT_BUF_ACCESS_PB11 0x6E /* Control packet data buffer access window - PB11 */ 115 #define HDMI_CTRL_PKT_BUF_ACCESS_PB12 0x6F /* Control packet data buffer access window - PB12 */ 116 #define HDMI_CTRL_PKT_BUF_ACCESS_PB13 0x70 /* Control packet data buffer access window - PB13 */ 117 #define HDMI_CTRL_PKT_BUF_ACCESS_PB14 0x71 /* Control packet data buffer access window - PB14 */ 118 #define HDMI_CTRL_PKT_BUF_ACCESS_PB15 0x72 /* Control packet data buffer access window - PB15 */ 119 #define HDMI_CTRL_PKT_BUF_ACCESS_PB16 0x73 /* Control packet data buffer access window - PB16 */ 120 #define HDMI_CTRL_PKT_BUF_ACCESS_PB17 0x74 /* Control packet data buffer access window - PB17 */ 121 #define HDMI_CTRL_PKT_BUF_ACCESS_PB18 0x75 /* Control packet data buffer access window - PB18 */ 122 #define HDMI_CTRL_PKT_BUF_ACCESS_PB19 0x76 /* Control packet data buffer access window - PB19 */ 123 #define HDMI_CTRL_PKT_BUF_ACCESS_PB20 0x77 /* Control packet data buffer access window - PB20 */ 124 #define HDMI_CTRL_PKT_BUF_ACCESS_PB21 0x78 /* Control packet data buffer access window - PB21 */ 125 #define HDMI_CTRL_PKT_BUF_ACCESS_PB22 0x79 /* Control packet data buffer access window - PB22 */ 126 #define HDMI_CTRL_PKT_BUF_ACCESS_PB23 0x7A /* Control packet data buffer access window - PB23 */ 127 #define HDMI_CTRL_PKT_BUF_ACCESS_PB24 0x7B /* Control packet data buffer access window - PB24 */ 128 #define HDMI_CTRL_PKT_BUF_ACCESS_PB25 0x7C /* Control packet data buffer access window - PB25 */ 129 #define HDMI_CTRL_PKT_BUF_ACCESS_PB26 0x7D /* Control packet data buffer access window - PB26 */ 130 #define HDMI_CTRL_PKT_BUF_ACCESS_PB27 0x7E /* Control packet data buffer access window - PB27 */ 798 * Control packet auto send with VSYNC control: auto send sh_hdmi_configure()
|
/linux-4.1.27/arch/tile/include/gxio/ |
H A D | mpipe.h | 37 * The TILE-Gx mPIPE&tm; shim provides Ethernet connectivity, packet 38 * classification, and packet load balancing services. The 40 * allocate mPIPE IO channels, configure packet distribution 64 * tasks like packet header parsing, load balancing, and memory 70 * When a packet arrives at one of the mPIPE's Ethernet MACs, it is 77 * incoming packet, extracting information including the destination 80 * used to hold the packet, and which bucket will be used by the load 81 * balancer to determine which application will receive the packet. 96 * to which the packet will be delivered. This decision is based on 99 * the packet's flow hash (applications that aren't interested in flow 104 * either forwards the packet to the previously assigned NotifRing or 120 * chosen by the classification program and DMAs the packet data into 122 * stack of data buffers with the same size. If the packet data is 124 * mPIPE hardware pops off multiple buffers and chains the packet data 125 * through a multi-buffer linked list. Once the packet data is 132 * gxio_mpipe_push_buffer() or by egressing a packet with the 150 * application, to which the mPIPE delivers packet descriptors 211 /* An ingress packet descriptor. When a packet arrives, the mPIPE 219 * single packet may involve multiple egress command descriptors. 233 * byte of the packet. 241 * @param idesc An ingress packet descriptor. 250 * This is the actual number of packet bytes transferred into memory 255 * @param idesc An ingress packet descriptor. 278 * classifier processed a custom header for the packet. 280 * @param idesc An ingress packet descriptor. 292 * @param idesc An ingress packet descriptor. 306 * @param idesc An ingress packet descriptor. 385 /* 128 byte packet data buffer. */ 387 /* 256 byte packet data buffer. */ 389 /* 512 byte packet data buffer. */ 391 /* 1024 byte packet data buffer. */ 393 /* 1664 byte packet data buffer. */ 395 /* 4096 byte packet data buffer. */ 397 /* 10368 byte packet data buffer. */ 400 /* 16384 byte packet data buffer. */ 449 * registered with gxio_mpipe_init_buffer_stack(). All packet buffer 676 * number of low bits from the incoming packet's flow hash to choose a 679 * chooses the NotifRing to which the packet will be delivered. 855 * prior to starting to send the packet (normally 12). 876 * program which, for each incoming packet, parses the packet headers, 877 * encodes some packet metadata in the "idesc", and either drops the 878 * packet, or picks a notif ring to handle the packet, and a buffer 879 * stack to contain the packet, usually based on the channel, VLAN, 880 * dMAC, flow hash, and packet size, under the guidance of the "rules" 900 * the first fragment of a fragmented TCP/UDP packet is hashed using 909 * (based on the packet size) and a bucket (based on the flow hash). 916 * Various packet metadata is encoded in the idesc. The flow hash is 934 * as adding new packet metadata, should be fine. 969 * @param stacks Either NULL, to assign each packet to the smallest 1028 * The mpipe ingress and egress hardware uses shared memory packet 1034 * write packet descriptors. 1050 * for getting the ::gxio_mpipe_idesc_t packet descriptor associated 1053 * functions copy the oldest packet descriptor out of the NotifRing and 1058 * efficiency can be achieved by avoiding the packet descriptor copy 1072 * ::gxio_mpipe_edesc_t egress packet descriptors. The simple 1092 * number has finished. Given the maximum packet rates of the Gx 1096 * bit to indicate that the buffers containing egress packet data 1109 * used to drop an incoming packet, instead of forwarding it, since 1190 * If packet processing is deferred, optimal performance requires that 1204 /* Consume a packet from an "iqueue". 1211 * You may call this function as each packet is processed, or you can 1234 /* Peek at the next packet(s) in an "iqueue", without waiting. 1238 * with the address of the next valid packet descriptor, and returns 1242 * Call gxio_mpipe_iqueue_consume() on each packet once it has been 1246 * @param idesc_ref A pointer to a packet descriptor pointer. 1290 /* Drop a packet by pushing its buffer (if appropriate). 1296 * @param idesc A packet descriptor. 1561 * of the largest packet for which egress is guaranteed to avoid 1568 * should be set to the size of the largest possible packet, which 1605 * specifying the link's channel number in mPIPE packet distribution rules, 1682 * involved in packet processing, you can use the ::GXIO_MPIPE_LINK_NO_DATA
|
/linux-4.1.27/drivers/net/wimax/i2400m/ |
H A D | netdev.c | 32 * copy-each-rxed-packet overhead on the RX path. Each IP packet has 47 * to do all that. By default, we only queue a single packet and drop 56 * i2400m_hard_start_xmit Called by the network stack to send a packet 140 * when it is ready to transmit the packet we have "queued". Still we 144 * still wake the queue up to see if the next packet will be luckier. 150 * connected, then fine -- if it is someother state, the packet will 214 * The i2400m expects a 4 byte header in front of a data packet. 216 * Because we pretend to be an ethernet device, this packet comes with 245 * here we release them if the packet was still pending. i2400m_net_wake_stop() 320 * Transmit a packet to the base station on behalf of the network stack. 350 * Transmit a packet to the base station on behalf of the network stack 452 * i2400m_net_rx - pass a network packet to the stack 464 * an ethernet header, so we need to copy each packet. Firmware 531 * i2400m_net_erx - pass a network packet to the stack (extended version) 534 * @skb: the skb where the packet is - the skb should be set to point 535 * at the IP packet; this function will add ethernet headers if 537 * @cs: packet type
|
/linux-4.1.27/drivers/isdn/hysdn/ |
H A D | hysdn_net.c | 116 /* send a packet on this interface. */ 154 /* acknowlegde a packet send. The network layer will be informed about */ 181 /* we got a packet from the network, go and queue it */ 198 printk(KERN_NOTICE "%s: Memory squeeze, dropping packet.\n", hysdn_rx_netpkt() 209 dev->stats.rx_packets++; /* adjust packet count */ hysdn_rx_netpkt() 215 /* return the pointer to a network packet to be send */ 228 return (lp->skbs[lp->out_idx]); /* next packet to send */ hysdn_tx_netget()
|