Commit Graph

2844 Commits

Author SHA1 Message Date
Naveen Rawat
11d820357e qcacmn: Add implementation for WMI_OEM_DMA_RING_CFG_REQ_CMDID
Program the DMA ring configuration to firmware using
WMI_OEM_DMA_RING_CFG_REQ_CMDID.

Change-Id: I99e5b3a369d7eeee1d1fe41782285ed54cdb82cf
CRs-Fixed: 2053958
2017-06-02 14:47:33 -07:00
Naveen Rawat
7c3c746398 qcacmn: Handle CIR/CFR capture in WMI_OEM_RESPONSE_EVENT
Add handling of indirect data in WMI_OEM_RESPONSE_EVENTID.
This data then needs to be sent to userspace app.

Change-Id: Id1661f23ff000b33da9640cc44ea7be25e9f8dc0
CRs-Fixed: 2053958
2017-06-02 14:47:31 -07:00
Naveen Rawat
ba24c486a3 qcacmn: Initialize DMA rings using hal_srng APIs
Initialize DMA rings for CIR/CFR capture and program them
to firmware.

Change-Id: I41c32cddc3fc0f7f0a972bf69ecbacfc9f0626f7
CRs-Fixed: 2053958
2017-06-02 14:47:29 -07:00
Manjunathappa Prakash
ad866513f5 qcacmn: Do not free the src buffer in __qdf_nbuf_cat()
It is callers reponsibilty to free the src nbuf if concat succeeds.

Change-Id: Iaf83524924e312bf819483de38603241f45170a5
CRs-Fixed: 2047585
2017-06-02 14:47:28 -07:00
Wu Gao
56e84390e2 qcacmn: support presence request
Support presence request frame in P2P component.

Change-Id: I21c1e63742396f328da1b2c7b2446abc4c35ef52
CRs-Fixed: 2039628
2017-06-02 14:47:26 -07:00
Wu Gao
47f49f9362 qcacmn: Support category vendor specific frame
Remove action frame type of presence response since parse incorrect,
Support category vendor specific action frame.

Change-Id: I7c75ed91dc14496d682cd9ce2065589271a1b71b
CRs-Fixed: 2039615
2017-06-02 14:47:25 -07:00
Yue Ma
34bbc8a212 qcacmn: Set wow_params explicitly for runtime PM
For runtime PM, set proper wow_params instead of using default.

Change-Id: Icc3d7b2333b485b7fe9ca6b0d30066cc5795d912
CRs-fixed: 2023358
2017-06-02 14:47:23 -07:00
Dustin Brown
5127241061 qcacmn: Remove invalid vdev_id workaround in PMO
A previous change included a workaround for HDD sending an invalid
vdev_id to PMO during NS/ARP configuration. Since the original HDD
issue has been resolved, remove the workaround in PMO.

Change-Id: I9507fd40e25943cfb855419687a1857bdda7331f
CRs-Fixed: 2051314
2017-06-01 16:01:04 -07:00
Manikandan Mohan
b01696ba61 qcacmn: Fix mem leaks in datapath
Fix mem leaks reported in datapath code during module unload.

Change-Id: Ife95426df11d61b253110ed7153fe8f8981006ed
CRs-fixed: 2044907
2017-06-01 15:21:34 -07:00
Venkateswara Swamy Bandaru
ae6d6f42ec qcacmn: Fix for kernel warning in free irq group interrupts
Same irq is getting freed for different groups. Fixed it by
freeing correct irq numbers in the group.

Change-Id: Ia70f101a0770e419a6ff820ba346f53c957ad26a
CRs-Fixed: 2053325
2017-06-01 12:32:22 -07:00
Houston Hoffman
4a4623c7c7 qcacmn: Let qdf_lock_stats_cookie_create failure be dbg level
qdf_lock_stats_cookie_create is a debug feature.  Its failure should be dbg
level since it fails gracefully.  This avoids watch dogs in cases where
all the cookies have been leaked.

Change-Id: I99c751e6153964d00f2fc0b7dbf174a0e50e7fb9
CRs-Fixed: 2045394
2017-06-01 12:32:21 -07:00
Dustin Brown
3c777ef4d2 qcacmn: Expose full hardware filter capabilities via WMI
The WMI API exposes the broadcast hardware filter. Modify the WMI API
to expose all of the supported modes of the hardware filter.

Change-Id: I185b149f4d1ad38692d8ff5810acd52bf84565b2
CRs-Fixed: 2040419
2017-06-01 12:32:20 -07:00
Govind Singh
caa850e764 qcacmn: Return failure if dst ring alloc fails for fastpath CE
Return failure in insmod if host fails to allocate
the ce receive buffers in the ce dst ring for fastpath rx
copy engine.

Change-Id: Ic2e0de5bb13a53efe1002a945841b674315dddef
CRs-Fixed: 2036365
2017-05-31 23:37:59 -07:00
Yu Wang
7250c75146 qcacmn: fix compile error in APPs when include wlan_nlink_common.h
wlan_nlink_common.h include linux/if.h, and linux/if.h
refers to 'struct sockaddr' which is defined in
linux/socket.h, and so it include linux/socket.h;
however, in userspace, linux/socket.h doesn't define
'sockaddr', so it will cause errors when compiling
userspace APP if it includs wlan_nlink_common.h.

Add macro __KERNEL__ to determine which header file
should be included:
For userspace, include net/if.h, it will include
sys/socket.h, which is for userspace;
for kernel space, include linux/if.h.

Change-Id: I3a2d8e6edb42871aa3599ef30fbb5d0d275764df
CRs-Fixed: 2054409
2017-05-31 23:37:58 -07:00
Manjunathappa Prakash
9737bd7da5 qcacmn: Make WLAN_LRO_ENABLE as 1 to enable LRO
WLAN_LRO_ENABLE is checked for 1 in enabled case. So change macro
WLAN_LRO_ENABLE to 1 enable LRO

Change-Id: Ic1be57596633a5998c7a1db6c0d611ea3c5867cf
CRs-Fixed: 2042812
2017-05-31 18:41:11 -07:00
Baila, Shashikala Prabhu
bc3efea885 qcacmn: Add API to get 2GHz/5GHz freq range and wireless modes
Offload layer uses low and high 2GHz/5GHz freq ranges and chip
supported wireless modes to populate umac ic channel list.

Change-Id: I899edd83548d68e67659b3a9273ddaaaf740540b
CRs-Fixed: 2047212
2017-05-31 01:03:11 -07:00
Baila, Shashikala Prabhu
4881d6d543 qcacmn: Fix setcountry code and getcountry code failure
offload_enabled flag is set to true for full-offload.
Currently full-offload is using HOST regdb, therefore set
country code and get country is failing.

Change-Id: Idd3a7300bcc1ec1934e7258c87d5bd989ecaf5bf
CRs-Fixed: 2047212
2017-05-31 01:03:05 -07:00
Ajit Pal Singh
a09e859ba0 qcacmn: Always enable AVOID_FREQUENCIES vendor subcmd
Since AVOID_FREQUENCIES vendor subcmd might be needed even when
FEATURE_WLAN_CH_AVOID is disabled, always enable
QCA_NL80211_VENDOR_SUBCMD_AVOID_FREQUENCY_INDEX in the vendor
subcmd list.

Change-Id: I4ac774d16540306fdb1301f9f182eeea8571388b
CRs-Fixed: 2045120
2017-05-30 22:01:14 -07:00
Houston Hoffman
60ff932b38 qcacmn: Mask failures in hif_post_recv_buffers
Mask failures in hif_post_recv_buffers as the oom_allocation_work
provides a recovery mechanism.

Change-Id: Ib495b96f9d72b25c732c3b85f982db5dc20adca7
CRs-Fixed: 2030393
2017-05-30 22:01:13 -07:00
Venkateswara Swamy Bandaru
a95b324a8c qcacmn: Add CDP APIs for configuring interrupt
Add CDP API for interrupt configuration to decouple interrupt
setup from soc attach / detach.

Change-Id: I422205ff5687fdc4a0936c68850455cc4e733e4d
CRs-fixed: 2046055
2017-05-30 22:01:12 -07:00
Pramod Simha
1dfdf64381 qcacmn: Fix for R2 REO register size calculation
Calculate register size by subtracting the higher
register address by the lower one.

Change-Id: Id2255ad48d0ceb2fde00774dbf56868efb3646ca
CRs-Fixed: 2052617
2017-05-30 17:31:23 -07:00
Rajeev Kumar
a86e46fee9 qcacmn: Relax spin lock abuse detection thresholds
Increase irq save spin lock abuse detection threshold to 10 ms
and spin lock bh abuse detection threshold to 1 second such that
very obvious spin lock abuse cases by WLAN driver are detected
and fixed.

Change-Id: I8ca751404dc05e3fc3b6aa5db8538cb98c710260
CRs-Fixed: 2047464
2017-05-30 17:31:21 -07:00
Rajeev Kumar
e7e6e37448 qcacmn: Properly format new line spacing in scheduler_api.h
In scheudler_api.h properly format new line spacing between functions
and include files.

Change-Id: I7960ea7aeec3aef9c50a4a39efcd9db4d6f3951f
CRs-Fixed: 2051329
2017-05-30 17:31:20 -07:00
Srinivas Pitla
5bdb69bd91 qcacmn: Avoid deadlock with pdev lock
The locks have to be taken by the caller. Handling inside
inline APIs are causing deadlock in few paths due to order of the locks.

With these locks the order is missing.

PDEV lock should be taken prior to vdev lock, and psoc lock should be taken
before taking pdev lock, same for peer and vdev locks also. taking the locks
other order would cause deadlock

Change-Id: I23d83329a0752981974726454d9e1bc1cfd1398f
CRs-Fixed: 2022458
2017-05-30 17:31:18 -07:00
Ravi Kumar Bokka
91b6182286 qcacmn: Configure and clear packet filter
Add PMO changes to configure and clear default packet filters
over suspend and resume

Change-Id: I1f3fab170d2669865da8ba09673df6ec8e755b31
CRs-Fixed: 2034458
2017-05-30 17:31:17 -07:00
Ravi Kumar Bokka
9aa049efcc qcacmn: add set packet filter
Add PMO changes for set packet filter.

Change-Id: I13c4bfe9607b90bd5cd04602448998db9bc66364
CRs-Fixed: 2034458
2017-05-30 17:31:15 -07:00
Ravi Kumar Bokka
7e3ec7a1dc qcacmn: Configure and clear packet filter
Add PMO changes to configure and clear default packet filters
over suspend and resume

Change-Id: I2e150defc8ce60e7b8346d058bfe3d9ec286aa26
CRs-Fixed: 2034458
2017-05-30 17:31:14 -07:00
Subrat Mishra
94a9ec829c qcacmn: ATF multiradio support
Changes added to support multiradio feature.
Included pdev_id and/or vdev_id in required ATF specific WMI data
structures. All ATF commands will be sent with pdev_id and/or vdev_id.

Change-Id: I723a9a6e4a67a417d4aa2b392285dc4afa590a21
CRs-Fixed: 2052786
2017-05-29 06:08:21 -07:00
yeshwanth sriram guntuka
7375b0b3f5 qcacmn: Do not flush scan results for sched scan
Scan results are flushed as part of sched scan start
which could result in subsequent connect to fail as
bss is removed from scan list.

Fix is to not flush scan results as part of sched
scan start.

Change-Id: I0cbc0fb707db0be4890b840b72c8126a7c5ff54b
CRs-Fixed: 2045834
2017-05-29 05:01:17 -07:00
Nitesh Shah
1763abada0 qcacmn: Avoid race condition while modifying connection list
In case of STA-AP case, new thread is created to call the func
policy_mgr_check_sta_ap_concurrent_ch_intf() that calls
policy_mgr_get_pcl_for_existing_conn() that modifies
pm_conc_connection_list table. The mc_thread calls
policy_mgr_get_valid_chan_weights() that also modifies
pm_conc_connection_list table. But the race condition is
created that mess up the pm_conc_connection_list table.

This race condition also leads to the scenario where the STA
connection to the AP is not updated properly . This shall lead
to the improper PCL update for a STA+SAP concurrency and thus
the channel switch fails.

The fix is to protect the whole sequence of the function
policy_mgr_check_sta_ap_concurrent_ch_intf() with mutex to avoid
race condition.

Change-Id: Ibb6d804afa70ef45d99e7ec9fc7fecc4993c7621
CRs-Fixed: 2047765
2017-05-26 19:20:46 -07:00
Dhanashri Atre
991ee4defc qcacmn: Modify legacy LRO implementation to use QDF
Modify the legacy LRO implementation to use the implementation
in QDF instead. This is to avoid code duplication and to unify
the LRO implementations for Napier and Helium.

CRs-Fixed: 2042812
Change-Id: I38e9da3b54392a1c5781133916361aac3875d43d
2017-05-26 16:11:22 -07:00
Naveen Rawat
44cf05f6c8 qcacmn: Parse service ready ext event for WIFI_POS DMA rings cap
Parse service ready extension event to get DMA ring capability requested by
firmware to enable CIR/CFR capture. This cap is then saved in WIFI_POS psoc
private object.

Change-Id: I6f6958250af06ac69b627d2f06e120955d625c62
CRs-Fixed: 2040688
2017-05-26 08:38:21 -07:00
Dustin Brown
d2cd9eab9b qcacmn: Remove assert in Scheduler thread post message path
In situations where the scheduler thread has been stopped, but some
threads are still trying to post massages to it, a particular assert
can be triggered excessively. Remove the post message assert when the
scheduler thread is stopped, and instead simply log an error.

Change-Id: I5b898dc3ea22bbedcdf2287ef6f3bcee1560bb6b
CRs-Fixed: 2046232
2017-05-26 07:50:51 -07:00
Yuanyuan Liu
da525ac7a3 qcacmn: send channel info to cnss daemon
Update wlan nlink message header file with channel info.
These info will be sent to cnss daemon and daemon will
pass it to LOWI client.

CRs-Fixed: 2006217
Change-Id: I125a519e188774bb099058ad5c385787800e5411
2017-05-26 07:50:50 -07:00
Vikrampal
f1e9389791 qcacmn: Handle multiple H/w DBS modes
Host handling enhanced in case of F/w advertising multiple DBS H/w modes

Change-Id: I90dfd9360df60be126dbfa8add30d38aeb6f7bf1
CRs-Fixed: 2048301
2017-05-26 06:20:28 -07:00
Mahesh Kumar Kalikot Veetil
6d5917ad22 qcacmn: Fix a function redefinition
Remove redefinition of the function 'qdf_mem_debug_debugfs_init' when
WLAN_DEBUGFS is not enabled.

Change-Id: Id35865edda7e41cbc073cfca6099c56e7455165d
CRs-Fixed: 2048039
2017-05-25 18:21:31 -07:00
Mahesh Kumar Kalikot Veetil
5b321ba16e qcacmn: Restrict debugfs file mode
Disable write permission to qdf mem debugfs entries.

Change-Id: I428f2018018cf8edacdbbb9011ed55a8894511d4
CRs-Fixed: 2047311
2017-05-25 18:21:30 -07:00
Mahesh Kumar Kalikot Veetil
e4f8f0e015 qcacmn: Add mem stats for perf builds
Add memory allocation statistics for perf builds where MEMORY_DEBUG is
not enabled. Part of this effort, re-structure some of the QDF memory
APIs. Memory stats shows real size allocated.

Change-Id: I1e8fe0f4080ea186b8bfa0ce0438b4a06dde5a66
CRs-Fixed: 2045476
2017-05-25 18:21:27 -07:00
Kapil Gupta
1ff1f2ef82 qcacmn: validate hw caps before dereferencing
Currently we are dereferencing hw caps without validation which
may cause kernel panic.

Add changes to validate hw caps before dereferencing.

Change-Id: I642dd4c0db872c4cf3bdff7e5fbccbacc82f307d
CRs-Fixed: 2049122
2017-05-25 02:19:34 -07:00
Dustin Brown
c7e0c63260 qcacmn: Create QDF timer multiplier get/set APIs
In order to provide greater flexibility on emulation platforms, replace
the current hard-coded QDF_TIMER_MULTIPLIER with a pair of get/set
methods, configurable at runtime.

Change-Id: I0757da6c2129db08459411eaef75b6183f1aa557
CRs-Fixed: 2049309
2017-05-24 23:56:53 -07:00
Dustin Brown
a17c68d656 qcacmn: Consolidate PMO ObjMgr Abstractions
Begin moving ObjMgr abstractions to their own file, ensure API
consistency, and ensure proper usage from within PMO.

Change-Id: I013ae3b9d7be22378420913df0d2283431398af3
CRs-Fixed: 2047321
2017-05-24 11:24:26 -07:00
Ishank Jain
6290a3c543 qcacmn: Add APIs to enable HTT FW Stats
Adding support to parse stream of HTT TLV's recieved as response
to the HTT EXT stats request message

Change-Id: I44c990a1ed91c2381b89811de33c0717bd24be7d
CRs-Fixed: 1114641
2017-05-24 02:41:10 -07:00
Kiran Venkatappa
8dac1dba72 qcacmn: Increase peer count to support 16 vaps in DBDC
Increase peer count to support 16 vaps per radio in DBDC mode

Change-Id: I9c75ee4051aa23c6c078a022d7d3f214b8e58971
CRs-Fixed: 2048254
2017-05-24 02:41:09 -07:00
Venkateswara Swamy Bandaru
15c68dadff qcacmn: Fix channel information mesh frame tx completion
Added channel info to meta header in mesh frame tx completion.

Change-Id: If032ee92330cc76c683f2b81af3707bccfe76fa9
CRs-Fixed: 2003389
2017-05-24 02:41:08 -07:00
Dustin Brown
a4c33f01bc qcacmn: Define new qdf_cpu_to_be*() macros
Add a set of OS agnostic CPU-to-Big-Endian byte order macros to QDF.

Change-Id: I8315dd55cf909abb871f7e7eb73684ed794fb134
CRs-Fixed: 2041099
2017-05-23 23:24:48 -07:00
Kiran Venkatappa
8dfac0797a qcacmn: Changes to support pdev_id in host from zero
pdev_id in FW starts from one. Zero is reserved for Soc. But host uses
pdev_id starting from zero. Make WMI changes to take care of this
difference and always provide and accept pdev_id starting from zero at
WMI. Use 0xFF for SoC on host.

Change-Id: I49f481e54bbaeea9359753bc7d3da9092fc9559a
CRs-Fixed: 2045125
2017-05-22 17:05:25 -07:00
Subrat Mishra
5bdc4b3014 qcacmn: Fix vdev set ssid
Modified to accept ssid of length 32 characters for vdev.
It was taking only 31 characters.

Change-Id: I98c54b23b1c7d70546a548979cef6a1af9ddb064
CRs-Fixed: 2049607
2017-05-22 17:05:24 -07:00
Pamidipati, Vijay
03f1a662a7 qcacmn: TSO Bug fix
Add fix to handle a case where the head SKB carries no payload
and only EIT header

Change-Id: I4513944d1e1f491f985be522bc04be6845c8a3c4
CRs-Fixed: 2004658
2017-05-22 17:05:23 -07:00
Venkata Sharath Chandra Manchala
35503cce26 qcacmn: TSO fixes
1. Unmap tso common segment only after receiving
   completions for all the tso segments for a given
   skb.
2. Keep a track of num of free tso descriptors available
   in the pool of tso descriptors.

Change-Id: I01bdbb9e40b7259f77dbcfeec22c6d8cd0c0a6dd
CRs-Fixed: 2042950
2017-05-22 17:05:21 -07:00
Manjunathappa Prakash
ae66cda533 qcacmn: Remove excessive per packet logging in dp_rx_process()
Move excessive per packet logging inside undefined compile flag.
Eventually need to remove this debug logging.

Change-Id: If1470a4c780b4b718346982a69d6e5fb60e2287f
CRs-Fixed: 2049401
2017-05-22 13:16:14 -07:00