* [PATCH net-next-2.6 1/3] caif: Minor fixes in log prints.
@ 2010-09-21 21:44 sjur.brandeland
2010-09-21 21:44 ` [PATCH net-next-2.6 2/3] caif: Fix function NULL pointer check sjur.brandeland
2010-09-22 1:07 ` [PATCH net-next-2.6 1/3] caif: Minor fixes in log prints David Miller
0 siblings, 2 replies; 6+ messages in thread
From: sjur.brandeland @ 2010-09-21 21:44 UTC (permalink / raw)
To: davem; +Cc: netdev, Sjur Braendeland, Sjur Braendeland
From: Sjur Braendeland <sjur.braendeland@stericsson.com>
Use pr_debug for flow control printouts, and refine an error printout.
Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
---
net/caif/caif_socket.c | 8 ++------
net/caif/cfcnfg.c | 2 +-
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/net/caif/caif_socket.c b/net/caif/caif_socket.c
index fd1f5df..3943398 100644
--- a/net/caif/caif_socket.c
+++ b/net/caif/caif_socket.c
@@ -159,9 +159,7 @@ static int caif_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
if (atomic_read(&sk->sk_rmem_alloc) + skb->truesize >=
(unsigned)sk->sk_rcvbuf && rx_flow_is_on(cf_sk)) {
- trace_printk("CAIF: %s(): "
- "sending flow OFF (queue len = %d %d)\n",
- __func__,
+ pr_debug("sending flow OFF (queue len = %d %d)\n",
atomic_read(&cf_sk->sk.sk_rmem_alloc),
sk_rcvbuf_lowwater(cf_sk));
set_rx_flow_off(cf_sk);
@@ -174,9 +172,7 @@ static int caif_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
return err;
if (!sk_rmem_schedule(sk, skb->truesize) && rx_flow_is_on(cf_sk)) {
set_rx_flow_off(cf_sk);
- trace_printk("CAIF: %s(): "
- "sending flow OFF due to rmem_schedule\n",
- __func__);
+ pr_debug("sending flow OFF due to rmem_schedule\n");
dbfs_atomic_inc(&cnt.num_rx_flow_off);
caif_flow_ctrl(sk, CAIF_MODEMCMD_FLOW_OFF_REQ);
}
diff --git a/net/caif/cfcnfg.c b/net/caif/cfcnfg.c
index ef93a13..41adafd 100644
--- a/net/caif/cfcnfg.c
+++ b/net/caif/cfcnfg.c
@@ -197,7 +197,7 @@ int cfcnfg_disconn_adapt_layer(struct cfcnfg *cnfg, struct cflayer *adap_layer)
caif_assert(adap_layer != NULL);
channel_id = adap_layer->id;
if (adap_layer->dn == NULL || channel_id == 0) {
- pr_err("adap_layer->id is 0\n");
+ pr_err("adap_layer->dn == NULL or adap_layer->id is 0\n");
ret = -ENOTCONN;
goto end;
}
--
1.6.3.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net-next-2.6 2/3] caif: Fix function NULL pointer check.
2010-09-21 21:44 [PATCH net-next-2.6 1/3] caif: Minor fixes in log prints sjur.brandeland
@ 2010-09-21 21:44 ` sjur.brandeland
2010-09-21 21:44 ` [PATCH net-next-2.6 3/3] caif: Use default send and receive buffer size in caif_socket sjur.brandeland
2010-09-22 1:07 ` [PATCH net-next-2.6 2/3] caif: Fix function NULL pointer check David Miller
2010-09-22 1:07 ` [PATCH net-next-2.6 1/3] caif: Minor fixes in log prints David Miller
1 sibling, 2 replies; 6+ messages in thread
From: sjur.brandeland @ 2010-09-21 21:44 UTC (permalink / raw)
To: davem; +Cc: netdev, Sjur Braendeland
From: Sjur Braendeland <sjur.brandeland@stericsson.com>
Check that receive function pointer is not null before calling it.
Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
---
net/caif/caif_dev.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/caif/caif_dev.c b/net/caif/caif_dev.c
index 0fd01dd..b99369a 100644
--- a/net/caif/caif_dev.c
+++ b/net/caif/caif_dev.c
@@ -173,7 +173,7 @@ static int receive(struct sk_buff *skb, struct net_device *dev,
net = dev_net(dev);
pkt = cfpkt_fromnative(CAIF_DIR_IN, skb);
caifd = caif_get(dev);
- if (!caifd || !caifd->layer.up || !caifd->layer.up->ctrlcmd)
+ if (!caifd || !caifd->layer.up || !caifd->layer.up->receive)
return NET_RX_DROP;
if (caifd->layer.up->receive(caifd->layer.up, pkt))
--
1.6.3.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net-next-2.6 3/3] caif: Use default send and receive buffer size in caif_socket.
2010-09-21 21:44 ` [PATCH net-next-2.6 2/3] caif: Fix function NULL pointer check sjur.brandeland
@ 2010-09-21 21:44 ` sjur.brandeland
2010-09-22 1:07 ` David Miller
2010-09-22 1:07 ` [PATCH net-next-2.6 2/3] caif: Fix function NULL pointer check David Miller
1 sibling, 1 reply; 6+ messages in thread
From: sjur.brandeland @ 2010-09-21 21:44 UTC (permalink / raw)
To: davem; +Cc: netdev, Sjur Braendeland
From: Sjur Braendeland <sjur.brandeland@stericsson.com>
CAIF sockets should use socket's default send and receive buffers sizes.
Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
---
net/caif/caif_socket.c | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
diff --git a/net/caif/caif_socket.c b/net/caif/caif_socket.c
index 3943398..4d918f8 100644
--- a/net/caif/caif_socket.c
+++ b/net/caif/caif_socket.c
@@ -30,9 +30,6 @@
MODULE_LICENSE("GPL");
MODULE_ALIAS_NETPROTO(AF_CAIF);
-#define CAIF_DEF_SNDBUF (4096*10)
-#define CAIF_DEF_RCVBUF (4096*100)
-
/*
* CAIF state is re-using the TCP socket states.
* caif_states stored in sk_state reflect the state as reported by
@@ -1118,10 +1115,6 @@ static int caif_create(struct net *net, struct socket *sock, int protocol,
/* Store the protocol */
sk->sk_protocol = (unsigned char) protocol;
- /* Sendbuf dictates the amount of outbound packets not yet sent */
- sk->sk_sndbuf = CAIF_DEF_SNDBUF;
- sk->sk_rcvbuf = CAIF_DEF_RCVBUF;
-
/*
* Lock in order to try to stop someone from opening the socket
* too early.
--
1.6.3.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-next-2.6 1/3] caif: Minor fixes in log prints.
2010-09-21 21:44 [PATCH net-next-2.6 1/3] caif: Minor fixes in log prints sjur.brandeland
2010-09-21 21:44 ` [PATCH net-next-2.6 2/3] caif: Fix function NULL pointer check sjur.brandeland
@ 2010-09-22 1:07 ` David Miller
1 sibling, 0 replies; 6+ messages in thread
From: David Miller @ 2010-09-22 1:07 UTC (permalink / raw)
To: sjur.brandeland; +Cc: netdev, sjur.braendeland
From: sjur.brandeland@stericsson.com
Date: Tue, 21 Sep 2010 23:44:44 +0200
> From: Sjur Braendeland <sjur.braendeland@stericsson.com>
>
> Use pr_debug for flow control printouts, and refine an error printout.
>
> Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
Applied.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next-2.6 2/3] caif: Fix function NULL pointer check.
2010-09-21 21:44 ` [PATCH net-next-2.6 2/3] caif: Fix function NULL pointer check sjur.brandeland
2010-09-21 21:44 ` [PATCH net-next-2.6 3/3] caif: Use default send and receive buffer size in caif_socket sjur.brandeland
@ 2010-09-22 1:07 ` David Miller
1 sibling, 0 replies; 6+ messages in thread
From: David Miller @ 2010-09-22 1:07 UTC (permalink / raw)
To: sjur.brandeland; +Cc: netdev
From: sjur.brandeland@stericsson.com
Date: Tue, 21 Sep 2010 23:44:45 +0200
> From: Sjur Braendeland <sjur.brandeland@stericsson.com>
>
> Check that receive function pointer is not null before calling it.
>
> Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
Applied.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next-2.6 3/3] caif: Use default send and receive buffer size in caif_socket.
2010-09-21 21:44 ` [PATCH net-next-2.6 3/3] caif: Use default send and receive buffer size in caif_socket sjur.brandeland
@ 2010-09-22 1:07 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2010-09-22 1:07 UTC (permalink / raw)
To: sjur.brandeland; +Cc: netdev
From: sjur.brandeland@stericsson.com
Date: Tue, 21 Sep 2010 23:44:46 +0200
> From: Sjur Braendeland <sjur.brandeland@stericsson.com>
>
> CAIF sockets should use socket's default send and receive buffers sizes.
>
> Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
Applied.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-09-22 1:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-21 21:44 [PATCH net-next-2.6 1/3] caif: Minor fixes in log prints sjur.brandeland
2010-09-21 21:44 ` [PATCH net-next-2.6 2/3] caif: Fix function NULL pointer check sjur.brandeland
2010-09-21 21:44 ` [PATCH net-next-2.6 3/3] caif: Use default send and receive buffer size in caif_socket sjur.brandeland
2010-09-22 1:07 ` David Miller
2010-09-22 1:07 ` [PATCH net-next-2.6 2/3] caif: Fix function NULL pointer check David Miller
2010-09-22 1:07 ` [PATCH net-next-2.6 1/3] caif: Minor fixes in log prints David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).