Commit Graph

1168 Commits

Author SHA1 Message Date
Jeff Johnson
11d7c9db98 qcacld-3.0: Fix typo "occured"
Replace typo "occured" with correct spelling "occurred".

Change-Id: I4d64bee7c9c929b4e7fce0c17d98136cff737fc4
CRs-Fixed: 2238297
2018-05-12 04:29:09 -07:00
Sourav Mohapatra
cf632579b1 qcacld-3.0: Use new API for fetching wmi_handle
Use get_wmi_unified_hdl_from_psoc instead of GET_WMI_HDL_FROM_PSOC due
to incompatible return types.

Solve renaming dependencies with common side changes.

Change-Id: Ie84641327d64876877c7d26b63d632c79770a88c
CRs-Fixed: 2203055
2018-05-11 22:40:02 -07:00
Himanshu Agarwal
1230ee0ddd qcacld-3.0: Enable fw_crash_timeout
Presently, fw_crash_timeout is disabled as a result of which if
timeout happens for any VDEV related WMI command and device goes
in bad state, no assert or recovery is getting triggered. Due to
this, device crashes at some later point of time at some random
location making debugging difficult.

Enable fw_crash_timeout and trigger recovery if recovery is enabled
otherwise assert.

Change-Id: I9e9e51cba8086bd181be28884c490f0bd77663a8
CRs-Fixed: 2229101
2018-05-09 20:22:51 -07:00
Jeff Johnson
5ead5ab10f qcacld-3.0: Fix typos "sucess" and "sucessful"
Replace typos "sucess" and "sucessful" with correct spellings
"success" and "successful"

Change-Id: I30746cbab4533da9b052261fa9bb87214188138b
CRs-Fixed: 2237724
2018-05-09 16:31:15 -07:00
Vignesh Viswanathan
ad47f0a2a8 qcacld-3.0: Modify callers of ObjMgr APIs to include pdev_id
wlan_objmgr_get_vdev_by_macaddr_from_psoc and wlan_objmgr_get_peer
API's definitions have been changed to include pdev_id as an
argument.

Modify the callers of these APIs to include pdev_id as argument.

Change-Id: I3d0de6a0bc1dfefbe1b3cad51ec23f703baaf3ad
CRs-Fixed: 2210728
2018-05-09 01:44:33 -07:00
Will Huang
67ce1e332b qcacld-3.0: Refine PMO wow to support legacy chip
wma_is_service_enabled can't get valid service bitmap if call in
hdd_update_pmo_config, use psoc_ctx->caps.unified_wow instead to check
pattern id per vdev and legacy d0 wow capability.

Change-Id: If7bf316f482c49253fc4b95b94e172727b27ffd1
CRs-Fixed: 2225847
2018-05-06 23:12:33 -07:00
Wen Gong
aa6d55d9e7 qcacld-3.0: Add hdd memory dump feature flag
Add config flag to enable / disable hdd memory dump feature

Change-Id: Id2994f72b595096459e65ef4da5381d6eb3b476b
CRs-Fixed: 2231695
2018-05-06 23:12:29 -07:00
gaurank kathpalia
d2967a742c qcacld-3.0: Fix OOB write in vdev_mac_map
In the API wma_process_pdev_hw_mode_trans_ind
the host doesnt check the upper limit of
num_vdev_mac_entries received from the firmware,
and fills the same to the host structure
hw_mode_trans_ind, which may cause OOB write.
Fix is to check for the max vdev supported in the
same API and return if the condition is false.

Change-Id: I54a9e12f777b87b49057d6c97c06ab71b9ad1d77
CRs-Fixed: 2221965
2018-05-05 09:21:29 -07:00
Tushnim Bhattacharyya
89710e3e80 qcacld-3.0: Use WMI_HOST_WLAN_PHY_MODE instead of WLAN_PHY_MODE
Use the enumaration defined in common instead of the legacy one in
cld.

Change-Id: I0ad7659b8d03ae5a14b15ca464395ea3e2571286
CRs-Fixed: 2216803
2018-05-04 21:46:42 -07:00
Pragaspathi Thilagaraj
2628343597 qcacld-3.0: Fix possible buffer overread in wma_set_epno_network_list
In the function wma_set_epno_network_list,
req->networks[i].ssid.ssId is copied into the destination
params->networks[i].ssid.mac_ssid. But the ssid length is not
considered while copying and WMI_MAC_MAX_SSID_LENGTH is used as
the length for copying. This might result in possible buffer
overread if the ssid length is not WMI_MAC_MAX_SSID_LENGTH.
Similar issue is seen in wma_pno_start also.

Use pno->aNetworks[i].ssId.length as the size to mem copy the
ssid to the destination ssid buffer.

Change-Id: Id3f579da97e398663b7d583f5f46d4671eabeae3
CRs-Fixed: 2233682
2018-05-04 20:43:00 -07:00
Zhang Qian
610a1a7a34 qcacld-3.0: Add pointer check in wma_is_ccmp_pn_replay_attack
cdp_get_pn_info() would output wild pointers and cause NULL
pointer reference in wma_is_ccmp_pn_replay_attack().
Add pointer check in wma_is_ccmp_pn_replay_attack().

CRs-Fixed: 2232554
Change-Id: Ic2e5487468aaced91d6567005bbe66a7c065f088
2018-05-03 10:42:38 -07:00
Rajeev Kumar
dcce809079 qcacld-3.0: 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: 2235138
2018-05-03 08:04:57 -07:00
Naveen Rawat
f8792bd18a qcacld-3.0: Move chanmode_to_chanwidth API to qcacmn
Move chanmode_to_chanwidth API to qcacmn since it will be used by ndp
schedule update event.

Change-Id: I13d00c0b818eb0da434c8a5372b2ab7b6693f22a
CRs-Fixed: 2216803
2018-05-02 18:46:06 -07:00
Manjunathappa Prakash
7b0ad46796 qcacld-3.0: Add GRO support for STA mode
Add GRO support and make it configurable through INI(GROEnable).
GRO and LRO are mutually exclusive. Only one of them can be enabled.
And disable GRO during following conditions
1) Low TPUT scenario
2) Concurrency cases
3) For Rx packets when Peer is not connected

Change-Id: I15535827a03953231670d4138235c4876b16e045
CRs-Fixed: 2098772
2018-05-02 04:34:52 -07:00
Vignesh Viswanathan
686833aedd qcacld-3.0: Add sanity check for kek_len and pmk_len in WMA roam synch
In wma_fill_roam_synch_buffer, fils_info is received from the FW
as part of roam synch event and contains kek_len and pmk_len. These
lengths are used to copy the kek and pmk from the FW buffer to the
roam_synch_ind_ptr respectively.

If the kek_len exceeds the SIR_KEK_KEY_LEN_FILS or pmk_len exceeds
the SIR_PMK_LEN value, a buffer overwrite would occur during
memcpy.

Add sanity check to return error if kek_len exceeds SIR_KEK_KEY_LEN_FILS
or if pmk_len exceeds SIR_PMK_LEN.

Change-Id: I8035c54cb4cbd5b4065646377f7d1d2824f9c436
CRs-Fixed: 2226386
2018-04-30 21:13:09 -07:00
Naveen Rawat
6e45d9ad7a qcacld-3.0: Avoid un-initialized access to arp rsp_stats
In function wma_get_arp_stats_handler avoid un-initialized
access to arp rsp_stats by initializing it to 0s.

Change-Id: I95c41f89740bff276ed5c6736b4ad9da3ef6ce87
CRs-Fixed: 2232401
2018-04-30 19:50:16 -07:00
Himanshu Agarwal
fc5d66088a qcacld-3.0: Send frames with GCMP MIC LEN if encryption is GCMP
CCMP and GCMP both have different lengths of their MIC part. MIC
length for CCMP is 8 bytes whereas it is 16 bytes for GCMP. When
encryption type is GCMP/GCMP-256, sending packets with CCMP MIC
length causes fw to drop the GCMP encrypted management packets
leading to connection issues.

Send GCMP encrypted frames with GCMP MIC length.

Change-Id: Ia83fa6ffde880fe69e5e4c3e3c3ce9c62ad8fa3c
CRs-Fixed: 2203224
2018-04-26 21:38:55 -07:00
Himanshu Agarwal
51d818cb2a qcacld-3.0: Don't fill any WMA request if target is not ready
If any WMA request is queued in wma hold req/vdev resp queue after fw
has crashed and sent the corresponding uevent to HOST, request will
timeout and if at the same time, SSR is also going on, it may lead to
various issues and crashes.

Check whether target is ready or not before queuing any request
in wma hold req/vdev resp queue.

Change-Id: I358841566f858e115b3b04f12f4d8b70b75d1dfc
CRs-Fixed: 2226497
2018-04-26 06:19:18 -07:00
Amar Singhal
50d3075154 qcacld-3.0: log the regdomain parameters
Log the reg-domain parameters when sending command
WMI_PDEV_SET_REGDOMAIN_CMDID to FW.

Change-Id: I9cc9437b9b9be9a1f7c58ca08a7d6456f9bdebcf
CRs-Fixed: 2229604
2018-04-24 18:30:32 -07:00
Jeff Johnson
f6977c5182 qcacld-3.0: wma: Remove legacy markings
Per current guidance remove legacy markings.

Change-Id: I2eae6b3681fe3c454d3680ac915a983af87ee329
CRs-Fixed: 2229655
2018-04-24 14:48:27 -07:00
Paul Zhang
33fae2710d qcacld-3.0: Config number of TX sw retry per AC
Video/audio wireless application needs to tune parameters
per AC based. Config the number of TX sw retry per AC via
driver INI configuration file. It helps to improve the
video/audio performance in noisy environment.

Change-Id: Icffb5174b265b6453021b0d0a8ad3e12b695847a
CRs-Fixed: 2212954
2018-04-24 04:26:06 -07:00
Pragaspathi Thilagaraj
54ac69d1ff qcacld-3.0: Fix OOB write in wma_roam_synch_event_handler
The routine wma_roam_synch_event_handler sends roam indication to the
upper layers. It uses the vdev_id of the synch event to pass the roaming
indication for the vdev session. If the vdevid exceeds the max_bssid
supported, then OOB write occurs in wma_roam_synch_event_handler.

Add check to validate vdev doesnot exceed the maximum bssid configured.
Add check to ensure vdev doesnot exceed max_bssid and return error if
violated.

Change-Id: Ief8b5070fd6cbb375900e2816524dbd946c5238d
CRs-Fixed: 2206569
2018-04-24 02:30:44 -07:00
Paul Zhang
ee09f8eefd qcacld-3.0: Configure the A-MPDU subframe per AC
Video/audio wireless application needs to tune parameters
per AC based. Configure A-MPDU subframe parameter per
AC via driver ini configuration file.

Change-Id: Id63be7aacf6465edee08f7a2f4c8a119f9bd6346
CRs-Fixed: 2212932
2018-04-24 02:30:41 -07:00
Pragaspathi Thilagaraj
b9c4674fda qcacld-3.0: Fix Use after free in wma_vdev_start_resp_handler
In the function wma_vdev_start_resp_handler when we recieve a
vdev start response event, we copy the req_msg->user_data to the
object hidden_ssid_restart of the structure
tpHalHiddenSsidVdevRestart. If hidden_ssid_restart_in_progress
flag is set for the corresponding vdev_id, then we post that
message to the PE and free the hidden_ssid_restart. If this
req_msg->user_data is used again if req_msg->msg_type is
WMA_CHNL_SWITCH_REQ , then a possible Use-After-Free will occur
in  wma_vdev_start_resp_handler.

When a channel switch request has occured, there will not be a
hidden ssid restart event in progress. So add check to validate
if the req_msg->msg_type == WMA_HIDDEN_SSID_VDEV_RESTART.

Change-Id: Ie3195b23ff136fbfd38fcd4d32e993d4cb016316
CRs-Fixed: 2216751
2018-04-24 02:30:37 -07:00
Naveen Rawat
e8b1b82e17 qcacld-3.0: Add implementation of get_tx_power
Add changes to support get tx power from within stats
component.

Change-Id: Ifafee77033b8db75e6c9ad201a26ba8bbe72efd4
CRs-Fixed: 2210333
2018-04-23 22:18:51 -07:00
Naveen Rawat
3ff5cff23e qcacld-3.0: Add implementation of get_wake_lock stats
Add changes to support get wake lock stats from within cp_stats
component.

Change-Id: I93855e4a1635afa97b4d5235ddb9cd92654f943d
CRs-Fixed: 2210330
2018-04-23 22:18:48 -07:00
Vignesh Viswanathan
067b9e668c qcacld-3.0: Post LFR2 Candidate found indication to Scan Queue
Post the LFR2 Candidate found indication to low priority scan queue
instead of SME queue to maintain order with beacon/probe frames
from Scan queue.

Change-Id: I5e8a6247a7d5200371d776bce3436104a5ba2df2
CRs-Fixed: 2226234
2018-04-23 00:30:42 -07:00
Kiran Kumar Lokere
27026ae2a4 qcacld-3.0: Add support to process MU EDCA param set
Add support to process MU EDCA param set in assoc response
frames and send the params to FW.

Change-Id: Ia492d1212b3c357647a89e4f98d3cfdc7ff7bbac
CRs-Fixed: 2220227
2018-04-20 02:33:24 -07:00
Abhinav Kumar
a95af7cbac qcacld-3.0: Add new ini to set min delay btw scan and reason bit-mask
Currently there is no provision to decide delay between two roam
scans in firmware. With these new ini's, driver wants to expose
control to decide delay between roam scans:

Add ini "min_delay_btw_scans" to set minimum duration allowed between
two consecutive roam scans. Fw should not allow roam scan if duration
between two consecutive roam scan is less than min_delay_btw_scan.

Add ini "roam_trigger_reason_bitmask" to set default value of
bit-mask containing roam_trigger_reasons for which
min_delay_btw_scans constraints should be apply.

Change-Id: I2af9d5dc8e6919eeb90251d3d744e3f07705e776
CRs-Fixed: 2221779
2018-04-19 22:06:23 -07:00
Naveen Rawat
9832247b07 qcacld-3.0: Fix check for firmware's chainmask capability
Fix condition checked before programming user's requested chainmask to
firwmare. Get current firmware advertised phy cap for non-dbs phymode
and check if it supports all chains for tx/rx 2g and 5g.

Change-Id: I3fcef315f478403955ce400b3ba6d138a8006a01
CRs-Fixed: 2202544
2018-04-19 22:06:17 -07:00
Abhinav Kumar
271f063980 qcacld-3.0: Add new ini to enable/disable FT open feature
Add new ini item "enable_ftopen" to enable/disable FT open
feature. There is no ini currently to disable only FT open.

Change-Id: I18280d9de77857b15698eb233ba4ec71089beb06
CRs-Fixed: 2214766
2018-04-18 18:38:54 -07:00
Pragaspathi Thilagaraj
d9888ce77f qcacld-3.0: Fix OOB write in wma_unified_debug_print_event_handler
The routine wma_unified_debug_print_event_handler logs the data from debug
print event handler. The param event data from firmware is copied to a
destination buffer .If the maximum size of the data exceeds or equals
BIG_ENDIAN_MAX_DEBUG_BUF for big endian hosts then possible OOB write will
occur in wma_unified_debug_print_event_handler. For other hosts, OOB read
could occur if datalen exceeds maximum firmware message size
WMI_SVC_MAX_SIZE.

Add check to validate datalen doesnot exceed the maximum firmware msg size
WMI_SVC_MAX_SIZE. Return failure if it exceeds.
Add check to ensure datalen doesnot exceed or equal the maximum buffer
length value for big endian hosts BIG_ENDIAN_MAX_DEBUG_BUF.
Add null termination at the end of the data recieved from the firmware.

Change-Id: Ibb662cb8e17ef8be8b7591308c422a78b71e331a
CRs-Fixed: 2222533
2018-04-18 18:38:48 -07:00
Min Liu
46ef0bf334 qcacld-3.0: Do not wait for peer deletion for SSR
When SSR is in progress, WMI commands for peer and vdev deletion
will not be sent to FW. Do not wait for peer deletion for it will
always lead to timeout since peer delete command will not be sent.
And the check is not needed since vdev delete command will not be
sent, either.

Change-Id: Ib6f921a7c7ff09bf30ed19b443a30542db2b51a3
CRs-Fixed: 2217366
2018-04-18 18:38:33 -07:00
Jeff Johnson
3d46351ccd qcacld-3.0: Remove obsolete SoftAP VSTA feature code
The SoftAP VSTA feature was introduced to overcome a limitation in a
prior version of WLAN hardware. Since the WLAN hardware supported by
this driver does not have this limitation, remove the feature code.

Change-Id: I1f2fe31b294fb7b2da1fa8619b3380412c5d872e
CRs-Fixed: 2224817
2018-04-18 18:38:24 -07:00
Manjunathappa Prakash
ae7494872c qcacld-3.0: Create flow control pools on vdev start
As many as 5 vdevs can be created, which is defined by MAX_SME_SESSIONS.
But flow control pools are only valid for active TxRx capable vdevs.
Which is 3 active vdev starts. So attach flow pool creation to vdev_start
instead of vdev_attach.

Change-Id: I137676ba618aa3a6684c7d17ef7d9263c4df6efe
CRs-Fixed: 2179220
2018-04-17 13:17:40 -07:00
Abhinav Kumar
a083f21918 qcacld-3.0: Add new ini to set delay Hand-off period
Add new ini item "ho_delay_for_rx" to set delay Hand-off
period. For LFR 3.0 roaming scenario, once roam candidate
is found, firmware waits for minimum this much duration
to receive pending rx frames from current BSS before
switching to new channel for handoff to new AP.

Change-Id: Ided9a81e9402259f5df6b42926b3fa336b6bb4d0
CRs-Fixed: 2221748
2018-04-16 16:56:50 -07:00
Kabilan Kannan
fc3a8c0631 qcacld-3.0: Block WMI cmds before issuing HTC stop
WMI cmds should be blocked, before calling HTC stop
to avoid the race condition in the system

Change-Id: I677c55cd96ea6af973595eec1e759641fbea109a
CRs-Fixed: 2193653
2018-04-16 16:56:47 -07:00
Pragaspathi Thilagaraj
71596f796d Revert "qcacld-3.0: Fix OOB write in wma_unified_debug_print_event_handler"
The change for the CR 2211133 caused compilation issue in LE
branches. This reverts commit with
change Id-I45943ae76d8fcf7b53e1f064c462d01cd6d00dcf

Change-Id: I069f1a4ae8ad320f5a073ee072dd772e05c5fc5d
CRs-Fixed: 2222536
2018-04-16 05:50:19 -07:00
CNSS_WLAN Service
7a3658671d Merge "qcacld-3.0: Remove obsolete WOWL messaging" into wlan-cld3.driver.lnx.2.0 2018-04-15 16:58:20 -07:00
Jeff Johnson
9bf3b65da5 qcacld-3.0: Remove obsolete WOWL messaging
The driver contains considerable debris from the obsolete WOWL
messaging, so clean it up.

Change-Id: I432f7fc1567b0aa31a7be758c05f2213340baed0
CRs-Fixed: 2223859
2018-04-15 10:17:50 -07:00
Pragaspathi Thilagaraj
78474348ae qcacld-3.0: Fix Use after free in wma_del_tdls_sta
The function wma_del_tdls_sta is used to process delete sta
request from UMAC in TDLS. peerStateParams is a pointer to the
structure tTdlsPeerStateParams. The memory allocated for
peerStateParams is freed in the call to the function
wma_update_tdls_peer_state(). When peerStateParams is used to
access vdev_id again after free, then a use after free case will
occur.

Retrieve the vdev_id value from the del_sta structure that is
passed into wma_del_tdls_sta initially.

Change-Id: Iad7edf87058bfc20aadc0e72d474b1c330790512
CRs-Fixed: 2216242
2018-04-13 18:09:48 -07:00
lifeng
fe6c3e2283 qcacld-3.0: Export antenna info to the userspace
qcacld-2.0 to qcacld-3.0 propagation
Discard the original wmi interface:
WMI_PEER_ANTDIV_INFO_REQ_CMDID/PEER_ANTDIV_INFO_EVENTID,
replace with the new one:
WMI_PDEV_DIV_GET_RSSI_ANTID_CMDID/WMI_PDEV_DIV_RSSI_ANTID_EVENTID
to support chain value along with corresponding antenna info.

Change-Id: Ie9ea9d160e1ac1e2e65de422c85989159fb5a556
CRs-Fixed: 2005820
2018-04-13 09:30:22 -07:00
Jeff Johnson
20f84ba9bc qcacld-3.0: Remove obsolete HAL_SELF_STA_PER_BSS condition
Currently Kbuild unconditionally sets -DHAL_SELF_STA_PER_BSS=1. There
is only one place where this macro is referenced, and it actually
requires that the macro be set for the driver to work. Since this
logic isn't really conditional, remove the conditional compilation.

Change-Id: I09a03339df086146b81b3012fb281e166fccd5da
CRs-Fixed: 2221852
2018-04-11 03:37:57 -07:00
Jeff Johnson
a3005a1c1a qcacld-3.0: Remove obsolete ANI_COMPILER_TYPE macros
Currently a set of ANI_COMPILER_TYPE macros are checked against, but
other than that they serve no purpose. As part of ongoing Kbuild
cleanup remove these obsolete macros.

Change-Id: Ia112d7d5ae8d12eae46144b53addc8ad54393bba
CRs-Fixed: 2220285
2018-04-11 03:37:13 -07:00
Pragaspathi Thilagaraj
e8f5b1d4bc qcacld-3.0: Fix OOB write in wma_extscan_change_results_event_handler
The routine wma_extscan_change_results_event_handler sends the ext scan
results to upper layers. This contains the bssid info, rssi values of
different APs that are scanner. If the num_rssi_samples is negative or
greater than UINT32_MAX,then an OOB write could happen.

Add check to ensure rssi_num is not negative or exceeds UINT32_MAX.
Also make sure the numap value is not negative.

Change-Id: If82c4fd1193c45d38bd4495c187a406deb25acad
CRs-Fixed: 2205957
2018-04-10 08:52:40 -07:00
Arif Hussain
53cf569ad5 qcacld-3.0: Use intersection of AP's and self STBC capability
Use intersection of AP's and self STBC capability.

Change-Id: I98a5e3f424f7b5ca9c82c15e271aa9be901f4792
CRs-Fixed: 2207488
2018-04-06 21:37:43 -07:00
Pragaspathi Thilagaraj
0008879d13 qcacld-3.0: Fix OOB write in wma_unified_debug_print_event_handler
The routine wma_unified_debug_print_event_handler logs the data from debug
print event handler. The param event data from firmware is copied to a
destination buffer .If the maximum size of the data exceeds or equals
BIG_ENDIAN_MAX_DEBUG_BUF for big endian hosts then possible OOB write will
occur in wma_unified_debug_print_event_handler. For other hosts, OOB read
could occur if datalen exceeds maximum firmware message size
WMI_SVC_MAX_SIZE.

Add check to validate datalen doesnot exceed the maximum firmware msg size
WMI_SVC_MAX_SIZE. Return failure if it exceeds.
Add check to ensure datalen doesnot exceed or equal the maximum buffer
length value for big endian hosts BIG_ENDIAN_MAX_DEBUG_BUF.
Invoke strlcpy instead of memcpy to ensure the string is null terminated
before printed.

Change-Id: I45943ae76d8fcf7b53e1f064c462d01cd6d00dcf
CRs-Fixed: 2211133
2018-04-05 01:29:46 -07:00
Sandeep Puligilla
db6de35f36 qcacld-3.0: PDR recovery is taking longer time
PDR recovery is taking longer time because vdev
delete is waiting for peer delete completion.

Modified vdev delete handler to get the status
of firmware. If firmware state is detected as down
then vdev delete handler will not wait for peer delete
completion.

Change-Id: I1014df239a1abecaccbe5097769a10c625597e12
CRs-Fixed: 2207795
2018-04-04 16:39:58 -07:00
psimha
1dc65bdf61 qcacld-3.0: Change security type data structure in API call
Change htt_sec_type to cdp_sec_type since the CDP API expects a
cdp_sec_type as it's argument. Required for compilation using LLVM.

Change-Id: I8dbf59dd80bd0fce221a23544c69764508377ae0
CRs-Fixed: 2216859
2018-04-03 19:45:53 -07:00
Naveen Rawat
b4ea70f96e qcacld-3.0: Fail channel sap channel change request for channel 0
In function wlansap_channel_change_request validate channel requested
before processing the request.

Change-Id: I1cc8c978b15fe6ee043ce6bf712a109994dce50b
CRs-Fixed: 2212078
2018-04-02 19:39:34 -07:00