From dd2daa496113d27e82571fb890719d284a44384d Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Wed, 21 Aug 2019 13:20:04 -0700 Subject: [PATCH] scan: add Interworking to scan requests --- src/scan.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/scan.c b/src/scan.c index 085a2289..3365c4c5 100644 --- a/src/scan.c +++ b/src/scan.c @@ -283,9 +283,10 @@ static struct l_genl_msg *scan_build_cmd(struct scan_context *sc, { struct l_genl_msg *msg; uint32_t flags = 0; - struct iovec iov[2]; + struct iovec iov[3]; unsigned int iov_elems = 0; const uint8_t *ext_capa; + uint8_t interworking[3]; msg = l_genl_msg_new(NL80211_CMD_TRIGGER_SCAN); @@ -302,6 +303,15 @@ static struct l_genl_msg *scan_build_cmd(struct scan_context *sc, iov[iov_elems].iov_len = ext_capa[1] + 2; iov_elems++; + /* Order 12 - Interworking */ + interworking[0] = IE_TYPE_INTERWORKING; + interworking[1] = 1; + interworking[2] = 0; /* Private network, INet=0,ASRA=0,ESR=0,UESA=0 */ + + iov[iov_elems].iov_base = interworking; + iov[iov_elems].iov_len = 3; + iov_elems++; + /* Order Last (assuming WSC vendor specific) */ if (params->extra_ie && params->extra_ie_size) { iov[iov_elems].iov_base = (void *) params->extra_ie;