Improve reliability of skb allocations from non atomic callers
by letting them sleep.
Change-Id: If5a594519902ebe549fbc1ebd8c0eb97679cdcae
CRs-Fixed: 2127770
Currently there is no support for management MGMT TXRX
component over HTT endpoint and supports only over WMI.
As a result for platforms which does not support MGMT
over WMI will break other components which uses MGMT TXRX
component to send mgmt packets.
In this change implement changes to support MGMT TXRX
component over HTT.
Change-Id: I487aca3893aa21905a744e2e5dc7104e6c414fdc
CRs-Fixed: 2097694
HW has the limit on the number of fragments per tso
segment of FRAG_NUM_MAX (=6).
When running traffic, network stack may send many small
messages which could result in tso segment has more number
of fragments than 6.
Therefore, ensure that tso segment should not contain
more than 6 fragment even if tso size is less than gso seg size.
CRs-Fixed: 2107317
Change-Id: I08f604e4f7fa6a1d6ab065c2360bba883328e5f2
Currently ini variable gWlanMccToSccSwitchMode has 4 values.
Value 3 enforces SCC in anycase, if SCC is not possible then switchoff
the AP.
Added new value 5 for auto specific scenarios where, if SCC is not
possible the allow MCC.
Change-Id: I584958c6c61f7d1f5e077871e3891bba79f726a3
CRs-Fixed: 2127091
During an SSR/PDR any threads waiting on an event won't be purged
unless they are timed out. This increases the recovery time taken
by the host after an SSR/PDR. Before waiting on an event, put the
event in a list. During an SSR set all the events in the list and
return error to the threads.
Change-Id: Iac4790a88cde1665fba4c23924566b4b309a2b03
CRs-Fixed: 2045141
Since support for magpie/k2 are EOL WLAN for past several
releases, we do not expect customer revisiting these products.
So all the code under ATH_SUPPORT_HTC has been removed.
Tests done:
MIG has passed
CRs-Fixed: 2105074
Change-Id: Idc6a1f28eda5cb09edf5375c142d9cb12d81ce0b
The atomic flag 'mem_struct->in_use' should be accessed only after
a sanity check for 'mem_struct' in the function qdf_mem_free(). There is
a possibility that a double free can cause panic before the debug
logic kicks in.
Change-Id: I162b7e72e0f28f8808a7ae56efabb6620d17a6bd
CRs-Fixed: 2073968
Implement debugfs APIs abstraction for Linux. If a particular operating
system is not supporting debugfs or similar feature, these API's will
be a no-op.
Change-Id: I51316012876fec258e546fce8fc2f877e4311343
CRs-Fixed: 2097140
Add qdf abstraction for debugfs APIs such as create file, create
directory, create types and remove files/directory. If a particular
operating system is not supporting debugfs or similar feature, these
API's will be a no-operation.
Change-Id: I09fe366b85d4914ebdab52d3fb23acab72aa2116
CRs-Fixed: 2097140
Add file permissions and a function to map that to Linux OS. Also
define a type for __qdf_dentry_t and __qdf_debugfs_file_t.
Change-Id: I91b293b262d955324e65157909ca9d3b831e2cf6
CRs-Fixed: 2097140
Fix serialization log to use proper module ID.
Replace QDF_MODULE_ID_HDD with QDF_MODULE_ID_SERIALIZATION.
Fix logging levels as per logging guidelines.
INFO_HIGH is not supposed to be used anymore.
Change-Id: I349254abc36565e5ba520d46588e5c3e27178ad9
CRs-Fixed: 2090993
Initially, save_stack_trace_tsk was not exported from the Linux kernel
for ARM targets. This export has since landed in the 4.14 upsteam
kernel, and internal msm-4.4 and msm-4.9 kernels have added a backport
flag for this export. Cleanup the conditional compilation surrounding
qdf_print_thread_trace to reflect the new situation.
Change-Id: I0c98b38dddf460d4a65c0f19ebce609bd83bbf10
CRs-Fixed: 2126609
There are many QDF APIs require a qdf_handle_t parameter. None of these
APIs actually use the qdf_handle_t parameter, meaning it can be
completely removed. As a step toward globally removing this unused
type, remove qdf_handle_t parameters from unsed qdf_defer APIs.
Change-Id: I0568aa7cbd430abc0d046143482a067d96bf6313
CRs-Fixed: 2112646
Set IPA ownership for intra-BSS Tx packets to avoid skb_orphan(), and
clear the ownership after check it to avoid ipa_free_skb() is called
when Tx completed.
Change-Id: I03883773e418bb5518ea63a324d22503173ea436
CRs-Fixed: 2064191
Event indicating to the user space that the driver has detected an
internal failure. The driver is expected to recover from such a failure
automatically, e.g., by resetting the device.
This event carries the information indicating the reason that triggered
this detection.
Change-Id: Ia13e6f102e5e18ec4864ed258728369d51a77ff4
CRs-fixed: 2120886
Implement nbuf alloc fail replenish timer which starts when
there is an nbuf allocation failure and stops when there is
an nbuf allocation success with in the timer expiry duration.
Change-Id: Ie956ea144dec4323664632d00bb8f0f82ba22439
CRs-Fixed: 2036900
Add support to log ICMPv6 packets such as NS/NA, RS/RA and
ICMPv6 Req/Res in dp trace.
Change-Id: I11aab230b03254ea46c019cdb4488d1439a9504d
CRs-Fixed: 2075963
During network buffer free record the information such as file name,
line number, net buff address and time stamp. This helps to debug
issues related to buffer access after free.
Change-Id: I579a4764d8ea08210a3eedd349780cab2c081e3a
CRs-Fixed: 2071563
Typedef v_CONTEXT_t was inherited from a previous version of the
driver. It was always strange to have an abstraction for (void *)
since that is an integral part of C99 and hence does not require
abstraction. Now all references to this typedef have been replaced
with (void *) so remove this obsolete relic.
Change-Id: Ibe61708d0315e541376be24746d167d1f7a8ccc0
CRs-Fixed: 2117100
When printing memory allocations via debugfs, the dedupe table is
flushed to output when it reaches capacity. If the dedupe table is not
full when the allocation enumeration is complete, the entries contained
will be dropped. Flush the dedupe table to output one last time when
enumeration is complete to avoid dropping memory allocations from the
output.
Change-Id: I10f866b7bfa13c871d75e3e4ff798a8a820482df
CRs-Fixed: 2110106
The QDF delayed work APIs currently expect delay intervals in terms of
jiffies. Since QDF is OS agnostic, and jiffies are Linux specific,
interpret delay intervals in terms of milliseconds instead. This aligns
the delayed work APIs with the general timer APIs as well.
Change-Id: I9b9300425baa0857c35f63823de2037a954eed1f
CRs-Fixed: 2111987
In monitor mode, code decodes legacy rates and bandwidth information for
HT and VHT. Other changes include populating radiotap header with correct
nss and mcs values for legacy, HT and VHT frames. Mapping of mcs rates in
rx_msdu_start tlv and radiotap header info is done using Lithium data
structure document.
Change-Id: I5f20e5d89329738e3a6c076ee14457c003cab279
CRs-fixed: 2083027
Enable support to use SKB Buffers allocated during bootup for
low memory targets.
Change-Id: Ia55c38767804c5915b9d29d3c61bff236d12cacd
CRs-Fixed: 2067334
Add support for processing rssi, mcs etc fields from
PPDU status ring and delivering to CDP interface
Change-Id: I312bef20605594645bae6ec748f0b59e4d427075
CRs-Fixed: 2098696
* Log EAPOL, ARP, DHCP, MGMT, ROAM Events, ICMP, Data packets,
TX-Completions by default.
* Set default verbosity as low (existing is high)
* Throttle ICMP and Data packets if threshold exceeds.
* Enable live mode by default. Added ini entry to disable
it and configure high throughput thresh - gDptraceConfig
* Log only SA and DA for proto packets (and not 32 bytes)
* Format prints to fit in 1 line.
CRs-Fixed: 2051134
Change-Id: I2f82c38f5fda73f440c4c4c760e633904705b5a2
Stats printing with excessive loops should not go to the console.
Avoids watch-dog bites.
Change-Id: I7b0f9d73139dff97c16f492cbd1cb2d255255b3e
CRs-Fixed: 2091039
Linux kernel version 4.11 moved several signal related functions out of
linux/sched.h into linux/sched/signal.h. Add conditional compilation to
include the correct file based on the version of the Linux kernel being
compiled against.
Change-Id: Ic50a8ec0a76178b5231388983a890bdfdc4615e2
CRs-Fixed: 2094019
To aid in debugging memory leaks, and improve the robustness of log
recovery from crash dumps, statically allocate pglog_msg in the global
scope. This allows logs to be inspected even in cases where a crash
came late in the unload process. It also improves log recovery
robustness by removing the possibility of using a NULL pointer offset
under certain memory corruptions scenarios.
Change-Id: I077198e358570661c2f3adf2704f2c48f4b2f6f8
CRs-Fixed: 2078548
The 4.13 Linux kernel changed the sk_buff.users type to refcount_t from
atomic_t. Add conditional compilation based on kernel version to use
appropriate refcount APIs for kernels 4.13+.
Change-Id: I6918b4f45ffa247c74e54d8653a80821ceab1a86
CRs-Fixed: 2092031
Add missing qdf_spinlock_destroy() to destroy spin lock debug cookie
for SLUB build. For normal builds, qdf_spinlock_destroy() is a NO-OP
function.
Change-Id: If5a3843a468e460952dc64f0e6b5b1fba05ebbb3
CRs-Fixed: 2078940
The for loop was wrongly written. buf_len was decremented but the
counter was compared against buf_len, leading to lost bytes in the dump
Now with this change we compare buf_len is compared with 0, i.e., when
buf_len reaches 0, the loop exits
CRs-Fixed: 2091891
Change-Id: Ic5276e964e08a7db757bfed0569b290d987ddf5f
Getting the next node of a linked list should be a O(1) operation.
qdf_list_peek_next, however, iterates though the list first, checking
for node membership, before returning the next node. This makes the O(1)
operation a O(n) operation instead. Code that uses this API for list
traversal inadvertently performs a O(n^2) operation, causing unexpected
performance issues. Similar problems exist for qdf_list_remove_node as
well. Remove the membership checks in qdf_list_peek_next and
qdf_list_remove_node to prevent unexpected performance penalties.
Change-Id: If20825690ad861815c8164caebbf75318e572f0a
CRs-Fixed: 2091815
Runtime PM lock init API right now returns pointer to a context
but this would cause confusion to the caller if feature is not
defined and dummy function return NULL as caller can't find real
failure versus dummy function returning because feature not being
enabled.
Fix declaring a data structure in QDF layer that caller can use
but it hides the internal details of HIF implementation for
Runtime PM locks.
CRs-fixed: 1116509
Change-Id: I4dcba604e803faa0e14fac6403610391895e382e
Add host initiated self recovery callback in qdf such that
self recovery can be invoked from all layers.
Change-Id: Ied2a468019a2e27039686a4acb0e4c8b4577ba8f
CRs-Fixed: 2083099
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
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
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
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