Commit Graph

13270 Commits

Author SHA1 Message Date
Shwetha G K
8c35189d7f qcacmn: Rename leg_cfr_metadata to legacy_cfr_metadata
Change the naming convention of the leg_cfr_metadata to
legacy_cfr_metadata

CRs-Fixed: 2997929

Change-Id: I0f04459d53130b0338316a6b0d01152c536e1c64
2021-08-02 01:59:15 -07:00
Shwetha G K
43a0ba24ca qcacmn: Rename leg_cfr_metadata to legacy_cfr_metadata
Change the naming convention of the leg_cfr_metadata to
legacy_cfr_metadata

Change-Id: I059bcec1075e0e49350c2eb12990ec33a59cc1fd
CRs-Fixed: 2997916
2021-08-02 01:59:10 -07:00
Priyadarshnee Srinivasan
1ad426e648 Revert "qcacmn: Update the max_bw of the reg chan only during CC change"
The max-bw of a reg channel is not updated properly when the regulatory
channel list changes via cmds like setch144. Channel 144 (set via setCh144)
in Japan supports a maximum width of 80 though the reg rules read
160 (CHAN_5490_5730_6). Reducing the maximum bandwidth to 80
is done in reg_modify_chan_list_for_max_chwidth() API which does not
get invoked when setCH144 cmd gets invoked.

reg_modify_chan_list_for_max_chwidth API must be invoked
whenever regulatory channel list is modified. Hence invoke this API from
reg_compute_pdev_current_chan_list.
(Revert ChangeID: I36fb19f727c62bc86d61d81494ca1791a33cf99e)

CRs-Fixed: 2993289
Change-Id: Ic4c372cea0185366fbec387dbf2316cecb288fce
2021-07-31 09:34:36 -07:00
Krishna Rao
dd6ac7346c qcacmn: Add definitions for basic variant Multi Link IE
Add definitions specific to the basic variant of Multi Link IE. These
are based on IEEE802.11be D1.0.

CRs-Fixed: 2996746
Change-Id: I2779b325a74913bca8b1aca7c048f54bccc1d4d5
2021-07-31 00:13:26 -07:00
Krishna Rao
6bfd5d6e4b qcacmn: Add common definitions for Multi Link IE
Add definitions for Multi Link IE which are common to all variants of
this IE. These are based on IEEE802.11be D1.0.

CRs-Fixed: 2995642
Change-Id: I74e6457a5ef2e3c440144c67df11fee621958d4d
2021-07-31 00:13:20 -07:00
Srinivas Dasari
938fd64017 qcacmn: Add extract_roam_scan_chan_list to wmi_ops
Add extract_roam_scan_chan_list to wmi_ops to allow cld driver
to register the corresponding callback.

Change-Id: I71b17b807d183aff31b73a4732d368d1525c118e
CRs-Fixed: 2990390
2021-07-30 21:51:40 -07:00
Srinivas Dasari
ad437e38ec qcacmn: Add extract_vdev_disconnect_event to wmi_ops
Add extract_vdev_disconnect_event to wmi_ops to allow cld driver
to register the corresponding callback.

Change-Id: I3fb891f9a0b4afc92c8a456b2a8fe17bcfecaefa
CRs-Fixed: 2990389
2021-07-30 21:51:35 -07:00
Srinivas Dasari
34285d8716 qcacmn: Add extract_btm_bl_event to wmi_ops
Add extract_btm_bl_event to wmi_ops to allow cld driver to register
the corresponding callback.

Change-Id: I1734f577b07f8c54924a83d3d367e8cdba07f41c
CRs-Fixed: 2990385
2021-07-30 21:51:30 -07:00
aloksing
c60b9619a3 qcacmn: Conditionally compile monitor related features and issue fixes
PATCH[7/7]:
This patch consists following changes:
 -Conditionally compile all monitor destination ring related code
  Macro used QCA_MONITOR_PKT_SUPPORT
 -Add QCA_ENHANCED_STATS_SUPPORT macro to conditionally compile
  enhanced stats support
 -Use QCA_MCOPY_SUPPORT and QCA_TX_CAPTURE_SUPPORT macros
  to conditionally compile MCOPY and Tx capture features
  respectively
 -Use QCN_IE macro to conditionally compile BPR
  feature
 -Use QCA_ADVANCE_MON_FILTER_SUPPORT macro to conditionally
  compile advance monitor filter feature
 -Fix vdev attach issue for special and smart monitor vap
 -Fix status ring initialization issue.

Change-Id: I0deaa28a9a54bf34b0f41e6dd510fdd8d4992db2
CRs-Fixed: 2983780
2021-07-30 21:51:26 -07:00
aloksing
53fe7000ba qcacmn: Move monitor related fields from soc/pdev to mon_soc/mon_pdev
PATCH[6/7]:
This patch consists following changes:
 -Move monitor related pdev variables to struct dp_mon_pdev
 -Move monitor relted soc variables to struct dp_mon_soc
 -Move cookie to monitor link desc va to monitor file
 -Add APIs to access monitor related variables
 -Add dummy APIs to build without monitor support.

Change-Id: I032a480b1383d061f984cee3ba6b10ac7a0ff350
CRs-Fixed: 2983781
2021-07-30 21:51:21 -07:00
aloksing
c4796962ca qcacmn: Monitor vdev and peer attach/detach
PATCH[5/7]:
This patch consists following changes:
 -Monitor vdev context allocation while vdev attach and free
  while vdev delete
 -Monitor peer context allocation while peer create and free while
  peer delete
 -Move monitor vdev timer function to monitor file
 -Move monitor reap timer handler function to monitor file
 -Move monitor timer related variables to monitor file
 -Add timer init/deinit and start/stop in monitor file.

Change-Id: I9c7910671d3678c53ca9ec44a57bc10e892008d9
CRs-Fixed: 2983994
2021-07-30 21:51:16 -07:00
aloksing
e7cc727374 qcacmn: Move core monitor and monitor dependent feature func
PATCH[4/7]:
This patch consists following changes:
 - Move core monitor and monitor dependent feature functions
   to monitor file
 - Move enhanced stats functions from htt to monitor file
 - Move vdev set monitor mode rings function to monitor file
 - Create and initialize relevant funct ptrs
 - Initialize cdp monitor related ops.

Change-Id: Iac1ab43eb1c4b98bd21bbb8a5741ee53034da2f1
CRs-Fixed: 2984635
2021-07-30 21:51:12 -07:00
aloksing
f20f31dc10 qcacmn: Move cdp_mon_ops initialization to monitor file
PATCH[3/7]:
This patch consists following changes:
 -Move struct cdp_mon_ops to dp monitor file
 -Add new function for dp monitor soc cfg initialization
 -Move full monitor mode function to dp monitor file
 -Move vdev set monitor mode function to dp monitor file
 -Move config debug sniffer function to dp monitor file
 -Move set advance monitor filter function to dp monitor file
 -Set monitor delayed replenish entries for target types

Change-Id: If8dac4eedc0c8eb4e956df34c7c3adae8712c840
CRs-Fixed: 2983939
2021-07-30 21:51:07 -07:00
aloksing
420c5b3e6f qcacmn: monitor soc/pdev attach and detach
PATCH[2/7]:
This patch consists following changes:
  -Allocate monitor soc context and initialize monitor ops
   for pdev attach/detach and init/deinit functions.
  -Move monitor rings alloc/free/init/deinit to dp monitor file

Change-Id: I97c24f28cfdad10fa1c22e5978224db196bbdd74
CRs-Fixed: 2983970
2021-07-30 21:51:01 -07:00
aloksing
f2cde4cf1e qcacmn: Move monitor files to monitor directory
PATCH[1/7]:
This patch consists following changes:
 -Add new directory for monitor.
 -Move monitor related files to monitor directory.

Change-Id: I260cd6853d72f664324c2631a1d1bb7e67eb0bce
CRs-Fixed: 2983782
2021-07-30 21:50:57 -07:00
Srinivas Dasari
07e4d152fe qcacmn: Add extract_roam_event to wmi_ops
Add extract_roam_event to wmi_ops to allow cld driver to register
the corresponding callback.

Change-Id: I812105a1a81060de0de3f6b9857257e79aa23fc1
CRs-Fixed: 2990384
2021-07-30 14:29:49 -07:00
Shashikala Prabhu
b2f8ff4e7f qcacmn: Add support for multiple vdev set param WMI API
Add support for multi vdev set param WMI API to send vdev param for
multiple vaps.

Change-Id: If7381f0b242cacff0817e6bdc16606d3d776b48d
CRs-Fixed: 2994278
2021-07-30 11:46:48 -07:00
Amit Mehta
58023bfff8 qcacmn: Compilation issue fix
Fix for compilation error unknown type name 'htt_tlv_hdr_t'

Change-Id: I8d01d6f2059599b34539b7d254fa90a98ef3a8d3
CRs-Fixed: 3003861
2021-07-30 07:12:24 -07:00
Sumedh Baikady
18ff74028c qcacmn: Add CE ring cleanup in hal
Cleanup hal srng for CE rings upon CE ring
cleanup.

Change-Id: I6d52ee1b83c23d74d88a1aca8a7eab2c5a0d186a
2021-07-30 07:12:19 -07:00
Jingxiang Ge
0f98450843 qcacmn: Replace RET_IP with rtpm_dbgid for runtime pm api
Current it use __RET_IP to get caller in rtpm resume
function, if it print info by %ps, it will do a
symbol lookup which takes time.

Change as replacing __RET_IP with rtpm_dbgid, so it is
still able to get caller information and avoid time
cost here.

Change-Id: Ifc70c118d621bb9e6d12de87582de09316ae9cad
CRs-Fixed: 3001690
2021-07-30 04:04:50 -07:00
Jinwei Chen
9008f98623 qcacmn: disable WBM2SW1 HW cookie conversion
Disable WBM2SW1 HW cookie conversion as this ring is for FW usage,
FW does not expect HW cookie conversion for ring descriptor.

Change-Id: Ic4e813a21c6bb0f89d56581941e3c7ab8e3cad54
CRs-Fixed: 2994029
2021-07-29 11:49:55 -07:00
Venkateswara Swamy Bandaru
ed74f5b410 qcacmn: EHT capability changes for D1.0
Add storage for EHT mac and phy capabilities as
per 11be D1.0 and update the EHT mac and phy capability
sizes.

Change-Id: I67224b35b701235374772e9975375e695f3ed959
CRs-Fixed: 3000166
2021-07-29 00:08:07 -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
Aditya Kodukula
6a5a2ec74a qcacmn: Remove %ps from wakeup_irq_handler
%ps does symbol table lookup in kernel and if used in irq context,
it can lead to irq_handler running for longer time, and jank issues
as a side effect. So, remove it from wakeup_irq_handler.

Change-Id: Ifa42d9a46c838c2458d3220c6d3cb008232e3839
CRs-Fixed: 2999176
2021-07-28 19:02:33 -07:00
Abdul Muqtadeer Ahmed
f284efa6f8 qcacmn: Refactor the hif_latency detection code based on the bitmap
Based on the bitmap whether the issue is because of the
HIF_DETECT_TASKLET or HIF_DETECT_CREDIT, the hif_latency detection
code needs to be refactor to different functions so that it will
help parsing tools to find the reason of crash.

Change-Id: I2d8a83493354dfbd1c484cb7727018ddeb14c158
CRs-Fixed: 2929736
2021-07-28 06:39:06 -07:00
Lincoln Tran
a4102c7377 qcacmn: Validate bonded chan ptr before dereferencing
In reg_get_5g_bonded_chan_array_for_freq, check if bonded channel
pointer is valid before dereferencing. This will help prevent potential
crash when the pointer is invalid. Also, add debug prints to allow
easier detection of issue.

Change-Id: I2891204101cd3b256ecc90d44f76c6fbb6d450b7
CRs-fixed: 2992744
2021-07-28 04:30:38 -07:00
Wu Gao
f591372ab1 qcacmn: Get secondary 80 channel freq for 6G spectral scan
When start spectral scan on 160Mhz, MCC platform failed to get center
freq2 by target_if_vdev_get_chan_freq_seg2. Since it doesn't register
related callback. Solution is using default API to get secondary 80
channel freq if vdev_get_chan_freq_seg2 is NULL.

Change-Id: I81f98700bab2f1c4bba12bd65b72092d69014a1c
CRs-Fixed: 2996322
2021-07-27 17:27:21 -07:00
Santosh Anbu
1c91398f51 qcacmn: Fix event dispatch for MLO_SYNC_WAIT
Add count to hold number of vdevs in a MLD link and fix sending
WLAN_VDEV_SM_EV_MLO_SYNC_COMPLETE in sync context to vdev SM.

Change-Id: Ie07c3e541ed5926ac08ae5a9d50e4365fefb1d52
CRs-Fixed: 2982475
2021-07-27 14:34:24 -07:00
Karthik Kantamneni
e2c4542bac qcacmn: Optimize EP request/release vote wait logic
Currently sleep based wait is used for checking EP request/release
vote is taken effect or not. But once worker thread goes to sleep
it is taking in order of milli seconds to schedule back worker thread
this scheduling delay is causing srng HP/TP writes to be updated in
delayed manner.

To avoid this first try checking EP vote is taken affect by busy wait
then go for sleep based method.

Change-Id: I72e81941a23752a41c9b5307e82c2e971aee1ec8
CRs-Fixed: 2999541
2021-07-27 09:24:29 -07:00
Vivek
f4b29f3ad5 qcacmn: Use file for include path instead of environment variable
The include path passed to the CFLAGS may get very long in few cases
and passing them to the compiler results in the error
"arguments too long" from the shell.

We can pass the same argument by writing the include paths
to a file and avoid these errors when there are many include
paths added.

Change-Id: I2788d6e97a854ae6272d665943d56d581dc002bf
CRs-Fixed: 2999763
2021-07-27 07:07:11 -07:00
Ananya Gupta
f2851b458b qcacmn: Affine rx_err srng to all CPUs except 0
IPA and rx_err ring are processed in same CPU resulting
in low Tput.
To fix this, not allow processing of rx_err ring in
CPU 0

Change-Id: Id53a03c9290607beb1a595c84bfb0fd8d9f5d105
CRs-Fixed: 2949569
2021-07-27 01:00:14 -07:00
Balaganapathy Palanisamy
96fec42073 qcacmn: Add SON ops structure definitions
Move SON Tx operations structure definition to lmac interface.
Add SON Rx operations structure.

CRs-Fixed: 2987042
Change-Id: Ice7c0dc81a60627f3d26897646b754780e498d6e
2021-07-26 16:47:47 -07:00
Vivek
bc5590deaf qcacmn: Use meta table information to print INI values
The current CFG/INI code prints the cfg values by expanding
all the current INI items in the same function causing the
function size to increase substantially.

Use the CFG/INI meta table to iterate over the INI items
and print the INI values.

Change-Id: I79ff6023263bfe98bfd614c74b1fff0f6ee78fe0
CRs-Fixed: 2994756
2021-07-26 13:54:19 -07:00
Vivek
f8167f4dbc qcacmn: Call cfg80211 functions with context aware allocation flags
There are instances in the code where the response is sent from the
driver to the supplicant indicating the allocation flags which is
used by the supplicant to allocate memory.

In those situations, we should pass the allocation flags based on
the context in which the response is sent.

Send the response with the right allocation flags to the supplicant.

Change-Id: I85f1c29fc66ba51a9f9c645692712c3a25b7fed1
CRs-Fixed: 2987552
2021-07-26 13:54:14 -07:00
Abhijit Pradhan
5ee593e754 qcacmn: Create AFC partial request information in Regulatory
The AFC server sends an AFC response after processing the AFC request.
The AFC Request has a set of request objects: Location,Request ID,
Frequency ranges, Global operating classes, Minimum desired power etc.

The Request ID is generated by FW/target and is sent to HOST
regulatory via the AFC START/RENEW WMI event. On receiving the event,
the HOST creates a partial AFC request by filling frequency ranges,
Global operating classes and minimum desired power. The partial
request is then sent to MLME and finally to AFC application.
The request is called partial because the Device Description and
Location Information are not known to regulatory and not filled in by
the regulatory. They are filled in to create the final AFC request by
the AFC application.

Change-Id: Ia0676c03cef9c7b010762326e535477beefe36ac
CRs-Fixed: 2997956
2021-07-26 11:35:35 -07:00
Kiran Kumar Lokere
900bd16b58 qcacmn: QCA vendor attribute to configure BSS max idle support
Add new QCA vendor attribute to configure the driver to enable/disable
the BSS max idle period support. This attribute is used for testing
purposes.

Change-Id: Ib63c81e34344e637b638638b1da323102c66d906
CRs-Fixed: 2994951
2021-07-26 09:14:27 -07:00
Kiran Kumar Lokere
8917a00d40 qcacmn: QCA vendor attribute to use BSSID in Probe Request frame RA
Add a QCA vendor attribute to configure the driver to use scan
request BSSID value in Probe Request frame RA(A1) for scan.
This attribute is used for testing purpose.

The driver saves this configuration and applies this setting to all
user space scan requests until the setting is cleared. If this
configuration is set, the driver uses the BSSID value from the scan
request to set the RA(A1) in the Probe Request frames during the scan,
else the broadcast address is set in the Probe Request frames RA(A1).

Change-Id: I0b26fde5f631e99f3e6d0ecf52918cd49d0153c7
CRs-Fixed: 2994935
2021-07-26 09:14:22 -07:00
Balaganapathy Palanisamy
71d4ce6cb0 qcacmn: Add support to get free descriptor pool size
Add a function in cdp to get free descriptor pool size.

CRs-Fixed: 2984773
Change-Id: Iac5aca801255e5ba5460ea09c88fc4573c1a7055
2021-07-26 06:55:34 -07:00
Kani M
7438cab313 qcacmn: Fix for the order of ol_getpn
Ideally, the validation of keys have to be done before
ol_getpn() is called to make sure the correct keys are
fetched and to avoid default key values being set.
Earlier, the key validation was done after ol_getpn()
function was called. This change reorders the ol_getpn()
to be called after the key validation.

Change-Id: I5be95b66b19228e2e9d1bca808b294a6b9b01935
2021-07-26 03:46:48 -07:00
Vevek Venkatesan
9f5cc5aae8 qcacmn: refer system time for pld_is_pci_ep_awake timeout
Currently timeout for checking pld_is_pci_ep_awake in
hif_prevent_link_low_power_states might be higher than
the defined timeout depends on how long qdf_sleep takes
to get scheduled again, so avoid this uncertain timeout
adding reference to the system time.

Change-Id: I67a28d46c996ccc56680cf8e20c09a70729a33c5
CRs-Fixed: 2994746
2021-07-26 01:39: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
wadesong
abdd65099c qcacmn: Limit log verboseness of some chan change code
The log output will be too verbose when the following scenario
is hit:

 1) hostapd is started on chan 149 with cc=US
 2) ref-sta connects to sap
 3) ping -i 0.01 to ref-sta from dut
 4) set cc=JP on dut

and the verbose log output will result in a wlan scheduler
watchdog bite on some platforms.

Use rate limited versions of log outputting api to avoid the
instabilities brought by this.

Change-Id: Id87d81070334aab145bae6909857fd5d2851008a
CRs-Fixed: 2868738
2021-07-23 22:36:29 -07:00
Nandha Kishore Easwaran
b82dd5554f qcacmn: Add 4.9 ghz frequency for scan command
Add 4.9 ghz frequency check also in scan command. This change
is needed so that scan entry is formed and association happens in 4.9ghz.

Change-Id: I2fbf719ea6a5e747e07a5973a2da3d2ca2d11b7b
2021-07-23 20:17:29 -07:00
Linux Build Service Account
45988d32cc Merge "qcacmn: Provide free_buff to SON using WDI event" 2021-07-23 05:10:23 -07:00
Linux Build Service Account
cec19bb17c Merge "qcacmn: Add API to set mlo context at umac global object" 2021-07-23 05:10:22 -07:00
Linux Build Service Account
c8b371848e Merge "qcacmn: Fix assert for flush rx ptk when vdev deleted" 2021-07-23 05:10:22 -07:00
Neha Bisht
5e326b7934 qcacmn: Provide free_buff to SON using WDI event
Provide free_buff to SON using WDI event. It is applicable only for
pre-lithium case.

Change-Id: I14fa956b06cf2d27982964865bc235f8d796d55c
2021-07-23 01:55:35 -07:00
Santosh Anbu
34be27c9fb qcacmn: Add API to set mlo context at umac global object
Replace global mlo manager context variable with the mlo_mgr context
already defined at global umac object.
Add API to set mlo context at umac global object.

Change-Id: Iad8d534b761aa93e124a721d3d6e01a81ef69b15
2021-07-22 23:38:34 -07:00
Jianmin Zhu
8008ac5bac qcacmn: Fix assert for flush rx ptk when vdev deleted
When vdev deleted and interface down, there are pending pkts in nbuf
queue of dp rx thread in cornel cases, when flush cmd comes, even vdev
is not found by vdev id, rx stack callback isn't set to NULL, pkts are
still delivered to kernel stack, but rx queue is invalid now, assert
will happen when GRO flush happens.
Fix by setting rx stack callback as NULL when vdev isn't found by vdev
id.

Change-Id: Iad3b71dbc86563a4f8b5369474b2a901cdf8b325
CRs-Fixed: 2995694
2021-07-22 23:38:30 -07:00
Karthik Kantamneni
7bf43ce817 qcacmn: Wait till EP vote is released after reg work completion
After reg work is complete there is possiblity EP vote reset
request still not processed by F.W. So wait till EP vote reset
is done after reg work completion.

Change-Id: I1f4e318ac96ba3a15c613c5faf5095d4be7c8e99
CRs-Fixed: 2994233
2021-07-22 12:53:20 -07:00