Commit Graph

4516 Commits

Author SHA1 Message Date
Anish Nataraj
f12b0a3463 qcacmn: Update netdevice stats to reflect ifconfig counters
netdevice_stats structure tx/rx/drop/error counters are assigned
proper values

Change-Id: I8e123a810a02292339a34b54bfebe3a56ae99dbd
2018-03-29 20:14:03 -07:00
Anish Nataraj
0573462cb2 qcacmn: Aggregate peer rssi and rx rate stats
peer rssi and rx rate stats counters aggregated
to vdev/pdev level so that athstats shows proper values

Change-Id: I4d4a28006c30b1f2eba77bbeaddb9723626166db
2018-03-29 20:14:01 -07:00
Venkata krishna Sundararajan
471b552ca5 qcacmn: Add OS abstraction for NSEC_PER_MSEC
Currently code that is os-abstracted is referencing the
Linux-specific macro NSEC_PER_MSEC which violates the software
architecture. Introduce a new QDF macro to os-abstract this
Linux-specific macro.

CRs-Fixed: 2210748
Change-Id: I519773f2fd2a7227a285cf3832a758005a0f3900
2018-03-29 18:57:34 -07:00
Venkata krishna Sundararajan
e456cb8400 qcacmn: Add qdf wrapper for ktime, hrtimer related APIs
Add qdf wrapper for ktime, hrtimer related functions
and abstracts in qdf layer. The  wifi driver use the
qdf wrappers for the above APIs.

ktime APIs:
=========
ktime_to_ms
ktime_set
ktime_to_ns
ktime_add_ns
ktime_get
ktime_add
ns_to_ktime

hrtimer APIs:
=====
hrtimer_forward
hrtimer_active
hrtimer_callback_running
hrtimer_cancel
hrtimer_is_queued
hrtimer_get_remaining
tasklet_hrtimer_init
tasklet_hrtimer_cancel

CRs-Fixed: 2138717
Change-Id: Ic4655d6b342f2121a5acc9b1c6bda7aabd154f8f
2018-03-29 18:57:32 -07:00
Sandeep Puligilla
87bcfb4b86 qcacmn: Deprecate enum wmi_dwelltime_adaptive_mode
Deprecate enum wmi_dwelltime_adaptive_mode and use enum
scan_dwelltime_adaptive_mode defined in scan component.

Change-Id: I9c33b852172d9208fb8440c6dc71a12aefd717da
CRs-Fixed: 2213074
2018-03-29 18:57:29 -07:00
Kiran Venkatappa
99556ec2cc qcacmn: WMI interface changes to configure TWT
Add WMI interface changes required to configure TWT

Change-Id: I307f65f8049caf8365fb496fd69f91600ddbd832
CRs-Fixed: 2212556
2018-03-29 13:16:14 -07:00
Srinivas Pitla
6c56b09a43 qcacmn: Define list iterate API without ref count protection
In few cases, ref count mechanism is not able to protect access of
all objects, and if ref count is taken without considering object state,
it is causing double free. so, defined an API which protects list through
locks and accesses all objects.

As the current ref count increment API do not check for ref count value to
increment. This is causing object being accessed and ref count taken during
physical destroy leads to double free on releasing ref count

Change-Id: Iff140c581984bf660a48c2b927c4ac2933afa822
CRs-Fixed: 2200871
2018-03-29 06:57:57 -07:00
Edayilliam Jayadev
2703fafbe2 qcacmn: Use new phymode for vht in 2G
Today for VHT in 2G, we are sending WMI_HOST_MODE_11NG_HT20/40
as phymode values to FW. Change this to WMI_HOST_MODE_11AC_VHT40/20_2G
which are dedicated phymodes defined for VHT operation in 2G.
This change is applicable only for tlv based chipsets.

CRs-Fixed: 2205265
Change-Id: I9482bfd1834285a21b5a45b6c039a13e9cd80479
2018-03-29 06:57:55 -07:00
Jeff Johnson
b311d8e273 qcacmn: Remove WLAN_SER_CMD_SCAN_IDLE_SCAN
enum WLAN_SER_CMD_SCAN_IDLE_SCAN is unused, so remove it.

Change-Id: I32acf848448ab3a739099e7446cd82c401aa11c9
CRs-Fixed: 2212931
2018-03-28 20:01:49 -07:00
Gurumoorthi Gnanasambandhan
8387311409 qcacmn: Handle invalid peer after deauth
Receiving HAL_RXDMA_ERR_UNENCRYPTED instead
of REO null desc exception for invalid peer.
Handle invalid peer in HAL_RXDMA_ERR_UNENCRYPTED
path also.

Change-Id: Ibb01ab7f23648bca15c86553ec53afa5fb181ad6
2018-03-28 20:01:46 -07:00
Gyanranjan Hazarika
2c57b8d8ee qcacmn: WMI support to set autorate HE GI LTF combinations
WMI_VDEV_PARAM_AUTORATE_MISC_CFG is introduced to set
HE GI LTF combinations in case of autorate adaptation.
Add support for the same in host side wmi files.

Change-Id: Idf567d771539b17e669ddab8b85092e3cbf9d3c8
CRs-fixed: 2204393
2018-03-28 20:01:44 -07:00
Will Huang
fb82d53055 qcacmn: Add pdev NULL check in reg_set_country
reg_set_country may be called by hdd_reg_notifier, which is running
in a context of worker create outside driver, it may be scheduled to
run during driver unloading process which set hdd_ctx->hdd_pdev to 0.

Change-Id: Ie51d772294302ad6b04117847c28a556694e9bca
CRs-Fixed: 2208085
2018-03-28 14:44:39 -07:00
Alok Kumar
f1d9fe23cf qcacmn: Enable support for Tx OTA Ack stats
Retrieve Tx OTA stats through cdp api.

Change-Id: I4bff475e4f3364fef181b4c52022a145a879a4c4
CRs-Fixed: 2211900
2018-03-28 14:44:37 -07:00
wadesong
87f18a3869 qcacmn: Suppress the verbose log from policy mgr
When DBS is disabled in WLAN INI file(e.g. on some platforms
where RM chipset is attached), the policy manager will keep
posting a verbose message saying 'DBS is disabled from ini'.
This isn't exhibiting much useful information, and may cause
watchdog bark when SnS stress is running.

Suppress the verbose log by lowering it's debug level.

Change-Id: Ie8d5a1784940f483cc671da43f734851c0b5adb6
CRs-Fixed: 2214201
2018-03-28 14:44:34 -07:00
Sandeep Puligilla
e062e82352 qcacmn: Never ageout connected AP scan entry
Connected AP scan entry is aged out if beacon
is not recieved within scan age out time.

Update mlme information of the connected AP/BSSID
scan entry so that scan age out hanlder will not
age it out even though the last beacon recieved
time is greater than the configured scan age out value.

Change-Id: I14c68c28459080623ca62c0bad9052e38d7fb348
CRs-Fixed: 2183379
2018-03-28 06:26:51 -07:00
Chaithanya Garrepalli
8e5e2f86c4 qcacmn: Fix for the rx_desc leak
In dp_rx_get_free_desc_list() corrected the
return value in case when the number of requested
rx_desc are not available in the pool

Change-Id: I3de026726e885b8fe707f7c7318cc1936be73e65
CRs-Fixed: 2202247
2018-03-28 06:26:42 -07:00
Vivek
24f704eefc qcacmn: Explicit cast for boundary checks for unsigned cfg items
The meta table containing the min and max values for
any cfg item is of type int32_t. This is used to do boundary
checks for unsigned int cfg items whose max:
possible value will be higher.

Type cast the signed int min, max meta data to unsigned int
before we do the boundary checks.

Change-Id: I18a3047a3afa78864c76b813ca93f5b82f2274a7
CRs-Fixed: 2213359
2018-03-28 02:13:57 -07:00
Srinivas Pitla
9578a90c65 qcacmn: Acquire pdev lock on updating pdev peer count
The pdev peer count needs to be updated with pdev lock, as multiple peers
can be created same time, which can result in synchronization issues
without lock

Change-Id: Ic8164585873f32a801dd9a334f861d6666b9864f
CRs-Fixed: 2203011
2018-03-27 17:33:39 -07:00
Shashikala Prabhu
ae49c692cd qcacmn: Set half/quarter rate flags in the scan channel list
Set half/quarter rate flags in the scan channel list and send it to FW.

Change-Id: Ia63a1f360337bdb4ba054892c0c3dfe773b97f11
CRs-Fixed: 2212700
2018-03-27 13:53:13 -07:00
Dustin Brown
8949120a26 qcacmn: Avoid QDF_BUG logs when panic is disabled
QDF_BUG panics the system when an assertion fails and PANIC_ON_BUG is
enabled in the build config. It also prints an error message regardless
of if PANIC_ON_BUG is enabled or not. However, these prints are not of
much value when situations where PANIC_ON_BUG is disabled. When
PANIC_ON_BUG is disabled, avoid printing any logs.

Change-Id: I456ebce4d45d533d512402cd37d22e4ba1ae2cde
CRs-Fixed: 2211960
2018-03-27 13:53:10 -07:00
Prathyusha Guduri
668c22c96b qcacmn: Fix BW mapping on host and add Tx nss stat
Stats counters for BW were not printed correctly due to difference in
mapping of BW on host and FW.

Also added Tx NSS stats during aggregate vdev stats

Change-Id: I348a5f9f974544ffe17ba403cd64769eff05c9b5
CRs-Fixed: 2203582
2018-03-27 05:47:40 -07:00
Bala Venkatesh
2438a563c5 qcacmn: Add ENABLE_DBS_CXN_AND_DISABLE_DBS_SCAN
Add ENABLE_DBS_CXN_AND_DISABLE_DBS_SCAN option for the ini
gDualMacFeatureDisable. To enable DBS support for the
connection and disable DBS support for the scan.

Change-Id: I05c613467195fffac98e79b7e4a2991471ac1d80
CRs-Fixed: 2207820
2018-03-27 00:25:38 -07:00
Paul Zhang
b10508a903 qcacmn: Add regulatory update-25 to reg db
Add Regdomains: ETSI12, ETSI13, FCC5
Add Regdomain pairs: ETSI12_WORLD, ETSI13_WORLD
Change all Europe countries to ETSI13_World in the
LA country-to-RD mapping.

Change-Id: I4fb31fbd852994c6bcda5e6379de2f3df5aa8d4e
CRs-Fixed: 2182451
2018-03-26 22:10:43 -07:00
psimha
65180eceac qcacmn: Fix SW desc leak in defrag path
Free SW desc in failure paths of rx defragmentation.

Change-Id: I9d24c0db238cab0e330c710b6328a347b6c07590
CRs-Fixed: 2208292
2018-03-26 18:55:33 -07:00
Mahesh Kumar Kalikot Veetil
fe276b3bc7 qcacmn: Fix qdf_get_monotonic_boottime_ns()
Fix the API implementation to account for time spent in system
suspend. This matches with API qdf_get_monotonic_boottime()
implementation.

Change-Id: I4bf8980bfc4500c035e8de7df4d8a18dfc6775ae
CRs-Fixed: 2211953
2018-03-26 16:32:28 -07:00
Om Prakash Tripathi
581297b4d9 qcacmn: Fix null pointer dereference in scan
Make sure passed pointer is non null before accessing it.

Change-Id: I62fd051f13265070954d1e6ae7d9e9ea7efe3ba3
CRs-Fixed: 2212629
2018-03-26 16:32:26 -07:00
Vivek
2b109825ac qcacmn: Replace A_UINT with appropriate types
There are instances of use of older A_UINT/A_INT.
Replace all such instances with the qdf u_int*_t/int*_t.

Change-Id: I7ce29b03f29a0d1a0cf87cfd3c846f4694da4c2a
CR's-Fixed: 2210869
2018-03-26 04:58:12 -07:00
gaurank kathpalia
74f2a30e7d qcacmn: Modify dwell time and DBS scan based on scan request
Based on the scan request flags from kernel, modify the
adaptive dwell time and DBS scan request policy.
In high accuracy mode, disable DBS scan and adaptive dwell
time scan mode.
In a low power/span mode, enable aggressive adaptive dwell time
and DBS scan to save power and time.

Change-Id: I23498799c05a252cbc9c9f6d50b847130dd0ceac
CRs-Fixed: 2197171
2018-03-24 02:51:22 -07:00
sumedh baikady
668d8679ff qcacmn: Fix minor pn_size init and index check
1. In hal reo setup initialize pn_size to avoid uninitialization
in default case.
2. In hal validate shadow register function, fix the check
for index as shadow_config array can take 0 to 35 as index values.

Change-Id: I8b729dc70053e333ef659ba38fb0c2f66cd8b35a
CRs-fixed: 2208799
2018-03-23 21:38:54 -07:00
Arif Hussain
6fcc790e98 qcacmn: Add correct api call to get proper boot time
Propagation from qcacld-2.0 to qcacmn
Missing changes from Ibcc628c315201fa3ced7e1ad96753772d91707b2

Currently to get clock boottime, qdf_get_monotonic_boottime_ns
api is getting used which does not include the suspend time.
To include the system suspend time also in clock boottime, use
qdf_get_bootbased_boottime_ns api which uses ktime_get_boot_ns
kernel api.

Change-Id: I4a9a783ce0cc164404d89c23d57b02746154aa46
CRs-Fixed: 2203527
2018-03-23 21:38:52 -07:00
Santosh Anbu
929e1e9760 qcacmn: Send WMI cmd only on completion of wmi_init
Call WMI cmd to set btcoex only on successful completion of WMI init.

Change-Id: Ifd911f7729fd47f6ff2ad1c3e8b16f53db5689e4
CRs-Fixed: 2208266
2018-03-23 09:56:03 -07:00
Soumya Bhat
33a8822118 qcacmn: Fix use after free for vdev
In existing code vdev is getting referenced after being
freed, during pdev detach while releasing tx descriptors.

Add code to drain tx descriptiors during vdev detach.

Change-Id: I2ea447d5d0a5be6539fddacb4b1c0b5f4601a71e
CRs-Fixed: 2203070
2018-03-23 07:20:04 -07:00
Vivek
077f9c27fc qcacmn: Enable QDF parsing and file read functionalities
Enable the QDF parse and file reading functionalities in
Kbuild of QDF for using INI CFG component.

Change-Id: Ia6763d75e81d8b35da50fb08365fb5c2498d7b0a
CR's Fixed: 2148694
2018-03-23 07:20:02 -07:00
chenguo
07e2404dd9 qcacmn: Add reaping RXDMA status ring for 2.4GHz MAC for PKTLOG
Traffic will hang during PKTLOG operations for 2.4GHz Mac. The reason
is that Reaping operation is missed for RXDMPA status ring for MAC1.

Add reaping MAC1 along with MAC0 for 2.4GHz band during PKTLOG
operations in mission mode.

CRs-Fixed: 2198593
Change-Id: I8591c6cd85d7970c2d0835e18dbfd74d2aaae08e
2018-03-23 04:37:41 -07:00
Abhijit Pradhan
ed8c9d3bc8 qcacmn: Have separate macros for DA/PO/FO to reduce the code size
Since, an AP may have any combinations of DA,PO, and FO chips on it,
having support for all chips always is redundant. Therefore, enable the
chip specific code as and when required.
DA:- Direct attach
PO:- Partial offload
FO:- Full offload
WLAN_DFS_DIRECT_ATTACH    :- enable/disable DA specific DFS code.
WLAN_DFS_PARTIAL_OFFLOAD  :- enable/disable PO specific DFS code.
WLAN_DFS_FULL_OFFLOAD     :- enable/disable FO specific DFS code.

Change-Id: I498ac1f8cd1d6423032d7b3b8c233656c5f0bf22
CRs-Fixed: 2199819
2018-03-23 03:18:32 -07:00
Shiva Krishna Pittala
d75cdc199e qcacmn: Fix Spectral KW issues
Add null pointer checks in Spectral component

Change-Id: I42eb678f2d90d38c3c8afee8c010970783e66f52
CRs-Fixed: 2206406
2018-03-23 03:18:30 -07:00
Abhiram Jogadenu
27d55ecd7d qcacmn: Add support for PPDU ACK timestamp
Make Ack timestamp same as PPDU END timestamp

Change-Id: I4030f461ed19d46e176819168ceca735c7c63f9f
2018-03-21 22:42:50 -07:00
Chaithanya Garrepalli
a4ea3a95ef qcacmn: remove addtional checks in __dp_peer_find_by_id
Remove checks which are not needed from __dp_peer_find_by_id

Change-Id: I31e660ef8af070cd6e3f7a892ffd9cc05ec21712
2018-03-21 22:42:48 -07:00
Bala Venkatesh
ee82634a98 qcacmn: Remove macro WMI_DEBUG_ALWAYS
Remove WMI_DEBUG_ALWAYS macro as part of clean up
unused macros.

Change-Id: I46e16b532e56a7015ac1c9643edbf0626bc0611e
CRs-Fixed: 2200010
2018-03-21 22:42:46 -07:00
Sravan Kumar Kairam
ea66b6843b qcacmn: Modify WMI cmd to point to IPA CLD component
IPA module has been moved to CLD component under the converged
driver model. Point the wmi API's and structures to the newly
defined files.

Change-Id: I96205f7cc18dbea1c05a5f6314490ea6b3dd75fd
CRs-Fixed: 2180176
2018-03-21 18:57:49 -07:00
Venkata Sharath Chandra Manchala
8ec45bbd33 qcacmn: Propagate reception type parameter
Propagate reception type data captured at peer level
to pdev level

Change-Id: Ie57ee07d6deccbf4aa5259d9e30bd1437fb304ee
CRs-Fixed: 2207518
2018-03-21 18:57:46 -07:00
Amar Singhal
0894f015d8 qcacmn: Use the right index while accessing ipv6 array
Zero comp value if changed; would be 1 to 8. When accessing
ipv6 array, the access can go out of bounds if value is 8 since
the bytes array is of size 16 (0 to 15). Fix that.

Change-Id: I38eb1d3be2840bfbb5fdc9c72606ce51e29cb0ce
CRs-Fixed: 2196076
2018-03-21 17:27:51 -07:00
Rajeev Kumar
19735e75ce qcacmn: Rate limit CE access log to avoid watchdog bark
Rate limit CE access log to avoid watch dog bark because of
excessive console logging.

Change-Id: I460a39f02206f651eafc26febd5628766e471483
CRs-Fixed: 2207647
2018-03-21 15:29:48 -07:00
Dustin Brown
f74576cb84 qcacmn: Add TX credits after WMI logging
While processing a host-to-target credit report, the number of available
credits is incremented before recording the credit report event in the
WMI history log. This can lead to tricky debug scenarios where there is
an available credit, but the WMI history log does not show that a credit
report has been processed. In htc_process_credit_rpt, log the credit
report in the WMI history log before incrementing the available credits
field.

Change-Id: Id8632c85348bec38b6c46549a68f613d102b2ae5
CRs-Fixed: 2204248
2018-03-21 13:52:19 -07:00
Neil Zhao
6b6bf629d2 qcacmn: Fix The beaconing functionality of Mesh vap fails
Enable mesh vap beaconing ioctl is sent via
vdev setting WMI cmd for WMI_VDEV_PARAM_CAPABILITIES.
But the vdev_param array for tlv is not populated.

Change-Id: Icefd3a506baf3459b95cdc31bd447f80068954df
CRs-Fixed: 2141343
2018-03-21 13:52:17 -07:00
Santosh Anbu
efe6c5a884 qcacmn: Increase log level of HIF module
Increase log level of HIF module to ERROR so as to print the CE Ids
when dumping the CE registers as part of target failure handler.

Change-Id: I278f836590cd717c7bdeaf414023aeb646f9da2f
CRs-Fixed: 2205508
2018-03-21 05:57:50 -07:00
Sravan Kumar Kairam
376e5f1e3f qcacmn: Add IPA component related definitions
As part of IPA componentization remove IPA from HDD module
and make it as an independent component. Add qdf module ID
and Objmgr ID for IPA module.

Change-Id: Id99089f8188e8b1dbf7e1f60d3a127bec770706d
CRs-Fixed: 2180176
2018-03-21 03:39:37 -07:00
Nandha Kishore Easwaran
ac0b96edf9 qcacmn: Add Pktlog service msg in ce config
Add pktlog service message for CE5 in CE configuration.

Change-Id: I49dddd11ca1805a9f519b881d573e8ff4b7ffeb2
CRs-fixed: 2209371
2018-03-21 03:39:35 -07:00
Amir Patel
2b2435e564 qcacmn: Avoid memory use after free in scan node delete
Scan node del API is modified to check refcnt before
deleting node. Mark node delete with scan node del before
releasing ref to avoid get ref

Change-Id: I1cde576cd47eb4effe8af38c2d77f02a21349dfb
CRs-Fixed: 2208987
2018-03-21 03:39:33 -07:00
Om Prakash Tripathi
8a54599b3a qcacmn: put bss reference taken in cfg80211_inform_bss_frame
cfg80211_inform_bss_frame_data() takes an extra reference of
bss and it shall be freed by caller.

Change-Id: I6e2a37327fc369d01d237e7ff57221333709b53f
CRs-Fixed: 2205608
2018-03-21 03:39:31 -07:00