Commit graph

8,120 commits

Author SHA1 Message Date
Jiachao Wu
1b00ecb608 qcacld-3.0: kernel printing warning logs
Kernel print warning message: Division by zero in kernel
When gBusBandwidthComputeInterval > 1000,
thresh_time_limit will be set to 0.

Change-Id: Ibb1f87815e194cd74886d3731f6d6a0fee6a6732
CRs-Fixed: 2070938
2017-11-19 23:51:54 -08:00
snandini
a543ec673b Release 5.2.0.54N
Release 5.2.0.54N

Change-Id: Ifec30459aa2a627a684566fe4dcac18a142df48e
CRs-Fixed: 774533
2017-11-17 15:21:35 -08:00
Krunal Soni
c68ee30dc9 qcacld-3.0: Make __hdd_stop(STA) & __hdd_hostapd_stop(SAP) symmetrical
As part of Ib22dfa375217a48448c5a7872a9a2ed154dd862f, reviewer has
provided comments to make __hdd_stop and __hdd_hostapd_stop symmetrical
to avoid any logical issue.

Along with above point, fix hdd_init_ap_mode to check event_flags
instead of sap context to find out if session is already opened and
initialized.

Change-Id: I49788157a95940dfd5ec396baf40db7e3df21359
CRs-Fixed: 2136351
2017-11-17 15:21:34 -08:00
snandini
7498515be3 Release 5.2.0.54M
Release 5.2.0.54M

Change-Id: Ic58b2904f96d78835ca7fe76a04fcf01c951b712
CRs-Fixed: 774533
2017-11-16 13:21:16 -08:00
Paul Zhang
84fa938931 qcacld-3.0: Remove purge_sme_cmd_list API & reset scan ops in SSR case
wlan_serialization_remove_all_cmd_from_queue() is getting called
two times which causes reference count to be decreased two times.
1) 1st time from sme_stop() -> purge_sme_cmd_list()
   -> wlan_serialization_remove_all_cmd_from_queue()
2) 2nd time from wlan_serialization_vdev_obj_destroy_notification()
   -> serialization_purge_cmd_list()
   -> wlan_serialization_remove_all_cmd_from_queue()

1st path has been there for quite a long time as per the old serialization
design but with new serialization design, it won't be required.

Change-Id: Ia8bd91c665340e7f7628ad73af64fa0044b45dde
CRs-Fixed: 2134851
2017-11-16 13:21:15 -08:00
snandini
10265806e6 Release 5.2.0.54L
Release 5.2.0.54L

Change-Id: Ia3c618efaf8796a6ac03c052fe6ec65e16c403c6
CRs-Fixed: 774533
2017-11-16 11:40:28 -08:00
Nachiket Kukade
1be92caa6c qcacld-3.0: Corrections in buffer length checks in set_fils_config
In wlan_hdd_cfg80211_set_fils_config, incoming fils configs
are copied into local buffers. Buffer allocations happen with
internal length definitions, while lengths are checked against
definitions from WMI API's. This may cause a buffer overwrite
for fils erp realm buffer.

Use the same definitions for length checks that are used for
allocations.

Change-Id: Ie26bb1fdec9b12b429cb74dd290c155deb6c32f8
CRs-Fixed: 2137834
2017-11-16 11:40:27 -08:00
Dustin Brown
1fe30a8ff3 qcacld-3.0: Close small interface idle race window
There is an interface idle work that stops the driver module in cases of
adapter inactivity. This work grabs the iface_change_lock, which is also
grabbed before synchronously cancelling the interface idle work. This can
cause a deadlock situation where cancelling the work never finishes,
because the caller holds the lock the work needs in order to complete.
Hoist the calls to cancel the work out of locked regions to avoid the
potential deadlock situation.

Change-Id: Ie421e69e2026ad1de626daba1f72d002d9751013
CRs-Fixed: 2120671
2017-11-16 11:40:24 -08:00
Dustin Brown
6f42792885 qcacld-3.0: Use delayed work instead of qdf_mc_timer for iface change
Currently, the interface idle (aka interface change) timeout uses a
qdf_mc_timer. This dependency on the MC thread means the MC thread
cannot be shutdown as part of the interface idle timeout work. This
wastes resources, and leads to the init/deinit paths to be out of sync
with respect to starting and stopping the MC thread. To address these
issues, use a delayed work to schedule the interface idle work instead
of a qdf_mc_timer.

Change-Id: I7570081112fa236a15d823e2a3857d252567f041
CRs-Fixed: 2112696
2017-11-16 11:40:22 -08:00
Nachiket Kukade
6549937aa7 qcacld-3.0: Prevent NULL pointer dereference on sap_adapter
In hdd_stop_sap_due_to_invalid_channel, sap_adapter is derived using
container_of operation on work structure. It is dereferenced to print
the sessiond id immediately followed by a NULL check.

Move debug print after the NULL check.

Change-Id: Ib22aaeba6d312621e66496fcd646319331305cd2
CRs-Fixed: 2137807
2017-11-16 11:40:19 -08:00
snandini
ae978de0fe Release 5.2.0.54K
Release 5.2.0.54K

Change-Id: Ieeccfbd2229026c667c508c4726e9e6d1b631181
CRs-Fixed: 774533
2017-11-16 07:22:00 -08:00
Vignesh Viswanathan
5b86f13ad9 qcacld-3.0: Fix buffer overwrite in wma_unified_debug_print_event_handler
In function wma_unified_debug_print_event_handler, datalen is
received from the FW and is used to mem copy data buffer from
FW into the local array dbgbuf. Since dbgbuf is a local array
of size 500 bytes, if datalen is greater than 500, buffer
overwrite occurs during memcpy.

Add sanity check to limit datalen to 500 bytes if value received
is greater than 500 bytes.

Change-Id: Id63b5106bc7a3d3836d17ae47d019bc8a71c928e
CRs-Fixed: 2134801
2017-11-16 07:22:00 -08:00
snandini
1f250806f7 Release 5.2.0.54J
Release 5.2.0.54J

Change-Id: I253407d7c29856c8c103fd5ac5184acb09f92733
CRs-Fixed: 774533
2017-11-16 02:14:42 -08:00
gaurank kathpalia
d6d79e884c qcacld-3.0: Add check for set_ft_ies length
In file sme_ft_api.c, function sme_set_ft_ies(),
the ft_ies_length is user-controlled so there is
a possibility of integer overflow.

Add Sanity check to avoid integer overflow.

Change-Id: Idab80abeca35397be7ec13ca81c7ccb8be8ef256
CRs-Fixed: 2100965
2017-11-16 02:14:41 -08:00
Dustin Brown
0707ddfedb qcacld-3.0: Stop MC thread on module close
Currently, the MC thread is started once, on the transition from the
uninitialized to the open driver state, and is stopped only during
unload or recovery. Instead, start the MC thread on the transition from
closed to open and stop the MC thread of the transition from open to
closed driver states.

Change-Id: I2b45f95afb99b79f2515275776fe11c9e97bc150
CRs-Fixed: 2113596
2017-11-16 02:14:38 -08:00
snandini
851434574b Release 5.2.0.54I
Release 5.2.0.54I

Change-Id: I1ecf69dfe79c403587ac6b4b6b7929668c6ba280
CRs-Fixed: 774533
2017-11-16 00:12:49 -08:00
Vignesh Viswanathan
bd1ad03c3d qcacld-3.0: Fix check for peer_num in wma_get_ll_stats_ext_buf
The current check for peer_num in wma_get_ll_stats_ext_buf is
incorrect and subtracts total_peer_len from WMI_SVC_MSG_MAX_SIZE
and then divides it by the size of peer stats struct.

Fix the check in such a way that peer num is not greater than
WMI_SVC_MSG_MAX_SIZE divided by the sum of total_peer_len
and size of peer stats struct.

Change-Id: Idd21852052b14e9b30785f2ac4acbd172dd923ef
CRs-Fixed: 2143891
2017-11-16 00:12:47 -08:00
snandini
75b57743a4 Release 5.2.0.54H
Release 5.2.0.54H

Change-Id: I72ade954b2bc92a8915fc40481bb799f796d5935
CRs-Fixed: 774533
2017-11-15 23:36:58 -08:00
Nachiket Kukade
d915283486 qcacld-3.0: Correction in conditional logic in key operations
In set default key operation module, under SAP mode, there are
conditional checks on key type information derived from the
Station's context. Also in get/add key operations SAP or STA
context pointers are derived without knowing the device mode
first, which is incorrect.

Derive key type info from SAP context in set default key and
derive station or sap context pointers only after knowing the
device mode.

Change-Id: I09b0e6f8d6315677e7584c7c24f003daa3eca9a3
CRs-Fixed: 2127288
2017-11-15 23:36:57 -08:00
snandini
f2f97c4faf Release 5.2.0.54G
Release 5.2.0.54G

Change-Id: Iacf9f4e01c2edf4a857984d936d6eb2e0f854dc0
CRs-Fixed: 774533
2017-11-15 09:42:30 -08:00
Bala Venkatesh
13ac1030c0 qcacld-3.0: Remove unwanted NULL check in csr_process_nss_update_req
NULL check is not required as already check is present in caller
API sme_process_command

Change-Id: I7d1d6253d77faf427b7fd231dce7d1c8eac9538a
CRs-Fixed: 2139896
2017-11-15 09:42:30 -08:00
gaurank kathpalia
1a4d285cea qcacld-3.0: Add error log rate limit
In file lim_api.c, function pe_handle_mgmt_frame(),
limit the error log "Failed to fill cds packet from
event buffer".

Add log rate limit to avoid avoid over-logging.

Change-Id: I8ea1a485db861f6c40b46aaba107ae4ea1552e21
CRs-Fixed: 2138713
2017-11-15 09:42:28 -08:00
snandini
ca8ebbe027 Release 5.2.0.54F
Release 5.2.0.54F

Change-Id: Icf1f15abc89043559a9bb33b1f068f78e8f0dc5c
CRs-Fixed: 774533
2017-11-15 04:11:21 -08:00
wadesong
eda409102e qcacld-3.0: Initialize some locks before they are used
htt_tx_mutex, NBUF_QUEUE_MUTEX and HTT credit_mutex should all be
initialized before the related message handlers are connected to
their corresponding services, or there will be racing conditions
happening during WLAN driver initialization which will cause
the Linux kernel complaining for bad magic of spin locks and
triggers watch dog bite.

Change-Id: Id89185d811bcbed95732f142ed6fd611e0d6e2a4
CRs-Fixed: 2109674
2017-11-15 04:11:19 -08:00
snandini
0ff1394bdf Release 5.2.0.54E
Release 5.2.0.54E

Change-Id: I4e421d8901d7c1e988627f7e6b6486a4c2e34f03
CRs-Fixed: 774533
2017-11-15 02:29:47 -08:00
Padma, Santhosh Kumar
aa2433ee51 qcacld-3.0: Add changes to handle WMI_ROAM_SYNCH_FRAME_EVENTID
Firmware sends beacon/probe response, reassoc request and
reassoc response using new event WMI_ROAM_SYNCH_FRAME_EVENTID
when the data that it wants to send via WMI_ROAM_SYNCH_EVENTID
exceeds max length 2k in firmware. Add changes to handle
WMI_ROAM_SYNCH_FRAME_EVENTID in such a scenario.

Change-Id: I2c0821f3547b4ee86cd6860a150a5a7991947abb
CRs-Fixed: 2122429
2017-11-15 02:29:47 -08:00
Yeshwanth Sriram Guntuka
ae03c430dc qcacld-3.0: Avoid auto ps timer to prematurely enable power save
Android framwork decides when to put driver in power
save state. When it disables powersave driver starts
a timer to re-enter power save which is not required.
Fix this by not starting auto ps timer for power save
disable case. Framwork sends disable power save in
disconneced state and driver  returns error, Due to
this firmware power state is still in BMPS and it
reenables power save immediately after connection
and this causes power state mismatch between framwork
and driver/firmware. Fix is to handle full power
request in disconnected state and send this full power
request to firmware as it can handle it.

Change-Id: Ib17c898b8288de31c424896acbfe89216e59ff49
CRs-Fixed: 2143017
2017-11-15 02:29:43 -08:00
Varun Reddy Yeturu
3389427df8 qcacld-3.0: Free memory allocated for del sta params
Identify all the places where memory is not free'd in
case of WMA delete STA request and free it.

Change-Id: I97db2595d0b1d96bcbf97a28e9e1345504b30239
CRs-Fixed: 2133514
2017-11-15 02:29:40 -08:00
snandini
94f6164794 Release 5.2.0.54D
Release 5.2.0.54D

Change-Id: Ie3ce80124b88b7b90699fec5cbd39f56eb0a69b4
CRs-Fixed: 774533
2017-11-14 23:30:16 -08:00
Abhishek Singh
a92cf1eb8d qcacld-3.0: Fix memory leak in scan csr_scan_save_bss_description
csr_scan_save_bss_description allocate pCsrBssDescription which
is used to update the scan entry in scan module and after
update is done pCsrBssDescription is not freed.

Fix this by freeing pCsrBssDescription once entry is updated in
scan module.

Change-Id: I07f9bbea8fbf5b700203b03d8fd19a0871ea2881
CRs-Fixed: 2137082
2017-11-14 23:30:16 -08:00
Sandeep Puligilla
20aa0c714c qcacld-3.0: Process stop bss during the channel change
Stop bss request is dropped during the
channel change request and it is causing
IPA disconnect event not to sent to IPA
module.

Process stop bss during channel change
request so that IPA disconnect is sent
to IPA module.

Change-Id: I41bb3c0d5ba9f9e9b3a655b67d126ee34c777f4d
CRs-Fixed: 2134143
2017-11-14 23:30:13 -08:00
snandini
73b9909644 Release 5.2.0.54C
Release 5.2.0.54C

Change-Id: I319121ad42b372028ac9c753a3ea793709e28b83
CRs-Fixed: 774533
2017-11-14 21:27:46 -08:00
Dustin Brown
0e769d0284 qcacld-3.0: Include commits since checkout in build tag
Currently, only the Change-Id for HEAD is included in the build tag.
This can be problematic for builds which include hotfixes
(cherry-picks). Include the Change-Ids of every cherry-pick commit since
the last non-cherry-pick commit. This allows developers to quickly
identify the checkout point used to make the build, as well as any
hotfixes applied.

Change-Id: Ibe6259c2e0b46c820e0f1d73a12383e01c10abb8
CRs-Fixed: 2143443
2017-11-14 21:27:45 -08:00
Yue Ma
9e89e83b97 qcacld-3.0: Free the adapter runtime PM lock in error cases
Currently runtime PM lock for adapter is not freed in error cases
of hdd_open_adapter() which will result memory leak. Free it correctly
in the function for failure cases.

Change-Id: Ie325de8b2789c461d139dbea9001cbb0504bc024
CRs-fixed: 2142668
2017-11-14 21:27:43 -08:00
snandini
17eed3d034 Release 5.2.0.54B
Release 5.2.0.54B

Change-Id: Icf2b074badc89dae68dbafc536e93e5fa7380c2d
CRs-Fixed: 774533
2017-11-14 19:21:41 -08:00
Varun Reddy Yeturu
4d521c55ae qcacld-3.0: Remove unused function proc_set_req_internal
Remove the legacy function proc_set_req_internal which
is used as a handler for messages of type
WNI_CFG_SET_REQ or WNI_CFG_SET_REQ_NO_RSP.

Change-Id: If294329954f18c3890d977e7e9d4499b57ceba89
CRs-Fixed: 2140634
2017-11-14 19:21:40 -08:00
snandini
63cfd492e2 Release 5.2.0.54A
Release 5.2.0.54A

Change-Id: I404b2d10130c6507f8048259bc64c5959dc4db5a
CRs-Fixed: 774533
2017-11-14 18:04:24 -08:00
Bala Venkatesh
bc1b9eb34a qcacld-3.0: Add check for fils_config_info->key_nai_len
Add check for fils_config_info->key_nai_len to not exceed
FILS_MAX_KEYNAME_NAI_LENGTH . If it exceeds this length
then it causes out of bounds memory read issue for array keyname_nai

Change-Id: I9ea6386e91e5eaea6a14bb2d13f0e030072b1262
CRs-Fixed: 2139906
2017-11-14 18:04:23 -08:00
Tushnim Bhattacharyya
4a03db81ef qcacld-3.0: Remove the vdev reference count from set_hw_mode logic
Remove the vdev reference count logic from set_hw_mode request & response
path.

Change-Id: I4d57dab114c15e8b2389d5c261c451542f573996
CRs-Fixed: 2142770
2017-11-14 18:04:20 -08:00
Krunal Soni
2b906c85b7 qcacld-3.0: Remove unused WMA APIs
Remove unused WMA APIs which are not being used anymore.

CRs-Fixed: 2132544
Change-Id: Icf272b2dc8772d6720a6dc605702c1c6cc84ac02
2017-11-14 18:04:17 -08:00
Sourav Mohapatra
fed6aa926b qcacld-3.0: Minimize race condition by moving mutex iface_change_lock
In the case when Load Driver and MODEM ssr triggered at same time,
the handling by wlan_hdd_purge_notifier lead to a page fault crash
as waitlist of mutex was empty.

Moved the initialization of iface_change_lock to reduce the probability
of the crash.

Change-Id: I069fcf3fa8a9443daa9d36518bceb9e575b57eb6
CRs-fixed: 2124520i
2017-11-14 18:04:14 -08:00
snandini
72df9ee8da Release 5.2.0.54
Release 5.2.0.54

Change-Id: Idb49cd49a25d2359b803ebf8e7d3144fe01f2f4f
CRs-Fixed: 774533
2017-11-14 11:27:41 -08:00
Abhishek Singh
34c0e6361c qcacld-3.0: Add ini support for rssi abs thresh for the candidate AP
The RSSI value of the candidate AP should be higher than rssi_abs_thresh
to roam to the AP. 0 means no absolute minimum RSSI is required.

The value sent to the firmware is the offset from the noise floor in dB.

Change-Id: Ic956a184ac9a241e310b5d46ee6c70b9d1962446
CRs-Fixed: 2118279
2017-11-14 11:27:40 -08:00
snandini
a3ff716a8a Release 5.2.0.53Z
Release 5.2.0.53Z

Change-Id: I550acbaeb5c5e222934e7aa875079d013e9cc765
CRs-Fixed: 774533
2017-11-14 01:42:25 -08:00
Dustin Brown
96cd9633f1 qcacld-3.0: Include change Ids in build tag
In order to assist in debugging efforts, include both CLD and CMN change
Ids in a build tag. Include the build tag as a part of the driver
version string.

Change-Id: I66d159a1594f71fdf33f3e4b4e6be4840d7e140a
CRs-Fixed: 2142704
2017-11-14 01:42:24 -08:00
snandini
ec9a3c9a9f Release 5.2.0.53Y
Release 5.2.0.53Y

Change-Id: I2f7ea8fe35f694b46b73b072d76a3ed9f4b63dd4
CRs-Fixed: 774533
2017-11-13 19:16:51 -08:00
Yun Park
65fb0c607c qcacld-3.0: Fix compilation error when IPA_OFFLOAD is disabled
Remove IPA_OFFLOAD feature flag from hdd_ipa header file inclusion.
This will use stub functions for IPA feature disblaed.

Change-Id: I105f637922eecda07c2d4500e004df337e37f87e
CRs-fixed: 2141143
2017-11-13 19:16:50 -08:00
snandini
15d0618efb Release 5.2.0.53X
Release 5.2.0.53X

Change-Id: I5f93e522c222095136cb8ece4a9ab8e3bb68ff20
CRs-Fixed: 774533
2017-11-13 17:27:09 -08:00
Yun Park
6c86a66373 qcacld-3.0: Remove kernel includes from datapath
To abstract kernel header inclusion, create new QDF APIs for all IPA
APIs and redirect all IPA API calls through QDF interfaces.

Change-Id: I7bff975ad7cb32fc128320c124633594471e0a1f
CRs-Fixed: 2098903
2017-11-13 17:27:08 -08:00
snandini
ab01fbb66a Release 5.2.0.53W
Release 5.2.0.53W

Change-Id: I46e3ba2e020a6005020dbe8bcba73ea0309738c6
CRs-Fixed: 774533
2017-11-13 13:26:39 -08:00