Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a021228f authored by Yu Wang's avatar Yu Wang
Browse files

qcacld-3.0: wait till complete for north bound add key request

Set the newly added flag for wlan_cfg80211_crypto_add_key():
set to true if the request is from north bound, false otherwise.
Move processing of install key complete event into
crypto component.

Change-Id: I981e3722966c5b44255b3e29b7df3fbccfa087c8
CRs-Fixed: 2839454
parent 4d86c1a2
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1294,7 +1294,8 @@ WMI_OBJS := $(WMI_OBJ_DIR)/wmi_unified.o \
	    $(WMI_OBJ_DIR)/wmi_unified_api.o \
	    $(WMI_OBJ_DIR)/wmi_unified_reg_api.o \
	    $(WMI_OBJ_DIR)/wmi_unified_vdev_api.o \
	    $(WMI_OBJ_DIR)/wmi_unified_vdev_tlv.o
	    $(WMI_OBJ_DIR)/wmi_unified_vdev_tlv.o \
	    $(WMI_OBJ_DIR)/wmi_unified_crypto_api.o

ifeq ($(CONFIG_POWER_MANAGEMENT_OFFLOAD), y)
WMI_OBJS += $(WMI_OBJ_DIR)/wmi_unified_pmo_api.o
+2 −1
Original line number Diff line number Diff line
@@ -4035,7 +4035,8 @@ static QDF_STATUS wlan_hdd_set_key_helper(struct hdd_adapter *adapter,
	if (!vdev)
		return QDF_STATUS_E_FAILURE;
	ret = wlan_cfg80211_crypto_add_key(vdev,
					   WLAN_CRYPTO_KEY_TYPE_UNICAST, 0);
					   WLAN_CRYPTO_KEY_TYPE_UNICAST, 0,
					   false);
	hdd_objmgr_put_vdev(vdev);
	if (ret != 0) {
		hdd_err("crypto add key fail, status: %d", ret);
+8 −7
Original line number Diff line number Diff line
@@ -17507,7 +17507,7 @@ static int wlan_hdd_add_key_ibss(struct hdd_adapter *adapter,
	if (!vdev)
		return -EINVAL;
	errno = wlan_cfg80211_crypto_add_key(vdev, WLAN_CRYPTO_KEY_TYPE_GROUP,
					     key_index);
					     key_index, false);
	if (errno) {
		hdd_err("add_ibss_key failed, errno: %d", errno);
		hdd_objmgr_put_vdev(vdev);
@@ -17572,10 +17572,11 @@ static int wlan_hdd_add_key_sap(struct hdd_adapter *adapter,
	if (hostapd_state->bss_state == BSS_START) {
		errno =
		wlan_cfg80211_crypto_add_key(vdev, (pairwise ?
		wlan_cfg80211_crypto_add_key(vdev,
					     (pairwise ?
					      WLAN_CRYPTO_KEY_TYPE_UNICAST :
					      WLAN_CRYPTO_KEY_TYPE_GROUP),
					     key_index);
					     key_index, true);
		if (!errno)
			wma_update_set_key(adapter->vdev_id, pairwise,
					   key_index, cipher);
@@ -17608,7 +17609,7 @@ static int wlan_hdd_add_key_sta(struct hdd_adapter *adapter,
	errno = wlan_cfg80211_crypto_add_key(vdev, (pairwise ?
					     WLAN_CRYPTO_KEY_TYPE_UNICAST :
					     WLAN_CRYPTO_KEY_TYPE_GROUP),
					     key_index);
					     key_index, true);
	hdd_objmgr_put_vdev(vdev);
	if (!errno && adapter->send_mode_change) {
		wlan_hdd_send_mode_change_event();
@@ -17994,7 +17995,7 @@ static int __wlan_hdd_cfg80211_set_default_key(struct wiphy *wiphy,
		wlan_cfg80211_crypto_add_key(adapter->vdev, (unicast ?
					     WLAN_CRYPTO_KEY_TYPE_UNICAST :
					     WLAN_CRYPTO_KEY_TYPE_GROUP),
					     key_index);
					     key_index, true);
		wma_update_set_key(adapter->vdev_id, unicast, key_index,
				   crypto_key->cipher_type);
	}
+0 −4
Original line number Diff line number Diff line
@@ -956,10 +956,6 @@ void wma_set_sta_keep_alive(tp_wma_handle wma, uint8_t vdev_id,
				   uint8_t *hostv4addr, uint8_t *destv4addr,
				   uint8_t *destmac);

int wma_vdev_install_key_complete_event_handler(void *handle,
						uint8_t *event,
						uint32_t len);

/**
 * wma_objmgr_set_peer_mlme_phymode() - set phymode to peer object
 * @wma:      wma handle
+0 −6
Original line number Diff line number Diff line
@@ -3234,12 +3234,6 @@ QDF_STATUS wma_open(struct wlan_objmgr_psoc *psoc,
	wma_handle->staDynamicDtim =
			ucfg_pmo_get_sta_dynamic_dtim(wma_handle->psoc);

	/* register for install key completion event */
	wmi_unified_register_event_handler(wma_handle->wmi_handle,
				wmi_vdev_install_key_complete_event_id,
				wma_vdev_install_key_complete_event_handler,
				WMA_RX_SERIALIZER_CTX);

#ifdef WLAN_FEATURE_STATS_EXT
	/* register for extended stats event */
	wmi_unified_register_event_handler(wma_handle->wmi_handle,
Loading