Commit Graph

19784 Commits

Author SHA1 Message Date
Ashish Kumar Dhanotiya
8775d1b518 qcacmn: Update policy mgr device mode conversion API
Currently policy mgr api policy_mgr_convert_device_mode_to_qdf_type
accepts only QDF_OPMODE as an argument and converts it to
policy_mgr_con_mode. Also, name of this api does not reflect
the task this is doing.
With the new SAP mode for low latency low throughput SAP,
to convert the QDF_OPMODE to policy_mgr_con_mode, host driver
needs to know if it is ll_lt_sap or normal sap. To get this
information, update policy_mgr_convert_device_mode_to_qdf_type
api to accept the psoc and vdev id as parameters. Also, rename
this api to reflect the task this apiis doing.

Change-Id: Ib182d8091305fd9c4f35b424d7b4a751a61730ad
CRs-Fixed: 3525427
2023-07-08 11:11:14 -07:00
Jinwei Chen
6081fb19d6 qcacmn: Support dp monitor desc pool memory pre-allocation
Support dp monitor desc pool memory pre-allocation.

Change-Id: I7edd766a3f02be76c1e7342ac6a55c02b43474fa
CRs-Fixed: 3544435
2023-07-08 01:26:16 -07:00
Yu Wang
1632797f1c qcacmn: refine hif tasklet latency detection
When one of the enabled CE tasklet is executed, it will
check latency of all the others which are enabled, it's
redundant. Add a new API to check latency for a single
tasklet.
Add API to record sched time for a tasklet, which will
check the enablement of detection before recording the
time.

Change-Id: I515ca27fc2e97231397573b4903c001d29326bd2
CRs-Fixed: 3514285
2023-07-08 01:26:06 -07:00
Shashikala Prabhu
7f898dfcc2 qcacmn: Add buffer window for umac reset in progress
When the peer delete timer/vdev manager response timer expires, host checks
if the umac reset is in progress. If so, host will retrigger the timer.
It is possible that the umac reset is just completed and either of these
two timers got expired. In this case, host will assert saying that the peer
delete response/vdev manager response is not received from FW. FW may take
a few milliseconds to send the peer delete/vdev manager response to the
host after the umac recovery completes.

Hence, to avoid the crash, check if the umac reset was in progress during
the umac reset buffer window.

Add the below changes as well,
1) INI support to get the umac reset buffer window value.
2) Renamed the API dp_umac_reset_is_inprogress as
   dp_get_umac_reset_in_progress_state to return either
   CDP_UMAC_RESET_IN_PROGRESS or
   CDP_UMAC_RESET_IN_PROGRESS_DURING_BUFFER_WINDOW.

Change-Id: Ie15ef0731bad4b0ed955a479f00e297b7ba10729
CRs-Fixed: 3522665
2023-07-05 17:19:13 -07:00
Prasanna JS
0d36189af1 qcacmn: Add macro to check the phymode is EHT
Add macro to check the phymode is EHT when
WLAN_FEATURE_11BE not defined

Change-Id: If6ae8829c21d7cbed1740aa2f637f4b90dea1a3d
CRs-Fixed: 3546219
2023-07-05 17:19:02 -07:00
jinbao liu
252faaf14e qcacmn: Fix some potential uninitialized local variables
This change initializes some uninitialized local
variable to avoid arbitrary values in some cases.

Change-Id: I906528514c41132ead23433a8a91374b4309c543
CRs-Fixed: 3545869
2023-07-05 17:18:52 -07:00
Thirusenthil Kumaran J
f1ea292064 qcacmn: Set the VAP flag to block Tx after radar is hit
The change 'I4acd2f70707386f731e9b8fa2ef90a37868cbe23'
makes modifications in MLME and DP (Data Path) to optimize
the check for radar in per packet transmission path to
reduce CPU processing overheads. This new check is based on
a VAP variable that indicates whether radar is detected
or not.

Upon radar detection, send an indication to MLME through the
registered callbacks to update the status of the flag.

Change-Id: Id0582b5d79be672949f150907eb9ee64fa17d4f7
CRs-Fixed: 3528956
2023-07-05 17:18:41 -07:00
Amit Mehta
241f75e574 qcacmn: Release RTPM refcount if force wake release fails
Currently RTPM refcount is not released if force
wake release fails. This leads to mismatch in number of
RTPM get and put during RTPM de-init.
Fix this refcount release if force wake release fails.

Change-Id: I4334de57e00139c0d30d37d7e19a399760400a50
CRs-Fixed: 3544981
2023-07-05 17:18:31 -07:00
Pavankumar Nandeshwar
9f16b44a9b qcacmn: Add missing nbuf_count updates in qdf APIs
Add missing nbuf_count updates in qdf APIs which are used
for keeping track of nbufs in debug mode.

Change-Id: If031ec8860513dddb1704a75e4761ce14aa26f21
CRs-Fixed: 4728458
2023-07-05 17:18:21 -07:00
Nandha Kishore Easwaran
8a745cc343 qcacmn: Remove alignment of 4 bytes
Remove alignment of 4 bytes when allocating memory for Copy
engines. Copy engine buffer size is 2048 which is already
aligned to 4 bytes. This 4 byte alignment addition results in
64 bytes extra memory allocation for each skb since SKB_DATA_ALIGN
rounds it off to nearest 64.

Change-Id: Ib680547d2bcfe57b6eadda5301677d68e4a931a4
CRs-Fixed: 3533492
2023-07-05 17:18:11 -07:00
Varsha Mishra
eadb65cdde qcacmn: Update vlan tag in multipass received frames
All packets except TID 0 first come to REO error NULL queue.
This happens because only TID 0 queue is setup initially.
Added multipass specific code in NULL queue path.

Change-Id: I8103215ad3e28796c868caa3eec816b9d118da9d
CRs-Fixed: 3482796
2023-07-05 08:36:38 -07:00
Priyadarshnee Srinivasan
596b68de2e qcacmn: Add APIs to support RCSA and puncturing
Add API utils_dfs_get_radar_bitmap_from_nolie() to fetch the puncture
bitmap from NOL IE. Also, move dfs_convert_wlan_phymode_to_chwidth()
from oss to common code. Also, add a 11BE version of
utils_dfs_convert_wlan_phymode_to_chwidth() API.

CRs-Fixed: 3538818
Change-Id: I258452e122d259c7b16655b760f217073b8e2e9b
2023-07-05 08:36:22 -07:00
Neha Bisht
092276d49f qcacmn: Change num of packets to unsigned 64bit
Change number of packets datatype to unsigned 64bit and handle
respective print message changes.

Change-Id: I65e1ae90985b7d2fb29ea57f8034f5858491dae1
CRs-Fixed: 3534513
2023-07-05 08:36:10 -07:00
Namita Nair
b50ceeee79 qcacmn: Defer IPA SMMU mapping to OPT_DP reserve
Currently, IPA SMMU map/unmap is called as part
of init. This causes every nbuf to be mapped
to IPA in the Rx path, causing throughputs
to drop. This change resolves the problem by
deferring the IPA SMMU map/unmap
call to OPT_DP filter reserve/release, as
nbuf needs to be mapped to IPA only in this scenario.

Change-Id: If198a6c5f22af58fdaf9d9c020c74b1f76002e37
CRs-Fixed: 3496679
2023-07-04 22:36:13 -07:00
Sai Rupesh Chevuru
7830b92b9d qcacmn: primary umac update event to handle downgrade scenarios
Trigger the STA primary umac update event to umac
to handle downgrade scenarios.

Change-Id: I510d3d4443a978a8e2112f7372d0d1a03a508d18
CRs-Fixed: 3540314
2023-07-04 22:36:03 -07:00
Amit Mehta
54976d0150 qcacmn: Add changes to aggregate rx packet count
Add changes to aggregate rx packets count for
per link stats.

Change-Id: Iba3409751a36a2d1bbb7559289bdd6ae414678ac
CRs-Fixed: 3547369
2023-07-04 19:15:49 -07:00
Kenvish Butani
54b264c3a1 qcacmn: Fix RCU stall due to long SG list in RX Error path
RootCause:
WBM RX Error Ring, receives a packet from RXDMA with FCS Error
and MSDU Continuous Bit set. As MSDU continuous bit is set the
nbuf is added to temp SG list, but SG for these error is not
supported, hence the temp SG List never got reset and it
incremented hugely leading to high number of nbuf for
processing in list which lead to RCU stall

Fix:
IN WBM RX Error Ring, SG is supported only for two kind of
errors i.e. NULL Desc and Unencrypted. For all other kind of
errors reported by HW with MSDU Continuous bit set, explicitly
reset MSDU continuous bit in nbuf

Change-Id: I8d5858ccefb89b93e1c4fb36609d747eef00e8f2
CRs-Fixed: 3532208
2023-07-04 19:15:39 -07:00
Chunquan Luo
fe2d300175 qcacmn: Add QCA vendor interface to support per-MLO link configurations
Add support for per-MLO link configurations in
QCA_NL80211_VENDOR_SUBCMD_SET_WIFI_CONFIGURATION and
QCA_NL80211_VENDOR_SUBCMD_GET_WIFI_CONFIGURATION commands.

Additionally, add documentation for
QCA_NL80211_VENDOR_SUBCMD_SET_WIFI_CONFIGURATION and
QCA_NL80211_VENDOR_SUBCMD_GET_WIFI_CONFIGURATION commands.

Change-Id: Id83912079b3a4876891ac48beb069b17d4b8ebbf
CRs-Fixed: 3540412
2023-07-04 19:15:28 -07:00
Chunquan Luo
0b81d02fd1 qcacmn: QCA vendor interface to control maximum allowed bandwidth update type
Add support to control maximum allowed bandwidth update type for
the current connection.

Change-Id: I27880a5a969adf46861a58907d1e9e8ec35f9053
CRs-Fixed: 3540098
2023-07-04 19:15:18 -07:00
Nidhi Jain
84327ba403 qcacmn: Change mlo_err to mlo_debug
Change mlo_err to mlo_debug to avoid prints for WIFI6/6E platforms.

Change-Id: I48d83683afd3fb0e6db7844a9254e1b78f9e2868
CRs-Fixed: 3532032
2023-07-04 15:41:31 -07:00
Himanshu Batra
6ebded7a71 qcacmn: Use qdf_list APIs instead of TAILQ APIs
Use qdf_list APIs instead of TAILQ APIs.

Change-Id: Ie82fe6450013838f4125073d1f9a6da41b8516ed
CRs-Fixed: 3545385
2023-07-03 12:54:05 -07:00
Prasanna JS
5f2fa5a090 qcacmn: Add target_if API to update SR threshold
Add target_if api to update SR threshold.

Change-Id: Ia2fd40a92598c772bb02998d938edb9b98ac253e
CRs-Fixed: 3374628
2023-07-03 12:53:54 -07:00
Jia Ding
442d77805c qcacmn: Fix buffer overflow for ipa_ctx->sys_pipe
ipa_ctx->sys_pipe[] is an array with size WLAN_IPA_MAX_SYSBAM_PIPE (4).
On MDM platforms, WLAN_IPA_MAX_IFACE could be set to 4 in defconfig.
E.g. on sdxpinn/hmt platform, CONFIG_NUM_IPA_IFACE is set to 4.

kiwi_v2_defconfig
CONFIG_NUM_IPA_IFACE := 4

With this, WLAN_IPA_RX_PIPE will be equal to 4, leading to array index
out of bounds buffer overflow.

Fix is to set WLAN_IPA_RX_PIPE to WLAN_IPA_MAX_SYSBAM_PIPE - 1 to point
to last index of ipa_ctx->sys_pipe[].

Change-Id: I4929aec92ed2064c5194ec18ad7b33574ba3c3e7
CRs-Fixed: 3545420
2023-07-01 13:35:20 -07:00
Asutosh Mohapatra
17ed1cfc4f qcacmn: Add enhancements to support SET_FCC_CHANNEL 2
Currently in host support is there for SET_FCC_CHANNEL
command for values 0, -1, 1.
Add changes to support SET_FCC_CHANNEL command for value 2.

Change-Id: I151ce33677406670bebc7a8861e34da3e4c5917a
CRs-Fixed: 3537395
2023-07-01 06:51:49 -07:00
Nijun Gong
ce14cb4467 qcacmn: Enable IPA pipe for second SAP
On sdxpinn target (first multi-core MDM platform) with rome
chip attached, it's required to enable IPA pipe for both SAP in
AP-AP mode, but currently only first AP has IPA pipe enabled.
The second AP always goes with sw path because wlan firmware isn't
notified to choose IPA path by wlan_ipa_uc_offload_enable_disable().

The fix is to always enable IPA for each SAP no matter how many
SAP are started if MDM_PLATFORM is defined.

Change-Id: I8a2048aae04e14aa840d7d9a2ccb287201336cf3
CRs-Fixed: 3532926
2023-06-30 23:49:11 -07:00
Amrit Sahai
5aac5cb621 qcacmn: Fix peer authentication for wds client
Fix the peer authentication for wds client, in SDX_WKK
wds client needs to get authenticate when packets receive
from exception path as wds client is not directly associated,
authentication is done by verifying from ast table

Change-Id: I93051d67fc3d5be0af9242e6579f44883b3f757d
CRs-Fixed: 3534370
2023-06-30 23:49:01 -07:00
Amruta Kulkarni
82d71c7059 qcacmn: Send Link reconfig event on assoc vdev
Host driver is currently indicating link reconfig
event on link vdev.

Change is to indicate link reconfig on the primary vdev
affiliated with wlan0.

Change-Id: I9955d98bcd52554adf22f838bfbd2263418432d1
CRs-Fixed: 3535940
2023-06-30 20:28:45 -07:00
Jinwei Chen
c8a4260394 qcacmn: Fix incorrect mon filter setting for RXDMA_BUF
For LPC mode, host only need to configure the filter for
monitor status ring, filter for STA RXDMA_BUF has been
configured during dp_soc init, do not touch filter of
RXDMA_BUF for LPC mode.

Change-Id: Ia64b0f608ce7c31517ef7174293bc52e6d4ab9b7
CRs-Fixed: 3531963
2023-06-30 20:28:35 -07:00
Paul Zhang
b92d8a9d10 qcacmn: Add vendor attributes for EPCS feature
Add vendor attribute QCA_WLAN_VENDOR_ATTR_CONFIG_EPCS_CAPABILITY
to set EPCS (Emergency Preparedness Communications Service)
feature capability.

Add vendor attribute QCA_WLAN_VENDOR_ATTR_CONFIG_EPCS_FUNCTION
to enable/disable EPCS priority access.

These are for testing purposes.

Change-Id: I4b8c186777763eac31f38de5bcbfc8a71a9a87d9
CRs-Fixed: 3511139
2023-06-30 04:26:46 -07:00
Liangwei Dong
8859a74378 qcacmn: Update scan entry chan based on RSSI
For 11A only AP, HT and DS IE are not present in beacon,
STA may receive the beacon on adjacent channel, then
driver may record wrong channel frequency in scan entry.
Fix by update the channel frequency by old scan entry
channel frequency if new beacon RSSI lower than old beacon
RSSI and gap is bigger than 40 db within 5s.

Change-Id: Idbd144befa78597fcd50a753ca13b0f11d1f45f5
CRs-Fixed: 3484664
2023-06-29 18:14:46 -07:00
nobelj
37791f6cb1 qcacmn: Add fix to set NULL to msdu extn desc on release
Add fix to set NULL to msdu extn descriptor on release.
if same descriptor is used for other frame type. there is a more chance
extension descriptor can be added to the same free list.

Change-Id: I25e86c0ae03b4b39b6813519864afd16b3d19e4c
CRs-Fixed: 3503237
2023-06-29 18:14:36 -07:00
KARTHIK KUMAR T
0f5280024c qcacmn: Add addr conversion logic for raw mode packets
In case MLO HW will do the link mac address to mld mac address
conversion in RX path, But currently HW is supporting only for
802.3 mode.
For RAW mode(802.11) this conversion not happening on HW so added
this address conversion logic on SW.

Change-Id: Ibd794510e9d0ebdca884ed2e4043e0c48052156e
CRs-Fixed: 3537914
2023-06-28 22:11:26 -07:00
Amrit
ec3d41727b qcacmn: Add NULL check before unmapping desc
Add NULL check before unmapping desc

Change-Id: I633568f66dec04a5591a0161fce04c9392542e57
CRs-Fixed: 3481046
2023-06-28 22:11:15 -07:00
Vijay Krishnan
baf0a16d29 qcacmn: Stop puncture SM during DFS reset
When AP is moving to down state, stop the puncture SM.
If we do not stop the SM, the corresponding puncturing
slots will not be available for new radar puncturing.

Introduce a new member dfs_is_unpunctured in dfs_punc_obj
structure. The dfs_is_unpunctured holds the information
whether SM object is unpunctured at that moment. Since
both un-puncturing and puncturing are done through vdev
channel change, current code cannot differentiate between
if the channel change is for puncturing or it is for
un-puncturing.This variable will help us identify whether
an event should be for puncturing, or it is for
un-puncturing.

Handle the radar puncturing after the usenol check,
otherwise the usenol case will not get executed.

The internal_radar_pattern is not needed as the
information can be fetched from DFS puncture SM object.

CRs-Fixed: 3540171
Change-Id: If889348056ad82e7cbbe6ca954af7ddfa99e6865
2023-06-28 05:05:30 -07:00
Liangwei Dong
7280363bff qcacmn: Add force link state API by link id bitmap
Add send_mlo_link_set_active_id_cmd_tlv API to send
force link bitmap to target.

Change-Id: Ie3a41bd2c82b6d10c8d82e4afa83621969c01798
CRs-Fixed: 3515441
2023-06-28 05:05:18 -07:00
David Oladunjoye
6182daebfe qcacmn: Add support for aux support capability
Add support for aux support capability.

Change-Id: Ifc955d6dde8f995133cf3c7fb389d5fc3b3a046b
CRs-Fixed: 3509127
2023-06-28 01:23:28 -07:00
Thirusenthil Kumaran J
0da20d2361 qcacmn: Fix Bootup crash for Partial Offload chipset
Swift radio in Hawkeye is a partial offload chipset supporting
11AC mode. It has no support for MLO. Currently, when MLO event
handler registration fails due to No Support, an error is returned.
This terminates the device bootup causing a crash.

To solve this issue, do not return an error status when the
event registration fails due to No support.

Change-Id: I89819461bbc1d0fa31ef0558c93d06723f13de35
CRs-Fixed: 3520749
2023-06-28 01:23:05 -07:00
Asutosh Mohapatra
ac4f5f95e7 qcacmn: Handle invalid 6 GHz power type advertised by AP
If AP doesn't advertise 6 GHz power type or advertises
invalid 6 GHz power type, find the power type for connection
as per below logic.
a) Connect in VLP only if VLP power type is available for STA
   for the connection channel.
b) Otherwise connect in LPI only if LPI power type is available
   for STA for the connection channel for STA.
Don't connect if VLP or LPI power types are not available for
STA for the connection channel.

Change-Id: I4c2d146050bc49b856f22c15af36a2b1d229f448
CRs-Fixed: 3529927
2023-06-27 21:49:14 -07:00
Vishal Miskin
051073735a qcacmn: Enhance data path traces to show latency in us
Enhance data path tx/rx traces to show latency in
microseconds.

Change-Id: Ic3457e38bb1bcc354fe81b087185bd94be8b0b94
CRs-Fixed: 3523927
2023-06-27 21:49:04 -07:00
Nanda Krishnan
baf49c9f89 qcacmn: Tracking the ring util stats
Added serviceability changes to track ppe2tcl
and wbm2rel ring util stats

Change-Id: Ia154ae4914c47f010921eaed10b8a4dde50884bf
CRs-Fixed: 3537655
2023-06-27 21:48:54 -07:00
Neha Bisht
c9d9e88708 qcacmn: Update ast entry during PTQM migration
Delete and add ast entry during PTQM migration for current and new primary
peer respectively.

Change-Id: I4a640f84a5778aeff19057e027b3aae9e939487a
CRs-Fixed: 3536670
2023-06-27 07:39:40 -07:00
Guru Pratap Sharma
6646c062ff qcacmn: qdf export mlme_11be_target_capab get/set api
qdf export wlan_psoc_mlme_get_11be_capab and wlan_psoc_mlme_set
_11be_capab api

Change-Id: I4cd10dd40861abf06514e46c7d554a28f7991020
CRs-Fixed: 3540341
2023-06-27 04:04:02 -07:00
Himanshu Batra
bc4f921706 qcacmn: Add support to reject ptqm migration for 4-link RDP
Add support to reject ptqm migration for 4-link RDP

Change-Id: Ib81e053880b74b3c925eb0c69ace3e80f9d08a66
CRs-Fixed: 3529926
2023-06-27 04:03:52 -07:00
Himanshu Batra
be34bbe6fc qcacmn: Add support for ptqm migration
Add support for ptqm migration

Change-Id: I3f3d6e410bee554477e8e058b1da51f2af5abb23
CRs-Fixed: 3529926
2023-06-27 04:03:41 -07:00
Himanshu Batra
6f407b1a93 qcacmn: Modify return type of primary umac selection API
Modify return type of primary umac selection API so that multiple
callers can use the same algo for selecting new primary umac

Change-Id: I6e38839ae3489b6643ef0337c8e20d7c738c3763
CRs-Fixed: 3529926
2023-06-27 04:03:29 -07:00
Biswajit Dash
977b3d1fd6 qcacmn: move ml_peer_valid bit check macros out of qdf
-Moved the get macro from qdf to cdp layer.
-Removed the set macro from qdf and replaced its usage
 in be rx layer with an existing HTT ml_peer_Valid mask.

Change-Id: I4a87b4b560f983c5aa6d026481a88d28e2ff09fd
CRs-Fixed: 3488425
2023-06-26 17:22:44 -07:00
Vishal Miskin
210aad0930 qcacmn: User country set based on INI config params
Do not allow userspace to configure regulatory country
when below INIs are set as:
gCountryCodePriority=0
g11dSupportEnabled=1

Change-Id: Iaae8e209fb99802f67d906fcd70d2c7c0a2f8f06
CRs-Fixed: 3499558
2023-06-26 17:22:34 -07:00
Krupali Dhanvijay
e60150599d qcacmn: Add support to reset CPU freq in HO failure
CPU min frequency is boosted to maximum once roam start is received

Add support to reset CPU frequency in case of HO failure.

Change-Id: I137f78e3a307be136bcc27760be3d91cb6c1868b
CRs-Fixed: 3522954
2023-06-26 03:21:53 -07:00
Jianmin Zhu
7bfd6efab8 qcacmn: Add OUI config to enable CTS2SELF with QoS null frame
Add gActionOUIEnableCTS2SelfWithQoSNull to enable CTS2SELF with QoS null
frame for specified IoT APs.

Change-Id: I706152ae2ebbecb617ccd1295aee3f723fcb3005
CRs-Fixed: 3533498
2023-06-25 03:04:45 -07:00
Rakesh Pillai
316750a78c qcacmn: Fetch FISA params and rx_pkt_tlv size via CDP
Add provision to get the FISA params and rx pkt tlv size
via CDP API.

Change-Id: Ic9b42df999d395e4d739701887a36f3d30ce70f1
CRs-Fixed: 3512039
2023-06-24 13:32:29 -07:00