Commit Graph

5928 Commits

Author SHA1 Message Date
Sourav Mohapatra
00f5651b66 qcacld-3.0: Remove validate context check in LL stats get NB ops
As a part of LL stats get NB operation, the driver sends the LL stats
req to the FW, waits for the response and sends back the stats in a
synchronous reply. All this happens as a part of one single NB
operation.

Within this operation, if an rmmod comes, there can be a possiblity
of a memory leak. In function hdd_link_layer_process_radio_stats, there
is a check to validate the hdd_context and return if the driver is
undergoing load/unload. As a part of the premature return, some memory
are not freed properly.

To resolve this, remove the validity check from the NB operation. The
operation itself comes with DSC synchronization and ensures that the
hdd_context remains valid atleast until the operation is complete. Thus
there is no need for the redundant check of validity of hdd_context,
which resolves the memory leak issue also.

Change-Id: Ieea755e83addac99659dbd6e0e5f160b86e6f9fa
CRs-Fixed: 2679081
2020-05-08 12:33:22 -07:00
Alan Chen
e93ba0f5b1 qcacld-3.0: Add a sysfs replacement for reassoc
As part of WEXT replacement, replace reassoc with a sysfs file.

file path: /sys/class/net/wlanxx/reassoc
	where wlanxx is adapter name

example: echo 0 > reassoc

Change-Id: Ib4f3582bb8c164dd4f3ab739367520b9aeb0f5b9
CRs-Fixed: 2676629
2020-05-08 12:33:18 -07:00
Alan Chen
549fb49793 qcacld-3.0: Add a sysfs replacement for set_fw_mode_cfg
As part of WEXT replacement, replace set_fw_mode_cfg with a sysfs file.

file path: /sys/kernel/wifi/set_fw_mode_cfg

example: echo 1 1 > set_fw_mode_cfg

Change-Id: I851df440f9eb5f73798deaf3b4d0f128f6925f26
CRs-Fixed: 2675570
2020-05-08 12:33:13 -07:00
Bapiraju Alla
947eeb60b8 qcacld-3.0: Fix return type for hdd_data_stall_process_event
Fix return type for hdd_data_stall_process_event to match with
data_stall_detect_cb callback return type.

Change-Id: I6d81171f32df7a0e6e66d5651739463c422f4a9d
CRs-Fixed: 2674550
2020-05-07 03:44:38 -07:00
Sourav Mohapatra
a777718385 qcacld-3.0: Do SSR cleanup during uevent/shutdown based on context
Currently we have two different cleanup approach for SSR. In case of
Adrastea hardware, cleanup can be done during the receipt of FW_DOWN
uevent while in case of HS/HSP it has to be defered to shutdown.

These two approaches are segregated by different branches and thus did
not need to coexist. But as part of future upgrades, a single component
would be used for both the hardware types.

To enable having both these paths, use the context of execution of the
pld_uevent as the differentiating agent. In case of interrupt context,
go with the deferred cleanup and in case of normal process context,
perform the cleanup in pld_uevent itself.

Change-Id: I554a10cdd99b17a6d3e059ebf7a157b0cddb6226
CRs-Fixed: 2669840
2020-05-07 03:44:34 -07:00
Li Feng
b38b14e1fb qcacld-3.0: Support gc+sap scc on dfs channel
Once gc connected on dfs channel, allow the scc sap start on the same
dfs channel with dfs master capability disabled in the driver if 
sta_sap_scc_on_dfs_chan ini is set.

Change-Id: Ie1c3ad2850fb0bce3f19f8fbe4750e5a97f2be93
CRs-Fixed: 2666581
2020-05-06 21:30:27 -07:00
Jingxiang Ge
69a3183113 qcacld-3.0: Checking assoc state for bw timer when resuming
In runtime resuming, there is no necessary to start bw timer
if adapter is in non-assoc state.
If bw timer has been started in idle state, there will be no
match bw timer stop. In hdd_bus_bandwidth_deinit, it will consider
as abnormal.

Change-Id: Id36af395269ebf3a09429b2606dbd438f147f24f
CRs-Fixed: 2678835
2020-05-06 19:52:28 -07:00
Utkarsh Bhatnagar
83a3de0def qcacld-3.0: Remove unused PMF code
PMF logic is moved to crypto so remove unused PMF code.

Change-Id: I141a7683879da8f1961183db6dd26285c7bf4c4a
CRs-Fixed: 2678890
2020-05-06 01:26:38 -07:00
Bapiraju Alla
03aa3d8d58 qcacld-3.0: Handle peer leak during SSR incase of SAE
Currently, there is a peer leak when SSR is triggered during SAE
authentication.

To avoid this,don't purge serialization commands from hdd_wlan_shutdown.

Change-Id: I05a646f2af9d31bda27bb74b8f58390d3bf09623
CRs-Fixed: 2678294
2020-05-06 01:26:33 -07:00
Alan Chen
06551ba572 qcacld-3.0: Rename gEnablePowerSaveOffload to gAdvancedPowerSaveMode
gEnablePowerSaveOffload is confusing, so change it to
gAdvancedPowerSaveMode.

Value 0: Disable advanced power save
Value 1: Enable advanced power save

Change-Id: Ib5593ef31eedacdc232ffbad183974e2cd847e83
CRs-Fixed: 2676664
2020-05-04 23:12:06 -07:00
Arun Kumar Khandavalli
32de55112c qcacld-3.0: Free the beacon memory when sap restart fails
Whenever there is a subsystem restart the sap is internally restarted
in the driver, whenever there is a failure during this sap restart
there could be a memory leak.

Fix is to free the beacon memory whenever the sap restart fails.

Change-Id: If329aacceef50124956bddc049ee8e55e880177d
CRs-Fixed: 2671251
2020-05-03 13:43:32 -07:00
gaurank kathpalia
83e526cc1a qcacld-3.0: Advertise 40, 80, 160, 80+80 caps in wiphy
Currently driver does not advertise the bandwidth
capability for 5ghz band in the he capability
structure of wiphy, result of which is supplicant
is unable to turn on P2P-GO interface in HE40, 80
mode.

Fix is to advertise that the driver supports all
the bandwidths in HE mode which is supported by FW.

Change-Id: Ie94ad9784243ce1f562938b1a50c53f3a25db834
CRs-Fixed: 2673025
2020-05-02 11:10:00 -07:00
Rachit Kankane
51b1051f5f qcacld-3.0: Check for NULL pointer
Check for NULL pointer before accessing.

Change-Id: I7916a475be98cb63cc8569f8eba022d5b49f5c10
CRs-Fixed: 2669232
2020-05-02 11:09:55 -07:00
Mohit Khanna
ed577367b4 qcacld-3.0: Check hdd_ctx for null in hdd_get_bandwidth_level
Check for hdd_context validity before accessing current throughput level
in hdd_get_bandwidth_level.

Change-Id: I8cb3a0e484e4350938e28c4f704498aa24ed2c14
CRs-Fixed: 2669231
2020-05-02 04:27:22 -07:00
Ashish Kumar Dhanotiya
fc55b957c8 qcacld-3.0: Pass frequency as an argument to set mon chan api
With recent 6GHz changes set mon chan api has changed to accept
the frequency as an argument instead of the channel number.
Currently existing iwpriv interface is still passing channel
number as an argument to this api which results in the failure
of this command.

To resolve this above issue, convert the channel number received
as an argument to frequency at the entry point of the iwpriv
command and invoke set mon chan api with the fequency as an
argument.

Change-Id: I6bb0682ff3cf5c6e8086012522ea1455a1cecae4
CRs-Fixed: 2675499
2020-05-02 04:27:17 -07:00
Ashish Kumar Dhanotiya
7a02ceac3b qcacld-3.0: Validate he operation info before nla put
Currenly when driver receives get station info command in
in sta mode, he operation information is also copied to the
response buffer. Host does not validate he operation info
and tries to do nla put which is leading to NULL pointer
dereference.

To address above issue, add a check to validate the he operation
info before nla put operation.

Change-Id: Iaa093e4d4e3a9cec978f16c69a66c778b2dcf79f
CRs-Fixed: 2676773
2020-05-01 17:52:46 -07:00
Jingxiang Ge
d364508056 qcacld-3.0: Check minimum value of debugfs file
Add checking minimum value to avoid reading
garbage data.

Change-Id: I30541a8b081a67b1a04774545a2879aadab5f8ac
CRs-Fixed: 2676019
2020-05-01 12:49:13 -07:00
Utkarsh Bhatnagar
a07afa12be qcacld-3.0: Increased logging in wlan_hdd_cfg80211_channel_switch
Added debig logs in __wlan_hdd_cfg80211_channel_switch and in
wlansap_set_channel_change_with_csa

Change-Id: Idf0f29f21d879e32a0ad8e1db25fc8360ec36800
CRs-Fixed: 2676407
2020-05-01 08:44:04 -07:00
Yeshwanth Sriram Guntuka
bcb4c0db1c qcacld-3.0: Reject set_nud_stats request during roaming
Set_nud_stats request is received at driver when
roaming is in progress. WMI command sent for this
request causes an assert in firmware.

Fix is to reject set_nud_stats request received during
roaming.

Change-Id: I41e3b665ef02abcac5b59ce151c3938497be6283
CRs-Fixed: 2674624
2020-04-30 05:23:22 -07:00
Jingxiang Ge
83b1033055 qcacld-3.0: Return EAGAIN in wlan_hdd_pld_runtime_suspend
If fw is down when runtime pm, runtime pm will return EFAULT
to kernel, so kernel will treat it as a critical error so all
future runtime PM API calls will return error, this is not what
driver expected.

Always make sure driver only return EAGAIN or EBUSY to kernel.

Change-Id: I651f75ee615af819a080e2955ac64a986620375f
CRs-Fixed: 2674531
2020-04-30 00:12:27 -07:00
gaurank kathpalia
e9f6e25870 qcacld-3.0: Remove unlink BSS from CSA handler
Kernel includes the BSS entry in to the following
data structures.
1. bss list rdev->bss_list
2. bss search tree rdev->bss_tree
It also stores the pointer of the connected bss in
“current_bss” .
If the driver does an unlink of the bss it deletes
the entries from the above data structures,
but does not update the current_bss data structure.
This leaves the current_bss pointing to the
previous deleted bss entry.
Thus, when the next set of newly found bss entries
start finding for the bss entries in the bss_tree,
the comparison with the already freed bss entry
above shall lead to an invalid access.

Fix is to remove unlink BSS from the channel change
notify path as the kernel can take care of it.

Change-Id: Ic0dfa6423db169e63ac80cd5a0f3ce05f0438c5d
CRs-Fixed: 2673629
2020-04-29 17:56:02 -07:00
Yeshwanth Sriram Guntuka
3e843a398f qcacld-3.0: Set is_eapol and is_dhcp to false for each skb
On receiving nbuf list in hdd_rx_packet_cbk, is_eapol and
is_dhcp flags are set to false only initially. In the
loop over all skbs, if any one of these flags is set to
true, these flags are not reset for each skb leading to
incorrect stat values and possible OOB access to rx_delivered
and rx_refused array.

Fix is to set is_eapol and is_dhcp flag to false in the
beginning of the nbuf loop.

Change-Id: Iacc7620f26fb0f71dee931c78993a75232e767b0
CRs-Fixed: 2669412
2020-04-29 16:03:17 -07:00
Arun Kumar Khandavalli
8d1af37af9 qcacld-3.0: stop the bus bw timer during the driver unload
When the driver unload is triggered, the device could be in the
runtime suspend state, so the 1st thing driver does to do runtime
resume, During this runtime resume the bus bw timer could be started
which in some race conditions is not getting stopped.

Stop the bus bandwidth timer after the wlan chip is runtime resume.

Change-Id: Ie29f9b4d44cea5c5624020aa3b6b3f08489860d3
CRs-Fixed: 2672120
2020-04-29 08:19:33 -07:00
Abhishek Singh
758eff24ba qcacld-3.0: Use new enum to check the max percentage for the score
Use new enum to check the max percentage for the score.

Change-Id: I7a040f7604a426d659e732c2853fbacc2b6a5a35
CRs-Fixed: 2673982
2020-04-29 08:19:28 -07:00
Sourav Mohapatra
d8608e5f8c qcacld-3.0: Modify datastructure of sta_info from hash table to list
For each peer connected to SAP, there is a corresponding entry maintained
in HDD called station_info. Currently, this data is being stored as a
hash table. There are two primary complications in using a hash table
in this scenario:

	- The max peers supported are 32. This is a very small number to
	  use a hash table for. The minute time complexity gains for a
	  fetch/insert operation do not justify the implementation
	  complexity.

	- The hash table is being implemented with the use of kernel ht
	  APIs. These do not provide the granularity to achieve proper
	  synchronization as is needed in driver.

To address the above points, move the storage of sta_info from hash
table to linked list. This will provide simpler implementation and also
give access to using proper synchronization methods.

Change-Id: I7d3a8a2937048f29a867453a91dfc1864932619e
CRs-Fixed: 2668300
2020-04-29 06:29:26 -07:00
Vevek Venkatesan
7df42ef747 qcacld-3.0: use adapter's vdev_id instead of vdev dereference
This is to fix the error of missing vdev NULL check.
Instead of dereferencing vdev to get the vdev_id, can directly
use adapter's vdev_id, so that can avoid unnecessary vdev NULL
check and lesser operation.

Change-Id: I7d84046c405a82cd6967a8d79142acd5618e18db
CRs-Fixed: 2669233
2020-04-29 06:29:21 -07:00
Li Feng
83c1ae66b8 qcacld-3.0: Add sanity check for allocated mac address
The mac address as pointer which is allocated by
wlan_hdd_get_intf_addr() may be null, and there is risk
about null pointer dereference without sanity check.

The fix is to add necessary null pointer check.

Change-Id: Ie0c3f841174e78b0d0b35e321ef7ca6b4cfdbe9a
CRs-Fixed: 2673727
2020-04-28 21:22:52 -07:00
bings
ea4abd6819 qcacld-3.0: Refine gEnableMCCAdaptiveScheduler as bool
It is more proper to define gEnableMCCAdaptiveScheduler as bool. Then
enable_mcc_adaptive_sch in struct policy_mgr_cfg should be defined as
bool.

Change-Id: I97e2c708e413f86722192b80de39d336e219b3fa
CRs-Fixed: 2656591
2020-04-27 21:31:55 -07:00
Li Feng
865036ff4f qcacld-3.0: Take account of dfs cac state to determine dfs_cac_block_tx
Regarding to the go+sap scc on dfs channel, sap can follow with go
to the same dfs channel, but sap tx is hung.
Since the host set the dfs_cac_block_tx by mistake when ap started,
though the ap skip the cac because the scc go finished the cac
procedure, then dfs_cac_block_tx has no chance to be reset.

The fix is to take account of dfs cac state to determine the proper
dfs_cac_block_tx.

Change-Id: I7a35225711f587b83d2fc381108d7d3f15893867
CRs-Fixed: 2631457
2020-04-27 21:31:50 -07:00
Srinivas Dasari
9a0ed3383c qcacld-3.0: Delete all NDP peers when NDI is removed
When NDI is removed from framework, driver deletes all NDPs
as part of eWNI_SME_STOP_BSS_REQ. Driver posts WMA_DELETE_STA_RSP
to lim from wma just after sending PEER_DELETE request to
firmware for NDP and ignores the DEL_STA response from firmware.
If there are multiple peers, all peer delete requests are sent
back to back to firmware. NDI peer delete and NDI VDEV delete
request also follow these immediately. All these commands
can go back to back to firmware as driver doesn't wait for
any of these responses.
But firmware needs some time to send NDP end frame to
the NDP peer after receiving NDP peer delete. Firmware might hold
the NDP peer delete request till it successfully sends the frame
to the peer.
Driver must wait till the NDP peer delete response is received to
proceed further with NDI cleanup/NDI vdev delete.
So, send NDP_END_ALL to firmware to let the firmware
initiate cleanup for all NDP peers. Use ucfg_nan_disable_ndi to
do the same which takes care of waiting for response from firmware
indicating cleanup has started. Then wait for all NDP END
indications and unblock the wait upon receiving last NDP END
indication.

Change-Id: I250883b3e9759ad903c3ce17f8c2c0b74a81f496
CRs-Fixed: 2619757
2020-04-27 19:51:08 -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
sheenam monga
89a452fb6d qcacld-3.0: Conditional compilation of akm suites
Currently, in hdd_sta_akm_suites akm suites are added
without verifying that these are supported by kernel
or not. Support for WLAN_AKM_SUITE_8021X_SUITE_B and
WLAN_AKM_SUITE_8021X_SUITE_B_192 akm suites is added
from kernel 4.12 that can cause compilation issue for
kernel version lesser than 4.12.

Fix is to add a check of  kernel version for
WLAN_AKM_SUITE_8021X_SUITE_B and
WLAN_AKM_SUITE_8021X_SUITE_B_192 suites before adding
as an element in hdd_sta_akm_suites.

Change-Id: Id8c5d1e01da62d63cfe99353e5f9dae5814baaf9
CRs-Fixed: 2667625
2020-04-24 03:40:16 -07:00
gaurank kathpalia
40d08f88c4 qcacld-3.0: Do not send BLM list to FW if recovering
Do not send the reject AP list to FW if the driver
is in recovering state (SSR) as the FW is already
down.

Change-Id: I31d815e215ca703574348a287f294da46937670f
CRs-Fixed: 2667934
2020-04-23 16:26:35 -07:00
gaurank kathpalia
3935335687 qcacld-3.0: Start the SAP if force SAP ini is set
Currently, the driver trims the channel list with
the PCL if external acs policy ini is set, and
if the channels are unsafe then that can lead
to 0 channels and the SAP can fail.

Fix is to check whether the force SAP start ini
is set and override the channel.

Change-Id: If245bf27deda0f6022343d7a175520fdd92d106b
CRs-Fixed: 2667742
2020-04-23 11:32:14 -07:00
Gururaj Pandurangi
8ccb6a72e2 qcacld-3.0: Add support for peer_delete_all in sap
Currently, only broadcast disassociation is supported
and deauth is sent in a unicast manner.
With peer delete all support, HDD sends a single call
to PE for broadcast deauth request. PE module sends a
single broadcast deauth frame and on TX completion,
calls vdev_mgr_peer_delete_all_send. This issues the
new WMI_VDEV_DELETE_ALL_PEER_CMDID to FW to cleanup
peers entries corresponding to VDEV ID and also flush
TIDS internally.
On receiving the peer delete all response, target_if
cleans object manager entries and datapath cleans up.
But PEER unmap is done iterating through all peer entries
individually. After this a single eSAP_STA_DISASSOC_EVENT
is received in HDD signalling the completion of broadcast
deauth procedure.

Change-Id: I928461606154380eef21a02cc7306921ceb9e16e
CRs-Fixed: 2585005
2020-04-22 23:59:18 -07:00
Aditya Kodukula
91b7d01c3f qcacld-3.0: Align feature flag WLAN_POWER_DEBUG properly for power stats
The WLAN_POWER_DEBUG feature flag for power stats is not properly aligned
in the commit Ic395f393580fcd59faa4e4676f67a39ff37bdd1a and hence it is
addressed in this change.

Change-Id: I40236efa31e1d832884984536597122c04ecc269
CRs-Fixed: 2668142
2020-04-22 21:51:53 -07:00
Liangwei Dong
61c24d2129 qcacld-3.0: Fix SAP start failure on 5G 160Mhz
Set NL80211_RRF_AUTO_BW flags for all regrules.
Kernel will calculate max supported bandwidth based on
the NL80211_RRF_AUTO_BW flag for adjacent frequency
ranges dynamically.

Change-Id: I86e6dee2c58f92b6cf4d8a2c11f510cef948243b
CRs-Fixed: 2661969
2020-04-22 06:22:31 -07:00
Bapiraju Alla
03e71a88f3 qcacld-3.0: Update check for disabling auto ps timer
Currently auto ps timer is disabled when device mode is not monitor mode.
This is causing issue when device mode is FTM when ps timer won't be
started.

To resolve this, add check for FTM mode also before disabling auto ps
timer.

Change-Id: I7cf493f10676e170fcb7e50e343bb0d20de4d89c
CRs-Fixed: 2667942
2020-04-22 04:21:44 -07:00
Bapiraju Alla
3416ac0dff qcacld-3.0: Add APIs to configure firmware params using fwol component
Currently these params are sent to fw from hdd. By design, this
should be done by fwol component. Add fwol APIs to achieve this.

Change-Id: Ifcc67fe15e76a32c28819267b0639edae1032093
CRs-Fixed: 2665749
2020-04-21 22:24:19 -07:00
Yue Ma
1511587e7f qcacld-3.0: Use HIF runtime PM APIs from HDD
CLD driver should always use HIF runtime PM wrapper APIs so that
the stats can be recorded properly.

Change-Id: I0cd9ac363c3d2dacd326d53e3f5d09887e7f3ed0
CRs-fixed: 2666953
2020-04-21 18:48:18 -07:00
Arun Kumar Khandavalli
04dd442ed6 qcacld-3.0: move to the new pld uevent for the hang data
New pld uevent is added for the hang data. Move to the new uevent
and send the data to userspace upon the reception.

Change-Id: I24360c4171f4b26dc2bce719f06317ecc0316738
CRs-Fixed: 2665593
2020-04-20 19:19:44 -07:00
Sourav Mohapatra
0ee5697aeb qcacld-3.0: Rectify mac address validation check
In function hdd_dis_connect_handler, before calling ucfg_ipa_wlan_evt,
the driver validates the mac address being passed. Currently this
validation is not done properly and valid mac address are marked as
invalid.

Replace the incorrect validation API with the correct one.

Change-Id: Ia6bee986089bc0f0defe94ede1d093210bc47034
CRs-Fixed: 2664190
2020-04-19 22:03:43 -07:00
Pragaspathi Thilagaraj
ecec2d5b28 qcacld-3.0: Don't send RSO update after receiving set pmksa command
When set_pmksa command is received from userspace, the internal
pmk table is updated with the new bssid entry and the pmk is saved
to the session. Additionally this update triggers an RSO update
command to the firmware which causes the use of stale pmk for
single pmkid case, in which the BSS capability of SAE single pmk
will be known only after parsing the beacon/probe received in the
roam synch indication.

So donot send RSO update on receiving set pmksa command.

Change-Id: I25419fbc3061ab963ccf3228b3681c83773a7963
CRs-Fixed: 2659055
2020-04-19 07:00:28 -07:00
Ashish Kumar Dhanotiya
1ad7188e72 qcacld-3.0: Add support to cache he operation info
Currently if station is connected in 11AX mode, AP's HE
IE is not getting updated in the cache information of the
station.

Add support to update HE operation element in the connection
info structure of the station context.

Change-Id: I214d6cec22525788e9ce21a7d832263148989715
CRs-Fixed: 2656005
2020-04-18 11:04:10 -07:00
Aditya Kodukula
f1c3387ee4 qcacld-3.0: Add a feature flag WLAN_POWER_DEBUG for power stats
Power stats is moved from debugfs to sysfs, and hence add the feature
flag WLAN_POWER_DEBUG such that this feature can be compiled out for
low memory foot print drivers.

Change-Id: Ic395f393580fcd59faa4e4676f67a39ff37bdd1a
CRs-Fixed: 2665089
2020-04-18 05:00:54 -07:00
Alan Chen
ff95ece535 qcacld-3.0: Move RTPM QoS notification inside HDD enable/disable
Runtime PM is enabled in hdd_enable_power_management(). Hence, move
PM QoS notification registration to HDD enable power management.
Similarly, move PM QoS unregistration to HDD disable power management.

Change-Id: Ifc7f280ab838dd9347095726961b6a0296626f6a
CRs-Fixed: 2665176
2020-04-18 01:52:32 -07:00
Srinivas Dasari
11c907f867 qcacld-3.0: Consider host and firmware capa for NAN separate vdev
Firmware advertises the NAN separate vdev capability through
the service capability wmi_service_nan_vdev and host advertises
through the ini param nan_separate_iface_support. Both of the
capabilities must be checked to support the NAN separate vdev
support. Define an API to check both the capabilities and made
the individual capability APIs static. So that individual APIs
are not accessed outside this common API. Use this API to
know the support. This is to avoid any possible misses in
checking the support.
For example, NAN vdev id is fetched from the NAN enable
response message received from firmware only based on
firmware capability in nan_handle_enable_rsp. If firmware
supports the feature and ini is set to 0, then vdev id might
be invalid as it's fetched from the NAN enable response
without considering host capability. If either firmware or
host doesn't support NAN separate vdev feature, firmware
creates vdev and it may not fill the vdev id in NAN enable
response. Host shall use NAN_PSEUDO_VDEV_ID then.
So, consider NAN separate vdev feature as supported only if
both host and firmware support.
Also fetch the firmware capability to support NAN separate vdev
when wma_rx_service_ready_ext_event is received and update to NAN
psoc priv object.

Change-Id: I50e76fbe17befb28a5262fc26f5675b67f4d21f2
CRs-Fixed: 2650354
2020-04-17 17:24:13 -07:00
Will Huang
dd01f5ba00 qcacld-3.0: Fix dsc_vdev leak when create exist softap
If add softap which name already exist, wlan_hdd_allow_sap_add() will
return the exist softap, which check as valid wdev in function
_wlan_hdd_add_virtual_intf(), so we created useless dsc_vdev for this
duplicanted softap, and upper layer has no chance to delete it because
it only has unique softap.

Fix it by removing wlan_hdd_allow_sap_add() checking because kernel
will check duplicated naming when register interface.

Change-Id: Ic6ffa793a678cfdeb43ecd6c472e8a70c8a150f1
CRs-Fixed: 2661354
2020-04-17 10:29:26 -07:00
Bapiraju Alla
6cddfae45a qcacld-3.0: Wait for sme_soc_set_dual_mac_config to get complete
SAP turn on is getting stuck for longer time due to vdev is getting
deleted logically before response for sme_soc_set_dual_mac_config comes.

To resolve this, add wait in wlan_hdd_update_dbs_scan_and_fw_mode_config
to confirm sme_soc_set_dual_mac_config completion.

Change-Id: I9408713fcf828d24688ecc45290d8c90a8d54c22
CRs-Fixed: 2663509
2020-04-16 21:57:48 -07:00
Rachit Kankane
a056dcf1e3 qcacld-3.0: Copy peer and radio stats correctly
Copy WMI_LINK_STATS_ALL_PEER stats and number of channels in
radio stats properly to the buffer.

Change-Id: I3219e3c46e93d43f2684ab51a2c5d98a63a3f88e
CRs-Fixed: 2649207
2020-04-16 19:09:05 -07:00