Граф коммитов

21 Коммитов

Автор SHA1 Сообщение Дата
Sheenam Monga
46644d2926 qcacmn: cleanup key_rsc_counter pointer from set key param
Remove unused param key_rsc_counter of set_key_param
structure, as key_rsc_ctr is used to send key rx sc
counter to fw and rename key_rsc_ctr to key_rsc_counter
as win is using key_rsc_counter.

Change-Id: Id58aabb30d772f8f620ac9f96890fcac0193777b
CRs-Fixed: 3256574
2022-08-29 10:00:47 -07:00
Rahul Gusain
7af5b194e4 qcacmn: Bypass the peer check for NAN in crypto set keys
Currently, host driver installs keys for STA, SAP and P2P
iface. A peer validation is present to do so in these modes
in crpto API(target_if_crypto_set_key). NAN vdev also needs
same support for NAN pairing protocol but doesn't have a peer
as such.
So, bypass peer validation for NAN vdev.

Change-Id: Ief003d096da6f241ff13329c49a32cd896dec9db
CRs-Fixed: 3257754
2022-08-27 19:54:38 -07:00
Pragaspathi Thilagaraj
b7fa703306 qcacmn: Add support to send PASN commands
Add support to send below PASN commands:
WMI_RTT_PASN_AUTH_STATUS_CMD
WMI_RTT_PASN_DEAUTH_CMD
WMI_VDEV_SET_LTF_KEY_SEED_CMDID

Change-Id: I5a50a634317d0a692feee5be5a36da22b4c5d713
CRs-Fixed: 3154530
2022-07-06 23:07:52 -07:00
Yu Wang
dcd269c55a qcacmn: enhance crypto api to install key synchronously
Add parameter 'bool sync' for wlan_cfg80211_crypto_add_key()
to indicate whether or not to add key synchronously.
If it's set to true, wait until install key complete event
is received.

Change-Id: I9a69d486665fb3f65a5720ccfbfb638c09329418
CRs-Fixed: 2865832
2021-06-21 23:14:27 -07:00
Nandha Kishore Easwaran
6547f0f671 qcacmn: Swap bytes of key_data in big endian platform
Swap each word of key_data before sending key install command.
This is needed since copy engine swap is enabled for big endian platform
and key needs to be plumbed in network byte order for decoding to happen
correctly.

Handle the swap in wmi layer since all other big endian conversions are
handled in this layer.

Change-Id: Ia6f0d579f3edaf32193c353ea2fe35cc40f55399
2020-12-28 08:56:09 -08:00
wadesong
e2d233c757 qcacmn: Fix a KW issue in crypto set function
In function target_if_crypto_set_key(), array pn's size is 16,
while params.key_rsc_ctr's length is 8, so the length of src
buffer(params.key_rsc_ctr in this case) should be used when
copying data to dest buffer(pn).

Change-Id: Ifa9156963c3da0234dbf8755a4d1f7bf3b96d0ff
CRs-Fixed: 2822715
2020-11-21 02:20:23 -08:00
Srinivas Girigowda
40f652caf5 qcacmn: target_if: Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF
Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF.

CRs-Fixed: 2760938
Change-Id: Ic2a0a703210bb64aee57e5e3edb4028906f62dc9
2020-08-23 23:09:44 -07:00
Utkarsh Bhatnagar
4987746ee6 qcacmn: Change WAPI Tx IV PN Sequence
Change the receive and transmit Iv in wlan_crypto_set_wapi_key
such as:
	tx_iv[16] = {0x5c, 0x36, 0x5c, 0x36, 0x5c,
		     0x36, 0x5c, 0x36, 0x5c, 0x36,
		     0x5c, 0x36, 0x5c, 0x36, 0x5c,
		     0x36};

	rx_iv[16] = {0x5c, 0x36, 0x5c, 0x36, 0x5c,
		     0x36, 0x5c, 0x36, 0x5c, 0x36,
		     0x5c, 0x36, 0x5c, 0x36, 0x5c,
		     0x37};

This is done as wpi_key_tsc_counter sequence was been sent
in reverse order. 0x365C365C365C365C365C365C365C365C was
sent although 0x5C365C365C365C365C365C365C365C36 was expected.
This is because new chipset firware expects the format to be
in big endian. Also, taken care for the backward compatibility
required for the old chipset firware with the feature flag.

Change-Id: I8c795df5a9143e5089e93aaebe7787e51b570c74
CRs-Fixed: 2743162
2020-08-07 15:02:06 -07:00
gaurank kathpalia
e293836285 qcacmn: Fix the condition for filling WAPI params
Fix the condition for filling WAPI params in
wlan_crypto_set_wapi_key

Change-Id: I3b74e2a36cdc83f06e40d746e2d7aa0740aec65a
CRs-Fixed: 2685797
2020-05-15 20:14:51 -07:00
Yu Tian
0c6d94dd3e qcacmn: cdp: Implement API cdp_set_key_sec_type
Peer key security type is set in cdp_set_pn_check,
this API is called in key install step, but only
update Ucast field even if in Mcast key install.
This may be set wrongly if Ucast and Mcast security
modes are different. Add a new API to set security
modes of differ key types separately.

Change-Id: Icaa63139d117de75633ca1f81eb618c6b9294b53
CRs-Fixed: 2617461
2020-02-14 07:40:04 -08:00
Vevek Venkatesan
af776988bf qcacmn: cdp: Converge cdp_peer_ops
Currently cdp ops are given pdev/vdev/peer
handle as its arguments, which is directly
accessed in those APIs. This can cause a
race-condition in access of the respective
handles if it has been deleted in parallel.

Hence as a part of cdp convergence, pass only
the pdev_id or vdev_id or peer mac address,
which will be used to get the respective handles,
and hence avoiding the unwanted access of the
handles if it has been deleted.

Also remove the ops which are used to store
and retrieve such handles, that no more needed.

- register_peer
- clear_peer
- change_peer_state
- peer_get_ref_by_addr
- peer_release_ref
- peer_state_update
- get_vdev_by_sta_id
- register_ocb_peer
- get_peer_state
- get_vdev_for_peer
- update_ibss_add_peer_num_of_vdev
- remove_peers_for_vdev
- remove_peers_for_vdev_no_lock
- copy_mac_addr_raw
- add_last_real_peer
- is_vdev_restore_last_peer
- update_last_real_peer
- peer_detach_force_delete

Change-Id: I4a41211464a30e018e8b73b8e9b91c7a509327b4
CRs-Fixed: 2541711
2020-01-22 02:46:27 -08:00
Pavankumar Nandeshwar
13aabf095c qcacmn: tgt_if changes for ctrl_ops modifications
tgt_if module changes due to umac-dp decoupling changes in
ctrl_ops APIs

Change-Id: I6c49c83472f497b2ba3dd7135500aeb4fff25336
2020-01-20 17:52:29 -08:00
Pavankumar Nandeshwar
61392d0275 qcacmn: cmn_ops changes in umac, tgt_if for umac-dp decoupling
umac and tgt_if module changes due to umac-dp decoupling changes in
cmn_ops APIs.

Change-Id: If8a7bdb879660f1d15a067ce9c76f96e6dfb7140
2019-12-27 03:25:25 -08:00
Pooventhiran G
9a1b59247c qcacmn: Reset keys to zero after use
In functions that use key values, reset the local variables (key) to
zero after use to avoid security vulnerability.

Change-Id: I105b1abf7c707102ef99bbe4fa213708039d933e
CRs-fixed: 2581402
2019-12-09 18:57:51 -08:00
Yeshwanth Sriram Guntuka
65d547730f qcacmn: Cleanup local peer id from DP APIs
Local peer_id is being cleaned up across DP, HDD and PS/WMA.
So, any references to local peer_id/sta_id will be replaced
by peer mac address and all interactions between the layers
will be based on peer mac address.

Cleanup local peer id usage from DP APIs.

Change-Id: I930e1c6a09092a373c093239632d6f310fee18e2
CRs-Fixed: 2529041
2019-12-06 01:52:16 -08:00
Yue Ma
93fe6e55b4 qcacmn: Add WMI unified header file for crypto
The header file will contain WMI API definitions specific to
crypto component.

Change-Id: I97a3366e66bc424a820cdc02e6a17571ad89c737
CRs-fixed: 2533529
2019-10-21 21:31:37 -07:00
Akshay Kosigi
c36e354311 qcacmn: Fix for removal of void pointer usage
Add changes to remove usage of void pointer for wmi_handle
Instead use an opaque pointer(set 2)

Change-Id: I06a89adaf15c6b398dbc901518aa83927b7ca16a
CRs-Fixed: 2479298
2019-07-02 09:47:56 -07:00
Srinivas Girigowda
2751b6d2b3 qcacmn: Consolidate multiple MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
Consolidate multiple (redundant) MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
CDP_MAC_ADDR_LEN
OL_TXRX_MAC_ADDR_LEN
DP_MAC_ADDR_LEN
HTT_MAC_ADDR_LEN
IEEE80211_ADDR_LEN
DEFRAG_IEEE80211_ADDR_LEN
ETHER_ADDR_LEN
HAL_MAC_ADDR_LEN
WLAN_MACADDR_LEN

CRs-Fixed: 2406591
Change-Id: I4a87f8ff556920c7b341bdbba99ec43c97b873f4
2019-03-28 16:50:32 -07:00
Varun Reddy Yeturu
09a3b065f9 qcacmn: Fix WEP functionality in converged set key
Fix WEP security mode issues in converged set key.

Change-Id: Idd4071c8aef141cb45db9006c5773a94b352879a
CRs-Fixed: 2400864
2019-03-03 22:25:23 -08:00
Kiran Kumar Lokere
b4d634fbf2 qcacmn: Fix compilation issue with crypto set key
Fix compilation issue with crypto set key feature.

Change-Id: I82d8220a9fea1f9e48338baa74307c124c98e784
CRs-Fixed: 2381329
2019-02-08 15:40:27 -08:00
Kiran Kumar Lokere
25531c4717 qcacmn: Add support for SET KEY convergence
Make changes to the cmn driver to support SET KEY
convergence feature

Change-Id: I17b5f368a1f735eb394ea70f9b61cc033c3eb20a
CRs-Fixed: 2358796
2019-01-08 18:21:17 -08:00