Requirement:
In skb recycler, if recyler module allocates the buffers
already used by DS module to DS, then memzero, shinfo
reset can be avoided, since the DS packets were not
processed by SW (host).
Hence, we will achieve good KPI with less CPU
utilization.
Fix:
Implemented an new qdf wrapper API qdf_nbuf_alloc_ppe_ds
in wifi driver, which in turn invokes
__netdev_alloc_skb_no_skb_reset API to linux module.
With the use of new netdev_alloc API shinfo reset
will be avoided for DS used buffers alone.
Skb recycler changes are delivered already via
4360331
Change-Id: I3fe8dc07ca12c01136eaee4fcdb1ff6036f80f74
CRs-Fixed: 3350807
Fix the compiling issue by removing the export symbol for static
qdf_timer_clean and mem_debug_disabled.
Change-Id: I01f886e04af2f294ed9cb93afdbb69d7d8b9f2ee
CRs-Fixed: 3363506
Linux API napi_enable() is abstracted, but napi_disable() is not. Add
an abstraction so that all of the native NAPI API calls in HIF can be
changed to use QDF abstractions.
Change-Id: I26e4c1d301dc6744be19b3f4142542aefe0e6fec
CRs-Fixed: 3364272
Commit b48b89f9c189 ("net: drop the weight argument from
netif_napi_add") was introduced in Linux 6.1. As described by the
subject, this removes the weight argument from netif_napi_add().
This was preceded in Linux 5.19 by commit 58caed3dacb4 ("netdev:
reshuffle netif_napi_add() APIs to allow dropping weight") which added
new APIs to call when a non-default weight wishes to be sent.
QDF function __qdf_netif_napi_add() is the abstraction of
netif_napi_add(). Update the implementation of this abstraction to
call either netif_napi_add() or netif_napi_add_weight() based upon
kernel version.
Change-Id: I4817614408c6eb2d4741444efc9db3a79a200550
CRs-Fixed: 3364271
Currently the ENHANCED_OS_ABSTRACTION implementation of some of the
NAPI QDF APIs are directly calling Linux native APIs rather than
calling the __qdf static inline abstraction APIs.
An upcoming patch modifies the static inlines to handle changes made
to the NAPI APIs in Linux kernel versions 5.19 through 6.1, so update
the ENHANCED_OS_ABSTRACTION implementation to use the static inlines
so that the version-specific changes only need to be made in one
place.
Change-Id: I90473a8495e923c65d4e390057c421b6fc60f170
CRs-Fixed: 3364270
Remove QMI QDF abstraction APIs as QMI is now
added as a non converged component.
Change-Id: I91acd4560d456396aaebdbfbd82f71bf5c2ed4f6
CRs-Fixed: 3349631
With NBUF_MEMORY_DEBUG=n and IPA_OFFLOAD=y, below errors are seen.
qdf/linux/src/qdf_nbuf.c:943:12: error: no previous prototype for function
'qdf_nbuf_smmu_map_debug' [-Werror,-Wmissing-prototypes]
qdf/linux/src/qdf_nbuf.c:955:12: error: no previous prototype for function
'qdf_nbuf_smmu_unmap_debug' [-Werror,-Wmissing-prototypes]
Currently above two APIs are only declared with NBUF_MEMORY_DEBUG=y.
Checking their definitions, could see that they have two variants
with NBUF_SMMU_MAP_UNMAP_DEBUG=y|n and they should only be valid
with IPA_OFFLOAD=y since IPA API is referenced in them.
Hence properly declare qdf_nbuf_smmu_map_debug() and
qdf_nbuf_smmu_unmap_debug() so that they're only valid with
IPA_OFFLOAD=y. With that, two variants are still kept.
With NBUF_SMMU_MAP_UNMAP_DEBUG=y, smmu map and unmap operations
are tracked. With NBUF_SMMU_MAP_UNMAP_DEBUG=n, no trackings are
maintained.
Change-Id: I83b08b1152d98b3efed3e52e564af0ebfbe5a7f7
CRs-Fixed: 3348594
nbuf could be freed when some error conditions are hit so
always validate nbuf while processing MPDU/MSDU level TLVs.
Change-Id: I5e0756bc8ba0a8c68c6ce8d2886b5b63068626a0
CRs-Fixed: 3318966
Add new QDF API's to handle napi, softirq related handling
in rx thread and rx refill thread.
Change-Id: I0f371c89e65d8b20f059c56097bac07ec1e19cc9
CRs-Fixed: 3341804
Compilation is failing due to Missing definition
of KERNEL_VERSION as the Header file is added
before including <linux/version.h>.
Fix is to move the Header file at the end.
CRs-Fixed: 3338337
Change-Id: I83fc448becc4af81df9b4c7b3fe9193875c7f6f1
Currently we distinguish EAPOL frames by taking the secure bit in key
information field into account. This is sometimes error because for WPA
handshake M3/M4 secure bit is 0 (GTK is not included in M3) whereas for
WPA2 handshake M3/M4 secure bit is 1 for WPA2 handshake. This change uses
the ack bit in key information field to differentiate M1/M3 from M2/M4,
then uses the key data length as well as Key Mic and Encrypted Key Data
in key information field together to identify EAPOL M2 and M4 frames.
Change-Id: Iac88bc5b942415edee08dc4a98dbd4e811cb8604
CRs-Fixed: 3327876
The following change introduced misspellings of "whether", so fix
them.
- Change-Id I50b747710eb3c49eab60c81bbc61e75e2f8650ed
qcacmn: Handling of IGMP packets in MLO Multipass
Change-Id: I09891388e45a210457d46fb3528efdd5a32905dd
CRs-Fixed: 3319323
Multiple QDF rate limit identifiers use a misspelling of the word
"suppressed" so fix those misspellings. For two public functions
create macros with the old names to avoid breaking existing clients.
Change-Id: I0107b157374046ab8f3467801563c02f0f2651fa
CRs-Fixed: 3313685
In the api qdf_eapol_pkt_type_to_subtype(), the EAPOL start
packet is not logged to userspace.
Modify the api qdf_eapol_pkt_type_to_subtype() to support
EAPOL Start logging
Change-Id: Ic985a3f6713d298ae04559a897312fdbadb57275
CRs-Fixed: 3311616
Due to the CCE rule in QCN9224 IGMP packets will be routed
to err ring. When multipass is enabled, perform multipass processing
before handing over the packet to stack.
Change-Id: I50b747710eb3c49eab60c81bbc61e75e2f8650ed
CRs-Fixed: 3275888
Before we are updating RSSI params directly into mon_rx_status
this structure will reset every PPDU this breaks iwconfig,
wlanconfig and monitor packet RSSI values.
Fix added to storing the values in the mon_pdev.
Change-Id: I9f8fa776c65cbad84fac5e8c2f65b3fce1386e20
CRs-Fixed: 3276503
CNSS prealloc maintains various prealloc pools of 8Kb, 16Kb, 32Kb
and so on, and allocates buffer from the pool for wlan driver. When
wlan driver requests to free the memory buffer then CNSS prealloc
derives slab_cache from virtual memory via page struct to identify
prealloc pool id to put memory buffer back into the pool.
In kernel 5.17, slab_cache is removed from the page struct. Modify
QDF functions to add headroom at the beginning of allocated buffer
to store cache pointer. CNSS prealloc will store cache pointer in
this headroom during allocation and later use it in identifying
prealloc pool id to put back the buffer.
Change-Id: I2c19b72b82092d553d474a50385ed3095a0fab39
CRs-Fixed: 3312550
When migrating to Linux Kernel v5.19 the following compilation error
was encountered:
i_qdf_defer.h:192:19: error: cast from 'qdf_defer_fn_t' (aka 'void (*)(void *)') to '__qdf_bh_fn_t' (aka 'void (*)(unsigned long)') converts to incompatible function type [-Werror,-Wcast-function-type]
tasklet_init(bh, (__qdf_bh_fn_t) func, (unsigned long)arg);
This revealed the fact that the QDF bottom half abstraction was not
cleanly implemented. The current implementation freely typecasts the
abstracted signature:
void (*func)(void *arg)
with the Linux-specific signature:
void (*func)(unsigned long arg)
This has worked in the past since a void * and and unsigned long are
the same size and hence could be freely converted from one to another.
However the Linux Kernel now supports Call Flow Integrity which
requires that the function signatures must always exactly match.
To address this issue rewrite the bottom half abstraction to use an
intermediate dispatching function, exactly like is already done for
the deferred work abstraction.
Change-Id: I56b5a8ab9515033d8237302300fd6b55ea755633
CRs-Fixed: 3305515
While migrating from v5.15 to v5.19 of the Linux Kernel, a build error
was observed:
ERROR: modpost: "do_exit" [...] undefined!
The reason do_exit is undefined is because Linux Kernel commit
eb55e716ac1a ("exit: Stop exporting do_exit") removed the
EXPORT_SYMBOL() with the justification "there are no more modular uses
of do_exit".
Commit eb55e716ac1a was preceded by commit 111e70490d2a
("exit/kthread: Have kernel threads return instead of calling
do_exit") which details why, since commit 63706172f332 ("kthreads:
rework kthread_stop()"), it is unnecessary to call do_exit().
Note that commit 63706172f332 was introduced in 2009 in v2.6.31-rc1.
Since we do not need to support any kernels before that time, we can
follow the same advice and return instead of calling do_exit().
Currently do_exit() is only called from qdf_exit_thread(). As a result
of the preceding investigation, all former callers of qdf_exit_thread()
have been modified to no longer call it. Since it is obsolete, remove
it.
Change-Id: I22f27692fa8766df080630b9b0640c259285557c
CRs-Fixed: 3300460
In kernel 5.18, netif_rx_ni() is removed. So redefine netif_rx_ni
with netif_rx.
Change-Id: Ia0e43089f028f3bfa71d658d1e64ddeafd32d289
CRs-Fixed: 3298369
In kernel 5.16, __alloc_size is defined in linux/compiler_types.h
file. So instead of calling this macro, define and use new macro
__qdf_alloc_size.
Change-Id: Ie1930bf2aaf0cb6bc079bc66aba9eeba92ec8c12
CRs-Fixed: 3295139
In kernel 5.17, net_device->dev_addr is changed to const unsigned char*
and can only be updated via dev_addr_mod(). Add a new function
qdf_net_update_net_device_dev_addr() to call kernel API dev_addr_mod().
Change-Id: Ifecfb453f5dc6b066892c04f4bdbec3759e32c53
CRs-Fixed: 3298120
For kernel version 5.15 or later, include linux/stdarg.h in
i_qdf_types.h and for older versions include stdarg.h.
Also remove inclusion of stdarg.h from dp_internal.h,
qdf_trace.h and qdf_types.h files.
Change-Id: I2eaa1af06fda0ac07a1be3d245f197de0b85719d
CRs-Fixed: 3295172
Implement qdf support for skb shared info and frag list append.
qdf macros will be used to handle skb shared info and list append.
Change-Id: I3e91bfb7a09f2e4547b3210a10919d6c84ec6567
CRs-Fixed: 3243932
The NOL and CAC timeout callback function is divided into two parts:
HardIRQ and workqueue. If NOL/CAC expires, the callback function runs in a
HardIRQ context and the rest of the task runs in a workqueue to avoid
deadlock issues.
Issue: Workqueue tasks run in a low-level context. The task's execution
might have been delayed.
To fix this, run the "NOL" and "CAC" timer in softirq context.
Use QDF_CONTEXT_TASKLET instead of QDF_CONTEXT_HARDWARE as a argument in
qdf_hrtimer_init. If it is a "QDF_CONTEXT_TASKLET," the HR timer
initialises with softIRQ mode(HRTIMER_MODE_SOFT) and runs in softRQ
context when timer expires.
Change-Id: I9e23a9dff1a9c4669bb85342b3ffd91bc46ebe95
CRs-Fixed: 3239417
rx_bank_id defined in IPA driver is a write parameter for WLAN.
Therefore abstract the QDF macro in a set way, where bank id
obtained from wlan driver is passed as an input parameter to
the macro and rx_bank_id field is then being set within the macro
itself.
Without the fix, setting the bank id to IPA driver is like
MACRO_FOO(foo) = val. On build targets with kernel version < 5.15.41,
this can lead to unexpected build error.
Change-Id: I727b8af0ad7bd076e7756b51682842e947eb0a36
CRs-Fixed: 3291711
rx_bank_id is newly added in IPA driver to represent bank id
field in TX descriptor for BE chipsets. Therefore add same qdf
definitions for DP layer to pass the bank id to IPA driver.
Change-Id: I7efe7ec6917eab131e2b441a502cdb25e682a88a
CRs-Fixed: 3291711
Add return value for qdf trace rate limited function to give
the caller a chance to know whether the current logging message
is bypassed or not. This allows the caller to skip additional
logging when logs are being rate limited.
Here is the value for this return:
false: log is not limited, output is normal.
true: log is limted, will not be output in the log.
Change-Id: Ia5ae0e5676072142c3daf9b64a9bcf609692abf2
CRs-Fixed: 3284268
To support SMMU debug framework, add new definitions
and add logic to track the mapping and unmapping of
a buffer via nbuf tracker.
CRs-Fixed: 3255423
Change-Id: I0b9e2828e6cd5e3204b6bba57af8806c4d080b32
In api __qdf_nbuf_data_get_eapol_subtype(), the EAPOL key_info
is evaluated only for SAE authentication, which result in EAPOL
logging failure for FILS authentication.
Check ACK and Secure bit in EAPOL key_info to determine
EAPOL packet irrespective of authentication protocol.
Change-Id: Ieef143d36d85cbf473b682810d658de93dbbdad2
CRs-Fixed: 3268362
Save the jiffies value in a per-timer context
in qdf_mc_timer_t while processing qdf_mc_timer_start
and scheduler_mc_timer_callback. It will help the
debugger to know the exact time gap between the
start and stop/expiry of the QDF timer.
Change-Id: Ia79011971184de9390632253417ee35dc7d26cf8
CRs-Fixed: 3283746
a. Optimize mon_rx_status and mon_rx_user_status objects memory
b. Add QDF API to remove last element in nbuf queue
Change-Id: I53328aae4d2861e0d2972556f61c8556be5e601c
CRs-Fixed: 3278895
Add the missing module id and names to g_qdf_category_name array,
and missing module trace default level to module_trace_default_level.
By using the command ‘Cfg80211tool ath0 g_qdf_cv_lvl ‘ It displays all
the Module id names
CRs-Fixed: 3273947
Change-Id: Ia4b2b49aae6fa5eaba667f26498708e500a231c7
Remove unused local variables in the qdf memory component
to address the compiler warnings.
CRs-Fixed: 3272720
Change-Id: I9b784a43897003f374239ed2f27e0bb8e0ce4c93
The control buffer element of socket buffer structure (sk_buff)
is of the data type char and the virtual address element of network
buffer control block structure is of the type unsigned char. The
current prototypes cause this pointer assignment with different
signedness.
Fix this by using appropriate type in the API definition.
Change-Id: Ic20ca29ce5d26a134ef295663632a5b7fd420954
CRs-Fixed: 3269690
Current code registers va-md entry with static name
'qdf_va_md' when loading wlan driver, with no unregister
upon failure or driver unloading, this has a problem when
multiple wlan drivers are present, in which case it will
try to load all one by one during system bootup, but only
one driver will be loaded successfully at last. The
notifier_block for the unexpected wlan drivers will be left
in the notifier chain, which will result in kernel panic
when collecting minidump.
We can improve this by registering va-md entry with module
name, and unregistering the entry during de-init with the
newly added API qcom_va_md_unregister(), then different
wlan driver will register va-md entry with different module
name, and the entry will be unregistered on loading failure
or unloading, then there will be no stale notifier_block.
Change-Id: Ic08136f3f2ce1c202cab1ee68d8d376f2bd2fa57
CRs-Fixed: 3265807