Lines Matching refs:pl
86 p.pl = 0; in irda_insert_no_value()
92 irda_param_pack(buf, "bb", p.pi, p.pl); in irda_insert_no_value()
113 irda_param_unpack(buf, "bb", &p.pi, &p.pl); in irda_extract_no_value()
138 p.pl = type & PV_MASK; /* The integer type codes the lenght as well */ in irda_insert_integer()
151 if (p.pl == 0) { in irda_insert_integer()
154 p.pl = 1; in irda_insert_integer()
157 p.pl = 2; in irda_insert_integer()
160 p.pl = 4; /* Default length */ in irda_insert_integer()
164 if (len < (2+p.pl)) { in irda_insert_integer()
168 IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d, pi=%d\n", __FUNCTION__, p.pi, p.pl, p.pv.i); in irda_insert_integer()
169 switch (p.pl) { in irda_insert_integer()
171 n += irda_param_pack(buf, "bbb", p.pi, p.pl, (__u8) p.pv.i); in irda_insert_integer()
178 n += irda_param_pack(buf, "bbs", p.pi, p.pl, (__u16) p.pv.i); in irda_insert_integer()
185 n += irda_param_pack(buf, "bbi", p.pi, p.pl, p.pv.i); in irda_insert_integer()
189 WARNING("%s() length %d not supported\n", __FUNCTION__, p.pl); in irda_insert_integer()
194 return p.pl+2; /* Inserted pl+2 bytes */ in irda_insert_integer()
212 p.pl = buf[1]; /* Extract lenght of value */ in irda_extract_integer()
214 extract_len = p.pl; /* Default : extract all */ in irda_extract_integer()
217 if (len < (2+p.pl)) { in irda_extract_integer()
219 "Need %d bytes, but len is only %d\n", __FUNCTION__, p.pl, len); in irda_extract_integer()
228 if (((type & PV_MASK) != PV_INTEGER) && ((type & PV_MASK) != p.pl)) { in irda_extract_integer()
231 __FUNCTION__, type & PV_MASK, p.pl); in irda_extract_integer()
239 if((p.pl < (type & PV_MASK)) || (type & PV_BIG_ENDIAN)) { in irda_extract_integer()
241 return p.pl+2; in irda_extract_integer()
268 WARNING("%s() length %d not supported\n", __FUNCTION__, p.pl); in irda_extract_integer()
271 return p.pl+2; in irda_extract_integer()
274 IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d, pi=%d\n", __FUNCTION__, p.pi, p.pl, p.pv.i); in irda_extract_integer()
280 return p.pl+2; /* Extracted pl+2 bytes */ in irda_extract_integer()
299 p.pl = buf[1]; /* Extract lenght of value */ in irda_extract_string()
301 IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d\n", __FUNCTION__, p.pi, p.pl); in irda_extract_string()
304 if (len < (2+p.pl)) { in irda_extract_string()
306 "Need %d bytes, but len is only %d\n", __FUNCTION__, p.pl, len); in irda_extract_string()
312 strncpy(str, buf+2, p.pl); in irda_extract_string()
318 str[p.pl+1] = '\0'; in irda_extract_string()
327 return p.pl+2; /* Extracted pl+2 bytes */ in irda_extract_string()
342 p.pl = buf[1]; /* Extract lenght of value */ in irda_extract_octseq()
345 if (len < (2+p.pl)) { in irda_extract_octseq()
347 "Need %d bytes, but len is only %d\n", __FUNCTION__, p.pl, len); in irda_extract_octseq()
353 return p.pl+2; /* Extracted pl+2 bytes */ in irda_extract_octseq()