Commit Graph

16 Commits

Author SHA1 Message Date
Subash Abhinov Kasiviswanathan 4f2dd728e1 net: rmnet_data: Add support to configure custom device name
rmnet_data assigns device name by the order they are created.
This causes problems which multiple processes are trying to
create devices and leads to random device names.

Assign device name as specified by user.

[mikeioannina]: Backport to 3.10

CRs-Fixed: 2018785
Change-Id: Iab8e053c6ccacbeedaa7763e760d0c12e756b5d0
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2018-09-05 18:14:57 +02:00
LuK1337 4e71469c73 Merge tag 'LA.BR.1.3.6-03510-8976.0' into HEAD
Change-Id: Ie506850703bf9550ede802c13ba5f8c2ce723fa3
2017-04-18 12:11:50 +02:00
LuK1337 fc9499e55a Import latest Samsung release
* Package version: T713XXU2BQCO

Change-Id: I293d9e7f2df458c512d59b7a06f8ca6add610c99
2017-04-18 03:43:52 +02:00
Harout Hedeshian 72b7791a7a net: rmnet_data: consolidate VND free work-queue task on force unassociate
Previously, one new work-queue item was created and scheduled with
schedule_work() for each VND getting unregistered. Since we know the
exact set of VNDs which need to be cleared ahead of time, the VNDs
are added to a list and freed at the same time with a single work-queue
task. This saves us from having to malloc/schedule/free for each
VND and provides a speed up on some low tier hardware.

CRs-Fixed: 738039
Change-Id: I02d4de1308a2aed9d493f6fd58cf0984265facba
Acked-by: Nagarjuna Chaganti <nchagant@qti.qualcomm.com>
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2015-02-24 16:32:20 -07:00
Harout Hedeshian 968eea64c1 net: rmnet_data: Add trace points for device force unassociation
Added trace points to debug processing time of rmnet_config_notify_cb.
Additionally, tracepoints were added for succesfull associate/unassociate
events. Needed to debug unusually slow cleanup.

New trace points are:
rmnet_unregister_cb_unhandled
rmnet_unregister_cb_entry
rmnet_unregister_cb_exit
rmnet_unregister_cb_clear_vnds
rmnet_unregister_cb_clear_lepcs
rmnet_associate
rmnet_unassociate

Change-Id: I0269435d9c7234ef21092ba13510fff106a1966f
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
2014-12-30 13:35:56 -07:00
Harout Hedeshian 968daf1632 net: rmnet_data: Close the VND before freeing endpoint configuration
Whenever handling a force-unassociate, make sure the device is closed
before freeing the logical endoint configuration. Whenever the endpoint
config is cleared, the egress device is set to null. This can cause null
pointer dereference if the endpoint config is cleared at the same time a
packet is being transmitted.

[  479.906025] [RMNET:HI] rmnet_config_notify_cb(): Kernel is trying to un
register rmnet_ipa0
[  479.913428] Unable to handle kernel NULL pointer dereference at virtual
address 000002c0
[  480.068123] [<ffffffc000c73608>] rmnet_egress_handler+0x30/0x2bc
[  480.074109] [<ffffffc000c728e8>] rmnet_vnd_start_xmit+0x108/0x13c
[  480.080192] [<ffffffc000ae42ec>] dev_hard_start_xmit+0x260/0x484
[  480.086178] [<ffffffc000afd390>] sch_direct_xmit+0x68/0x198
[  480.091732] [<ffffffc000afd5b0>] __qdisc_run+0xf0/0x140
[  480.096938] [<ffffffc000ae4794>] dev_queue_xmit+0x284/0x400

Change-Id: Ib87b123dc565b087374dfde6d3c40ddccf2a257d
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
2014-12-29 08:41:42 -07:00
Subash Abhinov Kasiviswanathan 10f58a4316 net: rmnet_data: add cleanup in rmnet_config_exit
Add a call to unregister_netdevice_notifier in rmnet_config_exit,
and fix some compilation warnings.

CRs-Fixed: 633585
Change-Id: I0e61c5460b927c3348f4e9815bbd9f842488f14d
Acked-by: Sivan Reinstein <sivanr@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2014-04-09 23:25:30 -06:00
Harout Hedeshian acba8da49f net: rmnet_data: Support for NETLINK getters
Added support for RMNET_NETLINK_GET_LOGICAL_EP_CONFIG
and RMNET_NETLINK_GET_NETWORK_DEVICE_ASSOCIATED in the
rmnet_data configuration module.

CRs-fixed: 599231
Change-Id: Ib5eeb4a37f80a4df19cb3c1ef02ec477f5445740
Acked-by: David Arinzon <darinzon@qti.qualcomm.com>
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
2014-04-01 08:57:28 -06:00
Harout Hedeshian 25cc820560 net: rmnet_data: Clear VNDs upon physical device unregistration
Clear out VNDs which have their egress device pointing to an interface
which is trying to unregister from the network stack. Required to prevent
systems hangs on unexpected shutdown/reboot of the device.

CRs-Fixed: 638324
Change-Id: I406270fee9feb1f9673b3391ce51c11e8e6c9d81
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
2014-04-01 08:53:44 -06:00
Harout Hedeshian 1070484ab7 net: rmnet_data: Enhance logging macros to remove duplicated code
Logging macros now enforce that function names are printed, and
newlines are inserted at the end. The start of log messages are
now standardize.

CRs-Fixed: 600629
Change-Id: I91dae00c331af80954b93eba1f7be2889c569276
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
2014-01-24 08:15:03 -07:00
Harout Hedeshian 0a6fdc0f7b net: rmnet_data: Add support for guaranteed padding
Added new parameter tail_spacing to
RMNET_NETLINK_SET_LINK_INGRESS_DATA_FORMAT in order to support
an additional fixed padding on packets. Required to support RNDIS
tethering.

CRs-Fixed: 579184
Change-Id: I58bbbfbaa68a28b25a96f52b04165285de9c24ef
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
2014-01-24 08:14:46 -07:00
Harout Hedeshian 65a25aecea net: rmnet_data: Handle device unregister notifications
Gracefully handle device unregister notifications. Cleans
up any logical endpoints configured on a physical devices
and then unassociates it. Required to prevent crash if
references are held too long.

CRs-Fixed: 596227
Change-Id: I02d08e07e74510b7a8dffbefa99e651e0100db23
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
2014-01-18 10:16:59 -07:00
Harout Hedeshian 96b90ce3b0 net: rmnet_data: Enhancements to support SSR
Cleaned up refcount on get_dev_by_name.
Added new APIs to support cleanup of configuration and virtual devices.
Added explicit reference managment in association/un-association
and when setting/unsetting logical EP.

CRs-Fixed: 596227
Change-Id: Ic67bb649b0f0420d9a1e4bf5664ed63c0ff7d8bf
Signed-off-by: Harout Hadeshian <harouth@codeaurora.org>
2014-01-18 10:16:54 -07:00
Harout Hedeshian c9132a2781 net: rmnet_data: In-band flow control
Implement MAP based in-band flow control. Added 2 new configuration
messages to allow adding and deleting flow handles. Added handlers
in VND for flow control events. Added flow control command handler
in rmnet_map_commands.

CRs-fixed: 568534
Change-Id: Ica52e4ad89430c9fa5e2b38e389ee6bc91de2e9b
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
2013-11-19 13:12:47 -08:00
Harout Hedeshian bc0019b052 net: rmnet_data: Add support for user defined device name prefix
Run-time user space components can now specify virtual network device
name prefix at device creation. This will be used to support legacy
data services.

CRs-Fixed: 555507
Change-Id: Id34c2761f2060e66b05c521304d5151620ba5665
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
2013-10-21 14:43:13 -06:00
Harout Hedeshian 3858fdc45c RmNet Data: Initial release
RmNet Data driver provides a transport agnostic MAP (multiplexing and
aggregation protocol) support in embedded and bridge modes. Module
provides virtual network devices which can be attached to any IP-mode
physical device. This will be used to provide all MAP functionality
on future hardware in a single consistent location.

CRs-Fixed: 525675
Change-Id: I739947c9c3de008974dd485a74e9953ba2cbb75e
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
2013-09-27 15:48:02 -06:00