Commit gráf

4374 Commit-ok

Szerző SHA1 Üzenet Dátum
Shiva Krishna Pittala
91485c3e97 qcacmn: Don't return failure in MLO disconnect path for NULL assoc case
With MLO AP removal procedure, AP MLD can remove a link that happens to be
the assoc link for a given Non-AP MLD and the Non-AP MLD can continue to
function after that. In the existing implementation, Non-AP MLD is
returning failure in the MLO disconnect path if the assoc link is NULL, fix
the same.

Change-Id: Ib14c87da083a99f5350c9b73df2b31d08749ff0a
CRs-Fixed: 3604869
2023-09-03 14:41:13 -07:00
Kenvish Butani
31876041a5 qcacmn: Attach / Detach vdev from DP MLO Dev ctx
For ML-Repurpose usecase, Attach or Detach vdev
to DP MLO device context.

Change-Id: I67a31db07c68fc9988c504f12a075541907d7027
CRs-Fixed: 3598387
2023-09-03 10:42:31 -07:00
Srinivas Dasari
26d8aab401 qcacmn: Make cm_bss_mlo_type a public API
Make cm_bss_mlo_type() public so that other components can use it.

Change-Id: I18f130eb147b859f8827bacbfd3d134121caabf1
CRs-Fixed: 3601362
2023-09-02 05:09:50 -07:00
Krunalsinh Padhar
9c5f2ce5a8 qcacmn: Fix probable null dereference
Remove the debug prints that would cause null dereferencing.

Change-Id: I002e9b14945a2e1de62f94095847ea8886decad6
CRs-Fixed: 3604295
2023-09-02 05:09:38 -07:00
Vaishnavi Chekuru
937e92c6c5 qcacmn: Enable CFR on pebble
1.Enabling CFR capture for pebble.
2.Clean up redundant check for Pebble while fetching rtt info
3.Clean up redundant check for Miami while fetching rtt info
4.Add 2023 to copyright year

Change-Id: I2ac845a1c5914004a0af4a007264d0cd5f431d3f
CRs-Fixed: 3596397
2023-09-02 05:09:06 -07:00
Surya Prakash Raajen
d0f606e7db qcacmn: Fix dec and test bit of shmem arena deinit count
Fix dec and test bit of shmem arena deinit count, as
qdf_dec_and_test returns true if the decremented resultant
value is 0,or false for all other cases.

Change-Id: I59523078bec409badbe253243443a12c508c036c
CRs-Fixed: 3593556
2023-09-01 21:01:50 -07:00
Vinod Kumar Pirla
caf1626286 qcacmn: On link switch don't change the state of ML peer
On disconnect ML peer state is set to disconnect initiated,
this helps to avoid sending multiple deauth/disassoc OTA
frames to AP on each VDEV.
If link switch fails the ML peer will be in this state so
for next userspace disconnect request deauth/disassoc frame
is not sent OTA and AP might not be aware of STA leaving the
network.

Do not change ML peer's state on VDEV link switch disconnect
to ML_PEER_DISCONN_INITIATED.

Change-Id: Icbbb46bbf78cea796a3a1e07754be3a626390ad0
CRs-Fixed: 3601739
2023-09-01 21:01:39 -07:00
Divya R
5e7649fe1a qcacmn: Memset master channel list 6 GHz AP structure
EIRP Power value in master channel list for power type VLP
is filled with garbage values even though VLP rules are not present.
Due to this, best power mode selection algorithm selects VLP as
best power mode and fails while setting frequency.

To fix this, memset the master channel list 6 GHz AP.

Change-Id: I21bfd69445aeb4756474ad452be0099498e9d5a6
CRs-Fixed: 3574999
2023-09-01 21:01:29 -07:00
Rahul Gusain
25a99149d2 qcacmn: Resolve compilation error for TWT APIs
Currently, driver does not use "WLAN_TWT_CONV_SUPPORTED" flag in
TWT APIs declaration. So, for some targets, it causes
compilation failure.

So, this change fixes the compilation issue.

Change-Id: Ie1b92119ef37b85f4c7eb1d0e23e7910eeab3415
CRs-Fixed: 3603668
2023-09-01 13:07:29 -07:00
Abhinav Kumar
88fa8a3f0b qcacmn: Send proper control mode value to upper layer
1. Upper layer sends QCA_WLAN_VENDOR_ATTR_LINK_STATE_CONTROL_MODE
vendor command to configure control mode in host/fw.
2. Host receives GET_ML_LINK_STATE driver command to return
control mode (configured at step 1) to upper layer.

Host should reply as a response of GET_ML_LINK_STATE with same
value of control mode configured at step 1 to upper layer.

Change-Id: I3b5cb3bec31957ee8479d7f366d1e360421a7573
CRs-Fixed: 3601735
2023-08-31 11:02:29 -07:00
Amruta Kulkarni
1684c8ceac qcacmn: T2LM timer changes
Currently the T2LM timer is maintained by host.
Code change made to add support to run the T2LM timer in FW.

CRs-Fixed: 3594141
Change-Id: I7eee4800f68b07d5492a0336e3fe8e0db17d2020
2023-08-31 11:02:17 -07:00
Asutosh Mohapatra
51e6e8633e qcacmn: Keep correct set of 6 GHz channels enabled in super channel list
Currently if fcc_constraint 0/2 is set and there are
active 6 GHz STA/P2P client connections, host keeps the
bonded channels enabled, but in super channel list
incorrect set of frequencies remain active. This
happens because the active frequency start and end
indexes are not according to the super channel list
indexes.

To address this issue, convert the active 6 GHz
range start and end indexes according to the super
channel list indexes.

CRs-Fixed: 3595197
Change-Id: I8bb3a5093eb3b8bd970fcd371a4939570207385b
2023-08-31 11:02:05 -07:00
David Oladunjoye
9506ccc29b qcacmn: Increase max HW mode and max mac phy cap
Currently, if FW advertises more than three HW modes and more
than five caps, host returns error as the current max is below.
Increase max hw mode to 4 and mac phy cap to 8 to support cases
where we advertise more than hw 3 modes and more than 5 phy caps.
eg. SMM, DBS_or_SBS, AUX_EMLSR_SPLIT, AUX_EMLSR_SINGLE.

Change-Id: Idbc978a1a259d66e7d893d82f8becd6325019976
CRs-Fixed: 3599091
2023-08-31 11:01:30 -07:00
Subrat Mishra
cf8b664ae6 qcacmn: Add lmac interface to check ATF enable
Add South bound lmac interface to check ATF enable.

Change-Id: I3383a90f663079ae77872af09222e1758c7cb452
CRs-Fixed: 3600024
2023-08-31 11:00:55 -07:00
Kenvish Butani
744e92cc0c qcacmn: Cleanup MLO CDP API's for MLO Partner List
Cleanup MLO CDP API's for updating MLO Partner
list invoked from UMAC.

Change-Id: Id3a346ceb4b103410e1e89cbce25abcad9e4adc5
CRs-Fixed: 3588208
2023-08-30 01:38:23 -07:00
Pragaspathi Thilagaraj
7f18f6e441 qcacmn: Update self link address also after roaming
When updating the AP link address and channel info after
roaming, update the self link address also to the link switch
context on each vdev. This information will be fetched while
sending roam + auth event to userspace after roaming.

Change-Id: I363a5ee8d65bb21d84c15879996369f4e397f2a6
CRs-Fixed: 3589401
2023-08-30 01:37:59 -07:00
Prasanna JS
5f864ea874 qcacmn: Define beacon rate codes for lithium onwards targets
Define beacon rate codes for lithium onwards targets

Change-Id: Ife29f1cf2599b4a6f3d8d13629cd1f4f6debdf2e
CRs-Fixed: 3593185
2023-08-29 15:06:54 -07:00
Edayilliam Jayadev
f2aaec4814 qcacmn: Cleanup assert in mgmt rx reo - Part 8
Cleanup asserts in management Rx reorder module.

Change-Id: Ia1bfbae1e1ee2b02459f34624e2284592eb02a9d
CRs-Fixed: 3593936
2023-08-29 15:06:23 -07:00
Edayilliam Jayadev
ed9d84abd6 qcacmn: Cleanup assert in mgmt rx reo - Part 7
Cleanup asserts in management Rx reorder module.

Change-Id: Ia7fcabf770d3b38f62f23b6848b50eb8e4f6827b
CRs-Fixed: 3593934
2023-08-29 15:06:12 -07:00
Edayilliam Jayadev
d6db6d2a66 qcacmn: Cleanup assert in mgmt rx reo - Part 5
Cleanup asserts in management Rx reorder module.

Change-Id: Idb304f6a61599f24f1dd8f3ecbffe8dbaae42d6b
CRs-Fixed: 3593932
2023-08-29 15:06:01 -07:00
Edayilliam Jayadev
b1439341ca qcacmn: Cleanup assert in mgmt rx reo - Part 4
Cleanup asserts in management Rx reorder module.

Change-Id: I37f13dc04356d20fe3fcce43ef8a0d48c8854e31
CRs-Fixed: 3593930
2023-08-29 15:05:50 -07:00
Edayilliam Jayadev
845c861380 qcacmn: Cleanup assert in mgmt rx reo - Part 3
Cleanup asserts in management Rx reorder module.

Change-Id: I18d5e47a13b097ce718282ad4283c01243aca87e
CRs-Fixed: 3593927
2023-08-29 15:05:40 -07:00
Edayilliam Jayadev
b6f1fd416a qcacmn: Cleanup assert in mgmt rx reo - Part 2
Cleanup asserts in management Rx reorder module.

Change-Id: I436ea5fb191c8df9c218fb97d967ee07b6a57ad6
CRs-Fixed: 3593926
2023-08-29 15:05:19 -07:00
Uraj Sasan
127fb0fc7e qcacmn: Skip sending T2LM for bridge sta
Skip sending T2LM info to Target for bridge-sta topology

CRs-Fixed: 3598171
Change-Id: Iccbbef68431ca2d415e4f6127ea8231d85ded0e1
2023-08-28 05:44:15 -07:00
Jianmin Zhu
f6fa6b6729 qcacmn: Pass hopping radar test when DFS puncture enabled
Hopping radar happens on whole band, hope all DFS sub channels are put to
NOL, but F/W only reports single radar event on special freq to host.
When DFS puncture enabled, sub channel marking is enabled, host only put
single affected 20M sub channel to NOL instead of all current bonded sub
channel, AP still stays on current freq for valid puncture bitmap
instead of leave DFS freq.

If the radar is a frequency hopping radar that truly hops over entire DFS
band, then the AP and clients are best served by moving out of the DFS
band. But it could well be that only part of the band is used. It is
difficult to find product specifications with info on the total bandwidth.
Mostly military systems use frequency hopping to avoid jamming. So a middle
ground would be to put full bandwidth of current AP to NOL for FCC type 6
frequency hopping radar.

When frequency hopping radar happens, F/W set flag that full bandwidth need
put to NOL in new added tlv radar_flags of event
WMI_PDEV_DFS_RADAR_DETECTION_EVENT, When find the flag is set, host will
put full bandwidth of current AP to NOL even sub channel marking is
enabled.

To avoid compatibility issue between old/new F/W and new/old host, add a
F/W service bit wmi_service_radar_flags_support and host service flag
is_full_bw_nol_supported.
If the wmi_service WMI_SERVICE_RADAR_FLAGS_SUPPORT is enabled by FW, host
shall set/unset a bit in the host service flag is_full_bw_nol_supported
based on host capabilities. This host service flag is then sent to FW via
WMI_INIT_CMDID.

Change-Id: I6e280ca4ab00dce97c5aec90c7a4b4fc7c4a440a
CRs-Fixed: 3595476
2023-08-28 05:44:04 -07:00
Shreedhar Parande
0394351f22 qcacmn: Do not reset linkid for bridge vap
Link ID for the bridge vap is set during creation.
However during mlo ap vdev attach, it gets overwritten by 0.

Due to this, during 2.4 GHz link removal using ml-reconfig,
2.4 GHz linkid and bridge vap as primary vaps linkid matches
which leads to full disconnection of the peer.

To fix this, retain previously set linkid for bridge vap.

Change-Id: I28a3da110aa6427ae7024fe173ae04c5a6bebe41
CRs-Fixed: 3592545
2023-08-26 02:39:40 -07:00
Vinod Kumar Myadam
151331ba76 qcacmn: Validate num_links before accessing data
In util_parse_rv_info_from_linkinfo, accessing the array of data
without validating the index of the array will cause OOB issue.

Add check with the maximum size of the array before accessing the
data.

Change-Id: Ie8b33c83fa1cd18cfbfcb6c7a82b79ddd86e8808
CRs-Fixed: 3580821
2023-08-26 02:39:18 -07:00
Aditya Kodukula
16020acc91 qcacmn: Include structures having qdf_bitmap member
Currently kernel-doc script doesn't support qdf_bitmap
struct member. So, all structure which has qdf_bitmap
member are excluded.

Support for qdf_bitmap has been added to kernel-doc script.
So, include all structures which have qdf_bitmap.

Change-Id: I95095d458152a0285a24fba398b46effd94525db
CRs-Fixed: 3598814
2023-08-25 15:15:15 -07:00
Vignesh U
36b33094be qcacmn: Move the generic regulatory function outside 6 GHz macro
The definition of the function reg_get_pdev_from_phy_id() is placed
inside the 6 GHz specific macro CONFIG_BAND_6GHZ.

The function is a generic function applicable for non-6 GHz platforms.
Move the definition outside the macro.

Change-Id: I899813268daec85f1393d83b593a7664ae4aaabd
CRs-Fixed: 3595223
2023-08-25 09:06:54 -07:00
Krunalsinh Padhar
b3727d63af qcacmn: Improve logging for ml_peer_count decrement
Added logs to make sure ml_peer_count has decremented every time mlo
peer is detached and catch rare instance when ml_peer_count is not
decremented properly.

Change-Id: Ic174a0bce22a8a85e9df4ccb840de023b45a7f9d
CRs-Fixed: 3580583
2023-08-24 21:15:24 -07:00
Balaganapathy Palanisamy
b7aac4a3be qcacmn: Ignore ap vdev count initialization
Avoid ap vdev count initialization through mlo
bridge vdev.

Change-Id: Id8845f2499d2064ec768e90ffa6324bfde60d3d9
CRs-Fixed: 3592556
2023-08-24 04:18:27 -07:00
Guru Pratap Sharma
dbd510c42c qcacmn: handle integer underflow in util_gen_new_ie
handle integer underflow for subie_len in util_gen_new_ie

Change-Id: I2f73e5a7e0462100deae1e85e6a51f77bfc46b95
CRs-Fixed: 3582487
2023-08-24 01:26:59 -07:00
Edayilliam Jayadev
8d3856c308 qcacmn: Handle snapshot sanity failure
Gracefully handle the scenario of snapshot sanity failure.

Change-Id: Icd6fcd83da8ffcfd41e254dc90a94b08ab264b37
CRs-Fixed: 3593921
2023-08-24 01:26:48 -07:00
Kiran Venkatappa
42e618a774 qcacmn: Add support to send TWT IE in assoc/probe rsp
Add support to send TWT IE in assoc/probe rsp to fulfill WFA requirement
FW sends TWT IE in mgmt rx event for probe req and assoc req. Send this
IE in probe rsp and assoc rsp. This change takes care of extracting TWT
IE in mgmt rx event.

Change-Id: I1a97eb58c03f76c7ced31349dc0e3b4a908ceda0
CRs-Fixed: 3585625
2023-08-22 19:23:56 -07:00
uvignesh
2bd93270d4 qcacmn: Return the status of regulatory init_cc handlers
When setting the country from user space, the thread sleeps and waits for
the init_cc event to awake. Right now the thread is woken up only in 2
case:
(i) when the country configuration is success from FW and regulatory and,
(ii) when country configuration failed in FW.

The thread is not woken up if there is failure in regulatory. This is
leading to timeout which will assert the kernel. In order to handle all the
return errors from the regulatory init_cc event handler should execute and
the status should be returned to thread waiting for the init_cc event
irrespective of the status of the init_cc handler. In order to achieve
this, the following actions are taken:
(i) Introduce a new regulatory tx_ops set_wait_for_init_cc_response_event()
that will wake up the thread waiting for init_cc response and return the
status of the init_cc response handler.
(ii) Remove the tx_ops set_country_failed() which just sends the failure
status to the thread waiting for init_cc event. This will be handled by the
new tx_ops.
(iii) Send the status of init_cc handler using the new regulatory tx_ops.

Change-Id: I1b29651682e9b7219d428c13d6d0ea299d6f81ba
CRs-Fixed: 3552823
2023-08-21 20:01:18 -07:00
Vinod Kumar Pirla
9e3a7ecb78 qcacmn: Allow disconnect req in INIT state for link switch
VDEV is moved to INIT state as part of link switch disconnect,
before set MAC address response is received, any disconnect
request on this VDEV will not be handled as VDEV is in INIT
state, if link switch is in progress then it will abort link
switch and starts link switch dequeue process.

If the new disconnect request is from userspace it will
increment the OSIF ops, but if link switch is on assoc VDEV
OSIF is notified to restore the adapter deflink as part of
link switch complete where it wait for all OSIF ops to
complete. This is a deadlock case where driver is waiting
for ops completion on same thread where ops is initiated.

To fix this issue, do not handle link switch dequeue on the
same thread, instead move the link switch state to abort
and when actual link switch thread comes it will flush from
serialization.

If userspace disconnect is not queued as VDEV is in INIT
state due to link switch, kernel won't be notified about
the disconnect as this notification is only done on assoc
VDEV and any further connect requests from supplicant gets
dropped in kernel saying already connected and supplicant
will immediately try disconnect which driver will again
drop as VDEV is in INIT state. To avoid this kernel-driver
out of sync, forcefully move VDEV to disconnecting state
and queue the disconnect request.

Change-Id: I116859601ebba21d44797e74e160b56532ef833c
CRs-Fixed: 3588936
2023-08-21 15:05:50 -07:00
Aravind Kishore Sukla
78d988e666 qcacmn: Reject partner link based on security check
For multi link connection there might be the case where
rsnxe of the AP is not present on the link vdev.
This causes the link vdev alone to downgrade to 11ax
mode and assoc vdev is in 11be dot11 mode.
So for vdev with ML peer, the dot11mode is 11ax,
which causes abnormal firmware behavior.

Reject the partner link that doesn’t pass the security
check and validate the next available partner link.
if none of the partner link passes the security check,
proceed connection with single link.

Change-Id: I080557027180c0566a1c284a93fcc4b69c61a9c8
CRs-Fixed: 3581189
2023-08-21 10:58:15 -07:00
Vinod Kumar Pirla
15b56b62e4 qcacmn: Move frame control values to header file
Move the frame control values used for link specific rsp
generation to a header file to access in other source files.

Change-Id: Ib531b9ae88604e98b9119efa610757dc5f399596
CRs-Fixed: 3586052
2023-08-21 10:58:03 -07:00
Sheenam Monga
f02143c909 qcacmn: Change union to structure to handle multiple stats
Currently, If FW sends both mac and counter stats data then
some data may get overwritten as union of structures can
handle only one structure data at a time.

Change-Id: I30f82ac1b3965f504d268e39a2516f57edc6ce38
CRs-Fixed: 3592413
2023-08-18 21:44:15 -07:00
Rakesh Boyina
64dc3a4199 qcacmn: Add Max ML Peer ID support from target capability exchange
Add support to parse the Max ML Peer ID's parameter received from target
capabilities and update the parameter in global MLO context.

Change-Id: I4118d288a312dc4a18182caf765b0ded014b985a
CRs-Fixed: 3556542
2023-08-18 18:11:11 -07:00
Uraj Sasan
85dafccb66 qcacmn: Handle bridge peer creation in WDS station
Handle case where device topology needs bridge peer.
So if the device have connection on two opposite links
create bridge peer on the central vap.
Sample topology:
AP
2 GHz<-->6 GHz MLO Links
STA topology
       (5 GHz Low VAP)
         chip0
      /         \
 (2 GHz VAP)chip1    chip2 (6 GHz VAP)
      \         /
         chip3
       (5 GHz High VAP)
In the above case we will have Bridge peer on either
5 GHz Low or 5 GHz High VAP

CRs-Fixed: 3575939
Change-Id: I923cc01b3c6e23099436a25565cbabab5a08d93c
2023-08-18 18:10:58 -07:00
Paul Zhang
674627f868 qcacmn: Fix use-after-free issue in util_scan_parse_mbssid
In some scenario, mbssid_info->prof_residue could be set to
true, hence mbssid_info->split_prof_continue will also be
set to true. Then for the next loop if buffer split_prof_start
is freed but split_prof_end does not reinitialize to NULL,
then use-after-free happens.

To address this issue, reinitialize split_prof_end properly
when split_prof_start is freed.

Change-Id: Iad7448868cfa4c2dd7922f6c1b2622cf20a6a28c
CRs-Fixed: 3583521
2023-08-18 18:10:48 -07:00
Ashish Kumar Dhanotiya
a0bd216fc8 qcacmn: Add support for LL_LT_SAP_MODE in policy mgr
Currently PM_LL_LT_SAP_MODE is not handled in policy manager.
With this change add support for PM_LL_LT_SAP_MODE in the policy
manager.

Change-Id: I7b893b04498957eb4a7e9f74c4b4395d4a823bf9
CRs-Fixed: 3536612
2023-08-17 21:01:54 -07:00
Rajeev Kumar
d2dec1752c qcacmn: add enter and exit debug logs for mgmt_txrx module
Add enter and exit debug logs for mgmt_txrx module to assist
in debugging timeout issues.

Change-Id: Iad28dca3fa749f803829cd7a2e052578a5c579e8
CRs-Fixed: 3584331
2023-08-17 09:43:12 -07:00
Vinod Kumar Pirla
9319e99df8 qcacmn: Notify link switch status to FW in all error cases
Currently if host receives invalid link switch params from FW,
the request is dropped in host and reject status is not sent to FW.

Update link switch status to FW in all error cases.

Change-Id: If1ce5e30517d98c38e869baa1cfc620302b839b2
CRs-Fixed: 3588204
2023-08-17 01:39:49 -07:00
Krishna Rao
a1c589112a qcacmn: Update ML Reconfig TBTT docs and print per 11be D3.0
IEEE802.11be D3.0 has renamed the 'Delete Timer' subfield to 'AP
Removal Timer' in the STA Info field in per-STA profile in
Reconfiguration Multi-Link element. The earlier name did not correctly
reflect the AP removal operation and was a source of confusion.
Update documentation related to the erstwhile Delete Timer to indicate
the new name. Similarly, update a print related to this timer.

CRs-Fixed: 3589907
Change-Id: Ie5c9c4c8756057791095e87532e0e14bcf7ef133
2023-08-17 01:39:39 -07:00
Vignesh U
4da1bf7d8c qcacmn: Move uncommon regulatory APIs out of cmndev
The API reg_is_freq_txable() is not used by_REG_CLIENT devices and
should be moved out of converged code.

Move reg_is_freq_txable() and corresponding dispatcher API
wlan_reg_is_freq_txable() to unconverged code.

Change-Id: I1031a20d40ebcf30326c14901d413669206a8433
CRs-Fixed: 3568932
2023-08-17 01:39:27 -07:00
Surya Prakash Sivaraj
9cd7aef35e qcacmn: Use HT info to get operating bandwidth
APs can broadcast support for 20 & 40 MHz in the
HT cap IE and operate in 20 MHz also.

Therefore, use the extension channel offset field
of the HT info IE to identify the bandwidth of the
BSS.

Change-Id: I9987d45ec34ba3327b43ef70eb891d346e9e78c9
CRs-Fixed: 3587792
2023-08-16 19:16:42 -07:00
Aakanksha Doda
074162a87a qcacmn: Remove number of vaps check in vdev detach from MLD context
Remove number of vaps check in vdev detach from MLD context.

Change-Id: I3f67534911582a0773da52fe7e800f32b1de831e
CRs-Fixed: 3585336
2023-08-16 13:36:49 -07:00
Surya Prakash Raajen
6aa15982ae qcacmn: Do mlo register only for mlo capable soc
Do mlo register only for mlo capable soc, since non mlo
chips also could be part of mlo capable target

Change-Id: Ibef1899257f60a00ba3933af44efdb736550b9e4
CRs-Fixed: 3582269
2023-08-14 18:57:18 -07:00