Commit Graph

36 Commits

Author SHA1 Message Date
Bala Venkatesh
0f74545bb3 qcacld-3.0: Replace duplicate api's of vdev_connected
Currently, the vdev connection status is checked by getting
the bss peer of that vdev, and if the bss peer is in associated
state then vdev connected status is sent as true. It can happen
vdev is present and bss peer is deleted after getting the bss peer
from vdev pointer. Then bss peer can not be dereferenced to get the
its status.

Instead remove all the duplicate api's tdls_is_vdev_connected,
pmo_core_is_vdev_connected, and wlan_vdev_is_connected with
wlan_vdev_is_up. wlan_vdev_is_up gives success status
if associated.

Change-Id: I863c3c0689f329870bd08c813813c16956135209
CRs-Fixed: 2424996
2019-03-29 15:26:58 -07:00
wadesong
7f682da30f qcacld-3.0: Documentation refine for some ini items
1) Refine the documentation text of the following items:

gTxChainMask1ss
gTDLSPuapsdInactivityTime
UapsdMask
InfraUapsdVoSrvIntv
InfraUapsdVoSuspIntv
InfraUapsdViSrvIntv
InfraUapsdViSuspIntv
InfraUapsdBeSrvIntv
InfraUapsdBeSuspIntv
InfraUapsdBkSrvIntv
InfraUapsdBkSuspIntv
InfraDirAcVo
InfraDirAcBe
InfraDirAcBk
InfraSbaAcBk
burstSizeDefinition
tsInfoAckPolicy
SingleTIDRC

2) Remove the duplicated definitions of 2 ini items:

gTDLSPuapsdInactivityTime
gTDLSPuapsdRxFrameThreshold

Change-Id: I0f122af2fc91616a38a2c101478bad942292a9ba
CRs-Fixed: 2422339
2019-03-26 10:30:12 -07:00
Jeff Johnson
bdc473f2f4 qcacld-3.0: tdls: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within tdls replace any such comparisons with logical
operations performed on the pointer itself.

Change-Id: I836dec2b71e0c11f11b18402c7b127bb4ccbba48
CRs-Fixed: 2418394
2019-03-24 20:48:11 -07:00
Bala Venkatesh
3b113c5ec3 qcacld-3.0: Add NULL check for bss peer
In function tdls_delete_all_tdls_peers, bss peer can be NULL
if the bss peer is removed from vdev object. Hence, add  NULL
check  before getting its reference.

Change-Id: I9b2b03bc6db899c1c06de95ec5ee680d4b600aa7
CRs-Fixed: 2419567
2019-03-20 22:08:55 -07:00
Rajeev Kumar Sirasanagandla
4477e7e4ae qcacld-3.0: Fix function type for sme_ser_cmd_callback
To address kernel control flow integrity (CFI) issues related to type
mismatch, correct the input argument type for sme_ser_cmd_callback().

Change-Id: I3f0b5df70163eca9282d2b1c2a48203448e4f0a6
CRs-Fixed: 2402977
2019-03-12 06:09:56 -07:00
Bala Venkatesh
ef8692ef8a qcacld-3.0: Send correct vdev_id to enable TDLS in FW
After STA or P2P cli disconnection, TDLS component is notfied
of the disconnection to check if the TDLS can be enabled in FW
and host. But while sending tdls set state command to FW,
the disconnected vdev_id is given to FW. This can result in
FW assert while processing the next tdls commands.

Change-Id: Ib79547ce9d192b1d8bba3767655b3dada36e5e95
CRs-Fixed: 2412170
2019-03-12 02:58:45 -07:00
Bala Venkatesh
f28679097c qcacld-3.0: Take vdev ref only if vdev is not NULL
In functions ucfg_tdls_update_rx_pkt_cnt and
ucfg_tdls_update_tx_pkt_cnt, driver tries
to get the vdev ref, even if it is NULL.
This can result in assert.

Change-Id: I62b3a9b088324e06518e82203092a2ac9098ac13
CRs-Fixed: 2412095
2019-03-11 04:47:47 -07:00
Bala Venkatesh
1ca2be1c00 qcacld-3.0: Fix return status in tdls_activate_update_peer
If the curr_peer link status is tearing or connected,
activate peer cmd is rejected and the return status is sent
to supplcant as success even.

But return failure status to supplicant if the link is tearing.

Change-Id: Ia976fee03c77191a7e617a3e21e8c5ddf98759d0
CRs-Fixed: 2411146
2019-03-07 14:30:26 -08:00
Bala Venkatesh
2ee149738c qcacld-3.0: Remove vdev chk_frame structure
Chk frame member of the tdls_mgmt_req is declared locally inside of
the local function wlan_cfg80211_tdls_mgmt and address is copied
in the mgmt request, and posted to scheduler thread.
But, the validity of the chk frame variable is lost once returned
from the wlan_cfg80211_tdls_mgmt function. And the chk_frame
is used when processing the tdls_mgmt_req in scheduler thread.
And the stale data of chk_frame can be used.

Hence, make the chk_frame as a variable instead pointer inside
tdls_action_frame_request request.

Change-Id: Ib2a8a81e8f6db5550b1d0abee31d9f7ea5dacd9b
CRs-Fixed: 2402124
2019-03-02 05:12:42 -08:00
Jeff Johnson
cdd14b6563 qcacld-3.0: Remove "same as" comments from TDLS public structs
As part of the original TDLS componentization legacy typedefs were
replicated to create the TDLS public structs. Due to the way in which
these data structures were initially used there was an implicit
requirement that their memory layout be exactly identical, and some of
the public structs had comments of the form "same as <foo>" to show
this relationship. Over time the use of the legacy typedefs has been
phased out in favor of the public structs, but some of the public
structs still have "same as" comments which reference legacy typedefs
which no longer exist. To avoid confusion remove those comments.

Change-Id: I46b498155907eea3ddf3f2a00f8138a1aac95b72
CRs-Fixed: 2404154
2019-02-26 00:09:08 -08:00
Jeff Johnson
7318367ba7 qcacld-3.0: Remove transaction_id from tdls_send_mgmt_request
The transaction_id in struct tdls_send_mgmt_request is unused, so
remove it.

Change-Id: Id06d6883a34d8becbb0040464e0abaecfbfd3b92
CRs-Fixed: 2404153
2019-02-26 00:09:03 -08:00
Jeff Johnson
8ef5a3b3e1 qcacld-3.0: Remove transaction_id from tdls_send_mgmt_rsp
The transaction_id in struct tdls_send_mgmt_rsp is unused, so remove
it. Also remove the comment that implies this struct has the same
structure as tSirSmeRsp since it does not.

Change-Id: I79cf0b2051b232635f37808155ddbd6438a40658
CRs-Fixed: 2404152
2019-02-26 00:08:58 -08:00
Jeff Johnson
ab797d63a8 qcacld-3.0: Converge on struct tdls_del_sta_req
During TDLS componentization the legacy typedef tSirTdlsDelStaReq was
replicated, creating struct tdls_del_sta_req. Unfortunately this left
the driver with two different data structures which serve the same
purpose. Not only is this pointless, but due to the way in which these
structures are used there is an implicit requirement that they be
exactly identical. This approach is very fragile. To align with the
converged software architecture and to improve code maintainability
exclusively use the TDLS component struct.

Note that this struct must be promoted to be a public struct since it
is now accessed from outside the component.

Change-Id: I054ee24e07062a60c4e00b935cd1bc5b4a9aef95
CRs-Fixed: 2400769
2019-02-26 00:08:49 -08:00
Jeff Johnson
4cdd1ac8e0 qcacld-3.0: Converge on struct tdls_add_sta_req
During TDLS componentization the legacy typedef tSirTdlsAddStaReq was
replicated, creating struct tdls_add_sta_req. Unfortunately this left
the driver with two different data structures which serve the same
purpose. Not only is this pointless, but due to the way in which these
structures are used there is an implicit requirement that they be
exactly identical. This approach is very fragile. To align with the
converged software architecture and to improve code maintainability
exclusively use the TDLS component struct.

Note that this struct must be promoted to be a public struct since it
is now accessed from outside the component.

Change-Id: I37500ead43eed2295df24c70b96e0b6ff85738c6
CRs-Fixed: 2400768
2019-02-26 00:08:43 -08:00
Jeff Johnson
93cf08a710 qcacld-3.0: Converge on struct tdls_send_mgmt_request
During TDLS componentization the legacy typedef tSirTdlsSendMgmtReq
was replicated, creating struct tdls_send_mgmt_request. Unfortunately
this left the driver with two different data structures which serve
the same purpose. Not only is this pointless, but due to the way in
which these structures are used there is an implicit requirement that
they be exactly identical. This approach is very fragile. To align
with the converged software architecture and to improve code
maintainability exclusively use the TDLS component struct.

Note that this struct must be promoted to be a public struct since it
is now accessed from outside the component.

Change-Id: I7d304d3d211101c7227ea621f307f91ff68a5753
CRs-Fixed: 2400767
2019-02-24 16:40:55 -08:00
Jeff Johnson
2de587987d qcacld-3.0: Replace CONVERGED_TDLS_ENABLE feature flag
The CONVERGED_TDLS_ENABLE feature flag was originally introduced when
the TDLS feature was being componentized so that one could select
either the legacy implementation or the componentized implementation.
That componentization activity has concluded and the legacy
implementation no longer exists. To align with the current usage
switch to exclusively using the FEATURE_WLAN_TDLS feature flag since
that more accurately describes the code being protected.

Change-Id: I2cdb4c6ddba22c5b1d29e87403e5e1c87ce5cbfe
CRs-Fixed: 2395728
2019-02-20 09:09:34 -08:00
Jeff Johnson
74c6bb25ba qcacld-3.0: Conditionally build TDLS component
Currently the TDLS component code is unconditionally built which will
bloat images where TDLS is not required. Fix this by only building the
TDLS component when the TDLS feature is enabled.

Change-Id: I7496b8f07ed495b00e62fc3cf50a96e1829d9341
CRs-Fixed: 2399966
2019-02-16 21:28:39 -08:00
Jeff Johnson
2be205e590 qcacld-3.0: Remove UAPSD trigger structs from TDLS public structs
As part of the TDLS feature, structs sta_uapsd_trig_params and
sta_uapsd_params were replicated from qcacmn wmi_unified_param.h to
qcacld-3.0 wlan_tdls_public_structs.h, and conditional compilation
based upon CONVERGED_TDLS_ENABLE was used to determine which structs
are actually used by a build. Since these structs are not specific to
TDLS, remove the duplicates and exclusive use the structs from qcacmn
wmi_unified_param.h.

This is co-dependent upon Ida0f2b6f131ff2dce7217b881ffadecfd685f563
("qcacmn: Remove TDLS featurization from UAPSD trigger structs").

Change-Id: I37b2d80a4710aced158dcf2ea973d15801a7cecc
CRs-Fixed: 2395823
2019-02-13 16:05:21 -08:00
Jeff Johnson
067f2376f0 qcacld-3.0: Rename enumeration TDLS_PEER_STATE_CONNCTED
Enumeration TDLS_PEER_STATE_CONNCTED contains a spelling error, so
rename it to TDLS_PEER_STATE_CONNECTED.

Change-Id: Ifa0ff667a407cdad3e240aec6c188f20336a166a
CRs-Fixed: 2397350
2019-02-13 14:47:13 -08:00
Abhinav Kumar
c8c215007a qcacld-3.0: ADD MLME INI item of WMM Config
Add the WMM config ini config
CFG_TL_DELAYED_TRGR_FRM_INT_NAME to MLME cfg.

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

Change-Id: Ifaf8072a78f21760e00973e625d7c8e41d8b51a6
CRs-Fixed: 2361533
2019-02-08 06:14:33 -08:00
Bala Venkatesh
76dd143a12 qcacld-3.0: Print TDLS command's and events
Add debug support of TDLS commands and events.

Change-Id: I8f69392c754eeeccdb07ac9ae8139982a52b8ba2
CRs-Fixed: 2393391
2019-02-07 04:57:52 -08:00
gaurank kathpalia
2b2f1b1432 qcacld-3.0: Replace scheduler post msg with scheduler post messsage
Currently many modules use the scheduler_post_msg API which
doesn't allow the driver to know about the src, and destination
modules.

Fix is to call scheduler_post_message which has src, dest, and
the que id.

Change-Id: Ia5c43fe3ceeb7db9dde6241cbabac0ce48f88061
2019-02-06 11:16:22 -08:00
Bala Venkatesh
2a773828bc qcacld-3.0: Fix tdls idle peers data override
As part of connection tracker handler, If the link is connected
then current tx and rx stats are compared with configured threshold
values. If the current stats fall below the threshold then idle timer
is initialized and idle peer data is stored in tdls soc and given as
userdata to the timer handler. The userdata is overwritten if the another
tdls peer becomes idle and this can lead to wrong tdls peer teardown.

Change-Id: I34638bdebe02e17e1c9e117e58352bdaab867921
CRs-Fixed: 2393320
2019-02-05 11:09:31 -08:00
Bala Venkatesh
fa9601a4f6 qcacld-3.0: Initialize the max tdls peers in tdls soc
Currently, in tdls soc max tdls peers are initialized
in tdls_global_init that is done as part of tdls psoc open.
But, sometimes the Ini values used to initialize the tdls
max peers are not initialized before global init
because tdls_update_config has done for the Ini vallues.
This can lead to wrong value of max tdls peers in tdls
soc and later can result in TDLS connection deny.

Change-Id: I6bb51db571129490c225737c1913b8ddafadde8d
CRs-Fixed: 2392494
2019-02-04 15:36:33 -08:00
Abhishek Singh
d1f21c7b0d qcacld-3.0: Refactor firmware, serialization and HDD CMD timeouts
Refactor firmware, serialization and command timeouts so that
HDD timeout are greater than serialization is greater than firmware
timeout.

The timeouts are defined considering below worst case delay in
firmware.
WMI_VDEV_START_REQUEST_CMDID	6 sec
WMI_VDEV_RESTART_REQUEST_CMDID	6 sec
WMI_VDEV_STOP_CMDID		2 sec
WMI_PEER_DELETE_CMDID		2 sec
WMI_PEER_ASSOC_CMDID		2 sec
WMI_PDEV_SET_HW_MODE_CMDID	2 sec
WMI_PDEV_SET_MAC_CONFIG_CMDID	2 sec

Change-Id: I270e980ed1cf2aee55a1fa4e88ff8ddc845a203b
CRs-Fixed: 2384389
2019-01-24 16:17:50 -08:00
Ashish Kumar Dhanotiya
aa9fdbb777 qcacld-3.0: Add support for new regulatory files
Regulatory component is getting updated to reduce the
code size based on different regulatory features. In this
process new regulatory files are getting added and some
of the files are getting removed.

To compile the newly added files update the required changes
in driver Kbuild file.

Some of the functins which are not supposed to be invoked from
outside the component directly, replace those function calls
with the appropriate wrapper functions.

Change-Id: I31a25268250b99f4f156c4f149966213746d999e
CRs-Fixed: 2373780
2019-01-23 15:14:09 -08:00
Madhvapathi Sriram
3e6627a9f9 qcacld-3.0: Optimize schedule msg post error logging
Change-Id: Ieaddca5f141c99c42ed4a7c954dea2788e353640
CRs-Fixed: 2373015
2019-01-22 02:37:31 -08:00
hangtian
127c953c7f qcacld-3.0: Use qdf_mem_zero for zero initialization
Use qdf_mem_zero for zero initialization.

Change-Id: Ic2b8d907623cf67a4569aaf01398c1b3a2bff707
CRs-Fixed: 2376644
2019-01-14 08:38:03 -08:00
hangtian
a7938f8849 qcacld-3.0: Fix implicit tdls connection issue
Fix implicit tdls connection issue. Correct usage of qdf_mem_set.
DUT could receive multicast frames after tdls connection tear down,
add check condition of frames with multicast dest address in
tdls_update_rx_pkt_cnt.

Change-Id: Ia1d7bbf2c129e9aebc98f7fcdea263b745c221ec
CRs-Fixed: 2375043
2019-01-08 07:28:10 -08:00
Wu Gao
6768d76a7b qcacld-3.0: Remove unused tdls structures in pe
It alloc memory with structures in sir_api.h, and process/parse them
with structures in tdls component, which will cause memory corruption
potentially. So, this change refacor these functions and let them use
unified structures. Remove unused structures in sir_api.h
Here are these functions:
- lim_send_sme_tdls_add_sta_rsp
- lim_send_tdls_comp_mgmt_rsp
- lim_send_sme_tdls_del_sta_rsp
- lim_send_sme_mgmt_tx_completion

Remove below unused tdls structures:
- tSirTdlsDelAllPeerInd
- tSirTdlsDelStaInd
- tSirTdlsEventnotify
- tSirTdlsLinkEstablishReq
- tSirTdlsLinkEstablishReqRsp
- tSirTdlsAddStaRsp
- tSirTdlsDelStaRsp
- tSirMgmtTxCompletionInd

Change-Id: Ic595cadefcdbeb2df44f97563c4652db409213a2
CRs-Fixed: 2373706
2019-01-07 17:28:16 -08:00
Jeff Johnson
af32606065 qcacld-3.0: Remove op_class_for_pref_off_chan_is_set
The field op_class_for_pref_off_chan_is_set in struct
tdls_peer_mlme_info is unused, so remove it.

Change-Id: I5c2ed954215677a25245e108a35c33fc7c33c247
CRs-Fixed: 2375420
2019-01-07 08:47:09 -08:00
Jeff Johnson
dfabe9e6a7 qcacld-3.0: Remove ap_rssi from struct tdls_vdev_priv_obj
The ap_rssi field in struct tdls_vdev_priv_obj is unused,
so remove it.

Change-Id: I5c8c7583da2833071feb5a33243cbecbf0ed4f28
CRs-Fixed: 2375419
2019-01-07 08:47:03 -08:00
Bala Venkatesh
c8bbb0058d qcacld-3.0: Enable TDLS in FW in standalone STA and P2P client
TDLS is not supported in concurrency. As part of second interface
creation, TDLS is disabled in both host and FW. But after the second
interface is deleted, TDLS is not enabled in FW and host even for
Standalone STA and P2P client cases.

Change-Id: I362c22a79e171f9779393b1b893b5bfd14ff562a
CRs-Fixed: 2367083
2018-12-19 16:30:43 -08:00
Wu Gao
5f79340ca9 qcacld-3.0: Enable TDLS component in CLD
TDLS component related files moved from hostcmn to CLD, this change
adds initial functions, enables TDLS in Kbuild.

Change-Id: Ie5b93f4785c4a973a139dff9e58460fd7ee35e35
CRs-Fixed: 2361589
2018-12-13 02:37:52 -08:00
gaurank kathpalia
b3645e79ae qcacld-3.0: Fix memory allocation latency in beacon process
This is mirror change for 0f9f01950

Currently if the number of APs in the STA environment
are many, then the STA will receive many beacons, whose
beacon process path can take long time, in the kernel
work queue, hence the other processes have to wait
for them to complete, and may get timeout, if the
the time to process the beaocns is larger than their
process timeout.
Fix is to :-
1. Add rate limit to failure conditions of memory
not allocated
2. Make memory allocation in path of beacon process
atomic.

Change-Id: I488b446c23fd01c993f7dd9bd989867fda2331d8
CRs-Fixed: 2363307
2018-12-11 06:11:02 -08:00
Linux Build Service Account
92728a078f Move umac/tdls to components/tdls
Change-Id: I12eedee6215337be7f5dbcf6d546910cecedd3c3
2018-12-04 15:47:36 +05:30