Commit Graph

5713 Commits

Author SHA1 Message Date
Abhishek Singh
6d5bac846a qcacld-3.0: Optimize logs in STA disconnect path
Optimize logs in STA disconnect path

Change-Id: I3534f3ab89ebbdd919c02120328013e42d2894f4
CRs-Fixed: 2623124
2020-02-18 01:53:50 -08:00
Vulupala Shashank Reddy
e96d28ed64 qcacld-3.0: Register/deregister packet capture callbacks
Register/deregister packet capture callbacks.

Change-Id: I16e2c61349fc26d1166ac4b06dc160871c383846
CRs-Fixed: 2619312
2020-02-17 21:21:19 -08:00
Vulupala Shashank Reddy
a7e26ef49f qcacld-3.0: Resume/suspend of mon thread for packet capture
Resume/suspend of mon thread for packet capture mode.

Change-Id: Ib814de13f82181aef923bdc739d018027ea9a173
CRs-Fixed: 2618657
2020-02-16 04:01:45 -08:00
sheenam monga
698e3afc12 qcacld-3.0: Update trace dump to nofl dump
Currently, additional unnecessary information is printed via
trace dump.

Remove unnecessary information by using nofl trace
in lim_trace_dump, sme_trace_dump and hdd_trace_dump

Change-Id: I3a02d05030e390ce39b4d33e57190a1aa586d132
CRs-Fixed: 2622095
2020-02-15 16:09:58 -08:00
Srinivas Dasari
644dbc18c1 qcacld-3.0: Add reason codes for internal disconnections
Currently, host driver sends disconnect reason code as UNSPECIFIED
to kernel in most of the disconnection scenarios. Correct the same
to send proper reason code received from peer in case of peer
initiated disconnections.
Introduce new reason codes for internal disconnections and assign
proper reason code for each possible disconnect scenario.

Change-Id: I99bf4573b59dc810e0a1529fcd48061d10acae4e
CRs-Fixed: 2622310
2020-02-15 08:45:08 -08:00
gaurank kathpalia
869696d0b9 qcacld-3.0: Optimize log in roam and connect path
Optimize log in roam and connect path.

Change-Id: I1b9f09b7fcc0569a863f11cbd763c105fcf9d144
CRs-Fixed: 2622252
2020-02-15 03:15:10 -08:00
Jianmin Zhu
5b0746560d qcacld-3.0: suspend scan before scheduler thread suspended
Scan cmd still can be exist after scheduler thread is suspended
when host suspend, the scan cmd can't be removed from
serialization list by either complete or cancel any more since
both depends on scheduler thread, suspend thread blocked 30s to
wait scan cmd cleared.

Roam sync event from F/W can't be handled and Roam sync complete
can't be sent to F/W since scheduler thread suspended, then F/W
assert for roam sync cmd timeout.

After receive F/W down event, host will try SSR, but blocked by
unfinished suspend thread too.

Fix: suspend all components including scan before suspend
scheduler thread, make sure scan cmd is cleared and no new scan
is allowed any more before scheduler thread suspended.

Change-Id: I7a3badeedea018e4d92bbe8660692e42923852aa
CRs-Fixed: 2620650
2020-02-15 01:58:26 -08:00
Abhishek Singh
521b203a59 qcacld-3.0: Optimize LL Stats prints
Optimize LL Stats prints.

Change-Id: Ia24ae8ca295fce64ae57ea7a5fd9381ed4458464
CRs-Fixed: 2621350
2020-02-14 17:52:43 -08:00
Alan Chen
33628529ff qcacld-3.0: Add null check for logging PMKSA BSSID
When wlan_hdd_del_mksa_cache is not successful, it prints a failure
message with the PMKSA BSSID without checking whether it is null,
causing it to access a null pointer. Add a null check for PMKSA BSSID
using it in the log.

Change-Id: I7c2f67fe709c61d5371635950021cb8687175245
CRs-Fixed: 2621607
2020-02-14 15:20:54 -08:00
Sourav Mohapatra
eb7227cc06 qcacld-3.0: Add param to configure channel avoidance indication from FW
Currently, when WWAN channel changes, the list of WLAN channels that
needs to be avoided is given to WLAN FW. WLAN FW indicates the list
to host. Upon receiving Channel avoidance indication, host switches
the operating-channel of SAP (if any and conflicting).

When there is a frequent channel change from WWAN side, it causes
frequent SAP disconnection. To mitigate this problem, as part of
this change send the configuration to the WLAN FW which delays
the channel avoidance indication before sending it to host.

Change-Id: If67775d59b9f61d3592a5f6609d3b002899e5daf
CRs-Fixed: 2615917
2020-02-14 09:01:44 -08:00
Ashish Kumar Dhanotiya
15d3b0d7b2 qcacld-3.0: Add support to dynamically set dwell time for 2g
Currently there is no support to dynamically set dwell time
for 2g channels.
Add support in existing command SETDWELLTIME to dynamically
configure dwell time for 2g channels.
Along with set, add support to get dwell time for 2g channels
with the existing driver command GETDWELLTIME.

Change-Id: Ifb4722ff3fdb2671e02794fc5b691b06aad98256
CRs-Fixed: 2620366
2020-02-14 04:17:45 -08:00
Abhishek Singh
3c56fdd796 qcacld-3.0: Optimize logs in TX assoc req and RX assoc rsp
Optimize logs while sending assoc req and assoc rsp handling
frame by dumping the assoc req frame and not printing each
params separately. Also avoid multiple dump of same frame.

Change-Id: Ibcf2d9aa8de292b9b9f4b4c6a53a0f694d69475c
CRs-Fixed: 2619553
2020-02-13 22:08:33 -08:00
Sourav Mohapatra
dee8db155c qcacld-3.0: Cleanup logs in HDD APF path
Cleanup logging in HDD APF path.

Change-Id: Iceb78d0decbeb8d4a7c1723681fe03b9a3427b02
CRs-Fixed: 2618579
2020-02-13 18:32:05 -08:00
Yeshwanth Sriram Guntuka
b9502644d0 qcacld-3.0: Update default value of dp_proto_event_bitmap
Update default value of dp_proto_event_bitmap to track all
the supported protocol pkt types.

Change-Id: Ib6355f43fa667f80b31418320f3bdb2373fdf9e1
CRs-Fixed: 2618474
2020-02-13 18:31:41 -08:00
Venkata Sharath Chandra Manchala
de8bea9272 qcacld-3.0: Add support to request for hardware stats
As part of the vendor extended stats, add API to
request Rx hardware stats for a given vdev id.

Change-Id: I46d73de21724c4c5ebf4a78075b7b2c1d02fe92a
CRs-Fixed: 2605729
2020-02-13 13:04:49 -08:00
Yu Wang
6c9129693d qcacld-3.0: add vendor cmd support for BT coex chain mode
Add a new qca sub command QCA_NL80211_VENDOR_SUBCMD_BTC_CHAIN_MODE.

This command is used to set BT coex chain mode via
WMI_COEX_CONFIG_BTCOEX_SEPARATE_CHAIN_MODE, it has 2 args:
arg1: BTC chain mode, including shared (0, default) and separated(1).
arg2: force restart flag. true means doing vdev restart after applying
      the new configurations; while false or NOT set means not.

CRs-Fixed: 2534768
Change-Id: I869096784e5089a6c90e94e76234cd13c9b1a13a
2020-02-13 05:53:34 -08:00
Karthik Kantamneni
d33455d6d4 qcacld-3.0: Call runtime pm sync resume when hif ctx is present
Currently if hif ctx is null hdd driver unload is returned without
proper cleanup where hif ctx is not required. To avoid this call
runtime pm sync resume only when hif ctx is present.

CRs-Fixed: 2619481
Change-Id: I761c96446024a175746ef377e1e31b593b93b616
2020-02-12 20:10:52 -08:00
Mohit Khanna
06cce797ed qcacld-3.0: Register FISA callback functions for delivery
Add FISA RX callback functions for fisa enabled case.

Change-Id: Iadd9a1b4e9763293153b1c8c2f263b0107c00c2c
CRs-Fixed: 2600268
2020-02-12 11:56:53 -08:00
Pragaspathi Thilagaraj
8a4ffccc02 qcacld-3.0: Replace stack alloc for struct tPmkidCacheInfo with heap alloc
Currently the strucutre tPmkidCacheInfo is allocated in stack
and used during pmksa operations. This structure takes up ~100
bytes of memory. This will cause stack corruption in low memory
devices.

Move allocations of structure tPmkidCacheInfo to heap.

Change-Id: Ibcf44bc331a9ef94499071af1899914edd75b3cf
CRs-Fixed: 2616488
2020-02-12 09:54:18 -08:00
Liangwei Dong
8f4c8c140c qcacld-3.0: Fix potential memory leak of stats_event
To free stats_event in the failure case of wlan_hdd_get_station_stats.

Change-Id: I679a6109ec2370f9126b0b3201b1035869cef14e
CRs-Fixed: 2618356
2020-02-12 04:00:51 -08:00
Vulupala Shashank Reddy
6e5c807513 qcacld-3.0: Add INI parameter for packet capture mode support
Add INI parameter for packet capture mode

"packet_capture_mode" - ini to set packet capture mode.

Change-Id: Ie60c142af753c65b44aa0018440e43a215e51a27
CRs-Fixed: 2614578
2020-02-11 18:43:31 -08:00
Ashish Kumar Dhanotiya
6b3041aed2 qcacld-3.0: Fix compilation issue in SAR limits file
There are compilation issues if feature FEATURE_SAR_LIMITS
is disabled.
Fix compilation issues relaterd to feature FEATURE_SAR_LIMITS.

Change-Id: Ifdb7c14ea3e973bc63560eb78edd084a53e28974
CRs-Fixed: 2619492
2020-02-11 11:04:28 -08:00
sheenam monga
e0e91c48d5 qcacld-3.0: vdev validation before sending unit test command
Currently, There is no check to validate vdev in function
wma_form_unit_test_cmd_and_send before sending command to
fw which may lead to fw crash due to invalid vdev id.

Fix is to add validation check for vdev before invoking
wmi_unified_unit_test_cmd and sme_send_unit_test_cmd.

Change-Id: I61db37417f05968365f210515c28eb6184279c77
CRs-Fixed: 2618295
2020-02-11 09:16:30 -08:00
Alan Chen
f32d8e8dcf qcacld-3.0: Add check for eHDD_DOT11_MODE_AUTO before updating umac
Currently, eHDD_DOT11_MODE_AUTO has not been checked, so if gDot11Mode
ini is set to 0, this would fail to update umac with the correct HE
capability. Add an if check for eHDD_DOT11_MODE_AUTO to check if it
has been enabled.

Change-Id: I5d26314f4bcfedcf1e913625ac946118ddb9a983
CRs-Fixed: 2619091
2020-02-11 05:43:07 -08:00
Sourav Mohapatra
6eceafd4cb qcacld-3.0: Clean up logs in STATS path
Clean up logs in STATS request and response path.

Change-Id: I417100c021ef8b776e7bd800ab2df8eebe95d472
CRs-Fixed: 2618311
2020-02-10 13:32:46 -08:00
Ashish Kumar Dhanotiya
b3ae646bf2 qcacld-3.0: Add support for the NAN config items
Currently there is no inis for NAN component:
1. To configure the keep alive period for the
NDI interface.
2. To enable/disable discovery of NAN cluster with
Master Preference (MP) as 0 when a new device is
enabling NAN.

Add ini support to configure above mentioned values.

Change-Id: I47b67eb89fb8849960a9f492d2909e45b96308f3
CRs-Fixed: 2617839
2020-02-10 11:58:46 -08:00
Kiran Kumar Lokere
63faa9b6b0 qcacld-3.0: Rename ioctl ldpc setting for SAP
Rename the ioctl ldpc setting for SAP to use same naming as
STA mode.

Change-Id: Iaebde9cf542637bd82dbc3812b96dec77683cc2c
CRs-Fixed: 2618149
2020-02-10 10:14:50 -08:00
Ashish Kumar Dhanotiya
f6871a8e8c qcacld-3.0: Resolve memleak in hdd_configure_sar index
In hdd configure sar index api if the FW supported version is not
SAR_VERSION_2, in that case there is a mem leak issue as the
memory is allocated for sar_command is before the fw sar version
check and in case of fw sar version check failed, memory allocated
for sar command is not freed.

To resolve above issue, move the version check before the memory
allocation for sar command.

Change-Id: I1d5e6bad63134c89ac456c3247eebad79e8f8c79
CRs-Fixed: 2618648
2020-02-10 08:32:29 -08:00
sheenam monga
65415d12d9 qcacld-3.0: Log optimization for NCHO
Currently there are unnecessary/duplicate logging. Identify and
reduce those logs that are not necessary.

Change-Id: I648b84786f9009d45e54fa67c21c834a1eae1608
CRs-Fixed: 2617648
2020-02-10 08:32:11 -08:00
Sourav Mohapatra
5e4000bde8 qcacld-3.0: Remove validate_context check from wlan_resume
Presently, there is a very narrow race condition that causes
scheduler_thread to remain in a suspended state for undefined period of
time. The race condition occuers between idle_psoc_timeout and
wlan_hdd_cfg80211_resume_wlan.

As a part of idle_psoc_timeout, the driver calls hdd_wlan_stop_modules
that sets the flag "stop_module_in_progress" and checks if driver is in
suspended state. If yes, it resets the flag and returns. But in the case
of a race condition, before this reset and return is carried out,
wlan_hdd_cfg80211_resume_wlan is invoked. The validate_context inside
the resume function fails due to the above mentioned flag being set. As
a result, resume fails and the driver stays in suspended state. This
causes the driver to enter a infinite loop of stop_modules not being
successful.

To close this small window of contention, remove the validate_context
check. hdd_ctx is always guranteed to be valid and also DSC takes
care of synchronizing the operation, thus the check is redundant.

Change-Id: I723f78e4c33bdc531776c46eff2428dbd869493f
CRs-Fixed: 2616177
2020-02-10 02:31:49 -08:00
Alan Chen
a507e41a87 qcacld-3.0: Add module enable check in pm_qos_notify
pm_qos_notify() should do nothing if WiFi module is not enabled.

Change-Id: I8eaf78f2ec547f33921c8337b9b3ae178c1709e1
CRs-Fixed: 2618148
2020-02-08 18:59:47 -08:00
Amruta Kulkarni
fc875ea635 qcacld-3.0: Cleanup for function wlan_reg_is_dfs_ch()
Replace wlan_reg_is_dfs_ch() with wlan_reg_is_dfs_for_freq()

Change-Id: Ifa62248169ad7b8ff1c62cab44c92d99a8db0e45
CRs-Fixed: 2609311
2020-02-08 02:07:03 -08:00
Ashish Kumar Dhanotiya
309af01f1d qcacld-3.0: Configure sar sleep index to FW
Currently there is no SAR index is configured to the FW
before device goes into suspend mode.
with the new requirement, configure the sleep mode index
as sar power limit to the FW before device goes into
suspend mode and configure safety mode index to the FW
on wakeup.

Change-Id: Icedbab047ec3bb252f0ed9c1b2baf04d2726a60e
CRs-Fixed: 2617102
2020-02-07 17:21:36 -08:00
gaurank kathpalia
385977d071 qcacld-3.0: Optimize log in connect path
Optimize log in connect path during phase. Remove duplicate logs
and combine scattered info.

Change-Id: I6f57405669987b35d5c0acb2f0b818e5e61bd7a9
CRs-Fixed: 2617508
2020-02-07 15:42:20 -08:00
Alan Chen
c88bfc6f5a qcacld-3.0: Trigger runtime pm sync resume during driver unload
Runtime PM needs to be sync resumed during driver unload. Hence, call
runtime pm sync resume during driver unload.

Change-Id: I20423871a82f33fcbaa3a64d741022f128785075
CRs-Fixed: 2615676
2020-02-07 10:39:26 -08:00
Ashish Kumar Dhanotiya
4f5c252a82 qcacld-3.0: Add SAR request-response event
Add support SAR request-response event. When
sar_unsolicited_timer expires driver sends
QCA_NL80211_VENDOR_SUBCMD_GET_SAR_LIMITS_EVENT event to
user space and expects user space to set sar power limits
with the vendor command
QCA_NL80211_VENDOR_SUBCMD_SET_SAR_LIMITS.

Add a request-response event to wait for
QCA_NL80211_VENDOR_SUBCMD_SET_SAR_LIMITS vendor command from
user space. If driver does not get
QCA_NL80211_VENDOR_SUBCMD_SET_SAR_LIMITS command from user space
for a specified number times, driver configures the sar safety
index to the FW.

Change-Id: Ic2b9e0b7fe06093ce849fb46df7bfce5da409ef6
CRs-Fixed: 2615519
2020-02-07 09:04:10 -08:00
Ashish Kumar Dhanotiya
3d5a742d5c qcacld-3.0: Add SAR unsolicited timer
Add SAR unsolicited timer to the driver. This timer starts
on every data tx (if not already running) and stops on
command QCA_NL80211_VENDOR_SUBCMD_SET_SAR_LIMITS.
If this timer expires, a vendor event
QCA_NL80211_VENDOR_SUBCMD_GET_SAR_LIMITS_EVENT is sent to the
user space to issue the QCA_NL80211_VENDOR_SUBCMD_SET_SAR_LIMITS
command.

Change-Id: Ic30e5ac606d2b6b0cbc9209174adcd5213eac08e
CRs-Fixed: 2615510
2020-02-07 07:33:20 -08:00
Ashish Kumar Dhanotiya
97de5e6d0b qcacld-3.0: Add SAR safety Timer
Add SAR safety timer to the driver. This timer starts
when first QCA_NL80211_VENDOR_SUBCMD_SET_SAR_LIMITS
vendor command is recived. This timer gets
reset on every sar set vendor command.
When this timer expires, configure sar safety index to
the FW and restart the timer.

Change-Id: I0536ab88baf962e1bc2aef39478380534e0e1401
CRs-Fixed: 2615442
2020-02-07 07:33:05 -08:00
Ashish Kumar Dhanotiya
d2fef2cda4 qcacld-3.0: Add ini configs related to SAR safety feature
As part of new requirement add ini configurations
gSarsafetyTimeout, gSarSafetyUnsolicitedTimeout,
gSarSafetyReqResTimeout, gSarSafetyReqResRetry,
gSarSafetyIndex, gSarSafetySleepIndex,
gEnableSarSafety, gConfigSarSafetySleepIndex.

Change-Id: I18df23896b52aa1bbf8e071e27703d4e9e1738f1
CRs-Fixed: 2612843
2020-02-07 04:32:12 -08:00
Sourav Mohapatra
9243462d48 qcacld-3.0: Keep driver synced with proper dot11 mode as per INI
The INI param gDot11Mode is used to indicate the support that the driver
should advertise. Currently the behavior of the driver is out of sync
with the mode supported over the air and the mode provided to the
framework.

In one particular case, the driver sends VHT supported as
true to the framework even though the INI gDot11Mode is set to 11n only.
This results in the frames to be transmitted with 11n capabilities while
the mode advertised is different.

To rectify this, check for the dot11 mode before setting the
corresponding supported bit in the wiphy. The value being advertised
should be the intersection of gDot11Mode INI and the driver and
firmware capability.

Change-Id: Ic2f1558c72fc801df9d7ca6b3a0182619b93cf0d
CRs-Fixed: 2612620
2020-02-07 00:15:45 -08:00
Vevek Venkatesan
656edfa1f8 qcacld-3.0: add support to customize dscp-to-up map table
Add support to customize DSCP-to-UP map table and send the
customized map values to FW to update its corresponding
map table.

Change-Id: Ibe9704a90468c898dd2e60fdf83a271152f654ce
CRs-Fixed: 2616247
2020-02-06 22:44:57 -08:00
Pankaj Singh
074fdebe64 qcacld-3.0: Remove wext handler on mon mode adapter deinit
Wext handlers are not getting deregistered during the
interface down of monitor mode. So. After the idle shutdown
also the user can issue ioctls which can lead to system instability.

Fix is to remove the wext handler as part of adapter deinit.

change-ID: I49ab4b0cfa0125b253bc097f180226f2095d5df1
CRs-Fixed: 2615138
2020-02-06 12:42:33 -08:00
Abhishek Singh
4ec44a7db6 qcacld-3.0: Optimize logs in connect req in HDD and CSR
Remove redundant logs and optimize the logs for connect in
HDD and CSR.

Change-Id: I2d2d63aaaff814d91018e95a30869b81c1349a80
CRs-Fixed: 2615902
2020-02-05 12:31:18 -08:00
Kiran Kumar Lokere
681403ca0d qcacld-3.0: Support for auto rate LDPC configuration
Add support to configure auto rate LDPC setting to FW.

Change-Id: Ic2b707c7e2132f83b4ab8732b8e087742888725e
CRs-Fixed: 2613203
2020-02-04 19:34:07 -08:00
Govind Singh
041cf61139 qcacld-3.0: Add FTM TIME SYNC component
Add support for FTM TIME SYNC feature.

Change-Id: Idd022b3b105febd25b9353d7f7c4a046c9143585
CRs-Fixed: 2615242
2020-02-04 17:17:48 -08:00
Abhishek Singh
48175fd4f7 qcacld-3.0: Optimize logs in scan path
Remove redundant logs and optimize the logs in scan path.

Change-Id: Ie6ff84b1a832a29d5fe01c649be4b8143bd13c94
CRs-Fixed: 2612637
2020-02-04 14:15:54 -08:00
gaurank kathpalia
ac1feea895 qcacld-3.0: Log enhancement in ACS
Enhance logs in ACS module to remove duplicate
prints and keep only useful logs to debug.

Change-Id: I2cf98fb8b4d7a8391617c9ce1baaa5ff6ad42114
CRs-Fixed: 2614609
2020-02-04 09:11:13 -08:00
Vulupala Shashank Reddy
9331f42f3e qcacld-3.0: Add support for packet capture mode
Add support for packet capture mode to monitor packets
on WLAN interface.

Change-Id: I8409479ef7855d51e303028d7e18e6bf89055407
CRs-Fixed: 2611293
2020-02-03 21:41:46 -08:00
Abhishek Ambure
7b4b2ff625 qcacld-3.0: Reset roam configs to default while STA mode init
Reset roam configurations to default while station mode init.

Thus user gets default roam configuration with which STA mode is
initialized.

example: When STA connect to AP, user queries for default roam
scan home away time using following command of wpa_cli.
$wpa_cli
>driver GETSCANHOMEAWAYTIME
<OUTPUT is default value of gRoamScanHomeAwayTime INI>

Change-Id: If525e4a92fee6f4823996c1e1e34b9943fed0432
CRs-Fixed: 2607557
2020-02-01 00:44:09 -08:00
Pankaj Singh
50e40422d1 qcacld-3.0: Add support for WLAN thermal mitigation
As part of new requirement WLAN subsystem needs to perform thermal
mitigation action as per the thermal state of the device. The
wifi hal sends vendor command QCA_NL80211_VENDOR_SUBCMD_THERMAL_CMD
with the thermal level parameter and wlan host performs the required
appropriate action. wlan host driver maps the thermal level to
corresponding duty cycle off percent value and duty cycle value,
send WMI_THERM_THROT_SET_CONF_CMDID cmd to FW.

Make changes to perform vendor command handling, mapping thermal level
to duty cycle value and communicating the thermal information to FW.

change-ID: I77175048c817ab755cdb838018e414ef3ee0b112
CRs-Fixed: 2610395
2020-01-31 12:45:29 -08:00