Lines Matching refs: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;
44 dev_warn(&s->dev, "no memory to read tuple\n");
47 tuple.DesiredTuple = code;
48 tuple.Attributes = 0;
50 tuple.Attributes = TUPLE_RETURN_COMMON;
51 ret = pccard_get_first_tuple(s, function, &tuple);
54 tuple.TupleData = buf;
55 tuple.TupleOffset = 0;
56 tuple.TupleDataMax = 255;
57 ret = pccard_get_tuple_data(s, &tuple);
60 ret = pcmcia_parse_tuple(&tuple, parse);
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,
88 tuple_t tuple;
94 dev_warn(&s->dev, "no memory to read tuple\n");
98 tuple.TupleData = buf;
99 tuple.TupleDataMax = 255;
100 tuple.TupleOffset = 0;
101 tuple.DesiredTuple = code;
102 tuple.Attributes = 0;
104 ret = pccard_get_first_tuple(s, function, &tuple);
106 if (pccard_get_tuple_data(s, &tuple))
110 if (pcmcia_parse_tuple(&tuple, parse))
113 ret = loop_tuple(&tuple, parse, priv_data);
118 ret = pccard_get_next_tuple(s, function, &tuple);
154 static int pcmcia_do_loop_config(tuple_t *tuple, cisparse_t *parse, void *priv)
289 tuple_t *tuple,
300 static int pcmcia_do_loop_tuple(tuple_t *tuple, cisparse_t *parse, void *priv)
304 return loop->loop_tuple(loop->p_dev, tuple, loop->priv_data);
313 * gets passed the raw tuple and @priv_data.
321 tuple_t *tuple,
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,
355 *get->buf = kzalloc(tuple->TupleDataLen, GFP_KERNEL);
357 get->len = tuple->TupleDataLen;
358 memcpy(*get->buf, tuple->TupleData, tuple->TupleDataLen);
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,
403 if (tuple->TupleData[0] != CISTPL_FUNCE_LAN_NODE_ID)
405 if (tuple->TupleDataLen < ETH_ALEN + 2) {
406 dev_warn(&p_dev->dev, "Invalid CIS tuple length for "
411 if (tuple->TupleData[1] != ETH_ALEN) {
415 eth_hw_addr_set(dev, &tuple->TupleData[2]);