summaryrefslogtreecommitdiffstats
path: root/net/caif/cfutill.c
Commit message (Collapse)AuthorAgeFilesLines
* treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194Thomas Gleixner2019-05-301-1/+1
| | | | | | | | | | | | | | | | | | | | | Based on 1 normalized pattern(s): license terms gnu general public license gpl version 2 extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 161 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Reviewed-by: Steve Winslow <swinslow@gmail.com> Reviewed-by: Richard Fontana <rfontana@redhat.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190528170027.447718015@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* net: caif: fix the value of size argument of snprintfswkhack2019-05-171-1/+1
| | | | | | | | Because the function snprintf write at most size bytes(including the null byte).So the value of the argument size need not to minus one. Signed-off-by: swkhack <swkhack@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* caif: Remove my bouncing email address.sjur.brandeland@stericsson.com2013-04-231-1/+1
| | | | | | | | | | Remove my soon bouncing email address. Also remove the "Contact:" line in file header. The MAINTAINERS file is a better place to find the contact person anyway. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* caif: Fix for a race in socket transmit with flow control.Dmitry Tarnyagin2012-03-111-1/+4
| | | | | | | | | | Kill faulty checks on flow-off leading to connection drop at race conditions. caif_socket checks for flow-on before transmitting and goes to sleep or return -EAGAIN upon flow stop. Remove faulty subsequent checks on flow-off leading to connection drop. Also fix memory leaks on some of the errors paths. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* caif: Remove OOM messages, use kzallocJoe Perches2011-08-281-5/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | Remove per site OOM messages because they duplicate the generic mm subsystem OOM message. Use kzalloc instead of kmalloc/memset when next to the OOM message removals. Reduces object size (allyesconfig ~2%) $ size -t drivers/net/caif/built-in.o.old net/caif/built-in.o.old text data bss dec hex filename 32297 700 8224 41221 a105 drivers/net/caif/built-in.o.old 72159 1317 20552 94028 16f4c net/caif/built-in.o.old 104456 2017 28776 135249 21051 (TOTALS) $ size -t drivers/net/caif/built-in.o.new net/caif/built-in.o.new text data bss dec hex filename 31975 700 8184 40859 9f9b drivers/net/caif/built-in.o.new 70748 1317 20152 92217 16839 net/caif/built-in.o.new 102723 2017 28336 133076 207d4 (TOTALS) Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* caif: Don't resend if dev_queue_xmit fails.Sjur Brændeland2011-04-121-6/+1Star
| | | | | | | | | If CAIF Link Layer returns an error, we no longer try to re-build the CAIF packet and resend it. Instead, we simply return any transmission errors to the socket client. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: cleanup unused macros in net directoryShan Wei2011-01-201-1/+1
| | | | | | | | | | | Clean up some unused macros in net/*. 1. be left for code change. e.g. PGV_FROM_VMALLOC, PGV_FROM_VMALLOC, KMEM_SAFETYZONE. 2. never be used since introduced to kernel. e.g. P9_RDMA_MAX_SGE, UTIL_CTRL_PKT_SIZE. Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com> Acked-by: Sjur Braendeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/caif: Use pr_fmtJoe Perches2010-09-071-6/+6
| | | | | | | | | | | | | | | This patch standardizes caif message logging prefixes. Add #define pr_fmt(fmt) KBUILD_MODNAME ":%s(): " fmt, __func__ Add missing "\n"s to some logging messages Convert pr_warning to pr_warn This changes the logging message prefix from CAIF: to caif: for all uses but caif_socket.c and chnl_net.c. Those now use their filename without extension. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* caif: Use link layer MTU instead of fixed MTUSjur Braendeland2010-06-211-6/+0Star
| | | | | | | | | Previously CAIF supported maximum transfer size of ~4050. The transfer size is now calculated dynamically based on the link layers mtu size. Signed-off-by: Sjur Braendeland@stericsson.com Signed-off-by: David S. Miller <davem@davemloft.net>
* caif: Bugfix not all services uses flow-ctrl.Sjur Braendeland2010-06-211-1/+1
| | | | | | | | | Flow control is not used by all CAIF services. The usage of flow control is now part of the gerneal initialization function for CAIF Services. Signed-off-by: Sjur Braendeland@stericsson.com Signed-off-by: David S. Miller <davem@davemloft.net>
* net-caif: add CAIF core protocol stackSjur Braendeland2010-03-311-0/+115
CAIF generic protocol implementation. This layer is somewhat generic in order to be able to use and test it outside the Linux Kernel. cfctrl.c - CAIF control protocol layer cfdbgl.c - CAIF debug protocol layer cfdgml.c - CAIF datagram protocol layer cffrml.c - CAIF framing protocol layer cfmuxl.c - CAIF mux protocol layer cfrfml.c - CAIF remote file manager protocol layer cfserl.c - CAIF serial (fragmentation) protocol layer cfsrvl.c - CAIF generic service layer functions cfutill.c - CAIF utility protocol layer cfveil.c - CAIF AT protocol layer cfvidl.c - CAIF video protocol layer Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>