Graphe des révisions

200 Révisions

Auteur SHA1 Message Date
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
Srinivas Dasari
cc60bec109 qcacmn: Ignore H2E RSNXE support for test config
Userspace sends the vendor command WIFI_TEST_CONFIGURATION by
setting the attribute WIFI_TEST_CONFIG_IGNORE_H2E_RSNXE when
driver needs to ignore the SAE H2E mismatch for 6 GHz connection.
This is needed for certification test support

Change-Id: I5c1838598478ab74d72d57a765452d7fd989b701
CRs-Fixed: 3072578
2022-05-06 16:41:55 -07:00
Deeksha Gupta
e8e16bec58 qcacmn: Allow 6Ghz if any 6Ghz AKM is supported
Currently, Userspace can send multiple AKMs in connect req.
For 6GHz, some AKMs are not supported. Suppose in multiple
AKMs, any AKM doesn't support 6GHz then driver returns failure.
Due to this, DUT doesn't not able to connect to 6Ghz.

Fix is, allow 6Ghz if any 6Ghz AKM is supported.

Also adds necessary prints in scan filter API to help
debug the candidate rejection.

Change-Id: Id9967af5ec7f64e95b33dd8be3bd6c9649e72bb2
CRs-Fixed: 3158489
2022-03-29 14:12:01 -07:00
Deeksha Gupta
b06ca5bc3d qcacmn: Update key management after bss create response
Add support to update key management with higher security
after BSS create response.
Also, Currenlty if there are multiple AKM and ucast cipher.
Host overwrites AKM and ucast cipher value with the new one.
Instead of overwrite, add support to do ORing to keep all values.

Change-Id: I679a86debef649efbce1a08b60512d127f7fbbee
CRs-Fixed: 3113222
2022-03-14 10:11:25 -07:00
Deeksha Gupta
348fee747b qcacmn: Update BSS score calculation based on Security Profile
Update BSS score calculation to consider security profile.

Change-Id: I120774ce2472442ebba15e098b4089f8a17cbfc5
CRs-Fixed: 3113215
2022-03-14 10:11:19 -07:00
chunquan
bc71eff483 qcacmn: Rename files with blacklist/whitelist
Rename files with  blacklist/whitelist to denylist/
whitelist. Rename files with blm to dlm.

Change-Id: I6f533c30c664aaaf713cdd2e2e34f9528df139b5
CRs-Fixed: 3099867
2022-03-14 08:50:32 -07:00
nakul kachhwaha
dff43f12ea qcacmn: Add support for 6ghz relaxed connection policy
Adding new API to bypass scanning and connection
restrictions to bss operating in 6GHz with different
country code.
This API is based on a cfg item which can be configured
separately from safe mode or rf test mode.

Change-Id: I47396ac8793172e94499377cb0b980f7eee0f39e
CRs-Fixed: 3135147
2022-03-08 01:19:59 -08:00
Aditya Sathish
1cebff1228 qcacmn: Use best regulatory power mode in scan manager
Due to the nature of discrete channel lists for each
power mode on the host driver, it is currently not
possible to scan 6GHz channels which are not part
of the operating regulatory power mode.

To enable scanning all 6GHz channels irrespective of the
regulatory power mode (i.e., standard, low, etc.), the
existing sanity checks for the regulatory current channel
list need to refer to the super channel list
instead.

Additionally, these sanity checks need to check the
channel state and flags for the best power mode instead
of the current power mode. This will allow the scan
manager to access all 6GHz channels irrespective
of the current regulatory power mode.

Multi-band operation (for radios operable on 2.4GHz,
5GHz and/or 6GHz) is also ensured in these sanity
checks.

CRs-Fixed: 3140935
Change-Id: If10c617834dd89f4bbd99669318fd84c63421755
2022-03-07 20:19:12 -08:00
chunquan
19cc13911c qcacmn: Replace blacklist/whitelist with denylist/allowlist
Replace blacklist/whitelist with denylist/allowlist
in qca-wifi-host-cmn.

Change-Id: I1a27d025ccb9d5fcc3c573d47a84f9667a229c9b
CRs-Fixed: 3098934
2022-03-05 07:11:01 -08:00
Himanshu Batra
7908fb906c qcacmn: Clear MLO cap on connect failure of assoc link
Clear MLO cap on connect failure of assoc link

Change-Id: I62edace42543d527ff6b65861d30f8762f3a6316
CRs-Fixed: 3137865
2022-03-01 05:39:43 -08:00
Abhijit Pradhan
3f95481d0e qcacmn: Add powermode APIs under a new macro
Use  CONFIG_REG_ 6G_PWR_MODE for the new API.
Use "_for_pwrmode" as suffix for the new functions.

Change-Id: I9b84944a59062277b76bc48877c47ea5afada0ec
CRs-Fixed: 3133023
2022-02-28 12:57:10 -08:00
Hariharan Basuthkar
e7b559d010 qcacmn: Replace reg curchan with 6g ap power based chan list
The consumers of the current channel list may want to search through 6G
channels that are not part of current channel list and belong to channel
list of different power mode.

Therefore, replace the regulatory current channel list with that of 6G
power based channel list.

Change-Id: Ie2ff8bbfb50a5f95f584b134b18246cb28b1c406
CRs-Fixed: 3110987
2022-02-28 12:57:03 -08:00
Bapiraju Alla
c0267fdbb4 qcacmn: Initialize total_weight while initializing BSS score config
Currently, total_weight is not initialized before calculating
default ML BSS weightage with INI configuration. This may result in
unexpected behavior.

To resolve this, calculate ML bss weight after calculating non-ML
BSS score weight.

Change-Id: I4b9455e0ce69dec5c837f92acad60ac83cdd2502
CRs-Fixed: 3127454
2022-02-25 01:46:00 -08:00
Lincoln Tran
badb6230e2 qcacmn: Back to back connect changes
Currently, the code does not handle an MLO connect when in
non-init state. Add logic to clean up any existing connection
before going ahead with the latest request.

Change-Id: Ia5a10bcc1e0d2c8e82d6ea0d82d1a5bf0604a1e5
CRs-fixed: 3116687
2022-02-23 20:49:08 -08:00
Srinivas Dasari
f8921a74b9 qcacmn: Wait for RSO stop response from firmware
Firmware doesn't expect any vdev commands from host while RSO stop
is happening. It sends a response to the RSO_STOP command once
it's done with cleanup. Host needs to run a timer and wait for a
maximum of 6 seconds for the response. Host can stop the timer and
allow the commands to firmware in the below cases,
1. RSO_STOP response with success status
2. RSO_STOP response with HO_FAIL status followed by
   HO_FAIL event: Host needs to wait till HO_FAIL event is
   received

If firmware doesn't send any response in the 6 seconds wait, issue
a recovery to help to check the firmware state.

Change-Id: I4577f9b0aac71c0c86bd32b59e69d9527bf107b9
CRs-Fixed: 3106032
2022-02-18 23:21:21 -08:00
Srinivas Girigowda
9630b58469 qcacmn: connection_mgr: Add API ucfg_cm_get_connected_band()
Implement an API to get connected band information.

Change-Id: I682a749d293afd06a4fe12acf985cc5d44d11db8
CRs-Fixed: 3104394
2022-02-08 18:25:29 -08:00
Srinivas Dasari
c49f8063e7 qcacmn: Move MLO link vdev to UP state upon legacy to MLO roaming
Host driver creates two vdev as part of initial connection.
If the connected AP supports MLO, both(sta and link) of the vdevs
would be moved to UP state. Otherwise, link vdev would be in INIT
state and not moved to UP state.
Firmware sends roam sync indication to host when it roams to a
new AP. The event carries new AP info and the new AP could be
MLO AP. If the current AP is non-MLO and new(roamed) AP is MLO AP,
move the link vdev state to UP as it's in INIT state.

Change-Id: Ib5dd216074d68b0001755024153263ba9654edbe
CRs-Fixed: 3106059
2022-02-03 16:46:15 -08:00
chunquan
be297ae0ae qcacmn: Replace blacklist/whitelist with denylist/allowlist
Replace blacklist/whitelist with denylist/allowlist

Change-Id: Ic10f0bb187f44c00f07752cd859a08342a945628
CRs-Fixed: 3087605
2022-01-14 03:50:13 -08:00
Amruta Kulkarni
9d1cdbc568 qcacmn: Add MLO roaming callback api
Add MLO roam sync callback api for lfr3 mlo roaming.

Change-Id: I438e63765b0dbda736914fe0ca5e0bd20f96bb86
CRs-Fixed: 3021135
2022-01-13 01:11:50 -08:00
Bing Sun
722d2e18cb qcacmn: Refine bandwidth score with static puncturing
EHT operation IE contains disabled subchannel bitmap, which providing
a list of subchannels that are punctured within the BSS bandwidth.
Throughput is affected if subchannels are punctured, refer to system
document to get new bandwidth score for different puncture pattern.

Change-Id: I91b9a7ec4331e78373440d4c97eb9f1ba6c45b4c
CRs-Fixed: 3098009
2022-01-06 19:12:54 -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
Yu Wang
66181cbbbb qcacmn: set valid MAC address for non-ML connection
Update MAC address for non-ML connection only when
MLD address is valid.

Change-Id: I8ff46acdc972bfed01cd1ec97d5dd960baf24a38
CRs-Fixed: 3084793
2021-12-08 22:03:26 -08:00
Lincoln Tran
3bb859e795 qcacmn: Retain link disconnect source if northbound
If the MLO module is sending link disconnect from the north, retain its
disconnect source. If it is a southbound disconnect, update the source
to be from MLO manager. This is needed so some legacy modules handle the
disconnect properly and send vdev stop when appropriate. Also make sure
that the SB disconnect will be processed if the link is in connecting
state.

Change-Id: I6644751934697496147b9177ee7beab4d7355e10
CRs-fixed: 3086012
2021-12-07 22:39:25 -08:00
Shiva Sankar Gajula
c2d0e0aca1 qcacmn: update the vdev crypto params form the connect req during roam
With existing STA code changes, The vdev crypto params are filled
in cm_connect_active() but when STA tries to roam from WPA2 AP to
WPA3 AP or vice versa, the new keymgmt of AP2(AP2 keymgmt is FT-SAE
if STA roams from WPA2 to WPA3 and AP2 keymgmt is FT-PSK if STA
roams from WPA3 to WPA2 AP's) is not updating in the vdev crypto
params instead it holds the AP1 keymgmt.

So, Adding changes to update the vdev crypto params from the connect
request structure during roam.

Change-Id: Ia0ddd6192a45f5d9e37b44665aded5a1fc573243
2021-12-06 06:26:48 -08:00
Himanshu Batra
14325a4a60 qcacmn: Clear MLO cap only when it is the last disconnect req
Clear MLO cap only when it is the last disconnect req as osif would not
have informed userspace for other disconnect req because of
cm_id mismatch

Change-Id: Ifcfde3e0efd6fb28e73679cbbccfa6f64ed35902
2021-12-06 02:44:37 -08:00
Jianmin Zhu
50eb6fef18 qcacmn: Fix deadlock for race condition
When connect from wpa_supplicant and roam from F/W happens at same
time, supplicant hold cm cm_req_lock and wait rsp from scheduler
thread, sheduler thread is blocked to wait for cm_req_lock.

Change-Id: I6b9010972d29be9a32d3b85ee72891ed62b50801
CRs-Fixed: 3087193
2021-12-04 20:51:25 -08:00
Abhishek Singh
3915bd37fb qcacmn: Drop disconnect req in INIT state
In case the vdev is already disconnected, the indication to
the upper layer, would have been sent as part of previous
disconnect/connect failure.

If the upper layer is in process of connecting, sending
the disconnect indication back again may cause it to incorrectly
think it as connect failure. So sending a disconnect indication
again is not advisable.

So if a new disconnect is received in INIT state, drop the
disconnect and return failure.

Also remove osif_cm_reset_id_and_src() from osif disconnect
to avoid race between disconnect complete of old disconnect
and new disconnect request. With osif_cm_reset_id_and_src()
old disconnect might also get dropped in osif and with this
fix new disconnect will also get dropped, so make sure that
last/old disconnect indication is sent to upper layer.

Change-Id: Icf7352d8904473329edff9ec124c6197f214f88b
CRs-Fixed: 3074093
2021-11-19 02:03:55 -08:00
Himanshu Batra
b21d96305e qcacmn: Modify MLO disconnect handling
Modify MLO disconnect handling to issue disconnect on all links in
parallel
Also modify connect resp to accommodate ml info in connect resp

Change-Id: I57575c6ce7c8ebff7770f862dc81e7dfd20aa42d
2021-11-11 00:37:03 -08:00
Yu Wang
33958ed42f qcacmn: handle MLO scenario for candidate validating
Add flag to indicate whether MLO is supported by the candidate or not,
which is helpful when checking concurrency.

Change-Id: I166ad2963163ae4dc7989516b654dce4cb635cec
CRs-Fixed: 3013418
2021-11-07 22:52:53 -08:00
Himanshu Batra
d0ac79827e qcacmn: Clear vdev MLO Cap as part of updating vdev mlme address
The MLO cap is getting reset as part of getting valid candidate, this is
leading to reset of MLO cap for supplicant selected ML candidat as well.
Add fix to Clear vdev MLO Cap as part of updating vdev mlme address

Change-Id: I19ce9711011173505a829dc5b308e8890b8ffe6c
2021-10-18 20:56:19 -07:00
Lincoln Tran
1b0df8b4fb qcacmn: Clear MLO cap bit in case of failure or disconnect complete
Clear the MLO capability bit in the following scenarios:
- On a successful disconnect complete
- On a failing connect complete
- Every time we fetch a new candidate
This will ensure subsequent connections are not effected by this bit.

Change-Id: I4cbda78715450b5db5bc25cb7f6a141d636b712b
CRs-fixed: 3054192
2021-10-13 15:23:01 -07:00
abhinav kumar
7427e70f15 qcacmn: Fix race condition between connect and disconnect
Scenario: In case of STA + STA, NB/SB issues disconnection for
vdev 0 when vdev 1 is in connecting state.

As connection is blocking serialization command and it can try
multiple candidates and can take upto 30+ sec, there is a
chance that disconnect may get timeout and is followed by
vdev delete from osif. This can lead to vdev delete sent
without vdev down/stop and bss peer delete for vdev 0.

So abort connection when trying for candidate if any of the
vdev is waiting for disconnect, to avoid disconnect timeout.

Change-Id: I7ef50b2e870317d2b095dd0385fcbe1c5b86fd20
CRs-Fixed: 3051567
2021-10-08 13:55:33 -07:00
Lincoln Tran
92f93cb246 qcacmn: Add MLO as disconnect source
When processing a peer or southbound disconnect on the non assoc link,
there is a vdev stop issue due to the correct state not being set. For
this link, set the disconnect source as MLO instead of passing it down
from the caller.

Change-Id: I8db444e7c80659a1a1026a53326e99c96ef631f0
CRs-fixed: 3040658
2021-09-29 15:05:32 -07:00
Lincoln Tran
9f659010f4 qcacmn: Fix legacy connection when the 11be feature is enabled
Add the following fixes:
-Don't update the SA in mgmt frames when vdev is not operating as
 STA
-Set the MLO vdev capability when setting the link address. In
 case of non ML connection, this bit should not be set.

Change-Id: I23f8fb8d43afbed687f619c7029893a7d09696d2
CRs-fixed: 3038626
2021-09-24 20:44:58 -07:00
Surya Prakash Sivaraj
7d2ec40194 qcacmn: Send SSID in join req for OWE transition mode
STA connection with OWE transition mode SSID fails due to join
failure timeout. Since, it is OWE transition mode, STA needs probe
response for join success.

The scan table entry of the candidate BSSID is sent in the join request.
This entry is used to create session and to send probe request to AP.
In case of OWE transition mode, the beacon carries wildcard SSID.
Therefore, the scan table entry also has wildcard ssid. Also,
during the candidate selection, scm_ignore_ssid_check_for_owe check
allows even entries with wildcard SSIDs to be selected as candiates
for OWE transition mode.

The join request with Wildcard SSID in the scan entry is used by LIM
to create session, as well as to send probe request.Therefore,
the AP doesn't respond to the probe request with wildcard ssid
leading to join failure timeout.

This change adds ssid from connect request to the cm_vdev_join_req,
which can be used by LIM to create session and to send probe request
whenever the SSID in scan entry is wildcard.

Change-Id: If43d7e8a65bc3e37d67e22609932cf18f804f0ab
CRs-Fixed: 3041142
2021-09-24 02:14:38 -07:00
Jyoti Kumari
8f7c876c10 qcacmn: Update beacon interval for p2p_cli from scan entry
During p2p AGO and GC connection, beacon interval of GC doesn't
match with AGO which causes connection failure.

As part of fix, update beacon interval of p2p_cli from scan entry

Change-Id: Icb38d129809dea0ef0645df29723a6315e32b0f5
CRs-Fixed: 3039930
2021-09-22 05:27:28 -07:00
Himanshu Batra
fd8df63e25 qcacmn: Print Vdev/CM SM history in case of Connect/Disconnect timeout
Print Vdev/CM SM history in case of Connect/Disconnect serialisation
timeout

Change-Id: I51abd2fd72b7c5fe837b6b0acf124b9006bf130b
CRs-Fixed: 3034463
2021-09-21 06:51:39 -07:00
Bing Sun
7fcc2ebd13 qcacmn: Fix issue when getting rnr
When getting rnr IE information, instead of getting rnr pointer through
input parameter,  we can just return rnr pointer.

Change-Id: I57f683eb86bb813018a38fa3a6286e9b6e40037f
CRs-Fixed: 3025194
2021-08-31 12:23:26 -07:00
Himanshu Batra
df25501b83 qcacmn: Fill ML info while getting active connect/disconnect request
Fill ML info while getting active connect/disconnect request

Change-Id: Ifdbfacab64bfcc144ac3f2afb68854f2108e729d
CRs-Fixed: 3022005
2021-08-25 13:07:19 -07:00
Vivek
a32acb5027 qcacmn: Send connect/disconnect response for flushed connect/disconnect
Send connect/disconnect response for flushed connect/disconnect

Change-Id: I23df9c249bdcba0530dcee33c2a09534869815b0
CRs-Fixed: 3008838
2021-08-23 00:18:24 -07:00
abhinav kumar
a368b81e70 qcacmn: From connection manager filter only ESS type of AP
ESS (Extended Service Set) operating mode allows wireless
device to roam anywhere within the area covered by multiple
APs.

IBSS (Independent Basic Service Set) allows wireless device
to connect in peer-to-Peer mode only.

Fix is to allow connection manager module to filter only
those AP(s) which is/are part of ESS network.

Change-Id: I9536557daa624b9e44505efa0e0720e47b645517
CRs-Fixed: 3015220
2021-08-19 11:30:39 -07:00
bings
7f36fdf121 qcacmn: Check bssid before creating bss peer
Add NULL pointer check when getting bssid

Change-Id: Ie8bba89b3b4125fe58329d2a5d56aba4a6d0bcb3
CRs-Fixed: 3010236
2021-08-14 23:07:09 -07:00
Himanshu Batra
9406f72b3d qcacmn: Update the correct bit index for ML IE
Update the correct bit index for ML IE control field

Change-Id: I8b2dcf70fd2ee83ae24eeba8359798499c0b7c74
2021-08-12 10:45:26 -07:00
Will Huang
69f69de187 qcacmn: Enable check_6ghz_security by default
It is mandatory request to check security mode in 6Ghz band,
so enable check_6ghz_security by default. Keep default disable
for WIN as requested.

Change-Id: Idcc4cb9add98ad4bda8e4357e83460ca25221692
CRs-Fixed: 3006930
2021-08-12 00:55:56 -07:00
Ashish Kumar Dhanotiya
518f0daeb1 qcacmn: Add aliasing for INI names
Currently driver has only one name for an INI, with
this change add second name as well for few INIs based on
new requirement.

Change-Id: I67bd50652c3be7912c516b81d40f6a1ea7a7b90a
CRs-Fixed: 3007172
2021-08-10 15:39:24 -07:00
sheenam monga
296e2e7722 qcacmn: Do not reset OCV from RSN cap if AP is non-OCV
Currently driver reset self OCV capability from RSN based
on AP capability which is not required as it may lead to
failure of wifi-cert test case 15.1 that is sta should
advertise self OCV capability irrespective of AP capability.

Fix is not to reset OCV from rsn based on AP
capability to support OCV.

Change-Id: I24cda586ae0f364bb4eb2936985194e01f74875b
CRs-Fixed: 3002963
2021-08-09 13:08:38 -07:00
bings
4ea9496323 qcacmn: Pass mld address and assoc link info when creating bss peer
MLO sta needs mld mac and assoc link information to create bss peer
Get mld address and assoc link info from connection manager and pass
it to bss peer creation.

Change-Id: I147ac8365f3c99c6231df589ac17d39122d57362
CRs-Fixed: 2987496
2021-08-05 15:13:41 -07:00
bings
fe21212247 qcacmn: API to get rnr IE according to cm id
API to get rnr IE according to cm id

Change-Id: I6666a86a2402323a64472c79dc876077b622512a
CRs-Fixed: 3004089
2021-08-03 06:55:27 -07:00
Bapiraju Alla
e95a45c0f7 qcacmn: Update vdev mlme MAC address based on connection type
Management frames from STA should carry SA as link MAC address for ML
connection and net device address for non-ML connection.

To achieve this, update vdev mlme MAC address to link MAC address for
ML connection and to net dev MAC address for non-ML connection.

Change-Id: I2285a43882039dfc706fbf73a494cc09bcba19c7
CRs-Fixed: 2993031
2021-07-28 19:02:38 -07:00
Huashan Qu
3c98d7456d qcacmn: Use seperate event for HO/roaming disconnect for old AP
Use seperate event for HO/roaming disconnect for old AP, as
if a disconnect is received during roaming, the state is moved
to disconnect and thus WLAN_CM_SM_EV_DISCONNECT_DONE is handled
as a normal disconnect and does not clean up the roaming
contexts in VDEV and peer.

Change-Id: I10e616be435b16e1cff6666940171fef6b2b4065
CRs-Fixed: 2994558
2021-07-24 05:19:02 -07:00