Commit Graph

4398 Commits

Author SHA1 Message Date
Rajeev Kumar
e7abced1a1 qcacmn: Register fw down legacy callback with QDF
Register fw down legacy callback with QDF such that new UMAC
components can call QDF API to check if fw is down or not.

Change-Id: I8d68cb7625fd75aa90ba09adfe13955c5418b54f
CRs-Fixed: 2202605
2018-03-12 15:06:24 -07:00
Anish Nataraj
b9e7d01e52 qcacmn: Add linked list logic to store per ppdu descriptor status tlv
Add linked list logic to hold all ppdu descriptor status in a list till
all TLVs have been processed
This design handles asynchronous arrival of tlvs from fw per ppdu

Change-Id: Ib8943d7c826c0b441f58f0eaba7ae0bdc0539d9a
2018-03-12 14:14:06 -07:00
jitiphil
301a242a31 qcacmn: Fix potential buffer overflow dp_rx_defrag_waitlist_flush
Currently variable "tid" is from message, which is used
directly as array size which causes buffer over-write.

To address this issue add check for the array size.

Change-Id: I61ffaef69d97936774d89ee4e745ab509d77adb5
CRs-Fixed: 2200862
2018-03-12 11:40:35 -07:00
Jeff Johnson
3051831c3e qcacmn: Introduce new versions of TDLS peer callbacks
The parameters to function typedef tdls_register_tl_peer_callback()
currently includes ucastsig.  This "unicast signature" parameter dates
back to a previous version of the driver that used signatures to
synchronize the data plane with the control plane. However the current
version of the driver does not use this mechanism, so there is a
desire to remove this parameter from the callback.

In addition both typedef tdls_register_tl_peer_callback() and typedef
tdls_deregister_tl_peer_callback() suffer from poor naming since the
"_tl_" in the names refers to a datapath component that was present in
an older version of the driver but which is no longer present.

Therefore introduce a new version of these typedefs with better naming
and which removes the ucastsig parameter.

Use temporary conditional compilation to allow support for both the
old and new interfaces until such time as all registrants have
converted to the new interfaces. This is part of the plan to
completely remove the obsolete unicast and broadcast signatures from
throughout the driver.

Change-Id: Id4ea23266b0f3e1480b645c5afce6c17585ccb46
CRs-Fixed: 2200931
2018-03-12 09:35:32 -07:00
phadiman
a2f544f294 qcacmn: Fix incorrect return type & variable access
Initialize the unintialized variables, fix return
types and fix typo errors (access map_status instead
of status)

CRs Fixed: 2200034

Change-Id: I02c5f989f1c41da07eabd165c3f45a44007b928d
2018-03-12 05:15:23 -07:00
Nirav Shah
d9dce6e18c qcacmn: [HIF] Add support for QCA9379 on x86 platform
Add support for QCA9379 chip on x86 platform for
USB and SDIO attach.

Change-Id: I1192e47f6ca186bbcaa6d1fb28d40cb16d6dfe0b
CRs-Fixed: 2181012
2018-03-12 04:15:00 -07:00
Abhijit Pradhan
93caac752f qcacmn: Fix DFS NOL KW issues
Initialize the timer object to zero before using it.

Change-Id: I54ccb203bc096a382f670738e7e3f18d2aa69c8e
CRs-Fixed: 2202873
2018-03-09 16:31:13 -08:00
Srinivas Pitla
ceae543cff qcacmn: Change object manager trace level to ERROR
Change object manager trace level to ERROR, move few
debug prints to obj_mgr_warn

Change-Id: Idc8943badb524c52694df18b035c9fc91c097e3a
CRs-Fixed: 2195292
2018-03-09 16:31:11 -08:00
Dustin Brown
3149adf58a qcacmn: Migrate scheduler logging functions
Part of the scheduler component has been migrated to the new sched_*
logging wrappers, but part of it still remains to be ported. Finish
migrating all of the scheduler logging APIs.

Change-Id: I5065d849a1523d6c27d6c6a27b1ad4605036c3e6
CRs-Fixed: 2201038
2018-03-09 13:39:51 -08:00
Subrat Mishra
2a06b23e82 qcacmn: Change ATF default trace level
Change ATF module default trace level from NONE to ERROR

Change-Id: I7dc47968db72329ffc99f466f0db51110ac02d64
CRs-Fixed: 2201834
2018-03-09 09:35:50 -08:00
Pratik Gandhi
7846150f2b qcacmn: Fix compilation issues for FW header abstraction
fwhdr_abstrct: Fix compilation issues for WIN firmware header abstraction.

Change-Id: Id76a6f29fd41ae559cf377029428224d59bd03fb
CRs-Fixed: 2140921
2018-03-09 07:28:50 -08:00
Soumya Bhat
2f54de20b0 qcacmn: Enable promiscuous mode for M-copy feature
In existing code M-copy feature was designed to provide
first 100bytes of payload of self BSS packets.

Add change to enable promiscusous mode and provide metadata and
100bytes of payload of all the packets received by the radio.

Change-Id: I5b1f168028a4fba3a24e9d2ccd0d68c246661d76
2018-03-09 02:03:10 -08:00
Dustin Brown
1723d45ad2 qcacmn: Don't inline QDF_DEBUG_PANIC for debug builds
Calling panic can cause a compiler to assume any subsequent code is
unreachable. Because these panics may or may not be enabled by the
build configuration, this can cause developers some pain. Consider:

	bool bit;

	if (ptr)
		bit = ptr->returns_bool();
	else
		panic();

	// do stuff with @bit

	return bit;

In this case, @bit is potentially uninitialized when we return!
However, the compiler can correctly assume this case is impossible when
PANIC_ON_BUG is enabled. Because developers typically enable this
feature, the "maybe uninitialized" warning will not be emitted, and the
issue remains uncaught until someone tries to make a build without
PANIC_ON_BUG.

A simple workaround, is to put the definition of QDF_DEBUG_PANIC in
another compilation unit, which prevents the compiler from assuming
subsequent code is unreachable. For CONFIG_SLUB_DEBUG, do this to
catch issues earlier. Otherwise, use the typical inlined approach.

Change-Id: I8901fd33781ccb8229fad16343a5b08d97cdcf68
CRs-Fixed: 2202527
2018-03-09 00:10:40 -08:00
Arif Hussain
c5da01ead0 qcacmn: Implement extract_comb/single_phyerr for tlv
Implement extract_comb_phyerr and extract_single_phyerr for tlv.

Change-Id: Id65809cdd05f11e39d8f5a88a3f47632e9a92b04
CRs-Fixed: 2196835
2018-03-08 22:06:14 -08:00
Venkata Sharath Chandra Manchala
ac863c4b4d qcacmn: Set the pdev mask based on channel id
Set pdev mask in HTT extension stats msg based
on channel id information.

Change-Id: I7c971494049e16ae8e0eb694984857346c3a38b7
CRs-Fixed: 2185219
2018-03-08 22:06:11 -08:00
Pamidipati, Vijay
ef2cbc6c93 qcacmn: Change default DSCP-TID mapping table to use all TIDs
Change default DSCP-TID mapping table so that all possible TID
values can be used in transmit datapath.
Also propagate a fix from legacy Tx classification code required
to compute the offset of L3 header pointer correctly

Change-Id: Ia6426817410e67018491c0f4a8122bfae7a1cfe2
CRs-Fixed: 2197640
2018-03-08 18:47:19 -08:00
Rachit Kankane
1bc1149747 qcacmn: Add HTC Credit History Feature flag
Add compilation flag to compile out HTC credit History
feature cleanly from the cld-3.2 driver binary

Change-Id: I615f0e4d6de150924b99b3444cebf00571ddc088
CRs-Fixed: 2190546
2018-03-08 18:47:17 -08:00
Nandha Kishore Easwaran
56c28c0cd1 qcacmn: Assign lmac id on tx packet enqueue
On napier AX, HK2.0 ast search is tied to lmac_id.
This ast search feature is added to support DBDC repeater usecase.
Assign lmac id 3 to search by default on all macs until more
formal per pdev changes are made. This enables 2g.

Change-Id: Ia06d9243bddd3f4943426d6b0de3f452a252d819
CRs-fixed: 2198431
2018-03-08 18:47:14 -08:00
Himanshu Agarwal
cfcb8b4de0 qcacmn: Add NULL check for wmi_hdl before use
GET_WMI_HDL_FROM_PDEV() returns wmi_hdl to the caller of the
func. In some Green AP functions, wmi_hdl is passed directly
to WMI functions without any NULL check that could lead to
NULL pointer dereference.

Add NULL check for wmi_hdl before use in Green AP functions.

Change-Id: Id6222ce30d66b660008c1a4ad1b5020235d5b351
CRs-Fixed: 2196071
2018-03-08 18:47:11 -08:00
Will Huang
cdee9f80d2 qcacmn: Free ROC context if p2p_scan_abort failed
It is possible that call p2p_scan_abort fail while cleanup roc queue,
because vdev already been destroyed when unloading driver. In this case,
even the scan complete event will be discarded, so ROC context include
ROC timer has no chance to free.

Free ROC context include ROC timer in p2p_scan_abort failure path and
set cancel_roc_done event to avoid unneeded waiting while unloading.

CRs-Fixed: 2187778
Change-Id: I43751dca0c480e811c15de35ee28bc9426ac3764
2018-03-08 18:47:09 -08:00
Soumya Bhat
f204aa825e qcacmn: Allocate heap memory instead of stack for print buffers
Existing code is allocating array of 500 bytes and providing it
to snprintf to store formatted array. This might lead to stack
overflow.

Add change to allocate memory from heap instead, in all such instance.

Change-Id: Ifaecebd60346d8a04c5facf3d1d446b420eb8c54
2018-03-08 18:47:05 -08:00
Yun Park
47e6af8c98 qcacmn: Don't set up second Rx refill ring for WIN
Set up second Rx refill ring only when IPA offload is enabled.

Change-Id: Icc8c4e2eb42dced3ae9293f33b6446b14093da0f
CRs-Fixed: 2160070
2018-03-07 17:28:59 -08:00
Arif Hussain
77ba8f42ca qcacmn: Fix possible null pointer de-references in DFS
Add null check to avoid null pointer de-references.

Change-Id: I3d6f6b182669ae4925ed85be2403bb0c18faeff5
CRs-Fixed: 2196070
2018-03-07 16:28:07 -08:00
Arif Hussain
c713727406 qcacmn: Fix possible null pointer de-references in FTM
Add null check to avoid null pointer de-references.

Change-Id: I99d01e5f543cffdace8aa07f709265f0eb5d7ed9
CRs-Fixed: 2196070
2018-03-07 16:28:04 -08:00
Sravan Kumar Kairam
03e69b3098 qcacmn: Translate QDF pending status to Linux error
Translate QDF pending status to Linux error in progress
code.

Change-Id: I3a8d9d17cb4b72cdfbb6d1f1c5adecd1679fe816
CRs-Fixed: 2200900
2018-03-07 16:28:02 -08:00
Nirav Shah
0d0cce8057 qcacmn: Featurize EPPING Feature
Featurize EPPING Feature to compile
out in mission mode.

Change-Id: Iecbab88961034a5e5d2ab73b5b577e52cdb17873
CRs-Fixed: 2198847
2018-03-07 03:55:50 -08:00
Poddar, Siddarth
697449805e qcacmn: Add new attibutes to NUD vendor subcommand
Add new attributes to vendor subcmd
QCA_NL80211_VENDOR_SUBCMD_NUD_STATS_SET.
This carry the requisite information to
start / stop the connectivity stats collection.

CRs-Fixed: 2168412
Change-Id: Ie8a60754780433f40ed4d103b737c5e8d4e59c28
2018-03-07 03:55:48 -08:00
Poddar, Siddarth
a9172bf24d qcacmn: Add APIs to get data packets info
Add APIs to get TCP syn/syn-ack/ack packets,
TCP src/dst port, DNS domain name/query/response,
ICMPv4 req/res, and ICMPv4 src/tgt ip information.

Change-Id: I1e4e92997a33e64fe2e4ae28a05b54b6ba5e8cff
CRs-Fixed: 2168412
2018-03-07 03:55:46 -08:00
Poddar, Siddarth
a7bed4f56d qcacmn: Extend wmi interface command to support other connectivity stats
Extend wmi interface command to support other
connectivity check stats(ICMPv4 and tcp).

Change-Id: I881aaeab6e3e1f36b7153630b87a07019660d896
CRs-Fixed: 2168412
2018-03-07 03:55:37 -08:00
Rachit Kankane
c50c2280ff qcacmn: Compile out WMI logging feature
Fix to compile cleanly when WMI_INTERFACE_EVENT_LOGGING
feature is disabled.

Change-Id: I1c7d687e685b8b2dcdb35667c425afc3d09c73da
CRs-Fixed: 2192125
2018-03-06 23:45:19 -08:00
Tushnim Bhattacharyya
8ede0d39ac qcacmn: Remove redundant DBS HW mode request
Remove redundant DBS HW mode request from
pm_next_action_two_connection_dbs_2x2_table. For 2x2 DBS HW even for first
connection if it is on 2.4G, DBS will get requested. Hence no need to
request again for second connection on the other band.

Change-Id: I17db8de5ed7a60f556cc8eeed59bbbfe0d63e795
CRs-Fixed: 2199420
2018-03-06 20:10:15 -08:00
Rajeev Kumar
83953b769c qcacmn: Change return type of fw down callback from void to bool
Change the signature of QDF FW down callback API to return bool
instead of void. Return type true indicates fw is down and return
type false indicates fw is not down.

Change-Id: I2be6f14e5fbdb7b24ccd604244e1314a8f127291
CRs-Fixed: 2196217
2018-03-06 20:10:14 -08:00
Yeshwanth Sriram Guntuka
64de344cd7 qcacmn: Add vendor command to get HW mode info
Add vendor command that provides the current
information of WLAN hardware MAC and its
associated WLAN netdev interfaces.

Change-Id: I70ffbdf44ddc45fe606d0ad6e69f1b284cffc6fe
CRs-Fixed: 2194757
2018-03-06 19:11:48 -08:00
Shiva Krishna Pittala
a143f83a27 qcacmn: Add Netlink deinit functionality in Spectral
Define os_if_spectral_netlink_deinit to close the Spectral socket and
de-register the os_if callbacks

Change-Id: I3d054c2a2d630d4d959861d3620592010d04c09a
CRs-Fixed: 2186113
2018-03-06 03:53:47 -08:00
Rajeev Kumar Sirasanagandla
448e07a99e qcacmn: Fix integer underflow and buffer over-read in fwlog
Currently, there is no check of:
1) Firmware event parameters in dbglog_parse_debug_logs(), which can
result in integer underflow.
2) Number of dbg log args against the total length, which can result in
buffer over-read.

To fix this, compare size of firmware event parameters and number of
dbg log args with total buffer length.

Change-Id: I7fbc684ec9e80cfc66220755a1ad6b9394194735
CRs-Fixed: 2197246
2018-03-06 03:53:44 -08:00
Abhishek Singh
deeaf6e9b2 qcacmn: Add logic to negotiate the auth and enc type depending on AP
In testbed sta mode the RSNE enc type and auth type may not match the
AP's enc type and auth type and thus the scan filter is unable to match
and find the AP.

Introduce auth and enc type as "ANY" in scan filter. With the auth
and enc type set as ANY, all the AP's matching the BSSID and SSID
will be filtered and the negotiated auth and enc type will be
dependent on AP's auth and enc type.

Change-Id: I82f07f68d9ec6c6f2104122a05d06a698c61a50a
CRs-Fixed: 2197222
2018-03-06 01:51:30 -08:00
gaurank kathpalia
1e6e00f350 qcacmn: Remove 11ax IE length checks
With IE length sanity check, that involved by Change-Id I9a091486,
11ax AP cant be found due to the addition of +1 byte in HE-operation
IE in latest spec of 11ax (D2.2).

Remove all 11ax extended capability IE length checks for now due to
11ax being under development.

Change-Id: I45d676325c72c8e0020ca52d094fb1652f8fcaf2
CRs-Fixed: 2197252
2018-03-05 23:33:35 -08:00
Mukul Sharma
c42f0c13b7 qcacmn: Disable indoor channel on sap start
There are scenario where indoor channel operations
(like  active / passive scan/connect/roam etc)
are not desired / permitted specially in sap case.
Hence add support of disabling indoor channel
on sap start and revert it on sap stop.

Change-Id: Id6e01534532e3076a3e662e6a4f71e8be924165a
CRs-fixed: 2161319
2018-03-05 22:33:53 -08:00
Kiran Kumar Lokere
42398afc08 qcacmn: Add vendor attribute to configure addba and noack
Add vendor wifi test config command attribute to send
addba request with user configuration and to set the
no ack policy.

Change-Id: I2afd62478961a774d16becba49889e855ecf7415
CRs-Fixed: 2196977
2018-03-05 21:43:58 -08:00
Kiran Kumar Lokere
2a450cc1c3 qcacmn: Add vendor attribute to configure WEP/TKIP in HE
Add vendor wifi test config command attribue to force
WEP/TKIP in HE mode.

Change-Id: Iaa00b296b7bcadf355eeddfa837f82a68d1c7b35
CRs-Fixed: 2196977
2018-03-05 21:43:55 -08:00
Neil Zhao
0bd967d021 qcacmn: fix mon vap RX skb size issues
1) for raw mode, drop frames with invalid size
2) for non-raw mode, fixed issue that
frag list data_len's not properly calculated

The length issues will introduce kernel issues
during skb_linearize() at upper OS network stack layer.

Symptoms:
1)
WARNING: at net/core/skbuff.c:1782
PC is at skb_copy_bits+0x1b8/0x230

2)
kernel BU at net/core/skbuff.c:1615!
PC is at __pskb_pull_tail+0x70/0x2e4

CRs-fixed: 2188754

Change-Id: I848ec976cd922708ffd02d8272ea5a6f3bce2a00
2018-03-05 11:11:41 -08:00
Vinay Adella
4ca1bf63ba qcacmn: Flush peer entries, if target is in reset state
Free all references held due to missing unmap command
from the Target

CRs-Fixed: 2185830
Change-Id: Ied4c3fc9f694c32ad0a283942eebb64430082d70
2018-03-05 04:28:24 -08:00
Vinay Adella
2a6bd8a5f9 qcacmn: Don't send message to FW when in reset state
Fix a memory leak in the cnss layer, where the packet
used to send the disable command never gets freed.

CRs-Fixed: 2185830
Change-Id: I8118baf2397bf6440177d3fe92d34a537c29df8b
2018-03-05 04:28:22 -08:00
Soumya Bhat
8b2a535e7a qcacmn: Extend cfg80211 scan cleanup API to support netdev level cleanup
In existing code scan queue cleanup is done during radio detach,
leading to access of freed vdev netdev.

Extend cfg80211 scan cleanup API to support netdev level cleanup.

Change-Id: Ice6b6d262788e71c6d229ed7de6ab0e17f270b6c
CRs-Fixed: 2185302
2018-03-05 04:28:19 -08:00
Abhishek Singh
a6157cfeb1 qcacmn: Avoid scan entry use after free in scm_handle_bcn_probe
In scm_handle_bcn_probe, scm_add_update_entry is called before
inform_beacon(wlan_cfg80211_inform_bss_frame).

Once scan entry is added to db, there is race condition that other
threads may remove it from db before wlan_cfg80211_inform_bss_frame
is called. Thus freed memory will be accessed in
wlan_cfg80211_inform_bss_frame.

To fix call inform_beacon(wlan_cfg80211_inform_bss_frame) before
adding the entry to scan DB and after updating required fields
from duplicate older entry.

Change-Id: Ib6dd967da9625ce944bffda5037b689ffd70903a
CRs-Fixed: 2197238
2018-03-05 04:28:16 -08:00
nobelj
8c07d61785 qcacmn: Add support for PPDU END TSF in ppdu stats
Add support for PPDU END TSF by adding START TSF and Duration.

Change-Id: Ida04a793876f2a5b029726cc85f2715b71a30834
2018-03-04 21:11:56 -08:00
Sathish Kumar
6b55904827 qcacmn: Fix issues in direct buffer rx module
1. Populate number of capabilities after extracting service ready ext param
2. Deinit ring during pdev destroy only if ring is configured
3. Do not allocate module param if no capability is shared for
   the pdev by target

Change-Id: Ie92b7fc882ba8b7755fea150c724459264a0ea79
CRs-Fixed: 2192671
2018-03-04 16:50:54 -08:00
Zhu Jianmin
8a8fa10854 qcacmn: Avoid peer/vdev/pdev spin lock used before init
qdf_spinlock_create(&peer->peer_lock) is called after
wlan_objmgr_psoc_peer_attach and wlan_objmgr_vdev_peer_attach in
wlan_objmgr_peer_obj_create.

In mgmt rx handler, peer is accessed and peer_lock is acquired
before peer_lock initialized in race condition case, spinlock
bad magic issue will happen

Initialize the peer spin lock before peer attaching to avoid the
race condition

Fix same things for vdev and pdev objects

Change-Id: I4cc9d281f8c9efa9de246747641804d985b4653c
CRs-Fixed: 2198193
2018-03-04 05:08:31 -08:00
sumedh baikady
b882f93dbc qcacmn: Fix channel info in radiotap
Fix frequency and channel flags fields in radiotap API

Change-Id: Ic991ea796d0b19f8adc16a5bc33cfde0042c167e
CRs-fixed: 2189914
2018-03-03 23:44:46 -08:00
Sandeep Puligilla
4d3daf5cf0 qcacmn: Fix static analysis
Fix static analysis issues on spectral modules.

CRs-Fixed: 2196066
Change-Id: I7588a26108ff3c0b01f480007ffe3d3b91c29b8e
2018-03-02 23:45:16 -08:00