Abstract the callback hdd_softap_ipa_start_xmit by
hdd_softap_ipa_start_xmit, to match the return type of
wlan_ipa_softap_xmit pointer, to fix a CFI failure.
Change-Id: If1cb1a80801558d5c7831ec89ad5281b0bbe36f3
In STA-SAP config, IPA offload is enabled only when first
client is connected to SAP. This is OK for MSM platforms.
But for MDM platforms, this is not the case. There's STA
tethering cases, where traffic is routed between STA and
USB tethering devices while SAP is idle and no wifi clients
are connected to SAP. In such case, IPA offload needs to
be enabled for STA to promote performance.
Fix is to use available MDM_PLATFORM marco and STA only IPA
support is decided upon driver build time.
Change-Id: If2bc016aa941f2c0651a2669f1169e631208326b
CRs-Fixed: 2433608
Check for validity of vdev obtained from the CDP
cdp_get_vdev_from_vdev_id API.
Change-Id: Ie7fb99a0e08135bd3f2cc6b63070a4bd72df943a
CRs-Fixed: 2434583
Support WDI 3.0 SW path intra-bss forwarding. Major
difference for WDI 3.0 is the metadata info passed
from ipa driver in skb->cb[].
Previously intra-bss fwd decision is done by FW and
it passes fw_desc to IPA where IPA driver passes onto
WLAN driver. Now for WDI 3.0, FW is not involved in RX
path and SW path intra-bss fwd decision has to be done
in wlan driver.
Change-Id: I0b4b9bbf16440dd47b6f97460f8931ea3a79303c
CRs-Fixed: 2426857
When vdev is logically deleted, vdev reference will
be returned as NULL by objmgr.
Remove vdev sanity from QDF_BUG while sending IPA evt
in __wlan_ipa_wlan_evt.
Change-Id: Ie7f9697768d53c71a6bead377c35bbc3f62e808a
CRs-Fixed: 2433521
The only function called through this pointer type doesn't return
a value and the caller doesn't check for a return value. Change
the function pointer type to return void to fix a CFI failure due
to a type mismatch:
CFI failure (target: [<ffffff853ba7cee8>]
hdd_ipa_send_skb_to_network+0x0/0x4 [wlan]):
...
Call trace:
__ubsan_handle_cfi_check_fail+0x50/0x58
__cfi_check+0x31fa0/0x3d5a4 [wlan]
wlan_ipa_w2i_cb+0x5fc/0x8fc [wlan]
...
Change-Id: I94f6bb0fc06acebde12cf80294999d9419296c4a
CRs-Fixed: 2431600
ipa disable pipes request is honoured based on
ipa_pipes_down flag. However, there is a possible
synchronization issue if disable pipes request is
initiated from different contexts, as there is no
locking to protect this flag.
Add pipes_down_in_progress flag in ipa_ctx and
use this flag to ignore disable pipes requests if
one request is already in progress.
Change-Id: Iabf01249d4b6a551e03cea2ae96a0c6096f43ff8
CRs-Fixed: 2423155
qdf_delayed_work_t has been superseded by qdf_delayed_work. Replace all
instances as appropriate.
Change-Id: I83f0dcec050bc9f91624048bd171f9a86b0394b5
CRs-Fixed: 2420202
Resolve ipa compilation issue for targets with config
ipa unified api enable and have kernel version 4.9.
Change-Id: Ibf7c51e32850024ceeb154f18a272044482af5ba
CRs-Fixed: 2422172
Upon client connection to SAP, WLAN IPA will pass a message
containing client MAC address and ethernet header offset to
IPA driver. Per WDI 3.0, there's no frag_header and
ipa_header prepended in front of ethernet header. Thus
ethernet header length is passed to IPA driver as header
length during interface registration. But in per-client
message, offset passed to IPA driver still accounts for
length of frag_header and ipa_header. As a result packet
queued to event ring will have wrong ethernet header.
And this causes IPA to WLAN TX HW path not work as expected.
Fix is to define frag_header and ipa_header as 0 sized
structure for WDI 3.0 so that ethernet header offset will
be 0.
Change-Id: I58cdf78732ad2909bf89058f2a5bc24c42f841d2
CRs-Fixed: 2421315
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within ipa replace any such comparisons with logical
operations performed on the pointer itself.
Change-Id: I82e4bed12122ad5aea47650f6d75e72a52207883
CRs-Fixed: 2418401
Some ini descriptions are different to common, and some of them
include wrong information, so correct them and use unified form.
Change-Id: I36348fb26a03cab254fd309d792125b8a21ad02f
CRs-Fixed: 2402446
Session_id in __wlan_ipa_wlan_evt is used as an index
to access the array ipa_ctx->vdev_to_iface[].
Add sanity check for session_id to avoid invalid access.
Change-Id: Ie6079924c4772c3fa892b4537120db136a899885
CRs-Fixed: 2395162
Currently second STA wlan ipa interface is not deleted in case
of STA-STA concurrency for second sta disconnection. At the time
of driver recovery first virtual interface is deleted and later
existing ipa interfaces are deleted. This leads to invalid access
of second STA ipa interface net dev at the time of deletion during
driver recovery. Fix this by deleting the interface at the time of
sta disconnect event.
Change-Id: I21e46fe5c6f0b0213d139050acf229cb5ab914eb
CRs-Fixed: 2376897
Excessive wlan ipa call back error logs when driver is in
transition stat which may leads to watchdog timeout. So rate
limit the logs.
Change-Id: I1398ea67abde53d3a5f0b5ab7c7ea1dd8553e4cc
CRs-Fixed: 2379522
Add cdp api to check if tx desc pool available descriptor
threshold has reached.
Change-Id: I12cc38b56a68ca7ee8f4560677fcdabccb38928b
CRs-Fixed: 2369244
In case of lithium dp there is no FW interaction in RX packet
processing and is HW REO ring based. So modify the ipa component
is fw activated api to return true if the ipa system pipes are
enabled.
Change-Id: I8cde4b0f696b75097e6b50f8b0c71c2b6fff6d6d
CRs-Fixed: 2374083
In case of lithium dp there is no FW interaction in RX packet
processing and is HW REO ring based. So in case of handle
first client connection and last client disconnection host
should not send HTT FW requests for pipe resume/enable at FW.
So modify the enable and disable ipa pipes host functions for
lithium dp.
Change-Id: I72661050fe1f85c13aca0c78b5c0369884ec2999
CRs-Fixed: 2369252
Almost all of the definitions in txrx.h are obsolete. Rather than
remove the obsolete definitions and leave behind a file containing
only the two definitions that are used, move those useful definitions
to ol_txrx_types.h and completely remove txrx.h.
A side effect of this change is that a couple of unrelated files no
longer build because some of their dependencies were being met as a
side effect by txrx.h including other files. To solve the build issues
explicitly include the necessary header files where they are needed.
Change-Id: Ic3e3b36939e4ab04831d41a1e230bfab3da086a2
CRs-Fixed: 2363231
This reverts commit 2459533, which fixes WDI 1.0 MCC SMMU fault
but it's only a partial fix. And we also need 2490501 to be a
complete fix. But 2490501 has regressions and leads to NULL
dereference, and it's reverted in 2517642 until a new complete
fix is ready.
Based on above, revert 2459533 and WDI 1.0 MCC SMMU datapath
will be a known issue.
Change-Id: I6444bfd8552906d889531b7e77ca6aa6b6fa7d6d
CRs-Fixed: 2352927
This reverts change I7d04e9b01fbd973601ee9e4e74c6bf4dd3d0f7bb
This patchset is causing wlan_ipa_nbuf_cb to be called even when ipa_ctx
is null. wlan_ipa_nbuf_cb should not be called for non-IPA packets. Also
there should be a NULL check for ipa_ctx in the function.
Reverting the change may lead to SMMU errors during AP-AP MCC mode.
CRs-Fixed: 2352812
Change-Id: I2f2382ca12a14a09ed124ccd18a7f450282c5975
Excessive failure log due driver is in transition state. This
is coming from stats callback function, rate limiting the logs.
Change-Id: Idcd5304c492fa538614ac45d4c7bb3a601f23bcc
CRs-Fixed: 2347721
For WDI 1.0 MCC TX, wlan driver is involved for TX and skb is
provided from IPA driver. With SMMU enabled, dma_addr is of
IPA domain. In such case, wlan driver needs to do DMA map
itself. After doing DMA map, an offset of frag_header
and ipa_header is added to the iova and skb->cb is updated
with the new iova. After TX completion, skb DMA unmap is done
but with the iova of the above offset included, which leads to
unmapped iova error.
Fix is to recalculate the iova and update skb->cb with new iova,
which has frag_header and ipa_header length removed.
Change-Id: I7d04e9b01fbd973601ee9e4e74c6bf4dd3d0f7bb
CRs-Fixed: 2338049
SMMU fault is observed for WDI 1.0 MCC TX when SMMU is enabled.
Issue is that dma_addr passed from IPA driver is iova of IPA
domain. WLAN driver directly uses the iova to do transmission.
Since iova is not mapped in WLAN domain, SMMU fault occurs.
Fix is to map skb to WLAN domain for TX when SMMU is enabled.
Change-Id: I4c029a1e4dfff149e2784f5b95fe1f3cf3e3719e
CRs-Fixed: 2318537
With IPA WDI unified API, IPA PM is used instad of IPA RM
for power/resource management. When checking if IPA RM is
enabled or not, HDD_IPA_RM_ENABLE_MASK is thus not applicable
for WDI unified API.
Fix is to always return true for IPA WDI unified API for power
efficiency.
Change-Id: I047b3156cf00002142dd3acb021cfb6ce64489ee
CRs-Fixed: 2283088
Following changes were made -
- Replace #ifdef CONFIG_LITHIUM with QCA_WIFI_QCA6290 and QCA_WIFI_QCA6390
flags. CONFIG_LITHIUM is not defined to be used within the code, the
individual chip specific flags are defined, hence use those.
- Pass IPA enable/disable ini configuration to DP layer
Change-Id: If0bfdaf408b06a922923e998c0c6ad2157e2c080
CRs-Fixed: 2328711
Do softirq for every 32 RX packets from 16 for IPA exception RX path.
Which will improve RX throughput much better.
Change-Id: I717d23714d1d0ae72550a06fd4df0817195f658b
CRs-Fixed: 2250253
At ipa wdi initialization host needs to fill structure
ipa_wdi_init_in_params and pass to IPA driver. Currently
host is filling the local stack structure with out zeroing
out the memory and passed to IPA driver. This will lead to
invalid assignment of struct variables to IPA driver copy
for which host did not fill. So before using the ipa wdi
initialization structure mem zero it.
Change-Id: If054c2175741e6f23ebbf2165761aee8e2f8e2f0
CRs-Fixed: 2322734
Upon driver reinitialize after a FW rejuvenate,
data packets are not going through IPA path.
Check for FW rejuvenate scenario during driver
recovery and send appropriate message to IPA
driver.
Change-Id: I8c1d7ba78227684cd5653a5927aa4d4c2ce5d354
Crs-Fixed: 2287293
Currently during SSR IPA events such as AP DISCONNECT/
STA DISCONNECT are not sent and also wlan ipa interafces
are not deregistered. After SSR when host sends AP CONNECT/
STA CONNECT and register interafce IPACM will reject as for
previous events before SSR there are no disconnect events.
This leads to data come via exception path instead taking
IPA HW route as interface headers are not registered.
In this fix send IPA UC disconnect events and deregister
interafces during SSR.
Change-Id: I6e617261ec53b7d572023613d212eae057b13b03
CRs-Fixed: 2315828
IPA driver calling WLAN driver callback, and in parallel WLAN
driver is unloading and freeing this callback, which leads to
a use after free scenario
Add SSR protection wrapper to all of IPA callback APIs in driver
to avoid racing against driver unload or SSR or self recovery
Change-Id: I5dcdfe4749b89104ec79eac060e60fe5aa7c2335
Crs-Fixed: 2307365
When AP_DISCONNECT event occurs during IPA resource unloading
in progress, unload time out can happen due to IPA driver taking
time in suspending pipes or delay in FW HTT responses. In such
case events are added to pending queue. Pending queue events are
executed in worker thread context when resource unload is complete.
There is possibility of delay in scheduling of worker thread. When
worker thread is scheduled after HOST sends VDEV DELETE to FW and
processing of AP_DISCONNECT pening event will leads to FW assert.
Reason is as part of AP_DISCONNECT host sends IPA OFFLOAD disable
to FW on deleted vdev id. So send IPA RX offload disable command to
FW when AP_DISCONNECT is added to pending queue.
Change-Id: Ib24deb7654496ec60a3e56b8a9d1e1bd2d8c2db5
CRs-Fixed: 2295105
Remove the debug assert added in wlan_ipa_uc_disable_pipes when
the check for IPA pipes disabled is true. Anyway logging is in
place to give information about the scenario.
Change-Id: If2906f0ee827e84df4594693702064cd249c564c
CRs-Fixed: 2295461
FW assert is observed when HTT_WDI_IPA_OPCODE_TX_SUSPEND is sent twice
in a row. Issue is that CLIENT_DISCONNECT and AP_DISCONNECT could both
trigger IPA deactivation when CLIENT_DISCONNECT is poped from pending
queue and in another thread AP_DISCONNECT event arrives.
Fix is to add check for resource_unloading flag and if resource_unloading
is set to true, IPA deactivation is ignored since deactivation is already
undergoing.
Change-Id: I68a245809e263ce396b910c4cc3d4e6b071812c0
CRs-Fixed: 2288941
Several logs show up repeatedly in dmesg. Reduce the following logs to
help avoid spamming dmesg:
* wlan_ipa_wdi_meter_notifier_cb()
* hdd_print_netdev_txq_status()
* hdd_wlan_start_modules()
* hdd_wlan_stop_modules()
* csr_nonscan_pending_ll_peek_head()
* sme_qos_statustype()
Change-Id: Ic5ca059f258dee92ffaa4b0ecca47df41b424c11
CRs-Fixed: 2292710
A number of HDD and IPA logs are generally unnecessary and have been
identified as contributing to log spam. Reduce these log messages to the
debug level.
Change-Id: I2f92bb4caec5adc65fdad0146298aa5f88b43def
CRs-Fixed: 2288430
Add per module logging macros without function/line info
to avoid adding function/line info where it is not required.
Change-Id: Id808fef623b82cec38fc31071ef384f3ff0c92da
CRs-Fixed: 2278874
When wlan driver unloading is in progress, IPA_OPCODE_TX/RX_SUSPEND
will not be processed and resource_unloading may be left as true.
Moroever since driver will be unloaded, IPA_OPCODE_TX/RX_SUSPEND
interaction between Host and FW will not be necessary.
Fix is to disable IPA pipes directly when handling disconnection
if wlan driver unloading is in progress.
Change-Id: Ia4af1ab04052b1a9bab44105760de50ad6263dbb
CRs-Fixed: 2279044
Map all enter/exit log macros to enter/exit QDF TRACE macro
to provide option to compile out enter/exit logs if required.
Change-Id: I0c6cd633705e820fcfeb47e3f81a3522c9ef1974
CRs-Fixed: 2274850
ipa_is_fw_wdi_activated is invoked in the context of default 100ms
bus bandwidth calculation timer. Any logs will lead to excessive
messages and fix is to ratelimit these possible log messages.
Change-Id: I6e408187759bb6b6a5c511f2f88c2b14f4c889ab
CRs-Fixed: 2279024
There will be excessive logs in exception path when running SAP embedded
traffic since these logs are per packet.
Fix is to ratelimit all logs in IPA exception path to avoid excessive
logs.
Change-Id: Ia96a60f4de145740d7099b432c92e7b5785047d2
CRs-Fixed: 2272014
WLAN logs are excessively filled with
IPA logs when IPA performance level
is set.
Remove unnecessary logging in
hdd_ipa_set_perf_level().
Change-Id: I07563c1a6e98981e2b074bce7a969c9cbd94ec24
CRs-Fixed: 2268632
The change id I50c357ca0f8ddfcc1a51ad4ed040961daf052459
is missed as part of UMAC IPA componentization changes.
Propagate the missed change to IPA component.
Change-Id: I33d83b5777ea259e29175e632a36e5fec3be24bc
CRs-Fixed: 2262351
In case of rmmod if stop bss fails SAP IPA interface is not
deleted. So again at next driver load IPA will be holding the
stale IPA header and new IPA header will not be added at IPA
interface creation. In this change clean IPA interface when SAP
stop bss fails.
Change-Id: I3a1bf891752308ba1a29d6768f24880d8514d5bf
CRs-Fixed: 2224307