Browse Source

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
Visudha Sathurappan 7 years ago
parent
commit
08bf9be852
1 changed files with 7 additions and 1 deletions
  1. 7 1
      wmi/src/wmi_unified_non_tlv.c

+ 7 - 1
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,