Commit Graph

6108 次程式碼提交

作者 SHA1 備註 提交日期
Sravan Kumar Kairam
099671a852 qcacmn: Fix NULL pointer dereference
In dp_rx_mon_status_buffers_replenish after replenish of all
mon status ring rx buffers there is log in which function
local desc list is accessed. But after successful replenish of
all the available free desc, free desc list will be NULL. So
accessing the free desc list in the debug log leads to NULL
pointer dereference. In this change remove the debug log as
before that enough logging is in place to check how many buffers
are replenished.

Change-Id: I306aa52f6f25d9b43afb8548b8c03467aa9f27de
CRs-Fixed: 2366585
2018-12-17 00:37:37 -08:00
Edayilliam Jayadev
33b7c9a31d qcacmn: Fix KW isssues in Direct DMA
Fix KW issues in Direct DMA module.

CRs-Fixed: 2366231
Change-Id: I091d6b451c142928743ff29a1e463321bad7bf4c
2018-12-16 21:36:46 -08:00
Mohit Khanna
705149946b qcacmn: Fix large RX desc pool memory allocation
During dp_rx_pdev_attach and dp_rx_pdev_mon_buf_attach we are allocating
three times as many rx descriptors as there are entries in the ring for
AP usecase. This is not needed for MCL and may need to kmalloc
failures for allocating that much contiguous memory

Allocate only as many RX descriptors as there are ring entries for MCL
usecase.

Change-Id: I8b559a85c3899bcbdc520e71ba5da409314db160
CRs-Fixed: 2342957
2018-12-15 10:07:15 -08:00
Venkata Sharath Chandra Manchala
96e3633874 qcacmn: Pktlog Enhancements
1. Reduce the log level for every buffer received
   from firmware
2. Set the default pktlog buffer size to 10MB.

Change-Id: Iad8827084579592fcfa69056dcfc9d57095151e7
CRs-Fixed: 2364380
2018-12-15 08:43:26 -08:00
Krunal Soni
ce2009b364 qcacmn: Clean-up all peers in-case of SSR
Current driver doesn't clean-up all the peers because the TARGET
state is not marked as reset and due to which nobody is there to
mimic fake peer unmap events to reduce the reference count.

Also, there is no peer delete API being called as well in case of SSR.
Identify the TARGET state in-case of SSR by calling HDD callback
and mimic the unmap events and call peer delete API as well.

CRs-Fixed: 2350285
Change-Id: I878b7a15701c01ac9ef80010086f7e868a631a74
2018-12-14 16:06:30 -08:00
Vivek
50f2998dfa qcacmn: Address review comments for activation cb reason change
There were minor review comments for the change
for adding activation reason also to activation sb
which was not addressed in the changeset
since it had all the necessaary approvals and it
was in path for merge.

Addressed all the comments as part of this change.

Change-Id: I8035adf2dce152e60eef1494aa7f100c2d567f41
CRs-Fixed: 2361327
2018-12-14 16:06:27 -08:00
Vivek
40d1bc8914 qcacmn: Add activation reason to serialization cmd structure
Add field for activation reason to serialization cmd structure
Also modified the other boolean fields to a bit field for optimization

The new field added to serialization command structure will be used
to update the activation reason about how the command was activated,
either directly from active queue or as part of movement of
pending to active queue.

Change-Id: I8a1da79b7ef60e8d8a739ae2f265418418e2c859
CRs-Fixed: 2361327
2018-12-14 16:06:24 -08:00
Vivek
6a84a1c328 qcacmn: Add serialization API to update timers
Add a new API to update serialization timer value for a
give command in the active queue.

Change-Id: I725a35822e881facd9e2f4a51e41ea5ee8d6bbd8
CRs-Fixed: 2352317
2018-12-14 16:06:21 -08:00
Vivek
c4f335719b qcacmn: Add API to peek vdev active queue
Add API to peek into the vdev active queue
and return the command type present in the
active queue of a given vdev

Change-Id: I4a4dc419f4a51645cc7e611ffb7053a8c8240381
CRs-Fixed: 2354133
2018-12-14 16:06:18 -08:00
Vivek
0f993fe32f qcacmn: Disbale serialization vdev queues on demand
Add new attribute to the serialization command
structure to disable the vdev queues on queuing
the given command.

The serialization command attribute to disable queues
is only used for non scan commands.

After the queues are disabled, new serialization requests
applicable for the given vdev will not be allowed.

Change-Id: I29e6330413e9b16c7d3e96ad0eb004515061db88
CRs-Fixed: 2349901
2018-12-14 16:06:15 -08:00
Vivek
c3357683fa qcacmn: Avoid active command removal until activation completes
With the current implementation, the removal of a command
is allowed  before the activation cb returns.

So if a command is removed before the activation returns,
and the activation returns failure, we attempt to access
the command buffer after the cmd is removed happen.

This is now protected by a new flag where if a removal is
attempted before a commands activation cb is completed
the removal request just marks the CMD_MARKED_FOR_REMOVAL
flag and when the activation cb returns, we check if a
commands removal had been attempted. If yes, remove the command
from the active queue.

Change-Id: I53af6706010b50640ea7248085e9fc85908056fa
CRs-Fixed: 2356813
2018-12-14 16:06:11 -08:00
Vivek
883e4c1d79 qcacmn: Additional checks for moving command to active queue
The current implementation was not checking for pending
queue status before adding command to pending queue.

This was causing an issue, when,  after removal of an active
command, we were preepmted and a new request came, it made
it to the active queue. Now when the previous thread resumed,
and we attempted to move pending to active, it failed.

Added the following new checks:

1. When adding command to active queue, make sure there is no
commands in the pending queue

2. When moving from pending to active, make sure it is allowed
to add commands to the active queue.

Change-Id: Ief16c22f6f7e2cdc105e24f164e5891bfe806662
CRs-Fixed: 2356719
2018-12-14 16:06:09 -08:00
Chaithanya Garrepalli
7ab76aec94 qcacmn: Enable monitor dest ring in m_copy mode
In existing code, 132 bytes of OTA mgmt. and control payload is
provided to upper layers by subscribing to packet header TLV.

The requirement in M-copy mode though is to get complete payload for
mgmt. and ctrl. packets. Add change to configure monitor destination
ring and add mgmt. and ctrl. packet filter to receive full mgmt. and
ctrl. packets.

Change-Id: I0014837b51cac6f0143dcc5cb624ea2086cf4486
CRs-Fixed: 2256159
2018-12-14 16:06:06 -08:00
Kiran Venkatappa
c0d010216a qcacmn: Add support to choose hw_mode_id from FW supported modes
Add support to choose the hw_mode_id from FW supported modes. Preferred
mode will be selected if it is not configured in ini params. It is
selected based on the precedence as per capabilities supported by the
mode. For eg., if FW supports DBS and DBS_SBS, DBS_SBS is selected as it
supports three radio compared to DBS's two radio.
This can be overridden by user by setting proper hw_mode_id in ini file.

Change-Id: I162c3a66182882890c416a68f7f64d5149b8f1e5
CRs-Fixed: 2361280
2018-12-14 14:26:25 -08:00
Dustin Brown
243d00af0b qcacmn: Adjust min zero compression to 1
The IPv6 address format allows compression of _one_ or more zero hextets
using "::". However, the current implementation accepts _zero_ or more
zero hextets as valid. Adjust the minimum required hextets for a zero
compression to 1 from 0.

Change-Id: Ibdf406b04bbdc44d4a28fafa6179c104285c915c
CRs-Fixed: 2362739
2018-12-14 14:26:22 -08:00
Jinwei Chen
73e0dd5719 qcacmn: do dma unmap for failed tso segments
Currently there is only tso segment and tso number segment
descriptor free operation when tso preparation failed, do dma
unmap for each segment as well.

Change-Id: I9a507f27341877dc062528ce77e02970d16aa098
CRs-Fixed: 2347279
2018-12-14 12:48:43 -08:00
Sourav Mohapatra
1bc4bc2a25 qcacmn: Add converged enum for WMI_SERVICE_VDEV_LATENCY_CONFIG
Currently there is no converged wmi_service enum for the
WMI_SERVICE_VDEV_LATENCY_CONFIG.

Add wmi_service_vdev_latency_config as the converged enum.

Change-Id: I90d54ccd507b4267cd7310b4e6e5b1473c7dc41c
CRs-Fixed: 2366187
2018-12-14 07:15:29 -08:00
Jeff Johnson
b0e6f8dc79 qcacmn: Refine struct wmi_unified_pmk_cache (phase 3)
The original definition of struct wmi_unified_pmk_cache had several
anomalies:
1) It contains an unnecessary tlv_header field. Only the fw-api
   structs should contain TLV headers.
2) It contains a mis-named session_id field. Common structures should
   use converged terminology, in this case vdev_id

Change If4be27111c604c16ea437aa654210cdff28220a7 ("qcacmn: Refine
struct wmi_unified_pmk_cache (phase 1)") completely addressed the
first issue, and as the first phase of fixing the second issue it
replaced the session_id field with an anonymous union which contains
both the existing session_id field and a new vdev_id field. Being part
of a union these field will overlay each other.

qca-wifi-host_cmn change Ie8cc453751b95c332e3df32794506a4bd3c324ad
("qcacmn: Refine struct wmi_unified_pmk_cache (phase 2)") and
qcacld-3.0 change Ief4bcb819cb3c842adb74904f2cb2483476eaeb9
("qcacld-3.0: Use the refined struct wmi_unified_pmk_cache") replaced
all references to session_id with references to vdev_id.

For phase 3 remove the anonymous union introduced in phase 1, leaving
just the vdev_id field.

Change-Id: Ic5a274b9e2e8e603eef801a9d6422f55829f9735
CRs-Fixed: 2363432
2018-12-14 07:15:26 -08:00
Jeff Johnson
3ef2b9613d qcacmn: Refine struct wmi_unified_pmk_cache (phase 2)
The original definition of struct wmi_unified_pmk_cache had several
anomalies:
1) It contains an unnecessary tlv_header field. Only the fw-api
   structs should contain TLV headers.
2) It contains a mis-named session_id field. Common structures should
   use converged terminology, in this case vdev_id

Change If4be27111c604c16ea437aa654210cdff28220a7 ("qcacmn: Refine
struct wmi_unified_pmk_cache (phase 1)") completely addressed the
first issue, and as the first phase of fixing the second issue it
replaced the session_id field with an anonymous union which contains
both the existing session_id field and a new vdev_id field. Being part
of a union these field will overlay each other.

For phase 2 replace the reference to session_id with a reference to
vdev_id in send_set_del_pmkid_cache_cmd_tlv().

Change-Id: Ie8cc453751b95c332e3df32794506a4bd3c324ad
CRs-Fixed: 2363431
2018-12-14 07:15:23 -08:00
Rakshith Suresh Patkar
e105ac141d qcacmn: Add support to dump last n dpt stat records
Add support to dump only last n dpt records of debug fs
dump_set_dpt_logs file.

Change-Id: Ic6418803d53cc2abbfc200f62df2a24c3bc55d54
CRs-Fixed: 2362523
2018-12-14 07:15:20 -08:00
Rajeev Kumar Sirasanagandla
33d9b7fc64 qcacmn: Add WMI support to disable aggressive TX
Add WMI support to send action oui DISABLE_AGGRESSIVE_TX
to firmware to disable some of aggressive tx features for peer mac
when DUT is operating in softap mode.

Aggressive TX features disabled are SIFS bursting, assist and support of
more than 32 frames in AMPDU.

Change-Id: Iaad1917a6a4897cef4d65a8951d3d1f207a9167b
CRs-Fixed: 2364937
2018-12-13 23:21:39 -08:00
Jeff Johnson
b9f08212f6 qcacmn: Refine struct wmi_unified_pmk_cache (phase 1)
The current definition of struct wmi_unified_pmk_cache has the
following anomalies:
1) It contains an unnecessary tlv_header field. Only the fw-api
   structs should contain TLV headers.
2) It contains a mis-named session_id field. Common structures should
   use converged terminology, in this case vdev_id

To fix the first issue just remove the tlv_header field since it isn't
used.  To fix the second issue takes a phased approach. For phase 1
replace the session_id field with an anonymous union which contains
both the existing session_id field and a new vdev_id field. Being part
of a union these field will overlay each other.

Subsequent phases will replace session_id references with vdev_id
references, and then remove the union, leaving just the vdev_id field.

Change-Id: If4be27111c604c16ea437aa654210cdff28220a7
CRs-Fixed: 2363430
2018-12-13 16:46:11 -08:00
sumedh baikady
da15920d5b qcacmn: Support for smart monitor on HKv2
Add support for smart monitor feature on HKv2.
For HKv2, NAC filtering is done by HW and NAC is
programmed directly in the AST table. The NAC entries
in AST table have monitor direct bit set and this
is obtained by host via monitor status ring.
host subscribes for packet header in MD packets.

To these filtered packets radiotap header is added
and delivered to the stack.

Change-Id: I123f986531943e376ac5c492540e01f0b03348c4
2018-12-13 16:46:07 -08:00
Dustin Brown
7c32e412b8 qcacmn: Add qdf_talloc APIs
Add APIs for t(ree) alloc(ated) memory management.

These APIs allocate memory like malloc, but track those allocations via
a parent-child relationship, or tree. If the parent is freed while it
still has children, a panic will be triggered. This effectively gives
you the ability to limit the lifetime of an allocation by ensuring the
child allocation lifetime will be strictly less than the parent
allocation lifetime.

Change-Id: I6308c96061e125b2e5a9c424ec2d2298c1c503ab
CRs-Fixed: 2359469
2018-12-13 16:46:04 -08:00
Dustin Brown
ce57c688b9 qcacmn: Add qdf hashtable APIs
Add a thin wrapper in QDF around the kernel hashtable implementation.
Additionally, add basic unit tests for these APIs.

Change-Id: I07999e5fc8116e67b3850b866ced20af64342055
CRs-Fixed: 2359335
2018-12-13 16:46:01 -08:00
Edayilliam Jayadev
919727378d qcacmn: Remove duplicate assignment of default values to Spectral params
Remove duplicate assignment of default values
to Spectral params.

CRs-Fixed: 2364567
Change-Id: I77d69c2707ca4295bfdac0ebdb49883c4544f61f
2018-12-13 16:45:58 -08:00
Pamidipati, Vijay
8a4c03a869 qcacmn: protect peer-list access in AST aging timer
Add missing lock to protect peer list access in AST
aging timer

Change-Id: I3e0f7c0bd0e81398dd927bb4f51627a46c5eae19
2018-12-13 14:57:29 -08:00
Sandeep Puligilla
5957f0030a qcacmn: Add concurrent cfg items of scan
Add following scan cfg items:
CFG_ACTIVE_MAX_CHANNEL_TIME_CONC
CFG_MIN_REST_TIME
CFG_REST_TIME_CONC
CFG_PASSIVE_MAX_CHANNEL_TIME_CONC

Change-Id: I5b20ea153269f32b503d6c9cd1667d8086148871
CRs-Fixed: 2364994
2018-12-13 13:21:25 -08:00
Wu Gao
8e0f32b161 qcacmn: Remove TDLS component and related files from hostcmn
TDLS component used in CLD only and needn't in hostcmn. So there
is requirement to move it from hostcmn to CLD. This change removes
policy mgr related files/codes from hostcmn.

Change-Id: Ifeaf1447e74f83a17072d08c4a0ff62a13e91518
CRs-Fixed: 2361584
2018-12-13 02:38:03 -08:00
Rajeev Kumar Sirasanagandla
4db889dfe6 qcacmn: Add regulatory API to check 5Ghz band
Add regulatory API to check whether given frequency belongs to 5GHz
band.

Change-Id: I96147aca4f98563305bbba25c623aa0a37dd284d
CRs-Fixed: 2364934
2018-12-13 00:52:15 -08:00
Jinwei Chen
214590a2c9 qcacmn: fix nbuf free reuse during invalid peer data processing
For MCL function dp_rx_process_invalid_peer, there is corner case the
nbuf is not data and freed, but invalid_peer_head_msdu pointe to the
same nbuf in pdev is not reset to NULL, then invalid_peer_head_msdu is
reused again.
Reset invalid peer msdu list to NULL when nbuf is freed.

Change-Id: I73058afe9656c34971ea083faa19ef9d90b7f747
CRs-Fixed: 2356531
2018-12-12 12:29:22 -08:00
Jinwei Chen
b3f9d202db qcacmn: Fix SSR nbuf unmap issue
During SSR test, TX skb sent to target will not get TX completion,
so skb unmap and free is missed. later when driver is unloaded,
nbuf unmap leak is detected then panic happened.
Take care to unmap and free the corresponding skb of pending TX
descriptor during vdev detach.

Change-Id: I9f4e6443682097ec76632c96a0188ffa2c1a5fcc
CRs-Fixed: 2347770
2018-12-12 07:21:01 -08:00
Vinay Adella
9420115f04 qcacmn: Change peer unref delete API parameters
Pass vdev mac-addr and vdev-mode, instead of vdev-id.
The vdev-id that was passed earlier, was used to get
the mac-addr and vdev-mode from the vdev structure.
But there are cases when this vdev structure may be
freed, when this API is called.
So pass the mac-addr and vdev-mode from the dp structures.

Change-Id: I2148e7ecef433f4363385eeaec2e18f3ec131ab8
CRs-Fixed: 2356315
2018-12-12 03:52:00 -08:00
Wu Gao
c38f0e89f0 qcacmn: Remove policy mgr component and related files from hostcmn
Policy mgr component used in CLD only and needn't in hostcmn. So there
is requirement to move policy mgr component from hostcmn to cld. This
change removes policy mgr related files/codes from hostcmn.

Change-Id: Ie774d526cd4aa91b16afe6e01919141b570324c4
CRs-Fixed: 2361566
2018-12-12 03:51:58 -08:00
Karunakar Dasineni
6fb46e2759 qcacmn: Release link descriptors on defrag errors
Link descriptors should be returned to WBM release ring if
fragments are not reinjected due to defrag errors.

Change-Id: Ia37db9f195f6848092918cf7cc221dc50e827ac5
2018-12-12 01:45:50 -08:00
Amar Singhal
eec199494e qcacmn: Update regdb with regulatory database version 27
Update regdb with QCA regulatory database version 27.

Modify APL19 with new channels, power and radar pattern.
Change country IN to APL19_ETSIC.
Create new reg-domain ETSI15.
Create new reg-domain pair ETSI15_WORLD.
Move CTRY_SAUDI_ARABIA to ETSI15_WORLD.
Add new country CTRY_MYANMAR.
Change CTRY_CHILE to FCC13_WORLD.
Change CTL value for reg-domain APL8 to 'FCC'.
Enable all bandwidths for country CTRY_COSTA_RICA.
Add new reg-domain pair ETSI10_FCCA.
Move country CTRY_UNITED_STATES to FCC3_FCCA for mobile.
Update regdb version field.
Fix alignments.

Change-Id: I23a7ce98010e15eab606d4910df87bec15abc5ea
CRs-Fixed: 2353872
2018-12-12 01:45:46 -08:00
Amar Singhal
14fedd47cd qcacmn: Rate limit invalid channel number messages
Channel number can be valid when finding out the enumeration for the
channel. Rate limit the messages for the same.

Change-Id: Id8755cffa9030054698f9e5e65c7c30c3155ad1e
CRs-Fixed: 2359311
2018-12-12 01:45:43 -08:00
Wu Gao
9c68825b0b qcacmn: Remove P2P component and related files from CMN
P2P component used in CLD only, and needn't in hostcmn. So move P2P
component from hostcmn to cld. This change remove P2P related/codes
files from hostcmn.

Change-Id: I351ee153588bbcdb62041b4626370d451a3f56bb
CRs-Fixed: 2361487
2018-12-11 17:26:12 -08:00
Dustin Brown
1b76d59f78 qcacmn: Add int parse unit tests to QDF
Add unit tests for the following parsing function in QDF:
 * qdf_int32_parse()
 * qdf_int64_parse()
 * qdf_uint32_parse()
 * qdf_uint64_parse()

Change-Id: I43d162d008910396df051dd18e7a1ab7fede657a
CRs-Fixed: 2362740
2018-12-11 17:26:09 -08:00
Shiva Krishna Pittala
be6dcc0bed qcacmn: Fix unknown symbol qdf_aligned_malloc_fl
When MEMORY_DEBUG is enabled on WIN, it is reporting qdf_aligned_malloc_fl
as an unknown symbol. qdf_aligned_malloc_fl is defined under
MEMORY_DEBUG flag but its prototype is exposed globally.
Make this function definition available globally to fix the issue.

Change-Id: Ieb002bb892d6f3d525409fc9c3a6b2fa71ceebd8
CRs-Fixed: 2357476
2018-12-11 15:40:39 -08:00
Dustin Brown
fbe43ca5c4 qcacmn: Add unit test cases for qdf parse APIs
Add unit test cases for bool, mac, ipv4, and ipv6 parsing APIs.

Change-Id: I7536a973141a6311662390e42da749f48239bef8
CRs-Fixed: 2359298
2018-12-11 15:40:36 -08:00
Arunk Khandavalli
84acb9ff6e qcacmn: Add support query per Vdev Beacon reception
Add WMI support query per Vdev Beacon reception.

Change-Id: I535c03eaefba9fbbcdc51cead1093680f451da10
CRs-Fixed: 2360914
2018-12-11 12:27:14 -08:00
Edayilliam Jayadev
780b60ea90 qcacmn: Remove CONFIG_WIN from spectral
Remove CONFIG_WIN from spectral module to achieve maximum
possible convergence.

CRs-Fixed: 2354105
Change-Id: I59e4d8029fcf096042741573cf020136747e7367
2018-12-11 06:11:13 -08:00
chenguo
60e6dd9978 qcacmn: Add missed error handling in dp_tx_send_msdu_single
If there is anything wrong, the caller of dp_tx_send_msdu_single
will only handle skb free, but not skb unmapping. So inside of
dp_tx_send_msdu_single, it is needed to make sure unmap operation
is performed after map operation.

CRs-Fixed: 2358266
Change-Id: I6379305e84f70b5b978e9504b758c7a6ccf328ee
2018-12-11 01:43:13 -08:00
Visudha Sathurappan
3b5c6e9899 qcacmn: Clean up of DFS functions
Replace mlme functions to get dfs objects by dfs functions.

Change-Id: Ic8432ce3c210a4c1233fe1c715d00f5abb37ba04
CRs-Fixed: 2363068
2018-12-11 01:43:10 -08:00
Santosh Anbu
9c61c1fb03 qcacmn: Add interface APIs b/w mlme and serialization
Add the interface layers APIs that will be utilized by the mlme
module to interface with the serialization module.
Also add a serialization command cancel option to cancel cmds of a vdev
belonging to a given command type and define the vdev mlme legacy callback
function that will be used by the mlme-serialization interface APIs

Change-Id: I6a376465ef2929f15c6464bbd29c0250251696d8
CRs-Fixed: 2312821
2018-12-10 23:33:49 -08:00
Abhishek Singh
502095b236 qcacmn: Add support to enable/disable scan with reason code
Adds support to enable/disable scan for psoc/vdev with reason,
so that multiple clients can enable/disable the scan at same time.

Scan will remain disabled till all clients enable it back.

Change-Id: I8d840b24210095accb56ac9a2697ec26e8a5eb17
CRs-Fixed: 2362093
2018-12-10 23:33:45 -08:00
Bala Venkatesh
ad2b2af274 qcacmn: Trim operation classes to max supported in tdls_extract_params
Operation classes supported can be controlled by user, which can
be sent greater than the max supported operations. This results
in stack overflow in change station command for TDLS sta.

Add check to validate operations supported param given by user
and if it exceeds max supported value, set it to max supported
value.

Change-Id: Idd3a35e38b091546a17d7ec6329f19429e5c289c
CRs-Fixed: 2361464
2018-12-10 11:11:06 -08:00
chenguo
d22ed62ec8 qcacmn: Make sure int_timer is initialized in monitor mode
During vdev attachment in monitor mode, the ini_timer is not
initialzied which will cause FW assertion. Make sure int_timer
is initialized properly.

CRs-Fixed: 2359908
Change-Id: I48c97161345b17a0eb3e8a939499eabeae683bd2
2018-12-10 05:36:53 -08:00
Jiachao Wu
ae6c777bd1 qcacmn: Fix a memory leak in qdf_mem_shared_mem_alloc
qdf_mem_shared_mem_alloc invokes qdf_mem_dma_get_sgtable which will alloc
memory.
This memory should be free in qdf_mem_shared_mem_free by sg_free_table.

Change-Id: I3ad4bd2ff7a80d4051f15dcb04e0265707c2712d
CRs-Fixed: 2131270
2018-12-10 03:59:46 -08:00