Commit Graph

20218 Commits

Author SHA1 Message Date
Nandha Kishore Easwaran
c779207718 qcacmn: Move lithium specific code into 1.0 files
Move lithium specific monitor code into monitor 1.0 files.
Donot include 1.0 specific files when CONFIG_LITHIUM is not defined.

Change-Id: I3504052e7d717bb6e26af1b3980c2bb926df9a9b
CRs-Fixed: 3615746
2023-10-09 02:13:18 -07:00
Abhinav Kumar
2d444f83ec qcacmn: Get center freq from chan center freq index
AP sends chan center freq index via Bandwidth Indication OPIE
in channel load request.

Call reg_compute_6g_center_freq_from_cfi API to get corresponding
center freq for 6 GHz and 320 MHz case.

Change-Id: I14bbfe75016e40189388f32fd207d21197bc989b
CRs-Fixed: 3629129
2023-10-08 22:44:44 -07:00
Aditya Kodukula
bab306058c qcacmn: Remove unnecessary assert in qdf_mc_timer_start
Currently, driver asserts whenever there is a request to
start timer with an expiration limit of less than 10ms. This
assert is unnecessary and driver should gracefully reject the
request. So, remove the assert in qdf_mc_timer_start.

CRs-Fixed: 3631848
Change-Id: Ib7c6297528d5ced3c61e6183ea8e62c12ea9cb0d
2023-10-07 03:05:25 -07:00
Venkateswara Naralasetty
55527a7c79 qcacmn: Changes required to enable monitor mode for Rhine architecture
Changes required to enable monitor for Rhine architecture.

Change-Id: Ib2558c9e61a3e55a68c0f612aed7a153feeb3f17
CRs-Fixed: 3631592
2023-10-07 00:01:33 -07:00
David Oladunjoye
d9fedf26a8 qcacmn: 2-link MLO Sap Simulation
Current SAP is unable to support multi-link MLO connection.
To unblock validation we simulate 2-link connection on SAP.

Changes are as follows:
	- Add support for multi-link during assoc
	- disable security check during assoc

Change-Id: I21b3de2298085d7e6676854a7be68608546ccc6c
CRs-Fixed: 3591638
2023-10-07 00:01:22 -07:00
Shashikala Prabhu
8713c007bd qcacmn: Update the current bss for non-assoc link
wdev->current_bss is not updated for a non-assoc link STA vdevs.
As a result, a WARN_ON error is seen in cfg80211_ch_switch_notify()
when it’s called for non-assoc link.

To resolve this, update the wdev->current_bss for non-assoc links
as part of connection and clean up this as part of disconnection.

Change-Id: I5020200fb927dd72d2e1bf0ed73e7a5750897619
CRs-Fixed: 3618438
2023-10-07 00:01:11 -07:00
Ruben Columbus
ab8c55ec38 qcacmn: correct casting and array write index
- correct uint32_t* casting to uint16_t* given that it can overwrite values
after is dereferenced
- correct check for "for loop" max iteration as it could pass and
overwrite max array size.

Change-Id: Id2b02d1eea8c4ce4d962160bea99358fe3ab5cf7
CRs-Fixed: 3622399
2023-10-06 18:25:57 -07:00
Amir Patel
ce99e4ef10 qcacmn: Add debug to catch non-consecutive duplicate descriptor
Add debug to catch non-consecutive duplicate descriptor in monitor

Change-Id: I253cecf472d5d75154f5791f85761da2f6d9076e
CRs-Fixed: 3628868
2023-10-06 15:30:22 -07:00
Amir Patel
a7be27e5de qcacmn: Fine tune monitor dup desc WAR
In existing host WAR, we set pre_desc to NULL. Due to this
duplicacy across PPDUs is not caught. remove setting prev_desc to
NULL.

Change-Id: Ib2c903eb768fa399c37e9b1d17b661b9ae1c1d2a
CRs-Fixed: 3629867
2023-10-06 03:04:45 -07:00
Venkateswara Naralasetty
627e19ca45 qcacmn: Update HAL generic APIs for Rhine architecture
Update HAL generic APIs for Rhine architecture to set the link
desc address and to get the rbm and cookie info from the rx desc.

Change-Id: I0e9f0553c19508a8404106ada780b37db2e78857
CRs-Fixed: 3631599
2023-10-06 03:04:34 -07:00
Amit Mehta
70b27b1e08 qcacmn: Add changes to account for encryption header size
This reverts Change-Id: I521b0990fe9e5746a8c8cfb29de7064cf51d0687
(qcacmn: Add fix for encryption fragment ping)

Original change has removed logic to Account for encryption
header size during 802.11 header decapsulation. Which is resulting
in DHCP failure in fragmented DHCP frames, as N/W stack is dropping DHCP
offer due to invalid payload.

Revert back to account for encryption header size during
802.11 header decapsulation

Change-Id: I246e19bf7637d3b66b5d0b3648c76d8765502ac6
CRs-Fixed: 3627678
2023-10-06 00:12:35 -07:00
Neha Bisht
f0e5c491a8 qcacmn: Use FAST_FLAG for simplified nbuf map operation
Use FAST flag instead of SIMPLE flag for simplified nbuf map operation

Change-Id: Ie4f0e6b691876eb04351efe9da94578b98c4258c
CRs-Fixed: 3629314
2023-10-06 00:12:23 -07:00
Guru Pratap Sharma
0e29c2b760 qcacmn: Handle mlo_grp_id value for rx_reo_release_frames
Handle mlo_grp_id value for rx_reo_release_frames so it cant be
more than WLAN_MAX_MLO_GROUPS

Change-Id: Id6761f125d1ce04d8b10753f86e1d2c1cb30c65e
CRs-Fixed: 3620074
2023-10-05 14:13:33 -07:00
Guru Pratap Sharma
184713cbaf qcacmn: Add check for dereferencing pointer shmem_arena_ctx
Add check for dereferencing pointer shmem_arena_ctx to avoid
array out of bound error

Change-Id: I4ebc6b9455b8ec2d33790199fd2deec267796dd0
CRs-Fixed: 3620074
2023-10-05 14:13:23 -07:00
Guru Pratap Sharma
e0a4d3fd12 qcacmn: Add check for dereferencing pointer shmem_arena_ctx
Add check for dereferencing pointer shmem_arena_ctx to avoid
array out of bound error

Change-Id: I6d7caddb3ed83fb5e7397de827cd57e8d238a640
CRs-Fixed: 3620074
2023-10-05 14:13:13 -07:00
Guru Pratap Sharma
539df4d507 qcacmn: Move pdev_obj_destroy_notification to avoid access freed pdev
Move wlan_mgmt_rx_reo_pdev_obj_destroy_notification before
wlan_objmgr_pdev_component_obj_detach to avoid access freed pdev memory

Change-Id: I4264773c4f6f92de36c827167ca5bd4f25b45041
CRs-Fixed: 3620074
2023-10-05 14:13:02 -07:00
Guru Pratap Sharma
0c9433f93d qcacmn: Move psoc_obj_destroy_notification to avoid access freed psoc
Move wlan_mgmt_rx_reo_psoc_obj_destroy_notification before
wlan_objmgr_psoc_component_obj_detach to avoid access freed psoc memory

Change-Id: I8141bef1bfddfbee1335a9adecb2aa1818c8611a
CRs-Fixed: 3620074
2023-10-05 14:12:52 -07:00
Guru Pratap Sharma
703a6d7261 qcacmn: Adding check for dereferencing pointer shmem_arena_ctx
Adding check for dereferencing pointer shmem_arena_ctx to avoid
array out of bound error

Change-Id: I0aa6682b63e2d2d564b285f7fac745df4b44f1d4
CRs-Fixed: 3620074
2023-10-05 14:12:42 -07:00
Karthik Kantamneni
3600a51a25 qcacmn: Fix RXDMA null buffer address access issue
During mon_pdev_init RX monitor status buffers will be attached
to status ring. In case of buffer allocation failure HP will be
pointing to null buffer address entry and during ring process
this index slot will be skipped. This will lead to RXDMA accessing
null buffer address descriptor.

Fix this by adjusting the HP of monitor status ring during RX
buffer allocation failures.

Change-Id: I290a724fefc6f65be058a84c97b9e6d51a08ef39
CRs-Fixed: 3268663
2023-10-05 07:01:00 -07:00
Nidhi Jain
0fc63202c0 qcacmn: Fix modpost issue due to mlo_mgr_get_ap_link_by_link_id
This change is to fix modpost issue due to mlo_mgr_get_ap_link_by_link_id
in 6.x compilation.

Change-Id: I2da64fd550f6dbafe87100ca80a280834f1f3f12
CRs-Fixed: 3603454
2023-10-05 07:00:50 -07:00
Nidhi Jain
99fa424053 qcacmn: Fix error in mgmt_rx_reo_get_context_from_egress_list
This change is to fix error in mgmt_rx_reo_get_context_from_egress_list

Change-Id: I842e43dea6da26a270c7031fd0071b4bb5fc10ed
CRs-Fixed: 3603454
2023-10-05 07:00:39 -07:00
Shashikala Prabhu
5e17e0ba24 qcacmn: Use the correct Psoc to derive wifi_pos psoc priv object
Currently, as part of wifi load, the wifi_pos psoc private object is only
allocated for the first PSOC (PSOCx) and this PSOCx can be accessed via
wifi_pos_get_psoc() to derive the wifi_pos psoc private object.
In the current code, when RTT is triggered on PSOCy, this psoc is used to
derive the wifi_pos psoc private object instead of PSOCx.
Since wifi_psoc psoc private object is not tied to PSOCy,
wifi_pos_get_psoc_priv_obj() returns NULL and this leads to RTT failure.

To fix this, check and replace ‘wifi_pos_get_psoc_priv_obj(psoc)’ with
‘wifi_pos_get_psoc_priv_obj(wifi_pos_get_psoc())’

Change-Id: I2acb91c4c80ad94df22390f3763e2d34c83b743d
CRs-Fixed: 3619836
2023-10-05 01:02:38 -07:00
Harsh Kumar Bijlani
8616350ebe qcacmn: Change order of SAWF enabled conditional check
Legacy SCS uses skb mark field to specify the priority i.e TID.
This feature is to be supported independent of SAWF framework.
Therefore change the order of SAWF enabled conditional check.

Change-Id: I445f697395c8140b3b9fd7f877dfa8d057f0eaa8
CRs-Fixed: 3630722
2023-10-04 22:03:15 -07:00
Vaishnavi Chekuru
c3697eb2a0 qcacmn: Changing the integer suffix from 1L to 1ULL
In expression 1L << err_code if the err_code is more than 32,
it is left shifting by more than 32 bits which will result in
undefined behavior and will be overflowed. So changing the suffix
from 1L to 1ULL as max value of err_code can go up to 63.

Change-Id: I6218a1634e982e4f25e5d92d55325ed9bb2658e9
CRs-Fixed: 3627050
2023-10-04 19:03:05 -07:00
Alan Z. Chen
6505649e39 qcacmn: Change dp_get_peer_state() log to debug
Excessive logging when dp_get_peer_state() is called is causing
power performance issues. Change log level from info to debug
in order to reduce excessive logging.

Change-Id: I752b0bd443ad6bc4431c8f25a0c483729bebaa37
CRs-Fixed: 3631190
2023-10-04 19:02:55 -07:00
Deeksha Gupta
78868f0a7e qcacmn: Add new API to clear the MLO MGR context
Add new API to clear the particular AP link info
from the MLO MGR context.

CRs-Fixed: 3616166
Change-Id: Ia3b69a58dd3d3687199ee58462d59ba76c24cd6d
2023-10-04 11:17:10 -07:00
Deeksha Gupta
a8ed648342 qcacmn: Optimize ML connection related logs
Optimized and remove redundant ML connection logs.

CRs-Fixed: 3624931
Change-Id: Ieb8c27104a9c5e1247441cd347e91d118dcc45d1
2023-10-04 11:16:59 -07:00
Vinod Kumar Myadam
9bb0d120db qcacmn: Add support for INI twt_disable_info
Add support for INI twt_disable_info

Change-Id: Ib82f238b60e9b56636b9209edfc1e9773708553f
CRs-Fixed: 3629015
2023-10-04 08:13:45 -07:00
Nirav Shah
e613669ec8 qcacmn: Define a QCA vendor attribute to set traffic shaping policy
Define a new QCA vendor attribute to configure traffic
shaping policy applied during coex scenarios.
Subcmd is QCA_NL80211_VENDOR_SUBCMD_SET_WIFI_CONFIGURATION

Change-Id: I42f6ffb20156fc7e7ecbceead825691a94c4fe9d
CRs-Fixed: 3625243
2023-10-04 08:13:34 -07:00
Sushant Butta
41e5a457c0 qcacmn: cdp support enable/disable dp debug logging
Added cdp support to get/set
dp debug logging in per packet path.
Enable debug logs only if dp debug logging
is enabled.
With this change there is benefit of all CPU
average around 1% to 1.5%

Change-Id: Ibe0ca4c75211cace4c5fca9ec0bce1c594ca8a6b
CRs-Fixed: 3623910
2023-10-04 08:13:23 -07:00
Aman Mehta
d6ee46a496 qcacmn: Add support for average tx/rx rate
Apstats use to return last tx/rx rate for avg. tx/rx rates.
This change updates the behavior to return average tx/rx rates.

Change-Id: Idfff2ae9df7c5af1ef86ceb5688b1e01fd6dae21
CRs-Fixed: 3628056
2023-10-03 12:01:45 -07:00
Manikanta Pubbisetty
d5578559ec qcacmn: Initialize RX refill buffer pool size for SOFTUMAC arch
In the current code, RX refill buffer pool size is not initialized for
SOFTUMAC architectures, this was leading to a kernel BRK panic.

Initialize RX refill buffer pool size for SOFTUMAC architectures to fix
this.

Change-Id: I0424ba69b0d5f33386e931d4e6723fc8265e216c
CRs-Fixed: 3621417
2023-10-03 12:01:32 -07:00
Srinivas Dasari
fa6e3838d9 qcacmn: Define an API to check if any MLO link is disconnecting
Add an MLO API to check connection manager state machine if
any MLO link is in disconnecting.

Change-Id: I411ed9c9ab7cc0378147b5a4cf930b43cd3f7814
CRs-Fixed: 3628519
2023-10-03 12:01:20 -07:00
Deeksha Gupta
379833c37a qcacmn: Enchance candidate scoring log prints
Enchance and Optimized candidate scoring log prints.

CRs-Fixed: 3625814
Change-Id: I9b6e148c5dc1b97ae179edee60d1b2d7ea792e84
2023-10-03 02:34:54 -07:00
Gururaj Pandurangi
852d0cee43 qcacmn: Add support to configure MLD ID in scan request
In the MLO-MBSSID test, STA can request information of
non-Tx BSS through Tx BSS by configuring non-Tx BSS MLD
ID within the ML probe request that is invoked as part
of scan request. Add support to configure MLD ID in
scan start params to FW.

Change-Id: I4a6debf6c3ec830fbe3aee1d3aa60ad7218cbcd6
CRs-Fixed: 3591596
2023-10-02 20:30:12 -07:00
Srinivas Pitla
3d43b6ab94 qcacmn: Fix egress and ingress count in WSI stats
This change modifies the egress count as secondary link counter
and ingress counters as bypass link counters

Change-Id: I5ad49eec15ca8a0b9858f5c85a76dc69644bdf72
CRs-Fixed: 3629542
2023-10-02 17:52:01 -07:00
Aasir Rasheed
e627ca11b5 qcacmn: Parse Extended MLD Capabilities & Operations of ML-IE
Add support to parse Extended MLD Capabilities and Operations
Subfield of the ML-IE.

CRs-Fixed: 3571330
Change-Id: I7dc34c1fb9ef1eee351bc4d964a002b687289799
2023-10-01 18:12:34 -07:00
Aasir Rasheed
8c6365939b qcacmn: Send max num of active links to fw
This change is to send max num of active links recommended
by AP to the fw.

CRs-Fixed: 3599429
Change-Id: Id84b7d1aa8d6eb29d3acef2f3e8c552bc6c636f0
2023-10-01 18:12:23 -07:00
Jinwei Chen
e0d7d004e0 qcacmn: Set skb's ip_summed to CHECKSUM_NONE if checksum failure
Only if both IP and TCP/UDP checksum passed for TCP/UDP
packets, then set ip_summed to CHECKSUM_UNNECESSARY,
otherwise set it to CHECKSUM_NONE.

Change-Id: Ic4973e32d622f66830dbd7a5bc03012cf6dd87bf
CRs-Fixed: 3626292
2023-10-01 12:36:36 -07:00
Deeksha Gupta
5ebeb8ac41 qcacmn: In MLMR case don't set is_valid_link to false
When the vendor roam score algorithm is enabled in a
3 link connection scenario, driver currently sets
'is_valid_link" to 'false' in case of MLMR. Consequently,
this causes if AP advertise itself as 3 links,
but driver can only establish 2 link connection.

To fix this issue, When the vendor roam score algorithm
is enabled in MLMR case, instead of setting 'is_valid_link'
to 'false' for a particular partner link, the driver
should assign a 'total_score' of 0 to that link.
This helps us to make that link as a standby and inactive
link.

CRs-Fixed: 3623270
Change-Id: I80d6b052134c2c8c428745af4aa3a740499ee6e1
2023-10-01 12:36:25 -07:00
David Oladunjoye
d444efd422 qcacmn: Set new scan policy based on scan request type
For user-initiated scan request we need to set scan policy based on
scan type. (eg. Low Power Scan, High Accuracy Scan).  Based on type
we set the policy for driver to use. Set the scan policy based on
scan type.

Change-Id: I8cd555eee8d7332a88fc7f2b6093b0a1dc3127b1
CRs-Fixed: 3509137
2023-10-01 09:35:42 -07:00
Abhishek Singh
342cc8dfb8 qcacmn: Optimize logging in scan filter
Optimize logging is scan filter by removing the logs from
success case.

Change-Id: I1687c9e4ad1394b25baf37a3fa3594571998fd7e
CRs-Fixed: 3626736
2023-10-01 03:50:25 -07:00
Jeevan Kukkalli
dc9d363e5b qcacmn: Add check for invalid frame ctrl version
Add check for invalid frame control version while handling
raw frames with FCS errors in monitor version 2 path

Change-Id: Ia46de15a235ec5ab2f0b67ff9769cb0b5c38aeee
CRs-Fixed: 3620872
2023-09-30 22:10:38 -07:00
Ajithkumar Jayamoorthy
f9b6804db1 qcacmn: Resolve coverity issues for operational rate config implementation
Resolve the 'modulo by 0' coverity issue for the implementation for
manual configuration of mcs via "tr069_set_oprate" command.

Change-Id: Iccb29ed0aede59929267dd22e580609c7c853577
CRs-Fixed: 3625355
2023-09-30 19:07:28 -07:00
Shashikala Prabhu
8ccae22749 qcacmn: Set AUTH_AND_DEAUTH_RANDOM_TA flag for 11az RTT
Set NL80211_EXT_FEATURE_AUTH_AND_DEAUTH_RANDOM_TA in wiphy ext feature
flag to allow random TA to be used with authentication and
deauthentication frames when MAC secured or MAC_PHY secured ranging is
supported.

Change-Id: I96d1026daad4ffca271aed8c9aa09ff422573209
CRs-Fixed: 3617665
2023-09-30 02:34:51 -07:00
Pragaspathi Thilagaraj
95caa8459f qcacmn: Update OSIF link info for assoc vdev after roaming
Once roaming is complete, the osif link info for Assoc vdev
is not updated, resulting in link switch on assoc vdev failure
after roaming.

Update OSIF link info for assoc vdev after roaming. Also clear
the OSIF link info upon roaming from multi link AP to single
link AP

Change-Id: I7a05d61011f6ac39e7107c4d2270aa3025d79142
CRs-Fixed: 3618994
2023-09-29 16:31:02 -07:00
Amir Patel
f03c62102b qcacmn: Update per-MPDU fcs err in radiotap hdr
Update per-MPDU fcs err in radiotap hdr

Change-Id: I3570ec94435746538cccc07ec052e26a19ab6452
CRs-Fixed: 3619376
2023-09-29 16:30:51 -07:00
aloksing
1f0e7d3b82 qcacmn: preventing potential Side effect of ++ operation
preventing potential Side effect of ++ operation in assertion

Change-Id: Ibdad7e856143fbcde45d4c8db637b608ef3983cd
CRs-Fixed: 3617044
2023-09-29 16:30:41 -07:00
Jyoti Kumari
81a448455b qcacmn: Fix ETSI reg_domain for SRD channels
Currently, only ETSI13 check is present for SRD channels but
ETSI18 and ETSI20 are also added for SRD channels.

Add a check of ETSI18 and ETSI20 to remove SRD channels

Change-Id: I3bd7c9d9d2ff26f6f625fc70f1ca89cb39634dfb
CRs-Fixed: 3614070
2023-09-29 16:30:30 -07:00
Sheenam Monga
13e4f87d48 qcacmn: Trigger Self Recovery on link_switch timeout
Currently, on link switch timeout recovery is not triggered
due to which issues may come later and impact FW also.

Fix is to trigger self recovery on timeout.

Change-Id: I6c81c2da9df39ae96a6d8b0e2ce1c22507cf777a
CRs-Fixed: 3625653
2023-09-29 16:30:19 -07:00