From b0a524b4eab45d595cade6afb06c0b72ef78a496 Mon Sep 17 00:00:00 2001 From: Srinivas Girigowda Date: Tue, 24 Nov 2015 12:11:13 -0800 Subject: [PATCH] qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in tSirAppTypeParams Replace tSirMacAddr with cdf_mac_addr in tSirAppTypeParams Change-Id: I4629ab11d8014eae6ba27b24362b9253be1606b7 CRs-Fixed: 898864 --- core/hdd/src/wlan_hdd_ioctl.c | 14 ++++++-------- core/mac/inc/sir_api.h | 4 ++-- core/wma/src/wma_features.c | 8 ++++---- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c index c593a6a00d1a..462ffd679dc0 100644 --- a/core/hdd/src/wlan_hdd_ioctl.c +++ b/core/hdd/src/wlan_hdd_ioctl.c @@ -1723,7 +1723,7 @@ static int hdd_set_app_type1_parser(hdd_adapter_t *adapter, tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(adapter); char id[20], password[20]; tSirAppType1Params params; - int rc, i; + int rc; rc = wlan_hdd_validate_context(hdd_ctx); if (0 != rc) { @@ -1739,9 +1739,7 @@ static int hdd_set_app_type1_parser(hdd_adapter_t *adapter, memset(¶ms, 0, sizeof(tSirAppType1Params)); params.vdev_id = adapter->sessionId; - for (i = 0; i < ETHER_ADDR_LEN; i++) - params.wakee_mac_addr[i] = - adapter->macAddressCurrent.bytes[i]; + cdf_copy_macaddr(¶ms.wakee_mac_addr, &adapter->macAddressCurrent); params.id_length = strlen(id); cdf_mem_copy(params.identification_id, id, params.id_length); @@ -1750,7 +1748,7 @@ static int hdd_set_app_type1_parser(hdd_adapter_t *adapter, CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_INFO, "%s: %d %pM %.8s %u %.16s %u", - __func__, params.vdev_id, params.wakee_mac_addr, + __func__, params.vdev_id, params.wakee_mac_addr.bytes, params.identification_id, params.id_length, params.password, params.pass_length); @@ -1782,7 +1780,7 @@ static int hdd_set_app_type2_parser(hdd_adapter_t *adapter, hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(adapter); tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(adapter); char mac_addr[20], rc4_key[20]; - unsigned int gateway_mac[6], i; + unsigned int gateway_mac[CDF_MAC_ADDR_SIZE]; tSirAppType2Params params; int ret; @@ -1831,8 +1829,8 @@ static int hdd_set_app_type2_parser(hdd_adapter_t *adapter, return -EINVAL; } - for (i = 0; i < ETHER_ADDR_LEN; i++) - params.gateway_mac[i] = (uint8_t) gateway_mac[i]; + cdf_mem_copy(¶ms.gateway_mac.bytes, (uint8_t *) &gateway_mac, + CDF_MAC_ADDR_SIZE); params.rc4_key_len = strlen(rc4_key); cdf_mem_copy(params.rc4_key, rc4_key, params.rc4_key_len); diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index c96ca50d252e..a710e37a462a 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -2650,7 +2650,7 @@ typedef struct { typedef struct { uint8_t vdev_id; - tSirMacAddr wakee_mac_addr; + struct cdf_mac_addr wakee_mac_addr; uint8_t identification_id[8]; uint8_t password[16]; uint32_t id_length; @@ -2679,7 +2679,7 @@ typedef struct { uint32_t keepalive_max; /* Maximum ping interval */ uint32_t keepalive_inc; /* Increment of ping interval */ - tSirMacAddr gateway_mac; + struct cdf_mac_addr gateway_mac; uint32_t tcp_tx_timeout_val; uint32_t tcp_rx_timeout_val; } tSirAppType2Params, *tpSirAppType2Params; diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c index 529ee0de6724..e5a5216ad6b7 100644 --- a/core/wma/src/wma_features.c +++ b/core/wma/src/wma_features.c @@ -5413,7 +5413,7 @@ int wma_set_app_type1_params_in_fw(tp_wma_handle wma, (wmi_extwow_set_app_type1_params_cmd_fixed_param)); cmd->vdev_id = appType1Params->vdev_id; - WMI_CHAR_ARRAY_TO_MAC_ADDR(appType1Params->wakee_mac_addr, + WMI_CHAR_ARRAY_TO_MAC_ADDR(appType1Params->wakee_mac_addr.bytes, &cmd->wakee_mac); cdf_mem_copy(cmd->ident, appType1Params->identification_id, 8); cmd->ident_len = appType1Params->id_length; @@ -5423,7 +5423,7 @@ int wma_set_app_type1_params_in_fw(tp_wma_handle wma, WMA_LOGD("%s: vdev_id %d wakee_mac_addr %pM " "identification_id %.8s id_length %u " "password %.16s pass_length %u", - __func__, cmd->vdev_id, appType1Params->wakee_mac_addr, + __func__, cmd->vdev_id, appType1Params->wakee_mac_addr.bytes, cmd->ident, cmd->ident_len, cmd->passwd, cmd->passwd_len); ret = wmi_unified_cmd_send(wma->wmi_handle, buf, len, @@ -5486,7 +5486,7 @@ int wma_set_app_type2_params_in_fw(tp_wma_handle wma, cmd->keepalive_max = appType2Params->keepalive_max; cmd->keepalive_inc = appType2Params->keepalive_inc; - WMI_CHAR_ARRAY_TO_MAC_ADDR(appType2Params->gateway_mac, + WMI_CHAR_ARRAY_TO_MAC_ADDR(appType2Params->gateway_mac.bytes, &cmd->gateway_mac); cmd->tcp_tx_timeout_val = appType2Params->tcp_tx_timeout_val; cmd->tcp_rx_timeout_val = appType2Params->tcp_rx_timeout_val; @@ -5498,7 +5498,7 @@ int wma_set_app_type2_params_in_fw(tp_wma_handle wma, "tcp_ack_seq %u keepalive_init %u keepalive_min %u " "keepalive_max %u keepalive_inc %u " "tcp_tx_timeout_val %u tcp_rx_timeout_val %u", - __func__, cmd->vdev_id, appType2Params->gateway_mac, + __func__, cmd->vdev_id, appType2Params->gateway_mac.bytes, cmd->rc4_key, cmd->rc4_key_len, cmd->ip_id, cmd->ip_device_ip, cmd->ip_server_ip, cmd->tcp_src_port, cmd->tcp_dst_port, cmd->tcp_seq,