Commit Graph

5579 Commits

Author SHA1 Message Date
hqu
d109f767f6 qcacld-3.0: Remove enable_snr_monitoring from hdd_config struct
Currently, enable_snr_monitoring doesn't be initialized properly, in
some acs scenario, hostapd will dump survey(NL80211_CMD_GET_SURVEY),
driver return error due to uninitialized enable_snr_monitoring, this
will result in acs won't be started and sap fail to start.

Fix is to remove enable_snr_monitoring from hdd_config struct,
calling ucfg_scan_is_snr_monitor_enabled() everywhere that
enable_snr_monitoring is being used.

Change-Id: I8784867683b21d9441e980a1215b2db712db381a
CRs-Fixed: 2585661
2019-12-18 18:56:56 -08:00
Abhinav Kumar
0c6565b815 qcacld-3.0: Connection fails due to reassociation in progress
Below are the scenarios where host fails to clear roam in
progress flag:

Case 1: While processing disconnection request
Host should clear roam in progress flag irrespective of
connection state of STA.

case 2: While processing a try-disconnect request
Currently, Host waits for WLAN_WAIT_TIME_STOP_ROAM (4 sec) to
process disconnection, if firmware has already started roaming.
In case if Host doesn't receive roam completion indication from
fw, Host set connection state to not connected and fails to clear
roaming in progress flag. This results host refuses all further
connection request with reason connection in progress.

Fix is to clear roaming_in_progress flag in both cases.

Change-Id: I45d9771bcd546d8914321e3be1a6d0ce6566cdac
CRs-Fixed: 2588803
2019-12-18 08:07:04 -08:00
Will Huang
3c0285f029 qcacld-3.0: Move back set vdev crypto pararams to wlansap_start_bss
When SSR sap restart, vdev objmgr object will recreate new, if put set
vdev crypto pararams in wlan_hdd_cfg80211_start_bss(), it will not be
invoked by SSR sap restart procedure, so there is no crypto pararams in
vdev and lead to association failure when compare crypto pararams.

Move back set vdev crypto pararams to wlansap_start_bss so sap start
and restart will both invoke it.

Change-Id: I56656ffacbe153fbe73fb6e474048e055cb6a153
CRs-Fixed: 2584138
2019-12-18 02:46:18 -08:00
Liangwei Dong
73fdb0d319 qcacld-3.0: Fix VHT 160 rate report
1. Update pAddBssParams->ch_width to 160Mhz ch width value
based on VHT operation IE's ch width, channel segment 0
and channel segment 1 fields.

2. Report link rate information to OS for 160Mhz based on
rate flag TX_RATE_VHT160.

The change will fix the incorrect bandwdith reported by
IW commmand (iw wlan0 link) when STA is connected to AP
in VHT160 mode.

Change-Id: I698b12da825619e8e8f28f0cf4ea1ccf2e7072e6
CRs-Fixed: 2585986
2019-12-17 16:37:53 -08:00
Liangwei Dong
3b2fd85feb qcacld-3.0: Handle HE 160Mhz bandwidth rate report
Update tx rate flags to include 160Mhz bandwidth in
wma_set_bss_rate_flags_he.
Add HE 160 mcs to rate mapping for nss 1 and nss 2.
This change will fix incorrect bandwidth report via
IW command: iw wlan0 link.

Change-Id: Idd1adc4f2783b86a2a837999ea87bb38c813f213
CRs-Fixed: 2585078
2019-12-17 16:37:38 -08:00
Ashish Kumar Dhanotiya
d8d7dead7d qcacld-3.0: Add support for oem data event
Currently use of comamnd QCA_NL80211_VENDOR_SUBCMD_OEM_DATA
is to pass data blobs from Application to FW but there is
no mechanism to send the data blobs from FW to Application.

To meet the above requirement update the usage of existing
OEM DATA command to use it as a vendor event as well to
send data blob from host to Application.

Change-Id: I502312f25d2754984b86e1cc4e011800a5d4b58a
CRs-Fixed: 2573464
2019-12-17 14:09:53 -08:00
Arun Kumar Khandavalli
c988c53ea7 qcacld-3.0: Move from qdf event to linux completion for vdev destroy
Whenever there is a process waiting on a response from firmware it has the
option of using either a qdf_event or a linux completion event.
The primary difference between these is that if there is an SSR all
qdf_events are immediately completed whereas Linux completion events are
only completed by the normal flow of code.

With new upcoming changes SSR processing will take the normal path for
releasing all of its resources, and the qdf_session_close_event is used for
synchronization.
If we define this as a qdf_event, it will be completed when the SSR begins,
defeating its purpose.

Therefore change this to be a Linux completion event.

Change-Id: Ia6fe504e2a2d01f12c3d3446fffc2fc397566966
CRs-Fixed: 2586190
2019-12-17 03:45:01 -08:00
Rajeev Kumar
6b593aee71 qcacld-3.0: Remove pm_freezing check from psoc idle restart
pm_freezing check to abort system suspend during psoc idle
restart is not working and hence remove pm_freezing check.
Correct fix(change Ib89eca5014729f6a2103e14c6f46540d1406a5a0)
to reliably abort system suspend by calling qdf system awake
api during psoc idle restart is already present so pm_freezing
check is no longer needed.

Change-Id: Ifb56a2a9858378508ef9e583bdd15e63c26d9ba6
CRs-Fixed: 2587453
2019-12-16 21:15:30 -08:00
Alan Chen
dc26e04062 qcacld-3.0: Sanitize fils_erp_rrk_len before doing memcpy
Currently, the hdd_update_connect_params_fils_info() function blindly
trusts the size and copies into the fils_info->r_rk buffer, putting it
at risk of buffer overflow. Add a check to make sure the buffer passed
in to be copied to fils_info->r_rk is of the proper length.

Change-Id: I9ad2405ca1acd83591bea2aa43406909ad1c58e4
CRs-Fixed: 2580776
2019-12-16 19:45:32 -08:00
Yue Ma
b1e993f96a qcacld-3.0: Clean up channel number usage for CDP API
For cdp_hl_fc_set_td_limit() API, use channel frequency instead of
channel number.

Change-Id: Ic053be33ac7c7cbd2543b0208a1184b3f20a4346
CRs-fixed: 2565734
2019-12-16 19:45:14 -08:00
Ashish Kumar Dhanotiya
b01e45b865 qcacld-3.0: Validate assoc response IE len before copy
When host sends ft assoc response to supplicant, it
allocates a buffer of fixed size and copies a variable
length of assoc response IEs to this fixed sized buffer.
There is a possibility of OOB write to the allocated buffer
if the assoc response IEs length is greater than the
allocated buffer size.

To avoid above issue validate the assoc response IEs length
with the allocated buffer size before data copy to the buffer.

Change-ID: Ife9c2071a8cc4a2918b9f349f4024478f94b2d78
CRs-Fixed: 2575144
2019-12-16 16:17:11 -08:00
Hangtian Zhu
274e08b80a qcacld-3.0: Fix compile issues when some features are disabled
Fix compile issues when some features are disabled, the features are:
BUILD_DEBUG_VERSION
CONFIG_CP_STATS
CONFIG_HOST_OPCLASS
CONFIG_FEATURE_ROAM_DEBUG
There are some other features depends on each other, so enabled features to
qcs40x.snoc.perf_defconfig, the features are:
CONFIG_WLAN_FEATURE_FILS
CONFIG_WMI_ROAM_SUPPORT
CONFIG_WMI_STA_SUPPORT
CONFIG_REG_CLIENT
CONFIG_WLAN_FEATURE_DP_BUS_BANDWIDTH
CONFIG_WMI_CONCURRENCY_SUPPORT
CONFIG_LL_DP_SUPPORT

Change-Id: I6fa1eacb79576a955e593dbb9ac52083742275e3
CRs-Fixed: 2354496
2019-12-16 06:35:16 -08:00
Sandeep Puligilla
0f54d03172 qcacld-3.0: Set peer state to AUTHORIZE after 4way handshake
Firmware peer state needs to be set to AUTHORIZE only after
completing the 4 way handshake. In failure scenario,
host configured AUTHORIZE state before 4 way handshake and
it triggered assert in the firmware.

Peer state moved to connection in progress/CONN after successful
association and AUTH state after successful 4way handshake.

Change-Id: I5e3d94843443d0fc2612a918b5c14479f91914d8
CRs-Fixed: 2580929
2019-12-14 20:34:46 -08:00
Abhishek Singh
9b6a080634 qcacld-3.0: Remove logic to disconnect STA on VDEV delete
With Vdev delete not using serialization, no need to disconnect
any STA with connection in progress.

The logic was added to remove the active connect command from
serialization queue so that vdev delete can complete before hdd
time out.

Now as vdev delete is not using the serialization remove this.

Change-Id: Id8c5ab31e54c8cf26999aff58c0773213f0cb13a
CRs-Fixed: 2585753
2019-12-14 01:44:03 -08:00
Manikandan Mohan
8c58247da3 qcacld-3.0: Fix SAP ACL enforcement
Update driver to check SAP client acceptance as per MAC ACL policy
to control association.

Change-Id: Id6888b87393e79e2f86a7d5b1132c4a897179a23
CRs-fixed: 2583874
2019-12-13 10:45:23 -08:00
Nirav Shah
7d75434e39 qcacld-3.0: Add credit tracking for HL Data Path
Add credit tracking for HL Data Path in DPTRACE.
Also update proto_bitmap to dynamically enable/disable
credit tracking.

Change-Id: Idd9216b634586f3a81c2194ea4bd2122a472154a
CRs-Fixed: 2574053
2019-12-13 07:03:11 -08:00
sheenam monga
451c68c41a qcacld-3.0: Add ini support to configure MGMT retry limit
Currently, default MGMT retry limit is 4 which means 4
transmissions are supported for any management frame.
In noisy environment, Chances to get connection failure
are higher with 4 retransmissions.

Fix is to add INI support mgmt_retry_max to make
CFG_MGMT_RETRY_MAX configurable. Default value for
CFG_MGMT_RETRY_MAX is 15 to reduce the chances of connection
failure in noisy environment.

Change-Id: Id50cb68813fba517a8a1580a3d6662c73b0a381e
CRs-Fixed: 2575385
2019-12-13 11:51:36 +05:30
Alok Kumar
14affd5647 qcacld-3.0: If NUD Failure not honored, restart the NUD tracking
When NUD FAILED event is sent by kernel, driver checks if this event
needs to be honored or not. If there is any active traffic, driver
will not honor NUD FAILED event and won't issue disconnect.
Currently, when NUD FAILED event is not honored, driver NUD state is
updated to NUD_NONE. This won't allow the further NUD FAILED event
processing in driver if received without NUD PROBE/NUD INCOMPLETE.

Reset the driver NUD state machine when NUD FAILED event
is not honored and restart NUD tracking.

Change-Id: I46826fdf60fc2f3543567c09ddc8574f119efd38
CRs-Fixed: 2583096
2019-12-12 16:44:42 -08:00
Abhinav Kumar
d83a689ba1 qcacld-3.0: Send pause indication to upper layer for proper vdev
While processing BEACON_REPORTING_ACTIVE_REPORTING vendor command
on a particular STA (say its vdevid == 0), If scan started on any
interfaces (for example, on same STA (with vdev id == 0) or P2P
(with vdev id == 1) or on second STA (with vdev id == 1) of
STA + STA), Host should send a pause indication to upper layer only
for the vdev id(s) (here vdev id == 0) on which host processing
BEACON_REPORTING vendor command comes from user space.

Add sanity check to make sure that HOST should send pause
indication to upper layer only for vdev of STA for which host
processing BEACON_REPORTING vendor command at the moment.

Change-Id: I5ed5dc42e4dded2a803349d75234b84d3aa7f314
CRs-Fixed: 2582389
2019-12-11 14:55:32 -08:00
Abhinav Kumar
cab7253af0 qcacld-3.0: Set wdev for vendor event HANG_REASON_INDEX
Supplicant delivers the HANG event via HIDL for STA
and via a legacy socket interface for SAP standalone case.
As per current supplicant implementation, wdev_id only matters
when the HANG event gets processed via HIDL.

Currently, for STA interface, host sends wdev as NULL to
cfg80211_vendor_event_alloc, this allows userspace to
process nl_cmd for QCA_NL80211_VENDOR_SUBCMD_HANG_REASON_INDEX
event with the 1st interface which is p2p in supplicant instead
of WLAN interface.

Set wdev with the proper value for STA interface to avoid processing
nl_cmd with P2P interface by userspace.

Change-Id: If3c1b2e11daf682a6ef535014738f4b2a2b5d009
CRs-Fixed: 2580359
2019-12-10 16:15:19 -08:00
gaurank kathpalia
de7a3a2954 qcacld-3.0: Fix PS enable/disable command cache issue
Currently the driver caches the command which comes
for PS enable/disable and if the user disables the
command the API sme_ps_enable_disable cannot go
forward to enable/disable the command because
of the check for last user command cache to be disabled
or not.

Fix is to cache the command after the disable has
been sent to FW to avoid the scenario where the command
is not sent by host as the check to send the command failed.

Change-Id: Ibff459fa03aceaf6963735d22d30c54a488751f4
CRs-Fixed: 2582410
2019-12-10 11:47:48 -08:00
gaurank kathpalia
11aa98c7bc qcacld-3.0: Set acs complete in wlan_hdd_cfg80211_acs_ch_select_evt
Currently the acs in progress is not set to 0 when
acs policy is 1 and the control returns the best channel
in do acs itself, hence it can lead to many unexpected
behaviour if set to 1 and acs is complete.
For example one case sceanrio is that the driver
returned from do acs without clearing the acs
in progress flag, and then stop adapter comes to
the driver for the same interface, the driver
would check that if acs in progress is tru then
it would wait for 3 seconds for it to complete.
Now since there is no complete to be there as
ACS had already been completed, there would be
an unnecessary delay for 3 seconds to shutdown
SAP which would cause latency.

Fix is to set the acs in progress as 0 when the overide
happens.

Change-Id: I03a80c4d4eeeb41f21e95e37bfbeb94e7ebee51e
CRs-Fixed: 2582703
2019-12-10 07:59:55 -08:00
Saket Jha
53c00cb98a qcacld-3.0: Featurize PM QoS support for 4.19 Kernel
Due to upgrade to kernel 5.4, struct pm_qos_request fields have changed,
causing compilation issues. Featurizing PM QoS so it is only enabled
for 4.19 kernel.

Change-Id: Ide2a3eb4b2bc970c6469efe8621bec55e50ecbd8
CRs-Fixed: 2580165
2019-12-10 02:55:08 -08:00
Abhishek Ambure
3d18b4c831 qcacld-3.0: Add max index check for dscp_to_up_map array
In SME layer, boundary check for dscp_to_up_map array is not present.

The dscpmapping is an array of 0x40 elements. Values in dscp_exceptions
are used to index dscpmapping. The indices are not validated to be less
than 0x40. The dscp_exceptions array is received from association
response frame. A malicious AP can send values up to 0xff, causing OOB
write of dscpmapping array.

Hence, max index check is added to avoid OOB write of dscpmapping array.

Change-Id: I73526849677e867673fc0bd0024ed2b003e4f89e
CRs-Fixed: 2569764
2019-12-10 00:50:20 -08:00
gaurank kathpalia
54bc4a37bb qcacld-3.0: Fill HE capability and supported chan width in 6ghz
Fill HE capability and supported chan width in 6ghz
and remove VHT and HT support from the 6ghz channels
in wiphy structure.

Change-Id: Ibb1fbeca9bb7dc20b8545bc9f2b470cd7bef9fb2
CRs-Fixed: 2575744
2019-12-10 00:50:08 -08:00
Sourav Mohapatra
de9833414f qcacld-3.0: Report correct max NSS in case of DBS
Currently in the driver, the NSS reported to the userspace in case of
max rate reporting doesn't take into account if the hardware mode is DBS
or not. This causes the NSS to remain 2 even if the connection has
changed to 1x1.

Add a check if the current mode is DBS or not and update the NSS
accordingly.

Change-Id: I66ea830c7c6483c7ce957e1276b4ac5a535b17df
CRs-Fixed: 2579182
2019-12-09 18:57:12 -08:00
Jianmin Zhu
61d502d966 qcacld-3.0: SAP CSA from 5G to 2G for modem N79
For SAP/P2P GO on 5G, when receive cmd to disable 5G band when
modem n79 band used, will move to 2G band via CSA.
1. If no active connection on 2G, select ch by safe list, or
channel 6.
2. If there is STA on 2G, force scc with it.
3. If there is SAP/GO on 2G, force scc with it.
4. Handle one race condition that if candidate is already
selected & FW has gone ahead with roaming or about to go ahead
when set_band comes, it will be complicated for FW to stop the
current roaming. Instead, host will check roam sync to make sure
the new AP is on 2G, or disconnect the AP.
5. If 2 SAP on 5G, move both to 2G and keep scc.

When Set band to enable 5G band again, restored all 5G SAP/Go..

Change-Id: I9b2b1ead3b4502022aeefc08359037457bb051f9
CRs-Fixed: 2580204
2019-12-09 13:54:16 -08:00
Abhinav Kumar
57925408b6 qcacld-3.0: Don't Process BEACON_REPORTING OP if Scan is on-going
As per SS’s WIPS requirements, if Host receives beacon recv start
command while processing scan request, HOST should not process
beacon reporting start cmd.

Next start command should get allow only after completion of scan.

After scan completion, supplicant should send a fresh start command
to start BEACON_REPORTING again.

Change-Id: I8b64665b6d019cfab76eefba4f7b11fa7dd2782e
CRs-Fixed: 2578642
2019-12-06 14:43:36 -08:00
Rajeev Kumar
eed6e8f848 qcacld-3.0: Rate limit suspend not allowed log for test modes
In FTM and monitor test modes cfg80211 suspend op is not allowed.
If OS tries to do frequent suspend in FTM or monitor mode it can
lead to excessive console logging and hence to avoid excessive
console logging and its side effects rate limit the console
logging for FTM and monitor test modes.

Change-Id: I8d51db21f861f038f0538865f4c0634efd983f8c
CRs-Fixed: 2580927
2019-12-06 10:00:41 -08:00
Will Huang
136ca8d298 qcacld-3.0: Adjust tx retries stats on some platforms
On some platforms with TQM, target don't know packet number of
successfully transmitted after more than one retransmission attempt,
and after TQM retry, host data path will be notified.

Adjust tx retries stats number from data path, and indicate to upper
layer when query by wlan_hdd_cfg80211_get_station() on these platforms,
other platforms keep tx retries from wmi vdev stats.

Change-Id: Ie4b9a9f3b9241a59452e3f21f68757f3638b1a19
CRs-Fixed: 2574368
2019-12-06 07:15:37 -08:00
Yue Ma
a784969381 qcacld-3.0: Clean up channel number usage for SAP APIs
For hdd_hostapd_channel_allow_suspend() and hdd_hostapd_
channel_prevent_suspend() APIs, use channel frequency
instead of channel number.

Change-Id: I05a3e60918f1b40d2cbfbdb78038540fc4a87184
CRs-fixed: 2565731
2019-12-06 05:57:25 -08:00
gaurank kathpalia
8197e355fa qcacld-3.0: Peer ID cleanup in LIM, HDD and WMA
Cleanup peer id from the callers of cdp APIs from
where the peer ID was passed, and use mac address
instead to identify the STA.

Change-Id: Ie6dcae77e959439a71c11b1a2fa0daddcaa6e719
CRs-Fixed: 2529822
2019-12-06 01:51:09 -08:00
Paul Zhang
faa929c2ce qcacld-3.0: Add support for timer based to capture tsf
Add configuration CONFIG_WLAN_SYNC_TSF_TIMER and macro
WLAN_FEATURE_TSF_TIMER_SYNC to capture and get the tsf
from firmware.

Change-Id: I62298791cbafed84f1d23f1a2ecb5c2835dcd137
CRs-Fixed: 2564860
2019-12-05 23:54:07 -08:00
Arun Kumar Khandavalli
a4cedce6e0 qcacld-3.0: Flush the bandwidth work properly in shutdown
In case interface timer has expired and modules have been stopped
and there is an SSR the bus bandwidth work is not properly destroyed.

Destroy the work before checking for status of modules state since
the work will be re-initialized.

Change-Id: Ie3b8f7d6d0fe1261f9f3c412e933748fb7637ca7
CRs-Fixed: 2573341
2019-12-05 23:53:53 -08:00
Alok Kumar
68127f6594 qcacld-3.0: Affine RX thread to big cluster during uplink
During uplink traffic, affine RX thread to big cluster if
throughput is high and rx_packet counts above threshold.

Change-Id: I34034e79ee07c229966a279919acc11d1942b890
CRs-Fixed: 2557745
2019-12-05 18:05:10 -08:00
Bala Venkatesh
81281077ab qcacld-3.0: Remove the INI force_rsne_override
Currently, RSNE if given from userspace is overrided if the Ini
force_rsne_override is disabled as a security. But there
are sufficient checks already in kernel to validatethe RSNE
given by userspace. Hence this INI is no longer required.

Change-Id: Ifcc9298dcfa035d05e9ee4fb78a4fa2c9f249461
CRs-Fixed: 2573540
2019-12-05 16:38:44 -08:00
Karthik Kantamneni
0b95f9ec80 qcacld-3.0: Allow GET_RING_DATA vendor command without NETDEV dependency
Currently GET_RING_DATA vendor command is dependent on NETDEV,
as vendor command is wiphy command which is not dependent on
NETDEV allow the flush logs command irrespective of NETDEV.

Change-Id: I8e0474ca94645685e7f1969ad668692a44f96c23
2019-12-05 15:16:11 -08:00
Kiran Kumar Lokere
571f0d3e65 qcacld-3.0: Add 80+80 restricted BW support
Add support for restricted 80+80 bandwidth in STA and SAP modes.

Change-Id: Id1a61b853584fa84db3bb8f0f2aaf68eecabeaac
CRs-Fixed: 2570023
2019-12-04 14:40:31 -08:00
Vevek Venkatesan
b4016095ae qcacld-3.0: remove control path handles from cdp ops
Currently control path handles of pdev/vdev/peer
are given as arguments to cdp ops, which are
directly accessed by dp layer. This can cause a
race-condition in access of the handle if it
has been deleted in parallel.

Hence as a part of cdp convergence, pass only
the psoc handle which can be accessed all over
to retrieve objmgr_pdev from psoc.

- rx_mic_error
- txrx_pdev_attach
- txrx_vdev_attach
- txrx_peer_create

Change-Id: Iaec8b913810f9035faa0010117cdff19bdded37f
CRs-Fixed: 2541431
2019-12-04 07:43:42 -08:00
gaurank kathpalia
318006772b qcacld-3.0: Verify the channel and BW info in monitor mode
Currently the monitor mode does not check the chan
validity and BW validity before starting the monitor
mode vdev which could result in invalid configuration
given to FW and thus further can lead to assert.
Eg. If the command comes for an invalid channel, or
suppose 160 MHZ and the device supports 80 MHZ only
then it can lead to assert.

Fix is to verify the channel and BW info and reject
the command if found invalid.

Change-Id: Iaf9f06f8d4b943bd1e8db5c22ea155a4fe3e61a8
CRs-Fixed: 2572152
2019-12-03 22:48:17 -08:00
Sourav Mohapatra
fab026a99a qcacld-3.0: Send RTT capability for STA mode
Based on the ini gfine_time_meas_cap, send enable/disable value to the
firmware for STA INITIATOR/RESPONDER mode using VDEV set param.

Change-Id: Idd4142e13061cd1af992bda88d0a0b81edc42fef
CRs-Fixed: 2574050
2019-12-03 13:10:29 -08:00
Sourav Mohapatra
b1c97cc483 qcacld-3.0: Change logging priority for offload logs
Currently in the driver, the checks performed before NS and ARP offload
to determine whether they are necessary or not, resulted in prints to
the kernel logs.

Change the above logging level to debug.

Change-Id: Ib039ee51d2763ab2a1340d2a4b17a85c530f68fa
CRs-Fixed: 2578328
2019-12-03 08:05:49 -08:00
Abhinav Kumar
d453c18981 qcacld-3.0: Enable roaming based on conn status in case of STA + STA
In case of STA + STA, If first STA (say STA1) is in connected state
and second STA (say STA2) has multiple candidate APs for connection,
STA2 tries connection with each APs one by one till either
successful a connection or no AP left to initiate connection.

Currently, If STA2 initiate connection with first candidate, and if
it fails, STA2 enables roaming on other interfaces (here STA1)
irrespective of connection status. This results, after connection
failure of STA2 with first AP, STA1 gets permission to start roaming.
So there could be a possibility that STA1 started roaming on VDEV0
and STA2 started connection with next AP on VDEV1 which results in
two VDEV start/re-start at the same time in FW.

Fix is to allow roaming on other interfaces only after if association
is successful or all possible candidates APs are tried by current
interface.

Change-Id: I5b765d5a8ffc10ad2903d746537e41501890ca8b
CRs-Fixed: 2577368
2019-12-03 01:15:00 -08:00
hqu
bcd0a8f349 qcacld-3.0: Clear wlan_reg_freq_to_chan
Clear wlan_reg_freq_to_chan in is_dfs_unsafe_extra_band_chan,
refine unsafe_channel_list for hdd_context to store frequency.

Change-Id: I48a75e053228b202122633a32e750f446f839ea3
CRs-Fixed: 2574028
2019-12-02 12:38:55 -08:00
Sravan Goud
90c34e58ff qcacld-3.0: Avoid 64 bit division for 32bit targets compatibility
In function wlan_hdd_rx_rpm_mark_last_busy math division is performed
on unsingned 64bit integer. This leads to driver load failure on 32
bit machine targets. So avoid the math division for 64bit integer.

Change-Id: I967a0a64b421b47113821e1af5379cdd0125a34d
CRs-Fixed: 2576125
2019-12-01 22:00:50 -08:00
Nirav Shah
fb9b1df409 qcacld-3.0: Add logic to bundle packets for HL
Add logic to queue and bundle packets before
giving it to scheduler to ensure predictive HTC
bundling for improvement in TX throughput.

Change-Id: Ib00135ca59b4c5f0f05edc93dca115bf17174a36
CRs-Fixed: 2561671
2019-12-01 17:40:55 -08:00
Arun Kumar Khandavalli
0c9d5017c3 qcacld-3.0: Initialize the stop bss work in the adapter
In the latest kernels asserts if there is any unitialized work
gets flushed, stop_bss work is presently getting flushed from
multiple places and it is initialized only when there is no
channel to start the sap.

Fix it by intializing the work when the adapter is created.

Change-Id: I232247c2389f865471c7c2175bb93e254b29fc29
CRs-Fixed: 2565974
2019-12-01 17:40:28 -08:00
Subrat Dash
9ba2ff8162 qcacld-3.0: Add support to restart TSF cap when traffic resumes
When the chip is in power save mode, it fails to report valid
TSF in the WMI_VDEV_TSF_REPORT_EVENT_ID. Even the retry may fail.

Fix this by restarting the capture when the Tx/Rx resumes.

Change-Id: Ibd0aa9275583ba40e5f53a11910960351bb76e7d
2019-12-01 17:40:14 -08:00
tinlin
9abd17fe45 qcacld-3.0: Add debugfs for MIB statistics
Define debugfs node in driver to
export MIB counters to user app.

Define macro WLAN_FEATURE_MIB_STATS for this
feature that gets MIB statistics from fw.

Change-Id: Icae8826309094d17e8f6d4503f617a3a7116d3c9
CRs-Fixed: 2548241
2019-12-01 17:39:59 -08:00
Srinivas Dasari
b24bdd3f73 qcacld-3.0: Consider NAN enabling also as connection in progress
There is a race condition while handling the below scenario,
1. NAN enable request is received from framework.
2. Policy mgr opportunistic timer expired and set hw mode
   initiated to Single MAC mode in scheduler thread at
   the same time

As the opportunistic timer handler doesn't have any info if
NAN enable initiated in DBS mode, it's configuring the hw
mode to Single Mac Mode just before NAN enable request is sent
to firmware. So the NAN enable request is sent to firmware in
Single Mac Mode which is not allowed by firmware.

NAN enable/disable is also similar to connection in progress
status in case of STA. So provide NAN enable/disable status
through hdd_is_connection_in_progress() to the opportunistic
timer handler. Opportunistic timer handler restarts the timer as
connection(NAN enable/disable) is in progress.

Also set hw_mode_change_in_progress before checking the
connection progress status. This is to avoid a possible race in
the below scenario,
1. NAN-enable sets the state but scheduler thread had read the
   state just before that
2. NAN-enable read the hw_mode_change_in_progress just
   before it gets set by scheduler thread.

Change-Id: I1a184c84520deb3f6ad1ec010a0fdefda96a5364
CRs-Fixed: 2566841
2019-12-01 17:39:45 -08:00