Commit Graph

983 Commits

Author SHA1 Message Date
Subrat Dash
3947f3f64f qcacmn: Add target if interface APIs for WDS DP OL ops
Add target_if layer APIs to send wmi commands to add, delete,
and update AST. The dp_ol_if_ops functions call into target_if
layer for DP-CP interaction.

CRs-Fixed: 2997266
Change-Id: Ie392576e3e46d47f658b741f48732d069ee2847d
2022-01-31 05:40:04 -08:00
Wu Gao
137c2dde1f qcacmn: Fix invalid memory node access for DBR
Memory node pointer to unaligned vaddr, and it free the vaddr firstly
and then remove the memory node, which cause invalid memory access.
This change remove memory node firstly, and then free the unaligned
vaddr.

Change-Id: I3b81c1eb4df7c786a3deec456294107ee3b8f226
CRs-Fixed: 3118545
2022-01-28 06:30:04 -08:00
Shiva Krishna Pittala
a9948f7e23 qcacmn: Fix fft end bin index for Spectral report modes 0 and 1
For reports modes 0 and 1, the number of FFT bins in a detector will be 0.
We calculate end_bin_idx as start_bin_idx + num_bins - 1.
When start_bin_idx is 0 for these report modes, end_bin_idx will be -1.
Since bin indices are unsigned integers, end_bin_idx becomes a very big
value and we will try to copy unintended large number of bytes.
Fix this by forcing end_bin_idx to start_bin_idx when num_bins is 0.

Change-Id: I11e5dd673fc95a1ce3823ef977fd70c34a4ec67e
CRs-Fixed: 3096955
2022-01-28 00:54:00 -08:00
Wu Gao
a6d46ebc8b qcacmn: Populate additional params to CFR info for QCA6750
HAL changes to populate agc gain, CFO, rx_start_ts, mcs_rate and
gi_type to CFR info for QCA6750.

Change-Id: I164324b1e929399a8dacf88f3012970c65d5d653
CRs-Fixed: 3115256
2022-01-27 03:12:49 -08:00
Wu Gao
cf7bae960f qcacmn: Add CFR supports for KIWI
This change adds CFR supports for KIWI.

Change-Id: I895eeae41c7f8bba4a35ee46a2ad6a1eadf82f9b
CRs-Fixed: 3114230
2022-01-27 00:53:46 -08:00
Jhalak Naik
8f5372788b qcacmn: Add the spectral detector map valid flag per scan mode
For per-session detector map, maintain a different
det_map_valid flag for Normal and Agile spectral scan
mode.

Change-Id: I5a2a0253624a393feba966641d518e59a48f4a8a
2022-01-26 23:23:12 -08:00
narayan
1a3cc5efc1 qcacmn: Legacy CFR code cleanup
Remove legacy CFR routines and code as part of legacy
CFR code cleanup.

Change-Id: I652da06ea7813013f46d509981e83c4b3581074c
CRs-Fixed: 3113932
2022-01-24 14:41:07 -08:00
abhinav kumar
6c158c59d4 qcacmn: Get per channel pno scan config service capability
Firmware advertises the service capability bit
WMI_SERVICE_PNO_SCAN_CONFIG_PER_CHANNEL when it supports per
channel scan config flags. Get this and cache in psoc.

If firmware supports WMI_SERVICE_PNO_SCAN_CONFIG_PER_CHANNEL,
it uses the upper-12 bits(bit-20 to bit 32) of channel_list
for flags and lower 20-bits(bit-0 to bit-19) for frequency.
If firmware doesn't support it, then channel_list holds the
frequency value only. Fill the flags and frequency accordingly.

Change-Id: I30d36a3c164e23cf0395129e5b93d186b81aa8a6
Crs-Fixed: 3103921
2022-01-20 14:13:40 -08:00
Kiran Venkatappa
9d402b668b qcacmn: MLO Teardown sequence
Trigger MLO teardown and wait for response before proceeding with soc
power down.

Change-Id: Ie1d00408862459b0e5240ef3151a0d969ab65e80
CRs-Fixed: 3102143
2022-01-14 20:53:14 -08:00
Rachit Kankane
dffef9958a qcacmn: enable SON target_if
Add WLAN_FEATURE_SON to enable SON target_if

Change-Id: Ib4bca0eb5813d1fdd7becf6705ab7129a26e26e5
CRs-Fixed: 3102441
2022-01-13 03:03:20 -08:00
Shiva Krishna Pittala
a739a0cabb qcacmn: Add support to extract FFT size capabilities
WMI_SPECTRAL_CAPABILITIES_EVENTID event will be sent by the FW to
indicate different capabilities of the Spectral HW.
Add support to extract the FFT size capabilities from this event.

Change-Id: I9640fa51e4249b9d1c2d9d3ac5da7f1d56c9d006
CRs-Fixed: 3098880
2022-01-09 23:10:04 -08:00
Shiva Krishna Pittala
861c4e29aa qcacmn: Add support to extract sscan bandwidth capabilities
WMI_SPECTRAL_CAPABILITIES_EVENTID event will be sent by the FW to
indicate different capabilities of the Spectral HW.
Add support to extract the sscan bandwidth capabilities from this event.

Change-Id: I6ff6e5a8d80271fa62a430c986f53a321d46c66b
CRs-Fixed: 3098832
2022-01-06 10:40:06 -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
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
Yu Wang
384fc6eb86 qcacmn: hold large memory for DBR ring
To avoid memory allocation failure during idle restart,
hold the memories with large size for DBR ring during
the entire lifetime of PSOC.

Change-Id: Idfe5f0e895cc088509b5a62ae07191aed32864f2
CRs-Fixed: 3099522
2021-12-31 02:14:27 -08:00
sandhu
ad2829718c qcacmn: Remove IP from files
remove IP from code

Change-Id: If119a4af213b10aadb9f1344e50b0342e72405c2
CRs-Fixed: 3073864
2021-12-29 04:28:58 -08:00
Kiran Venkatappa
31d1d1ac4a qcacmn: Skip mlo setup triggers if soc in not mlo capable
Skip sending triggers for MLO setup if a soc is not mlo capable to avoid
inconsistent MLO setup exchange with target.

Change-Id: Ie17dcd03e2fcf778795d964a55e4a400adacfb33
CRs-Fixed: 3100309
2021-12-28 14:42:43 -08:00
Shiva Krishna Pittala
a9547b0f25 qcacmn: Add support to extract fixed params from Spectral Caps event
WMI_SPECTRAL_CAPABILITIES_EVENTID event will be sent by the FW to
indicated the different capabilities of the Spectral HW block.
Add support to extract the fixed parameters from this event.

Change-Id: Ib13108f078de008b6a76a25a010e85a7fdb6f5fe
CRs-Fixed: 3098203
2021-12-28 06:43:12 -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
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
Wu Gao
28ed233c3c qcacmn: Populate additional params to CFR info for QCA6490
HAL changes to populate agc gain, CFO, rx_start_ts, mcs_rate and
gi_type to CFR info for QCA6490.

Change-Id: I6f6f47c87d40bd661162f764fb3a360230a56457
CRs-Fixed: 3086667
2021-12-14 15:13:42 -08:00
Yu Wang
f13b79ec7f qcacmn: implement mlo manager APIs for mlo link set active cmd
Add interface for sending mlo link set active cmd and
register the response handler.

Change-Id: Icd7cf3294cddec1aa4a417e29a22fcd6fbea0dfb
CRs-Fixed: 3036846
2021-12-14 01:43:34 -08:00
Bapiraju Alla
ca4b3fabf6 qcacmn: Add support to dynamic MAC address update
Currently, MAC address update is supported only when interface is down.
Because of this framework needs to issue interface down and interface
up to update the MAC address.

This is resulting in connection time increase when MAC address
randomization is enabled for every new connection.

To optimize the connection time, add support to update the MAC address
without bringing the interface to down state.

Change-Id: Ic3eff6a9571f885292021b2c178d26b0eace5042
CRs-Fixed: 3063475
2021-12-09 13:42:05 -08:00
Venkateswara Swamy Bandaru
d2d8b77ec4 qcacmn: Add support for 11be D1.2 eht mcs map
Add support for 11be D1.2 eht mac map.

Change-Id: Ie5e0934f01c5614c0d2788d9b56b2e755ea23b1d
CRs-Fixed: 3081122
2021-12-05 22:53:43 -08:00
Yu Wang
a9ed2d6a47 qcacmn: implement target_if APIs for MLO
Implement target_if APIs for MLO.

Change-Id: I29c6ea51e29f4ea200e3f47960168dfa9a8c42cc
CRs-Fixed: 3036844
2021-12-03 00:54:14 -08:00
Chaithanya Garrepalli
65137277e8 qcacmn: chages to save soc list in mlo setup
Changes to save SOC list in MLO setup

Change-Id: I185bf26b1dac6eced03931c213297564abe74747
2021-11-23 21:59:34 -08:00
Chaithanya Garrepalli
c42af1f62f qcacmn: Rx path changes for multichip MLO
Rx patch changes for multichip MLO

1. Create ini for rx ring mask for each chip
2. Configure hash based routing for each chip based
   on lmac_peer_id_msb
3. Peer setup changes to configure lmac_peer_id_msb
   to enable hash based routing
4. Rx Replenish changes to provide buffers back to owner
   SOC of reo ring

Change-Id: Ibbe6e81f9e62d88d9bb289a082dd14b4362252c4
2021-11-23 19:28:20 -08:00
Kiran Venkatappa
3e3ed9ca89 qcacmn: MLO setup, teardown sequence changes
MLO setup, teardown sequence changes

Change-Id: I76d14cd66c373b3b734a17e44f3655ffd17893c5
CRs-Fixed: 3059859
2021-11-23 16:57:00 -08:00
Shashikala Prabhu
a117c19fda qcacmn: Add support to extract the channel info from RTT measreq
Add support to extract the freq, cfreq1, cfreq2, PHY mode, Destination
macaddr, and channel BW values from the RTT measurement request buffer
received from the LOWI application. Pass these values to a registered
callback. Users can use these values to make some decisions on the RTT
scan.

Change-Id: Idb2232c07bbfa2946dc01e75908b9a6036597ecf
CRs-Fixed: 3060685
2021-11-22 15:09:55 -08:00
Linux Build Service Account
4b3dbe14dc Merge /local/mnt/workspace/naveen1/srcs/qcacld-3.0 into wlan-cmn.driver.lnx.2.0
* /local/mnt/workspace/naveen1/srcs/qcacld-3.0: (2021 commits)
  Merge /local/mnt/workspace/naveen1/srcs/qcacld-3.0 into wlan-cmn.driver.lnx.2.0
  qcacld-3.0: Send correct PCL to fw for STA+STA roaming
  qcacld-3.0: Log BSSID for roam result
  qcacld-3.0: Fix roam failed for SAP CSA concurrency
  qcacld-3.0: Fix EAP length and roam candidate info
  qcacld-3.0: Use API p2p_status_update to update p2p conn status
  qcacld-3.0: Fix token and reason code copy in cm_roam_btm_query_event
  qcacld-3.0: Handle user initiate CSA in p2p go+go concurrency
  qcacld-3.0: Do GRO en/dis based on qdisc only for standalone STA
  qcacld-3.0: Fill validity timer in BTM Request event
  qcacld-3.0: Use correct attribute for BTM response target BSSID
  qcacld-3.0: Enable self bss roam ini by default
  qcacld-3.0: Fix 11be support compilation issue
  qcacld-3.0: Update SBS Freq Info during service ready ext2 evt
  qcacld-3.0: Consider original BW setting for SAP force SCC
  qcacld-3.0: Fix BTM logging
  qcacld-3.0: Support to deliver mlme event to SON
  qcacld-3.0: Add the Full Power Down feature support
  qcacld-3.0: Add vendor attribute to configure ARP/NS offload
  qcacld-3.0: Add ini support for tx_retry_multiplier
  ...
2021-11-22 14:24:18 +05:30
Linux Build Service Account
7735770d6d Merge /local/mnt/workspace/naveen1/srcs/qcacld-3.0 into wlan-cmn.driver.lnx.2.0
Change-Id: I880638078022d6ce6898924b25bb02eb4593080d
Signed-off-by: Linux Build Service Account <lnxbuild@localhost>
2021-11-22 13:37:22 +05:30
Utkarsh Bhatnagar
ade78b2c55 qcacmn: Add legacy cb in service ready ext2 handler
Add wmi service ready legacy cb for service ready ext2
event.

Change-Id: I610d21bfc62f8e0ba3d1787802603fe05bcf0d27
CRs-Fixed: 3073215
2021-11-17 02:36:41 -08:00
Wu Gao
8a7de8863d qcacmn: Add chip type QCA6490 & QCA6750 in cfr meta data header
There is wrong chip type in cfr meta data header if run CFR/CSI with
HSP since doesn't fill it for QCA6490 & QCA6750.

Change-Id: I932c065d33c5eaa33f66ec8a92470f5820472d7b
CRs-Fixed: 3073865
2021-11-17 00:42:48 -08:00
Li Feng
4b233db761 qcacld-3.0: Support to deliver mlme event to SON
Support to deliver below mlme event to SON:
MLME_EVENT_VDEV_STATE,
MLME_EVENT_INST_RSSI,
MLME_EVENT_TX_PWR_CHANGE.

Change-Id: I0535d80cea155f5b94abecfa609d34940e57cdd7
CRs-Fixed: 3054810
2021-11-12 08:52:49 -08:00
Srikanth Marepalli
f3adf737ea qcacld-3.0: Vendor command changes to enable the roam events stats
Add new vendor command to enable the roam events stats from the
driver/FW in both resume and suspend mode.
New roam param is introduced to indicate the FW to enable/disable
the roam stats using the new roam set command.

Change-Id: I6d04f0946e6735613a4cf3d4361bf31052314fa0
CRs-Fixed: 3036518
2021-11-08 09:41:27 -08:00
Bapiraju Alla
b3afe1b27a qcacmn: Print FW CRM sub ID version during driver init
During driver load, print FW CRM sub ID value received in service
ready ext event.

Change-Id: I710508c9c12a476690e0379938c30c916293620f
CRs-Fixed: 3067102
2021-11-03 16:15:30 -07:00
Shwetha G K
0d831d42c4 qcacmn: Waikiki CFR changes
Waikiki CFR changes

CRs-Fixed: 3057989
Change-Id: Ib2028ecede35cc2e531a394f5229a71b84757b9f
2021-11-03 12:54:43 -07:00
Utkarsh Bhatnagar
8d1f8d1b4a qcacmn: Extract SBS Lower Band End freq
Add support for extracting SBS Lower Band
End freq from rx service ready event.

Change-Id: I402d7519507fbce733a000a546473aa00e8844d5
CRs-Fixed: 3065158
2021-11-03 08:23:25 -07:00
Edayilliam Jayadev
31da41ae4e qcacmn: Clamp the FFT bin values before filling SAMP message
Each FFT bin value is represented as an 8 bit integer
in SAMP message. But depending on the configuration,
the FFT bin value reported by HW might exceed 8 bits.
Clamp the FFT bin value between the min and max value
which can be represented by 8 bits. For linear mode,
min and max FFT bin value which can be represented by
8 bit is 0 and U8_MAX respectively. For dBm mode,  min
and max FFT bin value which can be represented by 8 bit
is S8_MIN and S8_MAX respectively.

CRs-Fixed: 3056458
Change-Id: I9ec75f781a130d3ed0d0d9393975fd5874961ce0
2021-11-02 14:56:21 -07:00
narayan
70ade22606 qcacmn: Enable CFR support for QCA9574
Enable CFR host support for QCA9574.

Change-Id: I8d6a0f5b59715f244256854fc2132f33f841f316
CRs-Fixed: 3062447
2021-10-29 08:46:33 -07:00
Srinivas Dasari
32e5171037 qcacld-3.0: Drop the blacklist event if no APs are present
Currently, target_if forwards the blacklist event to upper layers
even if there is no AP info present. This event can be dropped in
target_if to avoid accessing unallocated memory.

Change-Id: Icfaabb0a8e3304882979ffde7f5cd27fd4c8a067
CRs-Fixed: 3057424
2021-10-22 18:19:15 -07:00
Pragaspathi Thilagaraj
671676a37d qcacld-3.0: Enable time sync only on connection/roam
Currently WMI_DBGLOG_TIME_STAMP_SYNC_CMDID command sent
every 1 sec causes RTPM collapse and inturn has power
impact. So to avoid this enable time of the day synchronization
only after connection/roaming.

Send WMI_DBGLOG_TIME_STAMP_SYNC_CMDID as part of RSO
start command.

Change-Id: Iee3cefe1318a6e5507a43cefb9666cc2a439fe06
CRs-Fixed: 3060762
2021-10-22 12:40:33 -07:00
Yu Tian
07b34c28fc qcacld-3.0: Add TX pending indication when sending wake up to FW
FW may experience HWDTIM mode enter and exit, if HOST can't queue
frames fast enough, this will bring 10ms latency for TX under WoW.
This change adds an indication bit to notify FW whether a TX happens
after WoW wakeup, then FW can discard HWDITM and reduce TX latency.
Change-Id: I74f7311fc0639186ee0bca711160bb8c0d5d9fb3
CRs-Fixed: 3055501
2021-10-18 14:51:37 -07:00
Shwetha G K
a731de3964 qcacmn: Report agc tain table index as metadata
Changes to report agc gain table index as part of
CFR meta data to the userspace.

Change-Id: I318c3db2eff7be8b63ce6aaa544f75fe065fb230
2021-10-18 06:13:29 -07:00
Wu Gao
9fba485d3c qcacmn: Check function pointer to avoid NULL point dereference
It calls spectral_process_phyerr of spectral operations without any
check. Which cause null point dereference potentially. So, check this
pointer before calling.

Change-Id: Iae246f847dd41e62b628223652a9527a65b43799
CRs-Fixed: 3055246
2021-10-15 15:32:08 -07:00
Shiva Krishna Pittala
de13832745 qcacmn: Populate and expose 320MHz spectral capabilities
Populate and expose the following 320MHz spectral capabilities.
  - Agile spectral scan support for 320MHz mode.
  - Number of detectors used for spectral scan in 320MHz mode.

Change-Id: Ibea77d4ec8b1d9322ef82d1d48236836ffad24ec
CRs-Fixed: 3053059
2021-10-13 02:57:24 -07:00
Aditya Kodukula
f6c46032eb qcacld-3.0: Add Support to offload icmp feature to fw
Add support to offload icmp feature to fw in case of
suspended state to avoid high power consumption.

Change-Id: I3ff19d71eac530c75be57e6b52b975e755ff2a53
CRs-Fixed: 3042452
2021-10-12 00:08:44 -07:00
Shiva Krishna Pittala
409ffbfda0 qcacmn: Pass report parameters to FFT bin byte swap function
Pass report parameters to FFT bin byte swap function instead of
FFT bin length adjustment WAR.

Change-Id: I02a280bc4e8e0839c894a70258e1f16a784c08a6
CRs-Fixed: 3051559
2021-10-11 02:35:48 -07:00
Srinivas Dasari
213d908fb3 qcacld-3.0: Cleanup ROAM_TARGET_IF_CONVERGENCE usage
wma to target_if convergence code is guarded under the feature
flag ROAM_TARGET_IF_CONVERGENCE and it's is enabled currently.
Remove the flag usage and remove the deprecated code(else part)
also.

Change-Id: I6973d9c366ec6a9c6164dd19f6f4775dd3ebf5f0
CRs-Fixed: 3049942
2021-10-06 00:02:06 -07:00
Vulupala Shashank Reddy
42b8ecfd1d qcacld-3.0: Add tgt support to send beacon report period to FW
Add tgt support in packet capture component to send user
configured beacon report interval to FW.

Change-Id: Ibeb9f9a7f9ad2c2afa6929c492bd1029784b5f9e
CRs-Fixed: 3046224
2021-10-05 05:06:33 -07:00