Lines Matching refs: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;
43 dev_warn(&s->dev, "no memory to read tuple\n");
46 tuple.DesiredTuple = code;
47 tuple.Attributes = 0;
49 tuple.Attributes = TUPLE_RETURN_COMMON;
50 ret = pccard_get_first_tuple(s, function, &tuple);
53 tuple.TupleData = buf;
54 tuple.TupleOffset = 0;
55 tuple.TupleDataMax = 255;
56 ret = pccard_get_tuple_data(s, &tuple);
59 ret = pcmcia_parse_tuple(&tuple, parse);
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,
87 tuple_t tuple;
93 dev_warn(&s->dev, "no memory to read tuple\n");
97 tuple.TupleData = buf;
98 tuple.TupleDataMax = 255;
99 tuple.TupleOffset = 0;
100 tuple.DesiredTuple = code;
101 tuple.Attributes = 0;
103 ret = pccard_get_first_tuple(s, function, &tuple);
105 if (pccard_get_tuple_data(s, &tuple))
109 if (pcmcia_parse_tuple(&tuple, parse))
112 ret = loop_tuple(&tuple, parse, priv_data);
117 ret = pccard_get_next_tuple(s, function, &tuple);
153 static int pcmcia_do_loop_config(tuple_t *tuple, cisparse_t *parse, void *priv)
288 tuple_t *tuple,
299 static int pcmcia_do_loop_tuple(tuple_t *tuple, cisparse_t *parse, void *priv)
303 return loop->loop_tuple(loop->p_dev, tuple, loop->priv_data);
312 * gets passed the raw tuple and @priv_data.
320 tuple_t *tuple,
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,
354 *get->buf = kzalloc(tuple->TupleDataLen, GFP_KERNEL);
356 get->len = tuple->TupleDataLen;
357 memcpy(*get->buf, tuple->TupleData, tuple->TupleDataLen);
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,
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) {
416 dev->dev_addr[i] = tuple->TupleData[i+2];