Lines Matching full:tuple

26  * pccard_read_tuple() - internal CIS tuple access
30 * @parse: buffer where the tuple shall be parsed (or NULL, if no parse)
32 * pccard_read_tuple() reads out one tuple and attempts to parse it
37 tuple_t tuple; in pccard_read_tuple() local
43 dev_warn(&s->dev, "no memory to read tuple\n"); in pccard_read_tuple()
46 tuple.DesiredTuple = code; in pccard_read_tuple()
47 tuple.Attributes = 0; in pccard_read_tuple()
49 tuple.Attributes = TUPLE_RETURN_COMMON; in pccard_read_tuple()
50 ret = pccard_get_first_tuple(s, function, &tuple); in pccard_read_tuple()
53 tuple.TupleData = buf; in pccard_read_tuple()
54 tuple.TupleOffset = 0; in pccard_read_tuple()
55 tuple.TupleDataMax = 255; in pccard_read_tuple()
56 ret = pccard_get_tuple_data(s, &tuple); in pccard_read_tuple()
59 ret = pcmcia_parse_tuple(&tuple, parse); in pccard_read_tuple()
71 * @parse: buffer where the tuple shall be parsed (or NULL, if no parse)
74 * gets passed the raw tuple, the paresed tuple (if @parse is
83 int (*loop_tuple) (tuple_t *tuple, in pccard_loop_tuple()
87 tuple_t tuple; in pccard_loop_tuple() local
93 dev_warn(&s->dev, "no memory to read tuple\n"); in pccard_loop_tuple()
97 tuple.TupleData = buf; in pccard_loop_tuple()
98 tuple.TupleDataMax = 255; in pccard_loop_tuple()
99 tuple.TupleOffset = 0; in pccard_loop_tuple()
100 tuple.DesiredTuple = code; in pccard_loop_tuple()
101 tuple.Attributes = 0; in pccard_loop_tuple()
103 ret = pccard_get_first_tuple(s, function, &tuple); in pccard_loop_tuple()
105 if (pccard_get_tuple_data(s, &tuple)) in pccard_loop_tuple()
109 if (pcmcia_parse_tuple(&tuple, parse)) in pccard_loop_tuple()
112 ret = loop_tuple(&tuple, parse, priv_data); in pccard_loop_tuple()
117 ret = pccard_get_next_tuple(s, function, &tuple); in pccard_loop_tuple()
153 static int pcmcia_do_loop_config(tuple_t *tuple, cisparse_t *parse, void *priv) in pcmcia_do_loop_config() argument
288 tuple_t *tuple,
299 static int pcmcia_do_loop_tuple(tuple_t *tuple, cisparse_t *parse, void *priv) in pcmcia_do_loop_tuple() argument
303 return loop->loop_tuple(loop->p_dev, tuple, loop->priv_data); in pcmcia_do_loop_tuple()
312 * gets passed the raw tuple and @priv_data.
320 tuple_t *tuple, in pcmcia_loop_tuple() argument
345 * the first tuple, return 0 unconditionally. Create a memory buffer large
346 * enough to hold the content of the tuple, and fill it with the tuple data.
349 static int pcmcia_do_get_tuple(struct pcmcia_device *p_dev, tuple_t *tuple, in pcmcia_do_get_tuple() argument
354 *get->buf = kzalloc(tuple->TupleDataLen, GFP_KERNEL); in pcmcia_do_get_tuple()
356 get->len = tuple->TupleDataLen; in pcmcia_do_get_tuple()
357 memcpy(*get->buf, tuple->TupleData, tuple->TupleDataLen); in pcmcia_do_get_tuple()
364 * pcmcia_get_tuple() - get first tuple from CIS
394 * tuple contains a proper LAN_NODE_ID of length 6, and copy the data
397 static int pcmcia_do_get_mac(struct pcmcia_device *p_dev, tuple_t *tuple, in pcmcia_do_get_mac() argument
403 if (tuple->TupleData[0] != CISTPL_FUNCE_LAN_NODE_ID) in pcmcia_do_get_mac()
405 if (tuple->TupleDataLen < ETH_ALEN + 2) { in pcmcia_do_get_mac()
406 dev_warn(&p_dev->dev, "Invalid CIS tuple length for " in pcmcia_do_get_mac()
411 if (tuple->TupleData[1] != ETH_ALEN) { in pcmcia_do_get_mac()
416 dev->dev_addr[i] = tuple->TupleData[i+2]; in pcmcia_do_get_mac()