diff mbox series

ft: add debug prints for FT-over-DS

Message ID 20230621193633.898045-1-prestwoj@gmail.com (mailing list archive)
State Accepted, archived
Headers show
Series ft: add debug prints for FT-over-DS | expand

Commit Message

James Prestwood June 21, 2023, 7:36 p.m. UTC
This is consistent with the over-Air path, and makes it clear when
reading the logs if over-DS was used, if there was a response frame,
and if the frame failed to parse in some way.
---
 src/ft.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

Comments

Denis Kenzior June 27, 2023, 2:32 a.m. UTC | #1
Hi James,

On 6/21/23 14:36, James Prestwood wrote:
> This is consistent with the over-Air path, and makes it clear when
> reading the logs if over-DS was used, if there was a response frame,
> and if the frame failed to parse in some way.
> ---
>   src/ft.c | 14 +++++++++++---
>   1 file changed, 11 insertions(+), 3 deletions(-)
> 

Applied, thanks.

Regards,
-Denis
diff mbox series

Patch

diff --git a/src/ft.c b/src/ft.c
index e223484b..c51a1288 100644
--- a/src/ft.c
+++ b/src/ft.c
@@ -825,15 +825,21 @@  void __ft_rx_action(uint32_t ifindex, const uint8_t *frame, size_t frame_len)
 
 	ret = ft_over_ds_parse_action_response(frame, frame_len, &spa, &aa,
 						&ies, &ies_len);
-	if (ret != 0)
+	if (ret != 0) {
+		l_debug("Could not parse action response");
 		return;
+	}
 
 	info = ft_info_find(ifindex, aa);
-	if (!info)
+	if (!info) {
+		l_debug("No FT info found for BSS "MAC, MAC_STR(aa));
 		return;
+	}
 
-	if (!ft_parse_ies(info, hs, ies, ies_len))
+	if (!ft_parse_ies(info, hs, ies, ies_len)) {
+		l_debug("Could not parse action response IEs");
 		goto ft_error;
+	}
 
 	info->parsed = true;
 
@@ -931,6 +937,8 @@  static bool ft_send_action(struct wiphy_radio_work_item *work)
 	memcpy(ft_req + 2, info->spa, 6);
 	memcpy(ft_req + 8, info->aa, 6);
 
+	l_debug("");
+
 	if (!ft_build_authenticate_ies(hs, hs->supplicant_ocvc, info->snonce,
 					ies, &len))
 		goto failed;