Commit Graph

212 Commits

Author SHA1 Message Date
Utkarsh Bhatnagar
5b8626946b qcacld-3.0: Allow TDLS connection on 6GHz only if fw supports
Allow TDLS connection on 6GHz only if FW supports TDLS on 6GHz.

Change-Id: I663bd6d73235664c21029d8956f465da5a5b39c6
CRs-Fixed: 3223677
2022-06-25 03:03:20 -07:00
David Oladunjoye
312cde3e1e qcacld-3.0: tdls: Replace fallthrough comment with attribute
-Wimplicit-fallthrough is being enabled by default. Some compilers
such as clang require the attribute instead of just a fallthrough comment.

Change-Id: Icdb1590b51cf172728c3b484f05d20c49e68c38e
CRs-Fixed: 3217422
2022-06-24 23:27:33 -07:00
Roopavathi Lingampalli
1986ba636a qcacld-3.0: Modified osif Mic error handler support
Combined dp process mic error support for both SAP
and STA interfaces into one API for DP component

Change-Id: Ic78675d4bfdd5b5cc995505bcbf9862711c5ba24
CRs-Fixed: 3226471
2022-06-24 14:14:11 -07:00
Rahul Gusain
bfc2c02560 qcacld-3.0: Remove the dependency on NDI name
Currently in driver, NAN Data Interface can be created with
only name "aware_data" which creates dependency on interface name.

To remove the dependency, the interface is created now by name
provided by Wifi-HAL.

For this, interface is created in STA mode with name provided by
WiFi-HAl. While processing  vendor cmd QCA_NL80211_VENDOR_SUBCMD_NDP,
given ifname is searched in adapter list and mode is changed to NDI.

CRs-Fixed: 3196179
Change-Id: I62dd512f8a7de4c69a53babf3112942d348bf3b6
2022-06-13 15:06:26 -07:00
Jyoti Kumari
72c3404391 qcacld-3.0: Handle TWT renegotiation failure case
Generally below process should happen in renegotiation failure
case.
1. TWT setup (successful)
2. TWT setup (renegotiation failure)
3. TWT teardown
4. TWT GET STATUS - 0(dialog ID) 0 0 0
5. TWT setup - successful

Since all WMI TWT events gets executed in WMI thread. So when
renegotiation failure case hits, driver sends TWT
teardown to firmware and waits for twt ack in worker thread.
In same worker thread TWT event needs to be processed.
TWT ack event will not process as it's waiting in same worker
thread and it will get timedout.

As part of fix, break the context in renegotiation and
send the teardown in the new worker context.

Change-Id: I13c8d44d6582e39d1cc2c2aa10a500fffbf150b1
CRs-Fixed: 3204750
2022-06-10 18:58:11 -07:00
Jianmin Zhu
fe97424641 qcacld-3.0: Check FTM mode in vendor cmds handlers
Vendor commands of wiphy aren't initialized when driver load as FTM mode,
if changed to mission mode later with following cli:
echo 0 > /sys/module/wlan/parameters/con_mode,
vendor commands of wiphy keep uninitialized, wpa supplicant can't get
roam offload status by QCA_NL80211_VENDOR_SUBCMD_GET_SUPPORTED_FEATURES,
so PMK isn't sent to driver/firmware,  roam offload failed.

To fix it, remove QDF_GLOBAL_FTM_MODE check in wlan_hdd_cfg80211_init, let
vendor commands of wiphy initialized in FTM mode too when driver load.
But in each vendor cmd, check FTM mode when called, if FTM mode, return
-EPERM.
When driver is changed to mission mode, all interfaces are deleted and
re-added by driver, when interface added event is received by
wpa supplicant,  QCA_NL80211_VENDOR_SUBCMD_GET_SUPPORTED_FEATURES is
called again to get roam offload enabled status, PMK will be sent to
driver and firmware when RSO start, roam offload will work.

Change-Id: Ie0c868ebd4b7e356d72a154206b13df94f378188
CRs-Fixed: 3213221
2022-06-07 10:53:34 -07:00
Dundi Raviteja
2bbdc1835e qcacld-3.0: Move pre cac success code to pre cac component
Move pre cac success code to pre cac component.

Change-Id: I9d4f6c52ada96905e185fecef6556c59e05ab284
CRs-Fixed: 3199947
2022-05-29 22:51:50 -07:00
Paul Zhang
adc7c05154 qcacld-3.0: Add sanity check when get STA stats
If macro WLAN_FEATURE_11BE_MLO is enable, get_station_stats_cb for
TYPE_STATION_STATS is called only if last_req->ml_vdev_info.ml_vdev_count
none zero when WMI_UPDATE_STATS_EVENTID event comes back.

This causes timeout and fail to get station stats for legacy device or for
MLO device which does not set last_req->ml_vdev_info.ml_vdev_count.

To resolve this issue, add sanity check legacy device before invoking the
callback and set last_req->ml_vdev_info.ml_vdev_count if it is MLO device.

Change-Id: I8ca325482fc32de87cbedcba7d4af17d3876cbbc
CRs-Fixed: 3202588
2022-05-27 18:06:14 -07:00
Dundi Raviteja
b59f96fb33 qcacld-3.0: Add osif callbacks for pre cac
Add osif callbacks for pre cac component.

Change-Id: Ic49f61c413e4630bba8fd2e5ff3e69560fb52b52
CRs-Fixed: 3174540
2022-05-17 22:57:53 -07:00
Roopavathi Lingampalli
881a91c93b qcacld-3.0: Fix compilation issue related to DP component
Fix compilation issue related to cfg80211_rx_control_port
API in DP component

Change-Id: I9bff854197eb2baae333b54b338141ffa5c6b012
CRs-Fixed: 3194152
2022-05-11 14:57:00 -07:00
Karthik Kantamneni
0bca3b0867 qcacld-3.0: Add OSIF support for lro feature in DP component
Add OSIF support for lro feature in DP component

Change-Id: I3e31d5812772aed8e947b39d98008d1ec980e9ab
CRs-Fixed: 3173456
2022-05-04 23:18:54 -07:00
Karthik Kantamneni
06c7a820cf qcacld-3.0: Add OSIF support for DP component TX/RX path
Add OS interface calls support for DP component TX/RX path

Change-Id: I2ca9570d7d0759a76d686117bcf5569d11b06904
CRs-Fixed: 3173463
2022-05-04 19:49:33 -07:00
Amit Mehta
3cdb874884 qcacld-3.0: Add get and set stats API to DP component
Add Get and Set stats API.

Change-Id: Ie00e973234d14e4110f8e028600d8a52728b29d6
CRs-Fixed: 3165194
2022-05-04 18:28:38 -07:00
Amit Mehta
a4db80f465 qcacld-3.0: Add target_if API implementation to DP component
Add target_if API to send ARP request, LRO config and
DHCP indiacation to firmware.

Change-Id: I2d4af7a5da6c29398ab00205654df9be3d90b665
CRs-Fixed: 3165155
2022-05-04 17:09:52 -07:00
Amit Mehta
72f7ef77cb qcacld-3.0: Add NUD Tracking APIs to DP component
Add NUD tracking APIs to DP component

Change-Id: Ib1dccb041b4fc50a2fc4b7eaba9eed6dfc80ea4d
CRs-Fixed: 3165120
2022-05-04 17:09:47 -07:00
Amit Mehta
30c5e2a0fa qcacld-3.0: Add MIC handling to DP component
Add MIC handling and periodic stats display API
in DP component

Change-Id: I5648b9ebe5bd529a83e607b07621c9867d19d402
CRs-Fixed: 3165076
2022-05-04 15:47:27 -07:00
Amit Mehta
e52153adec qcacld-3.0: DP Component Add bus bandwidth manager API
Add bus bandwidth manager API to DP component

Change-Id: I7e37b2687ec8092c5d437fb4d4bee5b1cda1670c
CRs-Fixed: 3164998
2022-05-04 13:05:22 -07:00
Amit Mehta
ed6a29b31c qcacld-3.0: add osif API to send tcp param update
Add new osif API to send TCP param update.

Change-Id: I487fabb53364703272f7e123802ecdb5fd77c3e8
CRs-Fixed: 3164977
2022-05-04 13:05:17 -07:00
Jia Ding
0e8a200692 qcacld-3.0: Support tx_bitrate for SON node info
tx_bitrate is used as indication of macThroughputCapacity in transmitter
link metric for backhaul STA link.

tx_bitrate is added in wlan_node_info structure and os_if interface is
exposed so that SON module could get the tx_bitrate parameter.

Change-Id: Ib9949906b3247519bf8c1ce786d6b93d38d4d8ea
CRs-Fixed: 3154548
2022-04-29 00:57:40 -07:00
David Oladunjoye
a55c5f6b53 qcacld-3.0: Add mapping for WMI to Host TWT nudge status
Add mapping for WMI_NUDGE_TWT_STATUS_ALREADY_PAUSED on host side

Change-Id: I4109677a55cf6eaa421c5a881ec18cf6e2add375
CRs-Fixed: 3181041
2022-04-27 21:24:03 -07:00
Rahul Gusain
8b3684b10a qcacld-3.0: Check for NAN state only if NAN SM is in host
A check is added recently to avoid creating NDI if NAN is not in
enabled state. This is to avoid wastage of resources(vdev, peers,..)
in firmware.But this check is valid only for the platforms where NAN
statemachine is in host driver. This check is not valid for legacy
platforms where NAN state machine is in firmware. Bypass the same
for legacy targets.

CRs-Fixed: 3178939
Change-Id: I1475b4313d1e7ac2c05d5edd215e929f3eb6335e
2022-04-27 10:28:04 -07:00
Bing Sun
4397d7dc97 qcacld-3.0: Add new API to get connected sta rssi and data rate
Add new API for SON to get connected sta rssi and data rate.

Change-Id: Icd8ed9b6e4462b4898b32d28d9fa3f4e2fbc230d
CRs-Fixed: 3180267
2022-04-26 07:03:32 -07:00
Vishal Miskin
d75a1c786c qcacld-3.0: Add support for QCA_WLAN_TWT_SET_PARAM command
Add support for QCA_WLAN_TWT_SET_PARAM command to configure
QCA_WLAN_VENDOR_ATTR_TWT_SET_PARAM_AP_AC_VALUE attribute.
This attribute provides access category value for
WMI_PDEV_PARAM_TWT_AC_CONFIG. This is used by firmware to
configure access category for TWT HW queue in TWT Responder
mode(SAP).

Change-Id: I5131967ff2061bf6afad7bc5f091a7eb5ee01b8a
CRs-Fixed: 3168197
2022-04-26 07:03:27 -07:00
David Oladunjoye
377dfe07b5 qcacld-3.0: Update error code for TWT setup for STA disconnected state
Expected error code is not returned for TWT setup with no
associated AP. Error code has been updated to correct value.

Change-Id: I5234026410a1bcfaf1151c6b7da272a1784d3fe3
CRs-Fixed: 3181078
2022-04-25 18:41:56 -07:00
Amit Mehta
5116bc8f8f qcacld-3.0: Add DP Component Skeleton code
Add new files and Skeleton code for DP component.

Change-Id: I6bfe59f31b292b77bbd728423a4ed53c3e4d1c2f
CRs-Fixed: 3164956
2022-04-21 07:24:26 -07:00
Nirav Shah
ebe117b4b2 qcacld-3.0: Add support for QCA_WLAN_VENDOR_ATTR_TWT_SETUP_ANNOUNCE_TIMEOUT
Add support for QCA_WLAN_VENDOR_ATTR_TWT_SETUP_ANNOUNCE_TIMEOUT
attribute as part of TWT setup command. This attribute is used
to configure the announce timeout value (in us) in the firmware.
This timeout value is only applicable for the announced TWT. If
the timeout value is non-zero, the firmware waits up to the
timeout value to use Data frame as an announcement frame. If the
timeout value is 0, the firmware sends an explicit QoS NULL frame
as the announcement frame on SP start.

Change-Id: Idf564813487b8157f05265dc73ef7a9a1c31d9e2
CRs-Fixed: 3168235
2022-04-19 10:45:42 -07:00
Divyajyothi Goparaju
bce9e688e7 qcacld-3.0: Add firmware_default mode support for elna_bypass
Previously elna_bypass is of type bool, which check for
elna_bypass enabled or disabled with en_dis

Change en_dis to elna_mode of enum extlna_mode
to support extra mode of firmware_default

Change-Id: I12dfe3a07e04b102562b11c8235d56bd3e2a7059
CRs-Fixed: 3169266
2022-04-15 05:11:35 -07:00
Utkarsh Bhatnagar
8af8418afd qcacld-3.0: Correct the condition to reject TDLS
Reject any incoming get_all_peers TDLS command if there
are any currently in progress.
The later commands will only be processed once the earlier
commands finish, since they are processed sequentially.
However, once a command finishes, the memory allocated for
it from userspace is freed up. Each command is passed the
same address so the later commands will end up writing to
a freed address. To avoid this, reject incoming requests
if there are any still in progress.
For this, the condition should be corrected.
We shouldn't use completion_done here for checking for
completion as this will always return false, as
tdls_user_cmd_comp.done will remain in init state always.
So, the very first command will also not work.
In general completion_done is used to check if there are
multiple threads waiting on the complete event that's
why it will return true only when tdls_user_cmd_comp.done
is set with complete().
Also, if the state is in wait_for_completion, this function
will return true after the wait timer is over or condition
is met as wait_for_completion will hold out the hold lock
and will will prevent completion_done from returning.
Better to use a flag to determine command condition.

Change-Id: I1b6b270dbb9b0b103f10e7ae22a60030ea2fbb98
CRs-Fixed: 3162184
2022-04-14 14:55:03 -07:00
Bing Sun
6df47a0d95 qcacld-3.0: Add API to get max mcs index
Add a new field max_mcs_index in mlme_legacy_priv to save max mcs
index of current vdev.
Add a new field max_real_mcs_idx in hdd_station_info to save max
mcs index of the connected station.

Change-Id: I28908515cbe5c18c79f14f8645defd5c82e3a6f0
CRs-Fixed: 3065838
2022-04-12 06:31:07 -07:00
Zhaoyang Liu
46d2c60297 qcacld-3.0: free allocated memory for failure case
When obtaining twt session traffic statistics,
some allocated memory not freed for failure case.
Fix it to avoid memory leak.

Change-Id: I18ce45467c3600c3f62b23ab50582ecb40ced88d
CRs-Fixed: 3169747
2022-04-11 21:07:53 -07:00
Ashish
4bc1f3cb67 qcacld-3.0: Update data type of iface name to const for NAN
Currently driver code has data type as char* for NAN related code.
With this change update this data type as const char*.
Also, move NAN related functions under WLAN_FEATURE_NAN feature flag.

Change-ID: I61ad10304be4399a68f32778d01d9a951d7d14bb
CRs-Fixed: 3169168
2022-04-11 19:47:10 -07:00
Ashish
cede71c355 qcacld-3.0: Add/del virtual iface using NL commands for NDP
Currently host driver creates/deletes NDI interfaces using
vendor command. With the kernel 5.12 version onwards,
interface creation/deletion is not allowed using vendor
commands as it leads to deadlock when driver tries to acquire
the RTNL_LOCK at the time of netdev register/unregister.

With this change, add support to Create and delete NDI interface
using NL80211_CMD_NEW_INTERFACE and NL80211_CMD_DEL_INTERFACE
commands respectively if driver advertises
QCA_WLAN_VENDOR_FEATURE_USE_ADD_DEL_VIRTUAL_INTF_FOR_NDI capability.
Since NL80211_CMD_NEW_INTERFACE and NL80211_CMD_DEL_INTERFACE
already comes with the rtnl lock and driver does not need to
take the rtnl lock again which will help to avoid the above issue.

Change-Id: I6d5441a5e883de1222f105f26d73cb0506d16ddf
CRs-Fixed: 3167125
2022-04-11 19:46:27 -07:00
Bing Sun
c3ffae69da qcacld-3.0: Do not indicate 80+80 channel width to EasyMesh
MCC does not support 80 + 80 channel width, Do not indicate it
to EasyMesh.

Change-Id: I2743b27b86f1a118789d72c6e8b6690262c7c654
CRs-Fixed: 3158366
2022-04-08 00:43:08 -07:00
anikkuma
05c26a216a qcacld-3.0: Add support for getting AP capabilities
Add support for sending the AP capabilities to SON module

Change-Id: I9308608e321aa21f6e0566958508ceaf78c5635b
CRs-Fixed: 3154537
2022-03-23 07:43:38 -07:00
Lincoln Tran
3c8477cf9f qcacld-3.0: Reject TDLS cmd if still in progress
Reject any incoming get_all_peers TDLS command if there are any
currently in progress.

The later commands will only be processed once the earlier commands
finish, since they are processed sequentially. However, once a
command finishes, the memory allocated for it from userspace is freed
up. Each command is passed the same address so the later commands will
end up writing to a freed address. To avoid this, reject incoming
requests if there are any still in progress.

Change-Id: I6970e3b73c6ce5afc921edaaf477825928800342
CRs-Fixed: 3150044
2022-03-23 02:11:56 -07:00
Bing Sun
ebd3d8258e qcacld-3.0: Fix build error for SON module
Fix some build errors for SON module when SON Macro is enabled

Change-Id: I2d7336e551870e91024a259698c740319dd1b639
CRs-Fixed: 3150082
2022-03-15 22:09:17 -07:00
David Oladunjoye
a26ed5042c qcacld-3.0: Send TWT teardown if power save mode is disabled
When power save mode is disabled, TWT is also disabled. All existing
TWT sessions must be removed.

Change-Id: I7c1ceb7abbfea0205e65a038fdf8d574b797685e
CRs-Fixed: 3147231
2022-03-15 07:37:42 -07:00
Deeksha Gupta
777ebf8d3a qcacld-3.0: Handle status code for TWT Notify event
Handle status code for TWT Notify event

Change-Id: Icc802a19eaac3ccd92dc6447ed0f797ea43ff454
CRs-Fixed: 3138650
2022-03-14 07:28:18 -07:00
Zhaoyang Liu
91e5d73b13 qcacld-3.0: add band 6ghz flag to fix building error
Default kernel version 5.4 not support all 6GHz changes,
and msm-5.4 kernel introduced below commit to do backport:
Git-commit: 3290a9818c538b88d4e75b5891fa530e9142c219.

This causes building error on third party platform with
kernel version 5.4. Fix it with adding CONFIG_BAND_6GHZ flag.

Change-Id: I967a5e5c1ab3b3bc349f2685950f3bfe6b33255e
CRs-Fixed: 3148383
2022-03-10 11:12:14 +08:00
Jyoti Kumari
4085f1d96d qcacld-3.0: Release vdev ref count in twt complete callback api
Vdev ref count is not released after acquired in both success and
failure case in osif_twt_notify_complete_cb().

Release vdev ref count in both success and failure case.

Change-Id: I54ba4bdeb0ac5a6965a674e4c3dc5d0d8d6992bc
CRs-Fixed: 3143718
2022-03-08 13:03:59 -08:00
Divyajyothi Goparaju
c2ce55350a qcacld-3.0: Remove peer check from bmiss stats
Currently in station disconnect state, host doesn't request
bmiss stats from firmware.
Remove peer check to get bmiss stats in station disconnect
state also.

Change-Id: I6268f8af7daf7a90f9ae8a5d24ae17256ff3e76c
CRs-Fixed: 3127834
2022-03-07 23:46:02 -08:00
Rachit Kankane
95c7d2ecf8 qcacld-3.0: Add peer ops support for SON
Add support for below SON peer ops:

PEER_SET_KICKOUT
PEER_SET_EXT_STATS
PEER_REQ_INST_STAT
PEER_GET_MAX_MCS

Change-Id: Iafadd17d6a13cfbba2884e50a0432c34115cd7f7
CRs-Fixed: 3141862
2022-03-07 19:07:52 -08:00
Rachit Kankane
5a17d9e4e9 qcacld-3.0: Update GENERIC_DATA length and Kbuild
Update Kbuild with SON binaries based on SON config flag
and GENERIC_DATA policy with proper length

Change-Id: I60d06b3bdcc600095d7e9ad779e9b779f5477e33
CRs-Fixed: 3136142
2022-03-04 13:44:45 -08:00
Deeksha Gupta
50b08ca835 qcacld-3.0: Change the order of AP supports check for TWT
In TWT setup request, move Not supported AP check above
scan check

Change-Id: I2087dda860fec490daef846f0d82648a634f35c5
CRs-Fixed: 3143494
2022-03-04 05:22:45 -08:00
David Oladunjoye
421f6b4c63 qcacld-3.0: Use local peer mac address for twt setup check
Currently, in twt get status command, params->peer_mac is used
check if twt setup exists for this peer mac, but if the input
is broadcast dialog id then params->peer_mac gets updated to
broadcast mac address and twt setup done check fails.

Fix is to use local peer mac address for twt setup check.

Change-Id: Iee98091bc86cfd48471b07464cda39666dd17ee3
CRs-Fixed: 3138601
2022-03-03 13:03:54 -08:00
Surya Prakash Sivaraj
7fd14302fe qcacld-3.0: Send service id in NDP indication
Send service from wmi_ndp_indication_event_id to the userspace
via the new vendor attribute QCA_WLAN_VENDOR_ATTR_NDP_SERVICE_ID
as part of ndp indication.

Change-Id: I90b4540d5f3c72bbb7e8b542406561daf2a7a869
CRs-fixed: 3128874
2022-03-01 20:41:22 -08:00
chunquan
6e475e2bff qcacld-3.0: Release serialization cmd when get peer null
In P2P connect process, GO and GC send deauth/disassoc at the
end of WPS. GO send disassoc and free station info. GO receive
deauth from GC, and send cmd WLAN_SER_CMD_GET_DISCONNECT_STATS
to get disconnect stats.

If GO send deauth and free peer info before receive deauth
from GC. Wlan_objmgr_get_peer return null, and peer is null.
Cmd of WLAN_SER_CMD_GET_DISCONNECT_STATS will never be
released since get_peer_rssi_cb will never be called.
And cmd will timeout, which is not expected.

If we call get_peer_rssi_cb without check, cmd will release.
Also csr_get_peer_rssi_cb will check peer is null or not.

Change-Id: I10b496526e259711a4dd7a91b7388ac79bb54fef
CRs-Fixed: 3119513
2022-03-01 10:52:56 -08:00
Jyoti Kumari
ff2b20e3f3 qcacld-3.0: Handle TWT disable reason code
When host sends TWT disable command to firmware, send reason code
also as part of it. So that firmware will check and take the
following action:
a. If host sends disable due SCC/MCC concurrency then firmware
will teardown the existing TWT session and send the teardown
reason code as concurrency to host.
b. If it's for other reason then it will take action based on
that.

Change-Id: I66b3d10e7d54319c3c6dcad57c78949bcdd11a26
CRs-Fixed: 3098864
2022-02-28 07:53:11 -08:00
anikkuma
da23350e06 qcacld-3.0: Add support for MESH_BSTEERING_GET_DATARATE_INFO
Add support for MESH_BSTEERING_GET_DATARATE_INFO
and PDEV_GET_CAPABILITY

Change-Id: I8857c795adc71f6b28343501fe389717b5cbd4a0
CRs-Fixed: 3086477
2022-02-25 12:36:51 -08:00
Ashish
1b0ec920c5 qcacld-3.0: Get netdev from wdev instead of iface name
Currently driver uses iface name to get netdev when it processes
ndp responder request. There is a possibility that framework does
not know the iface name when it sends the error response.

if driver does not receive iface name it fails to get the netdev
and fails to perform the dsc operation, because of which driver
drops the ndp responder request command.

To address this issue, use wdev to get netdev instead of iface name.

Change-Id: Ie230f19dbd895f81a4730160cbc9a2de3cc3179d
CRs-Fixed: 3136089
2022-02-23 11:10:07 -08:00