Send connman mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.01.org/mailman/listinfo/connman
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."
Today's Topics:
1. Prevent scanning on tethering interface (Jose Blanquicet)
----------------------------------------------------------------------
Message: 1
Date: Thu, 9 Mar 2017 12:55:35 +0000
From: Jose Blanquicet <[email protected]>
To: [email protected]
Subject: Prevent scanning on tethering interface
Message-ID:
<CAFC8iJ+x4vTzjAa9uq5MGghZYka=VVN=u1b2agrjkr0-vhy...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Hi,
The first issue takes place when user asks for a Scan on P2P technology and
Tethering is enabled for WiFi technology, ConnMan will reply with a success
to the request even if the P2P find does not actually started. The second
issue occurs when user asks for a Scan on WiFi technology and WiFi
tethering is enabled, in such case, ConnMan will never emit the reply and
client (e.g. connmanctl) will go in D-Bus time-out.
I investigated first case and I saw that ConnMan's scan algorithm replies
"success" to the request because ConnMan successfully makes the D-Bus call
P2PDevice.Find() to ask wpa_supplicant to launch the P2P find even if
wpa_supplicant will reply ?ScanError?.
I suggest to check tethering state before calling P2PDevice.Find() as is
done for Scan() to solve first issue and return -EBUSY instead of zero
("success") if tethering is enabled to solve the second issue, see an
initial idea bellow. Doing so, ConnMan will save one useless D-Bus call
toward wpa_s and will be able to correctly reply "Error" to the scan
requests while tethering. We tested this in our systems and it seems to
work but I was wondering if this solution could have problem in systems
with other characteristics of WiFi interfaces/capabilities. What do people
think?
diff --git a/plugins/wifi.c b/plugins/wifi.c
index f8d88fa..a49031c 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -1802,14 +1802,14 @@ static int wifi_scan(enum connman_service_type type,
if (wifi->p2p_device)
return 0;
+ if (wifi->tethering)
+ return -EBUSY;
+
if (type == CONNMAN_SERVICE_TYPE_P2P)
return p2p_find(device);
DBG("device %p wifi %p hidden ssid %s", device, wifi->interface,
ssid);
- if (wifi->tethering)
- return 0;
-
scanning = connman_device_get_scanning(device);
if (!ssid || ssid_len == 0 || ssid_len > 32) {
Regards,
Jose Blanquicet
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.01.org/pipermail/connman/attachments/20170309/6481343c/attachment-0001.html>
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman
------------------------------
End of connman Digest, Vol 17, Issue 6
**************************************