Lines Matching full:tuple

27  * pccard_read_tuple() - internal CIS tuple access
31 * @parse: buffer where the tuple shall be parsed (or NULL, if no parse)
33 * pccard_read_tuple() reads out one tuple and attempts to parse it
38 tuple_t tuple; in pccard_read_tuple() local
44 dev_warn(&s->dev, "no memory to read tuple\n"); in pccard_read_tuple()
47 tuple.DesiredTuple = code; in pccard_read_tuple()
48 tuple.Attributes = 0; in pccard_read_tuple()
50 tuple.Attributes = TUPLE_RETURN_COMMON; in pccard_read_tuple()
51 ret = pccard_get_first_tuple(s, function, &tuple); in pccard_read_tuple()
54 tuple.TupleData = buf; in pccard_read_tuple()
55 tuple.TupleOffset = 0; in pccard_read_tuple()
56 tuple.TupleDataMax = 255; in pccard_read_tuple()
57 ret = pccard_get_tuple_data(s, &tuple); in pccard_read_tuple()
60 ret = pcmcia_parse_tuple(&tuple, parse); in pccard_read_tuple()
72 * @parse: buffer where the tuple shall be parsed (or NULL, if no parse)
75 * gets passed the raw tuple, the paresed tuple (if @parse is
84 int (*loop_tuple) (tuple_t *tuple, in pccard_loop_tuple()
88 tuple_t tuple; in pccard_loop_tuple() local
94 dev_warn(&s->dev, "no memory to read tuple\n"); in pccard_loop_tuple()
98 tuple.TupleData = buf; in pccard_loop_tuple()
99 tuple.TupleDataMax = 255; in pccard_loop_tuple()
100 tuple.TupleOffset = 0; in pccard_loop_tuple()
101 tuple.DesiredTuple = code; in pccard_loop_tuple()
102 tuple.Attributes = 0; in pccard_loop_tuple()
104 ret = pccard_get_first_tuple(s, function, &tuple); in pccard_loop_tuple()
106 if (pccard_get_tuple_data(s, &tuple)) in pccard_loop_tuple()
110 if (pcmcia_parse_tuple(&tuple, parse)) in pccard_loop_tuple()
113 ret = loop_tuple(&tuple, parse, priv_data); in pccard_loop_tuple()
118 ret = pccard_get_next_tuple(s, function, &tuple); in pccard_loop_tuple()
154 static int pcmcia_do_loop_config(tuple_t *tuple, cisparse_t *parse, void *priv) in pcmcia_do_loop_config() argument
289 tuple_t *tuple,
300 static int pcmcia_do_loop_tuple(tuple_t *tuple, cisparse_t *parse, void *priv) in pcmcia_do_loop_tuple() argument
304 return loop->loop_tuple(loop->p_dev, tuple, loop->priv_data); in pcmcia_do_loop_tuple()
313 * gets passed the raw tuple and @priv_data.
321 tuple_t *tuple, in pcmcia_loop_tuple() argument
346 * the first tuple, return 0 unconditionally. Create a memory buffer large
347 * enough to hold the content of the tuple, and fill it with the tuple data.
350 static int pcmcia_do_get_tuple(struct pcmcia_device *p_dev, tuple_t *tuple, in pcmcia_do_get_tuple() argument
355 *get->buf = kzalloc(tuple->TupleDataLen, GFP_KERNEL); in pcmcia_do_get_tuple()
357 get->len = tuple->TupleDataLen; in pcmcia_do_get_tuple()
358 memcpy(*get->buf, tuple->TupleData, tuple->TupleDataLen); in pcmcia_do_get_tuple()
365 * pcmcia_get_tuple() - get first tuple from CIS
395 * tuple contains a proper LAN_NODE_ID of length 6, and copy the data
398 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()
415 eth_hw_addr_set(dev, &tuple->TupleData[2]); in pcmcia_do_get_mac()