Commit Graph

6960 Commits

Author SHA1 Message Date
Hanumanth Reddy Pothula
006f383e64 qcacld-3.0: Don't double start inactivity timer
There is a possibility of double start of inactivity timer if iff_up
(hdd_open) happens while probe/remove/reinit is still going on.

To mitigate this issue, on iff_up, start inactivity after acquiring
hdd_init_deinit_lock, which make sure probe/remove/reinit are
completed, and thereby inactivity timer is stopped.

Change-Id: I2417215380e318a8410a2d25eabf82f353a26c4f
CRs-Fixed: 2125494
2017-10-16 04:41:24 -07:00
Arunk Khandavalli
e9ef42ae0c qcacld-3.0: Start inactivity timer for hdd_open
There can be deadlock on iff_up on anyone of mutex's like
init_deinit_lock, iface_change_lock. To catch what caused the
deadlock start the inactivity timer to root-cause the issue

CRs-Fixed: 2120569
Change-Id: I830cc4127a9c0691ee44a5e2c56c871471d638db
2017-10-16 04:41:08 -07:00
SaidiReddy Yenuga
a92f8cc9a1 qcacld-3.0: Add support for configuring modulated DTIM dynamically
qcacld-2.0 to qcacld-3.0 Propagation.

Wifi OFF/ON is needed to update the gEnableModuleDTIM ini param.

Add private ioctl to configure modulated DTIM at runtime.

CRs-Fixed: 2002662
Change-Id: I28be432da775a9aa026cd702c63dee5666260d33
2017-10-16 16:47:49 +05:30
snandini
141ce942d6 Release 5.2.0.49
Release 5.2.0.49

Change-Id: Ief7a5d0390f612c7a211f50c8993628aac2b5b3c
CRs-Fixed: 774533
2017-10-16 01:56:48 -07:00
Varun Reddy Yeturu
b60d5227da qcacld-3.0: Tune config parameters for scan rest time
Fine tune the scan rest time configuration parameters,
gRoamRestTimeMin and gNeighborScanTimerPeriod to 50ms and
100ms respectively for better power efficiency.

Change-Id: Ia6edb87dbb0abf4771613a028d711f4f7a4e0f41
CRs-Fixed: 2120683
2017-10-16 01:56:48 -07:00
wadesong
9e95bd99fa qcacld-3.0: Fix build errors introduced by data path code changes
Some data path code change didn't consider SDIO code path, so
introducing some build error for SDIO driver. Fix them in one
submission to enable ACI

Change-Id: I3d1b81c57a8ae854f18db3eccb546b7b552899b7
CRs-Fixed: 2033757
2017-10-16 01:56:46 -07:00
snandini
1da8617f56 Release 5.2.0.48Z
Release 5.2.0.48Z

Change-Id: Idebe40280d36aae2ac4a23c7898547974024218f
CRs-Fixed: 774533
2017-10-14 05:59:28 -07:00
Vignesh Viswanathan
593e1f9a3d qcacld-3.0: Remove assert in wma_rx_aggr_failure_event_handler
Assert was added in the wma_rx_aggr_failure_event_handler via the change
Iea93e879196e9cd43856a7dcc9204d2304f76c78 and it exposes further security
issues.

Remove the assert in wma_rx_aggr_failure_event_handler.

Change-Id: Iaef00389fa19da0fe33e3bcd6f2123e553b84dff
CRs-Fixed: 2114789
2017-10-14 05:59:28 -07:00
snandini
f37960919e Release 5.2.0.48Y
Release 5.2.0.48Y

Change-Id: I03554f43571203bc2aeb63867a59a1d52791fa9b
CRs-Fixed: 774533
2017-10-13 23:53:40 -07:00
Krunal Soni
e50ff45334 qcacld-3.0: Release PEER's timer memory before removing it from table
SAP DUT allocates SA query timer for each STA-PEER which gets associated
to DUT. When STA-PEER walks out or gets disassociated, SAP DUT releases
this timer memory through PEER clean-up process but in few corner cases
it is observed that STA-PEER left uncleaned.

In such cases ideally when SAP session goes away, SAP state-machine
should check any left out memory and clean it up through
lim_cleanup_mlm() but this API check for own session validity and
own session has been marked as invalid before even calling this API.
Due to which timer memory leaks.

Fix the situation by deleting the timer before marking own session as
invalid.

In some cases, for some reasons PEER delete sta request couldn't send to
FW then memory associated with delete sta request needs to be freed.
If status is failure and del sta response is not required then silently
release the memory.

CRs-Fixed: 2124293
Change-Id: I082c771bbee6d083b15515dd2e40ed9a27e0a9a1
2017-10-13 23:53:39 -07:00
snandini
d0229ac0cc Release 5.2.0.48X
Release 5.2.0.48X

Change-Id: I56349d7adcf2b7c11d35a15314efd59d7d4bf3c0
CRs-Fixed: 774533
2017-10-13 19:51:28 -07:00
Kiran Kumar Lokere
b0f19c322c qcacld-3.0: Send IMPS disable cmd to FW if disabled in INI
If the IMPS disabled in INI send the IMPS disable command to FW

Change-Id: I1cfc731b8d0e8eddc4dc0ffa6d3b59f22506943c
CRs-Fixed: 2126599
2017-10-13 19:51:27 -07:00
Yun Park
fec73dc984 qcacld-3.0: Add default log message to IPA init/deinit code
Add default log message to IPA interface init/deinit code while WLAN
driver load/unload process.

Change-Id: Ibfb1f9444c73e0dbbb1899f02aee0727c44765bf
CRs-Fixed: 2108804
2017-10-13 19:51:26 -07:00
snandini
2bceb0344a Release 5.2.0.48W
Release 5.2.0.48W

Change-Id: If5cc7d5fe7922db2d00a7625112b0843aabb6a5a
CRs-Fixed: 774533
2017-10-13 15:51:25 -07:00
Mahesh Kumar Kalikot Veetil
9111a57ae0 qcacld-3.0: Fix code style issues
Fix code style issues introduced by the change
"Change-Id: I3934f2a18c796ed3b53175dcbe7efd7f4d1409b9" in HDD.

Change-Id: Ib2c411017f1a838156a222d2e536fad15056daf0
CRs-Fixed: 2122828
2017-10-13 15:51:25 -07:00
Mohit Khanna
8ee37c6ae7 qcacld-3.0: Remove extra peer ref during attach
Currently during  peer initialization (ol_txrx_peer_attach), we are
initializing peer refcount to 2. This is done to prevent peer
deletion, in case some logic tries to delete a peer when the host has
not received peer map events.

The above logic fails to address the condition when there is roaming
failure, followed by peer deletion from userpace. In this case, host
tries to create a peer and initializes refcount to 2. However, since
roaming fails, firmware does not send out peer map events. In the
meanwhile, the framework tries to delete the existing peer. This
deletion following the peer creation and absence of peer map leads to an
incorrect peer refcount even after deletion and hence this peer does not
get deleted.

Initialize peer with refcount of 2 but 1 instead. In case a map or
unmap arrives after peer deletion, the existing logic will
try to find a peer in the peer hash bins or peer_id_obj_map and will
not find the peer.

Change-Id: Ia3ba6842122dba49281d7bd00303cbe7685ef91c
CRs-Fixed: 2087373
2017-10-13 15:51:23 -07:00
snandini
da0e02fe6d Release 5.2.0.48V
Release 5.2.0.48V

Change-Id: I60c0f2f3a6270bf5f5a499ccef0fd5ee0535d4ef
CRs-Fixed: 774533
2017-10-13 13:42:41 -07:00
Arif Hussain
3a9030acda qcacld-3.0: Include correct dfs header file
To avoid circular dependency, cleanup is done
in common code, So use correct header file to
fix any compilation issue.

Change-Id: Id094107dda4f34ed479ead0b801da27c7aa240ff
CRs-Fixed: 2126011
2017-10-13 13:42:41 -07:00
snandini
7528e02dbc Release 5.2.0.48U
Release 5.2.0.48U

Change-Id: Ifae761905a6c69e5ea45d3c79428d38a1c22e074
CRs-Fixed: 774533
2017-10-13 12:12:41 -07:00
Yun Park
5d42e11033 qcacld-3.0: Fix KW issue for unlock rx_hash_lock and initializing cap
Unlock variable 'pdev->rx_ring.rx_hash_lock.lock.spinlock' in htt_rx.c.
Initialize 'cap.cap_flag' in ol_fw.c.

Change-Id: I243647deb01cd2f9c7b3e07feeb321adf849608d
CRs-Fixed: 2098769
2017-10-13 12:12:41 -07:00
Himanshu Agarwal
e6b4912a81 qcacld-3.0: Add sanity check for buf pkt len to prevent OOB access
Add sanity check for wow_buf_pkt_len in wma_wow_wakeup_host_event()
to avoid out of bound memory access.

Change-Id: Id3b0003aa366d9239739efe561f44eff1dceff5d
CRs-Fixed: 2119401
2017-10-13 17:50:11 +05:30
snandini
29594ffd64 Release 5.2.0.48T
Release 5.2.0.48T

Change-Id: I235bb6aca3fb275c57e83d7c5d9a4bc2c2ebabac
CRs-Fixed: 774533
2017-10-13 01:52:05 -07:00
Himanshu Agarwal
c855227306 qcacld-3.0: Extract value of auto_channel_select_weight ini
When force_sap_acs is enabled, hostapd acs will be discarded
and driver acs will happen with override values from ini. Finally
weight for a channel is calculated based on rssi, bsscount. etc.
from auto_channel_select_weight. This ini value is getting extracted
only in __wlan_hdd_cfg80211_do_acs() and so ini value won't be updated
in sap config when hostapd acs doesn't happen or force_sap_acs is enabled.

Update auto_channel_select_weight ini value in sap config in
wlan_hdd_cfg80211_start_bss() which is called irrespective of any
configuration.

Change-Id: I90f549fece117a72c19cf5fdc9f6485b1ab8afdc
CRs-Fixed: 2125597
2017-10-13 01:52:04 -07:00
Tiger Yu
438c648c7b qcacld-3.0: Fix the coding style error
Fix the coding style error.

Change-Id: Iafd3fc730c188fe027fc9a4dde3f45520091f47b
CRs-Fixed: 2125802
2017-10-13 01:52:02 -07:00
snandini
0ea8a2d56b Release 5.2.0.48S
Release 5.2.0.48S

Change-Id: Ia1ce3b23b82923815d536de308d9cdf2ecb7a7f1
CRs-Fixed: 774533
2017-10-13 01:00:05 -07:00
Jeff Johnson
66ebf1523f qcacld-3.0: Fix style issues in lim_utils.h
Checkpatch reported instances of the following issue, so fix them:
- ERROR:SPACING: space prohibited before that ',' (ctx:WxE)

Change-Id: Ifc015a9e3976ebca03662438998433e976e6cf18
CRs-Fixed: 2125683
2017-10-13 01:00:04 -07:00
Jeff Johnson
ec0164c434 qcacld-3.0: Fix style issues in cfg_proc_msg.c
Checkpatch reported the following issues, so fix them:
- ERROR:SPACING: space prohibited before that ':' (ctx:WxE)
- ERROR:SPACING: space prohibited after that '*' (ctx:ExW)

Change-Id: I2ae63f6a0474a6d8384c2b6796a5239b99aa3ffb
CRs-Fixed: 2125682
2017-10-13 01:00:02 -07:00
Jeff Johnson
aadd789840 qcacld-3.0: Fix style issues in wma_power.c
Checkpatch flaged the following issues, so fix them:
- WARNING:LONG_LINE: line over 80 characters
- ERROR:SPACING: space prohibited before that ',' (ctx:WxE)
- WARNING:LINE_SPACING: Missing a blank line after declarations

Change-Id: Ifb14eaa7828da997c35265deed5e94a2a2db9054
CRs-Fixed: 2125681
2017-10-13 01:00:00 -07:00
Jeff Johnson
c742d8dddc qcacld-3.0: Fix lim_update_sta_ds() style issues
Checkpatch reported the following issues, so fix them:
- WARNING: Missing a blank line after declarations
- WARNING: Block comments use a trailing */ on a separate line
- ERROR: that open brace { should be on the previous line

Change-Id: I7671e3a165cb7f372187c37ce31a92778422031a
CRs-Fixed: 2124909
2017-10-13 00:59:58 -07:00
Jeff Johnson
0daa9447d2 qcacld-3.0: Fix csr_check_concurrent_channel_overlap() style issues
Checkpatch reported the following issues, so fix them:
- ERROR: else should follow close brace '}'
- WARNING: braces {} are not necessary for single statement blocks

Change-Id: I9c8d329d70ee258834eaaea0183ba2e36643b572
CRs-Fixed: 2124908
2017-10-13 00:59:55 -07:00
snandini
0dc7668325 Release 5.2.0.48R
Release 5.2.0.48R

Change-Id: Id501f9e0446a34ab2015d9edfa084237a47e3ef3
CRs-Fixed: 774533
2017-10-13 00:10:48 -07:00
Yue Ma
9f275d9bdb qcacld-3.0: Add debug print for wlan_hdd_validate_context
It can help to trace what is happening during load/unload and
avoid just exiting silently.

Change-Id: I61a451058a7846d3627500db2c9d8d5998e8210e
CRs-fixed: 2123331
2017-10-13 00:10:48 -07:00
Yue Ma
cd359b7e00 qcacld-3.0: Move runtime suspend context init to correct place
Commit fb9d5acfed and 645749571d introduce an API to deinit scan
runtime suspend lock and move runtime suspend context deinit in
order to fix a memory leak issue. However, it breaks SSR because
runtime suspend context init and deinit are not matching during
SSR which results double free happens in the rmmod after SSR.
Move runtime suspend context init to correct place.

Change-Id: I698385ab52e7e18636b143cd71c229afb676baff
CRs-fixed: 2123331
2017-10-13 00:10:46 -07:00
Yuanyuan Liu
5583b2cd0f qcacld-3.0: Convert probe return error from -ENOMEM to -EPROBE_DEFER
If probe failed because of no memory, we want to try to recovery by
issuing a re-probe for built-in driver. Hence, convert probe return
error from -ENOMEM to -EPROBE_DEFER for built-in driver so that
platform driver can issue re-probe based on the return value.

CRs-Fixed: 2124159
Change-Id: I6cca0ed186554c8065b77af8c178ca9e143abf98
2017-10-13 00:10:44 -07:00
Jeff Johnson
f7ca9643c9 qcacld-3.0: Fix bad log in wma_peer_set_default_routing()
Checkpatch reported the following problem:
ERROR: Prefixing 0x with decimal output is defective

Correctly use %x when logging hex data.

Change-Id: I8150cf6ae5770a18035f006df9e774932919d9b7
CRs-Fixed: 2124907
2017-10-13 00:10:42 -07:00
Sandeep Puligilla
2f931531b0 qcacld-3.0: Add sanity check to avoid overflow in WMI event data
In WMA, data from firmware event buffer is used without
sanity checks for upper limit. This might lead to a potential
integer overflow further leading to buffer corruption.

Add sanity check to avoid integer overflow.

Change-Id: Id47e12015a4d46af24180b621b52ffcb17596c07
CRs-Fixed: 2112832
2017-10-13 00:10:40 -07:00
snandini
cc7c927f9f Release 5.2.0.48Q
Release 5.2.0.48Q

Change-Id: Icc43caa67451c78d551dcb804739f9e1c7f345b4
CRs-Fixed: 774533
2017-10-12 14:03:26 -07:00
Padma, Santhosh Kumar
1001d58cca qcacld-3.0: Remove check against WMI_SVC_MSG_MAX_SIZE
Structure roam_offload_synch_ind has element hlp_data which is of
size FILS_MAX_HLP_DATA_LEN is greater than WMI_SVC_MSG_MAX_SIZE.
Hence, remove check for size of roam_offload_synch_ind against
WMI_SVC_MSG_MAX_SIZE to avoid roam failure. Also, modify check
for validity of vdev id.

Change-Id: I1b9cef08e1d847f27b7057abf7189ef0f867b92f
CRs-Fixed: 2124786
2017-10-12 14:03:19 -07:00
Kai Liu
1be510abee qcacld-3.0: skip notifying SSR framework when wlan unloading is ongoing
Fw assert and unloading can occur at same moment, there is no need
to recover if wlan unloading is ongoing, so skip notifying SSR framework
in such case.

Change-Id: I2176d1505e8e358f4436277e4d0b706923596f27
CRs-Fixed: 2087634
2017-10-12 14:03:13 -07:00
snandini
a963f8ae87 Release 5.2.0.48P
Release 5.2.0.48P

Change-Id: I725e76bf12c0f67a8ec50b7351c496b7f415643f
CRs-Fixed: 774533
2017-10-12 14:03:06 -07:00
Abhishek Singh
9d5f4580f0 qcacld-3.0: Use per session cb mode to validate channel bw switch
In driver as part of __wlan_hdd_cfg80211_set_ap_channel_width() driver
modify the channelBondingMode24GHz and this modified value is not
changed to default value once hostapd restarts.

Due to this when the 20/40 BSS Coexistence Management frame is
received and hostapd tries to change the width to 20Mhz using
__wlan_hdd_cfg80211_set_ap_channel_width(), as
channelBondingMode24GHz is already set to 0, the request is
ignored and SAP doesn’t switch to 20Mhz.

To fix this use per session cb mode to validate bw switch.

Change-Id: Ia233c478794602aa6909cf637c5fc8c82fc3433a
CRs-Fixed: 2058315
2017-10-12 14:03:00 -07:00
Vignesh Viswanathan
07db59ed46 qcacld-3.0: Add check for vdev_id in wma_unified_bcntx_status_event_handler
Currently resp_event->vdev_id, recevied from the FW, is directly used
to refer to wma->interfaces without validating if the vdev_id is valid.

Add sanity check to make sure vdev_id is less than max_bssid before
using it.

Change-Id: I734ff795a3936719b08493f868384dbde72a80df
CRs-Fixed: 2119394
2017-10-12 14:02:54 -07:00
snandini
a35ca6dbf5 Release 5.2.0.48O
Release 5.2.0.48O

Change-Id: Icf6195228dadf3f176317fc9ee574a1f45762615
CRs-Fixed: 774533
2017-10-12 14:02:48 -07:00
Vignesh Viswanathan
a3963373f6 qcacld-3.0: Avoid integer overflow in wma_ndp_end_indication_event_handler
In function wma_ndp_end_indication_event_handler, num_ndp_end_indication_list
from the fw is used to calculate buf_size which is in turn used to malloc.
This could lead to potential integer overflow if num_ndp_end_indication_list
is a very high value.

Add check to validate num_ndp_end_indication_list does not exceed the max
message size from firmware.

Change-Id: Icbb763bfc14ec0ef8424cab50afa5c6826fd3c60
CRs-Fixed: 2114255
2017-10-12 14:02:42 -07:00
Padma, Santhosh Kumar
1a99fe0842 Revert "qcacld-3.0: Logical AND current UAPSD bitmask with ADDTS rsp values"
Set uapsd_delivery_mask if either static mask uapsd_per_ac_bit_mask is
set or dynamic mask uapsd_per_ac_delivery_enable_mask is set. Both static
and dynamic masks need not to be set to enable uapsd_delivery_mask.
Similar logic is applicable as well for uapsd_trigger_mask. Hence, revert
commit 2560111dd2.

Change-Id: I743d11617e33e7a358473eeab4455339fe1bbd98
CRs-Fixed: 2123812
2017-10-12 14:02:37 -07:00
Mukul Sharma
07bd875c18 qcacld-3.0: Acquire wakelock until change iface timer expires
Currently, when wifi is disabled from UI, and if the device goes
to suspend before the interface change timer expires, then until
the next APPS wakeup wifi remains enabled hence power numbers are
high.
As a part of fix, Host acquire wakelock when it start change
interface timer.

Change-Id: I41662596725315a6cfe185ee23ae889b69938e0b
CRs-Fixed: 2091154
2017-10-12 14:02:31 -07:00
Sravan Kumar Kairam
6b727a4ca7 qcacld-3.0: Implement nbuf alloc fail replenish timer
Implement nbuf alloc fail replenish timer which starts when
there is an nbuf allocation failure and stops when there is
an nbuf allocation success with in the timer expiry duration.

Change-Id: Ie956ea144dec4323664632d00bb8f0f82ba22439
CRs-Fixed: 2033944
2017-10-12 14:02:26 -07:00
Vignesh Viswanathan
18827b06d7 qcacld-3.0: Add check for vdev_id in wma_p2p_lo_event_handler
Currently fix_param->vdev_id, recevied from the FW, is directly used
to refer to wma->interfaces without validating if the vdev_id is valid.

Add sanity check to make sure vdev_id is less than max_bssid before
using it.

Change-Id: I92743589e0333449c39e148b37d200cac2cdb817
CRs-Fixed: 2119434
2017-10-12 14:02:19 -07:00
Himanshu Agarwal
a1539d3e22 qcacld-3.0: Add sanity check for num_hw_modes and num_phy
Add sanity check for num_hw_modes and num_phy in wma_populate_soc_caps()
for WMI_SERVICE_READY_EXT_EVENTID.

Change-Id: I023d737449283f9ac092d278bde016b208b2c891
CRs-Fixed: 2119887
2017-10-12 14:02:13 -07:00
Himanshu Agarwal
8bcec57472 qcacld-3.0: Add INI support for best candidate algo and RSSI scoring
1) Currently all the parameter to decide best candidate are chosen
   as by default.
   Add INI support for those parameters to change values on basis
   of performance.
2) At the time of calculating best candidate score, rssi consider
   bucket size, good rssi, bad rssi, good rssi percentage from total
   rssi percentage, bad rssi percentage from total percentage.
   Configure these all params from ini.

Change-Id: I808a40486473fcbb161c12fbd369b3b846beb8c2
CRs-Fixed: 2121735
2017-10-12 14:02:08 -07:00