Always decrement tdls_soc_obj->set_state_info.set_state_cnt
in case TDLS is disconnected due to STA disconnection
triggered as part of SSR.
If it is not, then for SSR, after the system restarts,
this count is used and can be interpreted as second
tdls connection.
Currently, multiple tdls links are not supported, so
TDLS set state CMD (WMI_TDLS_SET_STATE_CMDID) won't be
sent to fw, although peer create and peer assoc will
go to firmware which results in crash.
Change-Id: Ib764cd04a04fab237840cdffafa9752fbe202418
CRs-Fixed: 2931199
As part of regulatory cleanup, wlan_freq_to_chan() is removed.
Use wlan_reg_freq_to_chan() instead of wlan_freq_to_chan()
Change-Id: I18d7996a0b117de90cd32f2208702d01655ceeb9
CRs-Fixed: 2926114
TDLS teardown happens in high throughput
scenario as rx pkt count increment API
"tdls_update_rx_pkt_cnt" is not called
if hdd_is_current_high_throughput API
returns TRUE. The reason for this is due
to high cpu cycles consumed by
tdls_update_rx_pkt_cnt API.
As part of fix optimize tdls_update_rx_pkt_cnt,
tdls_update_tx_pkt_cnt API's for high
throughput scenario. In high throughput
scenario mostly the use-case is to increment
the pkt counter so move that logic to
the top of the API's.
Change-Id: I4eb0da3571c45b5ee91e051e251158af15f73973
CRs-Fixed: 2888746
Channel number may be same for different bands due to which
non-dsrc channel may be treated as dsrc or vice-versa.
Fix is to find channel is dscrc or non-dsrc based on frequency.
Change-Id: I349172713dda6880771e14231aeb1b4419a86e01
CRs-Fixed: 2902986
Introduce HE cap IEs in addstareq. Also, Add
HE capabilities in frames for TDLS Setup Req,
Setup Rsp, Discovery Rsp. Add He Operations
in TDLS setup Confirm.
Implement APIs under feature WLAN_FEATURE_11AX
which will be used to:
1) Fill HE capabilities in TDLS Discovery Response,
TDLS Setup Request, TDLS Setup Response.
2) Fill HE operations in TDLS Setup Confirm.
3) Convert he_capa capabilities from station
parameters to tdls tDot11fIEhe_cap type.
4) Set Chan width based on session, peer
capabilities.
Change-Id: If36b1a3c3eed0e6026043494a097673f9d74b580
CRs-Fixed: 2883443
Use wlan_reg_get_channel_state_for_freq to get channel state
instead of wlan_reg_get_channel_state.
Change-Id: I0ab0465458801747cc97bf03b3aee4ec255beb57
CRs-Fixed: 2859852
It doesn't free resources in failed cases like getting vdev or tdls
vdev object when handling tdls commands. This causes reference
count of psoc leak or memory leak. Following are the functions,
tdls_set_responder
tdls_notify_sta_connect
tdls_notify_sta_disconnect
tdls_set_operation_mode
tdls_reset_all_peers
Change-Id: I8b5d5fa8a137a1b07f0fa6e4667047db95d7b99e
CRs-Fixed: 2839099
It doesn't handle failed case about getting vdev or tdls vdev object
when teardown tdls connection. Which causes reference count of psoc
leak.
Change-Id: Ie4e7966c0a07f378483cd5e6344599645c75ac68
CRs-Fixed: 2836949
Modify connect start code in interface manager by
moving disable roam and tdls link teardown notify
APIs from HDD to if mgr. Alongside, move tdls link
teardown notify API from HDD to if mgr in start bss API.
Also, move the tdls link teardown API to TDLS module from
HDD module as TDLS should manage the wait logic.
Change-Id: I09fa31878563a3daaa7c5fde46327475829317b3
CRs-Fixed: 2811807
Currently, if the TDLS timer expires while the scheduler thread
is processing something(e.g., station vdev destroy), the handler
would be in wait queue and it gets called once the scheduler
thread is done with its current task(i.e., vdev deletion).
TDLS handler tries to use the vdev even it has just got freed,
which leads to use-after-free.
This happens because of the below,
1. vdev destroy notification has no knowledge of the TDLS timer
expiry as timer_stop is used to stop the timer.
2. vdev is passed to TDLS handler as part of registration.
Fix:
1. Use timer_stop_sync in vdev_destroy_notification to make
sure the handler is posted to scheduler thread if the timer
had expired.
2. Get the vdev in handler from psoc instead of passing it to
the timer handler. This can make sure the vdev is referred
only if it exists.
Change-Id: I186fd0d44b2364ebb375a8445dd1239368543e7b
CRs-Fixed: 2792020
Compiling with gcc 9.3 will cause many implicit-fallthrough
compile errors.
Fix is to add keyword fallthrough to resolve such compile error.
Change-Id: I3fdc48b1a9ab2345a47ae644e3217b4d29238364
CRs-Fixed: 2785172
qdf_mem_malloc() function already takes care of logging the
caller function name and line number in case of any allocation error.
Hence there is no need to add the error log again.
Getting rid of these unnecessary logs reduces driver memory footprint.
Change-Id: If0b9425f82f9ed793c7639c0ed09eb1f868b6d5c
CRs-Fixed: 2781932
In case two clients try to establish the TDLS connection simultaneously,
the peer who is able to transmit the setup request first will be
connected and the other request is in driver without notifying the peer.
This causes peer to get stuck waiting for the TDLS setup response. So,
send TDLS setup response with unspecified failure reason code, ift here
is already TDLS setup.
Also, drop the setup response only if status code is zero in case setup
is already in progress. This way if the status code is set which will be
set in tdls_activate_add_peer(), in case of request already in process,
the same error code can be notified to the peer.
Change-Id: I83fea4586d6e344a86a9185b078e4d87ec38c664
CRs-Fixed: 2771973
This change fixes two issues about TDLS:
1. It updates current mode only if tdls vdev object is NULL.
2. Handles pre-scan callback but ignore scan done callback if device
type isn't station or P2P client.
Change-Id: I4badbf3a7c40eca813a6360817d5483be88f2c5d
CRs-Fixed: 2769638
DUT doesn't teardown TDLS link if set gEnableTDLSScan = 0 just as
previous branch. This change will teaddown TDLS link if set
gEnableTDLSScan = 0 and disallow scan.
Change-Id: I287f3ec200c05ed6e7bc1d2887f659ab8ccc90fa
CRs-Fixed: 2749536
Since tdls_implicit_enable will be called in different scenarios, and
there is error level output if repeated start same timer. So check
the state before starting tdls timer.
Change-Id: Id023affa016f337286dad539298a9bbc15381091
CRs-Fixed: 2747370
In WMI_TDLS_SET_OFFCHAN_MODE_CMDID the offchannel freq is set to invalid
value due to uninitialized local tdls_channel_switch_params type variable
resulting in fw reading incorrect non zero offchanel freq.
Fix, to zero initialize the local tdls_channel_switch_params variable.
Change-Id: Ia7d6daac098a179a22676620875a2b0d6488a8ad
CRs-Fixed: 2739267
Currently idle timer does not gets de-initialize on tdls peer
reset because of which there could be a possibility that in
case of multiple tdls connection and disconnection with multiple
peers, this timer might get assigned and re-assigned to different
peers which may lead to an issue where this timer never gets
started for the required peer.
In current scenario whenever the first TDLS connection
(Peer a with sta_idx 0) happens, tdls peer idle timer object is
initialized with “&tdls_soc->tdls_conn_info[0];”.
Now if this peer a gets disconnected and peer b gets connected
and peer gets the same sta_idx 0, then peer will be associated
with timer “&tdls_soc->tdls_conn_info[0];”,hence 2 timer init
happens with the same sta_idx for peer a and peer b.
(here peer a is in disconnected state and peer b is in connected
state)
Now if peer a gets connected it will get the sta_idx 1, as timer
initialization is already done for peer a with sta index 0 so
timer initialization will not be done again.
Now if peer b gets disconnected it will set the tdls_info for
sta_idx 0 to invalid (INVALID_TDLS_PEER_INDEX).
Now for peer a timer will be started and when timer expires in
timer handler function “tdls_ct_idle_handler” will not be invoked
as sta_idx is already set to INVALID_TDLS_PEER_INDEX.
To address above issue, de-initialize the idle timer for tdls
peer on every tdls peer reset.
CRs-Fixed: 2746046
Change-Id: Icc2e64a9299852d5b29d26dec79b7f1efb2594b8
Current implementation of external mode requires supplicant to
send tdls peer mac address. On matching of stats tdls implict
link procedure is trigger for configured peer.
Fix, to allow both configured peer and other peer that supports
tdls to establish the tdls link.
Change-Id: I8f65e6dcc9dec565623ac2d8d2c77e12570f8bfb
CRs-Fixed: 2733830
Update calls from reg_get_curr_band to reg_get_band since
they provide the same functionality.
Update calls to reg_get_band to expect a bitmap since the API
has been updated.
Update getband driver command to convert the bitmap to the
old values. Also add the new vendor command getband.
Change-Id: I069489ebf4826f8f4bfcb974b74e4d0591d5b33f
CRs-fixed: 2726361
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
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
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
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
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
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
Optimize logs after connect complete i.e roam offload params
and tdls state etc.
Change-Id: I5df7eb236ef1c7369f4d996c4f0eda7225652f12
CRs-Fixed: 2627694
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
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
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
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
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
Fill the pfm info of the TDLS peer before sending the peer assoc
command to FW.
Change-Id: I4e336c345c0fb8f063157b3e3a780efa777f1a74
CRs-Fixed: 2535832
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
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
Remove sta index in few prints and replace it
with MAC address as part of sta_index cleanup.
Change-Id: I689ede9dc345667f1a054f76bf3d08b236131c13
CRs-Fixed: 2524505
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
Since NAN has higher priority over TDLS, disallow TDLS link
when NAN is active.
Change-Id: I7de34dbb2f808c36358ac5266c26e2729b901941
CRs-fixed: 2537158