Browse Source

qcacld-3.0: Remove wma_fill_in_wapi_key_params()

The following change removed most of the legacy crypto code following
the transition to the converged crypto component:
    qcacld-3.0: Cleanup CRYPTO_SET_KEY_CONVERGED for WMA layer
    Change-Id If70fc5cb01f2a0123030c92410e126ce8078e1c6

This change removed wma_setup_install_key_cmd(), but left behind the
now unused function wma_fill_in_wapi_key_params() that it used to call
when FEATURE_WLAN_WAPI was enabled.

So remove the unused function, along with struct wma_set_key_params
which is now unused as well.

Change-Id: Ie16d6ce20d8f5f99ef1c625b34bea3685d3d8029
CRs-Fixed: 3424774
Jeff Johnson 2 years ago
parent
commit
4ba54fa109
2 changed files with 1 additions and 108 deletions
  1. 0 26
      core/wma/inc/wma.h
  2. 1 82
      core/wma/src/wma_mgmt.c

+ 0 - 26
core/wma/inc/wma.h

@@ -1145,32 +1145,6 @@ struct wma_target_req {
 	uint8_t type;
 };
 
-/**
- * struct wma_set_key_params - set key parameters
- * @vdev_id: vdev id
- * @def_key_idx: used to see if we have to read the key from cfg
- * @key_len: key length
- * @peer_mac: peer mac address
- * @singl_tid_rc: 1=Single TID based Replay Count, 0=Per TID based RC
- * @key_type: key type
- * @key_idx: key index
- * @unicast: unicast flag
- * @key_data: key data
- */
-struct wma_set_key_params {
-	uint8_t vdev_id;
-	/* def_key_idx can be used to see if we have to read the key from cfg */
-	uint32_t def_key_idx;
-	uint16_t key_len;
-	uint8_t peer_mac[QDF_MAC_ADDR_SIZE];
-	uint8_t singl_tid_rc;
-	enum eAniEdType key_type;
-	uint32_t key_idx;
-	bool unicast;
-	uint8_t key_data[SIR_MAC_MAX_KEY_LENGTH];
-	uint8_t key_rsc[WLAN_CRYPTO_RSC_SIZE];
-};
-
 /**
  * struct t_thermal_cmd_params - thermal command parameters
  * @minTemp: minimum temperature

+ 1 - 82
core/wma/src/wma_mgmt.c

@@ -2021,87 +2021,6 @@ void wma_update_frag_params(tp_wma_handle wma, uint32_t value)
 	}
 }
 
-#ifdef FEATURE_WLAN_WAPI
-#define WPI_IV_LEN 16
-#if defined(CONFIG_LITHIUM) || defined(CONFIG_BERYLLIUM)
-/**
- * wma_fill_in_wapi_key_params() - update key parameters about wapi
- * @key_params: wma key parameters
- * @params: parameters pointer to be set
- * @mode: operation mode
- *
- * Return: None
- */
-static inline void wma_fill_in_wapi_key_params(
-		struct wma_set_key_params *key_params,
-		struct set_key_params *params, uint8_t mode)
-{
-	/*
-	 * Since MCL shares same FW with WIN for Napier/Hasting, FW WAPI logic
-	 * is fit for WIN, change it to align with WIN.
-	 */
-	unsigned char iv_init_ap[16] = { 0x5c, 0x36, 0x5c, 0x36, 0x5c, 0x36,
-					 0x5c, 0x36, 0x5c, 0x36, 0x5c, 0x36,
-					 0x5c, 0x36, 0x5c, 0x37};
-	unsigned char iv_init_sta[16] = { 0x5c, 0x36, 0x5c, 0x36, 0x5c, 0x36,
-					  0x5c, 0x36, 0x5c, 0x36, 0x5c, 0x36,
-					  0x5c, 0x36, 0x5c, 0x36};
-
-	if (mode == wlan_op_mode_ap) {
-		qdf_mem_copy(params->rx_iv, iv_init_sta,
-			     WPI_IV_LEN);
-		qdf_mem_copy(params->tx_iv, iv_init_ap,
-			     WPI_IV_LEN);
-	} else {
-		qdf_mem_copy(params->rx_iv, iv_init_ap,
-			     WPI_IV_LEN);
-		qdf_mem_copy(params->tx_iv, iv_init_sta,
-			     WPI_IV_LEN);
-	}
-
-	params->key_txmic_len = WMA_TXMIC_LEN;
-	params->key_rxmic_len = WMA_RXMIC_LEN;
-
-	params->key_cipher = WMI_CIPHER_WAPI;
-}
-#else
-static inline void wma_fill_in_wapi_key_params(
-		struct wma_set_key_params *key_params,
-		struct set_key_params *params, uint8_t mode)
-{
-	/*initialize receive and transmit IV with default values */
-	/* **Note: tx_iv must be sent in reverse** */
-	unsigned char tx_iv[16] = { 0x36, 0x5c, 0x36, 0x5c, 0x36, 0x5c,
-				    0x36, 0x5c, 0x36, 0x5c, 0x36, 0x5c,
-				    0x36, 0x5c, 0x36, 0x5c};
-	unsigned char rx_iv[16] = { 0x5c, 0x36, 0x5c, 0x36, 0x5c, 0x36,
-				    0x5c, 0x36, 0x5c, 0x36, 0x5c, 0x36,
-				    0x5c, 0x36, 0x5c, 0x37};
-	if (mode == wlan_op_mode_ap) {
-		/* Authenticator initializes the value of PN as
-		 * 0x5C365C365C365C365C365C365C365C36 for MCastkeyUpdate
-		 */
-		if (key_params->unicast)
-			tx_iv[0] = 0x37;
-
-		rx_iv[WPI_IV_LEN - 1] = 0x36;
-	} else {
-		if (!key_params->unicast)
-			rx_iv[WPI_IV_LEN - 1] = 0x36;
-	}
-
-	params->key_txmic_len = WMA_TXMIC_LEN;
-	params->key_rxmic_len = WMA_RXMIC_LEN;
-
-	qdf_mem_copy(params->rx_iv, &rx_iv,
-		     WPI_IV_LEN);
-	qdf_mem_copy(params->tx_iv, &tx_iv,
-		     WPI_IV_LEN);
-	params->key_cipher = WMI_CIPHER_WAPI;
-}
-#endif
-#endif
-
 /**
  * wma_process_update_edca_param_req() - update EDCA params
  * @handle: wma handle
@@ -2674,7 +2593,7 @@ void wma_set_keepalive_req(tp_wma_handle wma,
  * wma_beacon_miss_handler() - beacon miss event handler
  * @wma: wma handle
  * @vdev_id: vdev id
- * @riis: rssi value
+ * @rssi: rssi value
  *
  * This function send beacon miss indication to upper layers.
  *