23 May, 2011
4 commits
-
In case of checksum error, the framing layer returns -EILSEQ, but
does not free the packet. Plug this hole by freeing the packet if
-EILSEQ is returned.Signed-off-by: Sjur Brændeland
Signed-off-by: David S. Miller -
Fix spinlock bugs when running out of link-ids in loopback tests and
avoid allocating link-id when error is set in link-setup-response.Signed-off-by: Sjur Brændeland
Signed-off-by: David S. Miller -
CAIF Socket layer - caif_socket.c:
- Plug mem-leak at reconnect.
- Always call disconnect to cleanup CAIF stack.
- Disconnect will always report success.CAIF configuration layer - cfcnfg.c
- Disconnect must dismantle the caif stack correctly
- Protect against faulty removals (check on id zero)CAIF mux layer - cfmuxl.c
- When inserting new service layer in the MUX remove
any old entries with the same ID.
- When removing CAIF Link layer, remove the associated
service layers before notifying service layers.Signed-off-by: Sjur Brændeland
Signed-off-by: David S. Miller -
Add check on layer->dn != NULL before calling functions in
layer below.Signed-off-by: Sjur Brændeland
Signed-off-by: David S. Miller
16 May, 2011
10 commits
-
Signed-off-by: Sjur Brændeland
Signed-off-by: David S. Miller -
Race condition caused debugfs_create_dir() to fail due to duplicate
name. Use atomic counter to create unique directory name.net_ratelimit() is introduced to limit debug printouts.
Signed-off-by: Sjur Brændeland
Signed-off-by: David S. Miller -
Do proper handling of dev_queue_xmit errors in order to
avoid double free of skb and leaks in error conditions.
In cfctrl pending requests are removed when CAIF Link layer goes down.Signed-off-by: Sjur Brændeland
Signed-off-by: David S. Miller -
Use struct net to reference CAIF configuration object instead of static variables.
Refactor functions caif_connect_client, caif_disconnect_client and squach
files cfcnfg.c and caif_config_utils.Signed-off-by: Sjur Brændeland
Signed-off-by: David S. Miller -
CAIF Socket Layer and ip-interface registers reference counters
in CAIF service layer. The functions sock_hold, sock_put and
dev_hold, dev_put are used by CAIF Stack to protect from freeing
memory while packets are in-flight.Signed-off-by: Sjur Brændeland
Signed-off-by: David S. Miller -
Instead of having reference counts in caif service layers,
we hook into existing refcount handling in socket layer and netdevice.Signed-off-by: Sjur Brændeland
Signed-off-by: David S. Miller -
Introduce Per-cpu reference for lower part of CAIF Stack.
Before freeing payload is disabled, synchronize_rcu() is called,
and then ref-count verified to be zero.Signed-off-by: Sjur Brændeland
Signed-off-by: David S. Miller -
RCU lists are used for handling the link layers instead of array.
When generating CAIF phy-id, ifindex is used as base. Legal range is 1-6.
Introduced set_phy_state() for managing CAIF Link layer state.Signed-off-by: Sjur Brændeland
Signed-off-by: David S. Miller -
RCU read_lock and refcount is used to protect in-flight packets.
Use RCU and counters to manage freeing lower part of the CAIF stack if
CAIF-link layer is removed. Old solution based on delaying removal of
device is removed.When CAIF link layer goes down the use of CAIF link layer is disabled
(by calling caif_set_phy_state()), but removal and freeing of the
lower part of the CAIF stack is done when Link layer is unregistered.Signed-off-by: Sjur Brændeland
Signed-off-by: David S. Miller -
Replace spin_lock with rcu_read_lock when accessing lists to layers
and cache. While packets are in flight rcu_read_lock should not be held,
instead ref-counters are used in combination with RCU.Signed-off-by: Sjur Brændeland
Signed-off-by: David S. Miller
18 Apr, 2011
1 commit
-
The variable 'caifdef' is set but unused in modemcmd().
Similarly for 'net' in receive(), and 'res' in
caif_device_notify() and caif_exit_net().Just kill them off.
Signed-off-by: David S. Miller
12 Apr, 2011
5 commits
-
Signed-off-by: Sjur Brændeland
Signed-off-by: David S. Miller -
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
Signed-off-by: David S. Miller -
Cleanup of new CAIF code.
* make local functions static
* remove code that is never used
* expand get_caif_conf() since wrapper is no longer needed
* make args to comparison functions const
* rename connect_req_to_link_param to keep exported names
consistentCompile tested only.
Signed-off-by: Stephen Hemminger
Acked-by: Sjur Brændeland
Signed-off-by: David S. Miller -
In the CAIF Payload message the Packet Type indication must be set to
UNCLASSIFIED in order to allow packet prioritization in the modem's
network stack. Otherwise TCP-Ack is not prioritized in the modems
transmit queue.Signed-off-by: Sjur Brændeland
Signed-off-by: David S. Miller -
Signed-off-by: Sjur Brændeland
Signed-off-by: David S. Miller
31 Mar, 2011
1 commit
-
Fixes generated by 'codespell' and manually reviewed.
Signed-off-by: Lucas De Marchi
09 Feb, 2011
2 commits
-
Conflicts:
drivers/net/e1000e/netdev.c -
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
20 Jan, 2011
1 commit
-
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
Acked-by: Sjur Braendeland
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