Revīziju grafs

5012 Revīzijas

Autors SHA1 Ziņojums Datums
c_cgodav
862541432b qcacmn: Add api for dumping the CE discriptors
API for dumping the CE descriptors copies all descriptors for
the given Copy engine id and also copies the SKB packet pointed
by the descriptors till smart_log_skb_sz bytes.

Change-Id: I511bda77319944c1ec2377f716087956ce0637ac
CRs-Fixed: 2008290
2018-06-21 05:22:22 -07:00
Krishna Rao
cae37fee6e qcacmn: Add definitions for fatal condition event type/subtype
Add host WMI definitions for the type and subtype fields in
wmi_fatal_condition_event.

CRs-Fixed: 2257956
Change-Id: I2c7043081de86a42b3e89ade34d4a1ffc0c39d77
2018-06-21 05:22:20 -07:00
c_cgodav
b69942b3c9 qcacmn: CE Debug Enhancements WMI interface
Add WMI interface for the smart logging feature.

Change-Id: Ife3784020d1b9458c2b09b6a2f31f55aab5f57ec
CRs-Fixed: 2001507
2018-06-21 05:22:17 -07:00
Ashish Kumar Dhanotiya
6f00d693a9 qcacmn: Vendor command support to enable/disable GTX
Add vendor command support to enable or disable GTX.
Currently there is no vendor attribute to enable/disable
GTX from vendor command. Add vendor attribute
QCA_WLAN_VENDOR_ATTR_CONFIG_GTX support through
QCA_NL80211_VENDOR_SUBCMD_SET_WIFI_CONFIGURATION vendor command
and with new wmi command WMI_VDEV_PARAM_GTX_ENABLE.

Change-Id: I8a740f9209ffd5f6438c3cfdd830ee2a76d0aa52
CRs-Fixed: 2261322
2018-06-21 01:58:58 -07:00
Shaakir Mohamed
a0895b9989 qcacmn: Add support for ETSI pre-CAC cleared list
In ETSI domain, after CAC, channel is added to ETSI CAC cleared list,
so that next time it can skip CAC if channel is already present in this
list. If radar found, remove channel(s) from this list indicating that
when channel(s) is/are selected in future, the CAC needs to be re-done.

Change-Id: If6b31ecda2ab159188e7724bce7d1c2d8375fa3c
CRs-Fixed: 2143266
2018-06-20 21:23:28 -07:00
Qiwei Cai
d56247e9e4 qcacmn: Featurize WLAN_FEATURE_LINK_LAYER_STATS
Featurize WLAN_FEATURE_LINK_LAYER_STATS to compile out in mission mode.

Change-Id: I16b7ffe869f6e46736693a02b58954a50e31b03b
CRs-Fixed: 2244583
2018-06-20 15:19:52 -07:00
Naveen Rawat
8d36892372 qcacmn: Fix OOB access in utils_dfs_get_chan_list
Fix out of bound access for array "weight_list" with size 55 bytes
and declared on stack of function utils_dfs_get_chan_list. Same memory
is accessed in function policy_mgr_update_with_safe_channel_list with
index 127, leading to OOB access.

Change-Id: Ib7ba74e0096e90fd197bc563d2e82e497cf83759
CRs-Fixed: 2232833
2018-06-20 14:01:17 -07:00
Nachiket Kukade
b29adc4a4f qcacmn: Implement the commands that cover APF 3.0 requirements
Android Packet Filter 3.0 requires the framework to be able to
read and write into the APF work memory in the Firmware. It
also requires to be able to enable or disable the interpreter.
New WMI commands are defined for read/write/enable/disable
operations.

Complete the implementation of these new commands.

Change-Id: I852d61eb213d9ae530e8a71069144ef35816f5b8
CRs-Fixed: 2184971
2018-06-20 12:53:13 -07:00
Naveen Rawat
2e7637575d qcacmn: Free memory for stats event to os_if in timeout
In case os_if request times out, free the corresponding
memory allocated for stats event to os_if.

Change-Id: I23bd65f2b79c71070d65b5e4045eaf4e17113354
CRs-Fixed: 2262653
2018-06-20 07:59:40 -07:00
Nandha Kishore Easwaran
5840784be3 qcacmn: Fix invalid format specifiers for kernel addr
Change format specifiers to print kernel vaddr from
%p to %pK.

Change-Id: Ice98161bb1b8b5feb1d8ee1ba8a95b7d552f9403
CRs-Fixed: 2211136
2018-06-20 07:59:37 -07:00
Debasis Das
78495ce966 qcacmn: Fix Integer Overflow Leading to Buffer Overflow
wmi_buf_alloc() API expects length to be passed of type
uint16_t. However, the callers pass uint32_t to it.
This might result in overflow and illegal memory access
thereafter. The fix is to modify the API signature accordingly.

Change-Id: If09da4978d421269b884f7d3c933c49c81651475
CRs-Fixed: 2218346
2018-06-20 06:33:47 -07:00
Sravan Kumar Kairam
da542178c9 qcacmn: For dp peer reuse add peer to pdev local peer id map
Currently peer is not added to the dp pdev local peer id map when
resuing the peer reference. As a result register peer with the
dp fails and tx is not allowed. This leads to connection failures
as EAPOL tx is not permitted. In this change add peer to the pdev
local peer id map when existing dp peer reference is used.

Change-Id: I02221115e07450466ad165a6e0861d340cdbda4a
CRs-Fixed: 2241763
2018-06-20 04:06:00 -07:00
Kiran Venkatappa
6dfc2c26ec qcacmn: Add nbuf debug version for qdf_nbuf_unshare API
skb_unshare may create copy and return different skb. If skb_unshare
returns different skb, remove debug node for the original skb and add
new debug node for the returned skb.

Change-Id: Ib511cde241ea7a44bd726912c225452722d953a7
CRs-Fixed: 2260467
2018-06-20 04:05:57 -07:00
Ryan Hsu
c84218fed7 qcacmn: Add SSR callbacks
As CDS is not usable by WIN, add callbacks that are
registered in QDF and correct the module dependencies.

Also moves the platform related function to qdf_platform.[c|h]

Change-Id: I3080e9df86770235ff46237b8a2ffb9c2a3c9c2c
CRs-fixed: 2130260
2018-06-20 04:05:54 -07:00
Ryan Hsu
9d56e3a4c0 qcacmn: sanitize the range of local_id before using it
Sanitize the local_id before accessing to the local_peer_ids pool.

Change-Id: I5cd2f19d493360d384de895dccfaf51d3008b5b7
CRs-fixed: 2247672
2018-06-20 02:30:57 -07:00
Nachiket Kukade
fa7a033cac qcacmn: Add enum for listen interval offload support
Add service enum and populate service id for listen
interval offload support so that wmi_service_enabled
API can be used to check if the support is enabled.

Add enum for listen interval offload support

Change-Id: I62dbadb4980f54db8431ad53d096f7fc210d25d7
CRs-Fixed: 2253684
2018-06-20 02:30:55 -07:00
Qiwei Cai
1c8f4f7be2 qcacmn: Featurize wlan roam debug
Featurize wlan roam debug log to compile out in mission mode.

Change-Id: Ic3dcdc6ab541093f16fcc8b9118120aa1f9b972f
CRs-Fixed: 2241297
2018-06-20 00:43:28 -07:00
Wu Gao
cd23d9575c qcacmn: Cleanup roc and handle tx ack in schedule thread
To avoid different thread delete the roc context or tx context at same
time, move cleanup roc and handle tx ack in scheduler thread.

Change-Id: Idc2a5394886a2e10c3acfabe139365dd263d6c0a
CRs-Fixed: 2211827
2018-06-20 00:43:26 -07:00
Dundi Raviteja
7cdfa7318f qcacmn: Incorrect usage of QDF_ARRAY_SIZE macro
In some use cases of QDF_ARRAY_SIZE macro, the argument passing
to it is a pointer instead of array which leads to getting
incorrect array size.

Current implementation of updating main arrays pcl_list_org and
weight_list_org is inefficient. So, update the main arrays directly,
instead of copying the data to local arrays and again updating the
main arrays.

Change-Id: I9a4a7fa813412fd000ce55d2a958e49ab1b02ed5
CRs-Fixed: 2262231
2018-06-20 00:42:57 -07:00
Bala Venkatesh
d576e7fba8 qcacmn: Populate PCL list correctly using channel select logic ini
Currently, PCL list is populated without checking channel select logic
ini. Check for channel select logic ini before selecting the second
connection pcl table.

Change-Id: I5a64d4ff43a7dcc2c70eac75b51d5f87de2903bb
CRs-FIxed: 2237403
2018-06-19 22:42:35 -07:00
Bala Venkatesh
832f0e8243 qcacmn: Skip CAC and ignore radar indication for SAP
If STA is already connected on DFS channel and SAP is going to start
on the same channel then skip the CAC for SAP.
If STA and SAP sessions are already operating on same DFS channel,
then ignore radar indication received on SAP interface.

CRs-Fixed: 2262494
Change-Id: Ife0ab6979a07c8773001a43f5a30c9a555dab37a
2018-06-19 22:42:33 -07:00
Zhu Jianmin
3bd52b06e9 qcacmn: ini parameter to allow STA+SAP SCC on LTE coex channel
When Force SCC and STA+SAP SCC on LTE coex channel are enabled:
   1. When STA on LTE coex channel, start SAP, select STA
      channel.
   2. When SAP on, connect STA on LTE coex channel, then switch
      SAP channel to STA channel.

Change-Id: I7864e0ab2655c3bee95154ea4dedfb60fe8689e4
CRs-Fixed: 2261226
2018-06-19 21:17:14 -07:00
Madhvapathi Sriram
96863531f1 qcacmn: Add management frame over WMI support for HL transport
QCN7605 requires Management frames to be transported over WMI.
Enable this for HL transport too.

Change-Id: I97551684224cf027beadb403ac2220fa355af986
CRs-Fixed: 2252391
2018-06-19 21:17:11 -07:00
Tushnim Bhattacharyya
1b6202d341 qcacmn: Restrict the force SCC logic for STA+SAP only
Restrict the force SCC logic for STA+SAP only unless ini is set for
QDF_MCC_TO_SCC_SWITCH_FORCE_PREFERRED_WITHOUT_DISCONNECTION.

Change-Id: If2c4c285b92ea5eba69679561c32875cff5f7b08
CRs-Fixed: 2261717
2018-06-18 16:34:01 -07:00
Vignesh Viswanathan
c352d60731 qcacmn: Fix Uninitialized byte sent to FW in wmi_unified_cmd_send
In wmi_unified_cmd_send, the skb head is pushed by size of WMI_CMD_HDR
and then the commandId is initialized in the header. However 1 byte of
reserved memory in the WMI_CMD_HDR is not initialized and is sent to
the FW as it is and this might lead to exposure of 1 byte of kernel
memory to FW.

Initialize the WMI_CMD_HDR to zero once the skb head is pushed and
then set the commandId in the header.

Change-Id: I89fd5401105cd9c61674a63aac5aa88fb20cc41a
CRs-Fixed: 2257688
2018-06-18 16:33:57 -07:00
Nachiket Kukade
d460329ba2 qcacmn: Send enable/disable flag separately in hw filter command
Before wow enable or pdev suspend host sets hardware filter bitmap
and enables the filter via a command. But after resuming it sends
bitmap as zero with filter disable. This is interpreted by Firmware
as disable the modes set in the bitmap, so none of the modes are
disabled. With this host will not receive bc/mc packets after
disabling the hw filter, which it is expecting.

Use the correct bitmap sent by cld for disabling the hw filter.

Change-Id: I465e2ec40b6fde8a9e99743a1b9979b67cce5408
CRs-Fixed: 2194973
2018-06-18 16:33:54 -07:00
Nachiket Kukade
a52b8182da qcacmn: Rename legacy definitions containing BPF to APF
In implementation of Android Packet Filter, functions, variables,
definitions are named after BPF, which stands for Berkely Packet
Filter. The term was more appropriate for Link Layer packet
filters implemented in the Linux kernel, known as Linux Socket
Filters.

The term BPF is obsolete now, so rename it with the
appropriate acronym, APF.

Change-Id: I606afc747cddedb524a41cd8e5998400f04e69f6
CRs-Fixed: 2191531
2018-06-18 16:33:52 -07:00
Nachiket Kukade
f412a02f22 qcacmn: Refactor APF related common modules in separate
File wmi_unified_tlv.c is bloated and adding support for upcoming
Android Packet Filter v3 is going to increase its size even more.
Create a new source file for APF related WMI modules and a header
file for declaring the API's

Change-Id: I37dcc30c7d1311067f375c891be9723612161de9
CRs-Fixed: 2189827
2018-06-18 16:33:49 -07:00
Vignesh Viswanathan
4c9e971f8e qcacmn: Deregister NL MSG handlers during hdd_wlan_exit
Currently the NL MSG handlers for WLAN_NL_MSG_CNSS_DIAG, ANI_NL_MSG_PUMAC
and ANI_NL_MSG_PTT are not deregistered during hdd_wlan_exit which can
causes a page fault if NL issues cld80211_doit for these NL messages
when the WLAN is not up.

Add Deregsiter APIs for all the NL MSGs to call as part of
hdd_exit_netlink_services during hdd_wlan_exit.

Change-Id: I231e2f32e708e9a14305f0a8f9f2f603aa42b031
CRs-Fixed: 2243993
2018-06-18 16:33:47 -07:00
Sathish Kumar
2318e0f0e7 qcacmn: Free napi context allocated during hif_napi_create
NAPI context allocated during hif_napi_create is freed in
qca_napi_destroy path based on the conditions that NAPI state
is enabled and NAPI context is created for the CE.

There can be cases when the NAPI context is created for the CE
but the current NAPI state not be enable. In such scenarios, NAPI
context is not getting freed in the destroy path.

Add hif_napi_created API to check if NAPI context is created for CE,
and use it in destroy path.

Also, NAPI object allocated is not freed after alloc during cases
when there is a failure in subsequent operations. Free NAPI object
aptly as required.

Change-Id: Ifcc21d70ba52ca309a913ac564406db627e11249
CRs-Fixed: 2256037
2018-06-18 16:33:45 -07:00
Ashok Ponnaiah
513c8ead13 qcacmn: Init crypto params with default value
Crypto params are not initalized with default values.
Crypto params initalized with default value during vdev
and peer creation.

Change-Id: I8adacc8b2770e3518bfbfe2da2eb3f6e0d9a5586
Crs-Fixed: 2251816
2018-06-18 16:33:42 -07:00
wadesong
d58eaf419e qcacmn: Fix incorrect indention
Fix the incorrect indention in function
util_scan_populate_bcn_ie_list, which causes newer versions of
gcc complaining.

Change-Id: I2ea0f2ea5bf3e381a789ae832f56a43d511e898e
CRs-Fixed: 2247021
2018-06-15 21:31:21 -07:00
Nirav Shah
faa27fbe89 qcacmn: Fix compilation error for LINUX_VERSION_CODE
Fix compilation error for LINUX_VERSION_CODE in
i_qdf_time.h.

Change-Id: I4878594c398686d296f218b678247c5afa2f6ed0
CRs-Fixed: 2258897
2018-06-15 21:31:18 -07:00
Nirav Shah
79ec3e999b qcacmn: Add support to configure buffer size from kbuild
Add support to configure logging buffer size from
per-OEM kbuild based on memory requirement.

Change-Id: Ia91d79e5e738b1c9787015de101c3f67ccde46aa
CRs-Fixed: 2253438
2018-06-15 21:31:16 -07:00
Shashikala Prabhu
ab1d4c30ca qcacmn: Cleanup dfs unused function
Cleanup dfs_mlme_channel_mark_radar unused function.

Change-Id: I16aeacbca8f44de4dcab5667b6065fbb9b5c39d7
CRs-Fixed: 2245665
2018-06-15 20:10:50 -07:00
Bala Venkatesh
96bdde1b07 qcacmn: Fix TDLS tear down issue on initiator
The tdls peer sta id is allocated as part of wma_create_peer.
In HDD, as part of change interface,
wlan_hdd_tdls_disable_offchan_and_teardown_links API is called.
Here driver checks for valid TDLS peers based on staid.
Here HDD assumes staid zero as invalid and non zero values as
valid ID. This is not correct as staid zero also is a valid
staid. Due to this teardown status is not informed to upper layers.

Use 0xFF as invalid sta id for tdls peer to fix this issue.

Change-Id: I3827df9a63081952b2d443c175ef5a59eab85e43
CRs-Fixed: 2258171
2018-06-15 14:49:17 -07:00
Vinay Adella
873dc40d46 qcacmn: Beacon to replace a probe response
Cancel broadcast of probe response if beacon is already sent
in beacon offload.

Change-Id: I4fea51433fbb959e05988c2daac89fbe839b1cdf
CRs-Fixed: 2209282
2018-06-15 12:39:38 -07:00
Kiran Venkatappa
68cd728ed8 qcacmn: Fix compiler failure with HOST_DFS_SPOOF_TEST not defined
Callbacks are defined for both cases, so remove compiler
flag around callback declaration and assign callback for both
HOST_DFS_SPOOF_TEST enabled and disabled cases.

Change-Id: I5e3cedaaa5be550243ac090da3ab6499c5e83904
CRs-Fixed: 2249806
2018-06-15 12:39:36 -07:00
phadiman
65eb1b106f qcacmn: Add sanity checks
Add sanity checks for peer and
dbr_pdev_obj->dbr_mod_param structure

Change-Id: I9412be7b96df2ea62d5f0ec7d709fb45eb3849ce
2018-06-14 23:54:14 -07:00
Wu Gao
7d5128c79b qcacmn: Initialize id before tx MGMT frame
It use an uninitialized variable to TX (not wait ack) MGMT frame.

Change-Id: I46c96a2879a945e8284c436e5ff6b761e1c246ba
CRs-Fixed: 2254688
2018-06-14 23:54:12 -07:00
Sandeep Puligilla
f57464c549 qcacmn: Add an API to check if scan is completed
Add a new scan util API to check if scan is completed and
if scan is success.

Change-Id: Id60056b999a7ec23df3d3458d4498d547f6ec4d9
CRs-Fixed: 2248972
2018-06-14 23:54:10 -07:00
gaolez
9bb98176f3 qcacmn: Add length check in ndp event handler
qcacld-2.0 to qcacld-3.0 propagation

Add length check to prevent the data overflow the wmi buffer. The
total length of data should not exceed max svc msg size.

CRs-Fixed: 2248879
Change-Id: I1543732fcfe0cb7e32f7175f7775c9550854cae8
2018-06-14 20:55:52 -07:00
Yuanyuan Liu
f40b2202d4 qcacmn: Add support for WCN3998
Add support for WCN3998.

CRs-Fixed: 2246597
Change-Id: I0c19c8d47d9480e427019e9bf219d95e1ced0614
2018-06-14 20:55:49 -07:00
Rajeev Kumar
c396c9015a qcacmn: Log reason code while flushing logging events
Log reason code while flushing logging events to precisely know
the reason of failure.

Change-Id: Ibe26563780f165e85490c54c2b4f83d959a3587f
CRs-Fixed: 2235276
2018-06-14 20:55:47 -07:00
Sravan Kumar Kairam
76fb31df31 qcacmn: Reduce logging in REO NULL queue desc error case
Excessive logging to console in dp_rx_null_q_desc_handle which
executes in soft irq context is leading to scheduler watch dog bite.
Reduce the severity of the logs to prevent flooding to the console.

Change-Id: I7cced611be6f59d31d315f797fe95ea465658009
CRs-fixed: 2242652
2018-06-14 18:35:29 -07:00
Vignesh U
916926fd97 qcacmn: Move DFS functions to appropriate files
Move the functions dfs_set_update_nol_flag and dfs_get_update_nol_flag
from dfs_cac.c to dfs_nol.c.

Change-Id: Ie2829bf10d5c6f61c4cc062f54c4c9ca2cc6e34b
CRs-Fixed: 2252573
2018-06-14 15:20:43 -07:00
jitiphil
4a8f66f382 qcacmn: NULL pointer dereference in htc_issue_packets()
Inside htc_issue_packets() if the HTC frame header
associated with a packet is NULL, a NULL pointer dereference
can occur.

Add check to verify that HTC frame header is not NULL before
dereferencing.

Change-Id: I4169035286b582a91e5963c20a11c8ad0f375d17
Crs-Fixed: 2232846
2018-06-14 15:20:40 -07:00
Dustin Brown
b4fd609e03 qcacmn: Reduce excessive p2p logging during suspend
Several bits of debug information are being logged to console from the
p2p module, which is seen consistently during suspend/resume. Reduce the
logging level of these debug logs to avoid spamming the console.

Change-Id: I4cf63e88a9d0391fb366b11fa3eb14e9f2f69698
CRs-Fixed: 2258427
2018-06-14 15:20:38 -07:00
Abhijit Pradhan
45098b95de qcacmn: Fix host dfs confirmation FR issues
1. Do not send the RADAR found command to FW for bangradar. Since FW is
   unaware of the bangradar command for Partial Offload chips there is no
   need to send the Radar found indication to FW in bangradar processing.

2. Fix two times vap restart during spoof test: After sending the radar
   found command to the FW, the host waits for the FW to send the status
   check event to the host but if FW takes a very long time to send the
   event then the host timer times out and restarts the channel. After the
   channel restart if the host receives the status from FW, the host does
   the channel change again. Increase the host timer timeout value to avoid
   the two times channel change.

3. When removing the spoofed-radar-infected channel from NOL list, also
   remove the channel from regulatory channel list so that the regulatory
   channels are consistent with NOL.

Change-Id: I914d48e6202261b87a5ed6f8f40e150eb42463e2
CRs-Fixed: 2250008
2018-06-14 15:20:35 -07:00
Visudha Sathurappan
3ca68af4ff qcacmn: Support PDEV CP Stats for DA
Add change to define pdev cp stats structure
for DA and provide APIs to get/set cp stats

Change-Id: Ib46d8b55b4c38b2c7a9e2bea45977de23ad21939
2018-06-14 13:04:52 -07:00