Commit Graph

89 Commits

Author SHA1 Message Date
Wu Gao
4e5a1591c5 qcacld-3.0: Add ini to configure max tdls peer count
Add ini "gTDLSMaxPeerCount" to configure max tdls peer count.

Change-Id: I45c287c6c9a2fa1dcebcea54fdd0fc0d8a14b064
CRs-Fixed: 2718971
2020-07-13 23:39:20 -07:00
Wu Gao
7a5b681708 qcacld-3.0: Add wow support for TDLS
Prevent wow if TDLS is started, allow wow if TDLS link disabled. This
feature is enabled only if lithium plaform isn't drv supported.

Change-Id: Ie66d62cb139fe9a1d292925a78f2dd861f16ef69
CRs-Fixed: 2716922
2020-07-10 05:38:44 -07:00
Pankaj Singh
9f6679e000 qcacld-3.0: TDLS not releasing the vdev ref taken with WLAN_TDLS_NB_ID
During NAN+TDLS case, when NAN is present dut is trying
to add TDLS peer and the ref is not released which results in
assert due to obj delete timeout.

Fix is to release the ref taken properly in default handing of
tdls serialization cmd and error handling.

Change-ID: Ie3e785f617d320dc88051bf6f22f8e291f120c14
CRs-Fixed: 2728865
2020-07-10 05:38:40 -07:00
Pankaj Singh
f9b5466cb6 qcacld-3.0: TDLS not releasing the vdev ref taken with WLAN_TDLS_NB_ID
During NAN+TDLS case, when NAN is present dut is trying
to add TDLS peer and the ref is not released which results in
assert due to obj delete timeout.

Fix is to release the ref taken properly in default handing of
tdls serialization cmd and error handling.

Change-ID: Ia1ff16fdde7f70e45b712d260c1eca372ceb947e
CRs-Fixed: 2727206
2020-07-09 13:43:27 -07:00
Wu Gao
acf04962a7 qcacld-3.0: Don't reset connecting TDLS peer to idle state
It resets connecting TDLS peer to idle state, and then won't send
peer delete command to FW, which cause FW break down. So check link
status and avoid to reset connecting TDLS peer to idle state.

Change-Id: I8e8c883c6a517d516f496790350324a4257c9325
CRs-Fixed: 2726207
2020-07-07 21:38:28 -07:00
Ashish Kumar Dhanotiya
f2ff802b63 qcacld-3.0: Add new scan type SCAN_FOR_SSID for conn_manager infra
Add new scan type SCAN_FOR_SSID to support connection manager
infrastructure.

CRs-Fixed: 2713775
Change-Id: I399f2c5cac0a09b78b6c13786105a9f098922c72
2020-07-02 08:48:05 -07:00
Jianmin Zhu
e6c35ab600 qcacld-3.0: Replace channel with freq for 6G
Replace WLAN_REG_IS_24GHZ_CH with WLAN_REG_IS_24GHZ_CH_FREQ.
in TDLS.
Change-Id: I6c0ee6ec3a2d24cc0c826f93527d4655925cc6cd
CRs-Fixed: 2717000
2020-06-23 15:44:06 -07:00
Abhishek Singh
2281c2d6bb qcacld-3.0: remove dependency of public files from wlan_objmgr_psoc_obj.h
Remove dependency of wlan_lmac_if_def headerfiles from
wlan_objmgr_psoc_obj.h

Change-Id: I5f6120a97be3ae6835023ceaef455088820809de
CRs-Fixed: 2657771
2020-05-15 10:41:20 -07:00
Pankaj Singh
9dcc7e0e82 qcacld-3.0: Tdls avoid peer access after peer deletion
Currently, peer can be accessed after deletion in hdd because
cdp_clear_peer called via tdls_process_del_peer_rsp
tries to remove peer from physical device after deletion of
peer in datapath.

Fix is to remove cdp_clear_peer from hdd as it is handled by
cdp_peer_delete.

Change-Id: Ibdeb9a2a8dcf3318d66a48b9e9c7ca4d5cd74cb3
CRs-Fixed: 2663555
2020-04-24 17:09:36 -07:00
Pankaj Singh
8e2e7b47a3 qcacld-3.0: Don't send peer update after peer delete
During tdls peer delete, wmi command WMI_PEER_DELETE has been
send but later on from driver wmi command for peer update is
send without checking for peer reference before sending to fw.

Fix, to check for peer reference before posting the cmd to fw.

change-ID: I216d1ad726af3369c227ae566e22949cadb8300c
CRs-Fixed: 2667811
2020-04-24 17:09:25 -07:00
Pankaj Singh
be72e139d5 qcacld-3.0: Clean up logs in TDLS path
Clean up redundant logs in tdls path.

Change-Id: Ibf9ad4021cf0c690470bca252117a6eb34295cec
CRs-Fixed: 2625114
2020-02-28 09:09:52 -08:00
gaurank kathpalia
c749f7d136 qcacld-3.0: Print the peer only when rx tx is going
Currently the TDLS module prints the peer info
every defined time interval which leads to too
much of information even when no rx tx is
ongoing with the peer which leads to excessive
logging.

Fix is to limit the logs and print only when there
is activity going on.

Change-Id: I6c1bf5a1ce8a858dfe895168178154a6c8b49c1f
CRs-Fixed: 2625632
2020-02-25 10:58:14 -08:00
Abhinav Kumar
86afc8fbc4 qcacld-3.0: Optimize logs after connect complete
Optimize logs after connect complete i.e roam offload params
and tdls state etc.

Change-Id: I5df7eb236ef1c7369f4d996c4f0eda7225652f12
CRs-Fixed: 2627694
2020-02-25 03:00:49 -08:00
Amruta Kulkarni
fc875ea635 qcacld-3.0: Cleanup for function wlan_reg_is_dfs_ch()
Replace wlan_reg_is_dfs_ch() with wlan_reg_is_dfs_for_freq()

Change-Id: Ifa62248169ad7b8ff1c62cab44c92d99a8db0e45
CRs-Fixed: 2609311
2020-02-08 02:07:03 -08:00
Abhishek Singh
48175fd4f7 qcacld-3.0: Optimize logs in scan path
Remove redundant logs and optimize the logs in scan path.

Change-Id: Ie6ff84b1a832a29d5fe01c649be4b8143bd13c94
CRs-Fixed: 2612637
2020-02-04 14:15:54 -08:00
gaurank kathpalia
16f2a47c11 qcacld-3.0: Optimize logs in serialization
Remove redundant logs in serialization.

Change-Id: Icaebd5ce800ec035f082210785e95372cf2e7e72
CRs-Fixed: 2612824
2020-02-04 02:01:34 -08:00
Arun Kumar Khandavalli
8b61ce1e4c qcacld-3.0: Selectively reduce tdls logs
Reduce tdls logs from info to debug.

Change-Id: I2de71c4aa5d9915afb68bc192dcd6a749f6b3b4e
CRs-Fixed: 2607020
2020-01-23 03:41:19 -08:00
Vevek Venkatesan
e9fa59de57 qcacld-3.0: cdp: Converge cdp_ctrl_ops
Currently cdp ops are given pdev/vdev handle
as its arguments, which is directly accessed
in those APIs. This can cause a race-condition
in access of the respective handles, if it has
been deleted in parallel.

Hence as a part of cdp convergence, pass only
the pdev_id/vdev_id which will be used to get the
respective handles and hence avoiding unwanted
access of the handles if it has been deleted.

Also deleting few ops which stores and retrieves
such handles and adding ops to set/get pdev params.

- txrx_set_safemode
- txrx_set_drop_unenc
- txrx_get_pdev_param
- txrx_set_pdev_param
- wdi_event_sub
- wdi_event_unsub

Change-Id: Ib3511cbdead75b30e899dbf00f936ffdae316b71
CRs-Fixed: 2541657
2020-01-20 17:50:23 -08:00
bings
059c4a06c2 qcacld-3.0: Configure TDLS off channel mode when band switches
Disable TDLS off channel if 2g or 5g is disabled, restore TDLS off
channel configure when all bands are enabled.

Change-Id: Iabfdcdbf84e4a6313ad04e381b70e21c871d66c2
CRs-Fixed: 2595303
2020-01-10 04:07:57 -08:00
Abhishek Singh
345be418c9 qcacld-3.0: Replace sme_session_id with vdev_id
Replace sme_session_id with vdev_id in SME and LIM.

Change-Id: I7a4a85c440d8d7d7a2a4163bc71776e288da0222
CRs-Fixed: 2569190
2019-11-22 07:12:45 -08:00
Liangwei Dong
897b439b3c qcacld-3.0: Add policy_mgr_is_hw_dbs_required_for_band API
policy_mgr_is_hw_dbs_required_for_band is for any HW where
PHYA/MAC0 doesn't support the given band. We need to switch
to DBS mode to support the band. So far we have
overloaded policy_mgr_is_hw_dbs_2x2_capable to achieve above.
Need a cleaner API to work in a generic way
(for 2x2, 1x1 or any chain mask configuration).

Change-Id: I1cb28bece1242fc749a0a6a56fadca0502850c43
CRs-Fixed: 2565939
2019-11-21 00:44:19 -08:00
Bala Venkatesh
ff86f89448 qcacld-3.0: Add the ini gTDLSDiscoveryWakeTimeout
Add the support for the ini gTDLSDiscoveryWakeTimeout.
with this ini gTDLSDiscoveryWakeTimeout, FW will be awake
for configured value after sending the discovery request.

Change-Id: I194e5c99972968bbaa46ffb6b8e83604bff15a0a
CRs-Fixed: 2546515
2019-11-11 02:05:27 -08:00
Bala Venkatesh
7ce8fb0556 qcacld-3.0: Do not reset the tdls link status to tearing
If the force peer is removed from wpa_cli, then without
checking the current link status link status is set to tearing.
Then if the same peer is again marked as forced then that peer
status is not reset to idle and that can lead to tdls connection
denial of that peer.

Reset the tdls link status to tearing only in connected state.

Change-Id: Idd4128b4599fc2dfbb768984f8f9390fc14ab5f6
CRs-Fixed: 2551180
2019-11-06 14:05:41 -08:00
Bala Venkatesh
ce98442c2a qcacld-3.0: Fill the pmf info for TDLS peer
Fill the pfm info of the TDLS peer before sending the peer assoc
command to FW.

Change-Id: I4e336c345c0fb8f063157b3e3a780efa777f1a74
CRs-Fixed: 2535832
2019-10-24 14:33:37 -07:00
Manikandan Mohan
7fdb02592b qcacld-3.0: Use policy manager frequency APIs
For 6GHz support and to remove channel number ambiguity use policy
manager APIs updated for frequency in other modules. This change
covers following APIs:
policy_mgr_is_chnl_in_diff_band
policy_mgr_check_for_session_conc
policy_mgr_handle_conc_multiport
policy_mgr_change_sap_channel_with_csa
policy_mgr_get_channel
policy_mgr_get_nondfs_preferred_channel

Change-Id: I4a6673db3a02b6e8d7fa94ae452338db618e3883
CRs-fixed: 2545099
2019-10-22 18:09:18 -07:00
Yeshwanth Sriram Guntuka
4ac1584527 qcacld-3.0: Cleanup sta_index in TDLS structures and APIs
Remove sta index references in TDLS structures and APIs
and mac address would be used instead to refer the peer.

Change-Id: I861f7ce068f3f545598129b9f3955b84b2a6fbce
CRs-Fixed: 2524512
2019-10-22 09:05:33 -07:00
Yeshwanth Sriram Guntuka
e6b54245d6 qcacld-3.0: Remove sta index in few prints
Remove sta index in few prints and replace it
with MAC address as part of sta_index cleanup.

Change-Id: I689ede9dc345667f1a054f76bf3d08b236131c13
CRs-Fixed: 2524505
2019-10-22 09:05:02 -07:00
Ashish Kumar Dhanotiya
ca5d922263 qcacld-3.0: Process rx_mgmt_pkt based on frequency
As a part of 802.11ax amendment, 6GHz band operation is added.

Since the 6 GHz channel numbers are overlapping with existing 2.4GHz
and 5GHz channel numbers, use frequency to identify unique channel
operation instead of channel number. Channel frequency is unique across
bands.

As part of above requirement add logic to process rx mgmt
packets based on the frequencies instead of channel numbers.

Change-Id: Ib063070738ecdb4f83379eafe50629778a490aae
CRs-fixed: 2522693
2019-10-18 02:55:17 -07:00
Manikandan Mohan
cf5048294b qcacld-3.0: Disallow TDLS when NAN is active
Since NAN has higher priority over TDLS, disallow TDLS link
when NAN is active.

Change-Id: I7de34dbb2f808c36358ac5266c26e2729b901941
CRs-fixed: 2537158
2019-10-14 05:47:03 -07:00
Bala Venkatesh
ab30be31ba qcacld-3.0: Do not send enable TDLS in case of DBS
Currently, TDLS set state command is sent to FW after any session
decrement without checking the HW mode is DBS. This can lead to
FW assert.

Check for HW mode before enabling TDLS in FW.

Change-Id: I70d5ba15c9b891f5d9b411960d51d684105061e8
CRs-Fixed: 2530773
2019-09-25 09:20:37 -07:00
Ashish Kumar Dhanotiya
645af711aa qcacld-3.0: Validate tdls sta id in del station command
Currently sta id validation is not there in del
station command for tdls. There could be a case where peer
is there but sta id is not valid.

Consider a case where there is tdls connection between 2
p2p clients and one of the client decided to connect to SAE
AP, this brings up concurrency scenario on that client for
p2p client and station, so tdls connection should be tear
down. device tear down the tdls link and inform the supplicant
regarding the same. Now in the driver scheduler, connect
command is there which is queued when device tries to connect
to SAE AP, this command gets a chance to execute.
When SAE connection is executed, driver gets a command from
supplicant to disable tdls links for the previous connection
which is already teardown, this command is queued into
scheduler which blocks the supplicant thread.
For SAE connection to get complete driver waits for auth
request from supplicant.
Here supplicant waits for the tdls disable link command's
response which will never come as driver waits for SAE
authentication which leads to deadlock.

To address above issue, add a check to validate sta id
before queing tdls down link command to scheduler, if the sta
id is invalid, return response to supplicant as tdls peer is
already deleted.

Change-Id: Ie983aa9f217c0d7b4508639bb33ad1a44b3675c7
CRs-Fixed: 2521529
2019-09-19 03:25:47 -07:00
Bala Venkatesh
221790b07e qcacld-3.0: Do not send UAPSD command after TDLS connection
Currently as part of tdls enable link, If the peer is buff
capable or tdls uapsd is enabled in INI. UAPSD is enabled in
FW. Avoid sending this command to FW as it effects the behavior
with AP.

Change-Id: Idc023cb9de3ab63e7643815d473fe0efa98069b9
CRs-Fixed: 2528208
2019-09-19 02:01:45 -07:00
Ashish Kumar Dhanotiya
285213c6cb qcacld-3.0: Convert channel to frequency in rx mgmt handler
As a part of 802.11ax amendment, 6GHz band operation is added.

Since the 6 GHz channel numbers are overlapping with existing 2.4GHz
and 5GHz channel numbers, use frequency to identify unique channel
operation instead of channel number. Channel frequency is unique across
bands.

As a part of above requirement, in the existing WMI interface handlers
and related functions, wherever missing, add frequency attributes to
identify unique channel operation.

Change-Id: I757f60cef414d206b275b4fbd192d5d22bbc93d7
CRs-Fixed: 2517901
2019-09-18 11:22:51 -07:00
Bala Venkatesh
540dca4c31 qcacld-3.0: Remove connected peer count check to reset the tdls peers
Currently, in function tdls_process_reset_all_peers before checking
the tdls peer state connected peer count is checked and if is zero
then returned without checking the peer id. If peer is created
but the peer count is not increased then TDLS component will not
notify to delete the peer and this can lead to subsequent add peer
denials.

Change-Id: I2fd1d6945eb9dca478f11cd05ba0ee4a9ed007ea
CRs-Fixed: 2524442
2019-09-13 05:57:20 -07:00
Bala Venkatesh
36c6975c31 qcacld-3.0: Send TDLS offchannel as 0, if only 2G is supported
Send TDLS offchannel as 0 if only 2G is supported otherwise
FW will do the TDLS offchannel in 2G and will result in MCC
and not desired in 2G.

Change-Id: Ieeea619526a3d8b04ac4bda3f3e0ca73aba2f78a
CRs-Fixed: 2517642
2019-09-04 11:30:30 -07:00
Abhishek Singh
682cf6f843 qcacld-3.0: Fix WMI timeout for runtime PM
For runtime PM if the bus is suspended driver need to consider
extra 6 sec time for bus resume.
Thus add 6 sec extra in WMI timeouts if runtime PM is supported.

Change-Id: I5515cc889a0315382bac11a33ea6f901b7af1c46
CRs-Fixed: 2507029
2019-08-20 22:53:50 -07:00
Arun Kumar Khandavalli
e8a01b80db qcacld-3.0: Free the tdls memory in the error conditions
As part of the tdls vdev creation, tdls osif memory is allocated
and not freed in the error condition, which can result in the
memory leak.

Free the tdls osif memory in the error condition

Change-Id: I084b14c4277be3e88142e3eaaabcf3293a15f220
CRs-Fixed: 2507609
2019-08-20 02:39:26 -07:00
Yeshwanth Sriram Guntuka
3199046f44 qcacld-3.0: TDLS sta_id cleanup for hdd_update_dp_vdev_flags
hdd_update_dp_vdev_flags takes sta_id as input and as a
part of clean up of sta_id, replace it by peer mac address.

Change-Id: Id9a8c132546d312f5b048485de48535807e2db4b
CRs-Fixed: 2506497
2019-08-15 20:38:21 -07:00
Yeshwanth Sriram Guntuka
4fb838c4e9 qcacld-3.0: TDLS sta_id cleanup for hdd_roam_deregister_tdlssta
hdd_roam_deregister_tdlssta takes sta_id as input and as a
part of clean up of sta_id, replace it by peer mac address.

Change-Id: Ie0d8e16606bd72d77cc5f152cf5bfe530bd3856b
CRs-Fixed: 2503949
2019-08-13 04:17:14 -07:00
nakul kachhwaha
987f6b13dc qcacld-3.0: Properly configuring OpClass into TDLS Peer
OpClass in TDLS peer is configured using gTDLSPrefOffChanNum
and gTDLSPrefOffChanBandwidth INIs. Values of OffChanBandwidth
INI can't distinguish 40+ and 40- BW which is required to fetch
the correct Opclass for a given channel from regdb. Adding
function which will convert OffChanBandwidth value into required
value before fetching opclass. This is required for TDLS 5.9 Cert
Test Case.

Change-Id: Iba27034335309472d16a6aeef819995504674fc5
CRs-Fixed: 2457369
2019-08-05 07:49:51 -07:00
Bala Venkatesh
4e3f275a80 qcacld-3.0: Avoid OOB in function tdls_ct_idle_handler
In function tdls_ct_idle_handler, idx is assigned from
tdls_info->index which can be 0 254. But tdls_conn_info
is static array in tdls_soc_priv_obj of size
WLAN_TDLS_STA_MAX_NUM (8). So check idx is less than
WLAN_TDLS_STA_MAX_NUM or not to avoid OOB memory access.

Change-Id: I8387cb0a44a79f0f83b25c12de2aa9fbc39ab2f3
CRs-Fixed: 2474432
2019-06-20 18:36:10 -07:00
Bala Venkatesh
9bb9c05e83 qcacld-3.0: Pass psoc instead of vdev for teardown links
As part of start_ap or connect_start to teardown active tdls peers
hdd_notify_teardown_tdls_links is called with argument vdev. But
TDLS might not be enabled on that vdev. With recent changes,
osif_priv object is initialized as part of tdls_vdev_init.
For the new interface if TDLS is not initialized then osif_priv
object will not be found and TDLS peers are not removed.

Change-Id: Idcf690bba2766664700a4851d390ee620f2fe73a
CRs-Fixed: 2460108
2019-06-03 02:26:54 -07:00
Jingxiang Ge
37204fd470 qcacld-3.0: Move tdls_osif_init_cb after checking tdls_feature_flags
If tdls feature is disabled, as currently tdls_osif_init_cb is called
before checking flags, tdls_osif_deinit_cb will be missed which causes
memory leak.

Do tdls_osif_init_cb after checking tdls_feature_flags.

Change-Id: I008c69a9b39f5321d1ca79f5193539f5abd32a02
CRs-Fixed: 2459853
2019-05-27 20:13:16 -07:00
Bala Venkatesh
d576fc5dac qcacld-3.0: Do not update the pkt cnt for connected AP
For implicit and external control the tdls connection is
established based on the tx and rx pkt count. But currently,
pkt count with connected AP also tracked.

Do not track packets for connected AP as TDLS is not possible
with connected AP.

Change-Id: I29d6f4e7858de1ec453d64b6fce548f5132c57d4
CRs-Fixed: 2457524
2019-05-27 10:37:26 -07:00
Bala Venkatesh
444588c41e qcacld-3.0: Enable TDLS in case of STA association failure
TDLS is disabled if second connection comes up.
If that second connection fails then enable
the TDLS again.

Change-Id: Id5df1df81c94bcf3a0616bbfb4b33f3e4d81dcbe
CRs-Fixed: 2445831
2019-05-20 13:40:37 -07:00
Arun Kumar Khandavalli
43fdd25d72 qcacld-3.0: Move allocation of tdls private to tdls component
Presently osif tdls memory is freed as part of the osif_priv
when the vdev is logically destroyed. There is case seen
wherein the  tdls is holding vdev reference and in the other
thread the  interface down is received and the osif_priv is
freed resulting in the tdls osif priv also, if the other thread
tries to dereference the tdls os priv it will result
null pointer exception.

Move the tdls osif priv memory creation/deletion to the tdls component.

Change-Id: I3782f6304bee5a6eaab4d9122a569ba56fd29947
CRs-Fixed: 2436379
2019-05-14 13:03:08 -07:00
Wu Gao
eaa472be0f qcacld-3.0: Correct configurations' description and type
Correct INI description for "gTDLSRSSIDelta", and configuration type
for below items:
 - CFG_VALID_CHANNEL_LIST
 - CFG_COUNTRY_CODE

Change-Id: If7ae2845c06b39ba9ce5af96c21bbe3900edbdf4
CRs-Fixed: 2448134
2019-05-14 05:46:15 -07:00
sheenam monga
0b2054b3c5 qcacld-3.0: Fix bss peer use after free in TDLS
wlan_vdev_get_bsspeer() return bss peer without taking the ref count
of the peer and thus if peer is deleted after wlan_vdev_get_bsspeer()
returns a valid peer, the caller will have stale entry of the peer.
Stale entry of peer can lead to Assert.

Use wlan_objmgr_vdev_try_get_bsspeer API in TDLS to get the BSS peer
which increment the refcount if peer is valid. With this the peer
won't be deleted till the caller release the ref count of the peer.

Change-Id: I9dc26771a0e8dadf75898c94bff5d4b8fb8a88d5
CRs-Fixed: 2445795
2019-05-03 09:23:47 -07:00
Bala Venkatesh
51930d5a43 qcacld-3.0: Don't allow update peer command if peer not found
Do not allow tdls peer update command if tdls peer is not
found in lim. If peer assoc command is given to FW
without peer create, FW will assert.

Remove tdls peers in tdls component in case of roaming as
peers are deleted in lim as part of roaming.

Change-Id: Ie227da682e4d30c9b583881f7e2eaafe91826476
CRs-Fixed: 2441951
2019-04-30 08:41:12 -07:00
Wu Gao
18e788a176 qcacld-3.0: Update rssi when get all tdls peers
It doesn't update rssi of tdls peers. So add logic to update it when
get all tdls peers.

Change-Id: I81d4536b5cb2443b088ee4a5d425d548eac152d6
CRs-Fixed: 2435903
2019-04-29 04:17:25 -07:00