Commit graph

4437 Commits

Autor SHA1 Nachricht Datum
Himanshu Agarwal
59c25048cd qcacmn: Add QDF APIs for SMMU Stage 1 translation
Add QDF APIs for DMA buffer allocation and sharing with SMMU
Stage 1 translation support. When SMMU Stage 1 is enabled,
DMA APIs return IO virtual address(IOVA) instead of physical
address. This IOVA needs to be mapped to physical address by
external module before accessing these buffers.

Change-Id: I88e938d8ebe1f32fdea79e3c3aa8a3638ddfd2b8
CRS-Fixed: 2072953
2018-03-19 09:34:37 -07:00
Linux Build Service Account
b71c52d9c9 Merge "qcacmn: Add per-level logging wrapper APIs" 2018-03-17 04:48:08 -07:00
Linux Build Service Account
16960ff67a Merge "qcacmn: Rate limit logs based on elapsed time" 2018-03-17 04:48:07 -07:00
Dustin Brown
385b73090f qcacmn: Add per-level logging wrapper APIs
Depending on platform limitations and the intended audience of a
particular WLAN driver build, it would be useful to be able to compile
out specific logging level logs completely. To that end, introduce
per-level logging wrappers, which can be compiled in or out by the build
configuration.

Change-Id: Ie062ada403f8a31aebcde691396987ad9e5352b5
CRs-Fixed: 2205888
2018-03-16 21:51:49 -07:00
Dustin Brown
9a94c9a29d qcacmn: Rate limit logs based on elapsed time
QDF_TRACE_RATE_LIMITED() currently rate limits by only printing every
rate'th call to the function from the same location. Instead, prevent
logging messages more than some constant 'k' times per second. This
means any subsequent calls to the API from the same location within 1/k
seconds will be dropped.

Change-Id: I31a3f48f68fb6bc67f59f3157a635345943d3331
CRs-Fixed: 2205794
2018-03-16 21:51:48 -07:00
Linux Build Service Account
c13c0db118 Merge "qcacmn: Add support for vdev feature ext flag WLAN_VDEV_FEXT_AMSDU" 2018-03-16 18:50:48 -07:00
Rajeev Kumar
88de1dba44 qcacmn: Add common QDF API qdf_is_fw_down() to check fw status
Add common QDF API qdf_is_fw_down() to check if FW is down.

Change-Id: I8215665bec6975c8dd47ae3bb8423eeaaeba159c
CRs-Fixed: 2202731
2018-03-16 10:35:54 -07:00
Tallapragada Kalyan
084a46d276 qcacmn: memory leak in invalid peer handler
We need to free the chain of nbufs associated to
an a-msdu if its last msdu is not received and the one
received belongs to a new a-amsdu

Change-Id: Id90e58306650ad885caa79271e81de3bf81ee5bd
2018-03-16 03:36:11 -07:00
Wu Gao
328285da88 qcacmn: Handle multi P2P MGMT frame TX
When P2P mgmt frame comes and there is same channel ROC requested
but not start, it will be failed to restart ROC timer and then drop
this frame.

Change-Id: I40cc2b66a266ebf2aa1017669e6d97b1c7de3da1
CRs-Fixed: 2202954
2018-03-16 00:55:18 -07:00
Wu Gao
e25d5f4ba3 qcacmn: Enable more debug information for P2P
Change log level and enable more debug information for P2P connection.

Change-Id: I459869d48c7f688246bc6e566ad2fae395ff8a2b
CRs-Fixed: 2204758
2018-03-15 23:35:58 -07:00
Wu Gao
0685ec210f qcacmn: Set flag for deleting tx context
Duplicate for MGMT frame tx ack comes before scheduler process first
one, then it will use freed memory. Add flag to avoid this case.

Change-Id: Id50f692ced0ddd5b267d096818f3e7ff12bf07aa
CRs-Fixed: 2188110
2018-03-15 23:35:55 -07:00
Abhishek Singh
93809fdc42 qcacmn: Fix band scoring logic for 5Ghz channels
Use proper macro to check if channel is 5Ghz while calculating the
band scoring logic for 5Ghz channels.

Change-Id: Ib394f3ed0db6c64286a44b15c38fa3ffdcf8bdfb
CRs-Fixed: 2205658
2018-03-15 23:35:51 -07:00
bings
7fd216a629 qcacmn: Configure phyerr filter offload before sap starts
Do not send phyerr filter offload to FW when dfs module is doing
initialization, because in target_if_dfs_set_phyerr_filter_offload
routine GET_WMI_HDL_FROM_PDEV returns NULL at this time.

Configure phyerr filter offload before sap starts.

Change-Id: I60436fc1e142937383a3714c727166bc5fa8d0db
CRs-Fixed: 2204683
2018-03-15 11:51:18 -07:00
Gyanranjan Hazarika
257af1fa02 qcacmn: Add support for vdev feature ext flag WLAN_VDEV_FEXT_AMSDU
One of 11ax WFA PF requirement for testbed AP is disabling AMPDU
reception with AMSDU. To meet this requirement we should be able
to add a new feature ext flag to vdev. Add this new flag to meet
the specified requirement.

Change-Id: I36c889e6adf1724a31b404a917bd27c716a98862
CRs-fixed: 2201952
2018-03-15 11:47:04 -07:00
Poddar, Siddarth
8d33d9b7a8 qcacmn: Add connectivity stats rx function pointer
Add new rx function pointer for connectivity stats
as part of ol_txrx_ops structure.

Change-Id: I91300de995b20e5dfc2c85c780453e63ea14ec93
CRs-Fixed: 2168412
2018-03-15 09:32:53 -07:00
Amir Patel
c8d752f7b2 qcacmn: Add debug enhancements to object manager code
Firmware is not sending peer delete response, so peer is stuck
in logically deleted state for longer duration.
Maintain list of logically deleted objects (psoc/pdev/vdev/peer)
and iterate it periodically to identify if any object is stuck
in logically deleted state. If it is stuck, print object type
and MAC address

Change-Id: I16bdd49e2956bb0c34189a6ee540d7d0bae91202
CRs-Fixed: 2159522
2018-03-15 09:32:50 -07:00
Srinivas Pitla
cb89aac98c qcacmn: Add check for max pdev id on pdev search
Max pdev count check is performed before accessing the pdev list index

Change-Id: I755a5cb595824968b057321b13a6e1c837ece669
CRs-Fixed: 2177109
2018-03-15 08:05:11 -07:00
Amir Patel
7c1a52ca7a qcacmn: Fix duplicate scan entry visit while iterating scan database
Add an API for inserting new scan node before duplicate node
and modification in API to flush oldest entry in SCAN database.

Change-Id: I76018c994ad16f7fb1e52bceafacd82f78f756e5
CRs-Fixed: 2168481
2018-03-15 08:05:09 -07:00
Rachit Kankane
9cc217ab6a qcacmn: Compile out MTRACE feature
Fix to disabled MTRACE feature

Change-Id: I3cc30b47a9ba9dc9f99bf1185f99f0ae621f5f31
CRs-Fixed: 2189886
2018-03-15 08:05:06 -07:00
Karunakar Dasineni
860938ec59 qcacmn: Move monitor interrupt to separate group
Avoid monitor procees starvation by moving monitor interrupts to
a separate interrupt group. Currently these are part of regular
data ring interrupts, and are not being handled sometimes with
DBDC peak throughput, causing ring stall assertion failure in target.

Change-Id: I51d72187c68922de582be0a9da8e191e0e3c7bcf
2018-03-15 06:08:46 -07:00
Rajeev Kumar
0a7a3b15be qcacmn: Ignore qdf debug fs create failure during init/deinit
Debug fs create failure should not fail wifi turn on. Add logic
to allow wifi turn on even if kernel debug fs create API returns
failure.

Change-Id: I686362340d9ef0268ca7587ad30c726c33f1c427
CRs-Fixed: 2203330
2018-03-15 04:26:10 -07:00
Chaithanya Garrepalli
830d585032 qcacmn: Send max commands as param to wmi_unified_attach
Modify arguments of wmi_unified_attach to use struct to
send attach params instead of individual params. Add max
WMI commands as a param. Based on requirement MAX WMI
commands value is different. In case of AP that supports
16 VAPs and more than 512 clients, 1024 commands is not
enough. Use this param to configure this value based on
the requirement.

Change-Id: I4e778475481e509051dfbac70980614b644e1b4a
CRs-fixed: 2034438
2018-03-15 04:26:08 -07:00
Surabhi Vishnoi
11f5bd5daa qcacmn: Move the WMI_MAX_CMDS macro
The WMI_MAX_CMDS macro was defined in wmi_unified_priv.h, move it
to wmi_unified_param.h so that it can be used to set
wmi_unified_attach_params.

Change-Id: I33aaa3c1fb189c7ef660ccbc5262afd0a1ee258b
2018-03-15 04:26:06 -07:00
Dustin Brown
091393ef25 qcacmn: Add new resource config fields
Firmware recently exposed two new resource config fields,
num_packet_filters, and num_max_sta_vdevs. Add these fields to the
host-side resource config struct so appropriate values can be populated
and communicated to firmware.

Change-Id: I951ba6ac929c38c2d78af6705f4922b62fc7d3a1
CRs-Fixed: 2201876
2018-03-14 22:34:17 -07:00
Sravan Kumar Kairam
4af5290d97 qcacmn: Add QDF abstraction for IPA enums
Add QDF abstraction for Linux kernel IPA driver enums.

Change-Id: I9b61917768a109d12aefdc19a7822287337c9c18
CRs-Fixed: 2194166
2018-03-14 22:34:15 -07:00
Abhijit Pradhan
f83b87ed16 qcacmn: Print radar found string when usenol is set to 0 or 1
Print radar found string when usenol is set to 0 or 1.

Change-Id: I051a223c78c40ce9023e9c32bcf3dfaf7ec6e5a0
CRs-Fixed: 2204257
2018-03-14 22:34:12 -07:00
Tallapragada Kalyan
7a47aac367 qcacmn: Remove AST entry from previous peer ast_list for ast update
Remove ast entry from the previous peer ast_list and add it to the
new peer ast_list when ast_update is called

Change-Id: Ic6e628ec2c225e6743d042fe3f3e227cb1864a3c
2018-03-14 09:57:13 -07:00
Santosh Anbu
0a580a3840 qcacmn: Set mpdu data_ptr only for the right buffer length
Handle mpdu data pointer for PMF frames based on EXT IV bit only
if the buffer length requirement is met

Change-Id: I0243105846b1cffc43b87cdcb84c265b216e2e5a
CRs-Fixed: 2202912
2018-03-14 08:27:09 -07:00
jinweic chen
e87355474f qcacmn: fix monitor nbuf double unmap when rmmod
When reaping rx monitor msdu in dp_rx_mon_mpdu_pop, if msdu_ppdu_id >
ppdu_id, then the corresbonding dp_rx_desc will not be added to free list,
and in_use flag still is 1 but it has done nbuf unmap which linked
to this rx desc. meantime, if rmmod triggered then it will go through the
rx desc pool and unmap the linked nbuf that in_use flag is 1, panic
happened. add unmapped flag checking to avoid double unmap.

CRs-fixed: 2201071

Change-Id: Idead32b189f513897deebf646b72585b257151c2
2018-03-13 19:49:13 -07:00
Jeff Johnson
3a7fda4ab0 qcacmn: Remove DPU signatures from TDLS Add STA Response
The ucast_sig and bcast_sig fields in struct tdls_add_sta_rsp date
back to a previous version of the driver that used these signatures to
synchronize the data plane with the control plane. However the current
version of the driver does not use these parameters, so remove them as
the final stage of the plan to completely remove these signatures from
throughout the driver.

Since the converged struct tdls_add_sta_rsp must exactly match the
legacy tSirTdlsAddStaRsp data structure, this change is co-dependent
with the qcacld-3.0 change:
  qcacld-3.0: Remove DPU signatures from TDLS Add STA Response
  Change-Id: I765b090fc5dbe9bdaf83b05a72223c0a12f71a18

Change-Id: I7750fac9e4870d75358606bea427a5dbab97c665
CRs-Fixed: 2200973
2018-03-13 18:41:57 -07:00
Ruchi, Agrawal
d536f88dda qcacmn: Add correct peer macaddr entry for son
Adding correct peer mac addr for HM_WDS son to avoid
target assert

Change-Id: I3c8ecbf46e336997597893c5093e7de698a61182
CRs-Fixed: 2195984
2018-03-13 11:05:37 -07:00
jinweic chen
c3546321b6 qcacmn: add nbuf map result check when replenish
add the nbuf map result checking when replenish rx
nbuf to monitor status ring, this could avoid the
case nbuf map failed and invalid dma address
posted to HW or do unmap for unmapped nbuf.

Change-Id: I45cfc015f71a2d7295f7fcb4803bd6e68e2752d4
CRs-Fixed: 2182546
2018-03-13 06:00:59 -07:00
Vinay Adella
af08a97d27 qcacmn: Add support for vdev level mgmt drain
Change the pdev mgmt drain to vdev mgmt drain.
The pdev drain function drains packets of all vdevs, which causes
an issue with backlog queues maintained for each vdev.
vdev level drain will help to support per-vdev queues that are
maintained out side the qcacmn module.

Change-Id: I78c58e8e12299eb7754f171f2c70291068871b03
CRs-Fixed: 2197254
2018-03-12 22:00:48 -07:00
Dustin Brown
c8e2987f93 qcacmn: Reduce SCHEDULER_CORE_MAX_MESSAGES to 1000
After profiling many iterations of several driver operations, the
observed absolute maximum number of queue scheduler messages was 452
during soft AP startup. Typical maximums for this test case are less
than 100, occasionally getting as high as 250. The median for all of
the driver operations in general were in the range of 1-2. Given this
information, a round number around twice the worst case rate was
picked.

Reduce SCHEDULER_CORE_MAX_MESSAGES to 1000, down from 8000 for MCL.
This saves a significant amount of unused statically allocated memory.

Change-Id: I6ef65db84ca524cea68afbc3bb49347c6d996992
CRs-Fixed: 2202692
2018-03-12 22:00:46 -07:00
Venkata Sharath Chandra Manchala
0ad4fdafb1 qcacmn: Disable TLV for PKTLOG LITE
Disable HTT_PPDU_STATS_TX_MGMTCTRL_PAYLOAD_TLV for Pktlog
Tx path for MCL only as it is currently a requirement
for WIN to keep it enabled.

Change-Id: If162384783139613f1bdad1d3820288a7887286d
CRs-Fixed: 2182626
2018-03-12 21:12:11 -07:00
Paul Zhang
1ac430d086 qcacmn: Reset the master_list[].chan_flags
Currently, the chan_flags in master_list does not reset.
So when changing the country code, the previous counry
code's chan flag will pollute the current country code's.

Change-Id: Idb7bbb2a216a8d756ddcfd2edb090807f098fadf
CRs-Fixed: 2199920
2018-03-12 17:16:47 -07:00
Rajeev Kumar
e7ba79c970 qcacmn: Remove obsolete struct target_resource_config
In WMI struct target_resource_config is obsolete and outdated.
Correct resource config struct is target_resource_config hence
remove the obsolete and outdated struct target_resource_config.

Change-Id: I23aeb46854008dabad4ece953c6eb2c151bedac0
CRs-Fixed: 2202520
2018-03-12 17:16:44 -07:00
Jeff Johnson
6d906fa7ab qcacmn: Remove obsolete TDLS signature
Change "qcacmn: Remove obsolete TDLS peer callback interface"
(Change-Id I32bb1f633b1dd1514aa6e4c3fdea044b3bca0009) removed the
obsolete logic that utilized the TDLS signature field, so remove all
remaining traces of it.

Change-Id: I731c81a0b1f7e5d885cfa18a551ad0d3af3cecbe
CRs-Fixed: 2200972
2018-03-12 15:57:45 -07:00
Jeff Johnson
0e2f7657a2 qcacmn: Remove obsolete TDLS peer callback interface
Change "qcacmn: Introduce new versions of TDLS peer callbacks"
(Change-Id Id4ea23266b0f3e1480b645c5afce6c17585ccb46) introduced a new
interface which removed an unused parameter and changed obsolete
naming.

Subsequently change "qcacld-3.0: Use new TDLS peer callback interface"
(Change-Id: I5c4684ac0a62f314da26f92ece2c9a9874d63634 in project
qcacld-3.0) updated the only registrant to use the new interface. Now
that the old interface is no longer being used, remove it.

Change-Id: I32bb1f633b1dd1514aa6e4c3fdea044b3bca0009
CRs-Fixed: 2200971
2018-03-12 15:57:43 -07:00
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