Commit Graph

17601 Commits

Author SHA1 Message Date
Himanshu Batra
b8f5d7c27a qcacmn: Update ppdu phy tx time irrespective of ACK_BA_STATUS
In case when ACK_BA_STATUS is not received, the ppdu phy tx time is not
getting calculated even though the media is used for the ppdu.
Add fix to ppdu phy tx time irrespective of ACK_BA_STATUS

Change-Id: I23d29b2d282edf6e5d49ce18aecd81e5239a118b
CRs-Fixed: 3288380
2022-09-13 09:23:04 -07:00
Himanshu Batra
f147732272 qcacmn: Add support for link airtime usage telemetry
Add support for link airtime usage telemetry.

Change-Id: I8b796f14d55d56051fb05af255e612e4655db990
CRs-Fixed: 3281355
2022-09-13 09:22:57 -07:00
Himanshu Batra
6a5ab907c1 qcacmn: Update airtime computation to per AC level
Update airtime computation to per AC level.

Change-Id: Ia8cb890d2f1dc167ec3a2610ff5a70238d55262d
CRs-Fixed: 3281256
2022-09-13 09:22:49 -07:00
Tiger Yu
6f012336ae qcacmn: Limit error logging when ce id does not match to tasklet_entry
Limit error logging when ce id does not match to tasklet_entry's ce
id. And dump all tasklet entries info to get more clue in the next
cycle.

Change-Id: Idcd9cb6ff45ef8e05fcea33cad48fa464e4f9a1e
CRs-Fixed: 3284277
2022-09-13 05:03:36 -07:00
Tiger Yu
5bdbb2c2ab qcacmn: Add return value for qdf trace rate limited func
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
2022-09-13 03:24:56 -07:00
Devender Kumar
1c3e98b8f0 qcacmn: Debug framework for SMMU buffer tracker
To support SMMU debug framework for IPA offload, change the
caller IPA component where SMMU map and unmap are done.

CRs-Fixed: 3255423
Change-Id: I5276c0b41c8e315940e8d4f5d3082d45b08b571b
2022-09-13 03:24:48 -07:00
Devender Kumar
736edd06a2 qcacmn: Definitions to support SMMU debug framework
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
2022-09-13 03:24:41 -07:00
Devender Kumar
a85ce1152c qcacmn: Debug framework for SMMU buffer tracker for IPA offload
Debug framework for tracking the SMMU mapping and unmapping of
skb buffer when IPA offload is enable and IPA_SMMU_NBUF_TRACKER
is define.

CRs-Fixed: 3255423
change-Id: I8966097945b33cb866f4642b98b3d1a4beabfad7
2022-09-13 03:24:34 -07:00
Harsh Kumar Bijlani
c84505ec7b qcacmn: Change datatype of rx_snr_measured_time to unsigned long
Change datatype of rx_snr_measured_time to unsigned long.

Change-Id: I37db568a876b15eee73f21474883eb42d4f3b18d
CRs-Fixed: 3281574
2022-09-12 20:55:09 -07:00
Anuj Khera
1417ccdbb9 qcacmn: Add parsing logic for pm_responder bit for TWT
pm_responder_bit was not getting parsed as part of twt setup completion
and stats event in case of WLAN_TWT_CONV_SUPPORTED. Added support for same.

Change-Id: I46f88299850ca3f4402780c302a5cd47ffbc1dc7
CRs-Fixed: 3245871
2022-09-12 15:57:12 -07:00
KARTHIK KUMAR T
8267333021 qcacmn: Add cdp function to get rate/link stats
Add cdp function to get the peer extended rate and link stats.
This change is to support user level command to flush mld/link
peer extended link and rate stats.

cfg80211tool wifiX get_peer_extd_rate_link_stats <mac_addr>

Change-Id: I20cd2b38b242008b95aedc5f9914088a149093dd
CRs-Fixed: 3278042
2022-09-12 15:57:05 -07:00
nobelj
3e3726cc7a qcacmn: Add fix double free in reinject handler
Add fix for double free in Reinject handler. Issue is seen when mesh vap
is present.

Change-Id: I288b1131974c8a3edb83c1b3b2a7a856c4ccbcbf
CRs-Fixed: 3276670
2022-09-12 13:58:43 -07:00
Sushant Butta
b1a6c9543b qcacmn: Optimizations for Tx monitor buffer allocations
Currently 2K Tx buffers are allocated at init time and 6K Tx
buffers are allocated at mon vap creation time.
Changes are done to move Tx buffer allocations to 0+8K model,
where allocations are done when enable cmd is triggered.

CRs-Fixed: 3284106
Change-Id: If0a112b8138f2be1db8f764fd7aa4ef12f274bb7
2022-09-12 11:53:54 -07:00
Abhishek Singh
d14b4649c7 qcacmn: Fix the misspellings of public, module and posting
Fix the misspellings of public, module and posting in
wlan_cm_sm.h

Change-Id: I5285f189ce7befe8da5bea04bac53ba093540120
CRs-Fixed: 3287669
2022-09-12 10:15:39 -07:00
Ananya Gupta
61b836202a qcacmn: Record data if pci write during suspended state
When FW was enabling WOW, a ring HP update interrupt is seen
which led to fw crash.
This change records any PCI writes that went through during
runtime suspend from host.

Change-Id: I3c44760ebaf49a131b483813522fe3e451957215
CRs-Fixed: 3280166
2022-09-12 10:15:32 -07:00
Ripan Deuri
c0e0b4f1e1 qcacmn: Add QDF API to get skb timestamp in microsecond
Add QDF API to get skb timestamp in microsecond.

Change-Id: I14019e5e60599c1499285b92b8727e8d6a9bf782
CRs-Fixed: 3286751
2022-09-12 08:15:11 -07:00
vijaraj
8b843ae157 qcacmn: Enable EAPOL logging for FILS Authentication
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
2022-09-12 08:15:04 -07:00
Shiva Krishna Pittala
527b0343a3 qcacmn: Fix hal_get_srng_ring_id() for Beryllium LMAC rings
For Beryllium LMAC rings, hal_get_srng_ring_id() provides the ring IDs
separately per each LMAC only if that LMAC ring is a destination ring
(This is done to use a common source ring for the DMAC rings).
But the ring IDs for LMAC source rings like DIR_BUF_RX_SRC_DMA_RING are not
being provided separately per LMAC. As a result, these ring IDs in
split-PHY mode are colliding for the 2 LMACs.
Fix this by doing the following.
 - Mark the DMAC common rings within the LMAC rings.
 - Provide ring ID separately per each LMAC if the ring is an LMAC ring
   but not a DMAC common ring.

Change-Id: Ifdae085b5784a03763abfc4edb42d94593e3ea21
CRs-Fixed: 3282702
2022-09-12 05:02:13 -07:00
Rakesh Pillai
ffec5f3f9e qcacmn: Update prealloc size for srng from CFG
Update the prealloc size for RXDMA_BUF and REO_DST
rings using the ini values which have been configured.

Change-Id: Id47fbca3a79b37bba902d1b5bd0bf8c6073648cc
CRs-Fixed: 3283986
2022-09-12 00:28:20 -07:00
Chaithanya Garrepalli
cd40aa85ab qcacmn: Add few missing stats
1. Add stats to indicate REO ring size and Rx desc pool size
2. Add low threshold interrupt stats
3. Update SW2RxDMA ring size max to 16K

Change-Id: If84b88bc08e447774ab445df36b9f2f2219356b8
CRs-Fixed: 3286940
2022-09-12 00:28:13 -07:00
Amith A
dbb1efa360 qcacmn: Disable SP channels in super chan list if AFC not done in indoor
In reg_update_sup_ch_entry_for_mode function, mas_chan_list_6g_ap is
copied to super chan list when AFC power event is not received.
mas_chan_list_6g_ap would have SP channels enabled based on the regulatory
rules and this is propagated to super channel list. In outdoor deployment,
the SP channels can be marked enabled when AFC power event is not received
as there is REGULATORY_CHAN_AFC_NOT_DONE flag set for such channels. But
in indoor deployment, as this flag is not applicable, SP channels should
not be marked enabled.

To fix this, return from reg_update_sup_ch_entry_for_mode function before
enabling the SP channels if the deployment type is not outdoor.

Change-Id: I3c5ccdc4826c33002bf1bb33f686404fa0ffcc65
CRs-Fixed: 3270672
2022-09-11 22:56:07 -07:00
abhinav kumar
2888b71da7 qcacmn: Save jiffies value for QDF timer
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
2022-09-10 10:42:23 -07:00
Sai Rupesh Chevuru
65d7505a94 qcacmn: Configure HW to copy valid msdu_len for all the buffers
Copy msdu_len from last buffer of MSDU to all
descriptors of the MSDU.

Change-Id: I9da18d3d1da948bedc07f091b800ffedbcae7add
CRs-Fixed: 3267841
2022-09-10 04:46:11 -07:00
Srinivas Dasari
be121546e8 qcacmn: Synchronize disconnect in RSO stop req-resp path
Host driver sends RSO stop request to firmware as part of
disconnect and waits for RSO stop response. It pauses the
disconnection and resumes once RSO stop response is received
from the firmware.
But cm_lock is not taken when disconnection is resumed from RSO
stop response path. This causes synchronization issues with
north bound thread which issued the disconnection.
Acquire cm_lock by using cm_sm_deliver_event() API to provide
synchronization between disconnect initiator thread and
scheduler thread.

Change-Id: I3c287a020e0a12abab2ad6237594e022adc904a7
CRs-Fixed: 3287190
2022-09-10 01:31:00 -07:00
Jia Ding
c6704fac9a qcacmn: Properly set WDI version for KIWI family
Set WDI version to IPA_WDI_3_V2 for KIWI and KIWI_V2 chipsets.

Change-Id: I2cda2c32f2d56f06c8a8ee84002c2dff2ea28a12
CRs-Fixed: 3247917
2022-09-09 23:53:37 -07:00
Jianmin Zhu
0e52b90c77 qcacmn: Fix assert when disconnect after roam from legacy to mlo
When roam from legacy to mlo, vdev1 is updated first, ml peer is created,
but failed to attach since it is link vdev, then vdev0 is updated, ml peer
is created again, ref count is 1.

When disconnect, stop vdev1 first, in stop event handler, ml peer ref count
becomes 0, mlo_peer_cleanup is called unexpectedly.
mlo_peer_cleanup  should be called after MLO vdev0 stopped.

To fix it, change wlan_mlo_peer_create, mlo_dev_mlpeer_attach is called if
the ml peer not attached and can't be found.

Change-Id: Iae3b2b498849646ae71154484b555a7fc9a36017
CRs-Fixed: 3277886
2022-09-09 04:09:09 -07:00
Devender Kumar
07327b6ea8 qcacmn: Send client disconnect event to IPA
When AP vap disconnect aburputly or by doing channel switch then for WDS
node, client disconnect event is not sent to IPA driver, hence IPA is
not aware of any new wds client coming behind that peer as the previous
delete event is not handled properly

Fix is to send wds client disconnect event when ast entry are flushed.

CRs-Fixed: 3271481
Change-Id: Id507f543c8f4cb8f69e26ba6ca3a23787af21ed7
2022-09-09 04:09:02 -07:00
Naveen S
d276b0eda6 qcacmn: Add feature flag for Health Monitor Feature
Adding feature flag for Health Monitor so that it can be disabled
for 16M and 256M profiles

CRs-Fixed: 3277434
Change-Id: Ibbbe582acd15ebff7e189fcbaa36429ea519db37
2022-09-09 04:08:54 -07:00
nobelj
5f09e5188b qcacmn: Add minor fix specific to tx monitor
Added minor fix,
a) Handle buffer allocation failed and
b) NULL check

Change-Id: Idaeb1d2b1e9bc613bfaf15b3e028e44846345e2f
CRs-Fixed: 3279243
2022-09-08 21:23:53 -07:00
Paul Zhang
386783a30d qcacmn: calculate the TSF for the reported AP
Per spec 11be_D2.1.1, the TSF Offset subfield of the STA Info field
indicates the offset (Toffset)between the TSF timer of  the reported
AP (TA) and the TSF timer of the reporting AP (TB) and is encoded
as a 2s complement signed integer with units of 2 µs. Toffset is
calculated as Toffset= Floor((TA – TB)/2).

Change-Id: I7810568f6308e369dcf2ff26bdfd1246783466d4
CRs-Fixed: 3276836
2022-09-08 19:45:30 -07:00
Chaithanya Garrepalli
daed8f2cc5 qcacmn: Changes for Rx fast flag
Change to avoid processing of extended features
based of Fast RX flag

Also add changes to enable or disable this flag
based on feature settings

Change-Id: I8064780a271f8bdcf396bb9e2e2c14998f195535
CRs-Fixed: 3268842
2022-09-08 12:24:27 -07:00
Adwait Nayak
f60c8e57d3 qcacmn: Do not send the scan entry for nontx profile to cfg80211 layer
Send only the scan entry for Tx profile to upper layer. As in cfg80211,
it goes through every nontx profile to from a new frame.

Change-Id: I4f01a1a5ed61bfd2a2b8a541c8d3be14ffa2e3c9
CRs-Fixed: 3251364
2022-09-08 12:24:20 -07:00
syed touqeer pasha
b88dc98e98 qcacmn: Fetch drop 3 address mcast value
Fetch the drop 3 address mcast value

Change-Id: If4d714e6b418c3030b247e8dd84b948aa6c140d4
CRs-Fixed: 3282708
2022-09-08 10:48:34 -07:00
Vijay Krishnan
516973c973 qcacmn: Fix compilation issue for BW puncture macro
The macro QCA_DFS_BW_PUNCTURE depends on the macro
WLAN_FEATURE_11BE. This creates compilation issue and fix
is introduced in this patch.

CRs-Fixed: 3283332
Change-Id: Ie00f7384142b39c309845408c6268ae6346f4734
2022-09-08 07:47:39 -07:00
Vijay Krishnan
056b6ae310 qcacmn: Fix compilation issue of QCA_DFS_BW_PUNCTURE
The macro QCA_DFS_BW_PUNCTURE depends on the macro
WLAN_FEATURE_11BE. This creates compilation issue and fix
is introduced in this patch.

CRs-Fixed: 3282072
Change-Id: I680670e58bd57d104bc69f2b4e7a56010b7584a5
2022-09-08 07:47:32 -07:00
Vijay Krishnan
ef864278aa qcacmn: Validate the proposed bitmap and enable puncturing
When radar is found in any DFS channel, a radar bitmap is
generated based on the radar infected channels. For example,
if operating channel is 100 HT160 and radar found in 112,
then the generated bitmap is B0000_0010. This proposed bitmap
is compared with the valid puncturing patterns. In this case,
the proposed bitmap is valid puncturing pattern.

In case of a valid puncturing pattern, send the final
bitmap to DFS module and the module updates the DFS channel
puncturing pattern. If an invalid puncturing pattern is
found, return value zero and do not update DFS channel
puncturing pattern.

CRs-Fixed: 3273800
Change-Id: Iee23ac267bfea1b4815a72c2728555f96bed6466
2022-09-08 07:47:25 -07:00
Rakesh Pillai
d706698dd1 qcacmn: Add support for fragmented history recording
Currently the history recording for any debug purpose
is done using a contiguous memory chunk. For certain
history like tx_hw_ring, tx desc or tx completion desc
history, the amount of contiguous memory required is
very huge (order 7 or 8 allocation), which have a
higher probability of failing.

In order to mitigate the above scenario, introduce the
support for recording debug history into fragmented
chunks of memory, thereby reducing the requirement of
contiguous memory.

Change-Id: Iac4fb38b6d4b095766520899853e68b4c2b83afc
CRs-Fixed: 3282269
2022-09-08 04:38:02 -07:00
Ripan Deuri
04dd6c626a qcacmn: Add support to fetch PER
Add support to fetch PER from peer stats.

Change-Id: Ia7cf8913238ab5b56d5f049cf9d511318ca5d165
CRs-Fixed: 3284395
2022-09-08 02:57:20 -07:00
Vivek
d6fb91fd85 qcacmn: Add module ID for SAWF
Add a new module ID for Service Aware Wifi

CRs-Fixed: 3283808
Change-Id: Ie4020aaff84439fc2bab163583f481adba5b4109
2022-09-08 02:57:14 -07:00
Surya Prakash Raajen
642b26aaf0 qcacmn: Fix wmi_mlo_teardown_cmd_send issue
When teardown completeion event is received from FW, teardown
completion handler resets pdev link to NULL, when the expectation
is only to put pdev state in teardown, such that when soc goes
down the list gets cleared.

Change-Id: Ief490eabe0546207f0ef649cb6d5cde1faf582d8
CRs-Fixed: 3280671
2022-09-07 16:34:34 -07:00
Amir Patel
8a1be0ce9d qcacmn: Update Noise floor for monitor frames
Update Noise floor for monitor frames

Change-Id: I8fc81b189923130e2c040dea10e04fba92c58c57
CRs-Fixed: 3274706
2022-09-07 16:34:27 -07:00
Nagalakshmi
2b7b671b37 qcacmn: Give valid range of value for aliasing INI
There are two different name with different range of value for
aliasing INI's. So, it should pick the valid range of value wrt INI
name.

Change-Id: I1b3f8b276a65f2e1659dd4e3ede8512513e3da71
CRs-Fixed: 3268728
2022-09-07 10:13:41 -07:00
Amir Patel
0fe7f4446b qcacmn: Optimize monitor mode memory utilization
a. Optimize ppdu_info memory
b. Use kmem cache for ppdu info allocation

CRs-Fixed: 3265620
Change-Id: Ieee040aa703aef8c5eee5e5a34a52ef18300b696
2022-09-06 10:23:43 -07:00
Amir Patel
49555350f2 qcacmn: Optimize ppdu_info memory
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
2022-09-06 10:23:36 -07:00
Amir Patel
8983dd04f8 qcacmn: Add QDF Kmem cache support
Introduce QDF abstraction APIs for handling kmem cache
create/destroy/alloc/free

Change-Id: I46fa8e5e3891a3665fb230b737ef66ff65b5135e
CRs-Fixed: 3274919
2022-09-06 08:59:43 -07:00
Vijay Krishnan
f9c54b61a3 qcacmn: Generate radar bitmap for the DFS channel
When radar is found on any DFS channel, generate a
bitmap which represents the channels that are
radar infected. For example, if the current channel
is 100 HT160 and radar is found in chan 104, then the
bitmap generated have the value B0000_0010. The bit 1
represents radar infected channels.

The radar bitmap calculation also checks for any existing
punctured patterns. If already punctured patterns are
available then it includes the existing pattern and
also current pattern in the bitmap calculation.

CRs-Fixed: 3273737
Change-Id: Icfc5d4e22980d3d2375152c12d244c7a8f5e318d
2022-09-06 04:23:49 -07:00
Amir Patel
ed6fc2b352 qcacmn: Add NULL pointer check
Add NULL pointer check at correct place
in monitor filter update

CRs-Fixed: 3279327
Change-Id: I5d9c44cf160de9acd4280774cc999931b8050ec3
2022-09-06 04:23:41 -07:00
Devender Kumar
78b844e995 qcacmn: Fix for calling cdp api from dp layer
cdp api is getting call from dp layer.

Fix is to call correct dp api from datapath file.

CRs-Fixed: 3279426
Change-Id: I142910276d76c600e5d79289270bbfe156bfab1c
2022-09-05 21:33:12 -07:00
Asutosh Mohapatra
c70f8eec91 qcacmn: Add support to store and use fcc rules sent by firmware
When set_fcc_channel is set, host driver sets tx_power info about
channels 12, 13 to hardcoded values. Now firmware sends information
about channels 12, 13 to host driver and currently there is no
support to extract and store this information and use it to
modify tx_power of channels 12, 13 in host driver.

Add support to store the tx_power of channels 12, 13 received
from firmware and use this to modify tx_power of fcc channels.

Change-Id: Ie7b20a75bb09956a70b7b133ce7ce9beb8db138b
CRs-Fixed: 3270676
2022-09-05 21:33:04 -07:00
Vijay Krishnan
1d368b2881 qcacmn: Add function pointer to enable/disable DFS puncture
Add the global dispatcher function pointers to enable/disable
the DFS puncturing feature.

Add a new dfs member "dfs_use_puncture" to remember if the
feature is enabled or disabled.

CRs-Fixed: 3272765
Change-Id: I1f45a9f44ede7f8606f770365220c5f7508847cf
2022-09-05 08:29:01 -07:00