Graphe des révisions

13521 Révisions

Auteur SHA1 Message Date
Sai Rupesh Chevuru
8efe41f904 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 kernel indicating the allocation flags which is
used by the kernel 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 kernel.

Change-Id: I39ade12bd3603acf622a9ca49b4d1d0b79da4585
CRs-Fixed: 3037225
2021-09-17 13:48:14 -07:00
Surabhi Vishnoi
b69d6e0499 qcacmn: Fix possible OOB write in extract_time_sync_ftm_offset_event_tlv
In extract_time_sync_ftm_offset_event_tlv there is a possible
OOB write when value of num_qtime received from firmware is
greater than FTM_TIME_SYNC_QTIME_PAIR_MAX.

Fix is to add a sanity check for value of num_qtime received from
firmware to avoid the OOB write.

Change-Id: I6e57b1d716992d1a3c7d2f7ea911fefcbfbeff34
CRs-Fixed: 3033509
2021-09-17 13:48:07 -07:00
Harsh Kumar Bijlani
6f20be8754 qcacmn: Add string for RXDMA Monitor Destination Ring
Ring name for RXDMA Monitor Desination Ring is missing which
results in printing Invalid Ring in backpressure prints output.

Add string name for same.

Change-Id: I02848d296bd08aa2ac9dda767e0db1475012a162
2021-09-17 08:45:32 -07:00
Amit Mehta
86c4751159 qcacmn: WMI CE buffer size update to 3520 Bytes
Update WMI CE buffer size to 3520 Bytes to support
large frame size on QCA6490 and WCN7850.

Change-Id: I1f3326f40bf18dda6010def57ea7f2e0961bc725
CRs-Fixed: 3036932
2021-09-17 08:45:26 -07:00
Vivek
0d98962c76 qcacmn: Validate assoc request/response IE
Validate assoc request and response IE pointer
and length before sending the connect response
to the cfg80211 layer, else if there is a mismatch
between assoc request and response IE and length,
it would result in a panic.

CRs-Fixed: 3029994
Change-Id: I6bb285719c9749cb8c42306a95c392a01555d67f
2021-09-17 05:54:12 -07:00
Shiva Krishna Pittala
01c079b17b qcacmn: Add handlers for FW consumed and Host dropped MGMT frames
Consider the management frames that are consumed/dropped in the FW and also
the frames that are received at the Host but dropped in lower layers.
The host has the MGMT Rx REO parameters about these frames via WMI events.

There could be frames waiting in the MGMT Rx REO list for the above-said
frames. If we update the waiting frames with the MGMT Rx REO parameters of
the above-said frames, the waiting frames could be released and sent for
processing. Add the logic for the same.

Change-Id: I6be4577d30c4aefe2e964aefbb56472749a90cb4
CRs-Fixed: 2987941
2021-09-17 05:54:06 -07:00
Shiva Krishna Pittala
5d74978e0d qcacmn: Hook MGMT Rx REO algorithm in MGMT Rx path
When a management Rx frame enters the MGMT TxRx component, route it to the
MGMT Rx REO module where the REO algorithm decides whether the frame needs
to be processed right away or need to wait for frames on other links.

Change-Id: Ib7ca911dfaeee131fd71d9a4345f5bc720326228
CRs-Fixed: 2987784
2021-09-17 05:54:01 -07:00
Yu Tian
9fa8dd3bc3 qcacmn: Correct pkt length check for scatter frame rx
When a scattered frame is received, msdu length caclulation
is incorrect, this leads to while loop can't break. At last
skb, null pointer dereference happned. Change is aimed to
correct the length caclulation.

Change-Id: Ifb316f004ea5829b1130ce4c0fc9253134e26713
CRs-Fixed: 3025973
2021-09-17 03:40:58 -07:00
sheenam monga
a554290f06 qcacmn: Fetch fw cap to support p2p + p2p concurrency
Fetch fw capability to support p2p+p2p concurrency and
store cap info in 29th bit of soc_fw_ext_caps.

Change-Id: Id8e4c0310f8db503a2997e8aed5a6f1ce813dcc7
CRs-Fixed: 3032068
2021-09-16 22:58:23 -07:00
Linux Build Service Account
e65d0f5ed1 Merge "qcacmn: Disable monitor peer attach when feature is disabled" 2021-09-16 12:10:28 -07:00
Linux Build Service Account
135054f254 Merge "qcacmn: Add bss membership selector defines to wlan_cmn_ieee80211.h" 2021-09-16 12:10:27 -07:00
Rakesh Pillai
157f4c7c51 qcacmn: Disable monitor peer attach when feature is disabled
Currently there is an attempt to allocate monitor
peer even when the feature is disabled, thereby leading
to an attempt to allocate 0 bytes. the failure in this
allocation propagates back and prints an error message
which can be misleading.

Disable monitor peer attach when the below feature is disabled.
- WLAN_TX_PKT_CAPTURE_ENH
- FEATURE_PERPKT_INFO

Change-Id: Ifc6ba1421da0f569971fafa530bbcd3dbaa16b87
CRs-Fixed: 3036720
2021-09-16 08:28:39 -07:00
Will Huang
99e7db2551 qcacmn: Add bss membership selector defines to wlan_cmn_ieee80211.h
These defines are used by Supported Rates or Extended Supported Rates
IE to set additional information beside rate.

Change-Id: I44eac41a9a07d368a6fe3abc76e341915b3249b9
CRs-Fixed: 3034939
2021-09-16 08:28:34 -07:00
Pragaspathi Thilagaraj
b001e0e130 qcacmn: Add support to send connectivity logs from logging thread
Add support to send connectivity logs from g_wlan_logging thread.
Add new HOST_LOG_DRIVER_CONNECTIVITY_MSG event flag which wakes up
the gwlan_logging thread when set.
Also register connection manager callbacks to send the logging event.

Check if logging queue is empty whenever the gwlan_logging thread
is woken up and send the logs to userspace if the count doesn't
exceed the allowed threshold.

Change-Id: I3fdb8358f9048a277e2f03894c0e6a17376b0da0
CRs-Fixed: 3029279
2021-09-16 08:28:29 -07:00
Nandha Kishore Easwaran
9790643449 qcacmn: Fix compilation issue in Big endian mode
Fix compilation issue in Big endian mode.

Change-Id: I052e6437eb226ba60f2ca11ad99246164aec727c
2021-09-16 05:09:48 -07:00
Chaithanya Garrepalli
4fa2c22c80 qcacmn: Add ini param for reo dest ring
Add ini param for reo destination ring size and
cleanup usage of emulation macro

Change-Id: I6e8e0c2d8f57469289eccd3c12c07f3bf6b47c04
2021-09-16 05:09:44 -07:00
Hariharan Basuthkar
b98c3e9250 qcacmn: Disable intersected AFC channels while switching to LPI
When SWITCH_TO_LPI event subtype or WMI_AFC_EVENT_ID is received,
disable the intersected channels in the AFC channel list.

Change-Id: Iee79b26953299d332c6f8925c8f21651fbd1f00c
CRs-Fixed: 3034456
2021-09-16 05:09:39 -07:00
Edayilliam Jayadev
6691cd953a qcacmn: Fix copyright
Fix modified year in the copyright banner.

CRs-Fixed: 3036102
Change-Id: I97c39555e7e24ed8b12687983d19f418234bd614
2021-09-16 02:47:51 -07:00
Ke Huang
1b18916173 qcacmn: Add IPA WDI2 CONS/PROD definition for the IPA support
Add IPA WDI2 CONS/PROD definition for the IPA support on
sa415m for Genoa.

Change-Id: Ic140bb1b43afc5029ba006a38534dd64ca13f6f2
CRs-Fixed: 3025213
2021-09-16 02:47:46 -07:00
Arun Kumar Khandavalli
114c654e69 qcacmn: Use the right wmi macro to set the htt peer data version
Currently WMI_TARGET_CAP_FLAGS_RX_PEER_METADATA_VERSION_SET is used
to the htt peer data version, this looks like is for the firmware
and host should use WMI_RSRC_CFG_FLAGS2_RX_PEER_METADATA_VERSION_SET
macro to send back this infromation back to the firmware.

Correct the macro to se the htt peer data version to the firmware.

Change-Id: I06cb86eaa05eda45fb524c77acce3248c90498d6
CRs-Fixed: 3032308
2021-09-15 23:46:33 -07:00
Chaithanya Garrepalli
acbec267ec qcacmn: disable addr_x and addr_y flags for STA mode
For STA mode when index based search is used ADDR_X
flag need to be disabled. This is needed to generate
HW mec notify events to FW

Change-Id: Ib074c474f6e06accf09adeb53b3a1f85e30d4076
2021-09-15 13:02:05 -07:00
Himanshu Batra
60d195db92 qcacmn: Reset chan info for ML partner link connect req
Reset chan info for ML partner link connect req

Change-Id: Ib6c456bde8b5e023ae13dd34bf2f3d8d48cc365f
2021-09-15 08:40:33 -07:00
Abhishek Singh
3d7143dc0e qcacmn: Add debug log in case BSS is filtered out due to freq list
Add debug log in case BSS freq is not matching the freq list
provided in scan filter.

Change-Id: I00da614f4a5b4fdf58122cf2750afe5c03114536
CRs-Fixed: 3035787
2021-09-15 06:13:11 -07:00
Srinivas Girigowda
85358bdd12 qcacmn: Fix compilation error in send_oem_dma_cfg_cmd_tlv()
Fix compilation error due to incorrect paranthesis
positioning.

Change-Id: I4e2885054f724970e5baef6c7a4ed73a77decc4f
CRs-Fixed: 3034802
2021-09-15 03:02:56 -07:00
Chaithanya Garrepalli
95e96be744 qcacmn: Add hal_soc NULL check before call arch soc init
Call dp_soc_init_be only when hal_soc is initialized

Change-Id: I75b94f23074862fb3e711daee951498c86586461
2021-09-15 00:49:22 -07:00
Yu Wang
77620f4630 qcacmn: add HW_MODE_POLICY_OFFLOAD wmi service support
The flag WMI_SERVICE_HW_MODE_POLICY_OFFLOAD_SUPPORT indicates
whether HW mode selection offload is supported by firmware or
not.
If it's advertised in service capability, host should not set
HW mode explicitly, firmware takes control of managing HW mode.

Change-Id: I8939b44fd7ed3a674c4da91524c5d5622bf67ce7
CRs-Fixed: 3017054
2021-09-14 21:58:17 -07:00
Yu Ouyang
753767dd8a qcacmn: Make enum qca_wlan_vendor_attr_ll_stats_results match upstream
Make the enum qca_wlan_vendor_attr_ll_stats_results definition
match upstream

Change-Id: Id556c9a0fc3a61fdf660a8c20693c5bab276b86f
CRs-Fixed: 3033158
2021-09-14 10:39:51 -07:00
Yu Ouyang
136eb1bb75 qcacmn: Add time slice duty cycle attribute into QCA vendor command
Add a new attribute into qca_wlan_vendor_attr_ll_stats_results to
support getting interface time slicing duty cycle info.

Change-Id: If6a34cd298c1cb41e0e29a24f2336eed76b98329
CRs-Fixed: 3020795
2021-09-14 10:39:46 -07:00
Vivek
307546f6f9 qcacmn: Add dependent macros for dp_rx_update_protocol_tag
The function dp_rx_update_protocol_tag is called from
dp_rx_mon_update_protocol_flow_tag which is enabled when either
WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG or WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG
is enabled.

However the prototype and definition is enabled only when
WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG is enabled.

So adding the dependent macro to the prototype and definition
of dp_rx_update_protocol_tag

Change-Id: Ic1120b77d527dc8ceeb981bb6516816e4658bdcb
CRs-Fixed: 3022319
2021-09-14 02:33:30 -07:00
Ashish Kumar Dhanotiya
5c22ca493e qcacmn: Do not update dfs parameters for 6GHz frequencies
6GHz do not have any dfs channels so do not update dfs related
parameters for 6GHz frequencies

Change-Id: I791622ce4b401bca65f132665eb2a1ebd7c9e931
CRs-Fixed: 3020653
2021-09-14 00:19:43 -07:00
Nirav Shah
d5221697cb qcacmn: Update TWT attribute to send TSF value in TWT setup command
Update QCA_WLAN_VENDOR_ATTR_TWT_SETUP_WAKE_TIME_TSF
TWT attribute to use it in TWT setup command to pass TSF value.

Change-Id: I410d72ff7771a3899ceb2487a8eb9dd7ad77299c
CRs-Fixed: 3029024
2021-09-13 22:08:39 -07:00
Nirav Shah
7db239f9b5 qcacmn: Add TWT attribute to send Responder PM Mode value to user-space
Add QCA_WLAN_VENDOR_ATTR_TWT_SETUP_RESPONDER_PM_MODE
TWT attribute to send Responder PM Mode value to user-space.

Change-Id: Ic55abcac70109c3a13e74daca2f319456d0b7bb1
CRs-Fixed: 3029021
2021-09-13 22:08:33 -07:00
Yeshwanth Sriram Guntuka
ccb6664db1 qcacmn: Dump flow pool stats as part of periodic stats display
Dump flow pool stats even for low verbosity level as
part of periodic stats display.

Change-Id: Iea59d20b0a81cfd0bfdac65ad54a11fa33f30f2f
CRs-Fixed: 3031168
2021-09-13 13:04:58 -07:00
Shiva Krishna Pittala
719e90b6dc qcacmn: Add API to update MGMT Rx REO Host snapshot
MGMT Rx REO algorithm maintains a host snapshot which contains MGMT Rx
REO parameters of the latest frame received by the Host.
Add an API to update the same using the parameters sent by the FW.

CRs-Fixed: 3029489
Change-Id: I7ea574507de4e96407207bcb57319680ae78f7c9
2021-09-13 06:20:19 -07:00
Edayilliam Jayadev
c85bc308e4 qcacmn: Add APIs to handle the reorder list
Add APIs to create/update/destroy reorder list.

CRs-Fixed: 3017570
Change-Id: I74528a7f13db8f48c0fc5c5516ea754caf4b686a
2021-09-13 06:20:13 -07:00
Edayilliam Jayadev
698478886e qcacmn: Add API to get first node of a list
Add QDF API to get the first node of a linked list. If the
list is empty this API returns NULL.

Change-Id: I4569941f708634085904fd30a347facca543594a
CRs-Fixed: 3029987
2021-09-13 06:20:08 -07:00
Edayilliam Jayadev
76ba042a40 qcacmn: Add API to iterate list from a given node
Add QDF API to iterate linked list starting from
a specific node.

Change-Id: I1bf7137213eefa434c983a8d10aa8e1398fa586e
CRs-Fixed: 3029986
2021-09-13 06:20:03 -07:00
abhinav kumar
ce3c421e62 qcacmn: Handle new BTC roam trigger reason
Handle new BTC roam trigger reason in roam scan stats
kmsg prints.

Change-Id: I8a8f85c7215813626dc27a00b3fbabf7388529f6
CRs-Fixed: 3033384
2021-09-13 04:08:28 -07:00
Shiva Krishna Pittala
7c49199b38 qcacmn: Fix uninitialized variable in target_if_process_sfft_report_gen3
Uninitialized detector ID is passed to the get_spectral_mode API. Fix it.

CRs-Fixed: 3033507
Change-Id: Ifa621791c19adef2de41cb53ef8581aabff7725f
2021-09-13 01:02:25 -07:00
Shiva Krishna Pittala
5bae4f1b26 qcacmn: Add algorithm to compute wait count for an incoming mgmt frame
This is part of the MGMT Rx re-order algorithm for MLO (FR 69196).
Consider an MLD formed by multiple discrete MLO-capable chipsets.
Management frames received on individual links will be forwarded or
consumed by the firmware running on that chip. Each link could have
a variable delay in FW->Host messaging. Host can receive these management
frames in an order different from that in which the frames were received
over the air. This problem could be there in single-chip MLD cases also
due to race between FW threads that are handling management frames.
This FR solves this problem by introducing an REO queue in the MGMT Rx path
which reorders the frames and delivers them to upper layers in the order
in which they were received over the air.

Each incoming frame carries an MGMT packet number which is local to that
link, and a timestamp that is global across all the links. MAC HW and FW
capture the same details of the last frame that they have seen. Host also
maintains the details of the last frame it has seen.
Using all this information, calculate the number of frames an incoming
frame should wait for on all other links before it gets delivered.

Change-Id: Icdf5b9b55b2a360bac2d9ea676671702eade3282
CRs-Fixed: 3028766
2021-09-12 21:58:12 -07:00
Shiva Krishna Pittala
ff4f258129 qcacmn: Add circular arithmetic operations for MGMT Rx REO data
HW uses only 16-bits to represent MGMT packet counter and 32-bits to
represent global timestamp. Overflow is bound to happen with such sizes.
So, Host can't directly use regular comparison and subtract operators on
the REO data sent by the HW. Add support for operations that take
overflow into consideration.

CRs-Fixed: 3028771
Change-Id: I1c280409b023e0783bf05fe68351e071801f59bc
2021-09-12 21:58:07 -07:00
Huashan Qu
77f09f7272 qcacmn: Define rp_rssithresh for QCN7605 chip to different value
In dfs test mode, bandwidth detection test on dfs channel fails
with QCN7605 chip, reason is some pulses will be discarded due to
low rssi reported on some frequency channel, it's different halphy
design for QCN7605 chip, so need to define rp_rssithresh for QCN7605
chip to different value.

Fix is define rp_rssithresh for QCN7605 chip to different value for
FCC/ETSI/JP W56 table which are used for dfs certification.

Change-Id: I9132cf82e6d8d97f83ebb4cd8586f8d8ff48066e
CRs-Fixed: 2986947
2021-09-10 22:29:00 -07:00
Lincoln Tran
50e7e5c6ae qcacmn: Copy assoc IE for MLO link connect
When associating the partner link in an MLO connecting, reuse the
association IEs from the original connection. To do this, store the
connection manager connection request to query later, since this
holds the assoc IE data.

Change-Id: I100351a4c9cd439222af202ca3e80ef50554e1e3
CRs-fixed: 3016095
2021-09-10 20:09:48 -07:00
aloksing
2f1aa9829a qcacmn: Fix continuous print on console
"Invalid peer id" prints are flooding the AP console
Adding log level as fatal to avoid these prints.

Change-Id: I773476542018389035996e45ea2f7c4cf296e9fd
2021-09-08 17:09:08 -07:00
Vijay Krishnan
4637290552 qcacmn: Remove 6G domain check on Maschan list
If a country does not support 6G, then the 6G channel list is not
appended to the master channel list. Due to this, 6G center frequency
in the master channel list is zero. This leads to the problem in the
intersection of channels and chip range in the 5G Radio.

When the target sends the WMI_REG_CHAN_LIST_CC_EXT_EVENT, do not set
the is_6g_channel_list_populated flag based on the presence of a 6G
subdomain code. The flag should be set to true whenever the event is
received.

Change-Id: Ice714c961512fc1d86f8553b9870ab7385bbe9d5
CRs-Fixed: 3007334
2021-09-08 14:55:38 -07:00
Harsh Kumar Bijlani
a7e391e49f qcacmn: Remove WDI event WDI_EVENT_UPDATE_DP_STATS from per pkt path
WDI event WDI_EVENT_UPDATE_DP_STATS is triggered for updation of peer
stats from both per packet and monitor path wherein per packet path is
applicable for MCC and monitor path is applicable for WIN.

Trigger for this event is flag protected under the macros
FEATURE_PERPKT_INFO and WDI_EVENT_ENABLE.

FEATURE_PERPKT_INFO is not defined for MCC.
With this, WDI event in per packet path is not triggered and hence unused.
Make changes to remove the unused code.

Change-Id: Ibcb0948b0ecae313270b6a173e243b2f27f1bbee
2021-09-08 14:55:32 -07:00
Hariharan Basuthkar
9a9f5974af qcacmn: Break from the loop when EIRP power is filled
In reg_search_afc_power_info_for_freq, break from the loop when EIRP
power is filled.

Change-Id: Id559f4a92fe7945370e6a334b4dc1e7c1d9d7adf
CRs-Fixed: 3031979
2021-09-08 14:55:28 -07:00
Debasis Das
800b5ae375 qcacmn: Fix wrong memory access in spectral phyerr processing
In target_if_process_phyerr_gen2(), initialize variables
to prevent usage of junk values.
In target_if_process_sfft_report_gen3(), add check to
ensure the index doesn't exceed the size of the array.

Change-Id: Ie738d1fc836e1a2ec1358b635a4b6c64a424b894
2021-09-08 06:54:55 -07:00
Vignesh Mohan
6d3d7d5f11 qcacmn: Enable 149 to 177 HT160 channels in random channel selection
During random channel selection after radar, channels 149 to 177 are
not considered as a potential random HT160 channel after the
introduction of the 5.9G channels. This is because, the last 80MHz
band (165, 169, 173, 177) are not added to the list of 80MHz band
list that is used to find the next random channel.

Update the 80MHz band list with 165-177 and update the band count.

Change-Id: Id881adaa07dab07400435d559940f4bdf837eb75
2021-09-08 03:08:47 -07:00
Nandha Kishore Easwaran
a6cd1789eb qcacmn: Add Big endian version of rx_tlv structure
Add big endian version of rxtlv structure. THis is needed since
the structure members are directly accessed by name and hence reverse
order of bitfields have to be defined in case of Big endian mode.

Change-Id: I50ce4bdd482a336ee8d2f394ed2de1a7ddf0be57
2021-09-08 00:19:39 -07:00