Commit Graph

262 Commits

Author SHA1 Message Date
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
Jeff Johnson
c9693d2e8b qcacld-3.0: os_if: Fix misspellings
Fix misspellings in os_if/...

Change-Id: I040d4344f0065b1045e5ac7037c70123ca4231ef
CRs-Fixed: 3303622
2022-10-05 13:05:45 -07:00
Amit Mehta
a518794bf5 qcacld-3.0: Pointer dereference and resource leak issue fix
Add changes to fix issues:
1. Read from pointer after free
2. Dereference before null check
3. Resource leak

Change-Id: Ie1b18abaa99e9ea168ded897e3f3e9c4cf33fb59
CRs-Fixed: 3295237
2022-09-22 12:15:20 -07:00
Ashish Kumar Dhanotiya
f39a68fc05 qcacld-3.0: Process tx and rx rate count from peer stats
Based on the new requirement process tx and rx rate counts
from peer stats response and send these stats to user space
as part of big data stats.

Change-Id: Ie442c0e37fcae8af92796032ff6a042d983c8742
CRs-Fixed: 3289741
2022-09-17 01:10:57 -07:00
Ashish Kumar Dhanotiya
c8d57a7023 qcacld-3.0: Parse tx and rx packet per MCS from peer extd stats
Based on the new requirement, fw fills the tx packet counts per mcs
and rx packet count per mcs index in the peer extd stats event.
Add logic to parse tx packet count per mcs and rx packet count per mcs
from peer extd stats event.

Change-Id: I4cd8c1ed5dd6942022d9f930f8de0bcbcb679eb5
CRs-Fixed: 3289683
2022-09-16 19:38:41 -07:00
Liangwei Dong
86a7824781 qcacld-3.0: Fix vdev count leak in pre CAC
At present Pre CAC work queue callback pre_cac_handle_failure
doesn't release the vdev ref count. And the pre_cac_handle_radar_ind
doesn't take ref count before schedule work pre_cac_work.
To fix inconsistency by using psoc as work queue callback parameter
and get pre CAC vdev id from psoc context.

Change-Id: I65339ca9f3ac4b91faf31090978337d041320f99
CRs-Fixed: 3288125
2022-09-13 13:51:11 -07:00
Bing Sun
6f0b46b9f1 qcacld-3.0: Indicate more HE capabilty information to SON
HE MCS map, full bandwdith UL MU-MLMO supported, partial bandwidth
UL MU-MLMO supported and partial bandwidth DL MU-MLMO are needed by
EasyMesh agent when sending AP capability report to EasyMesh
controller.

Indicate these information to SON.

Change-Id: Icbf5cb5d7a313568c6a0c1b9a3d70f1f8af4d40e
CRs-Fixed: 3278853
2022-09-09 22:25:48 -07:00
Deeksha Gupta
cbf711498e qcacld-3.0: Inform frame via assoc link net device even in other interface
As per single netdev design, if the frame is received on the
on link vdev then retrieve assoc link net device and use that
to send the frame to userspace.

Change-Id: I85b2f7363cfb237877ca945c9b627f2bf89d0f54
CRs-Fixed: 3272194
2022-08-27 13:48:20 -07:00
Wu Gao
245cdcb31c qcacld-3.0: Correct the method to parse TDLS supported channels
It reads supported channels incorrect and cause setup TDLS link off
channel failed. This change uses correct method to parse TDLS supported
channels.

Change-Id: I0c605497df1c50aadc276634f641aa6c37c6932a
CRs-Fixed: 3265112
2022-08-25 22:09:28 -07:00
Jeff Johnson
4b47333a44 qcacld-3.0: Fix misspelling "firmare"
Fix misspelling: firmare ==> firmware

Change-Id: I625443e4333b1c9326fff93ab3f4beed2d08cc01
CRs-Fixed: 3274602
2022-08-25 22:09:22 -07:00
Yu Wang
10b9de1c0f qcacld-3.0: free osif request in wlan_cfg80211_coap_cache_get_cbk()
The osif request allocated in wlan_cfg80211_coap_cache_get_cbk()
is not freed for cases other than completed case, which will
result in memory leak in those cases.
To fix it, free osif request for all the cases.

Change-Id: I17998d0fb39e75b8b5f52a26d351056222c95536
CRs-Fixed: 3275889
2022-08-25 19:14:55 -07:00
Amit Mehta
cf37b0c153 qcacld-3.0: Add NULL check for return value
Currently at multiple places there is no
NULL check for return value which might
result in NULL pointer dereference.
Add NULL check for return value to avoid any
NULL pointer dereference.

Change-Id: I986a48d9649b67cb5a078ec38eea64da4ef9244e
CRs-Fixed: 3273489
2022-08-25 17:40:43 -07:00
Yu Wang
0cf0e65f75 qcacld-3.0: implement os if layer for CoAP component
Add os if layer for CoAP(Constrained Application Protocol)
component. It provides interfaces to parse netlink messages
for vendor command QCA_NL80211_VENDOR_SUBCMD_COAP_OFFLOAD
and take action accordingly, including enable/disable offload
reply/periodic transmitting for CoAP messages, and fetching
CoAP messages those cached during offload processing.

Change-Id: Ibbf9baf3802d305f9989e024ce764a6071b1fc6b
CRs-Fixed: 3254541
2022-08-21 22:18:18 -07:00
Xiaoning Ma
a7fcc140bb qcacld-3.0: Add fixed FDD mode to btc_chain_mode
Previously when chains of BT and WLAN 2.4 GHz are separated,
hybrid mode will be used for BTC. Now adding fixed FDD mode
to fulfill different BTC scenarios.

Change-Id: I3a4d6919319f0f66e6b816566f24f4ac11b2c669
CRs-Fixed: 3244045
2022-08-19 01:53:35 -07:00
Lin Bai
3e29620e42 qcacld-3.0: Add log when caching cmd during SSR
Add log when caching any north band cmd.

Change-Id: I0eb12a720334056b19bc420d6a17afe4564a7c1c
CRs-Fixed: 3267824
2022-08-16 03:02:21 -07:00
Paul Zhang
25e3dfc1ee qcacld-3.0: Enhance congestion report
Enhance congestion report by pdev extend stats.

Change-Id: Ica61112f95e6264db5b46db807e1f5df04b26c98
CRs-Fixed: 3234080
2022-08-03 01:34:02 -07:00
Bing Sun
f967191903 qcacld-3.0: Add parameter to skip 6 GHz chan for SON
EasyMesh spec does not support 6 GHz officially. Our EasyMesh application
only supports 6 GHz in very new version.
Add parameter for the interface between SON and Wlan driver, so that
including 6 GHz or not can be configurable.

Change-Id: I37b07697200747521bec598806cb533774fa3a91
CRs-Fixed: 3256469
2022-08-02 05:15:48 -07:00
Divyajyothi Goparaju
487d2210e2 qcacld-3.0: Avoid illegal memory access
Currently In os_if_monitor_mode_configure API,
tb attribute is getting accessed before parsing
the data coming from userspace.
This is leading to illegal memory access.

Move tb attribute access after parsing userspace
data with API wlan_cfg80211_nla_parse.

Change-Id: Ia972ebb87e18ed82c6c3a2ff3ce2d10a4b9685b9
CRs-Fixed: 3241952
2022-07-23 17:31:48 -07:00
Amit Mehta
08f5a4c814 qcacld-3.0: Move Enable detection of data stall events to DP component
Move change: Id4fd7f10f0806a39c5bdb7b8c097c26894dc5340
Enable detection of data stall events to DP component

Change-Id: I9eab2f29739cd0159f202a3a95f4a4baa70cb47d
CRs-Fixed: 3230891
2022-07-18 14:20:01 -07:00
abhinav kumar
6971eebe61 qcacld-3.0: Process CP stats response while roaming
Scenarios are:
1. Host receives ROAM_START from firmware
2. Host receives EAPOL M1 from AP, host forwarded
   it to supplicant and supplicant buffered it (with
   timer 100 msec) to process it after association
   completion.
3. Host starts processing CP stats request, which
   holds RTNL kernel lock
4. Host starts a CP_STATS_WAIT_TIME_STAT (800 msec)
   timer and sends WMI_REQUEST_STATS_CMDID to FW.
   So cp stats are holding the RTNL lock.
5. In waiting state host/FW completed roaming within
   a few milliseconds. Host Call roamed indication
   to the kernel. Kernel post it to the Work queue
   to indicate this to the supplicant. The Work
   queue requires the RTNL lock to send the
   indication to the supplicant.
6. Now Kernel is waiting on the RTNL lock taken by
   the CP stats request which is waiting for the CP
   stats response (WMI_UPDATE_STATS_EVENTID).
7. Host receives CP stats response but the host is
   unable to handle it with the below reason.
8. Timed out happens for WMI_UPDATE_STATS_EVENTID,
   then Kernel takes RTNL lock to indicate
   association/roam completion status to the
   supplicant.
9. As Kernel is sending association indication
   after CP_STATS_WAIT_TIME_STAT (800 msec), by
   this time supplicant deleted buffered EAPOL
   first frame, this results in DUT failing to
   initiate the 4-WAY handshake.
10. Finally AP sends the Deauthentication frame
    to DUT.

Reason for unable to process CP stats response :
As per the current design, While processing Roaming,
the host deletes the old peer and creates a new peer
for roamed AP. If the Host receives cp stats response
after peer delete due to roaming, the host is unable
to stop waiting for timer CP_STATS_WAIT_TIME_STAT
and fails to release RTNL kernel lock till timeout.
After time out only, Kernel can take RTNL lock to
indicate association/roam completion status to the
supplicant.

Fix is to stop the wait timer CP_STATS_WAIT_TIME_STAT
and release RTNL kernel lock even in case peer has
deleted by HOST for which CP stats request sent.

Change-Id: Ie5b5275da10a06da50b2fbb8ab206b78f2c64d6a
CRs-Fixed: 3234063
2022-07-12 17:18:23 -07:00
Yeshwanth Sriram Guntuka
6529648bf3 qcacld-3.0: Move TC based dynamic GRO logic to DP component
Move TC based dynamic GRO logic to DP component.

Change-Id: I3c6658e8f19a71e548c77ff6fd637148925008d7
CRs-Fixed: 3219451
2022-07-11 13:04:51 -07:00
Utkarsh Bhatnagar
57f0e9e475 qcacld-3.0: Use freq to process Tdls peer supported chans
With introduction of TDLS on 6 GHz, some of the channels
that peer can support will be same for 6 GHz band other
bands. So, extract frequency by using peer supported
operating class and supported channel list which can
be used for further processing.
If channel numbers are used then the duplicate channel
numbers are removed which may lead to skipping 6 GHz
supported channels.

Change-Id: Ic6838d05c3dab5a0cc17483890b83805e076684c
CRs-Fixed: 3233999
2022-07-07 17:46:21 -07:00
Utkarsh Bhatnagar
4d9e51e8a7 qcacld-3.0: Allow TDLS connection in wideband only if fw supports
Irrespective of 6 GHz, wideband can be supported.
So, Allow TDLS connection in wideband only if FW supports TDLS
on 6Ghz.
If Fw doesn't support wideband then restrict the TDLS connection
BW to APs Bw.

Change-Id: If726233f381921a8eda25ac7a2705942db79d410
CRs-Fixed: 3223760
2022-06-30 10:53:58 -07:00
Roopavathi Lingampalli
1045583fda qcacld-3.0: Fix for osif mic error handler
Fix for osif mic error handler support for DP
componentization.

Change-Id: I3c42263a343d100dfa501c068e8521d379e726ff
CRs-Fixed: 3229534
2022-06-27 13:57:39 -07:00