Commit Graph

387 Commits

Author SHA1 Message Date
Rohan Dutta
4600a3b873 qcacmn: skip a radio as primary-umac in MLO
Allow user configuration options to skip a radio as
primary-umac in multi-link operation.

Change-Id: Ic7c8dd5c1cf7855f4fb762daf9ace7cb82e02cac
CRs-Fixed: 3437922
2023-04-06 08:55:47 -07:00
Rahul Gusain
4e7ff1e143 qcacmn: fetch roam vdev from pdev obj
Driver extracts the vdev from peer, self mac address and
vdev_id. But in some APIs, there can be below scenarios
For example:
1. peer is not available for that vdev( roam vdev),
2. API does not have vdev_id,
3. mac address is not known or incorrect,
4. there is no session available.
While roaming, there can be scenario where driver need to
fetch the vdev before peer creation and session is not
available.
For this, driver introduces new API to fetch roam vdev from
pdev object.

Change-Id: I4a2521773b893a8dc0553335bcadac5a84fbc300
CRs-Fixed: 3441493
2023-03-30 09:01:23 -07:00
Nidhi Jain
4f84ad378c qcacmn: Add 11az TB rsta ext feature flag support
The existing code does not support capability to be set
if trigger based ranging rsta wmi service bit is enabled.
This require addition of ext feature flag for trigger based
ranging rsta support.
Add 11az TB rsta ext feature flag and set the same as per
firmware capability for 11az feature.

Change-Id: I12512175d0b33daa906586c7f96f0c8c3f7400a3
CRs-Fixed: 3437057
2023-03-29 11:29:44 -07:00
Paul Zhang
2859ea85d1 qcacmn: Add flag WLAN_VDEV_FEXT2_MLO_STA_TDLS
Add a flag WLAN_VDEV_FEXT2_MLO_STA_TDLS to mark whether
the vdev is used for TDLS or not.
It can use these API:
wlan_vdev_mlme_feat_ext2_cap_set(vdev, WLAN_VDEV_FEXT2_MLO_STA_TDLS);
wlan_vdev_mlme_feat_ext2_cap_clear(vdev, WLAN_VDEV_FEXT2_MLO_STA_TDLS);
tdls_vdev = mlo_get_tdls_link_vdev().

Change-Id: I89c50ad5321013993e798ebb5549c5015ac18969
CRs-Fixed: 3435963
2023-03-25 05:32:51 -07:00
Pragaspathi Thilagaraj
381a41f67d qcacmn: Read service capability for TDLS concurrencies
Read the new service capability:
WMI_SERVICE_TDLS_CONCURRENCY_SUPPORT for TDLS concurrencies
support. With this service capability below concurrencies are
supported:
STA+TDLS+P2P
STA+TDLS+P2P+P2P
STA+TDLS+P2P+SAP

Host driver will check this capability to disable TDLS
off channel when concurrent interface comes up. If this
service cap is not advertised by the firmware then
existing TDLS connection will be teared down when concurrent
interface is started.

Change-Id: I744775080a22ca8f3bc88894c349916eea27fd3a
CRs-Fixed: 3414266
2023-03-21 11:51:23 -07:00
Shashikala Prabhu
4ed5695ef3 qcacmn: Add NULL check for MLO dev context
MLO dev context is accessed without NULL check.
Add NULL check before accessing the MLO dev context.

Change-Id: I51d672924dbbf70cbf4b7e4951a3a45d4fd551ec
CRs-Fixed: 3409901
2023-03-05 21:52:13 -08:00
Krunalsinh Padhar
6d5fea01f7 qcacmn: Selective peer discon during non-DFS to DFS
Disconnect only non ML peers in CSA from non-DFS channel to DFS channel,
while keeping all MLO peers connected.

Change-Id: I7e8347cf4692b16b84ffbce4b102dd2f23bb70f0
CRs-Fixed: 3394219
2023-03-05 11:23:00 -08:00
Deeksha Gupta
d9be0596ba qcacmn: API to expose vdev mlo_external_sae_auth
Adding a new API to expose vdev_objmgr.mlo_external_sae_auth

Change-Id: I5ea1910dad2871290440e941fb33fa1f3d4e8099
CRs-Fixed: 3402538
2023-03-01 05:44:44 -08:00
Tiger Yu
73d74205f1 qcacmn: Free peer obj directly if current context is in non-atomic
Free peer object directly if current running context is not in atomic to
make the code much more reasonable and logical.

1. If current running context is not in atomic state, it's safe to call
   peer free object directly.
2. If current running context is in atomic state, then delay this free
   in a work item to avoid scheduling issue.

Change-Id: I9acf97354619ed2b6c09b3f619bd10dc930d8afb
CRs-Fixed: 3412111
2023-02-28 05:14:29 -08:00
Edayilliam Jayadev
84ec76c1aa qcacmn: Set/get scan blanking feature support
Extract the scan blanking feature support from WMI service ready
event and store it in target if data structures. Add API to check
whether scan blanking feature is supported for a given pdev.

Change-Id: I65fefbb879b8433a68338bfcd3e4f729eff3ddd8
CRs-Fixed: 3413922
2023-02-27 06:31:43 -08:00
Kiran Venkatappa
7260b2db76 qcacmn: Add r-twt related changes
Add changes to read R-TWT svc bit from FW and update capabilities on
host accordingly. Update add twt session command to include new
params required for R-TWT.

Change-Id: I91cea65ef737b6fa445cb3680dac15e0f1063446
CRs-Fixed: 3399205
2023-02-16 18:20:03 -08:00
Gururaj Pandurangi
3739c21995 qcacmn: Add vdev cap to exclude sta profile from MLO IE
Define a new per vdev capability flag to exclude the sta
profile from MLO IE in unicast probe request frames.

Change-Id: I4486e4efbbb85dfa1e7b9d47326c60c79c974829
CRs-Fixed: 3392086
2023-02-14 03:26:55 -08:00
Varsha Mishra
d6afad86bc qcacmn: Add global context
Global context will contain fst context, fst ref count
and global desc count.

Change-Id: I272fa2c3b8945822268d29b6c329df3f659753d4
CRs-Fixed: 3392039
2023-02-12 03:21:18 -08:00
Neha Bisht
30bc8285d2 qcacmn: Add global context for maintaining descriptor count
Add global context to maintain descriptor count at global level.

Change-Id: Ibfe3379bb4a747530794956cc0cba31e423598d3
CRs-Fixed: 3334340
2023-02-03 05:57:55 -08:00
Jeff Johnson
9db8b7e4c3 qcacmn: Fix umac/cmn_services/obj_mgr documentation
The kernel-doc script identified some kernel-doc issues in the
umac/cmn_services/obj_mgr folder, so fix them.

Change-Id: I0d02b5e174a47b77f9da3304cfc03ed2602b45c7
CRs-Fixed: 3383933
2023-01-26 17:50:50 -08:00
Asutosh Mohapatra
11dfead265 qcacmn: Use mac_addr pointer as constant
Use mac_addr pointer as constant in wlan_hdd_ml_sap_get_peer,
hdd_set_mld_address and use the same for consecutive APIs.

Change-Id: I19e07512bf09b01f26ef8b2bc3876f3d3e85ba2f
CRs-Fixed: 3374923
2023-01-17 05:29:58 -08:00
Pavankumar Nandeshwar
2d884cc639 qcacmn: Add a new reference id for intra bss
Add a new umac reference id for intra bss
feature related functionalities.

Change-Id: I3e2c98cee72e3cdfa70f9feb2b0c0c66176e90b5
CRs-Fixed: 3362569
2023-01-13 18:40:29 -08:00
Surya Prakash Raajen
4d5db3f69b qcacmn: Add multi group support for dp handles
Add multi group support for dp mlo context handles.

Change-Id: I076003d04db745cfcce4bd879e6d92181bba8ef9
CRs-Fixed: 3343170
2023-01-05 22:32:47 -08:00
Asutosh Mohapatra
1ade380fc3 qcacmn: Use mac_addr pointer as constant
Use mac_addr pointer as constant in wlan_hdd_ml_sap_get_peer,
hdd_set_mld_address and use the same for consecutive APIs.

Change-Id: I3ab7b0f3c03e9175c62179029efb53fb9fe75277
CRs-Fixed: 3342115
2023-01-02 15:01:22 -08:00
Chetan Kumar Sanga
176650cce4 qcacmn: Add Bitmap support for Multi-Vdev-Restart
Update MVR handlers and init to setup/use MVR bitmap
depending on bitmap MVR support by FW.

Change-Id: I3a73ddefeae85d8f6b4fc31f9c1f1164fa5346c7
CRs-Fixed: 3355001
2022-12-26 22:50:00 -08:00
Surya Prakash Raajen
49ca504dbd qcacmn: Maintain dp_mlo_ctxt per each MLO group
As per current design, dp_mlo_ctxt is allocated during the
initialization of module while the MLO grouping information is
understood after WMI_READY_EVENT. The same is deinitialized while
unregistering the module.
To ensure dp_mlo_ctxt exists per MLO group, bring the dp_handle
a layer below in the hierarchy into the mlo_setup_info and allocate
dp_mlo_ctxt after the WMI_READY_EVENT is received from all the SOCs
for a given group. Deallocate it after the WMI_MLO_TEARDOWN_COMPLETE
event is received.

CRs-Fixed: 3355405
Change-Id: Ic3102a34a8d44877827e2ff1f7da2e414b2b463f
2022-12-21 06:33:27 -08:00
Shiva Krishna Pittala
c1231d0824 qcacmn: Add support to populate and send WMI_MLO_LINK_REMOVAL_CMDID
WMI_MLO_LINK_REMOVAL_CMDID is to be sent by the Host to initiate the
removal procedure for a given link from its MLD. This command will be sent
on the impacted link only. Add support to populate and send this command.

Change-Id: I8485d8c8897bb2bb891d50546d5fbfac2a69a4ce
CRs-Fixed: 3314430
2022-12-11 23:51:35 -08:00
Srinivas Pitla
3bae1f975c qcacmn: add MLME changes for ML reconfig
1) add op flags to indicate Link removal in progress
2) update API to include link removal check for ML peer create
3) add API to check whether all link peers to be deleted.

CRs-Fixed: 3341256
Change-Id: I8fabd19d3321315eb13d874a7e9b2e93392a7886
2022-12-07 16:19:21 -08:00
Will Huang
dc9e47060f qcacmn: Add MCL/SAP DCS process after AFC event update
When AFC event come and update 6 GHz SP channels' state and power
attribution, SAP which already started on 5 GHz or 6 GHz channel
can move in or out from SP channel, which has higher tx power limit.

SAP target channel/bandwidth is decided by ACS channel select callback
register to SAP module, which will take channel max tx power limit
into account.

After target channel/bandwidth determined, SAPs move to same target
channel/bandwidth with eCSA process. If violate any concurrency
limitation, AFC DCS process should abort.

Add AFC component id and reference id.

Change-Id: Iba6933a30c0957eabf549fd6c8442bed547e8152
CRs-Fixed: 3204172
2022-11-29 03:25:45 -08:00
Edayilliam Jayadev
0a1f95446f qcacmn: Add an API to check vdev is AP
Add an API to check whether a vdev is operating in AP mode.

CRs-Fixed: 3328867
Change-Id: If611184f1938aac60f72681da1f68aca457c1ae4
2022-11-28 12:20:27 -08:00
Yeshwanth Sriram Guntuka
2a525d7545 qcacmn: Add id for QMI component
Add QMI component entry in object manager debug id
and umac component id.

Change-Id: Ib2531ee9cc91f721214f9e30b6b25cb7f3e89a42
CRs-Fixed: 3338296
2022-11-23 13:55:08 -08:00
David Oladunjoye
25cb050e32 qcacmn: Add lock to Set/clear WLAN_VDEV_FEXT2_MLO_STA_LINK flag
Currently, this MLO flag is being set/clear without regard for
concurrency. We need to lock the vdev when updating these values to
prevent race condition.

Change-Id: Ied90d62f10f6f12a35eeac3060dd0fae7d0c6cfd
CRs-Fixed: 3305558
2022-10-21 21:31:17 -07:00
Jeff Johnson
ed240b1daf qcacmn: umac: cmn_services: Fix misspellings
Fix misspellings in umac/cmn_services/...

Change-Id: I74c006b3e585e3d4f6ec8c025ef313133c9e3068
CRs-Fixed: 3304695
2022-10-11 00:47:41 -07:00
Rajesh Chauhan
de24535ff4 qcacmn: objmgr: change prototype of functions to pass dev_addr as const
In kernel 5.17, net_device->dev_addr is changed to const unsigned char*.
Modify prototype of below functions to pass dev_addr as const:

 - wlan_objmgr_get_vdev_by_macaddr_from_pdev()
 - wlan_objmgr_get_vdev_by_macaddr_from_pdev_debug()
 - wlan_objmgr_get_vdev_by_macaddr_from_pdev_no_state()
 - wlan_objmgr_get_vdev_by_macaddr_from_pdev_no_state_debug()
 - wlan_objmgr_get_vdev_by_macaddr_from_psoc()
 - wlan_objmgr_get_vdev_by_macaddr_from_psoc_debug()
 - wlan_objmgr_get_vdev_by_macaddr_from_psoc_no_state()
 - wlan_objmgr_get_vdev_by_macaddr_from_psoc_no_state_debug()

Change-Id: I787fd26301d472e73e397fc89f05e4d8161877f7
CRs-Fixed: 3304954
2022-10-05 19:33:41 -07:00
Surabhi Vishnoi
997b924222 qcacmn: Reduce log level from error to debug in wlan_vdev_get_bss_peer_mac
Bss peer can be NULL in case of vdev in disconnected state,
so change the log level from error to debug in 
wlan_vdev_get_bss_peer_mac() to reduce logging in dmesg.

Change-Id: Idac08200253d83f267be3381691e10d6bd4b52bf
CRs-Fixed: 3293402
2022-09-21 20:02:58 -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
Mohammed Ahmed
fa6e07082f qcacmn: add psoc null pointer check to wlan_objmgr_get_peer_by_mac
Current code directly passes the result of wlan_vdev_get_psoc(vdev) to
wlan_objmgr_get_peer_by_mac, without null pointer checking, which can
result in null pointer dereferencing.
To fix this issue, add checking of the psoc pointer before passing,
and add verification inside wlan_objmgr_get_peer_by_mac.

Change-Id: Iaf0e2535c3a584db788ddc621745c66c296fe08f
CRs-Fixed: 3277651
2022-08-29 22:19:33 -07:00
Yu Wang
67011a392c qcacmn: add support for CoAP
Add support for Constrained Application Protocol.

Change-Id: I425206a990778cf946a4805192eff4d54562a945
CRs-Fixed: 3254128
2022-08-17 23:14:34 -07:00
Basamma Yakkanahalli
8a1a784ac8 qcacmn: Add vdev feature flag for 20TU probe resp
6 GHz SAP needs to send either a probe response or fils
discovery at configured interval.  These in band
discovery frames can be disabled when lower band vdevs
are collocated with 6 GHz vdevs.

FILS disabled when lower band vdevs were up.
After vdev up send if WLAN_VDEV_FEXT_FILS_DISC_6G_SAP
is not set, host sending FILS command to enable 20TU.

Either driver or user not enabled 20TU probe response,
Host did not send the 20TU PRB RESP TMPL before sending
20TU PRB RESP enable command resulted Target assert.

Fixed this issue by adding 20TU vdev feature flag
and add appropriate check before sending command
to enable 20TU probe response.

Change-Id: Icb0ea5ef40b1fe2dd2dc6b97dc079ab7780e8cfc
CRs-Fixed: 3244471
2022-08-12 02:36:06 -07:00
Pavankumar Nandeshwar
bdb7f89395 qcacmn: Umac changes for umac prereset handling
Handle Umac prereset event from firmware.

Change-Id: I651eb9e6359399fe5689e4209e4685955d653973
CRs-Fixed: 3174560
2022-08-11 15:23:28 -07:00
Pragaspathi Thilagaraj
728ff15ea3 qcacmn: Don't allow PASN peer create if peer del all is not supported
Firmware advertises WMI_SERVICE_DELETE_ALL_PEER_SUPPORT
capability to indicate vdev peer delete all command support.
PASN peer relies on the WMI_VDEV_DELETE_ALL_PEER_CMDID
command to delete the PASN peers before vdev delete.

So allow PASN peer create only on targets that advertise
WMI_SERVICE_DELETE_ALL_PEER_SUPPORT.

Change-Id: Ib94d9e14e34dd1e5c25bf6946e0d59fe83fd6dd3
CRs-Fixed: 3229438
2022-07-18 16:00:32 -07:00
Kani M
c9f08ae24b qcacmn: Add beacon ratelimiting
Rate-limiting will be based on number of beacons received.
When the beacon is not from connected AP, the beacons
are dropped on a percentage of received beacons and
rate limit, which is configured by the user.

CRs-Fixed: 3230508
Change-Id: Iac591c37129fda6923ef254c2950cb0bdbb44ce9
2022-07-08 11:57:54 -07:00
abhinav kumar
f55ec57e32 qcacmn: Support vendor handoff service bit info from FW
Add change to fetch and save the WMI service capability
bit of FW to support vendor handoff control feature
using service bit.

Change-Id: I6bc85f2807032bf84d391f34c814c91de906ab42
CRs-Fixed: 3225147
2022-06-23 08:51:02 -07:00
Gururaj Pandurangi
83d3a9032e qcacmn: Add set/get APIs to update eMLSR capability
Add set/get APIs to update the eMLSR capability bit.
This flag is used to determine if the current MLO
connection is eMLSR.

Change-Id: Ib72131e4740387918addca551dc11b349cd79bba
CRs-Fixed: 3220952
2022-06-22 22:00:36 -07:00
Jyoti Kumari
4afef82b70 qcacmn: Handle TWT renegotiation failure case
Generally below process should happen in renegotiation failure
case.
1. TWT setup (successful)
2. TWT setup (renegotiation failure)
3. TWT teardown
4. TWT GET STATUS - 0(dialog ID) 0 0 0
5. TWT setup - successful

Since all WMI TWT events gets executed in WMI thread. So when
renegotiation failure case hits, driver sends TWT
teardown to firmware and waits for twt ack in worker thread.
In same worker thread TWT event needs to be processed.
TWT ack event will not process as it's waiting in same worker
thread and it will get timedout.

As part of fix, break the context in renegotiation and
send the teardown in the new worker context.

Change-Id: Id12cb906b780d3013562c1772e276639a056c8f7
CRs-Fixed: 3207537
2022-06-10 18:58:29 -07:00
abhinav kumar
be6648764a qcacmn: Check first unused bit for multi client feature support
Currently host check 3rd bit of the extended feature flag to
know whether FW supports below two features:
1. Roam Frame info stats - per candidate frames support
2. multi-client feature flags support

The host should check different bits for different features.

Fix is to allow the host to check the first unused bit
(here 4th bit) of extended feature, flag to check whether FW
supports multi-client feature flags support.

Change-Id: I485aeab6a90e900a52e88cd013645203457c1adb
CRs-Fixed: 3184410
2022-05-26 09:32:57 -07:00
Basamma Yakkanahalli
a684d24bfe qcacmn: Critical update signaling for beacon
Critical update is the explicit signaling for STA to notify
any change in BSS param.

There are two categories of critical update params.
Category 1 elements:  CSA, ECSA, Quiet, Quiet channel,
            Max Ch Switch Time, that are directly included in
            the per-STA profile of partner AP.
Category 2 elements: Except category 1 all operational IEs
           HT/VHT/HE/EHT and WMM/EDCA/MUEDCA params.

Defined below vdev flags to track change in Category 1 and
Category 2 CU params per ML VDEV
WLAN_VDEV_OP_CU_CAT1: Change in category 1 param
WLAN_VDEV_OP_CU_CAT2: Change in category 2 param

Host notify to FW by updating current link CU param in
wmi_bcn_tmpl_ml_info TLV of BCN TMPL CMD.
Set the corresponding cu_vdev_map category 1 / category 2
based on change in critical update params of ML VDEV.

Change-Id: I8fe71309ab92a459524bdc5739f8b4a4a545562e
CRs-Fixed: 3199331
2022-05-19 01:57:30 -07:00
Aditya Kodukula
16c15a6499 qcacmn: Add support for MLO stats
As part of MLO stats feature, add support to send ll_stats
and get_station stats request to firmware for all the MLO vdevs.

Change-Id: Ic50a6294f868f0604d4cfc0d4b657b6085da2fb4
CRs-Fixed: 3181020
2022-05-14 03:35:17 -07:00
Edayilliam Jayadev
40dacfa471 qcacmn: Count MLO vdevs in a pdev
Count the MLO vdevs in a pdev. WLAN_VDEV_FEXT2_MLO feature
flag in vdev object is set for all MLO vdevs. Simple solution is
to increment/decrement the count on every set/clear of
WLAN_VDEV_FEXT2_MLO feature flag. Since this feature flag will be
set/clear at multiple places for a given vdev, this approach
will lead to wrong MLO vdev count. To fix this we need to
increment/decrement the count on first set/first clear of
WLAN_VDEV_FEXT2_MLO flag. Add a lock also to prevent the race
conditions.

CRs-Fixed: 3106235
Change-Id: Ice7edde04553088fbb7c9b769508d441ccd6e4bf
2022-05-11 05:53:18 -07:00
Basamma Yakkanahalli
a9b55f2c20 qcacmn: APIs to handle MLME VDEV OP flags
Added APIs set, get, and clear mlme vdev op flags.

Change-Id: Ibc20e07553545fd3c30f42f192171922f63e4b4c
CRs-Fixed: 3161657
2022-04-28 08:40:18 -07:00
Amit Mehta
e498989902 qcacmn: Add DP component ID
Add DP component entry in debug id and umac component id.

Change-Id: Ia4302f5b22c26cd099821388e09be0358b83ab1b
CRs-Fixed: 3165355
2022-04-25 23:11:56 -07:00
abhinav kumar
5cb3946000 qcacmn: Support multi-client service bit info from FW
Add change to fetch and save the WMI service capability
bit of FW to support multi-client low latency feature
using service bit.

Change-Id: Ifce82c06fc913668949ed06634da1eebcea80397
CRs-Fixed: 3180932
2022-04-25 05:38:28 -07:00
Pragaspathi Thilagaraj
4abe857789 qcacmn: Add support for per candidate roam frame capability
Firmware advertises per candidate roam frame capability to
indicate:
1. Firmware sends auth/assoc frames for each candidate to
which roaming was attempted.
2. Fill the frame info TLV with authentication algo = 3
for authentication frames.

Add support for the roam per candidate frame info capability

Change-Id: I95c23031ab0fbc21fb9d8db3bd54004e4d1ac234
CRs-Fixed: 3172311
2022-04-22 08:39:58 -07:00
Dundi Raviteja
e04b80efc6 qcacmn: Add pre cac component support params
Add component id, module id and debug id for
pre cac component.

Change-Id: I2abee4b8a48c816d50d04451bbf97a2188d37b54
CRs-Fixed: 3176256
2022-04-21 01:20:24 -07:00
Jeevan Kukkalli
7f9da4ae12 qcacmn: Add lite monitor set/get functions
-Add lite monitor tx/rx filter config set/get fucntions
-Add lite monitor tx/rx peer config set/get functions

Change-Id: I47cc1085c64468b8a0fada871e2f5d3707ca7063
CRs-Fixed: 3078298
2022-04-05 10:11:03 -07:00