提交图

128 次代码提交

作者 SHA1 备注 提交日期
Subrat Mishra
d95bfa449c qcacmn: Fix FILS IE parsing issue
Fix FILS IE parsing issue in assoc response frame.

Change-Id: I45b554c215280533ae6831d51526b8b98bc46c94
CRs-Fixed: 2329206
2018-10-09 12:37:37 -07:00
Rohan Dutta
0bdfabfecd qcacmn: Add support to check peer has mcast cipher
Add support to check if peer has MCAST cipher set

Change-Id: I9eb2983c33583b4af39d07a5793993a56b7d27ad
2018-10-03 05:10:56 -07:00
Hariharan Basuthkar
f8da572209 qcacmn: Print Optimization
Came up with changes to replace “qdf_print” with crypto_err/
crypto_debug/crypto_info implementing QDF_TRACE in crypto
component, to avoid flooding of error prints on the console.

Change-Id: I411efd78f808f7c893ece9096ebc429c8753fc82
CRs-Fixed: 2299590
2018-09-28 09:06:35 -07:00
Vignesh Mohan
9d1c7a223f qcacmn: cleanup crypto component prints
Updated error log from qdf_print to crypto_err/
crypto_debug/crypto_info implementing QDF_TRACE
for files in crypto to avoid console cluttering.

Change-Id: I1f7860373c505f4e1d80909662b6673f8263bdcd
CRs-Fixed: 2299591
2018-09-24 05:07:35 -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
Harprit Chhabada
e166eb7b15 qcacmn: Add APIs to translate NL to crypto param
Add following APIs to translate NL param type to
crypto param type.

1.osif_nl_to_crypto_auth_type()
2.osif_nl_to_crypto_akm_type()
3.osif_nl_to_crypto_cipher_type()

Change-Id: Iba0d57e63db98cf81ed0ce5c0a79ae7f8239d1a9
CRs-Fixed: 2300761
2018-09-12 22:27:24 -07:00
Ashok Kumar Ponnaiah
6e0a63ce63 qcacmn: Correct keymgmt append order in rsnie
Correct keymgmt addition order in rsnie to match
with hostapd order of addition.
Added support to add new keymgmt values in rsnie.

Change-Id: Ib96ed6b3986f6dd45ab8f926e7a4e4415aed507d
CRs-Fixed: 2302389
2018-08-28 07:25:08 -07:00
Ashok Kumar Ponnaiah
d652f8ffde qcacmn: Correct the pairwaise cipher order in rsnie
Correct the pairwise cipher order in rsnie to match
hostapd ie generation order. as there difference in the order
cipher is added in rsnie between beacon/probe response generated
in driver and rsnie generated in hostapd, clients drop
this particular association.

Change-Id: I6bc5094a3ff03b013ab1672e8c028a1312eebd3b
CRs-Fixed: 2302389
2018-08-28 07:25:06 -07:00
Ashok Kumar Ponnaiah
17a6db2aa6 qcacmn: Correct parameter passed to cipher2cap function
Correct parameter passed to cipher2cap function.

Change-Id: Ib962c7d908eb0591c9e87ad5987938ad5f24ef93
CRs-Fixed: 2302379
2018-08-27 23:51:42 -07:00
Harprit Chhabada
6e8c57303b qcacmn: Add new wlan crypto params
Add new param types for wlan_crypto_auth_mode,
wlan_crypto_key_mgmt, wlan_crypto_cipher_type.
Need as part of convergence while converting
param type received from NL to crypto param type.

Change-Id: I0110990d9d2b4b24a87770ebce2b17312a2894fc
CRs-Fixed: 2258383
2018-08-27 18:35:53 -07:00
Aditya Sathish
f78a3d8ca5 qcacmn: Clean up spectral, tif and umac component prints
Clean up spectral, tif and umac component prints by correcting trace
levels for regularly occurring prints and removing newlines from
converged print APIs since qdf_trace_msg appends them by default.

Change-Id: Ib10f1b1c54ecbcb9f4076be7c2c4708359d488e0
CRs-Fixed: 2243843
2018-08-10 18:11:18 -07:00
Ashok Kumar Ponnaiah
07a8aa0379 qcacmn: Added extra check to prevent buffer overflow
Added extra check to prevent buffer overflow pointed out
by static code analyzer tool.

Change-Id: Ieeb3e89089b63eac3dc210447d7ec8e964cd52c9
CRs-Fixed: 2285486
2018-08-02 15:00:33 -07:00
Varun Reddy Yeturu
7174208352 qcacmn: Add feature flags to crypto component
Add below featurization flags to crypto component:
WLAN_CRYPTO_WEP_OS_DERIVATIVE
WLAN_CRYPTO_TKIP_OS_DERIVATIVE
WLAN_CRYPTO_CCMP_OS_DERIVATIVE
WLAN_CRYPTO_GCMP_OS_DERIVATIVE
WLAN_CRYPTO_WAPI_OS_DERIVATIVE
WLAN_CRYPTO_GCM_OS_DERIVATIVE
WLAN_CRYPTO_FILS_OS_DERIVATIVE

Remove the below unused functions:
wlan_crypto_psoc_obj_create_handler()
wlan_crypto_psoc_obj_destroy_handler()
wlan_crypto_pdev_obj_destroy_handler()

Change-Id: Ie2a9a4ca240773dc0d32aa6884b21ee08244829c
CRs-Fixed: 2269826
2018-07-30 16:34:14 -07:00
Subrat Mishra
4493d2d605 qcacmn: Allow FILS decap for (Re)Assoc frame
Allow FILS decap for (Re)Association request/response frame
by returning keyid as 0.

Change-Id: Icdf6d325eeccda36eeaf5a5635fcf9cf361d1028
CRs-Fixed: 2217523
2018-06-28 17:50:02 -07:00
Ashok Ponnaiah
09ec6f98d0 qcacmn: Fix key_mgmt datatype
key_mgmt was using uint16 datatype and used
to hold more than it's size.
increased its data size to uint32 address this
issue.

Change-Id: I88a4550bff2e0543700ba1470df3340e7020b7f0
CR-Fixed: 2254883
2018-06-23 18:03:19 -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
Padma Raghunathan
43ebaa7182 qcacmn: [CRYPTO] Fix encap/decap issues in TKIP/WEP
1. Fetch keyid from pkt during TKIP demic
2. Support to restore keys in h/w keycache, when h/w reset takes place

Change-Id: Icc4039a6cf6b89bd3ec3a874b698445382aff024
CRs-Fixed: 2233228
2018-05-24 13:32:38 -07:00
Padma Raghunathan
51d1103376 qcacmn: [CRYPTO] Add apis to access key information
APIs to retrieve following based on cipher type -
1. Header length
2. Trailer length
3. Miclen

Change-Id: Ia9c3a8d6a1459e637af80fcf73077e2d6b5f310c
CRs-Fixed: 2233228
2018-05-24 13:32:36 -07:00
Padma Raghunathan
6ac6143190 qcacmn: [CRYPTO] Support word-aligned 802.11 headers
Some chipsets using Direct-attach architecture need the 802.11 header
padded to a 32-bit boundary for 4-address and QoS frames.

Change-Id: Id29c114b2246cbb1230c9b22f4d04c070069d569
CRs-Fixed: 2233228
2018-05-24 13:32:33 -07:00
Padma Raghunathan
9492161c23 qcacmn: [CRYPTO] Refactor converged crypto to support BE/LE hosts
Refactor crypto module's definition of frame header to allow byte access
to 16-bit fields like frame_ctrl, seq_ctrl, duration id. This saves us
from doing endianness specific conversions during encap/decap in
the datapath.

Change-Id: Ie21c47d7e5b159b4db7e7704f091fe107fb663d1
CRs-Fixed: 2233228
2018-05-24 13:32:31 -07:00
Ashok Ponnaiah
b4c573c773 qcacmn: Add support WPA2 security improvements
Add support for WPA security improvements
where if length and data mismatch are present in
the IE's then driver need to gracefully return error
rather than accessing out of bounds data.

Change-Id: Idd56e5b987fed4d7bddad6d5ada927e97f92a1aa
Crs-Fixed: 2243109
2018-05-19 22:14:41 -07:00
Ashok Ponnaiah
c6d591092d qcacmn: Add support for new key mgmt
Add support for FILS, OWE & DPP key mgmt.

Change-Id: I51b899e86a0d29051af55c422e64764d762767d3
Crs-Fixed: 2243109
2018-05-19 22:14:39 -07:00
Jeff Johnson
f0296ccc96 qcacmn: Fix style issue in crypto register functions
Fix the following ERROR-level issue reported by checkpatch:
open brace '{' following function declarations go on the next line

Reported in the following functions:
wep_register()
wapi_register()
ccmp_register()
ccmp256_register()
gcmp_register()
gcmp256_register()
tkip_register()
none_register()

Change-Id: Ie463976295625de38ebb71aea8da2d25239db9a3
CRs-Fixed: 2241593
2018-05-19 19:40:59 -07:00
Ashok Ponnaiah
adfce988a9 qcacmn: Add mgmt cipher in rsn ie
Mgmt cipher is not set when igtk key is set.

Set mgmt cipher for igtk set key in crypto params
and add mgmt cipher in RSN IE.

Change-Id: I9e18972b7dd614a3692c107e2d92ac2fc6110458
Crs-Fixed: 2239608
2018-05-16 00:28:18 -07:00
Keyur Parekh
413868686d qcacmn: Add mcast SW encrypt decrypt feature
For SW encap and decap support, need to change API
to support group key
Change-Id: I340b269d8b8be3e5018b69cb9c74b7671817d73c
2018-05-14 10:26:32 -07:00
Ashok Ponnaiah
c1797fd6ea qcacmn: Release peer ref after peer pointer usage
peer pointer is used in wlan_crypto_getkey after
peer ref is released.

Fix is to release peer ref after peer pointer usage
is done in wlan_crypto_getkey API.

Change-Id: Id60acfab838511e0cbde4fd95cce795d77878540
Crs-Fixed: 2236136
2018-05-09 14:08:25 -07:00
Amir Patel
d338594cf9 qcacmn: Update API signature for vdev and peer search to include pdev_id
Add a pdev_id parameter to following API
    For peer:
        a. wlan_objmgr_get_peer()
        b. wlan_objmgr_get_peer_by_mac_n_vdev()
        c. wlan_objmgr_get_peer_by_mac_n_vdev_no_state()
        d. wlan_objmgr_get_peer_no_state()
        e. wlan_objmgr_get_peer_nolock()
        f. wlan_objmgr_populate_logically_
            deleted_peerlist_by_mac_n_vdev()
    For vdev:
        wlan_objmgr_get_vdev_by_macaddr_from_psoc()

Change-Id: I7480c5e17e24b5dfb1a7846cfa773821a86a27ca
CRs-Fixed: 2210118
2018-05-09 01:44:39 -07:00
Disha Das
55b86c274b qcacmn: Fix crypto KW issues
Add buffer overflow check for setkey, delkey and
mmie.
Initialize ret before use on add mmie.

Change-Id: I4c6529464a02c67433984dc37a027cf44cc90f5f
2018-04-30 13:18:40 -07:00
Ashok Ponnaiah
23668cdf4e qcacmn: Check key valid for get key api
Check key valid for get key api.
return key only if it is valid and return NULL is key
not valid.

Added new api to get key type

Change-Id: Iae29366ff7d8f60e26a5a87c79119d9649c7a255
Crs-Fixed: 2204858
2018-04-26 02:05:33 -07:00
Ashok Ponnaiah
e25c64c047 qcacmn: Fix ccmp sw encrypt and decrypt
Fixed ccmp sw encrypt and decrypt

Change-Id: Ic0bff6cb764747f31fbb2354e170978144f178d6
Crs-Fixed: 2204858
2018-04-26 02:05:31 -07:00
Linux Build Service Account
c03bbf527d Merge "qcacmn: Fix Access Array out of bound" 2018-04-18 01:53:44 -07:00
Ashok Ponnaiah
afb889318f qcacmn: Add new supporting api for crypto
Add new helper functions for crypto module.
New api to get ucastcipher and mcastcipher
from peer and vdev.
New api to get key from vdev and peer.

Change-Id: Ia111f59a93b6cc7e1a3406dc53142f0c087df6f8
Crs-Fixed: 2223901
2018-04-17 09:21:03 -07:00
Radhika Sriram
00392f394c qcacmn: Fix Access Array out of bound
Upper bound length check is performed for index
that is used to access the array elements.

Change-Id: Id39ef1bd0446ce71be4f74532f2a7650df1a5432
CRs-Fixed: 2218940
2018-04-16 22:58:17 -07:00
Disha Das
76210cdb35 qcacmn: Fix for buffer overflow KW issue
Fix for buffer overflow check as igtk key may use
index 2

Change-Id: Id496147633c307dbed62e643a770d17ef6c6805b
2018-04-16 00:24:33 -07:00
Subrat Mishra
65817ac2d7 qcacmn: Avoid NULL pointer dereference
Avoid NULL pointer dereference in wlan_crypto_fils_delkey()

Change-Id: I2425365f7e118b5ec72223905ce7d16437ee714d
CRs-Fixed: 2221348
2018-04-11 09:15:14 -07:00
Ashok Ponnaiah
455eb68470 qcacmn: export few crypto functions
Export few crypto function for other modules use.

CRs-fixed: 2203383
Change-Id: If9ee188b96d1c537a3fe7f5c37e85683fe069276
2018-03-20 22:35:15 -07:00
Manikandan Mohan
a2993a595c qcacmn: Fix export symbol for multi drivers compilation
Update umac module files to use qdf_export_symbol to facilitate
multiple driver module compilation support.

Change-Id: Id982b3e0593b7c90244f2025decd10e97cb62f9c
CRs-fixed: 2197751
2018-03-19 19:58:12 -07:00
Dustin Brown
fb6527630f qcacmn: Deprecate WLAN_MACADDR_LEN
At some point WLAN_MACADDR_LEN was added to the driver, despite
QDF_MAC_ADDR_SIZE already serving the same purpose. There are cases
where these two macros are implicitly assumed to be the same value.
This is a classic single-source-of-truth violation, and only serves to
confuse developers. Deprecate WLAN_MACADDR_LEN and use
QDF_MAC_ADDR_SIZE instead.

Change-Id: I4e941d5e17d161a5810e693c89b95ae08f83c6b0
CRs-Fixed: 2179728
2018-02-28 14:57:53 -08:00
Disha Das
19fa32351f qcacmn: Set mpdu data ptr correctly
Handle mpdu data pointer for PMF frames based on EXT IV bit

Change-Id: I7c1b585a538402ae784985852c873537c0e4eb86
2018-02-27 00:29:33 -08:00
Disha Das
6419ff128e qcacmn: Set peer params for crypto PMF
Set peer params for crypto PMF on recv assoc req

Change-Id: I879135642278602edf195dd68c8acbbfdf09c443
2018-02-13 13:14:49 -08:00
Ashok Ponnaiah
f995360186 qcacmn: Fix function headers
fixed function headers as per coding standard
CRs-Fixed: 2166869

Change-Id: I9efc8c8dc73b0a0e14f11b8bcbe0ef2505d935b6
2018-01-22 22:11:07 -08:00
Srinivas Pitla
ea71ebf12b qcacmn: Pass peer pointer instead of MAC address to set_peer_wep_keys
This change would prevent peer to take reference during creation

Change-Id: I69225a7e403c3b9753be45ac9b4dd4d615eef7de
CRs-Fixed: 2161085
2018-01-22 22:11:05 -08:00
Rohan Dutta
f8ce8100ea qcacmn: Check length in wlan_crypto_rsnie_check
Check length of rsn ie in wlan_crypto_rsnie_check

Change-Id: I66726a31c2f4c16cf66460cc15c62f2089a20de5
2018-01-19 02:03:46 -08:00
Ashok Ponnaiah
7a41e8c20e qcacmn: Fixed BIP-GMAC mmie calculation
Fixed BIP-GMAC mmie calculation
pn needs to be swapped when filling the nounce
CRs-Fixed: 2165003

Change-Id: I5b0871c2fbb4e814f9eacfbd9912748ae4517251
2018-01-03 12:31:15 -08:00
Subrat Mishra
2b75d6df39 qcacmn: Add FILS AEAD crypto
Add aes_ctr, aes_siv and FILS AEAD crypto module.
This includes FILS AEAD encrypt and decrypt functions.

Change-Id: Ibbeb28ea53c91ad473247015335b593bc8038485
CRs-Fixed: 2093478
2017-12-29 01:42:58 -08:00
Rohan Dutta
8b8f00f622 qcacmn: Add WPA/RSN IE from driver
Add WPA/RSN IE from Driver, when app/daemon does not program it.

Change-Id: I6d25d98d4da991c229ae560a5878edc21c9766ce
CRs-Fixed: 2158072
2017-12-27 09:25:13 -08:00
Nandha Kishore Easwaran
f832d98d72 qcacmn: Add NULL check for del igtk key
Add NULL check for deletion of igtk key to avoid
NULL pointer dereference

CRs-Fixed: 2149494
Change-Id: I365465233991e7c242bbd8d9b233f975d806dc05
2017-12-20 05:38:48 -08:00
nobelj
2c3db26446 qcacmn: passing correct argument to qdf_mem_set api
qdf_mem_set api parameter switched!
old
qdf_mem_set(void *ptr, uint32_t value, uint32_t num_bytes)

new
qdf_mem_set(void *ptr, uint32_t num_bytes, uint32_t value)

Change-Id: I4ebbc222d32e6fe18c28f2446102c95bfc734c8e
2017-12-14 17:45:20 -08:00
Nandha Kishore Easwaran
b0ac369215 qcacmn: Delete igtk keys: key_idx 4 and 5 for PMF
Delete igtk keys of index 4, 5 if PMF configuration
is changed

Change-Id: I5f0de09fb713864a0e2cb3036633bf5c131e1f8c
2017-12-13 23:38:14 -08:00
Rohan Dutta
a301c8343d Revert "qcacmn: Add WPA/RSN IE from driver"
This reverts Change-Id 2088888.

Change-Id: I12fd8ad77a36d6c7e1247ec29fa08c7caa68ce91
2017-11-30 22:05:28 -08:00