09 Feb, 2011
1 commit
-
rtnl_link_ops->setup(), and the "setup" callback passed to alloc_netdev*(),
cannot make state changes which need to be undone on failure. There is
no cleanup mechanism available at this point.So we have to add the caif private instance to the global list once we
are sure that register_netdev() has succedded in ->newlink().Otherwise, if register_netdev() fails, the caller will invoke free_netdev()
and we will have a reference to freed up memory on the chnl_net_list.Signed-off-by: David S. Miller
16 Jan, 2011
1 commit
-
In the original code we check if (servl == NULL) twice. The first time
should print the message that cfmuxl_remove_uplayer() failed and set
"ret" correctly, but instead it just returns success. The second check
should be checking the value of "ret" instead of "servl".Signed-off-by: Dan Carpenter
Acked-by: Sjur Braendeland
Signed-off-by: David S. Miller
11 Jan, 2011
2 commits
-
Checks version field of IP in the receive path for GPRS/3G data
and appropriately sets the value of skb->protocol.Signed-off-by: Sjur Braendeland
Signed-off-by: David S. Miller -
The size field should not be set until after the data is successfully
copied in.Signed-off-by: Dan Rosenberg
Signed-off-by: David S. Miller
23 Nov, 2010
1 commit
-
Changed Makefile to use -y instead of -objs
because -objs is deprecated and not mentioned in
Documentation/kbuild/makefiles.txt.Also, use the ccflags-$ flag instead of EXTRA_CFLAGS because EXTRA_CFLAGS is
deprecated and should now be switched.Last but not least, took out if-conditionals.
Signed-off-by: Tracey Dent
Signed-off-by: David S. Miller
04 Nov, 2010
2 commits
-
Signed-off-by: Sjur Brændeland
Signed-off-by: David S. Miller -
Changes:
o Bugfix: SO_PRIORITY for SOL_SOCKET could not be handled
in caif's setsockopt, using the struct sock attribute priority instead.o Bugfix: SO_BINDTODEVICE for SOL_SOCKET could not be handled
in caif's setsockopt, using the struct sock attribute ifindex instead.o Wrong assert statement for RFM layer segmentation.
o CAIF Debug channels was not working over SPI, caif_payload_info
containing padding info must be initialized.o Check on pointer before dereferencing when unregister dev in caif_dev.c
Signed-off-by: Sjur Braendeland
Signed-off-by: David S. Miller
07 Oct, 2010
1 commit
-
Conflicts:
drivers/net/pcmcia/pcnet_cs.c
net/caif/caif_socket.c
06 Oct, 2010
1 commit
-
caif_connect() might dereference a netdevice after dev_put() it.
It also doesnt check dev_get_by_index() return value and could
dereference a NULL pointer.Fix it, using RCU to avoid taking a reference.
Signed-off-by: Eric Dumazet
CC: Sjur Braendeland
Signed-off-by: David S. Miller
05 Oct, 2010
1 commit
-
Remove duplicated include.
Signed-off-by: Nicolas Kaiser
Acked-by: Sjur Braendeland
Signed-off-by: David S. Miller
22 Sep, 2010
4 commits
-
CAIF sockets should use socket's default send and receive buffers sizes.
Signed-off-by: Sjur Braendeland
Signed-off-by: David S. Miller -
Check that receive function pointer is not null before calling it.
Signed-off-by: Sjur Braendeland
Signed-off-by: David S. Miller -
Use pr_debug for flow control printouts, and refine an error printout.
Signed-off-by: Sjur Braendeland
Signed-off-by: David S. Miller -
Remove debugging quirk redefining pr_debug to pr_warning.
Signed-off-by: Sjur Brændeland
Signed-off-by: David S. Miller
10 Sep, 2010
1 commit
-
Conflicts:
net/mac80211/main.c
07 Sep, 2010
2 commits
-
Convert pr_("%s" ..., (struct netdev *)->name ...)
to netdev_((struct netdev *), ...)Signed-off-by: Joe Perches
Signed-off-by: David S. Miller -
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_warnThis 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
Signed-off-by: David S. Miller
27 Aug, 2010
1 commit
-
caif does not build on ia64 starting with 2.6.32-rc1. Using
asm/unaligned.h instead of linux/unaligned/le_byteshift.h fixes the issue.include/linux/unaligned/le_byteshift.h:40:50: error: redefinition of 'get_unaligned_le16'
include/linux/unaligned/le_byteshift.h:45:50: error: redefinition of 'get_unaligned_le32'
include/linux/unaligned/le_byteshift.h:50:50: error: redefinition of 'get_unaligned_le64'
include/linux/unaligned/le_byteshift.h:55:51: error: redefinition of 'put_unaligned_le16'
include/linux/unaligned/le_byteshift.h:60:51: error: redefinition of 'put_unaligned_le32'
include/linux/unaligned/le_byteshift.h:65:51: error: redefinition of 'put_unaligned_le64'
include/linux/unaligned/le_struct.h:31:51: note: previous definition of 'put_unaligned_le64' was hereSigned-off-by: Andrew Morton
Signed-off-by: David S. Miller
11 Aug, 2010
1 commit
-
Headroom size for control channel must be at least 48 bytes in some scenarios.
Signed-off-by: Sjur Braendeland
Signed-off-by: David S. Miller
23 Jul, 2010
1 commit
-
Negate has precedence over comparison so the original assert only
checked that "rfml->fragment_size" was larger than 1 or 0.Signed-off-by: Dan Carpenter
Signed-off-by: David S. Miller
29 Jun, 2010
1 commit
-
Use "depends on" instead of "if" in Kconfig files.
Fixed CAIF debug flag, and removed unnecessary clean-* options.Signed-off-by: Sjur Braendeland
Signed-off-by: David S. Miller
21 Jun, 2010
4 commits
-
Added new CAIF protocol type CAIFPROTO_DEBUG for accessing
CAIF debug on the ST Ericsson modems.There are two debug servers on the modem, one for radio related
debug (CAIF_RADIO_DEBUG_SERVICE) and the other for
communication/application related debug (CAIF_COM_DEBUG_SERVICE).The debug connection can contain trace debug printouts or
interactive debug used for debugging and test.Debug connections can be of type STREAM or SEQPACKET.
Signed-off-by: Sjur Braendeland
Signed-off-by: David S. Miller -
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 -
CAIF Remote File Manager may send or receive more than 4050 bytes.
Due to this The CAIF RFM service have to support segmentation.Signed-off-by: Sjur Braendeland@stericsson.com
Signed-off-by: David S. Miller -
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
12 Jun, 2010
1 commit
10 Jun, 2010
1 commit
-
The extra ! character means that these conditions are always false.
Signed-off-by: Dan Carpenter
Acked-by: Sjur Braendeland
Signed-off-by: David S. Miller
31 May, 2010
2 commits
-
"phyinfo" can never be null here because we assigned it an address, so I
removed both the assert and the second check inside the if statement. I
removed the "phyinfo->phy_layer != NULL" check as well because that was
asserted earlier.Walter Harms suggested I move the "phyinfo->phy_ref_count++;" outside
the if condition for readability, so I have done that.Signed-off-by: Dan Carpenter
Acked-by: Sjur Braendeland
Signed-off-by: David S. Miller -
We already dereferenced uaddr towards the start of the function when we
checked that "uaddr->sa_family != AF_CAIF". Both the check here and the
earlier check were added in bece7b2398d0: "caif: Rewritten socket
implementation". Before that patch, we assumed that we recieved a valid
pointer for uaddr, and based on that, I have removed this check.Signed-off-by: Dan Carpenter
Acked-by: Sjur Braendeland
Signed-off-by: David S. Miller
29 May, 2010
1 commit
-
There was an spin_unlock missing on the error path. The spin_lock was
tucked in with the declarations so it was hard to spot. I added a new
line.Signed-off-by: Dan Carpenter
Acked-by: Sjur Brændeland
Signed-off-by: David S. Miller
24 May, 2010
7 commits
-
Fixed handling when skb don't fit in user buffer,
instead of returning -EMSGSIZE, the buffer is truncated (just
as unix seqpakcet does).Signed-off-by: Sjur Braendeland
Signed-off-by: David S. Miller -
Splint found missing spin_unlock.
Corrected this an some other trivial split warnings.Signed-off-by: Sjur Braendeland
Signed-off-by: David S. Miller -
Discovered bug when testing async connect.
While connecting poll should not return POLLHUP,
but POLLOUT when connected.
Also fixed the sysfs flow-control-counters.Signed-off-by: Sjur Braendeland
Signed-off-by: David S. Miller -
Discovered bugs when injecting slab allocation failures.
Add checks on all memory allocation.Signed-off-by: Sjur Braendeland
Signed-off-by: David S. Miller -
Discovered bug when running high number of parallel connect requests.
Replace buggy home brewed list with linux/list.h.Signed-off-by: Sjur Braendeland
Signed-off-by: David S. Miller -
Discovered bug when testing on 64bit architecture.
Fixed by using long to store result from wait_event_interruptible_timeout.Signed-off-by: Sjur Braendeland
Signed-off-by: David S. Miller -
There is already a submenu entry that is always displayed, so there is
no need to also show a dedicated CAIF comment.Drop dead commented code while we're here, and change the submenu text
to better match the style everyone else is using.Signed-off-by: Mike Frysinger
Signed-off-by: David S. Miller
18 May, 2010
2 commits
-
This patch removes from net/ (but not any netfilter files)
all the unnecessary return; statements that precede the
last closing brace of void functions.It does not remove the returns that are immediately
preceded by a label as gcc doesn't like that.Done via:
$ grep -rP --include=*.[ch] -l "return;\n}" net/ | \
xargs perl -i -e 'local $/ ; while (<>) { s/\n[ \t\n]+return;\n}/\n}/g; print; }'Signed-off-by: Joe Perches
Signed-off-by: David S. Miller -
Use kzalloc rather than the combination of kmalloc and memset.
A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)//
@@
expression x,size,flags;
statement S;
@@-x = kmalloc(size,flags);
+x = kzalloc(size,flags);
if (x == NULL) S
-memset(x, 0, size);
//Signed-off-by: Julia Lawall
Acked-by: Sjur Brændeland
Signed-off-by: David S. Miller
29 Apr, 2010
1 commit
-
Signed-off-by: Sjur Braendeland
Signed-off-by: David S. Miller