Commit Graph

18356 Commits

Author SHA1 Message Date
Rakesh Pillai
dd01164e30 qcacmn: Remove assert on MLD peer hash table add
Remove the assert during MLD peer hash table add,
even if its already present.

Change-Id: I20ca3cdff22ca246e192cc6154d0c68f1c27d9bf
CRs-Fixed: 3385739
2023-01-21 22:30:09 -08:00
Abishek Ganapathy
d4189d413a qcacmn: Skip MLD peer hash check for QWRAP repeater
Since MLD peer hash is the same for MPSTA and PSTA in QWRAP repeater,
skip this check for all WIN platforms.

Change-Id: I30fe7d8a6d1d24af841bcd21015e93f7bec6b2c8
CRs-Fixed: 3382276
2023-01-21 04:46:47 -08:00
Vivek
b7fe763018 qcacmn: Check for enqueue timestamp for Tx delay calculation
The Tx delay computed is very large if the enqueue
timestamp is zero.
Compute Tx delay only when the enqueue timestamp is valid.

Change-Id: Ic4032a6f4a01fc661dc1155a4543cd7fc4216970
CRs-Fixed: 3354639
2023-01-21 02:56:05 -08:00
Jinwei Chen
95eec89597 qcacmn: fix incorrect length setting for jumbo RX monitor MPDU
Currently for jumbo RX monitor MPDU, it will spread across multiple
RX buffers(N). host set length 112 bytes for (N-1) skbs(not include
the last skb), while the expected length should be (2048 - 400
- 112) = 1536 bytes for them, this lead to last skb length
calculation incorrectly, which will be total MPDU length -
112 * (N - 1), this will be over boundary of skb buffer room
easily.

Set length 1536 bytes for (N-1) skbs to fix it.

Change-Id: I4e73673887d5d8197cf64bed5da34a3751df1e33
CRs-Fixed: 3381528
2023-01-20 22:12:12 -08:00
Amit Mehta
1db627cc73 qcacmn: Distinguish EAPOL-Key msg 4/4 from 2/4 based on Key Nonce
IEEE 802.11be adds the MAC Address KDE into the EAPOL-Key msg 4/4 when
MLO is used and as such, the previously used check for Key Data Length
value 0 is not sufficient for recognizing the EAPOL-Key msg 4/4 anymore.
Also check for an all zero Key Nonce value since that field is supposed
to be zero in EAPOL-Key msg 4/4 and it has to be a random value in
EAPOL-Key msg 2/4.

Change-Id: Iafb2f0e59a3fd52fa47317f8f3daff3f115271d1
CRs-Fixed: 3380806
2023-01-20 22:11:56 -08:00
Jeff Johnson
7cbbd39379 qcacmn: Fix hif/src documentation
The kernel-doc script identified a large number of kernel-doc issues
in the hif/src folder, so fix them.

Change-Id: Ia944c6c9f1bcb6a8f5f0ff07ca0afa7bf3a40ad0
CRs-Fixed: 3375493
2023-01-20 19:09:30 -08:00
Asutosh Mohapatra
db349c2678 qcacmn: Don't use LPI as default power type
Currently host uses LPI as default power type when STA and
AP country is same without checking if powertype advertised
by AP is valid for client or not.

To address this issue default to power type advertised by AP.

Change-Id: I59144b020bed5af49dea8fdaad0e59daa556fefe
CRs-Fixed: 3381295
2023-01-20 19:09:17 -08:00
Santosh Anbu
cec48e1067 qcacmn: Print psoc id along with vdev id
As part of VDEV SM history only vdev id is logged.
In multi psoc scenario it's difficult to differentiate vdevs across
psoc as vdevs share same id across psoc.

Hence add change to log psoc id along with vdev id.
CM-PS_0-VD_1: Connection SM PSOC:1 VDEV:2

Change-Id: I83f6b69e1ea308032ad8a58e4c81b74b76a277d3
CRs-Fixed: 3364875
2023-01-20 19:09:03 -08:00
Santosh Anbu
9bc8b332c4 qcacmn: Print psoc id along with vdev id
As part of VDEV SM history only vdev id is logged.
In multi psoc scenario it's difficult to differentiate vdevs across
psoc as vdevs share same id across psoc.

Hence add change to log psoc id along with vdev id.
VM-PS_0-VD_1: VDEV SM PSOC:0 VDEV:1

Change-Id: I0bba894a79b3ad9e7ce64ec5219eb7c65767f19b
CRs-Fixed: 3364875
2023-01-20 19:08:49 -08:00
Jeff Johnson
4a8d2ccc87 qcacmn: Fix hif/inc documentation
The kernel-doc script identified a large number of kernel-doc issues
in the hif/inc folder, so fix them.

Change-Id: Idb9a748c71ab71122b74ac9d2665ead474c649ff
CRs-Fixed: 3375492
2023-01-20 13:25:53 -08:00
Nandha Kishore Easwaran
9898b18b1c qcacmn: Add DBR service for 5332
Add DBR service into pipe config for 5332 target

Change-Id: I0a0182a31458adf1ba4b6e848c7c201bc1582bfa
CRs-Fixed: 3379310
2023-01-20 09:07:13 -08:00
Jeff Johnson
39b8d28508 qcacmn: Make dp_print_mlo_ast_stats() static
The function dp_print_mlo_ast_stats() is currently a public function.
However this function is only called from within the file where it is
defined, so make it static.

Change-Id: Id83c7b3110c60ca6e3dc3263aaf87d21e9365a31
CRs-Fixed: 3374039
2023-01-20 07:09:11 -08:00
Jeff Johnson
fc960c0f9f qcacmn: Remove orphan DP IPA prototypes
The original DP IPA implementation included some function prototypes
for which there were no associated function implementations. Since
these are pointless, remove these orphan prototypes:
dp_ipa_uc_set_active()
dp_ipa_remove_header()
dp_ipa_add_header_info()
dp_ipa_register_interface()

Change-Id: Ic085d456b860dc921b0e576f33702dd11550febb
CRs-Fixed: 3372067
2023-01-20 07:08:54 -08:00
Jeff Johnson
87286d59a8 qcacmn: Make dp_mlo_ctxt_{at,de}tach_wifi3() static
The following functions are currently public exported functions:
dp_mlo_ctxt_attach_wifi3()
dp_mlo_ctxt_detach_wifi3()

However these functions are only accessed from within the file where
they are defined, and they are only supposed to be called via the
cdp_mlo_ops, so make them static.

Change-Id: I8db6b7be9b91972c2183d2f699ed5fb64ec60713
CRs-Fixed: 3371955
2023-01-20 07:08:34 -08:00
Prakash Manjunathappa
3167a36a06 qcacmn: Fix rx_mpdu_received and error stats reporting to CNE
Current rx_mpdu_received and rx_mpdu_error stats reporting is incorrect.
rx_mpdu_received would be rx_mpdu_delivered + rx_mpdu_errors.
Also get combined rxdma_errors(rx_mpdu_errors) handled across host and FW.

Change-Id: Icbfeaffd7cd27d7f894df2d39add9cc7b47714be
CRs-Fixed: 3333010
2023-01-20 05:18:54 -08:00
Venkateswara Naralasetty
06e90b5374 qcacmn: Add default register values for WCN6450
Add default register values required for WCN6450.

Change-Id: I47880e95cb101ad145d4e750e8811a0153b19482
CRs-Fixed: 3381090
2023-01-20 01:35:27 -08:00
Mohammed Ahmed
cef49bdf89 qcacmn: add SSR host log collection API usage
Current code does not use the SSR host log collection API.
Fix this by adding SSR host log collection API usage.

Change-Id: I9dfb0bd7054986760a711d0752f37f4327c706b2
CRs-Fixed: 3339933
2023-01-19 20:44:09 -08:00
Mohammed Ahmed
07edd1636f qcacmn: change wmi_event type from uint32 to WMI_EVT_ID
Current code defines wmi_event members of wmi_handle and soc as uint32
when it should be defined as WMI_EVT_ID because it should only hold
wmi events.
Fix this by changing type to WMI_EVT_ID.

Change-Id: Ifa8ab19ac7633457e1160e951026036aa9ebdb04
CRs-Fixed: 3355825
2023-01-19 18:41:22 -08:00
Mohammed Ahmed
e1de611cdd qcacmn: add SSR host log collection API
Current code does not have functionality to collect host driver logs
upon SSR.
Fix this by adding host log collection API for SSR case.

Change-Id: I2bb848e59ad87da52446fcb8d18367c1b0768cf9
CRs-Fixed: 3339916
2023-01-19 18:41:07 -08:00
Asutosh Mohapatra
f1a5f8d3ab qcacmn: Enhance QCA vendor interface with new hang reason codes
Add more hang reason codes for the hang reason in the
qca_wlan_vendor_hang_reason enum.

Change-Id: Ia7f21c45d58c980219690cda390127f5d4004391
CRs-Fixed: 3380849
2023-01-19 16:42:34 -08:00
Rahul Gusain
01dc2e1bdd qcacmn: Add new host version req enum
Due to 11KV feature version update, add new enum
"WMI_HOST_VENDOR1_REQ1_VERSION_3_40" in WMI_HOST_VENDOR1_REQ1_VERSION
and convert the host enum to target.

Change-Id: Ibcd52b93b9caf3a8bbfc7fa9028664a2d3666197
CRs-Fixed: 3381254
2023-01-19 12:28:44 -08:00
Rahul Gusain
cb88ed3ace qcacmn: Notify first connect failure response
Currently, host driver notifies the last connect failure to upper
layers. But some customer needs the first connect failure response.
So, in this change, cache the first connect failure response in connect
request structure and it retrieves it when all candidates are failed
to connect and notify it to upper layer.

Change-Id: I850c20cdfeb0c8423d074094f97c83599e43b409
CRs-Fixed: 3378788
2023-01-19 12:28:26 -08:00
Nandha Kishore Easwaran
c7de5d4ddc qcacmn: Initialize ppe related function pointer to null
Initialize ppe related function pointers to null for 5332 and add a
check before calling the function pointer.

Change-Id: Idcaecfa839ff6822ab385053405256c201579bda
CRs-Fixed: 3378893
2023-01-19 12:28:08 -08:00
Jeff Johnson
5b69a94a15 qcacmn: Make dp_tx_tso_cmn_desc_pool_*() functions static
The following functions are currently public functions:
dp_tx_tso_cmn_desc_pool_alloc()
dp_tx_tso_cmn_desc_pool_init()
dp_tx_tso_cmn_desc_pool_deinit()
dp_tx_tso_cmn_desc_pool_free()

However these functions are only called from within the file where
they are defined, so make them static.

Change-Id: If57b36398e0cf6a33be2b85bc00d651fe5ed9a71
CRs-Fixed: 3371860
2023-01-19 09:32:22 -08:00
Jeff Johnson
357a7f62b7 qcacmn: Make dp_tx_desc_clean_up() static
The function dp_tx_desc_clean_up() is currently a public function.
However this function is only called from within the file where it is
defined, so make it static.

Change-Id: I23d55584453218776703101e9a5abaf9805efb03
CRs-Fixed: 3371794
2023-01-19 09:32:00 -08:00
Pavankumar Nandeshwar
8e622cfba5 qcacmn: Handle dp peer setup for non MLO in BE case
Handler dp peer setup for non MLO case in BE specific
handler. This API currently deals with direct switch feature.

Change-Id: I6e26687e5e7e92108dfa0da782970f758fd1965e
CRs-Fixed: 3381234
2023-01-19 09:31:41 -08:00
Rahul Gusain
e140e6779e qcacmn: Add new INI param for BSSID filter
Currently, driver only sorts the BSSID according to scoring algo.
But some customer need to prioritize the BSSID HINT and filter out
BSSID (except BSSID HINT) which have RSSI value lower than value
defined in INI parameter.
For this, add new INI parameter to configure RSSI value
and check this RSSI value for all BSSID expect BSSID HINT.

Change-Id: Ib942f32878b35cbdb20ba669808f4a5c8820ebd7
CRs-Fixed: 3378781
2023-01-19 05:04:23 -08:00
Jeff Johnson
19f27c6e4a qcacmn: Fix dp_types.h documentation
The kernel-doc script identified a large number of documentation
issues in dp/wifi3.0/dp_types.h, so fix those issues. In addition,
there are a number of instances where public functions have their
implementation documented instead of having their interface
documented, so duplicate that documentation. The documentation at the
implementation will be removed separately.

Change-Id: Ie93b7f802926e562169e51a56e5fc83de845b310
CRs-Fixed: 3373153
2023-01-19 05:04:07 -08:00
Rakesh Pillai
ada0c97d9b qcacmn: Add datapath config event history
Add history to record the config/control events
e.g. peer create/delete/unref-delete, vdev attach/detach
in datapath.

Change-Id: Ic3c8122fca9124e41931ec445946aec5e8863434
CRs-Fixed: 3371899
2023-01-19 02:55:07 -08:00
Jeff Johnson
b4466310b5 qcacmn: Fix FTM documentation
The kernel-doc script identified a few kernel-doc issues in the ftm
folder, so fix them.

Change-Id: Icf1fac11bb2f3fa39cf29f6dabebc06bcb523d60
CRs-Fixed: 3376407
2023-01-19 02:54:51 -08:00
Srinivas Dasari
539d3bfb53 qcacmn: Add APIs to set and get acs_mode in vdev mlme obj
To support fixed channel SAP in unsafe channels, driver needs
to cache and retrieve SAP start mode i.e. ACS or fixed.
Add a new param is_acs_mode to vdev_mlme_mgmt_ap and APIs to
set and get the same through vdev.

Change-Id: Ib274b95be66e774b15f4687a02ed7fef6bf21056
CRs-Fixed: 3381401
2023-01-19 00:47:38 -08:00
Jeff Johnson
f9c3074fea qcacmn: Fix iot_sim documentation
The kernel-doc script identified some kernel-doc issues in the iot_sim
folder, so fix them.

Change-Id: Ia7d68ca807ec4f0aad48ee42f75df8fa2aeca7e1
CRs-Fixed: 3378028
2023-01-18 13:49:26 -08:00
Divya R
8d986f372a qcacmn: Add dispatcher for reg_get_num_rules_of_ap_pwr_type
Add dispatcher for function reg_get_num_rules_of_ap_pwr_type
to get the number of rules supported for given power mode

Change-Id: I084cc4e47ed16a71c1a8a7db4a6f046a0007a9d7
CRs-Fixed: 3378907
2023-01-18 11:50:11 -08:00
Srinivas Dasari
8380ebaf9b qcacmn: Fetch fw support for fixed channel SAP in coex cases
Currently, firmware sends WMI_WLAN_FREQ_AVOID_EVENTID with set
of frequency ranges to be avoided when it finds LTE operating
around those frequencies. Host driver marks these frequencies
as unsafe and doesn't operate in SAP/P2P-GO mode.

There is a new requirement where SAP can be allowed to operate
in unsafe channels when below conditions are met,
1. Firmware advertises the capability fix_channel_priority in
   WMI_COEX_FIX_CHANNEL_CAPABILITIES through ext2 event.
2. SAP is started in a fixed channel.

Fetch the capability fix_channel_priority sent by firmware and
cache it in wlan_psoc_host_service_ext2_param to support
this feature. Add APIs to cache value received from firmware in
psoc_info->info.service_ext2_param.sap_coex_fixed_chan_support
and to fetch the same.

Change-Id: I8ceb501240bc86d6b004446f9927f4402c487203
CRs-Fixed: 3381399
2023-01-18 11:49:55 -08:00
Vignesh U
bcbe6a3d15 qcacmn: Use EHTOP IE to validate puncturing bitmap
When the STA finds a candidate AP to connect to, it checks if the
primary 20 MHz channel is punctured or not. This validation is currently
done using scan channel parameters. The scan channel parameters are
intersected to the STA's capability and might not reflect the original EHT
OP IE parameters. For example, consider an 11ax STA in HE160 MHz mode
trying to connect to a 11be AP operating in EHT320 MHz mode. The scan
channel parameters are intersected to the STA's capability of 160 MHz.
The scan channel parameters like 320 MHz center frequency and puncturing
bitmap are inconsistent with the CCFS1 and punturing bitmap received in
the EHT OP IE.

So, instead of using the intersected scan channel parameters stored in the
STA to validate puncturing bitmap of the AP, use the EHT OP IE received
from the AP to validate puncturing bitmap.

Change-Id: I0cdc56eea96f04eb96327506bfd61c0f3a9109bb
CRs-Fixed: 3364639
2023-01-18 09:56:05 -08:00
Jeff Johnson
183cd295b8 qcacmn: Fix umac/cfr documentation
The kernel-doc script has identified multiple documentation issues in
umac/cfr, so fix them.

Change-Id: Ie459075a92719e4708021cb965fdbab1f682df24
CRs-Fixed: 3372808
2023-01-18 09:55:49 -08:00
Nandha Kishore Easwaran
da575d47b2 qcacmn: Add function pointer to disable service class
Add a function pointer to send WMI command to FW to disable a service
class.

Change-Id: I3e5d74b44a40fcc4fdda58d45707e85a3c0a81d4
CRs-Fixed: 3374568
2023-01-18 09:55:34 -08:00
Jianmin Zhu
ae49020462 qcacmn: Enable SAP 320M puncture
For a 320M bonded channel, if one of the subchannels is disabled due to
nol or static puncture, the return status becomes disabled. To correct
the status for the valid patterns, remember if at least one channel is DFS
and set the status to either DFS or enabled.

Change-Id: I4cac0afe29e6071e551c087b9d6e413b227eb18d
CRs-Fixed: 3369915
2023-01-18 06:01:20 -08:00
Asutosh Mohapatra
7bdff08dd1 qcacmn: Add new INI to separate scan policy for rest of world users
Currently host drops an AP from scan list if host country is set to
US and AP country is non-US. This implementation violates our
standard regulatory scan policy.

To address this issue, introduce a new INI to differentiate
between our standard regulatory policy with others.

Change-Id: Id72f871653e31969c4d1b147cb3c557f90a6c8f6
CRs-Fixed: 3361720
2023-01-18 06:01:04 -08:00
Asutosh Mohapatra
e4407d89d1 qcacmn: Do not allow connection if STA VLP not supported
If country code for AP and STA are same and if STA does not
support VLP mode for a particular channel and if AP power
type is misconfigured to VLP mode, do not allow connection
to that AP as per regulatory guidelines.

Change-Id: Ie3bb980df25a15c4d9d7e566663e28950414f733
CRs-Fixed: 3362142
2023-01-17 21:06:08 -08:00
Priyadarshnee Srinivasan
8aac71d828 qcacmn: Enable channel 144 for Japan by default
Enable channel 144 for JAPAN country by default. From regdomain
version 31, JAPAN is mapped to MKK17_MKKC instead of MKK5_MKKC. As per
the regdomain definition of MKK17, channel 144 must be enabled by
default. Only for MKK5 regdomain, channel 144 must be enabled based on
user config "setch144".

CRs-Fixed: 3375932
Change-Id: I48411f7f77ebbb9944dcf4988bb9ac22587e2074
2023-01-17 21:05:54 -08:00
Roopavathi Lingampalli
04a62bd736 qcacmn: Add Component APIs for required ucfg APIs
Implement component APIs for existing vdev_mgr
to get bssid in DP component module.

Change-Id: If70832308028ad1965f4960bc2ba9664b7c09452
CRs-Fixed: 3351504
2023-01-17 21:05:23 -08:00
Pooja T C
324b10dec5 qcacmn: Changed debug traces severity level
Changed scm_err_rl to scm_debug_rl to stop the prints from flooding.

Change-Id: Ida541ac96bf656fc68d0a6fd7cca302d2071585b
CRs-Fixed: 3347726
2023-01-17 21:05:09 -08:00
jinbaoliu
784a94ace9 qcacmn: Code optimization: extract common code snippet to a function
This change extracts several common code snippet and put
them into a new function. This can keep the code clean.

Change-Id: Ib13f06903db2efbf0e447436fb5abb1386cdd41d
CRs-Fixed: 3370243
2023-01-17 14:50:01 -08:00
Jeff Johnson
c9a90472ef qcacmn: Fix spectral documentation
The kernel-doc script identified a number of kernel-doc issues in the
spectral folder, so fix them.

Change-Id: Ibe12245209afd57b73996fbea2901443d0d9363c
CRs-Fixed: 3376641
2023-01-17 14:49:38 -08:00
Himanshu Batra
36108b2504 qcacmn: Remove scan entry search from link add API
During link add, since the vdev would be down, it won't have scan
entries.
Hence, remove scan entry search from link add API

Change-Id: Ifd45b546124739e6c31b2a3691cdb90a3f624ecf
CRs-Fixed: 3377283
2023-01-17 07:34:48 -08:00
Jinwei Chen
ea4f290e7d qcacmn: support RX MCS12-13 rates in FW RX pdev stats
support RX MCS12-13 rates in FW RX pdev stats

Change-Id: Idfe41884a9034eb30f792110ba747eb06cd0261d
CRs-Fixed: 3380204
2023-01-17 07:34:32 -08:00
David Oladunjoye
bee501dcb7 qcacmn: Return error when unpermitted character is parsed in ini
Currently, when an unpermitted character is added to ini, driver
flags as an unknown config item and continues parsing. This could
be an issue. Change is to return error when invalid character is
parsed in ini.

Change-Id: I0249d187f0e05a31dd256d5de56798a575903e5b
CRs-Fixed: 3354669
2023-01-17 05:30:11 -08:00
Asutosh Mohapatra
11dfead265 qcacmn: Use mac_addr pointer as constant
Use mac_addr pointer as constant in wlan_hdd_ml_sap_get_peer,
hdd_set_mld_address and use the same for consecutive APIs.

Change-Id: I19e07512bf09b01f26ef8b2bc3876f3d3e85ba2f
CRs-Fixed: 3374923
2023-01-17 05:29:58 -08:00
Vijay Raj
bdbf9523bb qcacmn: Add support for token and report number in Neighbor report
In api extract_roam_11kv_stats_tlv(), request token,
response token and report number are not extracted
for neighbor report.

Add support for request token, response token and
report number for neighbor report.

Change-Id: Iefe384fe760f25d6ce1870e52817c72577f0d5a9
CRs-Fixed: 3370856
2023-01-17 01:42:02 -08:00