Commit Graph

19784 Commits

Author SHA1 Message Date
Ananya Gupta
3ef9a59299 qcacmn: Add enum for xpan in link vote user IDs
Add enum for xpan in  link vote user IDs

Change-Id: I5a1e33d853c0f8937b6e1a6c3acd169207296e58
CRs-Fixed: 3559119
2023-07-30 19:08:08 -07:00
Uraj Sasan
329a080940 qcacmn: Add bridge sta link id
Store linkid used by vdev in bridge sta ctx

CRs-Fixed: 3562149
Change-Id: Ib6550b65abfaae71c7f021640fa3f93bc1ad967c
2023-07-30 19:07:56 -07:00
Uraj Sasan
2fce323cb6 qcacmn: API's to check topology and total links
1. APIs to check topology to see if the bridge vap/peer will be used.
2. API to check the max number of links supported.

Also check if we can have the primary and assoc links to be different
for WDS STATION. Based on the topology allow/block
connection to a particular AP.

CRs-Fixed: 3562149
Change-Id: Icf3b32036199f39b0d567ac88795dc07760ac1a5
2023-07-30 19:07:45 -07:00
Prakash Manjunathappa
a57c1c99b5 qcacmn: Fallback to 4k slab allocation on page_frag alloc fail
In low memory conditions 32K page frag allocations via
qdf_nbuf_frag_alloc will fail, fallback and try 4k slab allocations.

Change-Id: I3c9b08af8b1cc3aa881a91338a88b736589fb4dd
CRs-Fixed: 3571487
2023-07-30 15:08:50 -07:00
Chunquan Luo
41a1814948 qcacmn: Fix cur_Rssi threshold not logged for PERIODIC roam
When roam reason is periodic, host driver ignore the rssi
threshold in wmi event parsing.

Change-Id: I66c72576c7a2994d88e4c83bee726d8ec92c4189
CRs-Fixed: 3566441
2023-07-30 15:08:40 -07:00
Amit Mehta
8a052c3b88 qcacmn: Get correct peer id in htt tx completion
Currently in htt tx completion for MLO connection
host is not converting peer id into ml peer id.

Due to wrong peer_id host is not able to find txrx_peer
due to which stats are not getting updated.

To fix the issue in case of MLO connection convert
received peer_id into MLO peer_id.

Change-Id: I2e90104053d59a319d46a2628c4e9cdcb32832a0
CRs-Fixed: 3574182
2023-07-28 23:43:08 -07:00
Lin Bai
09432f7ace qcacmn: Compute pages required by SPT properly
Compute the required pages properly, when num_descs is not
multiple of DP_CC_SPT_PAGE_MAX_ENTRIES(512).
For example, if num_descs less than DP_CC_SPT_PAGE_MAX_ENTRIES,
then 1 page needed rather than 0.

Change-Id: I1c4b12cfebef6a9b315baf9044355caab1b112de
CRs-Fixed: 3571562
2023-07-28 23:42:57 -07:00
Asutosh Mohapatra
db94a99add qcacmn: Correct API names and use helper function to get value
Change name of reg_is_6ghz_chan_connected to reg_is_chan_connected
as this API can be used to check if channel is connected for all
bands.
Use reg_is_6ghz_band_set helper function to check if 6 GHz band
is set and reg_get_keep_6ghz_sta_cli_connection to check if
keep_6ghz_sta_cli_connection flag is set.

Change-Id: I106185bad72579e227f9042a40f77934a2cb81c1
CRs-Fixed: 3537696
2023-07-28 15:37:42 -07:00
Priyadarshnee Srinivasan
5a1d1aa1b2 qcacmn: Modify the DFS debug print level
Modify the DFS debug print level to reduce the prints during bootup
as per customer's requirement.

Change-Id: I9e2c07373ffe036d4dfa7599d49d589eefee5cff
CRs-Fixed: 3568927
2023-07-28 15:37:31 -07:00
Amith A
535c2cf1c1 qcacmn: Consider AFC response with 0 freq/channel objects as valid
With the current behavior, a NULL AFC response is treated to be invalid
and is not processed. Hence the AP continues to operate in its current
state. To resolve this, the NULL AFC response should be treated as if
there are no SP channels available in that geo-location and should be
processed as follows:
A) If there are no Tx channels available(in all power modes) then the AP
   must be brought down.
B) Else AP must choose the best channel in the best power mode.

To implement above cases, remove all the checks in the driver that tries
to block the NULL response and finally call upper layer functions
(hostapd/acs) so that they can decide whether to bring down the AP or
choose a channel from the available power modes. Modify
'reg_set_ap_pwr_and_update_chan_list' to bypass setting power type when
ap_pwr_type is REG_CURRENT_MAX_AP_TYPE. This allows the current channel
list to be updated and the upper layers to be informed about this update.

Change-Id: Id048fa9ee402d537f352e3caa2b53729518ea37e
CRs-Fixed: 3565567
2023-07-28 15:37:13 -07:00
Aasir Rasheed
8f15871d98 qcacmn: Use WLAN_MAX_ML_BSS_LINKS to check max number of links
Currently, We are using WLAN_MLO_MAX_VDEVS to check
max number of links, However with n link mlo we need
WLAN_MAX_ML_BSS_LINKS to check max number link.

Change-Id: Idd8a96ae80030c813bbdcebcdc4c76d2f93bea5d
CRs-Fixed: 3567342
2023-07-28 05:33:05 -07:00
Devender Kumar
a815fe5825 qcacmn: Fix iommu domain attributes compilation issue with IPA enable
When CONFIG_QCOM_IOMMU_UTIL is enable in vendor config, we have to
use new set of API's to get iommu domain attributes, and while using
__qdf_iommu_attr_to_os seeing compilation issue as some identifiers
like, QCOM_IOMMU_MAPPING_CONF_S1_BYPASS are not declare.

even when CONFIG_QCOM_IOMMU_UTIL is not enable we have dependency
on qcom-iommu-util.h file as it has some identfiers which are in use,
with or without CONFIG_QOM_IOMMU_UTIL.

Fix is to include the header file qcom-iommu-util.h which contains
the declaration of all the identifiers used in __qdf_iommu_attr_to_os
and this file is included if MSM_PLATFORM or QCA_IPA_LL_TX_FLOW_CONTROL
is defined.

Change-Id: I82b1c13717d377a5ec4bcb74ff94f4d15fa1f638
CRs-Fixed: 3487912
2023-07-27 22:25:06 -07:00
Chunquan Luo
2dab6c754c qcacmn: Change the minimum limit of dp_rx_sw_desc_num
Change minimum limit of dp_rx_sw_desc_num for memory optimization
on kuno.

Change-Id: I8f2d92286b94b4aba8b865dbc47e69e6b561ce90
CRs-Fixed: 3564817
2023-07-27 22:24:55 -07:00
Prasanna JS
ae88affbf8 qcacmn: Add 6 GHz check in ucfg_cm_get_connected_band
Add 6 GHz check in ucfg_cm_get_connected_band

Change-Id: I323d165c179ee4ce744bb9d06e6af9786f25ea31
CRs-Fixed: 3566304
2023-07-27 18:54:39 -07:00
Sai Rupesh Chevuru
227c8c9aaa qcacmn: In peer WDI events use the vdev id instead of osdev
In peer WDI events use the vdev id instead of osdev.

Change-Id: I1dd702acba2721712222a4985b4747050647b4e0
CRs-Fixed: 3571299
2023-07-27 08:32:32 -07:00
Jianmin Zhu
8ebdc0ccc9 qcacmn: Avoid mutex in soft irq
When handle wmi_mlo_link_disable_request_event in tasklet, mlo mutex is
acquired, assert will happen.
To fix it, let wmi_mlo_link_disable_request_event be handled in scheduler
thread instead of tasklet.

Change-Id: I65b84d0b6dc92a6649925d5844657fa44df1fada
CRs-Fixed: 3563195
2023-07-27 08:32:20 -07:00
Vignesh U
416c570033 qcacmn: Include opclass 80p80 in AFC request only if device supports
AFC request is sent for all the opclass supported in the global opclass
including 80p80. Not all the devices support 80p80 and so, it is
unnecessarily included in the AFC request.

Create a callback function in regulatory to check if 80p80 is supported by
the device. If the support is present then the AFC request can include
80p80 opclass (opclass number 135 in global operating class). If not, then
the AFC request excludes 80p80 opclass.

Include 80p80 opclass in the AFC request based on the devices' support.

Change-Id: I9e72c960fefe6fbdc106bb83fb240d84d8522b80
CRs-Fixed: 3538926
2023-07-27 08:32:09 -07:00
Himanshu Batra
80cdcc68dd qcacmn: Donot allow PTQM migration for unauthorized peers
Donot allow PTQM migration for unauthorized peers

Change-Id: I1d4d7b715793b976f6020ecc74b9443893d8073e
CRs-Fixed: 3568618
2023-07-27 08:31:58 -07:00
Santosh Anbu
22a0b8805b qcacmn: Print mon dst interrupt threshold
Add change to print monitor destination ring interrupt
threshold values.

Change-Id: I5750d7e491e4e8761b4dca61630c2f04355b0b59
CRs-Fixed: 3569507
2023-07-27 04:51:12 -07:00
Santosh Anbu
32d27588db qcacmn: Update mon dst interrupt from INI
Add change to update monitor destination ring interrupt handling
thresholds from INI.

Change-Id: Ibfced2b809ac2101171e8fe9f58e021a5a1f8ccf
CRs-Fixed: 3569507
2023-07-27 04:50:58 -07:00
Jianmin Zhu
830e468aa1 qcacmn: Add OUI config to send SMPS frame along with OMN for specified APs
Add gActionOUISendSMPSFrameWithOMN to send SMPS frame along with OMN for
specified IoT APs

Change-Id: Ida35779d11f9c6d6340afdbebeb788520fa7afdc
CRs-Fixed: 3568462
2023-07-27 04:50:43 -07:00
Santosh Anbu
ba59a82e83 qcacmn: Support INI cfg for mon dst interrupt
Monitor destination ring interrupt processing is configurable.
For improved CPU utilization the batch counter threshold and
timer threshold is updated and also an option is provided to make
this values configurable through INI.

Change-Id: Ibe671927f53f3e8fac7f17540c21a2c7edae427b
CRs-Fixed: 3569505
2023-07-27 04:50:29 -07:00
Santosh Anbu
436efcf19a qcacmn: Remove unused ini cfg for monitor
Removed unused cfg variable and related function specific to monitor
path.

Change-Id: I906d1a2a50779ac5cae287355a9acaf5b70e479b
CRs-Fixed: 3569504
2023-07-27 04:50:16 -07:00
Namita Nair
a8d48da111 qcacmn: Handle OPT_WIFI_DP during IPA pipedown
Currently if OPT_DP filter reserve or add request
is received during IPA pipe disconnect, the request is
not rejected. This could cause a race condition when
WIFI is disconnected while OPT_DP transfer is initiated.
This change handles this scenario by rejecting the
OPT_DP request when pipes are going down.

Change-Id: I8ec9e2e50917ef6ec3a07f9e1833303d94134c6c
CRs-Fixed: 3520707
2023-07-26 21:25:13 -07:00
Shreedhar Parande
10000aedc1 qcacmn: Add API to get primary VDEV from ML peer
Add API to get primary VDEV using primary link peer.

Change-Id: I309070bf33bdae017f174b00ae5eea3d34292a97
CRs-Fixed: 3570511
2023-07-26 21:25:03 -07:00
Jeff Johnson
9ce54cdba4 qcacmn: Fix dp_tx_tso_num_seg_pool_init_by_id() stub
The dp_tx_tso_num_seg_pool_init_by_id() stub implementation has an
incorrect semicolon, so remove it.

Change-Id: Ie70aafdb83116e3e3fb7bd96223b0c770e80eb7f
CRs-Fixed: 3500205
2023-07-26 21:24:51 -07:00
Vinod Kumar Pirla
160f06923c qcacmn: Call OSIF callback to update BSS info on each link
Notify OSIF about each connected link once assoc VDEV connection
is completed, call the ops callback registered while filling
kernel data structure for each link.

Earlier post connection each VDEV's OSIF callback is called to notify
individually, but this leaves the OSIF unaware of standby link details
as the standby link doesn't have VDEV associated with it.

Change-Id: I027b91d02bdc4412400a7e66f11911da149e672b
CRs-Fixed: 3556378
2023-07-26 10:53:07 -07:00
Vinod Kumar Pirla
1049b376f7 qcacmn: Introduce OSIF ops callback handler pointers
The ops are called on BSS info to be updated to OSIF and
to call for MAC address update on particular VDEV

Change-Id: Ib7b07e6ea2927c365298555ed6f24377127ddd4a
CRs-Fixed: 3556338
2023-07-26 10:52:56 -07:00
KARTHIK KUMAR T
63bf6f5d07 qcacmn: Added code to include rx packet tlv hdr
Added code to include rx_pkt_hdr_tlv in
rx packet tlvs header

Change-Id: I0609cf94e3b53cf625f7c347d86e42fe815e452e
CRs-Fixed: 3563009
2023-07-26 10:52:45 -07:00
Vinod Kumar Pirla
356ed4f407 qcacmn: Use ml dev context to deinit epcs ctx
The MLO dev context in VDEV is already made to NULL as
part of VDEV destroy and dereference of MLO dev ctx from
VDEV results in NULL pointer exception.

Change-Id: Idbbd625998aa09194ca533b0c8df2fd8e6d16d76
CRs-Fixed: 3570602
2023-07-26 10:52:34 -07:00
Deeksha Gupta
d47c717a77 qcacmn: Fill connect response MLO params from mlo_mgr
After mlo connection is completed driver send the connect resp event
to kernel. As of now, driver gets the ML param info from the assoc_rsp IE.
For stand_by link, driver don't have vdev. Due to this, driver can't send the
stand_by info to kernel.

Fix is, instead of assoc_rsp IE driver will use mlo_mgr to get the links
information.

Change-Id: I8da762bed94de4ad2b024183c09b3d0a0f1b7ca4
CRs-Fixed: 3530712
2023-07-26 04:40:24 -07:00
Priyadarshnee Srinivasan
eeeb952b15 qcacmn: Address incorrect radarfound frequency computation
In Pebble (11BE qcn6432 chip), the radar-found frequency is
incorrectly computed in the current implementation as
dfs_translate_radar_params is executed.
The translation function (dfs_translate_radar_params) which 
alters the frequency offset is needed for pre-11BE chipsets.
For 11BE chips where
wmi_service_radar_found_chan_freq_eq_center_freq
service is advertised by HALPHY, the frequency translation is not
needed as the offset sent by FW in wmi_dfs_radar_detection_event_id
can be directly used.

CRs-Fixed: 3562464
Change-Id: I824b94ca764d6bd62a67feb38ba3ccc966999e90
2023-07-26 04:40:12 -07:00
Vijay Raj
277510a529 qcacmn: Introduce vdev parameter WMI_VDEV_PARAM_DISABLE_2G_TWT
Introduce new vdev parameter WMI_VDEV_PARAM_DISABLE_2G_TWT
in order facilitate  FW to change twt operation state for
2.4 GHz link

Change-Id: I35436245c5e0ee113a8fdc2edba42a7978b2683d
CRs-Fixed: 3560314
2023-07-25 22:29:44 -07:00
Shreedhar Parande
5daab8f6cd qcacmn: Add APIs to get EML and STR capabilities from ML Peer
Add APIs to retrieve eMLSR, eMLMR and STR capabilities of
connected non-AP MLD.

Change-Id: I1c4b11cfebef6a9b315baf9044355caab1b112de
CRs-Fixed: 3525298
2023-07-25 15:22:25 -07:00
Liangwei Dong
1e58e42dba qcacmn: Fix duplicated Short SSID entry issue
If bssid and short ssid is present in the rnr list,
do not add duplicated entry.

Change-Id: Ic2f3b2396cd087601cf72aad8b4fdf81188d064e
CRs-Fixed: 3554848
2023-07-25 15:22:15 -07:00
Sushant Butta
8b9b8a9a16 qcacmn: Add check to validate length of packet buffer
Add check to validate length of the packet
buffer before adding to skb.

Change-Id: I78cf436c4bf6a00b1aa08ef82cb790c2b3478733
CRs-Fixed: 3553974
2023-07-25 15:21:59 -07:00
Balaganapathy Palanisamy
9d048b9e4d qcacmn: Add MLO bridge vdev APIs
Add MLO bridge vdev APIs to support 4 chip
RDP STA associations.

Change-Id: Iea4c4e3301bc29d470144d5ae0964bb80f2ae68d
CRs-Fixed: 3560194
2023-07-25 03:19:04 -07:00
Hariharan Ramanathan
ab649e0622 qcacmn: Featurization of DP_TX_DESC_POOL_OPTIMIZE
1. In lowmem profiles the number of tx_desc in 4th pool is reduced to
quarter for memory optimizations.
Added new API dp_get_updated_tx_desc which will return the desc value
from INI based on the flag DP_TX_DESC_POOL_OPTIMIZE.

2. Changes to introduce new INI to get reduced desc value for 4th tx
desc pool.

This helps optimize 0.75M per SOC in lowmem profiles.

Change-Id: I033fcaeb843019fb03bb77e0d05a3ebf60fa806a
CRs-Fixed: 3557483
2023-07-25 00:19:37 -07:00
Arun Kumar Khandavalli
4c2b8d81e4 qcacmn: Reject partner link connection in case of IE parsing failure
Currently while updating the mlo vdev flag host checks whether the
mlie is present, this vdev flag is used to send various ml information
to firmware. In certain cases because of issue due to parsing of
ml probe response or AP issues mlie is not present in the partner link
entry, resulting in host sending ml flags for assoc vdev and not setting
ml flags for partner vdev's resulting in undetermined behaviors in
firmware.

If mlie is not present during the partner link association stay associated
on the available links.

Change-Id: I3134555dc955ffc96a50584c2cfc6713b2673cc4
CRs-Fixed: 3555133
2023-07-25 00:19:26 -07:00
Guru Pratap Sharma
25d2ff265a qcacmn: Adding lock in case of epcs context
Adding lock in case of epcs context to achieve mutual exclusion

Change-Id: Ib3e99b5f39eca01c62d32927942e99958320007a
CRs-Fixed: 3568561
2023-07-25 00:19:15 -07:00
Amit Mehta
ca46c1b02d qcacmn: Add changes to get link_id in reo error path
Add changes to get link_id in reo error path.

Change-Id: Ia0ac59318b992be97be5ae15a8e111a730866609
CRs-Fixed: 3566184
2023-07-24 15:51:19 -07:00
Jeff Johnson
26eceff0f7 qcacmn: Fix hif_cleanup_static_buf_to_target() typo
Function hif_cleanup_static_buf_to_target() has multiple
implementations, with one chosen by conditional compilation. The
version where CONFIG_BYPASS_QMI is defined and QCN7605_SUPPORT is not
defined has a typo (snc instead of scn), so fix it.

Change-Id: Ifbfee8cb53e987216b46507e336bf3aa3de7bf6c
CRs-Fixed: 3500203
2023-07-24 15:51:00 -07:00
Santosh Anbu
5faea3c76b qcacmn: Skip link ready when vdev is already UP
In scenarios when two partner vdevs are brought up simultaneously, as part
of moving to start_response or sync_wait mlo_ap_lock is acquired.

For a given vdev not moving to CAC wait, link ready can be posted twice,
which will lead to rcu stall if partner vdev is already trying to dispatch
sync_complete event.

Hence skip the link ready event if the vdev is already in UP state.

Change-Id: Ie3d2c4078ebced3538f3fea08d5b798837534725
CRs-Fixed: 3555092
2023-07-24 08:00:46 -07:00
Sai Rupesh Chevuru
2876ec5043 qcacmn: update the bridge vap in partner list
update the bridge vap in partner list

Change-Id: I232314d4a91768bc5bbade3285ab925dd834d03f
CRs-Fixed: 3550189
2023-07-24 05:10:29 -07:00
Mukul Dhiman
fe14b1901b qcacmn: dp stats aggregate handling for bridge vap in mlo
dp stats aggregate handling for bridge vap in mlo

Change-Id: I4bb934776a35f76b091694de024b173c744ac087
CRs-Fixed: 3557225
2023-07-24 05:10:18 -07:00
Aasir Rasheed
aa6e9e0e0f qcacmn: Add support for remote channel width 320 MHz
Currently, We are using GET_STATION_INFO_REMOTE_CH_WIDTH
attribute for remote channel width which is using u8 for
storing the channel width info. However, for 320 MHz there
is a need to use u16 attribute to store the channel width
info.

This change is to preserve old interface and use new
interface to store u16 attribute for remote channel width.

Change-Id: I01eb246c380a6155d0d96032549eee53a877cb2a
CRs-Fixed: 3567663
2023-07-23 17:10:00 -07:00
Deeksha Gupta
ff999acd60 qcacmn: Add support to get the TDLS wider bandwidth capability
Extend bitwise mask in enum qca_wlan_tdls_caps_features_supported to get
the TDLS wider bandwidth capability from the driver.

Change-Id: I7e7209f72c7d8db3ac06ecafdfe91deb7438e1b2
CRs-Fixed: 3552602
2023-07-23 17:09:50 -07:00
Aasir Rasheed
dd8d3c5a69 qcacmn: Fix typographical errors for kernal-doc
Fix typographical errors required for kernal-doc.

Change-Id: Ifa490697222cf08a4140feb39d2da3b127bd8887
CRs-Fixed: 3565219
2023-07-23 17:09:40 -07:00
Karthik Kantamneni
f243b44719 qcacmn: Fix Runtime PM resume issue for ipci interface
For ipci interface platforms, currently RTPM resume is
requested from CE interrupt handler even when suspend
is in progress. But ideally we should request resume
only RTPM state is in suspended, since as part of suspend
sequence also we will get CE WOW events and this should
not trigger resume.

Fix this by requesting resume from CE interrupt handler
only when driver state is suspended.

Change-Id: I450d6c48809afae26fe863184766ab5141d25691
CRs-Fixed: 3554857
2023-07-23 17:09:30 -07:00
Srinivas Girigowda
70d7e0a2bc Revert "qcacmn: Debug patch for delay reg queue corrupt"
This reverts Change-Id:Ib14634fe31bfdae86aac6c89e5d65618ae5c753e.

CRs-Fixed: 3568037
Change-Id: I8426812fd071bf41a15e1ebb776beeb6da865a00
2023-07-23 17:09:19 -07:00