Lines Matching refs:len
138 BT_DBG("session %p skb %p len %d", session, skb, skb->len); in cmtp_send_capimsg()
150 __u16 function, unsigned char *buf, int len) in cmtp_send_interopmsg() argument
157 if (!(skb = alloc_skb(CAPI_MSG_BASELEN + 6 + len, GFP_ATOMIC))) { in cmtp_send_interopmsg()
162 s = skb_put(skb, CAPI_MSG_BASELEN + 6 + len); in cmtp_send_interopmsg()
164 capimsg_setu16(s, 0, CAPI_MSG_BASELEN + 6 + len); in cmtp_send_interopmsg()
173 capimsg_setu8 (s, 10, 3 + len); in cmtp_send_interopmsg()
175 capimsg_setu8 (s, 13, len); in cmtp_send_interopmsg()
177 if (len > 0) in cmtp_send_interopmsg()
178 memcpy(s + 14, buf, len); in cmtp_send_interopmsg()
190 BT_DBG("session %p skb %p len %d", session, skb, skb->len); in cmtp_recv_interopmsg()
194 if (skb->len < CAPI_MSG_BASELEN + 10) in cmtp_recv_interopmsg()
227 if (skb->len < CAPI_MSG_BASELEN + 11 + sizeof(capi_profile)) in cmtp_recv_interopmsg()
250 if (skb->len < CAPI_MSG_BASELEN + 15) in cmtp_recv_interopmsg()
256 int len = min_t(uint, CAPI_MANUFACTURER_LEN, in cmtp_recv_interopmsg() local
261 skb->data + CAPI_MSG_BASELEN + 15, len); in cmtp_recv_interopmsg()
267 if (skb->len < CAPI_MSG_BASELEN + 32) in cmtp_recv_interopmsg()
282 if (skb->len < CAPI_MSG_BASELEN + 17) in cmtp_recv_interopmsg()
288 int len = min_t(uint, CAPI_SERIAL_LEN, in cmtp_recv_interopmsg() local
293 skb->data + CAPI_MSG_BASELEN + 17, len); in cmtp_recv_interopmsg()
302 if (skb->len < CAPI_MSG_BASELEN + 6) in cmtp_recv_interopmsg()
308 int len = min_t(uint, skb->len - CAPI_MSG_BASELEN - 6, in cmtp_recv_interopmsg() local
313 skb->data + CAPI_MSG_BASELEN + 6, len); in cmtp_recv_interopmsg()
329 BT_DBG("session %p skb %p len %d", session, skb, skb->len); in cmtp_recv_capimsg()
331 if (skb->len < CAPI_MSG_BASELEN) in cmtp_recv_capimsg()
524 int len = 0; in cmtp_ctr_read_proc() local
526 len += sprintf(page + len, "%s\n\n", cmtp_procinfo(ctrl)); in cmtp_ctr_read_proc()
527 len += sprintf(page + len, "addr %s\n", session->name); in cmtp_ctr_read_proc()
528 len += sprintf(page + len, "ctrl %d\n", session->num); in cmtp_ctr_read_proc()
532 len += sprintf(page + len, "appl %d -> %d\n", app->appl, app->mapping); in cmtp_ctr_read_proc()
535 if (off + count >= len) in cmtp_ctr_read_proc()
538 if (len < off) in cmtp_ctr_read_proc()
543 return ((count < len - off) ? count : len - off); in cmtp_ctr_read_proc()