This confuses GCC's FORTIFY_SOURCE check for the copy_from_user() in
this function. Simplify it to resolve the GCC warning.
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Change-Id: I963ae2b81e4ac7cb46c08ece73bb7cd1201a621e
Accessing an atomic variable without the atomic_*() helpers is illegal.
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Change-Id: Ie2205c438ad0824f80b92d72e40c4618e6ec35aa
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>
Add changes to fix race condition when freeing QMI
handles during SSR scenario.
Change-Id: Ie83f0386ea3bd9b40c4964327415421a144d4715
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
Signed-off-by: Raghavendar rao l <rlomte@codeaurora.org>
Adding changes to check ipa_q6_clnt pointer NULL or not
before accessing it.
Change-Id: I255dd021c9534fe6ca4d7b19c3b576a0d3c80c7d
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
Signed-off-by: Raghvaendar rao l <rlomte@codeaurora.org>
ECONNRESET is returned if Q6 QMI service is down. Make changes to
check for ECONNRESET as well to detect SSR.
Change-Id: I9a88b816618558123b3623396f38dde010d62abd
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
Added check to verify pdn config type
which may cause out-of-bounds read in wlan_msg_process.
Change-Id: Idce7cb966a5a1c33d4f6b040f4f9d2ec4fb203be
Signed-off-by: raghavendar rao l <rlomte@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>
Add check to see if it is freed in pm deregister context
and trying to read again after free.
Change-Id: I764f012d0c7cd53f126aee221f7c1d6a914b7390
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
Currently during IPA_IOC_GET_PHERIPHERAL_EP_INFO ioctl we are not
returning for the invalid values of max_ep_pairs and ep_pair_size,
which is resulting in call of functions with invalid parameters.
So now changing the control when we receive unexpected values.
Change-Id: Idc0a8986478ece5eaad2a31152c2a16cd758b612
Signed-off-by: Piyush Dhyani <pdhyani@codeaurora.org>
Add proper check to validate table rule count
which may lead to overflow error.
Change-Id: I9bdcafcaae4e4cff1b901929c8dc6ae804f85642
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
Make change to use endpoint 6 & 18 for hastings WLAN2_CONS/PROD
on msmnile gvmq target.
Change-Id: I8e5a7711dccc53419e7a17851df7a878e2ef0063
Signed-off-by: Akshay Pandit <pandit@codeaurora.org>
In low latency ping scenario clock unvoting fastly due to this
ping RTT was increased. To avoid these scenario increased the
inactivity timer to 100msec.
Change-Id: I9b11e2adbe087aa67fa2e7ed751b190abb09d0ed
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
ADPLv3 targets do not require status to be enabled on ODL_DPL pipe.
Make changes to disable the status for targets with IPAv4.5 and above.
Change-Id: Ica07a25a01e742928d3ecb19a88b7ee2305235ae
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
Each time read_write_context is being invoked the dma_enable
will log the debug print if reference count is greater than 0.
Change-Id: Ib922c7920a08ff85b06522767a9027c84e2afb9c
Signed-off-by: sivakanth vaka <svaka@codeaurora.org>
Ethenet driver npn phy address was same for UL/DL
pipes, currently this address was unmapped during
DL pipe disconnect where UL pipe still avtive,
move the logic to do the unmamp to the last pipe
disconnect.
Change-Id: I697edb844b8134d2a1d52e3c2bcfd0a7066edb2f
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
Sg table tables are not contiguous page due to this while copying
total sg table it failing. To avoid this copying the each sg
table individually.
Change-Id: I08dfceaaee674ab642126c42d6978af5749d9909
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
Add IOCTLs for adding and deleting uc activation entries.
Amend Socksv5 add\delete entry algorithm to allow IPv6 NAT
and Socksv5 entries to co-exist in activation table.
Add debugfs entry to dump uc activation table.
Change-Id: I5382a393cb2890cd6c6ee4dc73eadf16c603294a
Signed-off-by: Amir Levy <alevy@codeaurora.org>
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
Make changes to delete the route entry even when the hdr/proc_ctx
handles are already freed. Otherwise the entry will be dangling.
Change-Id: Icbab6b96fa137c5214b37ea33c6203c5a54273ac
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
Not able to unmap the buffers due not saving data buffers
when SMMU disabled on EMAC side. Adding changes to save the
data buffer list in EMAC SMMU disabled case also.
Change-Id: Ia22110b450477927c35942f2161c2730086da892
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
Made the change to put ecm as default in vlan mode
on auto configuration to resolve the issue where
usb connects to IPA faster than ipa-driver getting
vlan info from user-space.
Change-Id: I83d876e555e06eba762d98394e155df9b9797820
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
In IPA4.5, Lower-16_bits of Ring base + ring length can’t exceed 16 bits.
The fix here is to adjust the iova for ring base in smmu enable case.
Change-Id: I55ef76e6482b08e69976f1e7da9e2aa7fa9d7e09
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
scatterlist pages not unmapped properly, it was leading to
issue when mapping the same pages again. Adding changes
to store scatterlist information properly and unmap the
page with correct length.
Change-Id: If11926608f633ce1d66150b1e4b6c515adc48049
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
IPA HW will treat aggeragtion byte limit value 1 consider as 1K.
Adding changes to configuring the aggeragtion byte value w.r.t
IPA HW requirement.
Change-Id: Ibe9353a39971296f7e4b04f30039457c07c63033
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
Hold wake lock for 2 seconds after a device resume for allowing the
device to settle and link interrupts to arrive after a resume.
Change-Id: I91fd3d689895a9526d66d613a273cb7cc231fb2e
Signed-off-by: Jinesh K. Jayakumar <jineshk@codeaurora.org>
Add ep details corresponding to
RMNET_CV2X tethering over eth.
Change-Id: I0285887470c950a73e61dd51bf673bbc650d40bb
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
Observing the race condition if channel mode configured after
channel start. To avoid these race conditions configuring the
channel mode and starting the channel.
Change-Id: I8f8ec2d9faed320539e2b18de90ab24059a5616c
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
There is no low_lat use case on auto mode, so the ep mapping is
not defined.
Add sanity check to not sent endp_desc QMI for ep which is not
defined.
Add check to make sure send endp_desc specific to low lat only
for mhi non-auto case.
Change-Id: I6fe72556433c0ac84772411cc5b1ac99bcadc30e
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
Add a new enum for uCP exception pkt status.
Handle the case where this pkt status exception is received.
Change-Id: Ib69e307548efed3482d4636db9161f423c051570
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
For WDI3, requirement is to ring the event ring DB
with a value outside of the ring. Currently we are taking the
event_ring_size from non SMMU structure which is incorrect.
Make a chane to use the value based on SMMU enablement.
Also make change to ring the DB with the below logic.
Event ring base addr + Event ring size + 1 element size.
Change-Id: Ie9e4cad63070d1488d0a36f9d08279d2d566055a
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
Add support to accelarate QDSS diag traffic over IPA
to the PCIe host.
Change-Id: Ia1f534b249e5581ebec4bf7deac073de50a252fe
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
Ethenet driver npn phy address was same for UL/DL
pipes, currently this address was mapped twice.
Added changes to map the map npn phy address only
once.
Change-Id: Icd713943326aad38ecf8e080a73d1d6bb8f641d2
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
Adding changes to support enable/disable fastmap
for each CB and setting geometry range for AP SMMU
node.
Change-Id: I4286561536cd8e41f68b91ce45913337c8ad279f
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
Currently max length size of DL flt rule is
sent to Q6. But 64K memory allocation is always
not guranteed. Send actual size of DL flt rule
to Q6 to avoid memory error and install flt rule.
Change-Id: Id5f7bbb616c23feb6efbacd288f790432156630b
Signed-off-by: Pooja Kumari <kumarip@codeaurora.org>
If ipa receives ioctl and post init is not completed, wait for 1000
msec before timing out and returning error. The changes are made
specific to msmnile gvm target.
Change-Id: Icc63939840af469d1a79960927e6d343a336dcc9
Signed-off-by: Akshay Pandit <pandit@codeaurora.org>
Currently defined max PDN number is generic for all
hardware version which is incorrect. Define PDN based
on hardware version to support correct number of PDN.
Change-Id: I3e898a32104562584b4702132c57b7f1cb8deeca
Signed-off-by: Pooja Kumari <kumarip@codeaurora.org>
1. Device side GSI event channel allocated for MHI event channel
need to be sequential.
2. The device side evt_id = host_evt_id - host first_evt_idx +
device side offset (ipa3_ctx->mhi_evid_limits).
Change-Id: Ieab7596caa6880d2daf75c3bc45cd59375dd7589
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
Provide total, dropped and loopback stats for IPA LAN Rx packets via
trace sub-system.
Change-Id: I105b665eb1a4ee23dbe9f7fdd8b3be6b4555075f
Signed-off-by: Jinesh K. Jayakumar <jineshk@codeaurora.org>
Do not call dev_kfree_skb_any() on skbs already dropped by
ipa_eth_channel.receive_skb().
Change-Id: I3383c7bd84c2675193d31a44b6daeb8b6b16a87b
Signed-off-by: Jinesh K. Jayakumar <jineshk@codeaurora.org>
Reuse the same set of evt channel for auto/qmap flow control.
Fix the number of max channel and make sure number of event
channels are within the mhi_evid_limits.
Change-Id: I810da70251c1d9eb9f78a47a6994d1d44eb5eeb0
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>