From b63fe511bbc9de16a95a7d2aa3b2cfaa241b80cb Mon Sep 17 00:00:00 2001 From: Masayuki Ishikawa Date: Mon, 26 Jul 2021 17:17:52 +0900 Subject: [PATCH] drivers: wireless: Fix to set the address family for recvfrom() in gs2200m.c Summary: - I noticed that the ntpclient does not work with gs2200m - Finally, I found that the address family for recvfrom() is not set correctly - This commit fixes this issue Impact: - None Testing: - Tested with ntpclient Signed-off-by: Masayuki Ishikawa --- drivers/wireless/gs2200m.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/wireless/gs2200m.c b/drivers/wireless/gs2200m.c index 6364c9f201..e0a5bc9ec6 100644 --- a/drivers/wireless/gs2200m.c +++ b/drivers/wireless/gs2200m.c @@ -666,6 +666,12 @@ errout: memcpy(&msg->addr, &pkt_dat->addr, sizeof(pkt_dat->addr)); + /* Set the address family + * NOTE: gs2200m only supports IPv4 + */ + + msg->addr.sin_family = AF_INET; + /* In udp case, treat the packet separately */ ret = false;