Commit Graph

6397 Commits

Author SHA1 Message Date
Min Liu
bdba1fa76d qcacld-3.0: Report congestion to the correct interface
Only report congestion vendor event to the interface that request it.

Change-Id: I3c6d4fca116f65a9ae930d428e45716d544f9806
CRs-Fixed: 2803920
2020-10-26 07:19:23 -07:00
Ashish Kumar Dhanotiya
5696667500 qcacld-3.0: Add conversion of all auth type for big data
Currently host does not convert all internal auth types
to qca auth types which results in invalid auth type
indication for big data logging even for some of the
valid auth types.

For example in current scenario connection hapens in SAE
auth type but driver indicates invalid AKM type.

To address above issue add missing auth type and send
proper auth type to user space as part of the big data
logging.

Change-Id: I4e0d78d143e2a0132f333957019d2051e166d9a1
CRs-Fixed: 2794103
2020-10-23 20:02:10 -07:00
Bapiraju Alla
739b55d6ad qcacld-3.0: Fix ll_stats request in progress flag updation
Currently, LL stats in-progress flag is being set first and not getting
reset when peer is invalid. Because of this station stats sent by the
fw are ignored in the host since cp stats request pending is not set.
Also ll_stats request is not being rejected if previous ll_stats
request is in-progress.

To resolve this, update ll_stats request in progress flag after sanity
check for the peer and ignore the new ll_stats request command if the
previous ll_stats request is in progress.

Change-Id: I205502f8c34b51c396859d5ff3ed247e639eea99
CRs-Fixed: 2803032
2020-10-23 12:12:49 -07:00
Liangwei Dong
e8a9b19747 qcacld-3.0: Handle thermal stats event from target
Handle firmware thermal stats event and populate the thermal
information to upper layer with vendor command event.

Change-Id: I83286367ab542c08a205a7636f3d03189b0500e5
CRs-Fixed: 2786623
2020-10-23 10:03:04 -07:00
Will Huang
0a86122091 qcacld-3.0: Add back kernel backport versions
Kernel version check of backport flag CFG80211_FILS_SK_OFFLOAD_SUPPORT
was removed from hdd_update_connect_params_fils_info() by accident,
add it back.

Change-Id: Iaa42aea4fd0bd15c27b8f70412b6420ca25cd005
CRs-Fixed: 2800896
2020-10-22 15:52:35 -07:00
Liangwei Dong
1734ae5ec3 qcacld-3.0: Fix auto powersave timer not started
hdd_change_sta_state_authenticated is only invoked in
encryption connection after set key and it will start powersave
timer, so in open security connection the powersave timer is
not started. Move the timer starting code to
hdd_conn_set_authenticated to start the timer for open
security also.

Change-Id: I4da757614d1a16ce511ec4734f5c9d0198f175cb
CRs-Fixed: 2799265
2020-10-21 21:38:56 -07:00
Rachit Kankane
e24151b88f qcacld-3.0: Fix memory leak in LL Stats
Due to low memory in Host, sometimes memory allocation might fail.
Free allocated memory to LL stats substructures in case of such
failures.

Change-Id: I2f3956d14348c57502d27aecef6225246a7970fa
CRs-Fixed: 2795970
2020-10-20 06:51:54 -07:00
Ashish Kumar Dhanotiya
9609226ee3 qcacld-3.0: Update rssi on connect big data logging
Currently driver does not update rssi on connect, driver
only updates rssi on get_station command. If driver does
not receive get_station command between connect and disconnect
in that case driver will send invalid rssi value to userspace
as part of the big data logging command.
For example, in current scenario if station is connected to an ap
and if this station moves away which will change the rssi and
finally it will result in disconnect because of low rssi, at this
time rssi value stored in driver will be the value corresponding
to the last connection(low rssi). Now if this station connects to
some other ap and this connection fails at EAPOL so for this
connection driver will not receive any get station command and
it will not update rssi corresponding to the second ap and when
driver receives big data stats command it will give incorrect rssi
value of previous ap (low rssi).

To address above issue update rssi in host driver at connect
time also.

Change-Id: Ieac4b42033e8ad011e36384b0cd52a2c1f0a352e
CRs-Fixed: 2798813
2020-10-19 19:46:13 -07:00
Bapiraju Alla
e64dc643e1 qcacld-3.0: Use hdd_for_each_adapter_dev_held_safe across the driver
hdd_for_each_adapter and hdd_for_each_adapter_dev_held are not
delete safe APIs. These APIs may cause synchronization issues.

To address all synchronization issues, use
hdd_for_each_adapter_dev_held_safe api across the driver.

Change-Id: Ic05a707d2f6ee4822a4c3f818c9706a1581bc89c
CRs-Fixed: 2795661
2020-10-19 17:04:58 -07:00
Bapiraju Alla
a5ea0d718e qcacld-3.0: Add delete safe API for hdd_for_each_adapter_dev_held
hdd_for_each_adapter_dev_held will become infinite loop if the
adapter list entry is deleted in a parallel thread. This is because
deleting adapter list entry will make the entry to point to self. So,
it will loop for same adapter in the next iterations also.

To avoid this, get the current and next adapters at the start of
each iteration and take the corresponding netdev references.

Change-Id: I4bb65ce06c42c20bd9865f6a1ce7267ca69243e9
CRs-Fixed: 2799927
2020-10-19 17:04:54 -07:00
Lincoln Tran
a92a1a0f8b qcacld-3.0: Update default band to include all bands
Currently, QCA_SETBAND_AUTO is backwards compatible, so it is set
to include only 2G and 5G bands. Update this to include 6G bands
as well. Also update the band capability INI to have the default
value 0 include 6G bands.

Change-Id: I98067c18e939ff4c1e7b1e778b020b44409b5b34
CRs-fixed: 2799883
2020-10-19 14:59:02 -07:00
Arun Kumar Khandavalli
b4158a3455 qcacld-3.0: Free scan ie's as part of uninit cfg80211 ops
During SSR with the new changes the stop adapter would be invoked,
this would free the scan ie's and will not be able to configured
after the SSR.

Free the scan ie's as part of the uninit which would be called as
part of the netdev down.

Change-Id: I781eefbf0ae7a9e64bc6cb2ead98f45919587f64
CRs-Fixed: 2724670
2020-10-16 08:59:20 -07:00
Kiran Kumar Lokere
565ba93017 qcacld-3.0: Fix the band setting for auto phy mode config
Enable 6G band for auto phy mode config if 6G is supported.

Change-Id: I3368b7e81721db32aee64f9b24e00fb18c84b716
CRs-Fixed: 2793729
2020-10-15 18:50:42 -07:00
Abdul Muqtadeer Ahmed
8ee3a92264 qcacld-3.0: Check for WMI_SERVICE_THERM_THROT and Thermal Mitigation
WMI send command WMI_PDEV_GET_TEMPERATURE_CMDID to FW without
checking whether WMI_SERVICE_THERM_THROT and Thermal Mitigation
is enable or disable.

To address this issue add a check whether WMI_SERVICE_THERM_THROT
and Thermal Mitigation is enable or disable.

Change-Id: I1485b2ba6ee64143c9b7d4c8c4a8feadddbaae59
CRs-Fixed: 2698143
2020-10-15 11:42:14 -07:00
Yu Wang
0d597c2e01 qcacld-3.0: report correct max tx rate
1. NSS from FW is not reliable as it changes as per the environment
   quality, so take static NSS for fetching max tx rate;
2. Fix the MCS index to 0 if it's invalid when fetching max tx rate;
3. Remove useless code in hdd_report_max_rates().

CRs-Fixed: 2777241
Change-Id: I065748b59feba6a61859fe58bb6429d96da50441
2020-10-15 03:44:30 -07:00
Min Liu
47d4029c67 qcacld-3.0: API to report congestion
API to report congestion to userspace.

Change-Id: I324ae6701dace590daaa2c3f80412d6633cbf8f0
CRs-Fixed: 2766432
2020-10-13 23:18:32 -07:00
Jingxiang Ge
6d1a4bee95 qcacld-3.0: Add vendor cmd for ANI
Add vendor cmd for ANI. and it will set WMI_PDEV_PARAM_ANI_ENABLE
and WMI_PDEV_PARAM_ANI_OFDM_LEVEL.

Change-Id: Id98ef42a99879a0ee435219f11fde8c00ad1f8a3
CRs-Fixed: 2780131
2020-10-13 21:19:21 -07:00
Srinivas Dasari
99903ae1ab qcacld-3.0: Don't delete hw_filter for NDI mode
Hardware filters are supported for STA and P2P client modes only.
It's not supported/configured for NDI mode but the
WMI_HW_DATA_FILTER_CMDID is sent to firmware with disable flag
to flush the filter. Avoid sending it for NDI vdev.

Change-Id: I34d87a4d00138386affcedecd20b7ccc90fbd05e
CRs-Fixed: 2795980
2020-10-13 08:53:17 -07:00
Alan Chen
827413768c qcacld-3.0: Remove gOclCfg ini
gOclCfg is no longer supported and is being overwritten by
FW init config. Thus, remove gOclCfg ini from code.

Change-Id: Idf4d5280043a47650a68dc2159c386d94b0be5e9
CRs-Fixed: 2791392
2020-10-12 22:11:01 -07:00
Min Liu
8f903508a1 qcacld-3.0: Fix get peer statistics failure
Fix the following regression issues which will cause get peer
statistics failure:

- Number of peer statistics is not updated in the callback
- Sta info reference count is not released
- Incorrect nla len

Change-Id: Ia7cdf28324402fd647a6d4e80b27612ccabb32f2
CRs-Fixed: 2785764
2020-10-12 02:32:04 -07:00
Yu Wang
afaa883cab qcacld-3.0: correct disconnect reason mapping for roam related failures
According to description of enum qca_disconnect_reason_codes, both
REASON_HOST_TRIGGERED_ROAM_FAILURE and REASON_FW_TRIGGERED_ROAM_FAILURE
should be mapped to QCA_DISCONNECT_REASON_INTERNAL_ROAM_FAILURE;
while REASON_USER_TRIGGERED_ROAM_FAILURE should be mapped to
QCA_DISCONNECT_REASON_EXTERNAL_ROAM_FAILURE.

CRs-Fixed: 2784513
Change-Id: I62c82ae72de03cd219dd779ba4f50cf75b69d2a3
2020-10-11 20:44:30 -07:00
Sachin Ahuja
7573521973 qcacld-3.0: Don't set adapter dev to NULL in hostapd unint
With the existing design the panic is seen with the below
scenario.
1) As a part of country change, driver takes the dev_hold and proceed
   with the adapter access.
2) In another thread, del virtual iface is called which calls the
   unregister netdev. This kernel API(unregister netdev) calls the
   hdd_hostapd_unint where the adapter->dev is set to NULL. After
   this  unregister_netdev waits for the dev_put as driver has
   taken the dev_hold in 1). Till this dev_put happens
   unregister_netdev will wait.
3) Once the adapter access is completed as a part of 1), driver
   does the dev_put with the pointer dev which is made as NULL in 2).

To avoid this crash, don't set the adapter->dev to NULL in
hostapd unint.

CRs-Fixed: 2791420
Change-Id: I1f6252a44c061b697c8d640c5558350e91a47442
2020-10-09 13:29:59 -07:00
Nirav Shah
964abf61bc qcacld-3.0: Handle GRO packets for runtime rx_thread disable
In lithium GRO is not supported with rx_thread
disable. Add similar handling as part of runtime
rx_thread disable.

Change-Id: I897179ecdfd83f8dde7cd997e943ffb276b1afad
CRs-Fixed: 2794023
2020-10-09 13:29:54 -07:00
Pragaspathi Thilagaraj
cd22d076ab qcacld-3.0: Add support to send roam scan scheme for the triggers
Add support to handle the nl80211 attribute -
QCA_ATTR_ROAM_CONTROL_TRIGGERS_SCAN_SCHEME. Send RSO update to
firmware if roam scan scheme value is received via the nl80211
attribute QCA_ATTR_ROAM_CONTROL_TRIGGERS_SCAN_SCHEME over the
QCA_WLAN_VENDOR_ATTR_ROAMING_SUBCMD subcommand.

Change-Id: If21281245097648380990b9218a722691279f598
CRs-Fixed: 2785256
2020-10-09 06:47:13 -07:00
Ananya Gupta
b7b97c1bc5 qcacld-3.0: Enabling RPS for STA in STA+SAP mode
In STA+SAP mode, RPS is enabled only for SAP interface and
not for STA interface resulting in low throughput as STA RX
will also take the IPA path.
To fix this, enable/disable RPS when SAP is turned on/off
when IPA is enabled

Change-Id: I67c0da2fbbb43bd7b34969bbb05c1127e60d5673
CRs-Fixed: 2783136
2020-10-09 02:14:18 -07:00
Abhinav Kumar
c526619159 qcacld-3.0: Trigger MSCS action frame
Add logic to send MSCS action frame to AP based on
voice tx packet.

Change-Id: I272addfcb60e459043426950d00ba5957b594505
CRs-Fixed: 2791796
2020-10-09 02:14:13 -07:00
Bapiraju Alla
26f397de15 qcacld-3.0: Add support for dynamic dwell time in 6G
Currently, there is no provision for dynamic dwell time control in 6G.

Update existing driver commands SETDWELLTIME and GETDWELLTIME to
support 6G.

Change-Id: Ib9503d568ecefe993c37f28eb9de7024ffdc3e43
CRs-Fixed: 2789714
2020-10-09 02:14:03 -07:00
Chaoli Zhou
37019b515c qcacld-3.0: Add vendor command support for GPIO Configuration
Add vendor command support for GPIO configuration.
It adds wma wrapper functions to send wmi command
for GPIO configuration, which are called by cfg80211
API in hdd layer
Change-Id: I9a02072afaab893d12fc9c991c8265b5aa19cd75
CRs-Fixed: 2753571
2020-10-08 15:33:40 -07:00
Bapiraju Alla
6008b9db41 qcacld-3.0: Send unified ll_stats and get_station request over qmi
Send unified ll_stats and get_stats request over qmi based on INI
configuration.

Change-Id: I0c8f9e6ccb7a4a1588a8086c610ab29f58dfdcd7
CRs-Fixed: 2791039
2020-10-08 12:23:46 -07:00
Rajasekaran Kalidoss
ff2450a4f1 qcacld-3.0: Handle new status code for already suspended TWT session
Firmware sends a new status code to indicate an already suspended
TWT session. Handle this error code and return
QCA_WLAN_VENDOR_TWT_STATUS_ALREADY_SUSPENDED to userspace.

CRs-Fixed: 2786986
Change-Id: I7111128c908c14058e5ed0ef94c2eabc778d38bb
2020-10-06 19:31:29 -07:00
gaurank kathpalia
65a9397c93 qcacld-3.0: Update BW in case of 2.4ghz ACS
The ini gChannelBondingMode24GHz specifies
that should the driver go for 40Mhz BW
in case of 2.4ghz or not by doing channel
bonding. If disabled (value 0) then driver
is supposed not to pick up 40Mhz for 2.4ghz
channels.
Currently in ACS request if there are 2.4ghz
channels only or in other sceanrios such as
concurrency where other channels are stripped
out, there may become a case where only 2.4ghz
are left out in the freq list which comes from
hostapd, the BW is not updated accordingly and
the results for ACS may still give the BW as 40
in case of 2.4ghz channel selection.

Fix is to modify the BW according to the ini
if there are only 2.4ghz frequencies present
so that driver limits the same while informing
the best channel to the hostapd.

Change-Id: Ib49726bf5e4245a63a696e41fee1d12d9a7a7909
CRs-Fixed: 2789358
2020-10-06 14:24:29 -07:00
Abhishek Ambure
af02d10731 qcacld-3.0: Add support to send wfa test config to FW
User sends wfa test configs to host using vendor command
QCA_NL80211_VENDOR_SUBCMD_WIFI_TEST_CONFIGURATION. Host parses the
vendor command and sends wfa test configs to FW using WMI command
i.e. WMI_WFA_CONFIG_CMDID

Change-Id: I5aa0bc8b0a0064828b48368e47d53a5ad5e7ff2f
CRs-Fixed: 2772013
2020-10-06 04:10:51 -07:00
Yu Tian
bf2cbb2761 qcacld-3.0: Flush only GRO when bus change to idle
GRO queue more pkts is enabled in bus vote low, when
bus vote back to idle, these frames may not flushed to
stack, use force flush to reduce latency.

This change I22b5cf994fe02b7e3156a845ee13a5acbf791b22
added FISA flush too, however FISA currently is not handled
in concurrent context, which leads to access violations.

Change-Id: Ia682ec80a196fb913455c63bd165b0a5184b94b7
CRs-Fixed: 2786842
2020-10-06 04:10:43 -07:00
Abdul Muqtadeer Ahmed
b97b53d237 qcacld-3.0: Avoid use after free for SAP dev
There is a race between regulatory callback from restart SAP and
user space deleting the SAP dev, which can result into access of a
free adapter.

To avoid the above issue the SAP dev should be held before it gets
delete and release after the operation on SAP dev gets complete.

Change-Id: Idf7fc2adeb74ac62d2a63d8bc3ae0b1a0568693c
CRs-Fixed: 2789448
2020-10-05 17:50:12 -07:00
Veerendranath Jakkam
1a5c9ec6ef qcacld-3.0: Resolve compilation error with 5.7 kernel
With kernel commit "2552d35 - PM: QoS: Rename things related to
the CPU latency QoS", the PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE is
renamed to PM_QOS_CPU_LATENCY_DEFAULT_VALUE.

Update the same in the driver to resolve compilition issues due
to above kernel commit.

Change-Id: I522ebd2802397f6644fecb064971a6480dd9733b
CRs-Fixed: 2788971
2020-10-04 23:42:26 -07:00
Alan Chen
34a13e2033 qcacld-3.0: Add missing nla_policy attributes for VENDOR_SUBCMD_ROAM
Add missing nla_policy attributes for vendor command
QCA_NL80211_VENDOR_SUBCMD_ROAM.

Change-Id: Id834dc14b61c3cf0f4fff1dc332217b1a2a640e7
CRs-Fixed: 2786045
2020-10-02 03:37:57 -07:00
Nirav Shah
032e69194a qcacld-3.0: Enable host optimization for latency based on WLM mode
Enable host optimization for latency based on WLM mode
and ini configuration.

Change-Id: I67f49493f623287d0e420dab379d2d0116603ced
CRs-Fixed: 2789141
2020-10-02 03:37:52 -07:00
Nirav Shah
c3b707bd8d qcacld-3.0: Remove dependency between pm_qos request and LL_MODE
Currently request for pm_qos is defined under
WLAN_FEATURE_LL_MODE. Remove dependency between
two functionality.

Change-Id: I5aac06f28d3546ddfbb521ae20073bf8e05e550e
CRs-Fixed: 2789135
2020-10-02 03:37:46 -07:00
Nirav Shah
ca13d6a540 qcacld-3.0: Add support to request QoS in low latency mode
Add support to request QoS in low latency mode
with CLD_DEV_PM_QOS feature.

Change-Id: I928825545e88a2e869d23c20542fc7e32bcec00e
CRs-Fixed: 2789111
2020-10-01 23:58:20 -07:00
Rajasekaran Kalidoss
7baa7b0782 qcacld-3.0: Add boundary check for next twt size
Next twt size values can be 0 to 3. Add boundary check
for next twt size.

CRs-Fixed: 2786224
Change-Id: I2ee0a1ffcf3f2227ca2e3daed7069326992bc15a
2020-10-01 21:20:34 -07:00
Vevek Venkatesan
0bd4c940e4 qcacld-3.0: fix the error accessing hdd_ctx without NULL check
Fix the error of accessing the hdd context pointer without
NULL check.

Change-Id: Ifbb2ffcd2c4270a96cbad97bf3c320702cf6bc12
CRs-Fixed: 2788159
2020-10-01 19:08:48 -07:00
hqu
f88549090b qcacld-3.0: Fix implicit-fallthrough compile error casued by gcc 9.3
Compiling with gcc 9.3 will cause many implicit-fallthrough
compile errors.

Fix is to add keyword fallthrough to resolve such compile error.

Change-Id: I3fdc48b1a9ab2345a47ae644e3217b4d29238364
CRs-Fixed: 2785172
2020-10-01 12:28:39 -07:00
Bapiraju Alla
5191713c4b qcacld-3.0: Send get_station and ll_stats req in a single command
Currently ll_stats and get_station requests are sent back to back
from user space. The firmware time difference between these two commands
results in extra sleep and wakeup for Q6.

To avoid this extra Q6 sleep and wake, send both requests in a single
command from the driver if the firmware supports that operation. Cache
the get_station results in the driver until user space request reach
to the driver.

Change-Id: Ic7c6232558b9411106bf3fb88ec8d9b0b28b045d
CRs-Fixed: 2778476
2020-09-30 11:10:21 -07:00
Utkarsh Bhatnagar
7d9ab089a4 qcacld-3.0: Use pdev iterate obj list to check for existing WAPI STA
At present, WAPI security mode STA is not allowed to run in
concurerncy with any other vdev.
So, whenever a new vdev is created, policy_mgr_check_privacy_for_new_conn
is called to check the security concurrency of new connection by checking
security of exisitng vdevs and if a STA vdev with WAPI security exists
then the concurrency is not allowed and the api will return false.

In case, while performing this check, the adaptor associated with
the existing vdev is destroyed, there might be a crash as
hdd_wapi_security_sta_exist is still trying to access the security
of that vdev.

To solve this, use wlan_objmgr_pdev_iterate_obj_list with crypto info
to iterate across all the existing vdev and check the security. If
Wapi security STA exists, it will return an argument with value as true
which will be used in policy_mgr_check_privacy_for_new_conn and it will
return false as concurrency is not allowed

Change-Id: Iff811d2406f1c74cec26d457a2a682dd992710b8
CRs-Fixed: 2784406
2020-09-30 11:10:17 -07:00
Ashish Kumar Dhanotiya
edef44619b qcacld-3.0: Do not fill 6GHz channels for legacy command
Currently when driver receives the legacy get channel command,
it fills all the channels which includes 6GHz channels also.
This may lead to unexpected behaviour for the applications which
does not have support for the 6GHz channels.

To address above issue, do not add 6Ghz channels in the output of
the get channels command.

Change-Id: I87beea4e80906846fa5d1d1076792385d4424297
CRs-Fixed: 2782638
2020-09-30 01:25:53 -07:00
Wu Gao
2b824e6687 Revert "qcacld-3.0: Schedule autobmps timer for open security"
This reverts commit "Change-Id: af7e67eee58888a811e51c2ef093b7aac639f904".
Since host can't set NDP peer to auth state if test with this change.
So revert this change and raise another change for original issue.

Change-Id: I568de643bfd93611dcfa7a5b836fa67e3773ebf7
CRs-Fixed: 2780195
2020-09-28 22:26:30 -07:00
Bapiraju Alla
28e70aac41 qcacld-3.0: Cleanup scan queue before vdev delete
Currently hdd is not clearing the scan queue before deleting vdev in
all the cases. This is causing use after free access issue.

To avoid this, cleanup scan queue before vdev delete.

Change-Id: I3e06f868904f450da781ba60887284796abd4ee9
CRs-fixed: 2784645
2020-09-25 20:20:32 -07:00
Jinwei Chen
d4f5bd413d qcacld-3.0: Support unaligned consistent memory prealloc
Support unaligned consistent memory prealloc

Change-Id: I5c4aea4991ab08519b821cb06c09e5abb9a90ef6
CRs-Fixed: 2758967
2020-09-25 20:20:28 -07:00
Srinivas Girigowda
9200d0bba4 qcacld-3.0: hdd: Remove logs for qdf_mem_malloc() checks
qdf_mem_malloc() function already takes care of logging the
caller function name and line number in case of any allocation error.
Hence there is no need to add the error log again.

Getting rid of these unnecessary logs reduces driver memory footprint.

Change-Id: I135bfe0e5adb018ebd676d3ac50f958ea9dedf71
CRs-Fixed: 2781932
2020-09-25 12:59:59 -07:00
Wu Gao
f4e2f4b9d7 qcacld-3.0: Save operational rate to vdev mlme legacy object
For STA+P2P GO case, DUT sets operational rates when connecting to AP
as STA, and overwrites it when DUT forming P2P connection as P2P GO.
So, add this change to save operational rates to vdev mlme legacy
object, and avoid to overwrite for other inferfaces.

Change-Id: I2bfbecbc9bc50b8943b1e3de516782e70b125ce2
CRs-Fixed: 2773943
2020-09-25 01:29:43 -07:00