Commit-Graf

3148 Incheckningar

Upphovsman SHA1 Meddelande Datum
Amruta Kulkarni
951e13a2ea qcacmn: Add wlan_ api to get assoc vdev
- Add wlan_ api to get assoc vdev.
- Update mlo_update_connected_links_bmap() to
non static.

Change-Id: Ib7948023041481c27f1e98a6bd1ecfe583abd3ef
CRs-Fixed: 3098594
2022-01-06 07:55:37 -08:00
Edayilliam Jayadev
f08345f6f1 qcacmn: Add APIs to print without function and line number
Add APIs to print management rx reorder module logs without
function name and line number.

CRs-Fixed: 3103194
Change-Id: Idb450d5c93b66255b91901a3140ff2f17dd108b8
2022-01-06 07:55:32 -08:00
Edayilliam Jayadev
bcdefd9e61 qcacmn: Add APIs to output ingress frame stats
Add APIs to print the ingress frame stats.

CRs-Fixed: 3103193
Change-Id: I8b6199975f8513baddbce51ea5ef363183c03694
2022-01-06 07:55:27 -08:00
Edayilliam Jayadev
164f5d753e qcacmn: Add APIs to output egress frame stats
Add APIs to print the egress frame stats.

CRs-Fixed: 3102984
Change-Id: I845d36ce3eced9e75b3cd7eba6070f94b9f7fb68
2022-01-06 07:55:22 -08:00
Edayilliam Jayadev
920e70144b qcacmn: Enable Mgmt reo ageout timer
Enable the timer to ageout entries in the management rx reorder
list.

CRs-Fixed: 3102976
Change-Id: I55dd4b25e652ac881ba99b414f90bce5fb292dec
2022-01-06 07:55:16 -08:00
Edayilliam Jayadev
a4542e470f qcacmn: Use existing Mgmt Rx REO APIs for simulation
Use the existing management Rx reorder APIs for simulation
purposes.

CRs-Fixed: 3094903
Change-Id: Ib6989733579e248ad914d6828729bbe8487a7361
2022-01-06 07:55:10 -08:00
Bapiraju Alla
fdaf4235b8 qcacmn: Update MLD mac address with ML dev ctx lock held
Currently MLD address is not being updated under lock. This may result
in unexpected behavior in racy scenarios.

To avoid this, update MLD address with ML dev ctx lock held.

Change-Id: I7c27edb0c02ebae0332f0498dfe1a1534d3d3379
CRs-Fixed: 3104028
2022-01-05 11:30:13 -08:00
Ashish
a48bfbce7c qcacmn: Remove get disconnect stats command from serialization
Currently in SAP mode, when host driver receives disconnect for
station, first it gets disconnect stats with serialization command
and then it sends delete peer command to fw. There is an issue with
this approach, if there are maximum number of clients are connected
to a SAP and all of these clients gets disconnected at the same
time, in that case there will be a disconnect stats command and
peer delete command in serialization, because of which serialization
queue gets full.
To address this issue, remove disconnect stats command from
serialization and send this command just before sending peer
delete command once peer delete command gets serialized.

Change-Id: Iab64e5dee8b0e2bb19b428a3c563a24b486250bc
CRs-Fixed: 3101553
2022-01-03 22:50:20 -08:00
Bapiraju Alla
3c40f95843 qcacmn: Add API to update MLD MAC address
Currently there is no provision to update MLD mac address in MLO manager.
MLD MAC address updation is required when MAC address randomization is
enabled.

To enable MLD address updation, add MLO manager API to update MLD address.

Change-Id: Ia2ccb1c32a3533748bda512e991e3d48d14c39f0
CRs-Fixed: 3103074
2022-01-03 15:02:52 -08:00
Shashikala Prabhu
3090d55051 qcacmn: Compute the remaining max channel switch time
As per the spec,
"A STA affiliated with a non-AP MLD, that operates on Link2, transmits a
(Re)Association Request frame to AP2 requesting Link1 as one of the links
for multi-link setup. Since the (Re)Association Response frame is
transmitted by AP2 after the last Beacon frame on the initial operating
class/channel on Link1 and before the first beacon on the initial
operating class/channel is transmitted, AP2 includes the Max Channel
Switch Time element in the per-STA profile corresponding to AP1 in the
(Re)Association Response frame it transmits. The value carried in Max
Channel Switch Time element provides an estimate of time until the first
TBTT on the new channel on Link1."

Hence, calculate the remaining max channel switch time using the below
steps.

When host receives the CSA complete event with the CSA count 1, calculate
the Max channel switch time for each vdev by adding the below values,
	a) Host triggers the channel switch when CSA complete event is
	   received with the CSA count 0. The time difference between
	   CSA count 1 and CSA count 0 is one beacon interval. Hence, add
	   one beacon interval.
	b) Add the channel change time. The total time required to receive
	   CSA event handler from FW with CSA count 0, plus, the time required
	   to process the CSA complete event, plus, the time required to send
	   multi-vdev restart request for all the vdevs in the new channel and
	   send updated beacon template (only for non-DFS channel) is
	   approximately 1 second (added a few milliseconds as delta and
	   considered 16 AP vaps here).
	c) Add DFS CAC duration of the new channel if the new channel is DFS.
	d) Add one beacon interval time (time required to send the beacon on
	   the new channel after VDEV up).
	e) Store the sum of the above time values in max_chan_switch_time of
	   the vdev_mlme object.
	f) Save the current time when host receives CSA complete event with CSA
	   count as 1 in the last_bcn_ts_ms of the vdev_mlme object.

Calculate the remaining channels switch time using the below formula.
- Remaining channel switch time is equal to the time when the last beacon
  sent on the CSA triggered channel plus max channel switch time minus
  current time.

Reset the max channel switch time and the last beacon sent time after
sending the VDEV UP command to FW.

Change-Id: I7c03bfae5e159419a6c9462591aeb2d6c5b4fb87
CRs-Fixed: 3076245
2022-01-03 09:04:19 -08:00
Disha Das
d162a849f1 qcacmn: Allocate mmie mic of size 16
Issue: On receiving robust bcast mgmt frames, for mmie
mic validation, mic of length 8 could be allocated.
The encrypt function however, always writes mic of length
16 resulting in memory corruption issue.

Fix: Allocate mic of size 16 for wlan_crypto_is_mmie_valid().
This is also corresponding to mic buffer size of 16 in
wlan_crypto_add_mmie().

Change-Id: I870251c0ed4224a7a974dad86f2808af7148be95
CRs-Fixed: 3091165
2022-01-03 06:34:01 -08:00
Shashikala Prabhu
850aa79f06 qcacmn: Add changes to get the correct link info offset
With the existing offset calculation formula in util_get_link_info_offset
function, the calculated offset was always greater than the length of the
ML IE. Hence, the above function always returned the value 0 for the
offset. The reason is, for example, '(BIT (4) & multi_link_ctrl) * 6'.
We are expecting this calculation to return a value of 6, but it is
returning 96 (= 0x10*6).

Modified the util_get_link_info_offset() to use WLAN_ML_BV_CTRL_PBM_*
presence bitmap to get the link info offset.

Change-Id: Ic548361ac2e82bddaed574cf197c3523d47304d5
CRs-Fixed: 3091674
2022-01-03 02:19:56 -08:00
Ashish
0d31a3986e qcacmn: Add support to query BMISS stats from fw
Currently there is no support to read bmiss stats from fw.
With this change, add support to read bmiss stats from fw.

Change-Id: I75dee16fffac88303f22742eda1985dc15c6ec15
CRs-Fixed: 3097302
2022-01-03 02:19:51 -08:00
Sai Pratyusha Magam
5d58a41518 qcacmn: Store default keyix in wlan_crypto_setkey for each peer
Store default keyix in crypto_priv for each peer.

Change-Id: Ieb77c390fddd667f99fd97c5ecdd4f3de61ae045
2021-12-30 03:23:17 -08:00
Tiger Yu
5a474b79ed qcacmn: Destroy peer object in a delayed work
Destroy peer object in a delayed work to avoid any potential
executing in the atomic context for peer obj destroy handler.
Which might invoke wma_vdev_deinit->wakeup_source_unregister to
cause schedule timeout issue.

This new feature is not enabled by default. Will only be enabled
by defining the FEATURE_DELAYED_PEER_OBJ_DESTROY in the config.

Change-Id: I1cc41ab00f932d36b8658545dc7a5da43c9ebe30
CRs-Fixed: 3098157
2021-12-30 00:34:33 -08:00
Huashan Qu
0ff3ae8b94 qcacmn: Give SAE-PK AP more score to pass SAE-5.7.3 certification
When do SAE-5.7.3 certification test case, STA will choose non SAE-PK
AP to connect which is wrong expected result, non SAE-PK AP beacon
will carry with QBSS IE that contributes more score than SAE-PK AP
score config.

Fix is to give SAE-PK AP more score to pass SAE-5.7.3 certification
case.

Change-Id: Ib3e516ccfa673e19f9bf0869aeffe4f5b1862a71
CRs-Fixed: 3101317
2021-12-29 22:32:19 -08:00
Edayilliam Jayadev
cb40cd916e qcacmn: Miscellaneous fixes in Mgmt Rx REO module
Add miscellaneous fixes in management Rx reorder module.

CRs-Fixed: 3094901
Change-Id: Iba579bac4243f42879fef0b1d3de2ac8ca05bea1
2021-12-28 23:14:05 -08:00
Edayilliam Jayadev
7b2b50778e qcacmn: Handle ref counts in Mgmt Rx reorder module
Handle refcount increment and decrement properly in
management Rx reorder module to avoid reference leaks.

CRs-Fixed: 3094885
Change-Id: I26d7ea360e7f6eabb755b825fd9d34c5320b4e82
2021-12-28 23:13:59 -08:00
Edayilliam Jayadev
ba7f1f77ef qcacmn: Add enhanced statistics for Mgmt Rx REO
Add enhanced statistics for management Rx reorder
module. Add key stats about the frames entering
and leaving the reorder module.

CRs-Fixed: 3094874
Change-Id: I8df7a9ac98106ff834c3897a6b495b8a0dd5214d
2021-12-28 23:13:54 -08:00
Edayilliam Jayadev
a245acf476 qcacmn: Atomically modify pending and stale list in Mgmt Rx REO
The operations with stale and pending list should be atomic.
Share a single spin lock for pending and stale list so that
the modifications are atomic.

CRs-Fixed: 3081847
Change-Id: Ia647de01af0172039659c73bdd32de819dae1257
2021-12-28 22:13:12 -08:00
Tushnim Bhattacharyya
2a660189e5 qcacmn: drop the log level to debug for invalid channel number
Drop the log level to debug from error for the prints indicating
input or output channel number is invalid.

Change-Id: Ief2f609f1c95c223c97cded6d81460e52a34c729
CRs-Fixed: 3100105
2021-12-28 10:51:59 -08:00
Sai Pratyusha Magam
fc5f47db1a qcacmn: Release peer only after key access for peer is completed
Release peer only after key access for peer is completed

Change-Id: I88948536605eb4afac82772428938e0aaecbc957
2021-12-28 07:43:23 -08:00
Himanshu Batra
0ae42b09e4 qcacmn: Use correct API to find is peer is assoc peer of an MLD
Use correct API to find if peer is assoc peer of an MLD

Change-Id: If485222ed23a1ac7b7fc625c6d9dfd6000959f36
2021-12-28 02:55:59 -08:00
Disha Das
601e5975d1 qcacmn: Fix for concurrency issues in wlan_crypto_getkey
Adding changes to call getpn after checking if key is valid,
and releasing the peer reference.

Change-Id: I8821407472db2b7008ad8226e754077a601d325e
2021-12-27 18:33:59 -08:00
Qun Zhang
439cfbfc48 qcacmn: Let OBSS scan disable action called directly
Wlan host side doesn't have ways to know whether OBSS scan is
run or not if OBSS scan is offloaded to FW. So should let OBSS
scan disable action called directly to make sure OBSS scan is
disabled during each suspend.

Change-Id: I6134c038bbea2ae4f09662354d60063488696cb5
CRs-Fixed: 3097186
2021-12-23 04:50:25 -08:00
Bing Sun
6b44bcd1c5 qcacmn: Add WLAN_RNR_TBTT_OFFSET_INVALID
When populating TBTT OFFSET in RNR IE, if TBTT OFFSET is unknown,
set it as WLAN_RNR_TBTT_OFFSET_INVALID.

Change-Id: Ie60d4b66c849b4c9d19cc63f88821b564aeace07
CRs-Fixed: 3097197
2021-12-23 04:50:19 -08:00
Bapiraju Alla
76caeb9b44 qcacmn: Use target if component for VDEV manager response path
Currently, VDEV manager responses are using legacy path instead of
target_if, vdev_mgr and os_if components. As the driver implementation
is planned for converged model, legacy implementation will be moved to
the respective components.

To avoid rework, Use target_if, vdev_mgr and os_if components to process
the FW responses corresponding to the vdev manager.

Change-Id: I778f6de93481fc730383e8f8e1c604f173947d69
CRs-Fixed: 3093776
2021-12-23 00:54:35 -08:00
Bapiraju Alla
df5cc86477 qcacmn: Set partner vdev link id before initiating the connect on it
Currently, Driver is notifying the connect response to the user-space
immediately after first link connection. At this time, partner vdev
information is not available. Hence user space is notified with invalid
partner wdevs.

To avoid this, set link ID's for the partner VDEVs before notifying the
connect completion to is_if.

Change-Id: I6524e9af9359fced471db8f25220d2ac6854fc22
CRs-Fixed: 3097646
2021-12-23 00:54:30 -08:00
Gururaj Pandurangi
bad847ced8 qcacmn: Reduce logging in get 6G power type for country API
Optimize the checks in reg_get_6g_power_type_for_ctry API to
reduce logging. Logs will appear only during initial connection
and not after parsing each beacon.

Change-Id: I4c4904c4825cd822d119e4ee9b2c69e96612be31
CRs-Fixed: 3094366
2021-12-22 23:02:00 -08:00
Santosh Anbu
dc34c41ae6 qcacmn: Wait in MLO sync wait until start response is rcvd
In scenarios where if the VDEV has just sent the start request and a
partner vdev has received start response, will bring up all the MLD
AP vdevs without waiting in MLO_SYNC_WAIT as the existing check only
validates if the VDEV is in INIT or STOP state.

Add change to send MLO_SYNC_COMPLETE only after all the partner VDEVs
have move to either UP or DFS_CAC_WAIT state.

Change-Id: I3175b94e90abf6994fc6922bbe8e62a7986208a6
CRs-Fixed: 3096634
2021-12-22 10:43:53 -08:00
Edayilliam Jayadev
9a5fdf9dfb qcacmn: Ingress frame logging changes in Mgmt Rx REO
Add new fields to incoming management frame logging.

CRs-Fixed: 3081845
Change-Id: Ie549078066de91d87701fa4ee588df4c7840e9ec
2021-12-22 04:32:02 -08:00
Edayilliam Jayadev
6540534870 qcacmn: Misc fixes in mgmt Rx REO module
Add fixes in management Rx reorder list handling.

CRs-Fixed: 3081836
Change-Id: Icef1ac3e42dc79e39079093c50b7fae83c4b1fa0
2021-12-22 04:31:57 -08:00
Amruta Kulkarni
475dd8ff1e qcacmn: Add mlo ie capability struct
For mlo, add mlo ie capability info
struct in common code.

Change-Id: I77c9792c736b1bdd95b2d863bb9f1ab4ee7ed4bb
CRs-Fixed: 3097761
2021-12-22 03:33:04 -08:00
Chaithanya Garrepalli
e6440269ae qcacmn: Export wlan_objmgr_get_psoc_by_id API
Add qdf_export for wlan_objmgr_get_psoc_by_id
API

Change-Id: Ic079f60b0752de847701e517878ed4f3974ee66f
2021-12-22 00:54:11 -08:00
Yu Ouyang
b6a3f2fd44 qcacmn: Trim scan channel list
As requirement, concurrent mode, station 5G/2G scan need stop when AP
connected by peer station.

Condition:
STA + AP 5G (connected) + AP 2.4G	skip 5G scan
STA + AP 5G (connected)			skip 5G scan
STA + AP 2.4G (connected && 2.4G only)	skip 2.4G scan
Others concurrency			skip none

Add ini ch_list_trim_conc to enable/disable the feature. Default is
disabled.

Before send WMI_SCAN_CMD to firmware, call API
policy_mgr_scan_trim_chnls_for_connected_ap() to check if need
trim scan channel list. Which channel list need be trimmed

Change-Id: If4d1cf7347f757fb013ffcb4016e8e6f16859f42
CRs-Fixed: 3075068
2021-12-21 22:10:35 -08:00
Shashikala Prabhu
bb3953b75b qcacmn: Populate MLO Queit IE parameters in beacon template
- Add MLO Quiet IE related parameters in ml_bcn_partner_info structure.

- Populate MLO Quiet IE related parameters in the beacon  template.

Change-Id: I5a4a069d067bdbc5e7c44c407f51a504e9aba151
CRs-Fixed: 3088019
2021-12-21 10:23:25 -08:00
Shashikala Prabhu
0a725937cd qcacmn: Get pointers to per-STA profile CSA, eCSA, MCST IE
Parse the per-STA profile IE and save the CSA, eCSA, Max Channel Switch
Time IE pointers in partner_link_info structure.

Change-Id: Icac75e3ad1f45bd5325c9144db7732684ebb4512
CRs-Fixed: 3087692
2021-12-21 10:23:19 -08:00
Chaithanya Garrepalli
ed4b7bf28b qcacmn: Write Rx desc SPT on partner SOC
Changes to write Rx descriptor secondary page
tables on partner SOCs.

Change-Id: If89eff3425078aebb975463a01d0a45c9f5a21db
2021-12-21 01:10:24 -08:00
Himanshu Batra
78fb9d70d7 qcacmn: IPA changes to support SDX+Pine
IPA changes to support SDX+Pine.

Change-Id: I66ad2a2c3e2f142c54df3e35c867ee827ac1d687
CRs-Fixed: 3079952
2021-12-20 22:44:55 -08:00
Liangwei Dong
db8e2c1604 qcacmn: Disallow 6ghz scan entry without country IE
The two api have different result for country ie empty AP case
at present:
scm_is_bss_allowed_for_country : allow ap with empty country ie
reg_get_6g_power_type_for_ctry: disallow ap with empty count ie
Add check empty country IE in scm_is_bss_allowed_for_country
to align reg_get_6g_power_type_for_ctry.

Change-Id: I8c929bf0befa691f60861ceb8c63827cde400ae9
CRs-Fixed: 3093481
2021-12-20 10:55:24 -08:00
Srinivas Girigowda
c64646331b qcacmn: umac: Add TWT component ID
Add TWT component ID.

CRs-Fixed: 3085319
Change-Id: I200a9d1008fa0aae98b633c4433964b48a14d00d
2021-12-17 20:44:26 -08:00
Jayachandran Sreekumaran
b361cf7444 qcacmn: Function parameter update for mlme_max_chan_switch_is_set
Update the function parameter for mlme_max_chan_switch_is_set.

Change-Id: I0585e328b670f37cb0cd1eb1371ad63b1df1c5f0
CRs-Fixed: 3095312
2021-12-17 20:44:21 -08:00
Krishna Rao
c6f1baf93f qcacmn: Rectify decrement of unparsed Non-Inheritance IE length
At the point in an MLO Manager utility function where we process the
length of the Element ID Extension List in the Non-Inheritance
Information Element, rectify the decrement of the unparsed length so
that it is decremented by the length of the Element ID Extension List
rather than the length of the Element ID List.

CRs-Fixed: 3095660
Change-Id: If4913a47762bc96f26875a04da2880409353fb0e
2021-12-17 01:04:23 -08:00
Abhishek Singh
f8e482d488 qcacmn: Remove unused SBS specific code
Remove unused SBS specific code.

Change-Id: I2e35eee885b2a70fd78ff48acc9d2a96e9573b77
CRs-Fixed: 3093793
2021-12-16 23:12:53 -08:00
Arun Kumar Khandavalli
eb3e1b4096 qcacmn: Reset the vdev response timer during SSR
Presently, whenever there is any kind of reference leak in the system
wlan driver doesn't recover and goes into a bad state.

Add support to forcefully reset the vdev response timer so the system
can gracefully recover and wifi can be functional.

Change-Id: Iab705c17f4313e4b8efd980d5427bf8d4ce9496f
CRs-Fixed: 3051962
2021-12-16 16:12:48 -08:00
Gururaj Pandurangi
4e553bab35 qcacmn: Allow STA in LPI mode if AP ctry US and advertises LPI
The existing logic is if STA and AP have different ctry code,
and STA is in ETSI, then it operates in VLP mode irrespective
of AP ctry.
New logic would be if AP ctry is US and if it advertises LPI
power type in HE ops IE via beacon, then STA can advance to
LPI mode.

Change-Id: Ifbee7052854277c3d21ccd21b65b79edb5e89f46
CRs-Fixed: 3084589
2021-12-15 13:40:41 -08:00
Srinivas Pitla
3ced6a46de qcacmn: Add API to get partner link info
This API retrievs link address and link id of all partner links
in structure to the caller.

This change also includes few compile fixes for msgq mode

Change-Id: I2a30904a3b41876783de611ac14697338c617689
CRs-Fixed: 3091850
2021-12-15 09:43:41 -08:00
Srinivas Pitla
e9f0077a00 qcacmn: Add debug prints for MLO peer mgmt
This change adds debug prints in error cases to
print error and relevant info to understand issue.

Change-Id: Ie5670d535015f410e81bd5b06ce58046a02b19f0
CRs-Fixed: 3091155
2021-12-15 07:40:10 -08:00
Qun Zhang
015424e069 qcacmn: Consider freq diff instead of maxbw for autobw correction
Due to the maximun frequency range of reg rule CHAN_5835_5895_1
doesn't support bandwidth 80M, kernel has below check warning:

[ 27.297225] Invalid regulatory domain detected
...
[ 27.297334] __regulatory_set_wiphy_regd+0x168/0x1a0
[ 27.297336] regulatory_set_wiphy_regd+0x28/0x5c
[ 27.297858] hdd_send_wiphy_regd_sync_event+0x284/0x2e0 [wlan]
[ 27.298283] hdd_wlan_startup+0x39c/0x8d8 [wlan]
[ 27.298697] wlan_hdd_pld_probe+0x198/0x2cc [wlan]
[ 27.299106] pld_pcie_probe+0x7c/0xbc [wlan]
[ 27.299122] cnss_pci_call_driver_probe+0xf8/0x504 [cnss2]
[ 27.299136] cnss_pci_dev_powerup+0x1a4/0x24c [cnss2]
[ 27.299149] cnss_pci_register_driver_hdlr+0x4c/0x120 [cnss2]
[ 27.299163] cnss_bus_register_driver_hdlr+0x60/0xb0 [cnss2]
[ 27.299176] cnss_driver_event_work+0x21c/0x6c0 [cnss2]

Fix solution: update the maximum bandwidth of CHAN_5835_5895_1
to 40 and use freq diff instead of maxbw for autobw correction.

Change-Id: I0271f95d565d7789692bd5bfb17a1614f225e9e6
CRs-Fixed: 3082999
2021-12-15 07:40:04 -08:00
Manoj Ekbote
80e882aa2a qcacmn: Intra-BSS changes for MLO
Use chip ID and destination peer to determine the target soc
and partner vdev for Intra-BSS in MLO case.

Change-Id: I709c52e74426c5e81b50c8063cad7669c0e7002d
2021-12-14 18:13:29 -08:00