aboutsummaryrefslogtreecommitdiffstats
path: root/net/caif/caif_socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/caif/caif_socket.c')
-rw-r--r--net/caif/caif_socket.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/net/caif/caif_socket.c b/net/caif/caif_socket.c
index 8ce904786116..fd1f5df0827c 100644
--- a/net/caif/caif_socket.c
+++ b/net/caif/caif_socket.c
@@ -4,6 +4,8 @@
4 * License terms: GNU General Public License (GPL) version 2 4 * License terms: GNU General Public License (GPL) version 2
5 */ 5 */
6 6
7#define pr_fmt(fmt) KBUILD_MODNAME ":%s(): " fmt, __func__
8
7#include <linux/fs.h> 9#include <linux/fs.h>
8#include <linux/init.h> 10#include <linux/init.h>
9#include <linux/module.h> 11#include <linux/module.h>
@@ -157,8 +159,8 @@ static int caif_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
157 159
158 if (atomic_read(&sk->sk_rmem_alloc) + skb->truesize >= 160 if (atomic_read(&sk->sk_rmem_alloc) + skb->truesize >=
159 (unsigned)sk->sk_rcvbuf && rx_flow_is_on(cf_sk)) { 161 (unsigned)sk->sk_rcvbuf && rx_flow_is_on(cf_sk)) {
160 trace_printk("CAIF: %s():" 162 trace_printk("CAIF: %s(): "
161 " sending flow OFF (queue len = %d %d)\n", 163 "sending flow OFF (queue len = %d %d)\n",
162 __func__, 164 __func__,
163 atomic_read(&cf_sk->sk.sk_rmem_alloc), 165 atomic_read(&cf_sk->sk.sk_rmem_alloc),
164 sk_rcvbuf_lowwater(cf_sk)); 166 sk_rcvbuf_lowwater(cf_sk));
@@ -172,8 +174,8 @@ static int caif_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
172 return err; 174 return err;
173 if (!sk_rmem_schedule(sk, skb->truesize) && rx_flow_is_on(cf_sk)) { 175 if (!sk_rmem_schedule(sk, skb->truesize) && rx_flow_is_on(cf_sk)) {
174 set_rx_flow_off(cf_sk); 176 set_rx_flow_off(cf_sk);
175 trace_printk("CAIF: %s():" 177 trace_printk("CAIF: %s(): "
176 " sending flow OFF due to rmem_schedule\n", 178 "sending flow OFF due to rmem_schedule\n",
177 __func__); 179 __func__);
178 dbfs_atomic_inc(&cnt.num_rx_flow_off); 180 dbfs_atomic_inc(&cnt.num_rx_flow_off);
179 caif_flow_ctrl(sk, CAIF_MODEMCMD_FLOW_OFF_REQ); 181 caif_flow_ctrl(sk, CAIF_MODEMCMD_FLOW_OFF_REQ);
@@ -275,8 +277,7 @@ static void caif_ctrl_cb(struct cflayer *layr,
275 break; 277 break;
276 278
277 default: 279 default:
278 pr_debug("CAIF: %s(): Unexpected flow command %d\n", 280 pr_debug("Unexpected flow command %d\n", flow);
279 __func__, flow);
280 } 281 }
281} 282}
282 283
@@ -536,8 +537,7 @@ static int transmit_skb(struct sk_buff *skb, struct caifsock *cf_sk,
536 537
537 /* Slight paranoia, probably not needed. */ 538 /* Slight paranoia, probably not needed. */
538 if (unlikely(loopcnt++ > 1000)) { 539 if (unlikely(loopcnt++ > 1000)) {
539 pr_warning("CAIF: %s(): transmit retries failed," 540 pr_warn("transmit retries failed, error = %d\n", ret);
540 " error = %d\n", __func__, ret);
541 break; 541 break;
542 } 542 }
543 543
@@ -902,8 +902,7 @@ static int caif_connect(struct socket *sock, struct sockaddr *uaddr,
902 cf_sk->maxframe = dev->mtu - (headroom + tailroom); 902 cf_sk->maxframe = dev->mtu - (headroom + tailroom);
903 dev_put(dev); 903 dev_put(dev);
904 if (cf_sk->maxframe < 1) { 904 if (cf_sk->maxframe < 1) {
905 pr_warning("CAIF: %s(): CAIF Interface MTU too small (%d)\n", 905 pr_warn("CAIF Interface MTU too small (%d)\n", dev->mtu);
906 __func__, dev->mtu);
907 err = -ENODEV; 906 err = -ENODEV;
908 goto out; 907 goto out;
909 } 908 }