Commit Graph

19224 Commits

Author SHA1 Message Date
KARTHIK KUMAR T
e9d807fa5e qcacmn: add recommended err/debug function
add recommended err/debug function

Change-Id: I6ab2bcd19b96cbbc943a60b2736dd3ab771f0b9c
CRs-Fixed: 3470494
2023-04-19 14:21:40 +05:30
Amith A
aed594f4b8 qcacmn: Add API qdf_file_read_bytes to read a file from host
Add an API qdf_file_read_bytes to read a file from within the driver
and return the contents of it along with its size.

Change-Id: If777e1b9c610e8cc7dd35be42fa9ced2bb1c6560
CRs-Fixed: 3456115
2023-04-19 01:28:49 -07:00
KARTHIK KUMAR T
ee18fc409b qcacmn: add recommended err/debug function
add recommended err/debug function

Change-Id: Ic81cf4f66c03d122cad171216fe20fe1f6417d0d
CRs-Fixed: 3470494
2023-04-19 13:04:36 +05:30
Venkateswara Swamy Bandaru
c7c3c49381 qcacmn: Add 11be D3.0 status code
Update status codes enum with new EHT status codes
as per 11be D3.0

Change-Id: Ib3a4963a01f1df98d2adf77d57b03d933753f297
CRs-Fixed: 3469032
2023-04-19 00:02:07 -07:00
Venkateswara Naralasetty
3d36f49c3c qcacmn: Increase WMI CE buffer size for WCN6450
Increase the CE2 buffer size to 3520 bytes to support large
management frame receive.

Since CE2 & CE3 shares common EP in Fw because of which any changes
in buffer size in CE2 need to have similar changes on CE3 as well.
So to accommodate change increase CE3 buffer size.

Change-Id: Ibf01111e9bde65c29ae5a1a8e8e167fcfc64c02c
CRs-Fixed: 3471668
2023-04-19 11:13:03 +05:30
Santosh Anbu
0ea3d84794 qcacmn: Add host AST entry only if peer is found
Add change to manage host ast entry only if peer is found for the given
peer mac address.

Change-Id: I07bdb1e1b6db33b50f4e32896d2fcbb6aa87ecab
CRs-Fixed: 3472995
2023-04-19 11:05:19 +05:30
nobelj
45043b787f qcacmn: Add fix to increment NSS after parsing
NSS value derived from HW, need plus 1 to match the sniffer capture.
Added fix to increment NSS after parsing the TLV.

Change-Id: I1e0ef3949cefa1453290e400fa4a66000a3b5dea
CRs-Fixed: 3444508
2023-04-18 22:03:00 -07:00
Sreeramya Soratkal
73d7e4d15a qcacmn: Derive TID from DSCP in case of legacy SCS
With the convergence of SCS and SAWF, do not override the TID
for legacy SCS case. Retain the value obtained using DSCP in
this case.

CRs-Fixed: 3460620
Change-Id: I19502d09f5f37376bac08eb05fcf770c71331e1c
2023-04-18 22:02:50 -07:00
Gururaj Pandurangi
1958f62e8a qcacmn: Add new wrapper API to send peer-level T2LM
Add a new wrapper API to send peer-level negotiated
tid-to-link mapping to FW as the existing API to send
the mapping received from the beacon/probe response
uses ML dev context whereas the new API uses ML peer
context.

Change-Id: Ifada5600e9524585c69847f332ed0280fd316813
CRs-Fixed: 3423127
2023-04-18 20:04:44 -07:00
Deeksha Gupta
28f7114375 qcacmn: Add new APIs to get t2lm info from vdev or peer obj
Add new APIs to get t2lm info from vdev or peer obj

Change-Id: Id1d3bf9ec88cb14574803ac952304a3103397799
CRs-Fixed: 3431479
2023-04-18 20:04:33 -07:00
Surya Prakash Raajen
74c7a8d542 qcacmn: Add CDP api support for umac reset init
Add CDP api support for umac reset init API, these apis are expected
to be called whenever shmem is deinitialized.

Change-Id: I307c586454580ab8f83b0d515defa93d4e8ff656
CRs-Fixed: 3458268
2023-04-18 14:27:32 -07:00
Jianmin Zhu
07390f2011 qcacmn: Don't handle assoc vdev roam if link vdev failed
If link vdev roam sync failed and new dp mlo peer wasn't created,
assoc vdev roam sync was still handled, dp peer update failed
and asserted for mlo peer not found.

To fix it, if link vdev roam sync failed, return to trigger HO_FAIL,
don't handle assoc vdev roam sync.

Change-Id: I47aa70723cd741839cdb8fb21d446730a8ed80e5
CRs-Fixed: 3468553
2023-04-18 14:27:22 -07:00
Adwait Nayak
b37c9cf461 qcacmn: Initial changes for Pebble bring-up in HIF Layer.
Add device Id and target type checks for qcn6432 target
compilation.

Change-Id: Id95d5902e3f3711ab6836b72dc3bcb66b1abf3c6
CRs-Fixed: 3351550
2023-04-18 12:44:37 -07:00
Priyadarshnee Srinivasan
37050737b1 qcacmn: Export regulatory APIs
Export wlan_reg_get_freq_range() and wlan_reg_get_freq_range() APIs
to be invoked by other modules.

Change-Id: I2de7acf395011bdcc20100fc5980ab69f2b9fbeb
CRs-Fixed: 3459316
2023-04-18 12:11:54 -07:00
Priyadarshnee Srinivasan
f1afedc3b6 qcacmn: Set ap_pwr_type only for a 6 GHz pdev
reg_set_ap_pwr_type() API is invoked per pdev and the default ap power type
is set for all bands of the pdev (2.4 GHz / 5 GHz/ 6 GHz). Hence, the
user space command g_ap_power_type retrieves SP Power mode for 2.4 GHz
and 5 GHz pdev in outdoor deployment mode.

Since power type is valid only for a 6 GHz pdev, check if the chip
supports 6 GHz channel range and set the power type.

CRs-Fixed: 3459316
Change-Id: Ib5038d5d019ab9ffaa6a607916e5187ecdbd4e2b
2023-04-18 12:11:35 -07:00
Venkateswara Naralasetty
26099afe23 qcacmn: suspend/resume changes for WCN6450
Changes required for suspend/resume support for WCN6450

Change-Id: I4610f6bdb8de92f03884af6c07a5141dd27174be
CRs-Fixed: 3447469
2023-04-18 12:11:24 -07:00
Ruben Columbus
476546a791 qcacmn: flush ext_qdesc buffer
send CMD_FLUSH_CACHE to HW to flush extended descriptor based
on its size.

Change-Id: Ia1260e54614467215711f84fe5cf51b1d05b050a
CRs-Fixed: 3426113
2023-04-18 12:11:13 -07:00
Namita Nair
e92b9d5b61 qcacmn: Fix memory leak in ipa_config_mem_alloc
Currently when ucfg_ipa_uc_ol_init() fails,
the wlan_ipa_cleanup() is not called. As a result
g_instances_added is not decremented. This
change performs the cleanup if ucfg_ipa_uc_ol_init()
fails.

Change-Id: I22a83f08c51e10246fa99dff2a06c9ec486f605e
CRs-Fixed: 3456523
2023-04-18 12:11:03 -07:00
Shreedhar Parande
9ec10780d7 qcacmn: Fix primary UMAC configuration for bridge peer
Use primary UMAC derivation logic for bridge peer case.

Rename mlo_get_primary_umac_vdev() to
mlo_get_link_vdev_from_psoc_id()

CRs-Fixed: 3454734
Change-Id: Ic732cc6e85b6d9f0d7bc8cea041642164952e304
2023-04-18 12:10:54 -07:00
Sushant Butta
aad187e304 qcacmn: Use monitor pkt tlvs and buffer size for monitor
Use monitor pkt tlvs size and monitor buffer size
instead of data pkt tlv size and data pkt buffer size.

Change-Id: I3099f6526aa11b353c8a5178de450d48f141a461
CRs-Fixed: 3406962
2023-04-18 12:10:42 -07:00
Rakesh Boyina
2567b43224 qcacmn: Add enum to map AFC response format.
Add enum to parse and store AFC response format type. This enum is
used to map the response format negotiated with FW during WMI init.

Change-Id: I5c0b61aeddfce1d1b64f9225f64546f80d0e9e3e
CRs-Fixed: 3420549
2023-04-18 12:09:30 -07:00
Gangadhar Kavalastramath
c2759e1722 qcacmn: Correct reg rules for CC PK
Correct 5 GHz channels reg rule for CC PK.
a. Split CHAN_5170_5330_3 into CHAN_5170_5250_8 and CHAN_5250_5330_12
   to mark missing radar frequency range mark.
b. Change CHAN_5735_5875_8 to CHAN_5735_5875_3 to change regulatory
   power value to 30.

Change-Id: I977273e1dfff9d95ad3ca2580a283594ddf7e9b5
CRs-Fixed: 3459453
2023-04-18 05:15:33 -07:00
Gangadhar Kavalastramath
17e63d7b03 qcacmn: Correct reg rules for APL25
Correct wrong frequency mapping for APL25 RD.
a. CHAN_5170_5330_3 is split into CHAN_5170_5250_8
   and CHAN_5250_5330_12 to mark missing radar frequency
   range.

b. CHAN_5490_5730_9 is split into CHAN_5490_5590_4 and
   CHAN_5650_5730_4 to mark the frequency range as radar
   indication range.

c. Remove unused reg rule CHAN_5490_5570_1

Change-Id: Ib0a754987246329a09cd8779de03859167b80f66
CRs-Fixed: 3447198
2023-04-18 05:15:26 -07:00
Gangadhar Kavalastramath
9fdc54f951 qcacmn: Correct reg rules for CC GB
Correct reg rules for CC GB.
a. Change CHAN_5250_5330_16 to CHAN_5250_5330_12 to mark
   radar frequency range.

b. Change CHAN_5735_5875_7 to CHAN_5735_5875_4 and to remove
   radar marking.

Change-Id: Ie3bf1e6102da1cf8df7b3408c46a6f559abb5743
CRs-Fixed: 3447292
2023-04-18 05:15:22 -07:00
chunquan luo
3ef0de967c qcacmn: Change roam background scan abort log
Roam background scan abort, driver print roam result
failed, but current ap is still connected.
Add roam background scan abort support for roam fail
reason.

Change-Id: I5aff0a679a4e708345684f763cfadb7eb1c7aae1
CRs-Fixed: 3470618
2023-04-18 04:29:58 -07:00
Gangadhar Kavalastramath
7ac839cb9f qcacmn: Cleanup host regdb
Below code changes are made
1. Correct 5 GHz reg rules for APL 26/27 RDs.
   i. APL26 changes
      a. CHAN_5170_5330_3 is split into CHAN_5170_5250_8 and
         CHAN_5250_5330_12 To mark missing radar frequency range.
      b. CHAN_5490_5730_3 changed to CHAN_5490_5730_5 to mark the
         frequency range as radar indication range.
   ii. APL27 changes
      a. CHAN_5250_5330_10 and CHAN_5490_5730_4 are changed to
         CHAN_5250_5330_7 and CHAN_5490_5730_1 respectively to mark the
         frequency range as radar indication range.

2. Remove duplicate entry CHAN_5735_5835_8 (duplicate of CHAN_5735_5835_1)

Change-Id: I7daa70ae992a87de73721bcfab170894af3358ca
CRs-Fixed: 3447101
2023-04-18 12:13:51 +05:30
Zhiwei Yang
8bfebeb4d3 qcacmn: Correct spelling errors
Correct spelling errors
s/QCA_PADDR_CHECK_ON_3TH_PLATFORM/QCA_PADDR_CHECK_ON_3RD_PARTY_PLATFORM

Change-Id: Id33b5f250a0c44f475b3463f9a6a68f83b47b6cd
CRs-Fixed: 3462780
2023-04-17 23:20:00 -07:00
Nobel Sharanyan Jeganathan
bb213216f3 qcacmn: Add support to invoke debug function before assert
qdf assert always, assert without debug information.
Added support to dump needed information before assert.

Change-Id: I2b53b7fa6a600b2a1aafdbc608b95b75feb2133d
CRs-Fixed: 3464724
2023-04-17 12:39:01 -07:00
Nandha Kishore Easwaran
985fc0f9b5 qcacmn: Add txmonitor masks to legacy interrupt
Add txmon masks to legacy irq interrupt calculation.

Change-Id: I247008c89361c069c62c0ac90b12fb798261b9e5
CRs-Fixed: 3438542
2023-04-17 07:08:25 -07:00
Amrit Sahai
9fea4029b7 qcacmn: Fix printing of stats for TX ring for SDX_75
In SDX_75, doorbell register is only writable not readable
so fix printing of stats for TX ring.

Change-Id: I058c4241b9c91902f32ed76f099f7501e667c78b
CRs-Fixed: 3436677
2023-04-17 07:08:14 -07:00
Asutosh Mohapatra
8aa59894fc qcacmn: Invoke reg_propagate_mas_chan_list_to_pdev API during pdev creation
Currently many pev related API's are not present in
wlan_regulatory_pdev_obj_created_notification. As a result many info
is not saved to pdev.

To address this issue invoke reg_propagate_mas_chan_list_to_pdev
from wlan_regulatory_pdev_obj_created_notification.

Change-Id: I47b7c09006c93828db32710d1fa882eb1f9b8ba5
CRs-Fixed: 3461593
2023-04-17 04:35:37 -07:00
Hariharan Basuthkar
457c4a4d08 qcacmn: Move fill_umac_legacy_chanlist out of reg_propagate_mas_chan_list_to_pdev
In the change-id Ied56965c2e8d700a2fc14a5a2b79beed95ac7818,
the call of reg_propagate_mas_chan_list_to_pdev in pdev_obj_creation,
leads to a fatal assert.

Within reg_propagate_mas_chan_list_to_pdev,
ol_ath_fill_umac_legacy_chanlist is called, and internally
within ol_ath_fill_umac_legacy_chanlist, the cookie for the event
ic->ic_wait_for_init_cc_response is set, before the
ic->ic_wait_for_init_cc_response is created in the function
wlan_pdev_update_feature_ptr. This leads to a crash.

To fix this issue, separate fill_umac_legacy_chanlist from the function
reg_propagate_mas_chan_list_to_pdev and call fill_umac_legacy_chanlist
only when WMI_REG_CHAN_LIST_CC_EVENTID or
WMI_REG_CHAN_LIST_CC_EXT_EVENTID is received.

Change-Id: I5fcf85eed32d3ab2cd4fd88ad117fcf22c5875b2
CRs-Fixed: 3427982
2023-04-17 04:35:25 -07:00
Aasir Rasheed
9de835aa83 qcacmn: Add 11be Draft 3.0 support
Add EHT capability and EHT Operation changes to
support 11be Draft 3.0.

Change-Id: I099416f985af1f4e6f2f69fc3d55ef158d6fb2ca
CRs-Fixed: 3453366
2023-04-17 00:43:25 -07:00
chunquan luo
6d4417ce5f qcacmn: Update roam trigger sub-reason
Update roam trigger sub-reason for common roam
and wlan diag event need update to user space.

Change-Id: I66733736d9148e3748c653d4b43a1aa6d2f438cf
CRs-Fixed: 3459385
2023-04-16 20:57:42 -07:00
Asutosh Mohapatra
936a78882e qcacmn: Validate reg rules received from fw
Currently host isn't validating the reg rules received from
fw. Host saves these reg rules locally and updates the same
info to kernel.
To address this issue add logic to validate reg rules in host.

Change-Id: I7369126e83ab210720cb5b2db2e11d3aa7491b4a
CRs-Fixed: 3376632
2023-04-16 00:36:13 -07:00
Jia Ding
e5050154f1 qcacmn: Add WLAN IPA RX exception packet to pm queue
Below signature is seen in driver logs.
Target is suspended (via send_process_dhcp_ind_cmd_tlv:244)
cds_trigger_recovery_handler: critical host timeout trigger
fw recovery for reason code 34

Suspend/Resume test is run with SAP started and a ref-client
is associated with the SAP. One DHCP-Req packet is received
from ref-client before driver completes the resume process.
With SAP_DHCP_FW_IND feature enabled, driver will send one
WMI cmd to target for such DHCP packets received.

With IPA_OFFLOAD enabled, such DHCP packets are received from
the RX exception callback from IPA driver. Hence add support
to queue these DHCP packets onto pm_queue_head skb queue when
WLAN IPA component is still in suspended state. When IPA component
is resumed from suspend state, pm_queue_head skb queue will be
drained to pass up queued RX exception packets to stack.

For QCA_IPA_LL_TX_FLOW_CONTROL enabled platforms, such as WIN
chipsets, suspend/resume is not supported. Hence wrap fixes
only for !QCA_IPA_LL_TX_FLOW_CONTROL.

Change-Id: I823005d9b58d1d62eec2c044621e1c1423aa3537
CRs-Fixed: 3457254
2023-04-15 12:07:00 -07:00
Jianmin Zhu
54d4446b4b qcacmn: Add channel switch wrapper IE V2 present flag
Channel switch wrapper IE V2 includes bandwidth indication sub IE from
IEEE802.11be draft 3.0 optionally.

Change-Id: Ie1b62ad18dfeccc64505240399947fc5f3e8a18d
CRs-Fixed: 3458351
2023-04-15 02:57:49 -07:00
Gururaj Pandurangi
a24e1ab231 qcacmn: Add a new MSD duration subfield
Add a new MSD duration subfield that holds duration value
in the units of 32us. Deprecate the old subfield msd_dur_us
that holds the duration value in microseconds.

Change-Id: Id4789c550778d901cb519e53e350cc9fc66611e7
CRs-Fixed: 3446377
2023-04-14 23:40:42 -07:00
Deeksha Gupta
f2a2315e31 qcacmn: Introduce new macro to support get TID to link map info
Introduce new macro to support get TID to link map status command
and TID to link response event.

Change-Id: I2f8fc03c306eae7f11d77253ce0ec565c9df2d71
CRs-Fixed: 3431459
2023-04-14 10:13:35 -07:00
Srinivas Girigowda
3228443af7 qcacmn: Set Tx ring packet type flag properly
Currently, HTT Tx ring packet type flag is set as bitwise operation
which is incorrect and results in "Debug Assert Caught".

Set this CTRL and DATA packet type flag with a value of 1.

Change-Id: I62e89fe637441fcc680ea8d5fe8d157d8e7142ae
CRs-Fixed: 3415733
2023-04-14 08:24:44 -07:00
Srinivas Girigowda
7a5a84d777 qcacmn: Fix compile error 'address of array will always evaluate to true'
address of array 'tx_ppdu_info->hal_txmon.rx_user_status' will always
evaluate to 'true' [-Werror,-Wpointer-bool-conversion]

Change-Id: Ic148f34b82ce756eb07173b43f8f155a7b4a12d9
CRs-Fixed: 3415726
2023-04-14 08:24:33 -07:00
Jinwei Chen
075d9641ff qcacmn: fix dp_peer ref_cnt leak in CFR processing
dp_peer ref_cnt is increased in dp_rx_mon_populate_cfr_ppdu_info(),
but it does not release it at last, this leads to dp_peer ref_cnt
leak which then dp_peer memory can't be freed and corresponding dp_vdev
leaked as well.

release the ref_cnt for dp_peer at the end of
dp_rx_mon_populate_cfr_ppdu_info().

Change-Id: I8ac301609deb3790ad9f3d6eda85d502cede9799
CRs-Fixed: 3461642
2023-04-14 08:24:21 -07:00
Srinivas Girigowda
cfbf0f77e5 qcacmn: qdf: Add IEEE80211 type/subtype macros
As part of TX Mon 2.0, WIN has IEEE80211 specific macros only in WIN side
header file, but now Tx Mon 2.0 is required to be supported on MCC side
and these macros are not available. Hence extend by adding the required
type/subtype macros in qdf common header file.

Change-Id: I76cf0a0c226664c34c9c8bd10e280a500b3c61a9
CRs-Fixed: 3415715
2023-04-14 08:24:10 -07:00
Srinivas Girigowda
82089b850a qcacmn: Add QCA vendor command to get the monitor mode status
Add a new vendor command QCA_NL80211_VENDOR_SUBCMD_GET_MONITOR_MODE to
get the local packet capture status in the monitor mode. Add required
attributes to respond with status of the monitor mode. The monitor mode
can be started/configured by using the
QCA_NL80211_VENDOR_SUBCMD_SET_MONITOR_MODE subcommand.

Change-Id: I72edd46f85b545d7aecb3c704441e810db9ca711
CRs-Fixed: 3415711
2023-04-14 08:23:58 -07:00
syed touqeer pasha
5b0980f461 qcacmn: Check Tx halt during umac reset
1. Check Tx halt during umac reset and avoid halt if set already.
2. Perform SRNG disable only in case of umac reset

Change-Id: Id364a6460a64e83002b5c96e08031ad2a0bc8fd7
CRs-Fixed: 3459427
2023-04-14 01:54:13 -07:00
Srinivas Dasari
b81a86ab1c qcacmn: Add logs in MLO vdev flag set/clear API
Currently, MLO vdev flags(WLAN_VDEV_FEXT2_MLO and
WLAN_VDEV_FEXT2_MLO_STA_LINK) are set/get from both initial
connection and roaming. As there are no logs in the set/clear
APIs, it's difficult to track where it's set/cleared for debugging.
Add logs in set/clear APIs to indicate on which vdev the flags
are set/cleared.

Change-Id: I7bd2dcd10a58ec3c09c7fd7a52169a3fea236223
CRs-Fixed: 3467014
2023-04-13 22:57:04 -07:00
Jinwei Chen
499696eab5 qcacmn: update TX ILP capability to DP and target
After receiving WMI service ready ext2 event and htt msdu index to
qtype map is derived, call CDP API to evaluate whether TX ILP can be
supported or not, update the TX ILP capability to DP, also send WMI
INIT CMD to FW to notify if host has enabled the TX ILP support or
not.

Change-Id: I472ebc5c7fa4b2996b790b58274fa3c048f6d7f9
CRs-Fixed: 3447519
2023-04-13 20:05:46 -07:00
Shwetha G K
ebdd12b6a9 qcacmn: Update the metadata version for Waikiki
Update meta data version of Waikiki as it supports AOA
phase delta extraction now.

CRs-Fixed: 3462217
Change-Id: I909802417125ecafaf4d14466c349f0ed9b45fd2
2023-04-13 16:35:03 -07:00
Vijay Krishnan
c75e7910c9 qcacmn: Declare puncturing SM states, APIs
Implement the data structures for DFS puncturing and
un-puncturing state machines. For details of state
machine implementation refer to the change id
I5accbf2866a830447bd776b989c31909060c45ca.

CRs-Fixed: 3462277
Change-Id: I026228fb72302408f2992325099a31a60e986e3c
2023-04-13 16:34:53 -07:00
Srinivas Pitla
4d1ebd3402 qcacmn: Fix duplicate allocation for aid mgr
For MBSSID, aid mgr is allocated twice in
few corner cases of VAP create.

This change adds check, if aid mgr is allocated
by legacy code in vap create, aid mgr allocation
would be skipped

Change-Id: Ie44fab12badb5c9487ce3de333376e1885e727d0
CRs-Fixed: 3461883
2023-04-13 13:59:24 -07:00