Commit Graph

17569 Commits

Author SHA1 Message Date
syed touqeer pasha
b88dc98e98 qcacmn: Fetch drop 3 address mcast value
Fetch the drop 3 address mcast value

Change-Id: If4d714e6b418c3030b247e8dd84b948aa6c140d4
CRs-Fixed: 3282708
2022-09-08 10:48:34 -07:00
Vijay Krishnan
516973c973 qcacmn: Fix compilation issue for BW puncture macro
The macro QCA_DFS_BW_PUNCTURE depends on the macro
WLAN_FEATURE_11BE. This creates compilation issue and fix
is introduced in this patch.

CRs-Fixed: 3283332
Change-Id: Ie00f7384142b39c309845408c6268ae6346f4734
2022-09-08 07:47:39 -07:00
Vijay Krishnan
056b6ae310 qcacmn: Fix compilation issue of QCA_DFS_BW_PUNCTURE
The macro QCA_DFS_BW_PUNCTURE depends on the macro
WLAN_FEATURE_11BE. This creates compilation issue and fix
is introduced in this patch.

CRs-Fixed: 3282072
Change-Id: I680670e58bd57d104bc69f2b4e7a56010b7584a5
2022-09-08 07:47:32 -07:00
Vijay Krishnan
ef864278aa qcacmn: Validate the proposed bitmap and enable puncturing
When radar is found in any DFS channel, a radar bitmap is
generated based on the radar infected channels. For example,
if operating channel is 100 HT160 and radar found in 112,
then the generated bitmap is B0000_0010. This proposed bitmap
is compared with the valid puncturing patterns. In this case,
the proposed bitmap is valid puncturing pattern.

In case of a valid puncturing pattern, send the final
bitmap to DFS module and the module updates the DFS channel
puncturing pattern. If an invalid puncturing pattern is
found, return value zero and do not update DFS channel
puncturing pattern.

CRs-Fixed: 3273800
Change-Id: Iee23ac267bfea1b4815a72c2728555f96bed6466
2022-09-08 07:47:25 -07:00
Rakesh Pillai
d706698dd1 qcacmn: Add support for fragmented history recording
Currently the history recording for any debug purpose
is done using a contiguous memory chunk. For certain
history like tx_hw_ring, tx desc or tx completion desc
history, the amount of contiguous memory required is
very huge (order 7 or 8 allocation), which have a
higher probability of failing.

In order to mitigate the above scenario, introduce the
support for recording debug history into fragmented
chunks of memory, thereby reducing the requirement of
contiguous memory.

Change-Id: Iac4fb38b6d4b095766520899853e68b4c2b83afc
CRs-Fixed: 3282269
2022-09-08 04:38:02 -07:00
Ripan Deuri
04dd6c626a qcacmn: Add support to fetch PER
Add support to fetch PER from peer stats.

Change-Id: Ia7cf8913238ab5b56d5f049cf9d511318ca5d165
CRs-Fixed: 3284395
2022-09-08 02:57:20 -07:00
Vivek
d6fb91fd85 qcacmn: Add module ID for SAWF
Add a new module ID for Service Aware Wifi

CRs-Fixed: 3283808
Change-Id: Ie4020aaff84439fc2bab163583f481adba5b4109
2022-09-08 02:57:14 -07:00
Surya Prakash Raajen
642b26aaf0 qcacmn: Fix wmi_mlo_teardown_cmd_send issue
When teardown completeion event is received from FW, teardown
completion handler resets pdev link to NULL, when the expectation
is only to put pdev state in teardown, such that when soc goes
down the list gets cleared.

Change-Id: Ief490eabe0546207f0ef649cb6d5cde1faf582d8
CRs-Fixed: 3280671
2022-09-07 16:34:34 -07:00
Amir Patel
8a1be0ce9d qcacmn: Update Noise floor for monitor frames
Update Noise floor for monitor frames

Change-Id: I8fc81b189923130e2c040dea10e04fba92c58c57
CRs-Fixed: 3274706
2022-09-07 16:34:27 -07:00
Nagalakshmi
2b7b671b37 qcacmn: Give valid range of value for aliasing INI
There are two different name with different range of value for
aliasing INI's. So, it should pick the valid range of value wrt INI
name.

Change-Id: I1b3f8b276a65f2e1659dd4e3ede8512513e3da71
CRs-Fixed: 3268728
2022-09-07 10:13:41 -07:00
Amir Patel
0fe7f4446b qcacmn: Optimize monitor mode memory utilization
a. Optimize ppdu_info memory
b. Use kmem cache for ppdu info allocation

CRs-Fixed: 3265620
Change-Id: Ieee040aa703aef8c5eee5e5a34a52ef18300b696
2022-09-06 10:23:43 -07:00
Amir Patel
49555350f2 qcacmn: Optimize ppdu_info memory
a. Optimize mon_rx_status and mon_rx_user_status objects memory
b. Add QDF API to remove last element in nbuf queue

Change-Id: I53328aae4d2861e0d2972556f61c8556be5e601c
CRs-Fixed: 3278895
2022-09-06 10:23:36 -07:00
Amir Patel
8983dd04f8 qcacmn: Add QDF Kmem cache support
Introduce QDF abstraction APIs for handling kmem cache
create/destroy/alloc/free

Change-Id: I46fa8e5e3891a3665fb230b737ef66ff65b5135e
CRs-Fixed: 3274919
2022-09-06 08:59:43 -07:00
Vijay Krishnan
f9c54b61a3 qcacmn: Generate radar bitmap for the DFS channel
When radar is found on any DFS channel, generate a
bitmap which represents the channels that are
radar infected. For example, if the current channel
is 100 HT160 and radar is found in chan 104, then the
bitmap generated have the value B0000_0010. The bit 1
represents radar infected channels.

The radar bitmap calculation also checks for any existing
punctured patterns. If already punctured patterns are
available then it includes the existing pattern and
also current pattern in the bitmap calculation.

CRs-Fixed: 3273737
Change-Id: Icfc5d4e22980d3d2375152c12d244c7a8f5e318d
2022-09-06 04:23:49 -07:00
Amir Patel
ed6fc2b352 qcacmn: Add NULL pointer check
Add NULL pointer check at correct place
in monitor filter update

CRs-Fixed: 3279327
Change-Id: I5d9c44cf160de9acd4280774cc999931b8050ec3
2022-09-06 04:23:41 -07:00
Devender Kumar
78b844e995 qcacmn: Fix for calling cdp api from dp layer
cdp api is getting call from dp layer.

Fix is to call correct dp api from datapath file.

CRs-Fixed: 3279426
Change-Id: I142910276d76c600e5d79289270bbfe156bfab1c
2022-09-05 21:33:12 -07:00
Asutosh Mohapatra
c70f8eec91 qcacmn: Add support to store and use fcc rules sent by firmware
When set_fcc_channel is set, host driver sets tx_power info about
channels 12, 13 to hardcoded values. Now firmware sends information
about channels 12, 13 to host driver and currently there is no
support to extract and store this information and use it to
modify tx_power of channels 12, 13 in host driver.

Add support to store the tx_power of channels 12, 13 received
from firmware and use this to modify tx_power of fcc channels.

Change-Id: Ie7b20a75bb09956a70b7b133ce7ce9beb8db138b
CRs-Fixed: 3270676
2022-09-05 21:33:04 -07:00
Vijay Krishnan
1d368b2881 qcacmn: Add function pointer to enable/disable DFS puncture
Add the global dispatcher function pointers to enable/disable
the DFS puncturing feature.

Add a new dfs member "dfs_use_puncture" to remember if the
feature is enabled or disabled.

CRs-Fixed: 3272765
Change-Id: I1f45a9f44ede7f8606f770365220c5f7508847cf
2022-09-05 08:29:01 -07:00
Asutosh Mohapatra
81d86f0f99 qcacmn: Add QCA vendor interface to get SAR capabilities to userspace
Add QCA_NL80211_VENDOR_SUBCMD_GET_SAR_CAPABILITY to get various SAR
capabilities supported by the WLAN firmware to userspace. These
capabilities are usually reported by the firmware during the initial
bootup handshake with the driver. Based on these capabilities, user
space can choose proper SAR indexes.

Change-Id: I31be4bd58dc02fe82ae57f703f7db54f5a3c027e
CRs-Fixed: 3274703
2022-09-05 04:49:09 -07:00
Sreeramya Soratkal
2b23d2e388 qcacmn: Consider dbr registration status while spectral open
The spectral pdev open handler returns success even if the registration
to Direct Buffer Rx(DBR) module is not successful. Fix this by
updating it with the status of registration of the spectral event handler
with DBR while executing operations on pdev open.

CRs-Fixed: 3272684
Change-Id: If336180f4e7e811f5a353a86eea49e0e56f50338
2022-09-05 02:40:27 -07:00
Shivam Kumar
79b46e688f qcacmn: Add the missing module id and names to the array
Add the missing module id and names to g_qdf_category_name array,
and missing module trace default level to module_trace_default_level.
By using the command ‘Cfg80211tool ath0 g_qdf_cv_lvl ‘ It displays all
the Module id names

CRs-Fixed: 3273947
Change-Id: Ia4b2b49aae6fa5eaba667f26498708e500a231c7
2022-09-05 02:40:20 -07:00
Jithender Miryala
969c3c5161 qcacmn: Add data and constants for frequency offset sign bit
Issue: The offset parameter in bangradar unit test parameter is only one
byte long. Whereas radar offsets has a range of [-160, 80] MHz if host
supports 320 MHz bandwidth. but with bangradar unit test command only till
-128 MHz is possible

To fix this, Add frequnecy offset sign bit(13th bit) if hosts supports
320 MHz bandwidth. Firmware will identify max range of [-160,80] with
sign bit.

Change-Id: I33ea8e9185f8d25b81cad7a18dcca6d2d6f42669
CRs-Fixed: 3270525
2022-09-04 23:14:08 -07:00
Jithender Miryala
26bf9ca291 qcacmn: set 'dfs' parameter if host and fw supports 320 MHz
Set dfs object parameter if host and fw supports 320 MHz bandwidth.
i.e. dfs->dfs_is_bangradar_320_enabled. Set to true if the host and
firmware support the bandwidth is 320 MHz. If there is no support, set
false.

Change-Id: I210823c448450f89dc65937201b4839168369d18
CRs-Fixed: 3270525
2022-09-04 23:14:01 -07:00
Jithender Miryala
354a68e77c qcacmn: Add host-FW handshake for 320 MHz bang radar support
FW-Host Handshake for BANG_RADAR_320_SUPPORT
1. FW advertises its capability of processing BANG_RADAR_320_SUPPORT
id via wmi service bit 'wmi_service_bang_radar_320_support'.
2. If the host is capable of processing the "BANG_RADAR_320_SUPPORT"
event id, host sends the capability in WMI_INIT_CMDID setting a bit in
host_service_flags

Change-Id: Ia26a7b8e8ee78aceb801d0053770379bd6d5a9cb
CRs-Fixed: 3270525
2022-09-04 23:13:54 -07:00
Venkateswara Swamy Bandaru
5b61207f4c qcacmn: Update peer_chan_width_switch_info
Update peer_chan_width_switch_info as per latest
fw common header file to include puncture parameter.

Change-Id: I1a68991ed8b9c653d31c4bc0c3ad3660d1104de3
CRs-Fixed: 3278709
2022-09-03 12:32:54 -07:00
Paul Zhang
4cdffd25aa qcacmn: Replace ap reg rules with client reg rules
Currently, there is no ap reg rules from the regdomain for
some countries. But function reg_append_mas_chan_list_for_6g_lpi
and reg_append_mas_chan_list_for_6g_vlp get the master chan per
the ap reg rules number. It casues it can't get the master chan
list for 6 GHz even it has client reg rules.

To resolve this issue, using num_of_6g_client_reg_rules instead of
num_of_6g_ap_reg_rules.

Change-Id: If2dc6510edc61531cb1a3b8002e43a1bd69311e0
CRs-Fixed: 3278250
2022-09-03 06:21:59 -07:00
Venkateswara Swamy Bandaru
8a0afca1e2 qcacmn: Add Support for setting puncture bitmap peer param
Add Support for setting puncture bitmap peer param

Change-Id: I819ef2b56fbc5d0240cbb1702fe5b2da2c4f5ec0
CRs-Fixed: 3278857
2022-09-03 06:21:52 -07:00
Ming Jiang
482d936ce0 qcacmn: Add 64K page id mask for hardware link descriptor
DP_HW_LINK_DESC_TYPE use non-cacheable memory and page id and
mask were calculated based on 4096 size. This change add 64K
size support for page id mask of hardware link descriptor.

Change-Id: I6bf1bb95573d964872c6dde7ea41e5823fe940d2
CRs-Fixed: 3267724
2022-09-03 04:44:58 -07:00
Ruben Columbus
ced4c17614 qcacmn: add reo bit to enable reo qref in fw
set register WCSS_UMAC_REO_R0_MISC_CTL 6th bit to 1
to enable reo wref from fw side.

Change-Id: Ib8d4a2f6e7f598d45ba2b2c628ed6f3929fc3337
CRs-Fixed: 3273558
2022-09-03 04:44:51 -07:00
Ruben Columbus
734657149e qcacmn: bkpressure control time event
add debug prints and a custom timer for how long to wait to receive next
bk pressure event message.

Change-Id: I5a736b0f134cd179990de536da02967db3e39774
CRs-Fixed: 3273427
2022-09-03 03:20:02 -07:00
Namita Nair
0602fba425 qcacmn: Display CV_QUERY stats for sounding stats
CV_QUERY stats are sent by FW as part of HTT_TX_CMN_SOUNDING_MODE
and not as part of individual AC, AX, and BE modes. This change
will hence correctly display the stats.

Change-Id: Ie499499137be4f542973a44829caa71f7b559f2f
CRs-Fixed: 3270132
2022-09-03 00:14:25 -07:00
Harsh Kumar Bijlani
d12768c4c4 qcacmn: Change order of conditions for peer stats update
Change order of conditions for peer stats update for KPI optimization.

Change-Id: If764ecaf575f9fc60f5c6d3332a7716b6a50be65
CRs-Fixed: 3281386
2022-09-03 00:14:19 -07:00
Gururaj Pandurangi
9fa8fc8b46 qcacmn: Add API to extract MSD caps from cmn info field
Add API to extract MLD AP MSD capabilities from MLO IE
common info field if present. This will be shared with FW
via peer assoc cmd.

Change-Id: I0ebcd5408a40f3314932d4a2a7e586c208af2ee5
CRs-Fixed: 3271118
2022-09-02 21:00:31 -07:00
Gururaj Pandurangi
534715624f qcacmn: Update is_psd_power logic in reg get client pwr API
Currently, the reg_get_client_power_for_connecting_ap() API
populates is_psd_power flag within the function and uses it
as a check to further populate EIRP power. The is_psd_power
flag is derived from current channel list chan flag which
returns true if corresponding channel supports PSD power.
Normally, all 6 GHz channels support PSD, so this flag is
usually set to 1. But, AP can transmit EIRP power in TPE IE
for 6 GHz channels, thus for MCC specific cases, derive this
flag based on tx_power interpretation field in TPE IE for
accurate value. WIN Host can still use reg_is_6g_psd_power()
to retrieve the flag in the caller APIs.
Hence, derive is_psd_power flag from TPE IE interpretation
value beforehand and pass it as an argument to
reg_get_client_power_for_connecting_ap() API.

Change-Id: Iabbcbd003f441151643a087ad4908bcdaed753a5
CRs-Fixed: 3268118
2022-09-02 19:14:42 -07:00
Jianmin Zhu
ea0eca7d21 qcacmn: Fix link probe response generation failure
As 11be 2.1 spec 35.3.3.3 Fields and elements not carried in a per-STA
profile, an AP affiliated with an AP MLD shall not include a Timestamp
field, a Beacon Interval field. Change ML probe rsp per-STA profile decode
logic accordingly. Copy Timestamp from the starting of the probe response
frame.

Change-Id: I0fe5682c170dc3dcd6e5a93c68473cd4cb6999b8
CRs-Fixed: 3280227
2022-09-02 17:42:47 -07:00
Amith A
9eefe85e1d qcacmn: Add rxops to display super channel list for all modes
Add rxops reg_display_super_chan_list, its core and dispatcher functions to
display super channel list for all modes.

Change-Id: I2b094d407d318ad84ac79ea3a4bc1127606c0fa2
CRs-Fixed: 3212642
2022-09-02 14:32:39 -07:00
Jianmin Zhu
d012f9e86f qcacmn: Fix OOB when add 6 GHz channels for pno scan
If there are more than 1 preferred network list in schedule scan, after
6 GHz channels added to pno channel list of 1st network list, channel
num is updated and set for 2nd network list wrongly, then OOB happens when
6 GHz channels are added to 2nd network list.

Change-Id: I2658620ce4e6e8dcf93e810c7bc10364e4de7a73
CRs-Fixed: 3280705
2022-09-02 14:32:32 -07:00
Jianmin Zhu
b67ab65175 qcacmn: Enhance QCA vendor roam event to indicate MLO links after reassociation
Enhance QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH event for the
driver to indicate the information of the associated links of MLO
roaming.

Change-Id: I5cede840ec42bb45ec13e35a1f5caa0c0674047a
CRs-Fixed: 3278009
2022-08-31 21:10:24 -07:00
jinbaoliu
195e4c7d1b qcacmn: Fix the nss geting from tlv being invalid in 11b mode
Only in 11b mode, exclusive of other legacy modes(11ag) will
the NSS obtained from the TLV header be invalid, which is 0
and cannot be resolved. This change will set nss to 1 in 11b.

Change-Id: I93e8bdb125764fb0247265da328929ecc837fb84
CRs-Fixed: 3275793
2022-08-31 16:04:33 -07:00
aloksing
c31daef130 qcacmn: fix compilation issue without monitor support
Compilation is failing when Monitor support is disabled
Moved monitor related API and structure to monitor header files.

CRs-Fixed: 3257872
Change-Id: Ie1b3dc16b38c88bfd73fc89aaa395d4b57a61e5c
2022-08-31 16:04:27 -07:00
aloksing
c06d7b8d27 qcacmn: Fix compilation issue without CFR
Build failure when CFR is disabled.
Remove including unnecessary header file.

CRs-Fixed: 3257872
Change-Id: If93116d132f209b0deda55492879d4facdd2be70
2022-08-31 16:04:19 -07:00
Srinivas Pitla
4466787729 qcacmn: Return failure on partner link peer creation failure
This change adds protection, if partner link peer creation failure
leads to MLO peer free. It also returns failure.

Change-Id: I4f2097c3a2942cecf01f77c7e4899595bbce0dff
CRs-Fixed: 3277770
2022-08-31 12:50:57 -07:00
Srinivas Dasari
57edb1e7e9 qcacmn: Add short SSID and BSSID in hints in scan request for 6 GHz
Currently, short SSID is not added to the hints in scan request
if BSSID hint is present. But there can be cases where both need
to be advertised and expected to be present in the probe request.
So, send short SSID hints also to firmware in scan request.

Change-Id: Ie66e6677185c106817f4d24c2f07730c53ae243a
CRs-Fixed: 3259555
2022-08-30 05:41:54 -07:00
Mohammed Ahmed
fa6e07082f qcacmn: add psoc null pointer check to wlan_objmgr_get_peer_by_mac
Current code directly passes the result of wlan_vdev_get_psoc(vdev) to
wlan_objmgr_get_peer_by_mac, without null pointer checking, which can
result in null pointer dereferencing.
To fix this issue, add checking of the psoc pointer before passing,
and add verification inside wlan_objmgr_get_peer_by_mac.

Change-Id: Iaf0e2535c3a584db788ddc621745c66c296fe08f
CRs-Fixed: 3277651
2022-08-29 22:19:33 -07:00
Shashikala Prabhu
aec62be3c7 qcacmn: Fix the inconsistencies observed in MLO AID allocation
For T2LM capable MLO STAs the AID is allocated from the second pool.
There is an inconsistency in allocating these AID pools.

Please check the example below.
Let's say the max_aid in ML AID manager is 12 and the start_aid is 3.
As per the current implementation,
   aid_end1 = (ml_aid_mgr->max_aid - start_aid)/AID_NUM_BUCKET
            = ( 12 - 3)/3 = 3
Only 3 AIDs are available in pool_1. But, all these 3 AID are reserved due
to start_aid = 3. Hence, we will not be able to allocate any AID from
pool_1.

With the fix,
   pool_1_max_aid = (ml_aid_mgr->max_aid - start_aid)/AID_NUM_BUCKET
	              = 3
   aid_end1 = pool_1_max_aid + start_aid
            = 6
So for pool 1, AID 4,5 and 6 are available now.

Change-Id: Ia96966b542e68511acbf46de32448f0d95d31c69
CRs-Fixed: 3276564
2022-08-29 17:43:42 -07:00
Amit Mehta
68b9b355b5 qcacmn: Fix monitor status buffer double free issue
currently rx_mon_ring and REO are part of the same
interrupt group, due to which in case of mission
mode when IRQ is received from REO, even the lmac
rings are processed in the same context.
This results in dp_mon_reap_timer_handler and
dp_process_lmac_rings calling dp_rx_mon_status_process_tlv()
in different context and access global list at the same time,
which may lead to skb double free issue.

To fix the issue if current mode is not monitor mode
do not set rx_mon_ring_mask MSI interrupt mask.

Change-Id: Icc64455824f919e17d3daa741be1cbdafd6fe88f
CRs-Fixed: 3274531
2022-08-29 10:00:54 -07:00
Sheenam Monga
46644d2926 qcacmn: cleanup key_rsc_counter pointer from set key param
Remove unused param key_rsc_counter of set_key_param
structure, as key_rsc_ctr is used to send key rx sc
counter to fw and rename key_rsc_ctr to key_rsc_counter
as win is using key_rsc_counter.

Change-Id: Id58aabb30d772f8f620ac9f96890fcac0193777b
CRs-Fixed: 3256574
2022-08-29 10:00:47 -07:00
Edayilliam Jayadev
89fbda97fc qcacmn: Handle error scenarios in mgmt Rx REO module
Handle the following error scenarios in management Rx REO module.

    1. Pdev corresponding to a HW link is deleted.
    2. Pdev corresponding to a HW link not yet initialized completely.

CRs-Fixed: 3272812
Change-Id: I34fbb19e24649371ff0ddb591e2ec14bfdfee58a
2022-08-29 10:00:40 -07:00
Vinod Kumar Myadam
d93887d03f qcacmn: Optimize log prints in reg_copy_ch_params
In reg_copy_ch_params, logging all bandwidth except 320 MHz,
leads to excessive logging.

Change-Id: If9d9f8e65c4c0d58fb570d8e6cccc7a7ebd5ec26
CRs-Fixed: 3277099
2022-08-28 23:16:18 -07:00
Srinivas Pitla
5aab8590be qcacmn: Fix issue with is_primary flag in splitphy mode
Currently, for all link peers of ML peer, is_primary set as
true, since all link peers are attached to same PSOC.

But, FW and DP needs only one peer to be set primary.
So far, FW and DP are considering last peer created or last peer
assoc received as primary peer.

This method causing issue since the order is not guaranteed
between FW and DP layer.

So, added a change to set is_primary to one of the link peers
only

Change-Id: I1c1aa87056baf86091fefc780180b5fc6a16af0d
CRs-Fixed: 3274360
2022-08-28 23:16:12 -07:00