Fix integer underflow which may eventually results in an buffer
overread in wcnss_nvbin_dnld when the firmware file size is less
than 4 Byte. Add a check on file size before performing
arithmetic operation which avoids buffer underflow.
CRs-Fixed: 2279226
Change-Id: Ia7fdb859e8c999f8a2e81c957c7cab35ef312844
Signed-off-by: Sandeep Singh <sandsing@codeaurora.org>
A NULL pointer check is added to prevent a NULL pointer
exception. A data type is fixed to prevent a type conversion
before an error check.
Change-Id: If4f6f70c8770ad48432e466e1b6a7e9bf4b62258
Signed-off-by: Anant Goel <anantg@codeaurora.org>
As part of PCIe power management for new WLAN devices, it requires
asserting WAKE register before accessing any MMIO registers outside
first 4K range. Add the support in CNSS driver and expose the APIs
for WLAN host driver.
Change-Id: I69688c229121c12575dde4938961d60bc067751f
Signed-off-by: Yue Ma <yuem@codeaurora.org>
Add a property to determine if a target support secure context
for use cases like CPZ.
This property can be used by userspace application to create
a secure context if its supported on the target.
Change-Id: I1ccc824378fb8fbd2cfbc7b811c6c3fdcd17803e
Signed-off-by: Sunil Khatri <sunilkh@codeaurora.org>
Add a property to determine the hardware alignment
constraint on secure buffers. XPUv2 and below
have a minimum requirement of 1 MBytes alignment
and hence driver should allocate memory with minimum
alignment on size.
Change-Id: Ie3ca5da489bc94ae57ddc6695e402463fd7a88c2
Signed-off-by: Sunil Khatri <sunilkh@codeaurora.org>
Zero message may be passed causing null pointer de-reference.
Adding check on the number of messages passed to handle the issue.
Change-Id: I7cef6dd2070c5eaaa748698c45540f8aa1d96116
Signed-off-by: Vipin Deep Kaur <vkaur@codeaurora.org>
For qrd devices, remove HOME gpio key to fix driver probe issue.
Change-Id: I46ba4ef05c795fced67f2db59a3f5ce183bdeba8
Signed-off-by: Fei Mao <feim1@codeaurora.org>
Make HAB clients have chance to import the
same export id to fd and uva before unimport
happens.
Change-Id: I59fdc701dcdc086e58865fa216b10f9fe6a45e29
Signed-off-by: Yajun Li <yajunl@codeaurora.org>
When getting a vchan after receiving a message, it has probability that
this vchan is closed concurrently. So when refcount is increased by
kref_get_unless_zero, but flag vchan->otherend_closed or vchan->closed
is true at this time, it will return vchan as NULL, and the hab_vchan_put
will not be called in hab_msg_rev. So adjust the timing here can avoid the
leak risk.
Change-Id: If78c1c41bc4fd05b3288c0324bb9e0aed8493c5f
Signed-off-by: Yao Jiang <yaojia@codeaurora.org>
If refcount was 0 before increment, it maybe has a race condition that
this kref is freeing by some other thread right now. In this case we should
not increments refcount, so replace with kref_get_unless_zero.
Change-Id: Ic15eaefc111770a966094d05b19eca2a04d52fc2
Signed-off-by: Yao Jiang <yaojia@codeaurora.org>
Avoid the release of memory for dynamic fps PLL codes. The memory
is part of the continuous splash memory region and will be freed
eventually as part of the splash screen memory cleanup routine.
Change-Id: I67afb46057770298668ae5790637e8b4b08fd030
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Add new freq map for memlat node for sdm455.
Change-Id: I536b7f3e41610ca78d5cfae08ecbfc1e82b8fe5b
Signed-off-by: Biao long <blong@codeaurora.org>
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
While handling dsi_gen_read_status, status buffer
was xlogging without checking for its max size.
Add proper conditional check to xlog status buffer.
Change-Id: Ia5a1fe18de123d2911c31ae79492b96f67e1273d
Signed-off-by: Narender Ankam <nankam@codeaurora.org>
Protect ipa default routing table from
addition, deletion and modification once after
default rule added by ipa-driver.
Change-Id: I045d9c29fed23edf796d826e440b81124e1f666a
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>