Commit graph

5,590 commits

Author SHA1 Message Date
Kiran Venkatappa
f3e6bf1557 qcacmn: Add target service ce map for HKV2
HKV2 has support for three radios. Update Target service map
for HKV2 to map third endpoint for WMI commands corresponding to
third radio.

Change-Id: I9b84dedf1fcddf5c6d43e12c6688d8f9ee7db886
CRs-Fixed: 2313124
2018-09-19 02:54:44 -07:00
Sathyanarayanan Esakkiappan
fa1ddd5447 qcacmn: Trigger IRQ on Peregrine/swift by setting IRQ Bit of LF_TIMER 0
Set Interrupt bit of LF_TIMER 0 to induce interrupt on swift/peregrine

Change-Id: I8a3941262dd7a4b19f8734b4017c9293fbb1b981
2018-09-18 16:17:50 -07:00
Qiwei Cai
f9cf9461fd qcacmn: export wmi_mtrace for use in all TLV files
wmi_mtrace is defined as static in wmi_unified_tlv.c and
used in TLV functions, but some TLVs need to be featurized
and moved to separated TLV files. Need to export wmi_mtrace
for external use.

Change-Id: I9459ec01c9cd4a89f3544d6a9831acba56e6a278
CRs-Fixed: 2314779
2018-09-18 11:10:23 -07:00
Shreedhar Parande
9f455d7429 qcacmn: Fix for delay in preCAC timeout for non-weather radar channels
etsi-precac done list will be updated only after CAC finishes on
the primary channel. This list will not get updated for preCAC on
secondary channel. When channel change happens from intermediate
channel(non-DFS) to weather radar channel after preCAC done, preCAC timeout
for rest of the non-erather radar DFS channels were taken as 10min
since that channel will not be present in etsi-precac done list.

In order to fix this, consider primary channel's CAC timeout only
if neither CAC nor preCAC is done on primary channel.

Change-Id: I274b0f07d7d04644e79262fcecf61036ff79f96e
CRs-fixed: 2312912
2018-09-18 11:10:20 -07:00
Ashok Kumar Ponnaiah
ac40b6beda qcacmn: Add optional cabapilites in WPA ie
Add optional cabapilites in WPA ie.

Change-Id: I9be9e5f79837fe21a109d7e4c881023403297736
2018-09-18 11:10:18 -07:00
Shashikala Prabhu
cf7d57c5f6 qcacmn: Do not allocate 0 byte memory in DFS component
In DFS component 0 byte memory is allocated when dfs_nol_count is 0.
We see a print 'allocating 0 bytes at this location' during wifi unload.

Change-Id: I5d6ad36875d634ee5ae6a138656bdb3f538bcdbe
CRs-Fixed: 2316513
2018-09-18 11:10:15 -07:00
Chaithanya Garrepalli
1bbf4f0482 qcacmn: dont reset monitor status ring if monitor vap is created
Do not reset monitor status ring while disabling enhanced stats
when monitor vap is created

Change-Id: I6cef505429a1f73cec6a3b96bd2bbcd1c5539373
2018-09-18 07:50:23 -07:00
Chaithanya Garrepalli
9c73dc02e9 qcacmn: set tx search type appropriately
Set search type only when peer map v2 messaging is enabled
as we will have the search index (AST hash) only when v2 is
enabled

Change-Id: I6c1ab4a4d7519278755d93537a8430755d708a3c
CRs-fixed: 2316418
2018-09-18 07:50:20 -07:00
Vivek
aa6303e509 qcacmn: Make access to serialization timers atomic
The serialization timers can be accessed from multiple contexts
when adding and removing commands to/from the serialization
queues. So the access to the serialization timers should be
atomic to protect the same timers being used for multiple
commands.

The serialization timers are maintained per psoc and are
protected with psoc timer locks.

Also the serialization lock APIs are updated to take the lock
object pointer as an argument

Change-Id: Ibdb41818fde9318fca6bbc92a536858364639365
CRs-Fixed: 2313039
2018-09-18 07:50:17 -07:00
Ruchi, Agrawal
fea1a84116 qcacmn: DSCP-TID map change for second hardware
Change to added entries for 48 DSCP TID  map
for second version of hardware.

Change-Id: Ie4aa0e27616e2f03b012e19d025444c8c53fe341
CRs-Fixed: 2315305
2018-09-18 07:50:15 -07:00
Kiran Venkatappa
6ea211ef2b qcacmn: Update next_twt_size in TWT resume dialog command
next_twt_size is introduced in TWT resume dialog command by FW to
provide next TWT subfield size. Update this field in the TWT resume
command.

Change-Id: Id4e7aacfa2c4890e3b03de17402e7ea29f82826a
CRs-Fixed: 2316475
2018-09-18 06:17:21 -07:00
Radha krishna Simha Jiguru
273407908f qcacmn: Add AST type to distinquish bss on STA
When a BSS peer gets associated with vap configured in sta mode,
the ast type associated with that entry should be different from
that of regular static entries, The reason being bridge on root AP
can pick up the mac address of AP VAP.

Change-Id: Ie322a015d883e2712f41623f71ccbc255b99baf3
2018-09-18 06:17:18 -07:00
gaurank kathpalia
8a339e8a87 qcacmn: Enable ML logging for wmi_control_rx
Enable ML logging in wmi_control_rx and capture all
responses from firmware.
This would result in knowledge of whether the wmi_response
or any wmi_event was received by the host.

Change-Id: I0206a5b9bd357d06a8621747473dedecaa1779f2
CRs-Fixed: 2306047
2018-09-18 06:17:15 -07:00
Rachit Kankane
f96c05eb03 qcacmn: Featurize Roam offload specific WMI cmds
Featurize WMI_ROAM_SYNCH_COMPLETE and WMI_ROAM_SET_RIC_REQUEST_CMDID
under WLAN_FEATURE_ROAM_OFFLOAD feature flag.

Change-Id: Ib5baaea04582049c47a78491c88a9860f688d5bb
CRs-Fixed: 2304139
2018-09-18 01:03:12 -07:00
Amar Singhal
cdaca1af95 qcacmn: Put debug log when channel number is out of range
Channel number being out of range is not expected for a pdev. Put debug
log for the same.

Change-Id: Iaccec084e2bc22a3955915ad48a55d16963b49a5
CRs-Fixed: 2316097
2018-09-18 01:03:09 -07:00
Jianmin Zhu
3afa437247 qcacmn: Fix possible buffer overflow when extract cp stats
No data length check when extract control panel stats of pdev,
vdev and peer etc, may result in buffer overflow.

Fixed param of cp stats indicates numbers of pdev, vdev and peer
etc in cp stats. Need do length check to make sure actual tlv
data length is same as expected.

Change-Id: I8750d4e10048930222059897a24804e9f2c91ab5
CRs-Fixed: 2305421
2018-09-17 21:29:33 -07:00
Ruchi, Agrawal
5b1028e3d3 qcacmn: Resolve compilation issue for ewma
Resolve compilation issue due to ewma.

Change-Id: I6555de6a357a04faab747b419be9e3eb1b285998
CRs-Fixed: 2308338
2018-09-17 21:29:30 -07:00
Sathish Kumar
86876490f2 qcacmn: CE services separation for legacy and lithium architecture
CE service file includes APIs for both legacy and lithium
architecture.

These are getting compiled for both targets today. Separate the CE
services into legacy and srng and selectively compile based on
targets present in the SoC.

Note: Generic APIs implemented for both legacy and SRNG services
      are separated out through this change. Fast path implementation
      will be de-coupled from common service and moved to legacy source
      in a follow-up change.

CRs-Fixed: 2258640
Change-Id: If86c21c0bf560a360474c9efcdbcd4841a09828d
2018-09-17 21:29:26 -07:00
Keyur Parekh
04e5a8614b qcacmn: Corrected SGI enum values for HE
For HE case, SGI enum values are different in FW and Host
So that firmware stats and host stats shows different values
To resolve this, change SGI enum value in host to match
firmware definitions.

Change-Id: I1b38dbe32a6c1ab2610c1c3a736a6898ddc73e30
2018-09-17 21:29:22 -07:00
Manikandan Mohan
33cfb578b0 qcacmn: Fix NULL pointer dereference in qdf_nbuf_free
Move network buffer null check to beginning of function to
cover possible case of null pointer dereference during free.

Change-Id: I8c998d4d1711ab28c94a946d04314c26a4c74278
CRs-fixed: 2309452
2018-09-17 17:53:52 -07:00
phadiman
8a32229408 qcacmn: Add rate limiting to scm prints
Heavy print from scan module slowing down
frame processing and caused the scheduler
buffer to be full causing buffer full assert

Move scm_err to scm_err_rl which will add
print rate limiting

CRs-Fixed: 2313262
Change-Id: I4eebe7eeb0e52e0858eb064717a5ce457ac891e2
2018-09-17 17:53:50 -07:00
Keyur Parekh
76eadf4265 qcacmn: Populate mcs value for legacy traffic
Populate mcs value for legacy traffic, to display
packet count in correct category in statistics

Change-Id: Ic5ddbc48d3378a884d5c7a189e53ddb7195c21d2
2018-09-17 17:53:47 -07:00
Krunal Soni
7c4565f22f qcacmn: Fix race by acquiring vdev_list_lock before removing vdev
When multiple STA-PEERs are connected to SAP-DUT device and if SAP
is getting shutdown then as part of shutdown:
1) PEER delete happens first and as part of it,
   firmware sends peer_unmap event in interrupt-context.
2) entire peer_unmap handling happens in interrupt_context on one
   of the available CPU-core.
3) as part of peer_unmap handling, driver removes the peer from
   peer_list first and then cleans up its peer data structure.
4) so between peer getting removed from peer_list and
   peer data structure getting cleaned up;
   control thread (hdd_vdev_destroy/IOCTL/mcthread),
   which is running on different CPU core in process-context,
   takes control.
5) control thread checks if peer_list is empty. If it is empty then
   cleans dp_vdev structure.
6) so when interrupt_context is cleaning up peer data-structure queue,
   it gets stability issue while accessing dp_vdev structure which is
   already cleaned up by control thread.
Fix the situation by cleaning-up the peer data-struct first and
then remove peer from peer_list

CRs-Fixed: 2291861
Change-Id: I39675bbe4448df57911963942800cbcede508917
2018-09-17 16:10:52 -07:00
Chaithanya Garrepalli
157543d36f qcacmn: free all the ast entries before freeing ast table
While freeing the AST table traverse through table and
free any AST entries present in the table

Change-Id: I87382da2425380938d91ee1980a9c356c0f647ef
CRs-fixed: 2275212
2018-09-17 09:39:04 -07:00
Kiran Venkatappa
ed35f4499d qcacmn: Add logic to wait for wds del resp before peer create
WDS entry should be removed before adding peer with same mac address.
iIn DBDC mode, this can be ensured only by waiting for response for WDS
delete from FW before creating peer. Add logic to defer AUTH until WDS
is removed from FW.

Change-Id: Ie76d08c4817f953504913ae6cc49fc5388169e4a
CRs-Fixed: 2270592
2018-09-17 09:39:01 -07:00
Radha krishna Simha Jiguru
d359eb4268 qcacmn: Send ast hash value to NetAP
Send the ast hash value received in peermap to
NetAP for offload mode

Change-Id: I094c890d651fbe14d995a299d6a369394512c8b2
2018-09-17 09:38:58 -07:00
Harprit Chhabada
94508fceaf qcacmn: Update kernel version check
Kernel version check updated for fils akm suite
to support x86 kernel.

Change-Id: I19f57a91ddda90e3007ec26f35ddec95073df1c5
CRS-Fixed: 2315925
2018-09-17 06:09:55 -07:00
gaurank kathpalia
85e55d12d6 qcacmn: Add src, and dst id support in PKTLOG(WMA)
In the scheduler_post_message, src_id is now added to
know the source module of the msg. the present scheduler
doesn't know about the same which is scheduler_post_msg

Replace the scheduler_post_msg with scheduler_post_message

Change-Id: I166f4c943b9a21749c53ed19101b0ed0defd8491
CRs-Fixed: 2306013
2018-09-17 06:09:52 -07:00
gaurank kathpalia
5f5b7039bf qcacmn: Add src, and dst id support in TARGET-IF
In the scheduler_post_message, src_id is now added to
know the source module of the msg. the present scheduler
doesn't know about the same which is scheduler_post_msg

Replace the scheduler_post_msg with scheduler_post_message

Change-Id: I24a94a898fc1f8c3c1e2f1faca0ef51aacdb238c
CRs-Fixed: 2306016
2018-09-17 06:09:48 -07:00
gaurank kathpalia
5d3b5a2424 qcacmn: Add src, and dst id support in TDLS
In the scheduler_post_message, src_id is now added to
know the source module of the msg. the present scheduler
doesn't know about the same which is scheduler_post_msg

Replace the scheduler_post_msg with scheduler_post_message

Change-Id: I184827ec58625dc60be67b8f16aa7e698ecc893e
CRs-Fixed: 2306014
2018-09-17 04:27:08 -07:00
Vivek
1a71e634a8 qcacmn: Remove redundant check when moving cmd from pending to active
The API wlan_serialization_is_active_cmd_allowed should used
when a serialization request is received and we need to decide
if a command can be moved to active queue or pending queue.

However when moving pending to active, the logic to move pending to
active is implemented in the function itself and is different from
what is implemented in wlan_serialization_is_active_cmd_allowed and thus
should not be used.

Change-Id: If04edf4a0012d9ae6cbbea9606b0e6b962f10b65
CRs-Fixed: 2312991
2018-09-17 04:27:05 -07:00
Venkateswara Swamy Bandaru
33b1bdd1b6 qcacmn: Fix bucket calculation in NAPI case
Take care of corner case when normlized value is just
one more than QCA_NAPI_BUDGET and add normlized to debug prints.

Change-Id: Ife2010b0ada534a487639dbb780e24445d98c045
CRs-Fixed: 2286601
2018-09-17 04:27:02 -07:00
gaurank kathpalia
d0499517e4 qcacmn: Add src, and dst id support in UCFG/HDD
In the scheduler_post_message, src_id is now added to
know the source module of the msg. the present scheduler
doesn't know about the same which is scheduler_post_msg

Replace the scheduler_post_msg with scheduler_post_message

Change-Id: I37532d323a0945b522087a23a65396ba2899fb5b
CRs-Fixed: 2306011
2018-09-17 02:58:18 -07:00
gaurank kathpalia
f6e13db4b6 qcacmn: Add src, and dst id support in DFS
In the scheduler_post_message, src_id is now added to
know the source module of the msg. The present scheduler
doesn't know about the same which is scheduler_post_msg.

Replace the scheduler_post_msg with scheduler_post_message.

Change-Id: I954a56eb960e8caab25f0734da2f8badf77cad3a
CRs-Fixed: 2306020
2018-09-17 02:58:15 -07:00
gaurank kathpalia
6ec44e61ba qcacmn: Add src, and dst id support in REGULATORY
In the scheduler_post_message, src_id is now added to
know the source module of the msg. The present scheduler
doesn't know about the same which is scheduler_post_msg.

Replace the scheduler_post_msg with scheduler_post_message.

Change-Id: Ia8c9355528b430bda9231c24c07a648f1931e0eb
CRs-Fixed: 2306018
2018-09-17 02:58:13 -07:00
Keyur Parekh
ba75857390 qcacmn: Populate proper Rx reception type
Rx reception type for packet was populated from
wrong TLV. Populate reception type based on
HT,VHT or HE TLV tags

Change-Id: I3240a9f029b0bfeee8833761531e086bc5df6f91
2018-09-16 22:35:23 -07:00
Chaithanya Garrepalli
710e2959f2 qcacmn: Add HAL APIs to set search type and index
HAL APIs added to set search type and search index
in tx descriptor

Change-Id: I9fc2eae5d1f75a7cb72ba141f45a60f248b52f9c
CRs-fixed: 2312178
2018-09-16 09:49:13 -07:00
Chaithanya Garrepalli
2467ed1445 qcacmn: avoid wds source port learning for STA in HKV2
Changes to avoid WDS source port learning in STA mode
if ast override feature is supported by HW

Change-Id: I248c8815429e7417dcf3f451912ee5f037af9c25
2018-09-15 21:21:23 -07:00
Chaithanya Garrepalli
3e93e5f8ae qcacmn: changes to enable peer map V2 messaging
Host changes to enable HTT version 2 messaging for
PEER map and unmap in FW and changes to handle these
messages in host

Change-Id: Ifbe478212bbbc9c9ea1c1e4791c7a78407c376cc
2018-09-15 11:11:04 -07:00
Priyadarshnee S
1e838726f1 qcacmn: Address NULL pointer reference in scm_11d_handle_country_info()
When a 2G AP vap is brought up on a "WORLD" regdomain (say 0x30),
reg_is_world_alpha2() returns true. Also "enable_11d_in_world_mode" is set
true by default during reg psoc creation. When a regdomain is set, process
master channel list is invoked during which "enable_11d_supp" is set to
true as regdomain is "WORLD" and "enable_11d_in_world_mode" is also set to
true.

As "reg_11d" is enabled, during beacon and probe processing, country
update is done and scm_11d_handle_country_info() is called. 11d feature is
specific to MCL and hence on WIN code base, it causes invalid memory
access and it panics.

"enable_11d_in_world_mode" is MCL specific feature and is disabled for WIN
to avoid any call to scm_11d_handle_country_info for WIN codebase.

CRs-Fixed: 2310809
Change-Id: I7bcac4052c96917120adc59e9e2eaa0e3da8dff1
2018-09-15 07:40:13 -07:00
Rakshith Suresh Patkar
9cee4926f9 qcacmn: Add support for WBUFF module
Introduce a new module WBUFF, which maintains a
pre-allocated pool of skbs for each registered
module and allocates skbs when requeted from
these pre-allocated pools.

The module exposes the following APIs:
 1) wbuff_module_init
 2) wbuff_module_deinit
 3) wbuff_module_register
 4) wbuff_module_deregister
 5) wbuff_buff_get
 6) wbuff_buff_put

Change-Id: Icab723ce29a9a364c822756dee78a0dae1006180
CRs-Fixed: 2313443
2018-09-14 23:15:00 -07:00
Manikandan Mohan
2c3e194509 qcacmn: Fix OOB access in WMI_SAR_GET_LIMITS_EVENTID
Update handling of WMI_SAR_GET_LIMITS_EVENTID for a possible OOB that
can occur if param_buf->fixed_param.num_limit_rows is greater than
actual TLV length of param_buf->sar_get_limits array.

Change-Id: Iccacbb3689e6a7bdd73b2b1f0517d011ccf6d076
CRs-fixed: 2307276
2018-09-14 15:39:14 -07:00
gaurank kathpalia
cb62e4f846 qcacmn: Add src, and dst id support in P2P
In the scheduler_post_message, src_id is now added to
know the source module of the msg. the present scheduler
doesn't know about the same which is scheduler_post_msg

Replace the scheduler_post_msg with scheduler_post_message

Change-Id: I558adf0cf0335972a1318a5a33d22dc01d545645
CRs-Fixed: 2306015
2018-09-14 14:01:46 -07:00
Harprit Chhabada
61851e7f4d qcacmn: Initialize the struct variable
Initialize the cancel_scan_event variable used
in ucfg_scan_cancel_sync().

Change-Id: I120b14db6f31449136b74b28d452e029eace16cd
CRs-Fixed: 2313447
2018-09-14 12:18:23 -07:00
gaurank kathpalia
6a88d7bcad qcacmn: Add src, and dst id support in SCAN
In the scheduler_post_message, src_id is now added to
know the source module of the msg. the present scheduler
doesn't know about the same which is scheduler_post_msg

Replace the scheduler_post_msg with scheduler_post_message

Change-Id: I1f543cd443ab8cb19bf36fb581041ed3393077e8
CRs-Fixed: 2306017
2018-09-14 08:16:54 -07:00
Srinivas Pitla
90713473d1 qcacmn: Implement VDEV MLME State machine
This change implement VDEV MLME State machine based on design,
and handles valid events in each state and invokes legacy callback
APIs to perform state specific operations

Change-Id: I38a11778cba31276c720bc13c085ade60b1fb0c4
CRs-Fixed: 2307722
2018-09-14 08:16:51 -07:00
Srinivas Pitla
be8dac4d5d qcacmn: Define VDEV MLME component object
This change defines VDEV MLME object, and registers with object manager to
be notified on creation/destroy, and also initializes MLME SM

Change-Id: I75bb7de7326e4bbed21ef9653427c4e0694c3ffc
CRs-Fixed: 2307722
2018-09-14 08:16:48 -07:00
Srinivas Pitla
bc7748c852 qcacmn: Implement State machine framework
This is generic state machine framework, which provides APIs for state
definition, state transition, event posting

Change-Id: Ie7d5a064967098fcb77a663047c479d1d1576595
CRs-Fixed: 2307722
2018-09-14 08:16:44 -07:00
Anish Nataraj
2ae5e4c142 qcacmn: Add Rx nawds mcast drop counter while aggregate
Currently aggregate vdev/pdev is missing Rx nawds mcast drop
counter, add nawds mcast drop counter from peer

Change-Id: I10650639bf5c56410c0f5311090c8a544df89d5d
2018-09-14 08:16:41 -07:00
Radha krishna Simha Jiguru
91f9949832 qcacmn: Send ast_hash for peer create in nss
Add support to send ast hash during peer create.
This value will be used for packet enqueue to transmit block.

Change-Id: Iea188a4b60f96d7770037265d12e534ee2b55bba
2018-09-14 03:12:38 -07:00