From 08bf9be85257dbfaa2f979518009d39d284f2f7a Mon Sep 17 00:00:00 2001 From: Visudha Sathurappan Date: Wed, 20 Dec 2017 12:04:53 +0530 Subject: [PATCH] qcacmn: Fix WEP+OL issue in MIPS platform For big endian based offload radios, the key installed using WMI_VDEV_INSTALL_KEY_CMDID requires to be code swapped as the copy engine for big endian platform does byte swap operation on the received key before sending it down to FW. The big endian conversion is carried out in ol_if_vap.c for big endian platform specific radios. However, it is observed that an additional copy is carried out in the WMI layer that is overwriting the converted key with old key, in the non-swapped form. Hence move the big endian operation to the WMI layer to ensure uniform functioning of the API Change-Id: I9ee16572d08045b0f55b0de190efba5c6806031c CRs-Fixed: 2161682 --- wmi/src/wmi_unified_non_tlv.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wmi/src/wmi_unified_non_tlv.c b/wmi/src/wmi_unified_non_tlv.c index b77785094f9e..646f0844911e 100644 --- a/wmi/src/wmi_unified_non_tlv.c +++ b/wmi/src/wmi_unified_non_tlv.c @@ -402,7 +402,13 @@ static QDF_STATUS send_setup_install_key_cmd_non_tlv(wmi_unified_t wmi_handle, } #endif - qdf_mem_copy(cmd->key_data, param->key_data, + /* for big endian host, copy engine byte_swap is enabled + * But the key data content is in network byte order + * Need to byte swap the key data content - so when copy engine + * does byte_swap - target gets key_data content in the correct order + */ + + WMI_HOST_IF_MSG_COPY_CHAR_ARRAY(cmd->key_data, param->key_data, cmd->key_len); return wmi_unified_cmd_send(wmi_handle, buf, len,