summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJi Soo Shin <jisshin@google.com>2023-03-01 14:00:51 +0100
committerJi Soo Shin <jisshin@google.com>2023-03-01 16:53:20 +0100
commitf95a5f28b68fa975a78448a04b945982b0c92389 (patch)
treeb83ea2ad21696868d2b9fe5dd784fd82f2d362cd
parent825bbfa57cf01ff20ab6d2f8eaa32f1bef12effd (diff)
downloadsamsung-f95a5f28b68fa975a78448a04b945982b0c92389.tar.gz
zuma: pass HDCP 2.3 CTS Receiver Tests
Couple bugs were found by the receiver tests. We must read entire certificate at a time. We must also write type as well. Bug: 271269142 Change-Id: I28bca10abd7e452dd7554f09d6f0795fae1df121 Signed-off-by: Ji Soo Shin <jisshin@google.com>
-rw-r--r--exynos-hdcp2-dplink-auth.c35
1 files changed, 8 insertions, 27 deletions
diff --git a/exynos-hdcp2-dplink-auth.c b/exynos-hdcp2-dplink-auth.c
index b0ac0cc..958a97f 100644
--- a/exynos-hdcp2-dplink-auth.c
+++ b/exynos-hdcp2-dplink-auth.c
@@ -283,36 +283,20 @@ static int do_recv_ake_send_cert(struct hdcp_link_data *lk)
struct hdcp_msg_info msg_info;
struct dp_ake_send_cert m_send_cert;
- /* check abort state firstly,
- * if session is abored by Rx, Tx stops Authentication process
- */
- if (is_auth_aborted())
- return -TX_AUTH_ERROR_ABORT;
+ /* check abort state firstly,
+ * if session is abored by Rx, Tx stops Authentication process
+ */
+ if (is_auth_aborted())
+ return -TX_AUTH_ERROR_ABORT;
ret = hdcp_dplink_recv(HDCP22_MSG_CERT_RX_R,
- m_send_cert.cert_rx,
- sizeof(m_send_cert.cert_rx));
+ m_send_cert.cert_rx,
+ HDCP_RX_CERT_LEN + HDCP_RRX_BYTE_LEN + HDCP_CAPS_BYTE_LEN);
if (ret) {
hdcp_err("ake_send_cert cert recv fail. ret(%d)\n", ret);
return -1;
}
- ret = hdcp_dplink_recv(HDCP22_MSG_RRX_R,
- m_send_cert.rrx,
- sizeof(m_send_cert.rrx));
- if (ret) {
- hdcp_err("HDCP : ake_send_cert rrx recv fail: ret(%d)\n", ret);
- return -1;
- }
-
- ret = hdcp_dplink_recv(HDCP22_MSG_RXCAPS_R,
- m_send_cert.rxcaps,
- sizeof(m_send_cert.rxcaps));
- if (ret) {
- hdcp_err("ake_send_cert rxcaps recv fail: ret(%d)\n", ret);
- return -1;
- }
-
parse_rxcaps_info(m_send_cert.rxcaps, lk);
memcpy(msg_info.msg, &m_send_cert, sizeof(struct dp_ake_send_cert));
@@ -526,9 +510,8 @@ static int do_send_ske_send_eks(struct hdcp_link_data *lk)
* Currently, SST mode only use 0x00 as type value
* MST mode, HDCP driver get type value from DP driver
*/
-#if defined(CONFIG_HDCP2_2_ERRATA_SUPPORT)
uint8_t type = 0x00;
-#endif
+
/* check abort state firstly,
* if session is abored by Rx, Tx stops Authentication process
*/
@@ -566,7 +549,6 @@ static int do_send_ske_send_eks(struct hdcp_link_data *lk)
return -1;
}
-#if defined(CONFIG_HDCP2_2_ERRATA_SUPPORT)
/* HDCP errata defined stream type.
* type info is send only for receiver
*/
@@ -579,7 +561,6 @@ static int do_send_ske_send_eks(struct hdcp_link_data *lk)
return -1;
}
}
-#endif
return 0;
}