Graf commitů

4999 Commity

Autor SHA1 Zpráva Datum
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
Pamidipati, Vijay
cabd46d044 qcacmn: Set IRQ_DISABLE_UNLAZY flag for DP interrupts
Since DP interrupts are not disabled at source, and enabled and
disabled only at GIC level, set IRQ_DISABLE_UNLAZY flag to avoid
spurious interrupt detection

Change-Id: Ie935bee5bf31171d75342cd7607b0478d5e16906
CRs-Fixed: 2257162
2018-06-14 13:04:50 -07:00
Pratik Gandhi
46837cc4f9 qcacmn: Export symbol to other modules
Export symbol to get Pdev WMI handle for other modules.

Change-Id: Ie46133eac5898ac51fde9b42f66bc365bcc938f4
CRs-Fixed: 2217556
2018-06-14 13:04:48 -07:00
Jinwei Chen
fc76555f2e qcacmn: add the tx_desc id checking
If host receive the tx completion with invalid tx_desc ID,
panic happened. add the tx desc ID check both on dp_tx_hw_enqueue
and dp_tx_comp_handler to know that how this invalid tx_desc ID
is generated by which reason of below two:
1. host tx desc is corrupted and fill in invalid id to TCL_DATA_CMD.
2. FW or HW generate invalid TX compl to host.

Change-Id: Id2b070697199b19f83e5d9fd89eadcfe0423d617
CRs-Fixed: 2243455
2018-06-14 11:47:07 -07:00
Nachiket Kukade
49f9618acc qcacmn: Allow broadcast probe req for p2p scan with empty SSID
In case where driver receives a scan request with a single SSID with
an empty string, it must be treated as an active scan with broadcast
probe requests. In case of p2p search, driver treats this as a passive
scan. With this the P2P Client fails to detect existing P2P GO or
Autonomous GO devices, leading to connection failure.

Set flag WMI_SCAN_ADD_BCAST_PROBE_REQ for this type of p2p scan req.
P2P GO devices will respond to probe requests with wildcard SSID
and Cli will be able to connect to them.

Change-Id: Iacb44fb0cb5363f5af6cf7f6efb219857a799075
CRs-Fixed: 2235604
2018-06-14 11:47:05 -07:00
bings
315d67f3f4 qcacmn: Fix pl_info->log_stat update
If log state 1, 2, 0, 1 are set serially, log state 2 can't be set
successfully, while log state 1 is set to wdi twice, which results
in two same pointers in doubly linked list txrx_pdev->wdi_event_list
and causes dead loop.

Update pl_info->log_stat only when it is subscribed to wdi and sent
to firmware successfully.

Change-Id: I8d67b9f02a2fb2c958d2553a743cbabcedfb2f42
CRs-Fixed: 2250715
2018-06-14 02:56:49 -07:00
Kabilan Kannan
cf124491c7 qcacmn: Remove unused data structures in TDLS component
Remove the unused data structures in TDLS component
to avoid incorrect usage

Change-Id: Id3997d5895dba8e3cb3f60fe102ca846cb009607
CRs-Fixed: 2232726
2018-06-14 02:56:47 -07:00
Abhinav Kumar
5fb51321a8 qcacmn: Add diag events for debugging
Currently there are no diag events to inform user space about
used AKM Suite, requested pairwise cipher, group cipher, and
group key management in assoc request and algo num used in auth
req.

Add such diag events which can be useful in automation.

Change-Id: I25336d541f507bfa16e3b6e10b0653fcce898021
CRs-Fixed: 2225883
2018-06-14 02:56:44 -07:00
bings
2a44c1c811 qcacmn: Set wmi_service_wow_wakeup_by_timer_pattern service bit
Currently the service bit of wmi_service_wow_wakeup_by_timer_pattern
is not set and it is 0. This is wrong because 0 is the service bit of
wmi_service_beacon_offload.

Set wmi_service_wow_wakeup_by_timer_pattern service bit as
WMI_SERVICE_WOW_WAKEUP_BY_TIMER_PATTERN

Change-Id: I52058d79281aeed9312ce6c0c361d3cb254fef07
CRs-Fixed: 2250922
2018-06-13 22:27:10 -07:00
Naveen Rawat
75d5ce3972 qcacmn: Fix NPD in function os_if_nan_process_ndp_responder_req
While processing of NDP responder request if NDP response code is
accept NDI interface is must. Throw error if interface is not provided
and bail out of the function.

Change-Id: I7266e3c82062130f6dbeb078cddfaa15a87d9197
CRs-Fixed: 2247586
2018-06-13 21:01:00 -07:00
Om Prakash Tripathi
9b56f5dc1c qcacmn: Use atomic allocation for all scheduler context scan allocations
In low memory environments using GFP_KERNEL flag may cause
scheduler thread to sleep. Scheduler thread callback handlers
are expected to be atomic in nature to ensure timely execution
of different commands. Move all allocations done by scan module
in scheduler thread context to atomic allocation.

Change-Id: Iee3eafbc00a3afea0687ba67b3041ec0816094cc
CRs-Fixed: 2232553
2018-06-13 21:00:59 -07:00
Dustin Brown
028f560991 qcacmn: Add objmgr check for vdev leaks API
During objmgr psoc teardown, it would be useful to assert that there are
no longer any vdevs attached. Add an API that logs a list of all
vdevs attached to a given psoc, and panics if any are found.

Change-Id: Id618fa396ec1238b1bb7a78dfb6267e2b08470e4
CRs-Fixed: 2255503
2018-06-13 21:00:56 -07:00
Kiran Kumar Lokere
76da7996ae qcacmn: Add support to send regulatory sync event
Add support to send regulatory rules info in regulatory sync
event to user space for self managed regulatory when regulatory
info is updated.

Change-Id: Iac8704598fd181e47cb023405dfe592c4c93f51b
CRs-Fixed: 2242701
2018-06-13 21:00:54 -07:00
Krunal Soni
f909a8a0af qcacmn: Fix enum values of MGMT subtype field to correct value
MGMT frame's subtype enums are not correctly displayed on debugging tool
due to incorrect enum values.

CRs-Fixed: 2252180
Change-Id: Ib7e7111e43e95166e3ba87a758295948eb72ba0f
2018-06-13 21:00:52 -07:00