Commit Graph

3231 Commits

Author SHA1 Message Date
Rajeev Kumar
eca1b64d6c qcacmn: Add host initiated self recovery callback in qdf
Add host initiated self recovery callback in qdf such that
self recovery can be invoked from all layers.

Change-Id: Ied2a468019a2e27039686a4acb0e4c8b4577ba8f
CRs-Fixed: 2083099
2017-08-13 15:36:36 -07:00
Houston Hoffman
817ff7fc72 qcacmn: Add target type for adrastea chip
Add adrastea target type definitions to hif.h.

Change-Id: Id3183287ecd749577cfc1b71a0cfd96210073612
CRs-Fixed: 2066361
2017-08-11 19:38:21 -07:00
Manjunathappa Prakash
7ddb964c75 qcacmn: Use HOST_INTEREST_ADDRESS from targaddrs.h
WIN side code already uses the address FW interface header file.
No impact on MCL side as these are addresses are for WIN chips.

Change-Id: I540de3adf749d02aa9e56cca3f1f1baa39052dc7
CRs-Fixed: 2066361
2017-08-11 19:38:20 -07:00
Sandeep Puligilla
5c1cc50c22 qcacmn: Fix compilation errors
Fix compilation errors after updating
latest dbglog.h file from fw.

Change-Id: I3defd4242d922364849041b35bddb3cca4f9a39a
CRs-Fixed: 2066361
2017-08-11 19:38:18 -07:00
Om Prakash Tripathi
c3fcb680f1 qcacmn: Add support to update mlme info in scan db
Add missing support to update mlme related info in scan db

Change-Id: Ib69a07012536b9b423992f5f4199925febabcb91
CRs-Fixed: 2086351
2017-08-11 06:40:07 -07:00
Chris Guo
0d276aab16 qcacmn: Enhance t-put for SDIO bus WLAN
Because of wrongly using #ifdef instead of #if, DEBUG_BUNDLE is
always on after enable bus bunlde for SDIO bus WLAN.

CRs-Fixed: 2073795
Change-Id: I7b94dbc0a63dbea2384a455eed1e46d0eb60c530
2017-08-11 05:07:12 -07:00
Zhu Jianmin
682342a9ad qcacmn: Prevent memory violation with check
Check return value of cds_get_channel_enum

Change-Id: I945eae56a0f2d1eeeb9b37d46f03a09e60f259fb
CRs-Fixed: 2061117
2017-08-11 05:07:11 -07:00
Agrawal Ashish
42a1dc0596 qcacmn: Trigger copy of pktlogs to SD Card on basis of ring ID
For fatal events , driver sends EVENT_WLAN_LOG_COMPLETE
to userspace. But there can be multiple events for each
ring id like connectivity, driver , frimware, wakelock etc.
Cnss diag has to trigger copy of pkt log to /sdcard only for
one bug report, so send ring id in log complete event so
that it can trigger copy for driver ring id.

Change-Id: I3b06bed52509e58ac4d79698c95ba5eb1baa3bb3
CRs-Fixed: 2053770
2017-08-10 06:12:51 -07:00
wadesong
31d77bc18a qcacmn: Fix a NULL pointer dereference issue
In htc_send_data_pkt, netbuf will not contain a valid pointer for
TX packet count updating unless pPacket is not NULL. Move the TX
packet count updating code into the code block where pPacket is
containing a valid pointer.

Change-Id: I5cf6787b731df36c41c0c12a585e816e54ffb904
CRs-Fixed: 2053354
2017-08-10 06:12:50 -07:00
Shashikala Prabhu
c4f7f445a6 qcacmn: Add support to enable or disable channel 144
By default channel 144 is enabled. Support added to disable
channel 144 through iwpriv command.

Change-Id: I0a193571c2ca36e0cedcac19851459448fc141cf
CRs-Fixed: 2076792
2017-08-10 04:25:51 -07:00
yeshwanth sriram guntuka
1276a11b8e qcacmn: Fix excessive logging
kmsg is flooded with excessive logs from wmi_control_rx.

Fix is to change log level to debug.

Change-Id: I327463387a5dac318ecc0ad7e773006cfc09b42a
CRs-Fixed: 2073718
2017-08-10 04:25:49 -07:00
Venkateswara Swamy Bandaru
9b8dcb46d9 qcacmn: Fix race condition issue with enabling interrupts
Add lock before disabling and enabling group interrups to avoid race
condition between enabling and disabling group interrupts. Avoid mutiple
enabling/disabling of interrupts by maintaining the irq enabled information.

Change-Id: I79afc987e3853de84aaa05321cfcee72cdc0acb0
CRs-Fixed: 2087792
2017-08-10 03:11:59 -07:00
Himanshu Agarwal
740f30f614 qcacmn: Do netif_rx_ni() for frames received before peer assoc
While processing of frames received before peer is registered in process
context, tcp_v4_rcv() is called which takes a spinlock and in between the
processing before spinlock can be released, it is getting preempted by
hif_napi_poll() as it gets executed in softirq context. It tries to take
the same spinlock in tcp_v4_rcv() resulting in deadlock.

Do netif_rx_ni() for frames received before peer is registered.

Change-Id: I563ba5bccb94ea4084ecfd5d31045a5715bbfef4
CRs-Fixed: 2034991
2017-08-10 01:49:23 -07:00
Will Huang
82e91e0541 qcacmn: Check pointer tbuffer always before access it
Pointer tbuffer is allocated from heap or get from other module, it
is checked in some if branch but not every possible NULL branch.

Adding NULL check of tbuffer in every possible branch.

Change-Id: Id3c9f941623995ff73a993e29c53f3b9ce66f10e
CRs-Fixed: 2064350
2017-08-09 19:36:58 -07:00
Poddar, Siddarth
0efe289db5 qcacmn: Perform napi state comparison before releasing napi lock
Release napi spinlock only after performing napi state
comparison to avoid any race condition.

Change-Id: Icd7b713e474a818dfc6d0fa402496bbe06a3af66
CRs-Fixed: 2078294
2017-08-09 19:36:57 -07:00
Pamidipati, Vijay
fc77960e38 qcacmn: Fix a locking issue in DP Tx error path
There is a possiblility of invoking spin_unlock without taking
spin_lock in DP tx descriptor prepare function in error path.
This change fixes this issue.

Change-Id: Id4c5c0115b14041865e7f97f930e7023e865eca2
CRs-Fixed: 2088616
2017-08-09 19:36:56 -07:00
Will Huang
2411f76c2b qcacmn: Check pointer before dereference it
sync_completion_queue pass to function hif_dev_issue_recv_packet_bundle
may be NULL when asyncProc is true, and this queue pointer will be
dereferenced in HTC_PACKET_QUEUE_ITERATE_ALLOW_REMOVE.

Add checking before dereference this pointer.

Change-Id: I7e6f7923c819a7af8ed5444853ee74ffe1dd1a76
CRs-Fixed: 2071228
2017-08-09 19:36:55 -07:00
Pamidipati, Vijay
4f7c305cfa qcacmn: Fix HTT completions for ME and TSO Tx completions
For frames that are dropped by FW/HW and returned to host through WBM HTT path,
freeing of associated ME buffers (for multicast enhancement) and handling of TSO
segments is missing. Create a new function to handle the freeing of buffers in
Tx completion path and call this function in both HTT completion and regular
completion path.

Change-Id: Ibd061830e9325a2b2be9b1779b67b700f4ac08ae
CRs-Fixed: 2004658
2017-08-09 17:01:59 -07:00
Will Huang
408ae4c430 qcacmn: Fix possible NULL pointer dereference access
In multiple functions of hif_sdio_recv.c and hif_scatter.c, there is
A_ASSERT to check NULL pointers which might null operation if it is
not debug build.

Fix it by adding proper error handle if pointer is NULL

Change-Id: Ib183366d4a1193a3cf22aae2f3431efa761d1d35
CRs-Fixed: 2058905
2017-08-09 16:07:49 -07:00
Adil Saeed Musthafa
f5bed16eb4 qcacmn: Add debug print before calling WMI event handler
Print the Event ID before calling WMI event handler

CRs-Fixed: 2086665
Change-Id: Ie1b758a17882743fa4871b6ce4725c986769b01b
2017-08-09 16:07:47 -07:00
Kabilan Kannan
298329e692 qcacmn: Restructure TDLS function to fix the compilation issue
When TDLS disabled at the build level, it triggers
build failures in some of the projects, which does
not support TDLS feature.
Restructure the TDLS function to avoid build
failures, when TDLS is not enabled.

Change-Id: I3b63546f22d0187fb42d400fd7e15ff7a3d64653
CRs-Fixed: 2056022
2017-08-08 16:05:06 -07:00
Venkata Sharath Chandra Manchala
f934f2b8f7 qcacmn: Adjust logging level for LRO
Change the log level from ERROR to INFO
for LRO feature specific logs to prevent
packet information from flooding on the
kmsg.

Change-Id: Id65464213d3fb39482b1274a5a6f6c104aff6599
CRs-Fixed: 2082577
2017-08-08 16:05:05 -07:00
Venkateswara Swamy Bandaru
cde5599118 qcacmn: Fix mesh rx packets stats
Fixed error in flags for mesh rx packets and added versioning support.
ver1 flag setting is missing which is fixed now.

Change-Id: I3e8da3aae34b2c5bdd9679ec7277acf1215ba841
CRs-Fixed: 2071152
2017-08-08 14:14:36 -07:00
Tallapragada Kalyan
105038008d qcacmn: Add support for DP RX checksum offload
add support for TCP, UDP and IP checksum offload in RX path

Change-Id: Id148523419cc48d094e100f51d39e6f95b21928f
2017-08-08 12:06:12 -07:00
Karunakar Dasineni
dbaf4bed59 qcacmn: Link descriptor IDs to assist debug
We need only 3 bits of cookie field in link descriptor buff_addr_info
to store bank ID. The remaining bytes will be used set a unique ID,
which will be useful in debugging. Also fixed an issue in scatter idle
list setup.

Change-Id: Id3cc9a8a316fe942e749611c2f57e9324419dd40
2017-08-08 12:06:10 -07:00
Tushnim Bhattacharyya
b566893775 qcacmn: Add scan_ctrl_flags_ext to scan command
This change adds scan_ctrl_flags_ext to scan command
to support DBS Scan selection policy, adding policy
manager logic conditionally.

Change-Id: I424e107aac67fa5bac8ff72b023a5fe8c7e89bbc
CRs-Fixed: 2061031
2017-08-08 12:06:09 -07:00
Shashikala Prabhu
3519b96e24 qcacmn: Fixed regdb kernel panic
Analysis:
Seen kernel panic when setting the NULL country code in FW.

Solution:
Send an indication to Offload layer if Firmware fails to set
the country code.

Change-Id: Ic01ee170cfca31d840236625c1d1497426eafc68
CRs-Fixed: 2083318
2017-08-08 02:25:47 -07:00
Will Huang
f3a2ea90b8 qcacmn: Check mbox_index as index and check pointer
hif_dev_map_pipe_to_mail_box may return 255 and assign to mbox_index,
which will cause buffer overflow. Another issue is missing NULL check
after allocate memory in function hif_dev_send_buffer.

Fix it by checking NULL/invalid return pointer/index value.

Change-Id: If7b954343847097b7b5b601c684fe6b51d90daa4
CRs-Fixed: 2058300
2017-08-08 01:21:48 -07:00
Yun Park
fde6b9e551 qcacmn: Enable WLAN host data path support for IPA WDI3.0
Change to support WLAN Napier host autonomy data path architecture.

Change-Id: I07f7592d547bb796a3c12bbc4745cee22e2c0022
CRs-Fixed: 2064810
2017-08-07 17:47:38 -07:00
Zhu Jianmin
25ff719058 qcacmn: qcacld-3.0: Discard pktlog message for invalid msdu id
During HOST AP offload case fw is sending pktlog tx info
with invalid MSDU id. This will result in invalid de-reference
tx descriptor.
Discard pktlog msg for invalid msdu id to handle
the above scenario.

Change-Id: I772ab47d46b373ab0c4a8f7f7266697d4bccd703
CRs-Fixed: 2077611
2017-08-07 05:08:32 -07:00
Edayilliam Jayadev
f9400bd5ab qcacmn: Fixing tlv length in spectral wmi command
CRs-Fixed: 2062535
Change-Id: Ic7d92272324c0d6ab6f84cf9b2dd9f9ab0019f9e
2017-08-06 21:46:58 -07:00
Ajit Pal Singh
d27d746357 qcacmn: Decrease REO DEST RING size for QCA6290
Reduce REO_DST_RING_SIZE to 1024 for QCA6290

Change-Id: I1e5ac1dcf2edd82b80b15995c29dddb16b7e56bd
CRs-Fixed: 2084719
2017-08-06 19:46:00 -07:00
Om Prakash Tripathi
51052df409 qcacmn: Fix average RSSI calculation of scan entries
Average RSSI calculation was incorrect as previous average was
not considered. Consider previous average along with new frames
raw RSSI while calculating average RSSI.

Change-Id: I529802baaf296fc1378a1e89fc0ac00dcc8336da
CRs-Fixed: 2087711
2017-08-06 19:45:59 -07:00
Ganesh Kondabattini
34e0131b30 qcacmn: Add wmi command to set limit off chan parameters
Add WMI command for setting limit off channel command
parameters to firmware.

CRs-Fixed: 2068307
Change-Id: Ia99f1b4d4fe33082a561c9307af9d76ae16d8be4
2017-08-06 19:45:58 -07:00
Ganesh Kondabattini
db183ccb8c qcacmn: Add scan_ctrl_flags_ext to scan command
This change adds scan_ctrl_flags_ext to scan command
to support DBS Scan selection policy.

Change-Id: I71727259c0b5984cfc8fd6157ed0066d3cd9b193
CRs-Fixed: 2061031
2017-08-06 14:48:06 -07:00
psimha
c983d7ee09 qcacmn: Use interrupt polling only for monitor mode
Add logic to use MSI interrupts for mission & polling for monitor mode

Change-Id: Ieb824c2eb370040a125f743ec699954bdca9c83d
CRs-Fixed: 2051911
2017-08-06 10:47:17 -07:00
Houston Hoffman
648a918927 qcacmn: Enable msi support for ext_group ring groupings
assign msi vectors to srng rings based on the ext_group they will be
serviced in.

provide support for ext_groups in hif_pci.

Change-Id: If313fdb43b939871c0d73dea9a05f757427b5b16
CRs-Fixed: 2051911
2017-08-06 10:47:16 -07:00
Deepak Dhamdhere
811c917719 qcacmn: Use sme session id in set_ric_req command
Use sme session id in send_set_ric_req_cmd_tlv() as vdev_id, otherwise
it causes target assert when WMI_ROAM_SET_RIC_REQUEST_CMDID is sent to
firmware.

CRs-Fixed: 2037815
Change-Id: Ic3cb08fc62b3ca006abb78ce3b5d5fa028935783
2017-08-06 03:57:40 -07:00
Houston Hoffman
4e2df40247 qcacmn: Support hal detach
Cleanup paths were missing hal detach hook.

Change-Id: I175a60b52b8d61dacf5f7040c223073bd09d7ba6
CRs-Fixed: 2051903
2017-08-06 00:59:38 -07:00
Amar Singhal
eea0ef4450 qcacmn: Add dynamic channel enumeration
Depending upon the operating class that the wlan device is operating
in, the channel enumeration can be different. Like in Japan operating
class,  the 4.9 Ghz channels have different numbering than the US public
safety channels in US operating class. Therefore use the IEEE80211
defined operating classes and channel numbering.

Change-Id: Id4c20b6295e5d7062a3d1a9516f7c175a9bb71f0
CRs-Fixed: 2048784
2017-08-06 00:59:37 -07:00
psimha
61b1a36f72 qcacmn: Add NAPI stats
Add basic stats to track NAPI polls & schedules.

Change-Id: Iea8f21fc08d4a5de62e00f32ffdc020f8364ced1
CRs-Fixed: 2083867
2017-08-04 15:35:43 -07:00
Shashikala Prabhu
385c7c0eb0 qcacmn: Initialize zero cac dfs lock
Initialize zero cac dfs precac lock.

Change-Id: I0b12c765d0476a78cddcaca2b0153f7510e56c6c
CRs-Fixed: 2080572
2017-08-04 15:35:42 -07:00
Srinivas Pitla
4a3f486e6e qcacmn: Add max peer count and peer count support to pdev
Max peer count includes self peer/bss peer as well
Fixed issue in max peer check

Change-Id: I72fd7af1b99760631467ee6bcf92af6a63ee38e1
CRs-Fixed: 2078904
2017-08-04 06:04:56 -07:00
Manjunathappa Prakash
8804f978eb qcacmn: Do not LRO aggregate if peer is not connected
We have race condition between lro flush of hif_napi_poll and MC thread
lro flush while flushing the ol_txrx_cached_bufq packets for peer. Avoid
the situation by simply marking the all the Rx packets as LRO ineligible
while enqueuing packets to ol_rx_cached_buf.

Change-Id: Ief0d7dd6c25cf45912820f0e237fd1179a57a5c7
CRs-Fixed: 2032674
2017-08-03 19:48:40 -07:00
Srinivas Girigowda
43fa6527d4 qcacmn: Enable FATAL/ERROR/WARN/INFO log levels to console
Enable FATAL/ERROR/WARN/INFO log levels to console.

Change-Id: I54ea83ded49fcb2f1e8e1c13973ee8035dc9ce5d
CRs-Fixed: 2017427
2017-08-03 19:48:38 -07:00
Srinivas Girigowda
ee8f5dbf4b qcacmn: Utils: Reduce the log spam in kmsg
Move the logs to appropriate log levels to reduce
the log spam in kmsg.

Change-Id: I27ca212113513b15f159aa26da67e03bd3a73a9a
CRs-Fixed: 2017427
2017-08-03 19:48:36 -07:00
Srinivas Girigowda
2cde14e687 qcacmn: Fix clang warnings enum qdf_nbuf_l4_rx_cksum_result_t
warning: implicit conversion from enumeration type
'qdf_nbuf_l4_rx_cksum_result_t' to different enumeration
type 'qdf_nbuf_l4_rx_cksum_type_t

Change-Id: Ib6d9e863d6355746138c4b087a0cb19f12404f75
CRs-Fixed: 2055513
2017-08-03 19:48:35 -07:00
Srinivas Girigowda
3188f98125 qcacmn: Fix recursive memory allocation failure
On low memory conditions, qdf_mem_malloc_debug() fails and
on failure it triggers a host diag event to user space
which again tries to allocate memory using qdf_mem_malloc_debug()
which fails and this loop continues and might have caused
workqueue to get stuck.

Fix this by not sending the host diag event to user space on
low memory conditions.

Change-Id: I5bd302dfa372d40c570eaa830ed82a0bbaddc51f
CRs-Fixed: 2026975
2017-08-03 19:48:33 -07:00
Srinivas Girigowda
bc4a19290d qcacmn: Fix clang warning: redefinition of typedef 'qdf_mutex_t'
drivers/staging/qcacld-3.0/../qca-wifi-host-cmn/qdf/linux/src/qdf_lock.c:42:23:
warning: redefinition of typedef 'qdf_mutex_t' is a C11 feature [-Wtypedef-redefinition]
typedef __qdf_mutex_t qdf_mutex_t;
                      ^
drivers/staging/qcacld-3.0/../qca-wifi-host-cmn/qdf/inc/qdf_lock.h:240:23:
note: previous definition is here
typedef __qdf_mutex_t qdf_mutex_t;

Change-Id: Ib8a66843e22595d5ba07a38606032679c3c1b46d
CRs-Fixed: 2055513
2017-08-03 19:48:31 -07:00
Srinivas Girigowda
f6b3aacb2e qcacmn: Add qdf_driver_type
Add qdf_driver_type.

Change-Id: Ib5c1d71ed43ea09cea8d65ed9aef0937391b6d09
CRs-Fixed: 2055513
2017-08-03 19:48:29 -07:00