Commit Graph

285 Commits

Author SHA1 Message Date
Paul Zhang
1ab4d89a23 qcacld-3.0: Init ret for wlan_cfg80211_tdls_mgmt_mlo
Currently ret is not initialized and it can return
uninitialized value in some cases.

Change-Id: Ic70ad295108cc89bea371b78f6f14ca356706d2b
CRs-Fixed: 3491253
2023-07-12 15:39:02 -07:00
Aditya Kodukula
7028b37955 qcacld-3.0: Fix typographical errors
Fix typographical errors spanned over various files in cld.

Change-Id: I82a7eec4335d617a43c89589418a21885074fde0
CRs-Fixed: 3529627
2023-06-15 21:23:48 -07:00
Rahul Gusain
bcb01fb787 qcacld-3.0: release the NDP end all command
Currently, driver post NDP end all command on the scheduler but
never release it. This casues timeout in the scheduler and driver
releases the vdev which is never referenced. This causes crash in
driver.

To resolve this issue, release the NDP end all command when NDP
Host Update event received from the firmware.

Change-Id: Iffe4f79b7c131c48cbf2b085d8bbc6e1fb0b5f0a
CRs-Fixed: 3521989
2023-06-08 20:46:27 -07:00
Rahul Gusain
bb7e163983 Revert "qcacld-3.0: Block NDP_END_ALL req till last NDP_END is received"
This reverts commit 54c2fe240a.

Change-Id: Ic0028674e4728b951215bf7b4d9a7535b8b49efe
CRs-Fixed: 3523826
2023-06-08 20:46:22 -07:00
Rahul Gusain
54c2fe240a qcacld-3.0: Block NDP_END_ALL req till last NDP_END is received
Firmware sends NDP_HOST_UPDATE event as an immediate response to this
request and starts cleaning peers one by one. Once an NDP session is
ended (indicating NDP_END to peer + internal cleanup), firmware sends
NDP_END_IND to host.
Currently, host driver stops the wait timer and change state from NDP
end to disconnected upon receiving the NDP_HOST_UPDATE. But firmware
might still be in the process of NDP cleanup. As the NDP_END_ALL
context is unblocked, driver may send NAN disable request to firmware.
This may cause inconsistency in firmware state machine and firmware may
drop the ongoing NDP_END request. So, peer doesn't get the NDP_END frame
in such cases.

Unblock the NDP_END_ALL-wait call only upon last NDP_END indication to
avoid such issues. This change moves the major functionality of
NDP_HOST_UPDATE processing to last NDP_END indication. Cleanup/remove
the processing of NDP_HOST_UPDATE as it's not needed anymore.

Change-Id: I19d3e40700c1c0501b9c809820262472bf9bdba4
CRs-Fixed: 3512847
2023-06-02 16:47:31 -07:00
Vinod Kumar Pirla
d018ca19d0 qcacld-3.0: Use backport flag to fill tdls params for 11be
To avoid compile issues where the kernel version doesn't support
11be and WLAN_FEATURE_11BE macro alone can't be used.
Use CFG80211_11BE_BASIC to ensure proper kernel version check for
11be support.

Change-Id: I23a1b6f6e1b46a4ce686d8d1a4152c94922281fc
CRs-Fixed: 3482727
2023-05-25 01:35:21 -07:00
Vinod Kumar Pirla
dc43def130 qcacld-3.0: Use link_info pointer to get vdev from user
With single netdev multi vdev changes, each adapter now can
have multiple VDEVs. To get the right VDEV reference, callers
have to pass the link info corresponding to that VDEV.

Change hdd_objmgr_get_vdev_by_user() API definition to
fetch lock protected VDEV reference from link info
instead of adapter.
The existing callers moved to deflink in adapter.

Change-Id: I3be810994f8768104c9a93491966a13d3b159e5c
CRs-Fixed: 3448468
2023-05-18 23:28:06 -07:00
Aditya Kodukula
4924b2aaf5 qcacld-3.0: Extract vdev extended summary stats event
In case of MLO connection, firmware sends each vdev's status
information via vdev extended stats event. Add support in driver,
to extract that information.

Change-Id: Ia7a0a92baf008e6549830672b68e58be5a8202df
CRs-Fixed: 3483731
2023-05-12 16:37:53 -07:00
Srinivas Girigowda
1a6bd34a09 qcacld-3.0: Add support to query local packet capture status
Add support to query local packet capture status.

Change-Id: I8582b8af89b0582cc94ba04ea3e875916617505b
CRs-Fixed: 3415881
2023-05-10 11:47:16 -07:00
Srinivas Girigowda
e41ef343b8 qcacld-3.0: Handle concurrency scenarios in local packet capture
Handle concurrency scenarios in local packet capture.

Change-Id: Ie464f4f2402e7f67f8eb16738dc107f09293a26b
CRs-Fixed: 3415879
2023-05-10 11:47:10 -07:00
Srinivas Girigowda
faa441c3eb qcacld-3.0: Add support for stop capture
Add support for stop capture.

Change-Id: I809163c033b09239adf79518a4baa40965a29f8f
CRs-Fixed: 3415876
2023-05-10 11:47:04 -07:00
Srinivas Girigowda
72b8810c2c qcacld-3.0: Add support for start capture
Add support for start capture.

Change-Id: I93a15b0bf8b9c26bd53d33378a7daefece448d68
CRs-Fixed: 3415870
2023-05-10 11:46:58 -07:00
Asutosh Mohapatra
4a32419413 qcacld-3.0: Don't start vdev trans if vdev ops is pending
Currently for REASSOC command host starts vdev ops
and tries to use vdev. In parallel if host receives
interface down and starts vdev trans then proceeds
to stop adapter and destroys the vdev, this leads
to null pointer dereference if vdev is destroyed
first.

This happens because driver doesn't wait for vdev ops
to complete after starting vdev trans.

To address this issue, start vdev trans and wait for
vdev ops to complete before proceeding to execute
further.

Change-Id: I363d05f742f7569dffed70cfa9b6bb9a0a766d9e
CRs-Fixed: 3445858
2023-04-27 17:13:38 -07:00
Paul Zhang
790a506ad9 qcacld-3.0: Resolve compile issue for Fillmore
Add macro check about CFG80211_LINK_STA_PARAMS_PRESENT for
function wlan_cfg80211_tdls_extract_eht_params.

Change-Id: I1982d97f06e333936ea45828f5082d322664a2c0
CRs-Fixed: 3479244
2023-04-26 16:51:02 -07:00
Paul Zhang
86e99ec175 qcacld-3.0: Release vdev ref count for TDLS
The vdev ref count does not release properly for
WLAN_OSIF_TDLS_ID, it causes driver crash when
rmmod wifi module.

To address this issue, release the vdev ref count
properly for TDLS module.

Change-Id: I9c206f212ff5ba5a362c91d32519bc7903cbec3d
CRs-Fixed: 3470275
2023-04-19 18:11:38 -07:00
Rahul Gusain
583019cf27 qcacld-3.0: Set NDP state to disconnect if no peers exist
Currently, host driver checks if there are peers present on the NDI
and clean them up as part of NDI cleanup. Cleanup is done in below steps,
1. Set the state to NAN_DATA_END_STATE
2. Send NDP_END_ALL to firmware to end all existing NDP sessions on the
NDI and to cleanup corresponding peers
3. Move the state to NAN_DATA_DISCONNECTED_STATE finally if NDP_END_ALL
goes fine.
But if no peers are present on NDP, none of the above happens and NDI
state stays and doesn't move to DELETED. So, set the NDI state to
DISCONNECTED if no peers are present.

Change-Id: I0d22c240b3e3eee5f62ba8b369bab500e27487b7
CRs-Fixed: 3463614
2023-04-13 13:58:44 -07:00
Jingxiang Ge
fa2c01c5c4 qcacld-3.0: Fix link tx bitrate unknown issue on p2p0
In wlan_hdd_get_station_stats, NULL checking for
pdev_stats fails as it doesn't pass pdev stats info
to hdd layer. stats will not pass to userspace, it will
display tx bitrate unknown in command "iw p2p0 link" or
"iw p2p0 station dump".

issue only happen on p2p0 and not on wlan0. as wlan0 can
use cached stats in __wlan_hdd_cfg80211_ll_stats_get.

Fix is pass pdev stats info to hdd layer in
get_station_stats_cb.

regression cause is:
Iaefc5629872431cbc6c24090b1edb6cebdad995a

Change-Id: I33b608988aa288e0f8139524de5e20fcbba4f2be
CRs-Fixed: 3457955
2023-04-12 22:46:57 -07:00
Paul Zhang
0752365a21 qcacld-3.0: Add logic to support tdls on MLO
Since for MLD device, it can only choice one link for tdls,
add logic like this:
1\ As initiator, it needs to send discovery request on each
link, before send the frame, it needs to force active the link;
2\ As responder, it sends the discovery response the link id,
before send the frame, it needs to force active the link;
3\ For other tdls management and tdls operation, it needs to
find out which link(vdev) is used as tdls link first.

Change-Id: I64e27219eb6c6b3fef62e541423aa8e5d84b1560
CRs-Fixed: 3439568
2023-04-12 01:32:45 -07:00
Paul Zhang
5f512ff2ec qcacld-3.0: Set eht_capable accordingly for TDLS
Set parameter add_sta_params->eht_capable accordingly whether
the peer STA support it or not.

Change-Id: Ib3664be74ece59804321e187fea889610c0a2a86
CRs-Fixed: 3454661
2023-04-10 17:08:13 -07:00
Paul Zhang
b66a27441a qcacld-3.0: Add link id to tdls kernel API
Add link id param to tdls send mgmt and oper request
of kernel API.

Change-Id: I05bd2243ca00c3273b2e99c728940421d0399577
CRs-Fixed: 3439354
2023-04-10 05:44:23 -07:00
Asutosh Mohapatra
18f8997caa qcacld-3.0: Update link peer mac id per ml vdev
Currently host driver doesn't fill peer mac address
per ml vdev for station stats request as part of peer
stats request hence incorrect stats sent to userspace.

To address this issue, save peer mac per ml vdev in
request info structure.

Change-Id: Iebb1b810e112743602607e31d779be2ba1d48f90
CRs-Fixed: 3450665
2023-04-06 23:26:27 -07:00
Yeshwanth Sriram Guntuka
cd67004cbe qcacld-3.0: Send QMI msg to WFDS server on rmmod/SSR
Send QMI misc request message to WFDS server and wait
for response before cleaning up the resources pertaining
to WFDS server on LPASS.

Change-Id: I24bc2295c5a625365a6da95be697c46b08f8b6b7
CRs-Fixed: 3448838
2023-04-06 08:55:29 -07:00
Ananya Gupta
5476fdca6f qcacld-3.0: Use WLAN_DP_ID to get pdev reference
Wrong debug ID is used (WLAN_OSIF_ID) to increment the ref
count of the pdev object when sending tx params update event.
This is causing crash as ref count is decremented using
different id, WLAN_DP_ID.
To fix this, use WLAN_DP_ID to get the pdev object and increment
the ref count of right debug id.

Change-Id: If20fc1a4e4c2a37287f7703aa70bb8dc556f0125
CRs-Fixed: 3453570
2023-04-05 09:03:25 -07:00
Karthik Kantamneni
e0cfa501a1 qcacld-3.0: Init-Deinit changes for WCN6450
Add changes to init-deinit WCN6450 from HDD layer

Change-Id: I0572fa109738326b469bd2b77b9e7c600ac672f8
CRs-Fixed: 3381728
2023-03-27 19:33:15 -07:00
Jyoti Kumari
4ea4347be1 qcacld-3.0: Pass vdev_id as an argument in policy_mgr_get_pcl()
Pass vdev_id as an argument in policy_mgr_get_pcl()

Change-Id: If016b2ad1e47d1d8364037e44bd984e5b95c8d6f
CRs-Fixed: 3412927
2023-03-22 00:40:19 -07:00
Jeff Johnson
21b4a881d4 qcacld-3.0: Remove TDLS_MAX_NO_OF_2_4_CHANNELS
Use of the macro TDLS_MAX_NO_OF_2_4_CHANNELS was removed by the
following patch:
  qcacld-3.0: Process rx_mgmt_pkt based on frequency
  Change-Id Ib063070738ecdb4f83379eafe50629778a490aae

But the macro itself was not removed, so remove it now.

Change-Id: Iae040652e46795add803056bfe63c18de4dfeaf1
CRs-Fixed: 3426257
2023-03-10 22:48:15 -08:00
Yeshwanth Sriram Guntuka
c017966ec1 qcacld-3.0: Use the appropriate msg id macro for WFDS mem ind
Use the appropriate message id macro for WFDS QMI memory
indication.

Change-Id: Ia1b96ce412e8a8c41e1f6bd8145cffe53f1455c8
CRs-Fixed: 3385097
2023-01-31 00:13:51 -08:00
Vinod Kumar Myadam
6b0adfe1d5 qcacld-3.0: Add pwrmode argument to callers
The current channel list alone is not enough to represent the
capability of the chip or device. Given a channel, in many
cases it may be required to know all the power modes that are
supported by this channel.

Add pwrmode argument to callers of wlan_reg_get_opclass_details.

Change-Id: Ia470ae99cb374e4cfdbea8ce77cceabba5c7c959
CRs-Fixed: 3357155
2023-01-30 10:35:57 -08:00
Jinwei Chen
9d3e0bb6dc qcacld-3.0: Inspect TCP TX ACK packet for ILP
Support TX TCP ACK inspection for HW based ILP feature.
use skb->priority bits(24~31) as temporary flag to mark TCP
ACK between hdd_wmm_select_queue() and hdd_hard_start_xmit(),
then mark TCP ACK in skb->cb if hdd_hard_start_xmit() detect
skb->priority for TCP ACK is marked, clean skb->priority upper
8 bits as well.

Change-Id: I9c8a7ff2fd1f8a50a86b68fab3760b86f598fca2
CRs-Fixed: 3368301
2023-01-30 01:33:36 -08:00
Rahul Gusain
b014e14517 qcacld-3.0: Logs optimization in intf del path
Modify the log level from error/info to debug, to reduce logging
time. henceforth, it reduces intf deletion time and enhance the overall
performance of device.

Change-Id: I3498438e07daa97dc5b4805271397205c7aa0cf2
CRs-Fixed: 3389896
2023-01-27 18:06:37 -08:00
Ananya Gupta
605019d3b1 qcacld-3.0: API to send UT commands to LPASS using QMI
Add API to send unit test commands using QMI messages
to generate direct link traffic from LPASS.

Change-Id: I68b69303ef715677f6056c1f6c4d336466720f45
CRs-Fixed: 3362513
2023-01-11 03:46:43 -08:00
Surabhi Vishnoi
114b9dcb49 qcacld-3.0: Fix vdev reference leak in packet capture mode
Currently vdev reference is not released if attribute of vendor
command QCA_NL80211_VENDOR_SUBCMD_SET_MONITOR_MODE is invalid.
Fix this vdev reference leak by releasing the vdev reference in
above error case.

Change-Id: Ib3019dc02b6a3f48fc25f4bbe40e8de9f311a4c6
CRs-Fixed: 3344228
2022-12-30 12:39:26 -08:00
Yu Wang
3911372c3b qcacld-3.0: replace raw cfg80211 vendor APIs with wrappers
Replace cfg80211_vendor_cmd_alloc_reply_skb()/
   cfg80211_vendor_cmd_reply()/
   cfg80211_vendor_event_alloc()/
   cfg80211_vendor_event()/
   kfree_skb()
with internal wrappers
   wlan_cfg80211_vendor_cmd_alloc_reply_skb()/
   wlan_cfg80211_vendor_cmd_reply()/
   wlan_cfg80211_vendor_event_alloc()/
   wlan_cfg80211_vendor_event()/
   wlan_cfg80211_vendor_free_skb().

Change-Id: Ic85e58b5add8d92337ae5f3b29b9fdd15419f570
CRs-Fixed: 3360189
2022-12-22 00:44:38 -08:00
Sheenam Monga
ac14a3912b qcacld-3.0: Send async event to userspace for NAN concurrency
As part of Spatial Reuse, host has to send SR Suspend and resume
events based on concurrency which is not sent in case of NAN
concurrency.

Fix is to send SR Suspend in case NAN comes up and any STA that
supports SR is already present because SR is not supported in
case of NAN concurrency. Similarly during NAN disable check
if any other vdev apart from NAN is sharing mac with STA that
supports SR and SR support on same mac is disabled then don't
send SR resume event as there is already a concurrent vdev that
will take care of SR Suspend event otherwise send SR Resume event.

Change-Id: I56a9b455dd0166bc3997f8306992e46da759e992
CRs-Fixed: 3339713
2022-12-13 17:24:16 -08:00
Yeshwanth Sriram Guntuka
bac8bc45cf qcacld-3.0: Modify the return statuses of OS_IF QMI APIs
Use existing failure return statuses for os_if QMI APIs.

Change-Id: I49abbf8d10f04df3bd4ef7d2796ee72d281409a0
CRs-Fixed: 3356631
2022-12-12 18:38:18 -08:00
Roopavathi Lingampalli
0c616f6306 qcacld-3.0: Add support for flush GRO packets using RX thread
Add support for flush GRO packets using RX thread in OSIF
module.

Change-Id: I776e863d03923bcaac685547d3047df2c8afb27e
CRs-Fixed: 3316855
2022-12-06 07:35:14 -08:00
Yu Wang
2294db2698 qcacld-3.0: fix API mismatch for vendor command processing
Some skb for vendor command reply is allocated with internal
API but reply/free is done with kernel APIs, which will break
the buffer tracking once NBUF_MEMORY_DEBUG and NETLINK_BUF_TRACK
are enabled.

To fix it, replace kernel APIs with internal APIs accordingly:
Replace cfg80211_vendor_cmd_reply() with
wlan_cfg80211_vendor_cmd_reply().
Replace kfree_skb() with wlan_cfg80211_vendor_free_skb().

Change-Id: If4f37b5dca5483a9b64c726d37d3959d3ecd699e
CRs-Fixed: 3350756
2022-12-05 18:42:06 -08:00
Jeff Johnson
9475bedf61 qcacld-3.0: Fix os_if documentation
The kernel-doc script identified documentation issues in the os_if
layer, so fix them.

Change-Id: I71dd7893776e4b49a80f6be186740967b08d3347
CRs-Fixed: 3341451
2022-11-26 15:51:20 -08:00
Yeshwanth Sriram Guntuka
bff1e3aa36 qcacld-3.0: Add support for DP QMI WFDS client
Add support for QMI client for WiFi Driver
Service (WFDS) in DP component.

Change-Id: Id0a8a51c32aa9f058e57e622b3ad65d405806148
CRs-Fixed: 3328386
2022-11-23 13:54:33 -08:00
Yeshwanth Sriram Guntuka
c589e67a42 qcacld-3.0: Add QMI files for WFDS service
Add initial version of QMI files that are used for
communication between WLAN host driver on APSS and
WiFi driver on LPASS.

Change-Id: If7352490d73457479e85958b90066f9c397bb310
CRs-Fixed: 3328378
2022-11-23 00:30:07 -08:00
Yeshwanth Sriram Guntuka
d2cc52d5ae qcacld-3.0: Add support for QMI component
Add support for QMI component.

Change-Id: I63735800ea1166e875ff12bfd22df3c3d9c6312f
CRs-Fixed: 3337043
2022-11-23 00:30:01 -08:00
Yu Wang
c52981a091 qcacld-3.0: fix vdev ops leak in mic error handler
There is a vdev ops leak when processing mic error, which
will block some other operations, such as idle shutdown,
recovery shutdown, and so on.
To fix it, add osif_vdev_sync_op_stop() in
osif_dp_process_mic_error().

Change-Id: Ida8d73a8e245834a282005501770bd893dad21c8
CRs-Fixed: 3336117
2022-11-17 13:47:20 -08:00
Jeff Johnson
4c279e027f qcacld-3.0: Fix wlan_cfg80211_tdls.h documentation
wlan_cfg80211_tdls.h has a few documentation issues, so fix them.

Change-Id: I60533048f1a3a1eff03f597b34b193ba1d292c96
CRs-Fixed: 3324161
2022-11-08 03:24:35 -08:00
nakul kachhwaha
080c69ef81 qcacld-3.0: Handle new attribute to support flexible TWT
Parse new nudge attribute to support flexible TWT.
This attribute is optional and will override wake
duration attribute if provided.

Change-Id: I16bbd5e4c78e5471cdccad4ebe43049d4f85e829
CRs-Fixed: 3265813
2022-11-02 01:47:24 -07:00
Jeff Johnson
b722a6da29 qcacld-3.0: Fix new misspellings in wlan_cfg80211_tdls.c
The following change introduced new misspellings into
wlan_cfg80211_tdls.c, so fix them.
- Change-Id I3a1a05961bb5e747d946ffa8314319f898ef7b97
  qcacld-3.0: Link params embedded in station param struct

Change-Id: Idf4f214f5e9e4656b241f8de015fc49d64fc4852
CRs-Fixed: 3319365
2022-10-27 17:49:17 -07:00
Rahul Gusain
38d541df76 qcacld-3.0: Make NAN high priority than TDLS in legacy platforms
Firmware handles all NAN concurrencies in the platforms which
don't advertise the WMI service cabability
WMI_SERVICE_NAN_DISABLE_SUPPORT. Host takes care of the NAN
concurrency if the capability is advertised by firmware.
But there can be some legacy targets where firmware wants to
offload NAN+TDLS concurrency alone to the host and it takes care
of rest of the concurrencies. This is to make NAN of higher
priority and disable TDLS when NAN is active. Currently, TDLS is
of more priority than NAN and it can't change the order as it
can't disable TDLS to change the priority.

Currently, driver doesn't parse the NAN messages(even NAN enable
request) in such platforms. Parse the NAN messages and disable
TDLS upon NAN enable request. Rely on NAN state machine to
allow/disallow new TDLS requests. This needs NAN enable status.

Change-Id: Ie9c7c1cc2f1ed6328a31b93077c2928940fc3450
CRs-Fixed: 3263730
2022-10-26 18:47:42 -07:00
Vinod Kumar Pirla
8c5680c852 qcacld-3.0: Link params embedded in station param struct
In kernel 5.15 and above a new member is introduced in
station_parameters structure to move link specific variables.

This change will port the driver code to make it compatible.

Change-Id: I3a1a05961bb5e747d946ffa8314319f898ef7b97
CRs-Fixed: 3304240
2022-10-17 19:59:21 -07:00
Nirav Shah
2e86058c4a qcacld-3.0: Handle twt renegotiation failure scenario
Handle twt renegotiation failure scenario when there is
error reported by firmware as part of
wmi_twt_ack_complete_event_id event.

Change-Id: I91e4bfd8f08ae81b474354c90ab8c770dcdfe19b
CRs-Fixed: 3297783
2022-10-17 03:02:15 -07:00
Yu Wang
61d6a7e8d1 qcacld-3.0: print SSID with QDF_SSID_FMT and QDF_SSID_REF
To protect user privacy, print SSID with QDF_SSID_FMT
and QDF_SSID_REF, then SSID will be hide in logs if
anonymization is enabled.

Change-Id: I3dd129b52c85c84e666f4f07b28a1e58f81259b7
CRs-Fixed: 3291841
2022-10-14 08:31:04 -07:00
Yu Wang
ad3a8266f9 qcacld-3.0: fill vdev and pattern id for CoAP offload reply enable request
Pattern id and vdev id are not filled explicitly for
CoAP offload reply enable request, which will cause
failure when the ids are not 0.
To fix it, fill the vdev id and pattern id accordingly.

Change-Id: I74b4b26d08e48e9d08d041293cff6f4ab92272e1
CRs-Fixed: 3310734
2022-10-12 15:04:03 -07:00