Commit Graph

4464 Commits

Author SHA1 Message Date
Ashish Kumar Dhanotiya
9a73106903 qcacmn: Add bearer switch request in connect path
If LL_LT_SAP is already present and if STA tries to
come up on same mac, then it may result in data loss
on LL_LT_SAP as STA will need ROC on the connection
channel for some time, to avoid these data loss during
STA connection, add logic to switch the bearer for LL_LT_SAP
data to non-wlan and once connection completes, switch back
the bearer to wlan.

Change-Id: Ic44cd77b9b5e569350d697c33260cf5cec3652e0
CRs-Fixed: 3627643
2023-10-11 14:42:44 -07:00
Gururaj Pandurangi
cfbb3005ef qcacmn: Add a cfg set API to configure scan mode for 6 GHz
Add a cfg set API to configure scan mode for 6 GHz. This is
invoked in reset HE capability API.

Change-Id: If4891036dec3777d85f3584eef965ed65ececadd
CRs-Fixed: 3629445
2023-10-10 23:10:02 -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
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
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
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
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
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
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
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
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
Paul Zhang
e3b8dfb503 qcacmn: Add enum TDLS_MAX_ACTION_CODE
Add enum TDLS_MAX_ACTION_CODE for tdls_actioncode

CRs-Fixed: 3625727
Change-Id: I613cec05794c082c86f609cbbba9143d2bd3f940
2023-09-29 11:23:55 -07:00
Aasir Rasheed
63788401a2 qcacmn: Enhance STA key management
Currently, Host driver is not resetting the STA key management
for each connection, causing unpredictable behavior during
subsequent connections.

This change is to enhance STA key management to reset with each
connection and ensuring the deferred key flag is set only
once per link.

Change-Id: I5a28e6c8b3919929bafa1a25da4b5fa4b9adde98
CRs-Fixed: 3621227
2023-09-29 02:24:28 -07:00
Srinivas Dasari
aafe99c365 qcacmn: Parse 11AX RNR TBTT info field even if 11BE is disabled
Currently, below 11BE RNR TBTT field doesn't get processed when
11BE is not defined,
TBTT_NEIGHBOR_AP_BSSID_S_SSID_BSS_PARAM_20MHZ_PSD_MLD_PARAM
So, station is not able to parse the RNR IEs from the 11BE APs.
Parse TBTT_NEIGHBOR_AP_BSSID_S_SSID_BSS_PARAM_20MHZ_PSD_MLD_PARAM
always but extract 11be info only when 11BE define is enabled.
Also, cleanup the duplicate code.

Change-Id: I49e38875f3f0a3ab238636f7a8e0f93c7aa4d04b
CRs-Fixed: 3624227
2023-09-29 02:24:16 -07:00
Jyoti Kumari
d14e4dcaa0 qcacmn: Modify default value of last_scan_ageout_time
Currently, default value of last_scan_ageout_time ini is 0 sec.
Modify it to 30 sec to avoid dependency on userspace
configuration.

Change-Id: If0d00c98950a0c20f22ee73d01e4442bd0d677c0
CRs-Fixed: 3625696
2023-09-29 02:24:03 -07:00
Vijay Raj
337f81f1d0 qcacmn: Add frequency check in reg_freq_to_band
In API reg_freq_to_band(), for frequency of value '0',
5 GHz band is returned.

Add check to return INVALID_BAND when frequency
passed as argument is '0'

Change-Id: Ie40ae73ae71769538bd04be4434dafa42b9d21d0
CRs-Fixed: 3620699
2023-09-28 23:09:00 -07:00
Liangwei Dong
cab8f71b14 qcacmn: unregister link switch cb before mlo global ctx deinit
Unregister mlo mgr link switch cb before mlo global ctx deinit
because the cb is maintained by global ctx.

Change-Id: I2bd95e74e9067e19db7448510bc6255c3bd7a1f3
CRs-Fixed: 3604403
2023-09-28 06:58:00 -07:00
Vinod Kumar Pirla
b1f923bc46 qcacmn: New substate for VDEV in INIT due to link switch
If connection fails, CM state will be moved to INIT state and
kernel will not be made aware of this connection failure in case
of link switch and treats the interface as if it is connected.
In such case kernel and host will be out of sync and because of
this if any disconnect request is received host will drop them
immediately as VDEV is in INIT state.

Introduce new substate of VDEV for INIT state. If VDEV moves to
INIT state either due to link switch disconnect or link switch
connect failure, instead of being in INIT-IDLE state move VDEV
to INIT-IDLE_DUE_TO_LINK_SWITCH. If any disconnect request is
received in INIT-IDLE_DUE_TO_LINK_SWITCH state then instead of
dropping the request forcefully queue the disconnect and proceed
for disconnect to notify kernel.

Drop link switch connect will be dropped if VDEV is not in
INIT-IDLE_DUE_TO_LINK_SWITCH state.

Change-Id: Ifb6b72f0720b95cf862e9a4ff756b6577a3e45fd
CRs-Fixed: 3617919
2023-09-27 13:09:42 -07:00
Jianmin Zhu
01c751d3fd qcacmn: Avoid NULL pointer deference
Validate sta_ctx->copied_conn_req before use to avoid NULL pointer
deference.

Change-Id: I0d46901f7709b1b6bcf63a7ca5178fb7ad90b33d
CRs-Fixed: 3621066
2023-09-26 14:41:22 -07:00
Guru Pratap Sharma
d383bdce33 qcacmn: Adding memory not allocate debug print
Adding memory not allocate debug print when fail to allocate
memory for scan node

Change-Id: I77c9a3deeb9fff9fd265188060ff3aa3aa17b866
CRs-Fixed: 3611905
2023-09-26 14:41:00 -07:00
Rahul Gusain
f9643b92ee qcacmn: Add debug id for COEX
Add new debug id "WLAN_COEX_ID". This will help to count debug
reference for COEX.

Change-Id: Id2b0500c98fcdb08f23a54c9bd20a401e0280938
CRs-Fixed: 3622040
2023-09-26 05:26:05 -07:00
Uraj Sasan
3ed0c49f5e qcacmn: Clear the bridge context properly
Bridge context was not getting cleared properly which
was causing issue in connection of WDS STA. Make sure
to clear the bridge_sta_ctx and reset central vdev.

Change-Id: I397e5ffc1223bb0e60e67d8bc3e8c4d8bbbf7808
CRs-Fixed: 3618063
2023-09-25 20:17:21 -07:00
Surya Prakash Raajen
6bd218f3be qcacmn: Send standby pdev info to FW
Send standby pdev/radio which is expected to be up while
in powersave mode to FW, to switch master control for
timers.

Change-Id: I4b48d93859359d1b6aee0b9993fd1bd3bff863f2
CRs-Fixed: 3621705
2023-09-25 05:17:23 -07:00
Srinivas Dasari
3251d2d0ad qcacmn: Add new member CM_ROAMING_USER to wlan_cm_source
Define a new member CM_ROAMING_USER in wlan_cm_source and use
it for user invoked ROAM requests.
Currently, host driver uses CM_ROAMING_HOST for ROAM_INVOKE for
both host initiated(e.g. connect on connect, qos,..) and user
initiated requests(e.g. REASSOC ioctl).
The expectations are different for these cases upon ROAM_INVOKE
failure as explained below,
1. connect-on-connect/FASTREASSOC case: Expectation upon
   ROAM_INVOKE failure is to disconnect from current AP as this
   status needs to be sent to kernel.
2. REASSOC ioctl: Expectation upon ROAM_INVOKE failure is to stay
   connected to the current AP.

So, define a new source CM_ROAMING_USER and use it to
differentiate from CM_ROAMING_HOST to avoid disconnection.

Change-Id: I36d1631a19038bc523bee096836124e3149f9941
CRs-Fixed: 3621461
2023-09-25 05:17:10 -07:00
Paul Zhang
a64af3b447 qcacmn: Get profile index and count for non-tx AP
In the scenario about MLO 5 GHz + 6 GHz and 6 GHz is non-tx AP in
MBSSID, if DUT tries to connect 5 GHz link as assoc link and uses
the scan entry generated from 5 GHz beacon. Then there is no info
about profile index and count in the scan entry and these info is
necessary for firmware when vdev up.

To resolve this issue, get the info from 6 GHz scan entry if it
exists.

CRs-Fixed: 3616899
Change-Id: Ic9bf9bc107c3486be1e87ea2c19c5d388ca41883
2023-09-25 01:30:04 -07:00
Santosh Anbu
ae01803cfd qcacmn: Clear up bmap for vdev moving to UP_ACTIVE state
During MLO AP vdev partner bringup, SYNC_COMPL can be posted for a
vdev twice since the bitmap is not cleared after posting the event.
But is cleared only when the vdev exits the sync_wait state.

Hence add change to clear the bitmap before posting the event so
so that no other partner vdev will post the same event once again.

Change-Id: I15226b650e4dc51a379d97556f2f2ab62319adf7
CRs-Fixed: 3605598
2023-09-23 17:23:59 +05:30
Linux Build Service Account
38ceb24812 Merge "qcacmn: Parse Extended MLD CAP & OP of ML IE" 2023-09-22 11:09:35 -07:00
Vijay Krishnan
419023d09e qcacmn: Introduce function to check max phy REP
If the rpt_max_phy featurte is enabled, the AP VAP of a
repeater may come up in chan 36 HT160 mode while the STA
of the repeater may come up in chan 36 HT80 mode. The
ic_curchan has the max BW value(i.e. 160 MHz). In this
case, ic_curchan is HT160. But dfs_curchan is updated
to HT80 by the API vdev_mgr_start_param_update. The
updated BW is send via VDEV START command.

This creates a mismatch between FW and HOST. FW has the BW
as HT160 and HOST has the BW as HT80. At this time, if
radar is found on chan 36, Host rejects the radar because
dfs_curchan is 36HT80 and it is a non-dfs channel. FW stops
beaconing because of no respone from host.

Fix: Dont send the VDEV START command, if the repeater max
phy mode is enabled.

This patch introduce a new API wlan_rptr_check_rpt_max_phy
that is used to invoke WIN API wlan_check_rpt_max_phy if
repeater max phy mode is enabled or not.

Before sending VDEV START command, check if the opmode is STA,
and repeater max phymode is not enabled. If the two conditions
satisfy, then send VDEV START command.

CRs-Fixed: 3613048
Change-Id: I072f62fe038c5f4dfae0318fff54189dca9e5a46
2023-09-22 07:29:13 -07:00
Aravind Kishore Sukla
bce140bd10 qcacmn: Add check to validate ml cap offset
Before passing ml cap offset, there is no proper
check for its validation, which may lead to OOB.

Add a check for its offset, before passing.

Change-Id: I5e5a10e8740b3cd3fcef2c6aef1f0a43c74818cd
CRs-Fixed: 3581103
2023-09-22 07:28:51 -07:00
Linux Build Service Account
bd7db3b28b Merge "qcacmn: Add Extended MLD Capabilities And Operations in Basic ML IE" 2023-09-22 01:14:01 -07:00
Linux Build Service Account
771b5ac7a1 Merge "qcacmn: Get new scan capability" 2023-09-22 01:13:58 -07:00
Linux Build Service Account
5ee9a0b820 Merge "qcacmn: Add OCI IE element id extension" 2023-09-22 01:13:52 -07:00
Linux Build Service Account
56346417b7 Merge "qcacmn: Rectify macro for Reconf ML IE STA Control size" 2023-09-22 01:13:48 -07:00
Priyadarshnee Srinivasan
d45510b2bf qcacmn: Fix the oplass cfi mismatch in AFC request
In this Change-ID I9e72c960fefe6fbdc106bb83fb240d84d8522b80, the
80P80 opclass is excluded if the device does not support 80P80
mode of operation. The exclusion of 80P80 opclass is done only
in the AFC request size calculation. In
reg_dmn_fill_6g_opcls_chan_lists(), 80P80 CFIs are added in the
opclass index of 320 MHz. Hence, 320 MHz opclass (137) contains
cfis 7, 23 (which is actually 80P80 CFIS) and this request is sent
to the AFC server. Since, the AFC server does not support 320 MHz
SP operation in CFIs 7, 23, it does not return opclass 137 in the
AFC response. Hence, AP is unable to come up on 320 MHz in SP
power mode.

To fix this issue, exclude 80P80 CFIs in
reg_dmn_fill_6g_opcls_chan_lists() API as well if the device does
not support 80P80 mode of operation.

Change-Id: I3114f52c45f575ba3693dadc0d2a3d42ed513f68
CRs-Fixed: 3593497
2023-09-21 14:36:36 -07:00
Krishna Rao
8dec8f1589 Revert "qcacmn: Protect the Transition Timeout D3.0 changes under D3.0 macro"
This reverts Change-Id I81555fe179a9bba9d871867c8544b566676b0314.

Reason for revert: IEEE802.11be draft 2.0 support has been deprecated.
Revert the commit in order to remove compile time support for 11be
draft 2.0 based EML Capability Transition Timeout subfield value of
11. This is a planned reversal since the compile time support was
intended to be a temporary facility for assisting in the transition to
11be draft 3.0.

CRs-Fixed: 3618130
Change-Id: I5f3a6b343d375184bd6cc7545af8918a3de27fac
2023-09-21 08:36:32 -07:00
Srinivas Pitla
f1bb50be1b qcacmn: FT over DS association support
Add support for MLD MAC address table to MLD.
This MLD address table allows API to add/delete/find entries by MLD MAC
address. This framework would be used for implementing FT over DS,
where Assoc request is received by AP without receiving Auth request.

Change-Id: I3dbc4c0507f2113d2c0cc5e58f41d69243a4cfc8
CRs-Fixed: 3608944
2023-09-20 23:59:58 -07:00
Aditya Kodukula
7c2ddd6c3e qcacmn: Hide 4th and 5th bytes of MAC address
Currently in the driver, we hide 2nd, 3rd and 4th bytes of the
MAC address in GKI builds. Since 2nd and 3rd bytes are needed for
debugging, hide only 4th and 5th bytes of the MAC address.

Change-Id: Ia432bb0d40e0a09b56e581f192a810e727127d3a
CRs-Fixed: 3616774
2023-09-20 20:10:21 -07:00
Vijay Raj
cabdbfa0c8 qcacmn: Add API to populate parameter for connecting event logging
Introduce API to populate parameter for connecting event
logging in order to be printed after STA INFO
event.

Add wlan_cm_is_first_attempt() api in order to
restrict the logging of STA INFO and connecting
event to first connection attempt.

Change-Id: Ica4253eea71ba72ea5176f733402d0758797463b
CRs-Fixed: 3599759
2023-09-20 20:10:10 -07:00