Commit Graph

11558 Commits

Author SHA1 Message Date
nshrivas
a52dfe80c0 Release 5.2.0.105S
Release 5.2.0.105S

Change-Id: I08e9d6745d4be2f8b0a02ee682addeac54129e28
CRs-Fixed: 774533
2018-11-10 04:02:05 -08:00
Rakshith Suresh Patkar
384a28ae48 qcacld-3.0: Add timestamp debug info in ol_tx_desc_t
Add descriptor timestamp debug info in ol_tx_desc_t and
add APIs to set these values.

Change-Id: I686fccff4268811474630dbea8369fabe82d1517
CRs-Fixed: 2333654
2018-11-10 04:02:04 -08:00
nshrivas
2a2037028e Release 5.2.0.105R
Release 5.2.0.105R

Change-Id: I545c8880b5c4cc2e6d82de1b5e4db4bb361f328a
CRs-Fixed: 774533
2018-11-09 19:43:22 -08:00
Jeff Johnson
bfd2463a00 qcacld-3.0: Fix csr_get_current_band() context param
Currently csr_get_current_band() takes a tHalHandle context param.
However csr is internal to the UMAC, and hence it should be using the
"real" context pointer type instead of the opaque handle, so update
the API to expect a struct mac_context pointer..

This is part of an ongoing campaign to remove or replace all instances
of tHalHandle.

Change-Id: I93a3950b9ee26284ddfdf167b900d2f6983625f7
CRs-Fixed: 2347655
2018-11-09 19:43:22 -08:00
nshrivas
725ba40451 Release 5.2.0.105Q
Release 5.2.0.105Q

Change-Id: I1cca15061bde42951e14c9f2db28d4fddcfb0db0
CRs-Fixed: 774533
2018-11-09 18:21:58 -08:00
Jeff Johnson
6fea9da115 qcacld-3.0: Remove unused wlan_hdd_set_pre_cac_status() param
Change "qcacld-3.0: Remove wlan_sap_set_pre_cac_status() handle param"
(Change-Id I1c280be8c7c65a28267a9ab38d76fb8aa94e48af) removed an
unused handle param. As a result the handle param is now unused by
wlan_hdd_set_pre_cac_status(), so remove it from there as well.

Change-Id: Ida61a996b9203928af3a5636c219ab61c68d7d19
CRs-Fixed: 2347654
2018-11-09 18:21:57 -08:00
Jeff Johnson
6ccbec1f48 qcacld-3.0: Remove wlan_sap_set_pre_cac_status() handle param
Function wlan_sap_set_pre_cac_status() currently takes as one
parameter a tHalHandle handle.  This handle is converted into a MAC
context pointer. That MAC context pointer is then tested for NULL but
is otherwise unused.  Since the MAC context, and hence the handle, are
unnecessary, remove them.

This is part of an ongoing campaign to remove or replace all instances
of tHalHandle.

Change-Id: I1c280be8c7c65a28267a9ab38d76fb8aa94e48af
CRs-Fixed: 2347653
2018-11-09 18:21:53 -08:00
Jeff Johnson
2febb64e8f qcacld-3.0: Fix csr_init_operating_classes() context param
Currently csr_init_operating_classes() takes a tHalHandle context
param.  However this is a static internal function, and hence it
should be using the "real" context pointer type instead of the opaque
reference, so update the API to expect a struct mac_context pointer.

This is part of an ongoing campaign to remove or replace all instances
of tHalHandle.

Change-Id: Ib299d109489709b78a8d138987acf2379a341797
CRs-Fixed: 2347652
2018-11-09 18:21:49 -08:00
nshrivas
af8d7aa2f0 Release 5.2.0.105P
Release 5.2.0.105P

Change-Id: I49c61fe4c4480a439e2a33ec687b49287c22de7d
CRs-Fixed: 774533
2018-11-09 16:59:07 -08:00
Bala Venkatesh
fc0dfb7865 qcacld-3.0: Stop peer assoc confirm timer in case of peer assoc failure
As part of tdls peer assoc request, WMI_SERVICE_PEER_ASSOC_CONF is
checked and a timer of 6 sec is started. But, in case of any failure
for peer assoc in host, This is not stopped and waited for timer to
expire and sends the response with failure status.

Stop the peer assoc confirm timer and send the add sta response with
failure status in case of any failure in host.

Change-Id: If6ba6aa1297afaea1fd86bf406dcbb6e4e461d25
CRs-Fixed: 2345086
2018-11-09 16:59:06 -08:00
Dustin Brown
92bd838132 qcacld-3.0: Split psoc and vdev phases during probe
hdd_wlan_startup() does psoc create, psoc start, and vdev create phases.
Split the vdev create phase from the two psoc phases.

Change-Id: I9e2be1e257f80c19f55ec25f809858c7e107f640
CRs-Fixed: 2343033
2018-11-09 16:59:02 -08:00
Dustin Brown
67d3041bcc qcacld-3.0: Integrate DSC (driver mode change)
The Driver Synchronization Core (DSC) is a set of synchronization
primitives for use by the driver's orchestration layer. It provides APIs
for ensuring safe state transitions (including bring up and tear down)
of major driver objects: a single driver, associated psocs, and their
associated vdevs.

As part of integrating the DSC APIs into HDD, protect driver mode
change.

Change-Id: I28ae8a61f9ffa7e129cf81ade539df8adc72d853
CRs-Fixed: 2347024
2018-11-09 16:58:59 -08:00
Dustin Brown
21a1d46d35 qcacld-3.0: Integrate DSC (driver insmod/rmmod)
The Driver Synchronization Core (DSC) is a set of synchronization
primitives for use by the driver's orchestration layer. It provides APIs
for ensuring safe state transitions (including bring up and tear down)
of major driver objects: a single driver, associated psocs, and their
associated vdevs.

As part of integrating the DSC APIs into HDD, protect driver load
(insmod) and unload (rmmod).

Change-Id: I37fba3ec4c4c59dedace0ce0f0421d2a442ab290
CRs-Fixed: 2346211
2018-11-09 16:58:55 -08:00
nshrivas
356909b4fb Release 5.2.0.105O
Release 5.2.0.105O

Change-Id: Iccecc3250c68bbc02f8a1e48d1a1ed46921d6a3c
CRs-Fixed: 774533
2018-11-09 15:25:02 -08:00
Jeff Johnson
d75a616eea qcacld-3.0: Remove CDS_GET_HAL_CB
Change "qcacld-3.0: Introduce sap_get_mac_context()" introduced a new
API for retrieving the MAC context. Since all instances of using
CDS_GET_HAL_CB have been converted, remove the macro.

Change-Id: Ib0ed67cf6af779d2805c3f7bb0cf3667c5d844f9
CRs-Fixed: 2346185
2018-11-09 15:24:57 -08:00
Kiran Kumar Lokere
efdbd0b267 qcacld-3.0: Add support to configure HE SU PPDU Tx
Add support to configure HE single user PPDU transmission.

Change-Id: I6bb2ead049f64c2ff2d28039f1658d66c4878f5f
CRs-Fixed: 2345247
2018-11-09 15:24:53 -08:00
Kiran Kumar Lokere
9463415ae2 qcacld-3.0: Add support for HE OM control configuration
Add support for configuring the HE OM control field

Change-Id: I2b934411d16f006f53d068a51af54a14dbd01a46
CRs-Fixed: 2311409
2018-11-09 15:24:48 -08:00
nshrivas
0284a3572c Release 5.2.0.105N
Release 5.2.0.105N

Change-Id: Ic522a24f10a6f27683fad96c657b0cf3e769128c
CRs-Fixed: 774533
2018-11-09 13:11:18 -08:00
Sourav Mohapatra
674925f00b qcacld-3.0: Register hdd callbacks before event registration
Presently the hdd callbacks registration for the events that
need to update data to HDD/SME/LIM from WMA are done after the
event registration is done. During the modules closing, the
callbacks are unregistered first and then the events gets
unregistered.

Move the callback registration before htc_start happens during
modules starting and similarly during modules stop, move the
deregistration of the callbacks after htc_stop.

Change-Id: Id779025188a65af6f08bfbcb15c35cd2be17b53c
CRs-Fixed: 2220895
2018-11-09 13:11:18 -08:00
nshrivas
30f781ebfe Release 5.2.0.105M
Release 5.2.0.105M

Change-Id: Ic57a05601224d94d00296ce85461d85ff034e429
CRs-Fixed: 774533
2018-11-09 09:49:48 -08:00
Tushnim Bhattacharyya
4bd8905cd4 qcacld-3.0: Replace QDF_BUG(0) with cds_trigger_recovery()
Replace QDF_BUG(0) with call cds_trigger_recovery() in
wma_remove_peer(), as it is a possible scenario for NDI
since the NDI vdev is managed by FW.

Change-Id: Ief8a37c732a1feebe3a78f2f03da791712398d43
CRs-Fixed: 2346252
2018-11-09 09:49:47 -08:00
Rajeev Kumar
a906529e9a qcacld-3.0: Safely reject sched scan requests in ftm mode
Sched scan start and stop requests are coming in FTM mode
and hence do not access dev->name and reject the request
if driver is in FTM mode.

Change-Id: Ia6a3b4dc2f7c491ecc3d2456238c6583d863c10d
CRs-Fixed: 2345908
2018-11-09 09:49:43 -08:00
nshrivas
d5665aa03e Release 5.2.0.105L
Release 5.2.0.105L

Change-Id: I69e57ba0a199def747f99ca8754d61303a9df9cd
CRs-Fixed: 774533
2018-11-09 06:56:26 -08:00
Jeff Johnson
689d522974 qcacld-3.0: Replace CDS_GET_HAL_CB in sap_module
Change "qcacld-3.0: Introduce sap_get_mac_context()" introduced a new
API for retrieving the MAC context. Update sap_module to use this API.

Change-Id: I906a57557d38b139728c7f2332e9580abf947d47
CRs-Fixed: 2346184
2018-11-09 06:36:15 -08:00
nshrivas
9193fae699 Release 5.2.0.105K
Release 5.2.0.105K

Change-Id: If866dd2b372199d0e576d7b4486ef3ab4b04e0e6
CRs-Fixed: 774533
2018-11-08 22:37:57 -08:00
Paul Zhang
624f88de81 qcacld-3.0: Avoid race when uplayer triggers reassoc
When supplicant tries to reassoc AP, it will set PSK
before issue connection. In driver, it invokes function
__wlan_hdd_cfg80211_keymgmt_set_key and then
__wlan_hdd_cfg80211_connect.

__wlan_hdd_cfg80211_keymgmt_set_key puts
eWNI_SME_ROAM_SCAN_OFFLOAD_REQ to PE queue, then puts
WMA_ROAM_SCAN_OFFLOAD_REQ to WMA queue.

__wlan_hdd_cfg80211_connect puts SIR_HAL_ROAM_INVOKE to
WMA queue directly.

If the command SIR_HAL_ROAM_INVOKE is issued to fw before
WMA_ROAM_SCAN_OFFLOAD_REQ, then roaming scan is canceled
because scan mode is set.

To avoid this race, send SIR_HAL_ROAM_INVOKE to PE queue,
and then to WMA queue as well.

Change-Id: I08624efc466085e49fa4201deb221276ec5c260f
Rs-Fixed: 2344710
2018-11-08 22:37:56 -08:00
nshrivas
b9d31767bb Release 5.2.0.105J
Release 5.2.0.105J

Change-Id: I883b7b56abdcbe30d8dcf892083835706a293b12
CRs-Fixed: 774533
2018-11-08 21:03:21 -08:00
Jeff Johnson
eb7b4babcc qcacld-3.0: Remove crda_regulatory_entry_default() prototype
Function crda_regulatory_entry_default() no longer exists, but the
prototype is still present, so remove the obsolete prototype.

Change-Id: I1713ae66489da0deee95d165b704bce31dcc111a
CRs-Fixed: 2345153
2018-11-08 21:03:20 -08:00
Jeff Johnson
cc7776d636 qcacld-3.0: Refactor WE_SET_QPOWER_* processing
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). In order to reduce the complexity there is a
plan to replace the existing switch with a vtable. As part of that
goal refactor the WE_SET_QPOWER_* ioctl handling into separate
functions.

Change-Id: Ied945040f1c055e261b611f7265e237c76d5f518
CRs-Fixed: 2345117
2018-11-08 21:03:16 -08:00
Jeff Johnson
682a14e5e9 qcacld-3.0: Replace CDS_GET_HAL_CB in sap_fsm
Change "qcacld-3.0: Introduce sap_get_mac_context()" introduced a new
API for retrieving the MAC context. Update sap_fsm to use this API.

Change-Id: Id4f81e12d2544e1de5d35b0360b6a7dd0e3b3c0b
CRs-Fixed: 2346183
2018-11-08 21:03:12 -08:00
Jeff Johnson
53c3827251 qcacld-3.0: Replace CDS_GET_HAL_CB in sap_api_link_cntl
Change "qcacld-3.0: Introduce sap_get_mac_context()" introduced a new
API for retrieving the MAC context. Update sap_api_link_cntl to use
this API.

Change-Id: Icb5cfb0db4acaf7ee58e9527feded83c88bcb8d3
CRs-Fixed: 2346182
2018-11-08 21:03:08 -08:00
Jeff Johnson
03d1e2c428 qcacld-3.0: Introduce sap_get_mac_context()
Currently the macro CDS_GET_HAL_CB() is used throughout the SAP to
retrieve an opaque handle for the MAC context. This name is an
anachronism given that the HAL layer was moved to firmware many
generations ago. In addition, since the SAP module is internal to the
UMAC, it should normally not be dealing with the opaque handle but
should instead be dealing directly with the MAC context. Finally, per
the coding style, "inline functions are preferable to macros
resembling functions."

To address these issues introduce sap_get_mac_context(), a new inline
function, to replace the current usage of CDS_GET_HAL_CB().

Subsequent changes will actually perform the replacement.

Change-Id: I53160f7f5a315516f5348baea8cc7945483431bd
CRs-Fixed: 2346181
2018-11-08 21:03:03 -08:00
nshrivas
3d07edaed5 Release 5.2.0.105I
Release 5.2.0.105I

Change-Id: I29e5956af2ed260ec9f3760682c5bbf32ab4d89e
CRs-Fixed: 774533
2018-11-08 13:39:34 -08:00
Dustin Brown
c2a156e17b qcacld-3.0: Mark target not ready in hif disable path
Currently, the target-not-ready flag is only ever cleared in the event
of a firmware down notification from the platform driver. However, we
know that the target is not ready after a certain point in the hif
disable path. Additionally, the hif enable path does not clear this flag
during error handling. Address these issues.

Change-Id: I02555940dfba35874768aa453a24121a101354e5
CRs-Fixed: 2339361
2018-11-08 13:39:33 -08:00
Dustin Brown
af8fea0bc9 qcacld-3.0: Move fw down handling to psoc shutdown
As time goes by, more and more logic gets added to the firmware down
indication handler. Generally, there isn't a good reason why this logic
can't or shouldn't be handled with the rest of the subsystem restart
(SSR) cleanup code during the psoc shutdown phase. Additionally, the
firmware down indication can come in hardware interrupt context on some
platforms. This is incompatible with the current mutex-grabbing design.

On order to unify the SSR cleanup logic and support platforms which send
the firmware down indication in hardware interrupt context, move
processing currently done during firmware down handling to psoc shutdown
instead.

Change-Id: Ie1dea835eca5bad1ac3647a0da544d2c51c24194
CRs-Fixed: 2345287
2018-11-08 13:39:30 -08:00
Dustin Brown
8f05f65391 qcacld-3.0: Remove PLD_RECOVERY handling
The platform driver uevent handling in WLAN handles both the firmware-
down and "recovery" events. However, the recovery event on snoc
platforms is actually the firmware-crashed event. Recovery _is_ a valid
uevent for pcie platforms, but I20db3698602ea273038a3f024b4e5f61639f6d74
is adding support for the firmware down event.

Additionally, there is no good reason to handle both events, and the
various handling logics are spread across both events with little rhyme
or reason. Remove handling of the "recovery" platform uevent, and move all
associated logic to the firmware-down uevent handling.

Change-Id: I36b6f607438c930dff1936f372af80be311dfe49
CRs-Fixed: 2339357
2018-11-08 13:39:26 -08:00
nshrivas
5c6db8de0b Release 5.2.0.105H
Release 5.2.0.105H

Change-Id: I8c2b0b86393992876613fdc466c7118a51630f5b
CRs-Fixed: 774533
2018-11-08 01:30:46 -08:00
Wu Gao
e4c142d0d8 qcacld-3.0: Fix potential OOB read when dump dbs hw mode
It doesn't update wma_handle->num_dbs_hw_modes after event
WMI_SERVICE_READY_EXT_EVENTID comes and re-allocate hw_mode_list,
which will cause potentially OOB read hw_mode_list.

Change-Id: I8e4aa13120bfe185fba3e0000cf289406b6bcfce
CRs-Fixed: 2336889
2018-11-08 01:30:45 -08:00
nshrivas
df73ee3380 Release 5.2.0.105G
Release 5.2.0.105G

Change-Id: Ib31f7db4b9a5a470c2d24720ab694363eb136743
CRs-Fixed: 774533
2018-11-08 00:11:44 -08:00
Jeff Johnson
61c999d5cd qcacld-3.0: Replace tAniSirGlobal with the underlying struct
Change "qcacld-3.0: Rename struct sAniSirGlobal to mac_context"
(Change-Id Ibaaeb5296e42a24c66d4adf4f720d32a9ae41888) introduced a new
name for the global MAC context. In addition, the Linux coding style
document tells us "In general, a pointer, or a struct that has
elements that can reasonably be directly accessed should never be a
typedef."

To align with the new name, as well as to align with the guidance from
the Linux coding style, replace all instances of typedef tAniSirGlobal
with the underlying struct mac_context.

Change-Id: Ibb6c1f69fecbe00a17f4cc98a28706d859fa2928
CRs-Fixed: 2346156
2018-11-08 00:11:43 -08:00
nshrivas
074eb41155 Release 5.2.0.105F
Release 5.2.0.105F

Change-Id: I011f42fd92c5d2e30eb0053f247c6e8feab44439
CRs-Fixed: 774533
2018-11-07 10:52:16 -08:00
Ashish Kumar Dhanotiya
a6a4f5e444 qcacld-3.0: Reject any invalid MAC address from mac.bin
If driver gets all 0s as MAC address from mac.bin, it considers
this as valid address and proceed to derive remaining addresses.
this zero MAC is assigned to any of the interface resulting in
undefined behaviour.

To resolve this issue, validate all the MAC addresses provided by
mac.bin and reject all the addresses if any of the MAC is invalid.

Change-Id: Ia1db8249dd4ca58612b6f9eae5903bc809fed493
CRs-Fixed: 2333912
2018-11-07 10:52:15 -08:00
nshrivas
9f9af74753 Release 5.2.0.105E
Release 5.2.0.105E

Change-Id: I026e060a3f313454f65a088f68842da83b070f48
CRs-Fixed: 774533
2018-11-07 06:33:00 -08:00
Paul Zhang
cb573e0592 qcacld-3.0: Fix false alarm scan reject issue
Currently, the scan is rejected if connection is in progress. And
it uses last_scan_reject_timestamp and reset scan_reject_cnt to
avoid scan stuck issue. last_scan_reject_timestamp and
scan_reject_cnt reset when the next scan issues successfully.

If:
1\ Scan happens and connection is in progress. Initialized
   last_scan_reject_timestamp and reset scan_reject_cnt;
2\ Maybe no scan happens for a long time;
3\ scan happens but unfortunately connection is in progress again.

Then false alarm may happen because the time has already expired and
scan_reject_cnt >= 15.

Reset scan reject params if connection is success or it receives
final failure from CSR after trying with all APs.

Change-Id: Icd72d1d2c0adee8bb5b5b9c6537e1c48e37a7121
CRs-Fixed: 2333283
2018-11-07 06:33:00 -08:00
nshrivas
f37b43f290 Release 5.2.0.105D
Release 5.2.0.105D

Change-Id: I816460266a42baccad8c48fa68758c05d3bff0b2
CRs-Fixed: 774533
2018-11-07 01:35:45 -08:00
Arunk Khandavalli
890f6d9c7e qcacld-3.0: Move power stats from debugfs to sysfs
Move power stats from the debugs to sysfs. Also previously
power stats was maintained per vdev but the data received
from the firmware is per pdev. Hence move the power stats
implementation from vdev to pdev.

Change-Id: I10df003fe8f79d35d0758b56d971f4973d27750b
CRs-Fixed: 2345097
2018-11-07 01:35:44 -08:00
nshrivas
451b81cd89 Release 5.2.0.105C
Release 5.2.0.105C

Change-Id: Ic650bc04bdba2c02418b9ad6e04e1ad184e86e45
CRs-Fixed: 774533
2018-11-06 22:39:52 -08:00
Jeff Johnson
009c40f1b7 qcacld-3.0: Rename struct sAniSirGlobal to mac_context
The primary data structure used within the protocol stack is currently
named sAniSirGlobal. This naming is problematic for two reasons.
First, the "Ani" and "Sir" are archaic references that should be
replaced throughout the driver. Second, camelCase is frowned upon by
the Linux coding style. In order to address these issues, rename
sAniSirGlobal to mac_context.

Change-Id: Ibaaeb5296e42a24c66d4adf4f720d32a9ae41888
CRs-Fixed: 2345128
2018-11-06 22:39:51 -08:00
nshrivas
d2eac151b8 Release 5.2.0.105B
Release 5.2.0.105B

Change-Id: Ia02b0b87149bd91e3eeef567a545085bbd0d940e
CRs-Fixed: 774533
2018-11-06 21:07:42 -08:00
Lin Bai
f5e8cc2dba qcacld-3.0: Fix compiler error on UP target
QCA_CONFIG_SMP defined to support some thread scheduling features on
SMP target, while some variants defined only for SMP purpose are
referred out of this MACRO, like is_ol_rx_thread_suspended,
ol_rx_event_flag and ol_suspend_rx_event.

Defines separate functions for SMP/UP target to avoid it.

Change-Id: I01884644b7b77e55514cf00426609643386480e8
CRs-Fixed: 2344683
2018-11-06 21:07:41 -08:00
Bala Venkatesh
c725a06d80 qcacld-3.0: Pass valid arguments to hdd_wmm_is_acm_allowed
Currently pointer of the vdev object is sent to the callback
hdd_wmm_is_acm_allowed to get the adapter. But this can't
be used to get the adapter. Instead pass the vdev id to get the
adapter.

Change-Id: I3cb2f58d09a263c77a3696a36e863cc4137c7821
CRs-Fixed: 2341804
2018-11-06 21:07:37 -08:00
Tiger Yu
24ca3362c4 qcacld-3.0: Enable the scatter-gather feature
Enable the scatter-gather feature for wlan interface, if the wlan
interface is binding to the bridge, which might enable SG & TSO feature
for the bridge and improve the TCP TX throughput much better.

Change-Id: I26101756266878f9f41c5dc2d0b5dad189b44ee1
CRs-Fixed: 2246512
2018-11-06 21:07:33 -08:00
nshrivas
5bac6e1e54 Release 5.2.0.105A
Release 5.2.0.105A

Change-Id: I84bf29ef964fe9c2ad63e3c7320f2cc3de9d7ae6
CRs-Fixed: 774533
2018-11-06 19:39:50 -08:00
Liangwei Dong
4d35cad708 qcacld-3.0: Fix "no_of_open_sessions" messed up
__wlan_hdd_cfg80211_change_iface will clear "concurrency_mode"
at the beginning, but in certain case it would be failed in middle of
create new mode adapter, then the "concurrency_mode" is not restored
to original one.
When supplicant trys again to call __wlan_hdd_cfg80211_change_iface,
the no_of_open_sessions will be "255".
That causes the "no_of_open_sessions" messed up.

Fix by restore "concurrency_mode" in error case.

Change-Id: Iac702dfb8204621e93456e2a0c0dbba5adeed838
CRs-Fixed: 2343478
2018-11-06 19:39:50 -08:00
nshrivas
6c24a79791 Release 5.2.0.105
Release 5.2.0.105

Change-Id: Iccf5c0b925cbfaf1069766efb364d908cb46e7bf
CRs-Fixed: 774533
2018-11-06 18:02:43 -08:00
Rajasekaran Kalidoss
54a07c9528 qcacld-3.0: Remove policy_mgr session in disassoc hdlr
In LFR2 roaming disassociation with old AP happens
immediately after preauth success. But policy_mgr
decrement this entry in association completion handler.
This results in policy_mgr assuming an extra connection
while checking hw mode. policy_mgr session for the
disassociated AP should be removed in disassoc success
response handler.

CRs-Fixed: 2316508
Change-Id: I41db1f5a365d3a510e27d10adcec2a7d765616d5
2018-11-06 18:02:43 -08:00
jiad
8196e0a900 qcacld-3.0: Fix format build error
This fixes below build error.

format '%lu' expects argument of type 'long unsigned int',
but argument 6 has type 'unsigned int' [-Werror=format=]

Change-Id: I54b2e171ab5c7799af3e23a5d1fd8d4cb3034983
CRs-Fixed: 2344741
2018-11-06 18:02:38 -08:00
nshrivas
2a9399ba8f Release 5.2.0.104Z
Release 5.2.0.104Z

Change-Id: I90737263fe562059285a59863e0a701fa9c36ce3
CRs-Fixed: 774533
2018-11-06 16:16:03 -08:00
Liangwei Dong
ab3dcd4033 qcacld-3.0: Fix override chan issue
When override sap channel, call wlan_reg_set_channel_params
to update ch_params.

Change-Id: I4086ec8fea0d68547a1080b0ef455a0e9f64c0b7
CRs-Fixed: 2333666
2018-11-06 16:16:03 -08:00
nshrivas
c55636159e Release 5.2.0.104Y
Release 5.2.0.104Y

Change-Id: I0a52e9ed76753d70872775d8ff3fea59bdb350ba
CRs-Fixed: 774533
2018-11-06 00:22:15 -08:00
Vignesh Viswanathan
949794f210 qcacld-3.0: Remove HT Capabilities related CFG from WNI
Removed the unused HT Capabilities related CFG Items from WNI CFG
enum

Change-Id: I73fbb3640c1a1463331ff8e9f11eef92126611d8
CRs-Fixed: 2344331
2018-11-06 00:22:15 -08:00
Vignesh Viswanathan
ddc89e5f41 qcacld-3.0: Add additional HT Caps related INI Items to MLME CFG
Add the following HT Caps related INI/CFG items to MLME component.

gShortPreamble, CFG_HT_AMPDU_PARAMS, CFG_EXT_HT_CAP_INFO,
CFG_HT_INFO_FIELD, gEnableAMPDUPS and gMaxAmsduNum.

Change-Id: I019961016a2f0e39c7c62066c04788d3bd3d37e7
CRs-Fixed: 2318579
2018-11-06 00:22:11 -08:00
Yeshwanth Sriram Guntuka
0e5b1eb66b qcacld-3.0: Post ack timeout lim message before deactivating timer
In STA mode, deauth frame is sent to AP due to disconnect
triggered as part of hdd_stop. Host did not receive deauth
tx complete event and FW_DOWN uevent is received after this.
As part of pe shutdown notifier cb, lim timers are deactivated.
This will result in cleanup failure and disconnect timeout.

Fix is to post SIR_LIM_DEAUTH_ACK_TIMEOUT message to lim
before deactivating the timer.

Change-Id: I75d8a8c861e89bb34526a0af92c446139a5bec1c
CRs-Fixed: 2344575
2018-11-06 00:22:07 -08:00
nshrivas
d41cb2658d Release 5.2.0.104X
Release 5.2.0.104X

Change-Id: Iac1b6c01b0e5849858fcfb51c548e939456de85a
CRs-Fixed: 774533
2018-11-05 23:03:47 -08:00
Liangwei Dong
509c347011 qcacld-3.0: Add new hw mode unit test cmd
Add unit test command for 2x2 5g + 1x1 2g DBS mode
and 2x2 2g + 1x1 5g DBS.

Change-Id: I80535880dadaef21c2c2e610b3dd272d3babbed0
CRs-Fixed: 2341342
2018-11-05 23:03:46 -08:00
nshrivas
dcb31d8862 Release 5.2.0.104W
Release 5.2.0.104W

Change-Id: Idc5e875ad731c4571f5057c9c09265fbfdadc344
CRs-Fixed: 774533
2018-11-05 21:17:39 -08:00
Min Liu
93073afc2d qcacld-3.0: Fix incorrect pe session when doing pre-auth
When scan cannot be cancelled timely after pre-auth response is received,
Then a second attempt of pre-auth request could be sent, which might be
referencing a wrong session and cause NULL pointer access.

Skip to send pre-auth request for such case.

Change-Id: Icb81830ef08cffc172b327e3a8ae170aea1ec58c
CRs-Fixed: 2272022
2018-11-05 21:17:38 -08:00
nshrivas
5276e5b495 Release 5.2.0.104V
Release 5.2.0.104V

Change-Id: Ic9f41a6ae49d5682bb0e78e406de89b84c632fb9
CRs-Fixed: 774533
2018-11-05 16:15:16 -08:00
Abhishek Singh
4e2676e7a3 qcacld-3.0: Cleanup the unused serialization commands
Cleanup the serialization commands that are not used now.

Change-Id: I340c52fb3180bec94508c5d5d36f43ba6efab143
CRs-Fixed: 2344570
2018-11-05 16:15:15 -08:00
Abhinav Kumar
7d6f1ac679 qcacld-3.0: ADD MLME INI items of WMM Configuration
Add the following WMM config  ini configs to MLME cfg:

1. CFG_QOS_WMM_MODE_NAME
2. CFG_QOS_WMM_80211E_ENABLED_NAME
3. CFG_QOS_WMM_UAPSD_MASK_NAME
4. CFG_QOS_IMPLICIT_SETUP_ENABLED_NAME

Change-Id: I0c6354960b49d680e3efe304ea3300059c37015c
CRs-Fixed: 2327691
2018-11-05 16:15:11 -08:00
Abhinav Kumar
2af8c12ac9 qcacld-3.0: ADD MLME INI items of WMM AC_BK
Add the following WMM BE VO ini configs to MLME cfg:
1. CFG_QOS_WMM_INFRA_DIR_AC_BK_NAME
2. CFG_QOS_WMM_INFRA_NOM_MSDU_SIZE_AC_BK_NAME
3. CFG_QOS_WMM_INFRA_MEAN_DATA_RATE_AC_BK_NAME
4. CFG_QOS_WMM_INFRA_MIN_PHY_RATE_AC_BK_NAME
5. CFG_QOS_WMM_INFRA_SBA_AC_BK_NAME
6. CFG_QOS_WMM_INFRA_UAPSD_BK_SRV_INTV_NAME
7. CFG_QOS_WMM_INFRA_UAPSD_BK_SUS_INTV_NAME

Introduce the basic infra APIs related to these configs
from mlme.

Change-Id: I1f8e6f0fa1ff15eda36a20ee06772c4a1ddd9ca8
CRs-Fixed: 2327690
2018-11-05 16:15:07 -08:00
nshrivas
f20cae5f99 Release 5.2.0.104U
Release 5.2.0.104U

Change-Id: I934f67b9850982a040190491726c21ef8e62c981
CRs-Fixed: 774533
2018-11-05 14:47:52 -08:00
Jeff Johnson
5bb786041f qcacld-3.0: Remove csr_set_phy_mode()
Function csr_set_phy_mode() is not used. Since it is apparently
obsolete, remove it.

Change-Id: I742060a27e6501ee894348d2a915f50f550ef6da
CRs-Fixed: 2344316
2018-11-05 14:47:47 -08:00
Tushnim Bhattacharyya
4a0de7ac35 qcacld-3.0: Free roam_info in sme_rrm_send_scan_result
Free roam_info in sme_rrm_send_scan_result for all error cases to
avoid memory leak.

Change-Id: I9a30c0c5e349d926092a881c4e2720100836e9d1
CRs-Fixed: 2344465
2018-11-05 14:47:44 -08:00
nshrivas
ee15c8f710 Release 5.2.0.104T
Release 5.2.0.104T

Change-Id: I721cb160c665301b9666f6331cc1fd1f6021c655
CRs-Fixed: 774533
2018-11-05 12:17:56 -08:00
Bala Venkatesh
d267bf8de4 qcacld-3.0: Avoid NULL pointer access in function wma_send_bcn_buf_ll
In function wma_send_bcn_buf_ll, bcn info is filled from
wma handle by mapping the vdev id. For valid vdev id also wma_handle
could have NULL beacon info. So, check for NULL pointer before
accessing the bcn pointer.

Change-Id: I660c8231801eb28962edc364a139e7980febb71e
CRs-Fixed: 2336946
2018-11-05 12:17:56 -08:00
nshrivas
e0b4b7f183 Release 5.2.0.104S
Release 5.2.0.104S

Change-Id: I5ea2584edf006ce36c4bf89c2b6269f106f92788
CRs-Fixed: 774533
2018-11-05 10:57:38 -08:00
jiad
4afa84fe51 qcacld-3.0: Abstract BMI CE callbacks
As part of WIN BMI modularization, hif_bmi_register_callbacks
are removed from if_pci.c in qcacmn project. As a result,
MCL needs to invoke hif_bmi_register_callbacks in qcacld project.

Fix is to call bus agnostic hif_register_bmi_callbacks method
in bmi_download_firmware.

Change-Id: I72febb02150cf9c672bea4949c53f1b87fa69cdf
CRs-Fixed: 2332266
2018-11-05 10:57:38 -08:00
nshrivas
39cbd468c8 Release 5.2.0.104R
Release 5.2.0.104R

Change-Id: Idb04e92c857c3ef5b40e499cb20b59f826c99d70
CRs-Fixed: 774533
2018-11-05 06:32:51 -08:00
Abhinav Kumar
e94f248f2e qcacld-3.0: ADD MLME INI items of WMM AC_BE
Add the following WMM BE VO ini configs to MLME cfg:
1. CFG_QOS_WMM_INFRA_DIR_AC_BE_NAME
2. CFG_QOS_WMM_INFRA_NOM_MSDU_SIZE_AC_BE_NAME
3. CFG_QOS_WMM_INFRA_MEAN_DATA_RATE_AC_BE_NAME
4. CFG_QOS_WMM_INFRA_MIN_PHY_RATE_AC_BE_NAME
5. CFG_QOS_WMM_INFRA_SBA_AC_BE_NAME
6. CFG_QOS_WMM_INFRA_UAPSD_BE_SRV_INTV_NAME
7. CFG_QOS_WMM_INFRA_UAPSD_BE_SUS_INTV_NAME

Introduce the basic infra APIs related to these configs
from mlme.

Change-Id: Ibaf06ba2df07a4805d31a4748809c44d143dd12e
CRs-Fixed: 2327689
2018-11-05 06:32:50 -08:00
Abhinav Kumar
4c8e026865 qcacld-3.0: ADD MLME INI items of WMM AC_VI
Add the following WMM AC VI ini configs to MLME cfg:

1. CFG_QOS_WMM_INFRA_DIR_AC_VI_NAME
2. CFG_QOS_WMM_INFRA_NOM_MSDU_SIZE_AC_VI_NAME
3. CFG_QOS_WMM_INFRA_MEAN_DATA_RATE_AC_VI_NAME
4. CFG_QOS_WMM_INFRA_MIN_PHY_RATE_AC_VI_NAME
5. CFG_QOS_WMM_INFRA_SBA_AC_VI_NAME
6. CFG_QOS_WMM_INFRA_UAPSD_VI_SRV_INTV_NAME
7. CFG_QOS_WMM_INFRA_UAPSD_VI_SUS_INTV_NAME

Introduce the basic infra APIs related to these configs
from mlme

Change-Id: I320f49b216659937dc7f708fdbb7849ae415e249
CRs-Fixed: 2327687
2018-11-05 06:32:46 -08:00
nshrivas
4e996b018c Release 5.2.0.104Q
Release 5.2.0.104Q

Change-Id: I68b316146ed335c558cc04c9d936b1682acf86e8
CRs-Fixed: 774533
2018-11-02 12:38:58 -07:00
Kiran Kumar Lokere
eaaa3462e6 qcacld-3.0: Fix the issue with SU Tx beamformee in 20MHz mode
Correct the configuration check to enable/disable the Tx SU
beamformee setting in 20MHz mode operation.

Change-Id: I958d5319acf98931187304f2c6fe2a9aff5991b7
CRs-Fixed: 2343849
2018-11-02 12:38:57 -07:00
nshrivas
d3826022f0 Release 5.2.0.104P
Release 5.2.0.104P

Change-Id: I8f2ac5dc9ab9ce3fddec10cb26039989149228e7
CRs-Fixed: 774533
2018-11-02 10:52:59 -07:00
Abhinav Kumar
03522c2330 qcacld-3.0: Acquire wake lock timeout for rrm scan
Currently driver acquires wakelock for scans received from hdd.
But for RRM scan initiated from AP for beacon reports, the
wakelock is not acquired and if host goes to suspend while scan
is in progress,FW asserts.

Fix is to avoid the system suspend by taking the wakelock
before rrm scan start.

Change-Id: I02ddc9b5e6ba5f1782d00e34f044ace34c54d0b0
CRs-Fixed: 2331741
2018-11-02 10:52:59 -07:00
nshrivas
353cbfee9c Release 5.2.0.104O
Release 5.2.0.104O

Change-Id: Ida50a54654029c8851eb5c93541d7530feac446c
CRs-Fixed: 774533
2018-11-02 09:30:50 -07:00
Bala Venkatesh
4183779454 qcacld-3.0: Reset auth_failure_timeout in pe_delete_session
auth_failure_timeout is updated as part of
lim_check_and_announce_join_success for p2p client with NOA.
And the default value is stored in pe_session->defaultAuthFailureTimeout
After receiving the auth resp or in case of auth failure the
auth_failure_timeout is reset to default value. But there is any other
failure and pe session is deleted then the auth_failure_timeout is
not reset. And p2p cli connection will use the wrong auth timeout.
And can result in connection delay's if GO doesn't send the auth response.

Reset the auth_failure_timeout to defalut as part of pe_delete_session.
And decrease the max value to 5000ms.

Change-Id: I374bf45279f086127ef062b83a06049c895c4675
CRs-Fixed: 2343832
2018-11-02 09:30:49 -07:00
nshrivas
d0592c7926 Release 5.2.0.104N
Release 5.2.0.104N

Change-Id: I72d5c444b9a816452eb975513bb79e122f203e6d
CRs-Fixed: 774533
2018-11-02 06:32:47 -07:00
Sravan Kumar Kairam
887e89ebe0 qcacld-3.0: Log TX net queue state for tx timeout
Currently in case of net tx timeout there is no information
which net tx queue is paused. So log the information of all
net tx queue state in case of tx timeout.

Change-Id: I0b92bd98ad68afcaba9b0f3babb135466bdfa503
CRs-Fixed: 2335572
2018-11-02 01:55:29 -07:00
nshrivas
13402e185c Release 5.2.0.104M
Release 5.2.0.104M

Change-Id: I1111396867fb233b632d7aab07451a9c5afe5224
CRs-Fixed: 774533
2018-11-01 23:03:53 -07:00
nshrivas
6a45a2c250 Release 5.2.0.104L
Release 5.2.0.104L

Change-Id: I85763e7862d9ccf2d18e75bc90f3668830e2546a
CRs-Fixed: 774533
2018-11-01 21:18:05 -07:00
Jeff Johnson
1a05fda843 qcacld-3.0: Refactor WE_SET_GTX_* processing
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). In order to reduce the complexity there is a
plan to replace the existing switch with a vtable. As part of that
goal refactor the WE_SET_GTX_* ioctl handling into separate functions.

Change-Id: I8303aaaa8009e568684a9a54dbfd92ea98b3df5e
CRs-Fixed: 2343555
2018-11-01 21:18:04 -07:00
Dustin Brown
db2df2e3d9 qcacld-3.0: Move psoc destroy to hdd_context_destroy
Ida2b81eef0ebbfba2749ca89b63980201830a5e2 moved psoc create into
hdd_context_create(), however the destroy path remained as it was. This
caused a regression in the error path where the psoc was not cleaned up
in all cases. Move the psoc destroy into hdd_context_destroy to maintain
symmetry and avoid leaking the psoc under error conditions.

Change-Id: I3b16c9ea37dcf3e3b0ef262894aead5ff4fac59c
CRs-Fixed: 2342955
2018-11-01 21:18:00 -07:00
nshrivas
97dd4e13f5 Release 5.2.0.104K
Release 5.2.0.104K

Change-Id: I988fba4ee82d022bee91b9ac1803817957f4a485
CRs-Fixed: 774533
2018-11-01 17:24:03 -07:00
nshrivas
d6f83affad Release 5.2.0.104J
Release 5.2.0.104J

Change-Id: I8e0615aa1741fed9eda2af0ade26ffae4a295a0f
CRs-Fixed: 774533
2018-11-01 15:38:19 -07:00
Ashish Kumar Dhanotiya
6784b5042b qcacld-3.0: Release Interface MAC addresses gracefully
Currently if any interface comes up on any of the MAC address
from the driver's default MAC address list and if this MAC is
changed dynamically, now if this interface is deleted, it will
not be able to release this MAC address as this newly
configured MAC doesn't match with any of the MAC from the
driver's default MAC addresses and driver is not able to
release this MAC cosidering it as invalid MAC, because of
this corresponding MAC interface mask bit is also not getting
reset and will never get reset, indicating corresponding MAC
is not available for use. If MAC addresses are changed for all
the interfaces which initially comes up on driver's default
MAC address and later these interfaces are deleted, driver
will not be able to add any of new interfaces even there is
no active interface currently in the driver.

To resolve this issue add one more MAC address list for dynamic
addresses cache all the dynamic address changes in this list,
while releasing the MAC on interface delete, release the MAC
from this dynamic list and reset the corresponding interface
mask bit.

Change-Id: I9b6448dced2d3af75625a5c862d2913c33f9983c
CRs-Fixed: 2328304
2018-11-01 15:38:14 -07:00
nshrivas
d37095395b Release 5.2.0.104I
Release 5.2.0.104I

Change-Id: I539008431558b1a9bda7e0b6bb5de5225cf740af
CRs-Fixed: 774533
2018-11-01 09:17:41 -07:00
chenguo
7130396803 qcacld-3.0: Reinitialize PM objects for monitor mode
Function hdd_override_all_ps is only used for monitor mode. In
this function, unexpected PM objects will cause initialization
malfunction. Move these PM objects setting after vdev creation.

CRs-Fixed: 2338261
Change-Id: I0d0e7b1bc4ec0853a274bdea8db2bbe3a3dbe885
2018-11-01 09:17:40 -07:00
nshrivas
219f442c44 Release 5.2.0.104H
Release 5.2.0.104H

Change-Id: I28deb33495765fc0f42d2ae62a63e22c3f3b6fa1
CRs-Fixed: 774533
2018-11-01 07:40:43 -07:00
Abhishek Singh
ec7e31a70a qcacld-3.0: Do not register SAP as requestor again after reinit
During SSR the sap context is reinitialized and it request for
scan request id again deleting the older request id from scan module
this can lead to situation where the scan requestor list is filled by
SAP request id's and thus next request for request id will return 0.

Now during de init when it try to delete the requestor id 0 it delete
the 0th entry which is for CFG. Now if again SAP register the request
id it will get the 0th index which was freed and thus when CFG
requests a scan the sap callback is called instead of CFG leading to
NULL pointer access.

Fix this by not registering for request id again after SSR for SAP.

Change-Id: Ibc8ad0700b602a9c3d2769d979303499df8d6605
CRs-Fixed: 2341133
2018-11-01 07:40:42 -07:00
nshrivas
4892289f62 Release 5.2.0.104G
Release 5.2.0.104G

Change-Id: I39d611c7f0952e616788ba4e9a4cba419246d6e6
CRs-Fixed: 774533
2018-11-01 05:42:07 -07:00
jitiphil
377bcc1227 qcacld-3.0: Add legacy DP CFG items and APIs
Add the basic infra for legacy DP CFG items and the APIs
to be used from other components.

Change-Id: If7ad0e02c65e04ea13a308e680c9ba3b3d84ae25
CRs-Fixed: 2324099
2018-11-01 05:42:07 -07:00
nshrivas
ce205098f5 Release 5.2.0.104F
Release 5.2.0.104F

Change-Id: I26eaff5b645eea2b54eea713306ca6636c904c17
CRs-Fixed: 774533
2018-11-01 04:20:16 -07:00
Abhishek Singh
8d11564b56 qcacld-3.0: Fix memory leak of sap_ctx->channelList
In sap_deinit_ctx() the check to free sap_ctx->channelList is after
sap_ctx is memset to 0 and thus sap_ctx->channelList will always be
NULL and memory will never get freed.

Also there is no need to reset scan_vdev_del_in_progress after vdev
is deleted in firmware as there still can be the race when scan is
processed. scan_vdev_del_in_progress will be deleted with obj_mgr
vdev so no need to reset it.

Change-Id: Ie5f133d4db48485434436e67ce1643d8e1e04106
CRs-Fixed: 2342039
2018-11-01 04:20:16 -07:00
nshrivas
b322f913bc Release 5.2.0.104E
Release 5.2.0.104E

Change-Id: I7f9ad0c42f5ea9106a58abdc12bcd494f47fee4f
CRs-Fixed: 774533
2018-10-31 23:04:24 -07:00
Jeff Johnson
d0477f2b7a qcacld-3.0: Refactor WE_PPS_* processing
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of all of the WE_PPS_* sub-ioctls
has a complexity greater than 1, so refactor that logic into separate
functions to help reduce the complexity of __iw_setint_getnone().

Change-Id: I2abde9c5e300302c7948049027d2db88c893211a
CRs-Fixed: 2341123
2018-10-31 23:04:23 -07:00
nshrivas
e890acc0a7 Release 5.2.0.104D
Release 5.2.0.104D

Change-Id: I04ad27b4d8a8cf21fe70ae52acc643029079e666
CRs-Fixed: 774533
2018-10-31 19:20:37 -07:00
nshrivas
5da0012aeb Release 5.2.0.104C
Release 5.2.0.104C

Change-Id: I9ee71438b0ec536153000f7e630c879d7db0e256
CRs-Fixed: 774533
2018-10-31 16:28:11 -07:00
Abhishek Singh
254d551576 qcacld-3.0: Fix mem leak in join and reassoc req
If event posting to VDEV state machine fails, the memory allocated
in lim join and reassoc req is not freed, leading to mem leak.

Fix this by freeing the memory in failure cases.

Change-Id: I3769684e6ad64341b73dd6f6343adc8c0d26d04c
CRs-Fixed: 2342487
2018-10-31 16:28:11 -07:00
nshrivas
e903e91e63 Release 5.2.0.104B
Release 5.2.0.104B

Change-Id: I45fadf4e36b00aa3b7fa129ffbe7517016f4853a
CRs-Fixed: 774533
2018-10-31 15:00:17 -07:00
Rajeev Kumar Sirasanagandla
e5787e2440 qcacld-3.0: Handle failure of self peer remove in SSR
When SSR is in progress, when trying to remove self peer, if
wma_remove_peer() is failed then wma_vdev_detach() doesn't send del sta
response and wma_self_peer_remove() can still proceed to start vdev
hold request timer. This can lead to skip of vdev reference count
release by wma acquired during vdev attach.

To address this, release vdev reference count when self peer remove is
failed and when del self sta request is timed-out.

Change-Id: I2703261a848983b10798cb8ec74d1cec5a393ce5
CRs-Fixed: 2342453
2018-10-31 15:00:17 -07:00
Jinwei Chen
c163f9ed3e qcacld-3.0: modify WAPI initial PN value
Currently Napier FW WAPI TX/RX initial PN logic is fit for WIN
host, modify MCL host to align with WIN so that WAPI can work.

Change-Id: I0b49a25e75d1e9c4856daf8648d6561486005ba9
CRs-Fixed: 2323152
2018-10-31 15:00:12 -07:00
nshrivas
8501e50fbb Release 5.2.0.104A
Release 5.2.0.104A

Change-Id: Ifb1e762f9ab8dc7b6c371fd7f83d872be6540de9
CRs-Fixed: 774533
2018-10-31 13:21:15 -07:00
Hardik Kantilal Patel
239c7a268d qcacld-3.0: remove redundant snoc pld APIs
The snoc wlan platform driver supports snoc API with
the device pointer in all upstream kernel, So remove
the redundant snoc APIs from the pld layer.

CRs-Fixed: 2173110
Change-Id: Iee8bce586569e135da81f9a465a9e7df8b042af4
2018-10-31 13:21:15 -07:00
Abhishek Singh
d93a0b2d5c qcacld-3.0: Fix active cmd timeout for set_dual_mac_config during SSR
In error cases of set hw mode, set dual config etc are not handled
in all scenarios and thus the active cmd is not removed in this case
resulting in active cmd timeout.

Fix this by handling and sending failure resp for all the error
scenarios.

Change-Id: I21151798f58bf9816458430d96c7fd1d5f0ee07f
CRs-Fixed: 2341816
2018-10-31 13:21:10 -07:00
nshrivas
a83b817157 Release 5.2.0.104
Release 5.2.0.104

Change-Id: I4d8ae06b355cc235aa943aec7142e18a06a9b71f
CRs-Fixed: 774533
2018-10-31 11:50:41 -07:00
nshrivas
dd83a6810f Release 5.2.0.103Z
Release 5.2.0.103Z

Change-Id: Ibdd9713d801e323c8eb7df6d54df4c97c791b249
CRs-Fixed: 774533
2018-10-31 10:07:02 -07:00
Dustin Brown
d747ecd5d9 qcacld-3.0: Address style issues in stop adapter
To help reduce the complexity of future refactorings in
hdd_stop_adapter_ext(), address some simple style issues.

Change-Id: Iae67f1d828c1ffcb102a78617c40db1babf5b009
CRs-Fixed: 2342133
2018-10-31 10:07:01 -07:00
nshrivas
53e7b0b4b5 Release 5.2.0.103Y
Release 5.2.0.103Y

Change-Id: Iba37144cad30f31c6e2976e09b628ffb3fd066ae
CRs-Fixed: 774533
2018-10-30 01:46:02 -07:00
Will Huang
a47dca3872 qcacld-3.0: Map as QDF_DMA_BIDIRECTIONAL for PMF tx frame
Some target which support sending mgmt frame based on htt would DMA
write this PMF tx frame buffer, it may cause smmu check permission
fault, set a flag to do special DMA map.

Change-Id: I3686be211374d2c316726fa3248dedce87c3faed
CRs-Fixed: 2332329
2018-10-30 01:46:01 -07:00
nshrivas
8096d84309 Release 5.2.0.103X
Release 5.2.0.103X

Change-Id: Iee15e42a07b35eb0fb7f3e039f919d20036288b9
CRs-Fixed: 774533
2018-10-29 22:59:37 -07:00
yuanl
5a28749530 qcacld-3.0: Add SAP, GO and currency support for TSF feature
1) Support SAP, GO standalone case
2) Support SAP + STA concurrency
3) Support GO + STA concurrency

Change-Id: I7da2102f0d8b893bc057bc8ecf0af4ab74f81db4
CR-Fixed:2320218
2018-10-29 22:59:36 -07:00
nshrivas
1036b23fa0 Release 5.2.0.103W
Release 5.2.0.103W

Change-Id: I2d3ab19251f4e7a454e38daaf73941414675899c
CRs-Fixed: 774533
2018-10-29 18:21:02 -07:00
Jeff Johnson
cb598fd644 qcacld-3.0: Refactor WE_CLEAR_STATS processing
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_CLEAR_STATS has a complexity
greater than 1, so refactor that logic into a separate function to
help reduce the complexity of __iw_setint_getnone().

Change-Id: I51e72ccf83a6b63792c17d6c65daca6571ef21bb
CRs-Fixed: 2341122
2018-10-29 18:21:02 -07:00
nshrivas
3cce0fd7b1 Release 5.2.0.103V
Release 5.2.0.103V

Change-Id: I1ee1ccbd812b4c0cccdd972fc3f9b69d05ef73f8
CRs-Fixed: 774533
2018-10-29 15:19:08 -07:00
Pragaspathi Thilagaraj
3cf0f65518 qcacld-3.0: Remove legacy cfg items
Remove legacy cfg items definitions and related macros for the
converged CFG items.

Change-Id: I12944f50d68dafe989417dda777f29a6233c97a4
CRs-Fixed: 2340856
2018-10-29 15:19:08 -07:00
Karthik Kantamneni
df8c1769f3 qcacld-3.0: Remove legacy RATES INI & CFG Items
Remove legacy code for RATES INI and CFG items.

Change-Id: I8b4c38742be3a056697a7bd2418fde3c54c079c8
CRs-Fixed: 2340781
2018-10-29 15:19:03 -07:00
nshrivas
1249147e68 Release 5.2.0.103U
Release 5.2.0.103U

Change-Id: I20b5fc5a51de4438faaaf2cec8ad8ba4ed4e3b33
CRs-Fixed: 774533
2018-10-29 13:49:33 -07:00
Arunk Khandavalli
f9957c0fcf qcacld-3.0: Add fiwmare down case in the pld pcie uevent
When the firmware crashes platform driver notifies the driver
through CNSS_FW_DOWN. Since firmware down support is not
present for the PCI bus, The driver flags for target ready
and recovery flags are not getting set resulting in the commands
sent to firmware.

Add the firmware down support for the pci bus.

Change-Id: I20db3698602ea273038a3f024b4e5f61639f6d74
CRs-Fixed: 2338570
2018-10-29 13:49:33 -07:00
nshrivas
94bffed046 Release 5.2.0.103T
Release 5.2.0.103T

Change-Id: I387e9f0df7d20267eb301b2ea7726546dd453ff7
CRs-Fixed: 774533
2018-10-29 12:18:39 -07:00
Pragaspathi Thilagaraj
cc823ae0cf qcacld-3.0: Fix OOB read in sme_rrm_process_beacon_report_req_ind
When beacon report request action frame is received,
rrm_process_beacon_report_req() is called and num_channels value
is calculated from the action frame directly from user. This
value is assigned to pSmeBcnReportReq->channelList.numChannels
and this num channels value along with the channel list is
posted to sme for further processing. The sme function
sme_rrm_process_beacon_report_req_ind() processes this sme
message eWNI_SME_BEACON_REPORT_REQ_IND. In this function,
the channels in channel list are looped through the received
value pBeaconReq->channelList.numChannels and is copied to the
destination pSmeRrmContext->channelList array from the
pBeaconReq->channelList.channelNumber[] array.
The maximum possible number of channels in channel list
BeaconReq->channelList.channelNumber[] allocated statically
in the definition of tSirChannelList is
SIR_ESE_MAX_MEAS_IE_REQS (8).
So when the pBeaconReq->channelList.numChannels, possible OOB
read occurs.

Validate the value of pBeaconReq->channelList.numChannels
received from the action frame against the maximum supported
number of channels in channel list SIR_ESE_MAX_MEAS_IE_REQS (8).
Place this validation inside the function
sme_rrm_process_beacon_report_req_ind() instead of validating it
at rrm_process_beacon_report_req() so that it defends from other
caller sme_set_ese_beacon_request() which is from user space
command through IOCTL.

Change-Id: I2074b04081328ceab7eeb29c33631a635e9d93c3
CRs-Fixed: 2335974
2018-10-29 12:18:39 -07:00
nshrivas
04c779f53b Release 5.2.0.103S
Release 5.2.0.103S

Change-Id: I432aa8386ac65edcf7bfa679f9123685810863f2
CRs-Fixed: 774533
2018-10-29 09:34:10 -07:00
Jeff Johnson
fc6480b100 qcacld-3.0: Refactor WE_SET_AMSDU processing
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_AMSDU has a complexity
greater than 1, so refactor that logic into a separate function to
help reduce the complexity of __iw_setint_getnone().

Change-Id: I74bbc055c1587fff548512f4c7f325f75345eb95
CRs-Fixed: 2340147
2018-10-29 09:34:09 -07:00
Jeff Johnson
bd2c9916ae qcacld-3.0: Refactor WE_SET_VHT_RATE processing
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_VHT_RATE has a complexity
greater than 1, so refactor that logic into a separate function to
help reduce the complexity of __iw_setint_getnone().

Change-Id: I07299bcc7e1cba7b5ceced3ba1cf22c470cb448e
CRs-Fixed: 2340146
2018-10-29 09:34:05 -07:00
Jeff Johnson
50b1588d8b qcacld-3.0: Refactor WE_SET_11N_RATE processing
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_11N_RATE has a complexity
greater than 1, so refactor that logic into a separate function to
help reduce the complexity of __iw_setint_getnone().

Change-Id: Iea2ee6bc53a56bb92497d42ac057e6663bc07097
CRs-Fixed: 2340145
2018-10-29 09:34:02 -07:00
Jeff Johnson
71d8038cea qcacld-3.0: Refactor WE_SET_RTSCTS processing
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_RTSCTS has a complexity
greater than 1, so refactor that logic into a separate function to
help reduce the complexity of __iw_setint_getnone().

Change-Id: I9f17824abe6ac9e60cc908c46661fe991ecfd9aa
CRs-Fixed: 2340144
2018-10-29 09:33:58 -07:00
Jeff Johnson
ce996b3e66 qcacld-3.0: Refactor WE_SET_SHORT_GI processing
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_SHORT_GI has a complexity
greater than 1, so refactor that logic into a separate function to
help reduce the complexity of __iw_setint_getnone().

Change-Id: Ica2a50216c413985f05a2771641be439c6c9d8cd
CRs-Fixed: 2339229
2018-10-29 09:33:54 -07:00
Jeff Johnson
b6645852ca qcacld-3.0: Relocate hdd_set_rx_stbc() mac_handle test
hdd_set_rx_stbc() is called from both the STA and SAP ioctl
handlers. In the STA case the caller checks the mac_handle, but in the
SAP case the mac_handle is not checked. This could result in a bad
mac_handle being used in the SAP case. In order to cover both cases
relocate the mac_handle test to hdd_set_rx_stbc().

Note that this has the added benefit of reducing the cyclomatic
complexity of __iw_setint_getnone(), one of the HDD functions with the
highest complexity.

Change-Id: I9442a8a46da4066c8b4dafe2cf9ce64f608bb3a9
CRs-Fixed: 2339228
2018-10-29 09:33:51 -07:00
Jeff Johnson
57ff4fa1d2 qcacld-3.0: Relocate hdd_set_tx_stbc() mac_handle test
hdd_set_tx_stbc() is called from both the STA and SAP ioctl
handlers. In the STA case the caller checks the mac_handle, but in the
SAP case the mac_handle is not checked. This could result in a bad
mac_handle being used in the SAP case. In order to cover both cases
relocate the mac_handle test to hdd_set_tx_stbc().

Note that this has the added benefit of reducing the cyclomatic
complexity of __iw_setint_getnone(), one of the HDD functions with the
highest complexity.

Change-Id: Ie7a01ddbfb958ab87b7baf11e93d8a86c32744b7
CRs-Fixed: 2339227
2018-10-29 09:33:46 -07:00
Jeff Johnson
1ca04768ea qcacld-3.0: Relocate hdd_set_ldpc() mac_handle test
hdd_set_ldpc() is called from both the STA and SAP ioctl handlers. In
the STA case the caller checks the mac_handle, but in the SAP case the
mac_handle is not checked. This could result in a bad mac_handle being
used in the SAP case. In order to cover both cases relocate the
mac_handle test to hdd_set_ldpc().

Note that this has the added benefit of reducing the cyclomatic
complexity of __iw_setint_getnone(), one of the HDD functions with the
highest complexity.

Change-Id: I97827ee257c9e15e24468ed9800080375f082ff1
CRs-Fixed: 2339226
2018-10-29 09:33:42 -07:00
nshrivas
7d46de8b8a Release 5.2.0.103R
Release 5.2.0.103R

Change-Id: I7c24079aeb85dc9fdf629e401c8df394d84b27b0
CRs-Fixed: 774533
2018-10-29 04:39:42 -07:00
jitiphil
7af5cf252a qcacld-3.0: Open WLAN adapter in FTM mode after modules are started
According to the current code flow of con_mode_handler, the
WLAN modules are stopped, adapter is opened in FTM mode and then
the modules are started. Due to the INI/CFG value accces done as
part of opening the adapter, and since the modules are stopped
at this point, it results in a use after free scenario.

Modify code sequence of con_mode_handler to WLAN start modules
before opening the adapter in FTM mode.

Change-Id: I94afb9b2a3751247b4ae95e27b1374b25890a9d7
CRs-Fixed: 2339777
2018-10-29 04:39:42 -07:00
nshrivas
98ad588d41 Release 5.2.0.103Q
Release 5.2.0.103Q

Change-Id: Ia3bdde950b8d618601243ba7676ae0c1558bd9d8
CRs-Fixed: 774533
2018-10-29 03:11:40 -07:00
nshrivas
c9bc68f44c Release 5.2.0.103P
Release 5.2.0.103P

Change-Id: I9c19d450868171c45594335694bbb191263610d4
CRs-Fixed: 774533
2018-10-28 23:27:06 -07:00
chenguo
92af4bfb01 qcacld-3.0: Fix incorrect valid pointer checking
There is an incorret valid pointer checking after memory
allocation for monitor mode, which will cause net device up
failure. Fix this incorrect checking.

CRs-Fixed: 2338747
Change-Id: Ib1dd4d85ce7e7cace1167a082c103fb0300eb16a
2018-10-28 23:27:05 -07:00
nshrivas
9b471fda5e Release 5.2.0.103O
Release 5.2.0.103O

Change-Id: I7e6ab5d3f4a1f43e360ca42479d4bbe5369271cf
CRs-Fixed: 774533
2018-10-27 05:28:25 -07:00
Abhinav Kumar
e057b4188a qcacld-3.0: Remove legacy VHT INI & CFG Items
Remove the definition of following INI & CFG Items
for VHT caps which is common for HT and HE caps.

CFG_VHT_LDPC_CODING_CAP
CFG_VHT_SHORT_GI_80MHZ
CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ
CFG_VHT_TXSTBC
CFG_VHT_RXSTBC
CFG_VHT_RX_MCS_MAP
CFG_VHT_TX_MCS_MAP
CFG_VHT_BASIC_MCS_SET

Change-Id: I55390c3391a0be272c609030dae232d767111fcf
CRs-Fixed: 2333183
2018-10-27 05:28:24 -07:00
nshrivas
265f49c9ea Release 5.2.0.103N
Release 5.2.0.103N

Change-Id: I0cf24f50aad71bee53533bc048b6078545d5975c
CRs-Fixed: 774533
2018-10-27 02:32:32 -07:00
Kiran Kumar Lokere
b52cfc8309 qcacld-3.0: Send MU EDCA params after vdev up is sent to FW
FW expects the MU EDCA params after vdev up as it checks for
active vdev to save the MU EDCA params. Send the MU EDCA params
to FW after vdev up is sent to FW.

Change-Id: Ia7689f1bad884e73098020e5508f669d9b8881d7
CRs-Fixed: 2337827
2018-10-27 02:32:31 -07:00
Kiran Kumar Lokere
6f6a5688c9 qcacld-3.0: Fix issue with Nss setting status
Update Nss routine always returns failure status to user space.
Fix issue to send correct response to user space.

Change-Id: I12342ee531fc790b3042d8dcd8f5bb4b7a97e9fe
CRs-Fixed: 2340073
2018-10-27 02:32:27 -07:00
nshrivas
f2126639dc Release 5.2.0.103M
Release 5.2.0.103M

Change-Id: I2fcfdc4a85b154f082c6fa435cdb2d4accaf7480
CRs-Fixed: 774533
2018-10-27 00:11:33 -07:00
Abhishek Singh
13bf0ce6cd qcacld-3.0: Purge all serialization commands on csr stop
During csr stop, csr_roam_close_session try to purge all the pending
commands for the vdev. But as vdev is already logically deleted,
the cmds are not purged as the purge by vdev API fails to get the
vdev ref.

As in csr stop, driver clean up all the sme session so instead of
calling purge commands for vdev, call purge cmd for all the vdev.

Also the active command timeout for the delete vdev is 30 sec while
HDD waits for 15 sec. The active command timeout should be less
than the HDD timeout. Thus set active cmd timeout as 10 sec and
HDD timeout as 11 sec

Change-Id: I1d45de261c50f1835379a9cc1df4631f3e32f459
CRs-Fixed: 2339694
2018-10-27 00:11:32 -07:00
nshrivas
a7b55dd381 Release 5.2.0.103L
Release 5.2.0.103L

Change-Id: I8f0f4e2604d98c358cbead082ab54b04ec3f0255
CRs-Fixed: 774533
2018-10-26 22:37:36 -07:00
Jianmin Zhu
7a03c02b36 qcacld-3.0: Fix mem and timer leak when WMA_DELETE_BSS_REQ timeout
In wma_vdev_resp_timer(), while handling WMA_DELETE_BSS_REQ if
wma_crash_on_fw_timeout() is true, SSR is triggered, but timer
event_timeout isn't destroyed, wma_target_req, and user_data
isn't freed, result in timer and mem leak.

Change-Id: Ic47af43de671d195c6addd0360b96305af15d9bf
CRs-Fixed: 2337211
2018-10-26 22:37:36 -07:00
nshrivas
d38a1ef8c6 Release 5.2.0.103K
Release 5.2.0.103K

Change-Id: I2d6b462370e397f61fe672bd5d86f90a5b4d665e
CRs-Fixed: 774533
2018-10-26 16:42:28 -07:00
Yue Ma
fb3b78d7d2 qcacld-3.0: Add force wake APIs support in PLD
As part of PCIe power management for new WLAN devices, it requires
asserting WAKE register before accessing any MMIO registers outside
first 4K range. Add the APIs support in PLD for WLAN host driver.

Change-Id: I307cc6688fca58a52a6eaf3982d675c7a85a6965
CRs-fixed: 2326459
2018-10-26 16:42:28 -07:00
Yue Ma
9c0e4800ea qcacld-3.0: Add PLD support to check if FW is down for PCIe bus
Support to check if FW is down or not for PCIe bus in PLD layer.

Change-Id: Ic09607016c430a1c4ec6c30f9b29b1ab52b4c885
CRs-fixed: 2268026
2018-10-26 16:42:24 -07:00
nshrivas
ade36d6ffb Release 5.2.0.103J
Release 5.2.0.103J

Change-Id: I74f50a9f6298cd0b91acf437d331b8485a8f6569
CRs-Fixed: 774533
2018-10-26 12:17:24 -07:00
Dustin Brown
0c8486685e qcacld-3.0: Replace idle timeout flush in fw down
I1bfa8ab7329040c0b5ba989c0d7de7bf7228dd35 moved the idle timeout work
flush in an attempt to address a regression caused by moving the WMI
stop call in Iea53931771afd93ffaeabf704bbaffcf2460284f. Later, the WMI
stop call change was ultimately reverted in
I91046efeab8bc13b9f5c37d5a4d02b66c63e35a9, but the flush call was left
in its new location. Replace the original call site of the idle timeout
work flush, from before Iea53931771afd93ffaeabf704bbaffcf2460284f.

Change-Id: I21d74e02b5491dd3b42bb668329d09e77b416b7d
CRs-Fixed: 2339335
2018-10-26 12:17:23 -07:00
Jeff Johnson
389126493f qcacld-3.0: Refactor WE_SET_NSS processing
Currently the HDD function with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_NSS has a complexity
greater than 1, so refactor that logic into a separate function to
help reduce the complexity of __iw_setint_getnone(). As part of the
refactoring relocate the mac_handle NULL check to hdd_update_nss()
since that is where it is actually used.

Change-Id: I6fef7680b8013547cb2b8eb649e207e3026144ff
CRs-Fixed: 2338567
2018-10-26 12:17:19 -07:00
nshrivas
a583339824 Release 5.2.0.103I
Release 5.2.0.103I

Change-Id: I5a1dccc7c725ac182c806fc1cae0e7dc1329f361
CRs-Fixed: 774533
2018-10-26 10:39:20 -07:00
Tiger Yu
f1551cbacc qcacld-3.0: doing tx desc init earlier in ol_tx_hl_base
Doing the tx desc initialization earlier in ol_tx_hl_base to make sure
all msdu buffers have been mapped before msdu frame is freed if encouter
error.

Change-Id: Iefded014b4a179889e67fa7cc0e0c36e8218dd83
CRs-Fixed: 2337167
2018-10-26 10:39:20 -07:00
Venkata Sharath Chandra Manchala
598f503a01 qcacld-3.0: Change return status
Return QDF_STATUS as return status
over an integer value.

Change-Id: Ib6083de9b3581e6d92ec18f39ca552a5ae0cfc2d
CRs-Fixed: 2311561
2018-10-26 10:39:16 -07:00
Gaurank Kathpalia
511634b339 Revert "qcacld-3.0: Add check for DBS mode in start bss"
this is not required as the session nss has to be 2, which
is expected, and helps to shift back to 2x2 from 1x1, while
hw mode goes to single MAC mode

This reverts commit I54ead1fd26d705a821160b5bc5d816df1d2ab8f4

Change-Id: I3bdcad1df6cc67de2533c89697b8c17d8ac4f573
CRs-Fixed: 2329616
2018-10-26 10:39:13 -07:00
Liangwei Dong
3abfe8f832 qcacld-3.0: Add Random MAC addr Action Frame Tx
1. Report NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA to
cfg80211.
2. Indicate Random MAC addr frame to source adapter.

Change-Id: Ica66fb43636fc1609febd87b6e6398dac3af25f3
CRs-Fixed: 2322077
2018-10-26 10:39:09 -07:00
Jeff Johnson
ceb233442a qcacld-3.0: Remove csr_set_band()
Change "qcacld-3.0: Remove sme_set_freq_band()" (Change-Id
I41eeda85754a4d2cb1971dd53eb07a86e5ff4b87") removed the only caller
of csr_set_band(). Since it is now apparently obsolete, remove it.

Change-Id: Ifcfbeecb28964aef82d6b51942436ba18282f1d7
CRs-Fixed: 2339197
2018-10-26 10:39:06 -07:00
Jeff Johnson
6885e9c64a qcacld-3.0: Remove sme_set_freq_band()
Function sme_set_freq_band() is not used. Since it is apparently
obsolete, remove it.

Change-Id: I41eeda85754a4d2cb1971dd53eb07a86e5ff4b87
CRs-Fixed: 2339196
2018-10-26 10:39:03 -07:00
Jeff Johnson
9516c11ecd qcacld-3.0: Fix channel width logs when updating phymode
In wlan_hdd_update_phymode() there are two separate calls to
ucfg_mlme_get_vht_channel_width(). In both cases the return status is
checked, and in case of error the following messages is logged:
  "Failed to set channel_width"

Since ucfg_mlme_get_vht_channel_width() is a "getter" and not a
"setter" change the log to:
  "Failed to get channel_width"

Change-Id: Ifed249e78e4a64d76eae9310da42ee490756337e
CRs-Fixed: 2338478
2018-10-26 10:38:59 -07:00
nshrivas
404eef6cba Release 5.2.0.103H
Release 5.2.0.103H

Change-Id: I21ebf0ebe12f1a55f7d364133a37ee19fba23a79
CRs-Fixed: 774533
2018-10-26 09:05:28 -07:00
Vignesh Viswanathan
363581803a qcacld-3.0: Send VDEV stop to the FW if ADD_BSS_REQ times out
Currently if ADD_BSS_REQ vdev_start request times out, the
wma_vdev_resp_timer notifies this as ADD_BSS_RSP with failure status
to the upper layer and the SAP FSM moves from STARTING to DISCONNECTED
state. After this the WMA_DEL_STA_SELF_REQ is sent to the FW which does
a VDEV delete. However in cases where the ADD_BSS_REQ has been sent to the
FW but the response has not been received, the FW has the VDEV in started
state and asserts if a VDEV delete is sent without sending a vdev stop.

Send VDEV stop to the FW in case of ADD_BSS_REQ times our in
wma_vdev_resp_timer.

Change-Id: Ib2b95d38cb7fd36b02a738a73dbc1f8102d2169e
CRs-Fixed: 2323293
2018-10-26 09:05:27 -07:00
nshrivas
4203b09c08 Release 5.2.0.103G
Release 5.2.0.103G

Change-Id: I9d394b19e22e9a8b23455bedac22bb3ab07a2f67
CRs-Fixed: 774533
2018-10-25 23:37:12 -07:00
Sandeep Puligilla
8345f3d0ec qcacld-3.0: Allocate scan filter memory from dynamic memory pool
csr_scan_get_result API defined 'struct scan_filter' of size
800bytes on stack and larger size memory blocks on stack is not
preferred because the stack size is limited.

Modified the memory allocation to dyanmic for scan filter.

Change-Id: I40cb0d97e0451d50aca3e9485327a4ce709e6020
CRs-Fixed: 2332496
2018-10-25 23:37:12 -07:00
Jeff Johnson
c171324c3d qcacld-3.0: Refine wlan_hdd_update_phymode()
Function wlan_hdd_update_phymode() is called from two ioctl handler
functions, __iw_softap_setparam() and __iw_setint_getnone(). Unlike
most of the ioctl "setter" functions which take two parameters (an
adapter and a value), wlan_hdd_update_phymode() currently takes four
parameters (a net device, a mac handle, an hdd context, and a value).

In addition, currently the HDD function with the highest cyclomatic
complexity is __iw_setint_getnone(). In order to reduce the complexity
of that function all of the switch/case handlers are being refactored,
and in anticipation of eventually using a vtable, the refactored
functions all expect two parameters, an adapter and a value.

In order to align with that goal, refine wlan_hdd_update_phymode() to
expect those same two parameters. Note that the net device, mac
handle, and hdd context that are currently being passed can all be
derived from the adapter.

Change-Id: Ib919e6751aee182e2d8fde90a8446935447123db
CRs-Fixed: 2338381
2018-10-25 06:34:52 -07:00
Jeff Johnson
5bee39bfe1 qcacld-3.0: Refactor WE_SET_TM_LEVEL processing
Currently the HDD function with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_TM_LEVEL has a complexity
greater than 1, so refactor that logic into a separate function to
help reduce the complexity of __iw_setint_getnone().

Change-Id: Ifa68b6553b6856a008aa37af55d2ca1760da0970
CRs-Fixed: 2338380
2018-10-25 06:34:52 -07:00
nshrivas
f1ef073b9e Release 5.2.0.103F
Release 5.2.0.103F

Change-Id: I19fb633d67f40b9279e8f9a23d3dcd847f8f9896
CRs-Fixed: 774533
2018-10-25 01:37:51 -07:00
nshrivas
fb29125fa4 Release 5.2.0.103E
Release 5.2.0.103E

Change-Id: I31781f4a5a68afff1704953f08f1cdda6d5746f7
CRs-Fixed: 774533
2018-10-24 17:48:05 -07:00
Jeff Johnson
175004cd2e qcacld-3.0: Refactor WE_SET_MAX_TX_POWER_5_0 processing
Currently the HDD function with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_MAX_TX_POWER_5_0 has a
complexity greater than 1, so refactor that logic into a separate
function to help reduce the complexity of __iw_setint_getnone().

Change-Id: I3eb942b5bbed7cdc8199c5a4233b4443613023b0
CRs-Fixed: 2338379
2018-10-24 17:48:04 -07:00
Dustin Brown
62743f4c71 qcacld-3.0: Initialize out_mode in hdd_parse_driver_mode
gcc-4.8 incorrectly flags the use of @next_mode in __con_mode_handler as
potentially uninitialized, while newer versions do not seem to have a
problem. Work around the compiler quirk by initializing @out_mode in
hdd_parse_driver_mode.

Change-Id: Iee101db6eaded8e856e461458d6a80e8279e9ca1
CRs-Fixed: 2338538
2018-10-24 17:48:00 -07:00
Jeff Johnson
f3892b5d68 qcacld-3.0: Refactor WE_SET_MAX_TX_POWER_2_4 processing
Currently the HDD function with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_MAX_TX_POWER_2_4 has a
complexity greater than 1, so refactor that logic into a separate
function to help reduce the complexity of __iw_setint_getnone().

Change-Id: Ib6da540f9d96893899ad3865fd1c72e15a1c34bf
CRs-Fixed: 2338378
2018-10-24 17:47:56 -07:00
nshrivas
8592c39fcd Release 5.2.0.103D
Release 5.2.0.103D

Change-Id: Id8656554451473fa924ec475229ff265e2ced6ad
CRs-Fixed: 774533
2018-10-24 14:40:03 -07:00
Liangwei Dong
3774e5db94 qcacld-3.0: Add reason for opportunistic API
Add reason code return to caller to identify
the hw mode update reason.

Change-Id: I9c754626018ad7cd3f7dc1d287b834629e93dc17
CRs-Fixed: 2338089
2018-10-24 14:40:02 -07:00
nshrivas
42ad008d5b Release 5.2.0.103C
Release 5.2.0.103C

Change-Id: Ic26f5be9fe8702905efc8f3efe9714e16229790f
CRs-Fixed: 774533
2018-10-24 11:54:08 -07:00
Dustin Brown
c07ce8eb66 qcacld-3.0: Lightly refactor __con_mode_handler
There are a number of style issues in __con_mode_handler. In preparation
for additional work in this area, lightly refactor __con_mode_handler,
and address low hanging style issues.

Change-Id: I7ec7cfd369bd00a0f8acc612ebf92f7a30a7a360
CRs-Fixed: 2337850
2018-10-24 11:54:07 -07:00
nshrivas
e3a8ce28cf Release 5.2.0.103B
Release 5.2.0.103B

Change-Id: I1d5f0168710d6a24eb839e570435746606da589d
CRs-Fixed: 774533
2018-10-24 09:53:46 -07:00
Jinwei Chen
7abd27ed06 qcacld-3.0: limit the log rate for RX invalid peer processing
Limit the log rate to avoid excessive logging when host hanlde RX
data with invalid peer.

Change-Id: I5dba430809d7567905e919676d8cd3245906b884
CRs-Fixed: 2336919
2018-10-24 09:53:45 -07:00
stonez
26388d085a qcacld-3.0: Configure non aggr TX packet retransmission
Wireless application needs to tune parameters per AC based.
Such as VI/VO queue use the different re-transmission attempts
while other queue keeps the default value. It helps to improve
the video/audio performance in noisy environment. this change
add the ability to config re-transmission attempts of non
aggregation QOS packets.

Change-Id: I95404302463275803e3feff3038f04c900b14705
CRs-Fixed: 2323555
2018-10-24 09:53:32 -07:00
nshrivas
8e66eb6163 Release 5.2.0.103A
Release 5.2.0.103A

Change-Id: I352d9cb817f8637b3ca7ef87ee15e4675b81362c
CRs-Fixed: 774533
2018-10-24 08:17:34 -07:00
Ashish Kumar Dhanotiya
2ef479048d qcacld-3.0: Clear oldest cached sta information
Currently host is caching all the connected sta info
in case of SAP, once the sta count reaches to MAX, below
mentioned issues occurs:
1. Driver can not cache the information of newly connected
   stations.
2. Some of the info is cached at the time of connection while
   remaining info is cached during disconnection. In the
   disconnect path driver tries to cache some of the info
   such mc_bc count, disconnect reason code, since driver can't
   cache anymore info, it does not find the current station which
   is getting disconnected in cache sta info structure leading to
   an error, and driver is returning an error without completing
   the wait for disconnect event which is resulting in timeout.
Since sta_disconnect comes with rtnl_held, any other process
is not able to get the rtnl_lock until this timeout occurs.

To address this issue below mentioned two measures taken care:
Clear the oldest cached sta information and save the newly connected
station's information.
In the disconnect path, do not return any error and simply proceed
with disconnection as failure to cache the information of sta
should not stop the disconnection process.

Change-Id: Ia955a6774033fdfa91ff1fa7c8832b3ec7e8e1a0
CRs-Fixed: 2333075
2018-10-24 08:17:33 -07:00
nshrivas
89083f7f48 Release 5.2.0.103
Release 5.2.0.103

Change-Id: I545b43a29341977655e0f2632b43228e94ca6f7a
CRs-Fixed: 774533
2018-10-24 06:26:18 -07:00
Vignesh Viswanathan
a813462a02 qcacld-3.0: Fill Channel width for add_sta params from session entry
Currently the sta_context in add_bss params which is used to send the
peer_assoc command to the FW, the ht_enable and vht_enable are set based
on the AP's capability from the beacon. However, the channel width is
set based on the assoc response frame from the AP.

In a scenario where the AP advertises HT and VHT IEs in the beacon but
does not send HT and VHT IEs in the assoc response frame, we will end up
connecting in VHT/HT mode but with incorrect channel width.

Update the sta_context channel width also based on the AP's capability
from the beacon so that the connection would happen in the right channel
width even if HT/VHT IEs are missing in the assoc response frame.

Change-Id: Idb1907abebf32a34f88e935a30ebb8f1bce1d59c
CRs-Fixed: 2324434
2018-10-24 06:26:17 -07:00
nshrivas
96fd4a81e1 Release 5.2.0.102Z
Release 5.2.0.102Z

Change-Id: Ifdcbce6a6ff64e712c59f5aa3c703d68669a84ec
CRs-Fixed: 774533
2018-10-24 04:49:34 -07:00
Abhishek Singh
fc740bed63 qcacld-3.0: Fix e_sme_command_nss_update stuck issue
Update NSS command is remove once driver receive the tx completion
event for the beacon. If SAP is in CAC wait state driver will not
get the tx completion for the beacon and the update NSS will timeout
after 30 sec and the serialization cmds queues will get stuck.

To avoid this remove the update NSS command from active queue as
soon as beacon is sent to firmware

Change-Id: I6f5b6bce91bdfacd4621020f313be25f74696b9d
CRs-Fixed: 2332302
2018-10-24 04:49:34 -07:00
hangtian
5fe81f014a qcacld-3.0: Update chandef if choosing new channel for softap
Currently if hostapd choose channel 149, enable ieee80211d, and
select country_code JP. Driver will choose random channel after regd
updated to JP got from firmware. Since 149 is invalid for JP
country_code, driver choose random channel in JP channel list.
Driver indicate cfg80211 chandef is changed in hdd_chan_change_notify.
However, if we don't update cfg80211_ap_settings.chandef in
cfg80211_ops.start_ap, cfg80211 will copy old chandef back to
wdev->chandef after cfg80211_ops.start_ap.  Then reg_wdev_chan_valid
will return false and cfg80211_leave leads to stop
AP in reg_leave_invalid_chans.

Change-Id: I3f89da46b4172fdea2774703f32b9cbabff41eeb
CRs-Fixed: 2315627
2018-10-24 04:49:30 -07:00
nshrivas
c3b52360c6 Release 5.2.0.102Y
Release 5.2.0.102Y

Change-Id: Ie51702f7dde349d8341944f2479f305dfe84f080
CRs-Fixed: 774533
2018-10-24 03:17:03 -07:00
nshrivas
f16d12c794 Release 5.2.0.102X
Release 5.2.0.102X

Change-Id: Id58143d21be2816fd5873c8926726212bfc214e6
CRs-Fixed: 774533
2018-10-24 01:45:09 -07:00
Rajeev Kumar
fe6e62f50f qcacld-3.0: Reset cfg_ctx to NULL after its freed
Reset cfg_ctx to NULL after its freed to avoid any use
after free.

Change-Id: Iff0eb6f6db5a1467913cebd09a424776ed3390c1
CRs-Fixed: 2337050
2018-10-24 01:45:08 -07:00
Dustin Brown
4c66322b99 qcacld-3.0: Abstract idle shutdown timer start/stop
The code to start and stop the idle shutdown timer in HDD is currently
copy-pasted in multiple locations. Abstract this logic behind two new
APIs, and call these APIs where appropriate.

Change-Id: I73b05e603454a4817cb9c1606c1207d7fe68e5ab
CRs-Fixed: 2337755
2018-10-24 01:45:05 -07:00
nshrivas
e16cf530ca Release 5.2.0.102W
Release 5.2.0.102W

Change-Id: I56d091d40377a6f66c45eeaa38c0e3c3f5d64ec2
CRs-Fixed: 774533
2018-10-23 16:51:28 -07:00
Rakshith Suresh Patkar
4faeb2e806 qcacld-3.0: Add NULL check for adapter in hdd_nud_filter_netevent
API hdd_nud_filter_netevent is used to filter netevents for
STA interface. It is the driver's responsibility to
filter and act on event if it is for the net device. However,
the NULL check that is present in hdd_validate_adapter comes
with error logs which flood the console.

Add NULL check for adapter after call to hdd_get_adapter_by_macaddr
in hdd_nud_filter_netevent so that if the event is not for
the net device, ignore the event and return to avoid excessive
logging.

Change-Id: Icfb2f27f97712bf8e1422404a85163e801d43641
CRs-Fixed: 2335081
2018-10-23 17:57:56 +05:30
nshrivas
ddf1348378 Release 5.2.0.102V
Release 5.2.0.102V

Change-Id: I1daa6e2ae1183732af263a10d4e7daf54ecfbdd7
CRs-Fixed: 774533
2018-10-22 21:45:04 -07:00