Remove Initializing rx_pkt link if dma mapping fails.
Change-Id: I49d08555c875fc9039805ef8775be3b676f51d08
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
Fix init_drop_stats to have it only enable 4 pipes max.
Enable different pipes depending on kernel version.
Use more descriptive names for WLAN2_CONS pipes drop stats.
Add a temp variable to not enable drop stats bitmask when # of
pipes is more than allocated.
Change-Id: I3d678569eb94bfd43d90d2d4f84f5b1148b8ec42
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
Fix max number of pipes check for getting ep index
for adding filtering rules.
Change-Id: Ifcb92c3f5dacbe1fbafe615ec36e5dd74fd10540
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
Update the keep_awake script to call into IPA PM and
add/remove dummy clients to change the clk vote dynamically
based on the loaded device's power thresholds.
Change-Id: Ifaa4ef1e312428245605008998ac59afddf09d99
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
Make changes to memcopy before preload end.
Change-Id: Icc056a3bcd5b739b8165813202c87dd84e72c78a
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
The stats counter which saved in idr was some stack memory which
could be freed and cause memory corruption. The fix is to use
the memory allocated in heap instead.
Change-Id: Ie398b0271571fcff41cdb85de4d77d202b6552b5
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
Signed-off-by: Michael Adisumarta <madisuma@quicinc.com>
Currently during RMNET_IOCTL_GET_MTU and RMNET_IOCTL_SET_MTU ioctls
we can recieve not null terminated string for if_name which was
resulting in string out of bound error while accessing the if_name.
Now adding null character at the end of string to prevent access
beyond its size.
Change-Id: I4d82a4b491f04a85d6ab4f0211671520156f7c61
Signed-off-by: Piyush Dhyani <pdhyani@codeaurora.org>
Unit tests for the IPv5 ULSO feature and for HPC based
header insertion feature.
Change-Id: I312b135f33486c1171a355a69e6631764d021947
Acked-by: Eliad Ben Yishay <ebenyish@qti.qualcomm.com>
Signed-off-by: Ilia Lin <ilialin@codeaurora.org>
Network traffic generation and handling.
Change-Id: Ia1de9cf235d732f721f93d12cb11a69739683a72
Acked-by: Eliad Ben Yishay <ebenyish@qti.qualcomm.com>
Signed-off-by: Ilia Lin <ilialin@codeaurora.org>
Changes include null check for IPA netdev and gsihal_ctx.
Change-Id: If897281663e0ae0f29b7110fcbaa4dd98f67eb8d
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
Enabling the HOLB on USB consumer pipe to avoid IPA HW stall
if USB host slow in pulling the data.
Change-Id: Ifc4b13ce52e241a3b1942bd81745f1ef3b2903e7
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
Add support for dpm ep-ip/IPA pipe info for user-space
module to query.
Change-Id: I06ecea1ecfc953315a2cc826e81517b3a97b0d7b
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
Assign NULL to pointers that may be used later
after calling kfree on them.
Change-Id: I3298eb484c92ee2373f0bc41aae8ae45fb373cf0
Signed-off-by: Ilia Lin <ilialin@codeaurora.org>
ULSO WA cannot be used with full pipeline clear option in same chain.
Avoid using it as it can result in HW stalls.
Also make sure to use ULSO WA whenever we send force close
on coalescing pipe to avoid HW stalls.
Change-Id: Ie81d885f82b201d35cd1832a3a87313c37da76b8
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
There are potential race condition ioctls in
the IPA driver when it copies the actual
arguments from the user-space memory to the
IPA-driver. The fix is to add check on the
2nd copy to make sure the same payload size
is copied to the pre-allocated kernel memory
as during the 1st copy.
Change-Id: I3d31cb11a24e969db4fd1728cf6ab1ce983a75e9
Signed-off-by: Armaan Siddiqui <asiddiqu@codeaurora.org>
Add changes to Distinguish between userspace and kernel
route rule addition.
Change-Id: Ieb53ea45e22907d48b47fb20f82e391dc036073f
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
Update qtimer granularity for IPA_hw_type > 5.0 to match
HPG requirement. Use the new granularity for configuring
timer if the lower granularities fail. Remove assert
for debugfs to gracefully handle bad timer value.
Change-Id: I57d4913950afd0dec9adddc65441043263302872
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
Add support for IPAv5 and GSIv3 reg collection.
Undef obsolete registers and Add support for array
registers.
Change-Id: I15f91a3f4562cc40b4095605d95487a319520029
Signed-off-by: Amir Levy <alevy@codeaurora.org>
Signed-off-by: Ilia Lin <ilialin@codeaurora.org>
Fix use-after-free of rt_tbl in __ipa_del_flt_rule
by checking if the rt_tbl is already freed.
Change-Id: I09541f65f474dc42f262c603d99f6bbcbb0ce8ec
Signed-off-by: Goutam Bose <gbose@codeaurora.org>
Directly to give prot_id in ipa3_uc_debug_stats_dealloc
instead of using IpaHwOffloadStatsDeAllocCmdData_t
structure.
Change-Id: I20d717e43dc3c8161e05338a21d053245e5502f7
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
1. Disable HOLB for ODL pipe during suspend to avoid dropping the packet
2. Enable HOLB while unsuspend the pipes.
3. Enable drop stats for ODL pipe.
Change-Id: Id0a5871ebe4a0925c60dea39f197af9e1892d05e
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org
Provide MSI DB register address instead of DB register.
Change-Id: If31998b71c71f11020577c7a581cc11ac93db29f
Acked-by: Eliad Ben Yishay <ebenyish@qti.qualcomm.com>
Signed-off-by: Ilia Lin <ilialin@codeaurora.org>
Includes support for IPA stats to be able to send log packet
to ipa_lnx_agent and then to SPEARHEAD framework.
Change-Id: I3112fc6b2e66e15140f638bfff9905bba6997e46
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
Update in the qmi handler structures last index to NULL, to avoid
the out of bound access attempt while handling qmi notifications
from IPA.
Change-Id: I51b3e4369fcf4c9c235307cfd7c6415c525da496
Signed-off-by: Raghavendar rao l <rlomte@codeaurora.org>
Made the changes to increase rsrc pkt conexts
from 1 to 6 to support cv2x auto case.
Change-Id: I2f9774fd473248ce4f86748be83c2a9b58ab16a8
Signed-off-by: Pooja Kumari <kumarip@codeaurora.org>
If userspace commands to delete last rule in a routing table,
then a an empty table may be commited. This is possible case,
so no warning is needed.
Change-Id: I04b6a9d3bdcaf28f35046c328e46a2719680d2a1
Signed-off-by: Ilia Lin <ilialin@codeaurora.org>
The value of `req->filter_spec_ex2_list_len`
is user input via ioctl and it's type is uint32,
so an integer overflow may occur. Which can result
in out of bound access in the following loop. Now
add changes to prevent Integer overflow.
Change-Id: Ia29b9ddc674e5dd3d5baf6623cf0a464c156d8f7
Signed-off-by: Piyush Dhyani <pdhyani@codeaurora.org>