Commit Graph

19009 Commits

Author SHA1 Message Date
Venkateswara Naralasetty
fffd884d26 qcacmn: add shadow register config support for wcn6450
Add support to send shadow register configurations to target
for wcn6450. This support is enabled with the feature macros
CONFIG_SHADOW_V3 and CONFIG_ADRASTEA_SHADOW_REGISTERS.

Change-Id: Ib67993ec838195a5fe174d42cf54ddc0075c3bc3
CRs-Fixed: 3381139
2023-03-03 05:26:51 -08:00
Venkateswara Naralasetty
4728143e0e qcacmn: add MSI and timer/batch intr threshold config support
WCN6450 CE provides registers for configuring MSI and timer/batch
interrupt thresholds like Lithium SRNGs.

Configure MSI and timer/batch interrupt threshold registers
during CE ring setup.

Change-Id: Ifa4c5a4d14caa70ae644123409cccc6f56476d85
CRs-Fixed: 3381135
2023-03-03 05:26:41 -08:00
Surya Prakash Sivaraj
176d7758b2 qcacmn: Add macro to determine WPA3 AKM
Add a macro to determine if a particular AKM is WPA3-based
AKM.

Change-Id: I9b3f546e2e0f69281305ca9052dc109fb6812e21
CRs-Fixed: 3418837
2023-03-02 23:54:29 -08:00
Jeff Johnson
b46eae96f7 qcacmn: Fix IPA documentation
The kernel-doc script identified some documentation issues in the
top-level ipa folder, so fix them.

Change-Id: Ie128c65a495bab06c5207fff768a111de6bab958
CRs-Fixed: 3420684
2023-03-02 23:54:20 -08:00
Venkateswara Naralasetty
1067c35404 qcacmn: add ce src/dst desc changes for wcn6450
WCN6450 uses adrastea copy engines with the following changes
for data and control messages between host and target,
 * 40-bit addressing support
 * SRC/DST desc format changes

Add ce desc changes required for WCN6450 data path.

Change-Id: I71f60f8f23aa7eebb9fa3848d33a02d579e9ef7a
CRs-Fixed: 3381129
2023-03-02 23:54:09 -08:00
Narayan Subramhanyan
4c942e661a qcacmn: Add manual ulofdma trigger bit in rx ppdu user stats
Extract manual ulofdma trigger bit as part of rx ppdu stats per user
update process

Change-Id: I2a697f91e572f88a36f96085d15c90c679deaf0c
CRs-Fixed: 3418677
2023-03-02 23:53:59 -08:00
nobelj
20db7b641f qcacmn: Add initial support for word mask compaction
Add initial support for word mask compaction.

Change-Id: Ife05e355395fbc6c6804c34f62954a2b04a2cd03
CRs-Fixed: 3398292
2023-03-02 20:41:06 -08:00
Pavankumar Nandeshwar
3377c445f8 qcacmn: Do not process Umac reset in DS mode
Do not process Umac reset in DS mode as it is
currently not supported.

Change-Id: Ieaa850ee65d17605cb2b2d3e6d3eb222531c93ae
CRs-Fixed: 3418738
2023-03-02 20:40:56 -08:00
Debasis Das
747b42cc98 qcacmn: Add latency and throughput parameters for SAWF UL
Enhance the SAWF UL related API's and structure definitions
to configure min_tput and max_latency parameters.

CRs-Fixed: 3398855
Change-Id: Iffe82b765e90386a21aa47016db61f953ba9a5bc
2023-03-02 19:03:40 -08:00
Jeff Johnson
0eda2812d9 qcacmn: Add wlan_cfg80211_nla_put_u64_64bit()
OSIF currently defines function wlan_cfg80211_nla_put_u64() which
provides an interface to the Linux Kernel's nla_put_u64()
functionality. This wrapper handles the fact that the underlying API
has a different name and signature depending upon kernel version.
However, this function has a limitation, namely that if it has to pad
the skb, it will use a netlink pad attribute that may not be defined
in the same enum as the u64 attribute. This can lead to attribute
parsing issues by the recipient.

To avoid this problem, introduce wlan_cfg80211_nla_put_u64_64bit(),
which allows the caller to provide the pad attribute id. This will
ensure that the u64 attribute and the pad attribute are from the same
enum, and hence should prevent nla_parse() issues.

Change-Id: I9e4183fa088248abfdda435b9d5e159400521969
CRs-Fixed: 3414639
2023-03-02 16:28:52 -08:00
Edayilliam Jayadev
7f60898cfc qcacmn: Fill "blanking status" field of SAMP message
Extract the blanking status from Spectral reports and upload
it to user space via SAMP message.

CRs-Fixed: 3413925
Change-Id: Ib033b88190be6bca3dff903cf279a9883821fb10
2023-03-02 14:50:16 -08:00
Narayan Subramhanyan
52ee3a44b1 qcacmn: Add support for manual ulofdma trigger
1. Enable sending of SU/MU manual ulofdma trigger config to target
2. Enable processing of manual ulofdma trigger feedback event from target

Change-Id: Iba99137f87230222ad5896cd25df49ce8d2cf0de
CRs-Fixed: 3412905
2023-03-02 04:18:02 -08:00
Shivam Kumar
37066e5d01 qcacmn: Print last wmi command tx completion time
Seeing kernel panic when max limit is reached for
pending WMI cmds, self-recovery is triggered that
sends a WMI cmd to crash the FW. This will not go
through and call recovery again

Change-Id: I55d025ac4fbf8b18ac441a135d10d558b2ec4d1e
CRs-Fixed: 3397524
2023-03-01 13:12:48 -08:00
Qun Zhang
021943de3d qcacmn: Check wmi_service_thermal_mgmt for legacy wlan temperature
For legacy wlan chip, it uses wmi_service_thermal_mgmt to
announce its temperature capability.
Add wmi_service_thermal_mgmt checking to support legacy
wlan chip temperature as well.

Change-Id: I529e08780ba0c19a2953a36d821946958726ab7d
CRs-Fixed: 3413651
2023-03-01 10:29:57 -08:00
Vinod Kumar Myadam
9934d3513c qcacmn: Fix out-of-bounds of src_freq
When handling WMI_ROAM_SCAN_STATS_EVENTID,
the number of channels scanned for each roam trigger is fetched from
wmi_roam_scan_info TLV (wmi_roam_scan_info->roam_scan_channel_count),
The total number of channels for all the roam triggers is fetched from
param_buf->num_roam_scan_chan_info.

chan_idx is the index used to fetch the current channel info TLV to be
read. So if wmi_roam_scan_info->roam_scan_channel_count provided by
firmware exceeds the total param_buf->num_roam_scan_chan_info starting
from given chan_idx then OOB access of event buffer can happen.

To avoid this, validate the sum of the current chan_idx and
src_data->roam_scan_channel_count against
evt_buf->num_roam_scan_chan_info.

Change-Id: Ied94464d1f12690cf8832962b94595c2e00c33f8
CRs-Fixed: 3357714
2023-03-01 08:53:40 -08:00
Jeevan Kukkalli
7908154e77 qcacmn: Fix non-raw frag length issue
Subtract L2 header pad byte from frag length
while adding frag to skb

Change-Id: I6b3f710e8a7451de427640fdb92ac45ed97d8097
CRs-Fixed: 3414008
2023-03-01 05:45:12 -08:00
Krunalsinh Padhar
66e6f0c19c qcacmn: primary UMAC selection for 3 link MLO association
Add capabilities to select primary TQM in case of
3-link association in a four chip HW.
The idea is to find the link that is adjacent to both the
other links and use it as the primary UMAC

CRs-Fixed: 3417387
Change-Id: Ibf2f6040cbc6f355980cdfcb5491109998ad8919
2023-03-01 05:45:03 -08:00
Uraj Sasan
f48d910d04 qcacmn: APIs to set and get chip adjacencies in 4 link MLO
For 4 LINK MLO new API's for
1. Update chip info with the chip id and adjacent chip id's.
2. Given two psoc ID's return if two psoc are adjacent.

Sample topology

        chip0
      /      \
    chip1    chip2
      \      /
        chip3

Above, chip0 has chip1 and chip2 as adjacent chips.

Change-Id: I7eafde7779e957bc8161ef37baa6077278800e81
CRs-Fixed: 3381066
2023-03-01 05:44:54 -08:00
Deeksha Gupta
d9be0596ba qcacmn: API to expose vdev mlo_external_sae_auth
Adding a new API to expose vdev_objmgr.mlo_external_sae_auth

Change-Id: I5ea1910dad2871290440e941fb33fa1f3d4e8099
CRs-Fixed: 3402538
2023-03-01 05:44:44 -08:00
Deeksha Gupta
d7eb35e4de qcacmn: Introduce a new macro to support ML external auth changes
Introduce new macro to support ML external auth changes in
host driver with cfg80211.

Change-Id: Ifa9ab729ce12b261d10cddc699bfb9a5e1b4956a
CRs-Fixed: 3385381
2023-03-01 05:44:33 -08:00
Sheenam Monga
a1a81cce96 qcacmn: Don't Scan same mac frequencies, if low latency SAP present
Currently, Scan list is trimmed based on low latency sap frequency.
But even after removal of 6 GHz frequencies from scan list,
host receives scan events for 6 GHz frequencies because rnr info
is updated and hint bssids and hint ssids are added due to which
FW scans 6 GHz frequencies also.

Fix is to update hint_bssid and hint_s_ssid to those frequencies
only which are allowed to be scanned in case low latency sap is up.

Change-Id: I7f9bc6b6262a235d5aa02c9155555b4827227acf
CRs-Fixed: 3379401
2023-03-01 00:54:16 -08:00
Liangwei Dong
9149ed9f51 qcacmn: Add QCA_WLAN_VENDOR_MCC_QUOTA_TYPE_LOW_LATENCY
Add QCA_WLAN_VENDOR_MCC_QUOTA_TYPE_LOW_LATENCY attribute
to enable/disable Multi-Channel concurrency low latency mode.
The firmware will do optimization of channel time quota for
low latency in Multi-Channel concurrency state if enabled.

Change-Id: Ibcf1ac82b2650899043ea9b61be5e1501e2d85a1
CRs-Fixed: 3409648
2023-03-01 00:53:46 -08:00
Surya Prakash Sivaraj
315a1b3f8b qcacmn: Enable P2P GO operation on indoor channels
Do not mark REGULATORY_CHAN_NO_IR channel flag for
the 5 GHz indoor channels if p2p go support is enabled
on indoor channels.

Change-Id: I7fbae71766260513aa9946446b7e8bf8507df53b
CRs-Fixed: 3411708
2023-02-28 20:01:10 -08:00
Kenvish Butani
f2fbe214d4 qcacmn: WMI service command for peer meta data
Update wmi service command for peer meta data
versions

Change-Id: I97be875375cc1f6f764bf0309e273783b89d1e47
CRs-Fixed: 3416826
2023-02-28 20:01:00 -08:00
Namita Nair
23628bf248 qcacmn: HTT support for optional wifi datapath
This change adds rx filter reservation, addition,
deletion anad release support for optional wifi datapath
feature. The parameters required for the rx CCE filters,
are passed to FW in the HTT message. FW responds with the
result of the request. Rx data packets matching the applied
filter parameters are routed to specific REO rings.

Change-Id: I6762912bbb2aefce940d6fa3cea4871a7c89409c
CRs-Fixed: 3401148
2023-02-28 16:57:51 -08:00
Namita Nair
a33b4b04bb qcacmn: Fix opt dpath compilation error for OWRT SI
Currently, there is a compilation error on the
OWRT SI in the alternate code path when optional
dp feature is not enabled.
The caller wlan_ipa_wdi_init_set_opt_wifi_dp() passes an
argument of incompatible type. This change fixes the
compilation issue.

Change-Id: I1f2eecbb67bfb2ef17ee73ce2faedb85827b4bbc
CRs-Fixed: 3417214
2023-02-28 16:57:41 -08:00
Namita Nair
0103de1889 qcacmn: Fix single filter addition opt wifi dp
Currently when filter addition request for two
filters is sent one by one, filter handle
is not set correctly. This change handles
the condition to assign the correct filter handle.

Change-Id: I1e3ae07ee7718cf533784861003a47e6678b51be
CRs-Fixed: 3410387
2023-02-28 16:57:32 -08:00
Namita Nair
aab63b2b96 qcacmn: Add optional wifi datapath feature ipa layer
This change adds the optional wifi datapath feature
to transfer data to and from modem via WLAN.
By using the existing path between WLAN and IPA, this
change registers new interfaces between IPA and WLAN
to reserve, add, delete and release rx filters,
which are required for setting up CCE filter rules.
These filters help to determine which packets need
to be routed to IPA specific REO rings.

Change-Id: I17c2ab77ae343f15d6b79fa02bb70ed62294089c
CRs-Fixed: 3403314
2023-02-28 16:57:22 -08:00
Himanshu Batra
d1d1ea0482 qcacmn: Add vdev up bitmap for mlo sync wait state handling
In MLO scenario where start/cac response for partner ML AP vdevs are
processed simultaneously on different CPU cores, the order in which
the vdev sm lock is acquired may lead to deadlock.
To fix add change to have vdev up bitmap and process sync complete
only for those vdevs for which the bitmap is set

Change-Id: I9ca8b192edeb7d491be3a7acff30c2d3545a5417
CRs-Fixed: 3403603
2023-02-28 11:20:08 -08:00
Amith A
6ddd0be86d qcacmn: Add API to extract rate2power update response WMI event
Add API extract_tgtr2p_table_event_tlv to extract TLVs from the response
event of rate2power table update cmd. Add a wrapper function
wmi_extract_tgtr2p_table_event and call extract_tgtr2p_table_event_tlv
from it.

Add the host event id wmi_pdev_set_tgtr2p_table_eventid corresponding to
the target id WMI_PDEV_SET_TGTR2P_TABLE_EVENTID. Also add this mapping
to populate_tlv_events_id function.

Change-Id: I0a870125120f1f92ee50002953e114b27d597ae6
CRs-Fixed: 3405417
2023-02-28 11:19:58 -08:00
Amith A
0d3ef18cdf qcacmn: Register API to handle rate2power table update response event
Add APIs to register and unregister the handler of rate2power table update
response event received from target. Add the handler API
tgt_rate_to_power_complete_handler to extract the response event
parameters from WMI.

Change-Id: I462abd8a333c74b943a04c62096da647ab667adc
CRs-Fixed: 3405417
2023-02-28 11:19:46 -08:00
Jeff Johnson
3a13457906 qcacmn: Fix umac/scan documentation
The kernel-doc script identified some documentation errors in the
umac/scan folder, so fix them.

In addition, Change-Id I8340c6c654cf03f63aee9ed622e3db38056d714f
("qcacmn: Add API to access scan entry partner info") made an
incorrect copyright change, so fix that.

Change-Id: I629f5961ab0a284c70a47fc7d71fe81d5572ae25
CRs-Fixed: 3380633
2023-02-28 11:19:35 -08:00
Tiger Yu
73d74205f1 qcacmn: Free peer obj directly if current context is in non-atomic
Free peer object directly if current running context is not in atomic to
make the code much more reasonable and logical.

1. If current running context is not in atomic state, it's safe to call
   peer free object directly.
2. If current running context is in atomic state, then delay this free
   in a work item to avoid scheduling issue.

Change-Id: I9acf97354619ed2b6c09b3f619bd10dc930d8afb
CRs-Fixed: 3412111
2023-02-28 05:14:29 -08:00
Jithender Miryala
c042d60f04 qcacmn: Add function pointer declaration for sta max pwr limit
Add the function pointer 'send_set_sta_max_pwr_table_cmd'. The
corresponding function sets max tx power limit for each sta

The function pointer mentioned above calls the
send_set_sta_max_pwr_table_cmd_tlv API to fill the each STA max power
values in appropriate WMI structure and sends to the FW.

Change-Id: I62cba94645e942fb63415d81cd9c2a1f5be3f47e
CRs-Fixed: 3399241
2023-02-28 03:33:54 -08:00
Amith A
b9bdf95319 qcacmn: Add dispatcher & core APIs for rate2power update response handler
Add API reg_process_r2p_table_update_response to handle the event received
from target in response to rate2power table update cmd. Make a call to
end_r2p_table_update_wait from this API to end the wait timer triggered
for the update cmd. Add end_r2p_table_update_wait to
wlan_lmac_if_reg_tx_ops. Add a dispatcher
tgt_reg_process_r2p_table_update_response for this API and register it as
a rx_ops.

Add register and unregister APIs of rate2power table update response
handler to wlan_lmac_if_reg_tx_ops. Call the register API in
regulatory_psoc_open and unregister in regulatory_psoc_close. Define
struct r2p_table_update_status_obj and its members to receive the
response of rate2power table update cmd from target.

Change-Id: I6909e37620b94dc7fdcd3c7c0915a3fad8fa1cda
CRs-Fixed: 3405417
2023-02-28 00:43:04 -08:00
Tiger Yu
60bdb7983d qcacmn: Create new qdf_in_atomic interface to wrap the kernel API
Create the new qdf_in_atomic to wrap the kernel API in_atomic to be
used in the driver to check whether current running thread is in atomic
context.

Change-Id: I69843ff79559612561d57965a6754990e9b6f4f9
CRs-Fixed: 3414725
2023-02-28 00:42:50 -08:00
Jeff Johnson
8dd3d7f449 qcacmn: Fix QDF time-related documentation
The kernel-doc script identified documentation issues in the QDF
time-related abstractions, so fix those issues.

Change-Id: Ieffd4a5b2a38674da1b19735ad6f35844d355f09
CRs-Fixed: 3406200
2023-02-28 00:42:37 -08:00
Subrat Mishra
19f2d80322 qcacmn: Add 160 MHz and 320 MHz BW support for Smart Antenna
Add 160 MHz and 320 MHz BW support for Smart Antenna.

Peer connect gets rate codes for all supported BW on connecting peer
as part of wmi_peer_ratecode_list_event. This changes add 320 MHz and
160 MHz BW support.

Change-Id: I715dd5a64c38114fef6e17c2e2f6a526e1a716c2
CRs-Fixed: 3381648
2023-02-27 20:54:01 -08:00
Edayilliam Jayadev
84ec76c1aa qcacmn: Set/get scan blanking feature support
Extract the scan blanking feature support from WMI service ready
event and store it in target if data structures. Add API to check
whether scan blanking feature is supported for a given pdev.

Change-Id: I65fefbb879b8433a68338bfcd3e4f729eff3ddd8
CRs-Fixed: 3413922
2023-02-27 06:31:43 -08:00
Surabhi Vishnoi
bbae800e14 qcacmn: Fix checksum offload logic for rx packets
Currently, hardware supports checksum offload for only ipv4, tcpv4/v6 and
udpv4/v6 packets. But driver sets checksum as CHECKSUM_UNNECESSARY for
all rx packets if tcp_udp_err and ip_err bit in rx_attention_tlv is not
set. If driver sets CHECKSUM_UNNECESSARY in skb then network stack will
not validate checksum and will reply to even wrong checksum packets
which is incorrect.

So, fix is to set checksum for all rx packets other than ipv4, tcpv4/v6 and
udpv4/v6 to CHECKSUM_NONE instead of CHECKSUM_UNNECESSARY so that network
stack validates checksum.

Change-Id: Ifb9c74fb729361da6db715fa667f926b71ce948f
CRs-Fixed: 3378925
2023-02-27 04:13:44 -08:00
Nitin Shetty
0be3bb02d9 qcacmn: enable/disable PPEDS per WLAN soc
Enable or Disable PPEDS for specific
WLAN Soc.

usage:
add "ppeds_wifi_soc_cfg=0x02"
in /ini/global_i.ini to enable
PPEDS only for second WLAN SoC.

Change-Id: I65f138cf37298feac70e76b95c22507e58394618
CRs-Fixed: 3408439
2023-02-27 04:13:33 -08:00
Aniruddha Mishra
cb82f44a0d qcacmn: Add null checks in Rx TLV recording APIs
Add null checks in Rx TLV recording APIs for updating index,
clearing buffer and init deinit.

Change-Id: Iab40bd3130c335924a4849516b71ebaaa88e84bb
CRs-Fixed: 3416657
2023-02-27 00:14:26 -08:00
Amrit
e0e041ecc0 qcacmn: Add support to disable sched mode
- Add wmi vdev param id
- Add wmi ops to send disable sched mode cmd

Change-Id: I3cdc4bd799e8292e16863aaac16ee3f5a7a9b388
CRs-Fixed: 3399498
2023-02-27 00:14:13 -08:00
nobelj
d794bc0885 qcacmn: Add support of EHT and USIG in tx monitor
Added support for EHT and USIG in tx monitor.

Change-Id: I1f6cc345ace19532cc356464c82476b084ca53dc
CRs-Fixed: 3386918
2023-02-26 19:12:52 -08:00
nobelj
5c911bbaca qcacmn: Add initial support of EHT and USIG in tx monitor
Modified the code to support EHT and USIG in tx monitor and additional
fix

Change-Id: I1cc58f0787a84a379fb4e2ce4954455e0c6551a2
CRs-Fixed: 3386918
2023-02-26 19:12:42 -08:00
Jeff Johnson
16b41427d4 qcacmn: Relocate wlan_spectral_register_rx_ops() kernel-doc
The kernel-doc script is reporting an issue with the documentation in
global_lmac_if/src/wlan_global_lmac_if.c. Fix this by relocating the
documentation for wlan_spectral_register_rx_ops() so that it is
adjacent to one of the function implementations.

Change-Id: I3e0ddeb92296f321252fa861f1b8573c531ac447
CRs-Fixed: 3414237
2023-02-26 19:12:30 -08:00
Wu Gao
ebf01e75ce qcacmn: Set pdev id base on FW capability for CFR request
Host and FW have agreement about using fixed pdev id for CFR on HMT,
which required changes on both sides. In case only picked host
change with old FW, which will case device broken during booting up,
add this change to set pdev id base on FW capability for CFR request.

Change-Id: Iac82074228d42c6f51ea2024defdb0272e5cb396
CRs-Fixed: 3409616
2023-02-26 17:35:54 -08:00
Venkateswara Naralasetty
ad3cd5fa15 qcacmn: hif/ce changes for wcn6450
Add the following hif/ce changes to add support for wcn6450,
* New host/target wlan ce config for wcn6450
* New service to pipe map for wcn6450
* New host/ce/target table attach for wcn6450

Change-Id: I20fa1410f5e4e7a0146bc2d0b48a18269ca4a8c9
CRs-Fixed: 3381111
2023-02-26 12:33:47 -08:00
abhinav kumar
4440f2b36a qcacmn: Don't send roam indication to kernel if bss is NULL
Currently, before sending a roamed indication to the kernel,
the host calls kernel APIs ieee80211_get_channel and
cfg80211_get_bss to confirm whether the roamed channel and
BSSID are present in the kernel scan cache or not.

In case if kernel returns the BSS pointer as NULL, Host calls
osif_populate_mlo_info_for_link API and uses BSS pointer
to populate MLO info for the link(s), this results in a
NULL pointer dereference in the host.

Fix is to avoid sending roam done indication to kernel/
userspace if kernel returns BSS pointer as NULL and issue
disconnection with reason REASON_UNSPEC_FAILURE.

Change-Id: I28f51369115a7ef20105073e4fcf6ee912c068b2
CRs-Fixed: 3404248
2023-02-25 01:29:42 -08:00
Mohammed Ahmed
03dcdab044 qcacmn: add rtpm stats sysfs functionality
Current code allows for viewing Runtime PM stats via debugfs only.
Fix this by adding sysfs viewing functionality.

Change-Id: I97fe054bab5651f538c8d80ad031dc33933946a4
CRs-Fixed: 3414303
2023-02-25 01:29:32 -08:00