Commit graph

61 commits

Author SHA1 Message Date
Kaustubh Pandey
e7cdcf9e03 datarmnet: Remove monaco_go and monaco_go_aon from BOARD_PLATFORM_LIST
For wearable line of devices derived from monaco, monaco will be used as
TARGET_BOARD_PLATFORM. Change removes others variants which were added
to support _go and _go_aon variants.

Change-Id: Id3ef3aa94ad0c80701260417d92eecf1b96558dd
Signed-off-by: Kaustubh Pandey <quic_kapandey@quicinc.com>
2022-01-31 16:59:29 +05:30
Weiyi Chen
c72e4b0e83 rmnet_core: fix race condition in rmnet_get_packets
In rmnet powersave work, rmnet_get_packets() could access NULL dev pointer
if rmnet_dellink() is nullifying the dev pointer at the same time.

18377 [   72.651710][ T1527] Unable to handle kernel NULL pointer dereference
at virtual address 00000000000009d0

18424 [   72.653999][ T1527] Call trace:
18425 [   72.654085][ T1527]  rmnet_get_packets+0xc4/0x11c [rmnet_core]
18426 [   72.654170][ T1527]  qmi_rmnet_check_stats_2+0x80/0x410 [rmnet_core]
18427 [   72.654180][ T1527]  process_one_work+0x260/0x804

This change Uses the rcu variant of the hlist traversal function in
rmnet_get_packet for safe concurrency with the hlist del primitives.
It also checks dev pointer before accessing the dev private structure.
The existing synchronize rcu call in rmnet_dellink ensures that the ep
and dev structure are not freed while being referenced in rcu read
session of rmnet_get_packets.

Change-Id: Ib5f5aff6e76f9fffd9110a2aa924ad6ab090991f
Signed-off-by: Weiyi Chen <quic_weiyic@quicinc.com>
2022-01-25 13:23:06 -08:00
Weiyi Chen
21e13df826 dfc: fix use-after-free
When IPA failed to send a QMAP packet, the skb is freed in IPA so
accessing the skb after IPA failure will result in use-after-free.

Remove the skb access after IPA send failure.

Change-Id: Id12894a8f4cc3d7bec717413d48f2430e1c959cf
Signed-off-by: Weiyi Chen <quic_weiyic@quicinc.com>
2021-12-07 13:33:15 -08:00
Weiyi Chen
8c4afb2b42 dfc: reset tx queue
When a bearer is removed, calling qdisc reset on a tx queue
could have a race condition with qdisc dequeue for lockless
qdisc such as pfifo_fast.

This change uses a different mechanism not relying on qdisc
implementation to achieve packet purge on bearer remove.

Change-Id: I8f9201809853b07293896d6cb8e010e9e0904e46
Signed-off-by: Weiyi Chen <quic_weiyic@quicinc.com>
2021-10-14 12:31:07 -07:00
Weiyi Chen
37ee4eb551 dfc: not caching grant for removed bearers
If a grant indication for a bearer has "removed" flag set, caching
the bearer could lead to data stall for the next data call because
modem will not send grant for this bearer during powersave.

Do not cache grant for the removed or disabled bearers. Also make sure
a bearer is flow enabled when it is associated with a tx queue.

Change-Id: I7eca597e3cc7d5a0bfe523201c454fb45e66a3a0
Signed-off-by: Weiyi Chen <quic_weiyic@quicinc.com>
2021-10-14 12:09:15 -07:00
Komal Maheshwari
a6f6879bc6 datarmnet: compilation fix for ks sync path
Change-Id: Iae1161d91e6abaa0c307fde978824d3f46820ac9
2021-08-21 13:47:10 +05:30
qctecmdr
d071e6b448 Merge "monaco_go_aon: add monaco_go_aon PLATFORMS_LIST" 2021-06-30 03:39:32 -07:00
shouyi Hu
261c24f7ce monaco_go_aon: add monaco_go_aon PLATFORMS_LIST
add monaco_go_aon in RMNET_CORE_DLKM_PLATFORMS_LIST
add monaco_go_aon in DATA_DLKM_BOARD_PLATFORMS_LIST

Change-Id: I7df542c27d3070df98d12ba136508671dda8f469
2021-06-20 15:51:12 +08:00
Subash Abhinov Kasiviswanathan
171009e7ac dfc: hold wakelock while powersave timer is running
Powersave alarm timer could fail and delay suspend for 2 seconds
if the timer expires in 2 seconds. Change to hold a wakelock for
the actual duration of the timer so the suspend can be triggered
after timer expiration without delay.

Change-Id: Icc3cb835d4e174955e128c5a0c80198513213b2d
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2021-06-18 10:49:05 -07:00
Subash Abhinov Kasiviswanathan
82d77d9ec4 dfc_qmi: Honor tcp ancillary bit even when there is no change in grant
The tcp ancillary bit has been updated to be sent in almost all cases
unlike earlier where this was sent in case of TCP DL traffic.
This bit will now not be set only in case of adverse scenarios, so
this change ensures that the ACK queue state is updated in case the
ancillary bit is unset.

CRs-Fixed: 2957344
Change-Id: I4e1f26c9d3fabc64401284e36b48d82a4f3a5161
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2021-06-01 11:58:10 -06:00
Kaustubh Pandey
357a4b32f4 datarmnet: Add support for monaco_go
Support added for monaco_go such that modules will be compiled
for monaco_go platform as well.

Change-Id: I84dcb542cef7ee88dbe1d61447512230819134c4
Signed-off-by: Kaustubh Pandey <kapandey@codeaurora.org>
2021-03-16 10:37:43 +05:30
Subash Abhinov Kasiviswanathan
b4d76675a6 rmnet_core: Add support for qmap steering
Change SHS hooks to allow for potential qmap steering.

CR-Fixed: 2851435
Change-Id: I86c49b7b2634a66606c536166b15ce5e2e629061
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2021-01-11 15:05:44 -08:00
Subash Abhinov Kasiviswanathan
c6b88d0bc9 rmnet_core: memset before sending genl response
Ensure that the generic netlink response has a memset payload
before sending to userspace.

Change-Id: Ie2fa92ce80bb3c0716e779cebeaedb2d31d759c1
Acked-by: Ryan Chapman <rchapman@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2021-01-05 13:11:56 -07:00
Chinmay Agarwal
607125c52c datarmnet: Enable rmnet_core and rmnet_ctl for monaco
Enabling rmnet_core and rmnet_ctl for monaco target.

Change-Id: I55a7e50ae9b79090588d745240e139a789d302e0
Signed-off-by: Chinmay Agarwal <chinagar@codeaurora.org>
2020-11-18 22:34:39 -08:00
Subash Abhinov Kasiviswanathan
c859bb1d2b core: Fix incorrect receive packet handling during cleanup
During rmnet unregistration, the real device rx_handler is first cleared
followed by the removal of rx_handler_data after the rcu synchronization.

Any packets in the receive path may observe that the rx_handler is NULL.
However, there is no check when dereferencing this value to use the
rmnet_port information.

This fixes following splat by adding the NULL check.

Unable to handle kernel NULL pointer dereference at virtual
address 000000000000000d
pc : rmnet_rx_handler+0x124/0x284
lr : rmnet_rx_handler+0x124/0x284
 rmnet_rx_handler+0x124/0x284
 __netif_receive_skb_core+0x758/0xd74
 __netif_receive_skb+0x50/0x17c
 process_backlog+0x15c/0x1b8
 napi_poll+0x88/0x284
 net_rx_action+0xbc/0x23c
 __do_softirq+0x20c/0x48c

CRs-Fixed: 2818544
Change-Id: I766db0b75469f2f049eb226daa7de9ba413d8f59
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-11-13 09:42:52 -07:00
Subash Abhinov Kasiviswanathan
b8fea6fab4 qmi_rmnet: Remove WQ_MEM_RECLAIM from rmnet_ps_wq
Previously wq was designated as WQ_MEM_RECLAIM.
Remove this as it is unnessesary and will result in all notifier
queueing of work and to also be on wqs designated as WQ_MEM_RECLAIM.

Change-Id: I3248e3aef1594b93c16a1ab8c7c6740d53f68886
Acked-by: Raul Martinez <mraul@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-11-09 15:47:42 -08:00
qctecmdr
9c8929e94c Merge "rmnet_core: check tcp flags when segmenting packets" 2020-11-07 16:11:27 -08:00
Sean Tranchetti
253b60e402 rmnet_core: check tcp flags when segmenting packets
Now that the hardware will coalesce additional flags into the RSC frame,
we must check the TCP flags explicitly and remove ones that make no sense
when segmenting the RSC frame for any reason.

In particular, we must check for TCP_FIN, and clear this flag from any
segmetents of the RSSC frame except the last to avoid breaking the TCP
stream integrity.

Change-Id: I7f80437991821ab29cd190a9d5bd45e9cdb4c333
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
2020-10-30 15:48:13 -07:00
Subash Abhinov Kasiviswanathan
398da54894 dfc: release WDA client eariler
During SSR, release QMI WDA client before waiting for transaction
to expire to reduce wait time.

Change-Id: I1e60e3830e82f59a86d9d088840f8e1df80e6065
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-10-27 13:47:58 -07:00
Sean Tranchetti
1b7901268f rmnet_core: Pass correct size to skb_copy_bits
When copying the QMAP header during deaggregation, the size of the data
to copy was incorrectly passed to skb_copy_bits() as the size of the
pointer instead of the struct. This lead to copying more data onto the
stack than there was room for.

Change-Id: I19208a8df2d8ce25a22fff95b71f1c56dcddec89
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
2020-09-21 13:19:07 -06:00
qctecmdr
f2824c85f0 Merge "rmnet_core: Check for contiguous QMAP headers during deaggregation" 2020-09-16 10:14:36 -07:00
Sean Tranchetti
4ede88477b rmnet_core: Check for contiguous QMAP headers during deaggregation
After the introduction of scatter gather support, it's possible that the
QMAP headers may be split across pages. This patch adds proper handling
for the headers during deaggregation from the original SKB from the
physical device when building the descriptors used elsewhere in the rmnet
driver.

Change-Id: If62cf8b4993fe01b6f43e9f16f08c134d18437b8
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
2020-09-15 14:19:36 -06:00
Subash Abhinov Kasiviswanathan
7360fe16c5 core: Update IID every time netdevice is brought down
This is done to randomize the IPv6 address generation.
This also assigns a different IID to every rmnet interface.

CRs-Fixed: 2771389
Change-Id: I427481f1eeda098a2ebbd0c8ce88030eb0cd6cfd
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-09-10 22:36:24 -06:00
Sean Tranchetti
8a3c6765f1 rmnet_core: fix static analysis errors
Fix warnings introduced by the introduction of scatter-gather support.

Change-Id: I0a12f19a1572989d259e6d8b5b12146a7c5c7cd1
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
2020-09-03 12:10:20 -06:00
Kaustubh Pandey
9bb1108695 datarmnet: Enable rmnet_core and rmnet_ctl for holi
Change-Id: Ide8d3c4d849c7c45207baba77dd0153f00bf4295
2020-08-23 22:24:00 -07:00
Sean Tranchetti
06bf42ec24 rmnet_core: Allow scatter-gather on the DL path
This patch adds the necessary handling for the physical device driver to
use multiple pages to hold data in the SKBs. Essentially, the following
changes are implemented:
  - rmnet_frag_descriptor struct now hold a list of frags, instead of a
    single one. Pushing, pulling, and trimming APIs are updated to use
    this new format.
  - QMAP deaggregation now loops over each element in skb_shinfo->frags
    looking for data. Packets are allowed to be split across mutliple
    pages. All pages containing data for a particular packet will be added
    to the frag_descriptor struct representing it.
  - a new API, rmnet_frag_header_ptr() has been added for safely accessing
    packet headers. This API, modeled after skb_header_pointer(), handles
    the fact that headers could potentially be split across 2 pages. A
    pointer to the location of the header is returned in the usual case
    where the header is physically contiguous. If not, the header is
    linearized into the user-provided buffer to allow normal header struct
    read access.
  - this new header access API is used in all places on the DL path when
    headers are needed, including QMAP command processing, QMAPv1
    handling, QMAPv5 checksum offload, and QMAPv5 coalescing.
  - RSB/RSC segmentation handling is updated to add all necessary pages
    containing packet data to the newly created descriptor. Additionally,
    the pages containing L3 and L4 headers are added as well, as this
    allows easier downstream processing, and guarantees that the header
    data will not be freed until all packets that need them have been
    converted into SKBs.
  - as all frag_descriptors are now guaranteed to contain the L3 and L4
    header data (and because they are no longer guaranteed to be on the
    same page), the hdr_ptr member has been removed as it no longer serves
    a purpose.

Change-Id: Iebb677a6ae7e442fa55e0d131af59cde1b5ce18a
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
2020-08-19 10:44:16 -06:00
Subash Abhinov Kasiviswanathan
45a8e8f2c1 dfc: Re-send DFC_CONFIG command
Re-send QMAP DFC_CONFIG command if no ack is received upon
first QMAP indication.

Change-Id: I33ec5cbbf3550d1df03ca1dd990bf8ad58ad9582
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-07-29 16:11:12 -07:00
Sean Tranchetti
c583c04062 core: rmnet: validate ipv6 extension header lengths
When calculating the length of the IPv6 header chain, lengths of the IPv6
extension headers are not checked against the overall packet lengths and
thus it's possible to parse past the end of the packet when the packet is
malformed.

This adds the necessary bounds checking to ensure that parsing stops if the
end of the packet is reached to avoid the following:
Unable to handle kernel paging request at virtual address
pc : rmnet_frag_ipv6_skip_exthdr+0xc0/0x108 [rmnet_core]
lr : rmnet_frag_ipv6_skip_exthdr+0x68/0x108 [rmnet_core]
Call trace:
  rmnet_frag_ipv6_skip_exthdr+0xc0/0x108 [rmnet_core]
  DATARMNET29e8d137c4+0x1a0/0x3e0 [rmnet_offload]
  rmnet_frag_ingress_handler+0x294/0x404 [rmnet_core]
  rmnet_rx_handler+0x1b4/0x284 [rmnet_core]
  __netif_receive_skb_core+0x740/0xd2c
  __netif_receive_skb+0x44/0x158

Change-Id: Ib2e2ebce733bd4d14a3dfc175133638b15015277
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
2020-07-28 15:04:31 -06:00
Subash Abhinov Kasiviswanathan
1dda7d60a5 dfc: TCP pure acks
Detects TCP pure acks so they can be put into the dedicated TX queues
even if they contains various options.

Change-Id: I6a9b714ccb58616ff49a150467d33a348d88ec64
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-07-17 17:06:09 -07:00
qctecmdr
296aa1fffd Merge "rmnet_ctl: remove symbol_get and put usage" 2020-07-16 20:00:29 -07:00
Subash Abhinov Kasiviswanathan
ce95afc361 rmnet_ctl: remove symbol_get and put usage
Removes symbol_get() and symbol_put() usage.

Change-Id: Ic4142635af717797ed43c3b4925e152c73c95581
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-07-14 19:23:46 -07:00
Subash Abhinov Kasiviswanathan
1842e30e8a dfc: add stall recovery timer
Add watchdog timer to recover potential data stall when data is
not going to the expected DRB and no DFC indication is received.

Change-Id: Iaa4b4814967cf9400c36115a083922376d23928d
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-07-14 17:01:27 -07:00
Subash Abhinov Kasiviswanathan
aeca58ead5 dfc: fix null pointer access
Fix a null pointer dereference issue when data packets trigger the
queuing of powersave work before the powersave workqueue is initialized.

Change-Id: Ia3515a7aaa47cb41568c39462bca73ceae11ea9c
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-07-07 20:38:20 -07:00
Arnav Sharma
b7cf580e81 Fastforwarding datarmnet code to data-kernel.lnx.1.1
Change-Id: Iaa23d64a4b93e87bcd8c42923ba398471834e0e8
2020-06-11 16:51:59 -07:00
Subash Abhinov Kasiviswanathan
17190b7e11 core: Add trace point for gso verification
This patch adds trace events to help with debug for gso feature
by identifying the packets (and their lengths) that are using
the segmentation offload feature.

Adding source and destination port number info
in the gso trace events to differentiate between
the flows.

CRs-Fixed: 2697145
Change-Id: I4f9786afa799cb1589bd07393c0922913037390d
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-05-28 22:25:10 -06:00
Subash Abhinov Kasiviswanathan
2a1b9716b1 rmnet_ctl: re-arrange ipa registration
Re-arrange ipa registration sequence to handle cases where rmnet_ctl
is being initialized before ipa is ready.

Change-Id: Ic8416ad8f96f818e32f1320e997287ebfe755d03
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-05-26 13:49:48 -07:00
Subash Abhinov Kasiviswanathan
9a791f3de4 net: qualcomm: rmnet: Allow UL aggregation time limit of 1ms
Reduce the minimum allowed UL aggregation timeout to 1ms
as a lower limit might be preferable to reduce latency for
sporadic traffic scenarios.

CRs-fixed: 2692360
Change-Id: Iba1c02232fa83d7cac112bd4b3f625128e2da88b
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-05-21 12:51:13 -06:00
Subash Abhinov Kasiviswanathan
6c318682bc core: cleanup task boost list
Cleanup entries in the task boost list when the pid becomes inactive.

Change-Id: I0b1b2ef81cda470cd08b31ab4e78f81d346b9b70
Acked-by: Ryan Chapman <rchapman@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-05-20 15:43:25 -06:00
Sean Tranchetti
94d3f634df rmnet: Control DL csum offload with RXCSUM
Similar to the UL direction, allow the hardware checksum offload support
to be toggled off with the NETIF_F_RXCSUM flag though ethtool.

Change-Id: I38e43cf9c13363eee340793878be7639f18254e3
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
2020-05-18 17:35:32 -06:00
Subash Abhinov Kasiviswanathan
0daa9b15d3 core: Check for aggregated skb size before copy
This ensures that the target aggregated skb has sufficient
tailroom to copy the incoming skb content. Checking for
the configured size may not reflect the true value.

Fixes the following-

<2> skbuff: skb_over_panic: text:000000006faa6b25 len:4044
    put:1288 head:000000007024fb17 data:000000007024fb17
	 tail:0xfcc end:0xec0 dev:rmnet_ipa0
<2> ------------[ cut here ]------------
<2> kernel ... at net/core/skbuff.c:108!
<2> Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
<2> pc : skb_panic+0x4c/0x50
<2> lr : skb_panic+0x4c/0x50
<2> Call trace:
<2>  skb_panic+0x4c/0x50
<2>  skb_push+0x0/0x44
<2>  skb_copy_bits+0x0/0x264
<2>  rmnet_map_linearize_copy+0xa8/0x110 [rmnet_core]
<2>  rmnet_map_tx_aggregate+0x358/0x45c [rmnet_core]
<2>  rmnet_egress_handler+0x2cc/0x2f4 [rmnet_core]
<2>  rmnet_vnd_start_xmit+0x1a0/0x1f8 [rmnet_core]
<2>  dev_hard_start_xmit+0x1e0/0x394
<2>  sch_direct_xmit+0xe4/0x32c
<2>  __qdisc_run+0x4ec/0xb48
<2>  __dev_queue_xmit.llvm.8867084656021901384+0x3ec/0x9c8
<2>  neigh_direct_output+0x18/0x24
<2>  ip_finish_output2+0x3f4/0x5b0
<2>  __ip_finish_output+0x1d4/0x248
<2>  ip_finish_output+0x50/0xe0
<2>  ip_output+0x148/0x194
<2>  __ip_queue_xmit+0x378/0x3d4
<2>  ip_queue_xmit+0x14/0x20
<2>  __tcp_transmit_skb+0x7b4/0xc4c
<2>  tcp_write_xmit+0x868/0x1194
<2>  __tcp_push_pending_frames+0x38/0xd0
<2>  tcp_push+0x124/0x154
<2>  tcp_sendmsg_locked+0xae4/0xcd0
<2>  tcp_sendmsg+0x38/0x5c
<2>  inet6_sendmsg+0x5c/0xa4
<2>  sock_write_iter+0xf8/0x17c
<2>  __vfs_write+0x1a0/0x220
<2>  vfs_write+0xe4/0x1a8
<2>  ksys_write+0x7c/0xe8
<2>  __arm64_sys_write+0x1c/0x28
<2>  el0_svc_common+0xb8/0x1c4
<2>  el0_svc_handler+0x6c/0x88
<2>  el0_svc+0x8/0xc

CRs-Fixed: 2687877
Change-Id: If8cf289c2629be28b890927c54cb4d4209b24bc5
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-05-15 18:04:56 -06:00
Subash Abhinov Kasiviswanathan
c4bd722431 core: Hold on to module reference
Do not remove module if the dependent modules are removed.

CRs-Fixed: 2683697
Change-Id: I35539aff061fe57a85f0bb8eb3dcf40499eca760
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-05-11 19:43:16 -06:00
Subash Abhinov Kasiviswanathan
fa1352fa7a dfc: remove unsupported modes
Removes DFC modes that no longer supported.

Change-Id: I86c5d549ca02b0313dc89ed9e12d770323e55a9e
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-04-29 11:33:47 -07:00
qctecmdr
f45bf5cef2 Merge "rmnet_ctl: enable IPC logging" 2020-04-21 09:07:40 -07:00
Subash Abhinov Kasiviswanathan
e87877cb0c rmnet_ctl: remove dependencies
Removes hard dependendencies between rmnet_core and rmnet_ctl.

Change-Id: I9931380fc6406eec5842a824181a0bacbb6ce73a
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-04-17 20:06:40 -07:00
Subash Abhinov Kasiviswanathan
05ac1acb02 rmnet_ctl: enable IPC logging
Enable rmnet_ctl debugfs parameters and IPC logging.

Change-Id: I2228e5d4ae86ad5ef2fb17205f14e837255d706c
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-04-13 17:50:17 -07:00
Subash Abhinov Kasiviswanathan
2724751ae6 dfc: port the latest fixes
Port the latest fixes from msm-4.19. This includes:
- Clear status flags when entering powersave (Ifc6457f1696ef)
- Adjust QMAP query grants (I9da42a9d2425)
- fix use-after-free (I76ab4a99b3f4)

Change-Id: I1beb93d1f6fdf214c8756bd0e488914bf876aa5e
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-04-10 15:27:23 -07:00
Subash Abhinov Kasiviswanathan
5a88e58652 rmnet_ctl: Support IPA EP
Support QMAP commands from dedicated IPA EP.

Change-Id: Ic5e489d2b33223b2af2fb471d20611bc5a0d7d58
Acked-by: Weiyi Chen <weiyic@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-04-03 13:47:42 -07:00
Sean Tranchetti
5fd6051c6c core: Update timespec API usage
Kernel code should now use the timespec64 struct instead of the older
struct timespec and its APIs.

Change-Id: I2792b637bf1054521e3f1ff7c82d1cdbf4f3adea
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
2020-04-02 15:20:45 -06:00
Sean Tranchetti
d6d43874af net: qualcomm: rmnet: flush uplink aggregation on priority tx
If the RmNet driver needs to transmit a packet marked as needing
prioritization, it should skip uplink aggregation of the packet to avoid
adding additional delay. Additionally, any aggregated packets should be
flushed prior to sending the prioritized packet to avoid any ordering
issues.

Change-Id: Ia3063ec3f0553693a0f66c8eb5bbb88d250f7523
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
2020-03-30 11:40:17 -06:00
Subash Abhinov Kasiviswanathan
2204dee91b core: Remove dl marker v1 usage
This removes the unused dl marker v1 definitions, handlers and users
since these are no longer used.

This also fixes the following CFI warning-
CFI failure (target: rmnet_perf_core_handle_map_control_end.cfi_jt+0x0/0x4 [rmnet_perf]):
WARNING: CPU: 1 PID: 0 at kernel/cfi.c:29 __ubsan_handle_cfi_check_fail+0x4c/0x54
pstate: 60400005 (nZCv daif +PAN -UAO)
pc: __ubsan_handle_cfi_check_fail+0x4c/0x54
lr: __ubsan_handle_cfi_check_fail+0x4c/0x54
Call trace:
__ubsan_handle_cfi_check_fail+0x4c/0x54
__cfi_check+0x204/0x220 [rmnet_perf]
rmnet_map_dl_trl_notify_v2+0x58/0x88 [rmnet_core]
rmnet_frag_flow_command+0x110/0x120 [rmnet_core]
rmnet_frag_ingress_handler+0xe0/0x3bc [rmnet_core]
rmnet_rx_handler+0x1cc/0x2a4 [rmnet_core]
__netif_receive_skb_core+0x554/0xdc4
process_backlog$4cc8cf18b485f47de9fc54109f04daea+0x1a4/0x314
net_rx_action$4cc8cf18b485f47de9fc54109f04daea+0x144/0x578
__do_softirq+0x250/0x580
irq_exit+0xcc/0xd0
handle_IPI+0x228/0x3b0
efi_header_end+0x148/0x17c
el1_irq+0x108/0x200
lpm_cpuidle_enter$a9941074ca35bb1f25355cf2ff310eae+0x57c/0x5c8
cpuidle_enter_state+0x130/0x334
cpuidle_enter+0x38/0x50
do_idle.llvm.4847091502713502628+0x1e4/0x2ec
cpu_startup_entry+0x24/0x28
__cpu_disable+0x0/0xbc

CRs-Fixed: 2647192
Change-Id: I5dc625f0791aff9738b2128f99c79d7e0dadf26d
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2020-03-22 21:21:49 -06:00