Merge "conman: Add new GFiber OUIs."
diff --git a/conman/iw.py b/conman/iw.py
index fd56e32..f2e15d8 100755
--- a/conman/iw.py
+++ b/conman/iw.py
@@ -6,19 +6,10 @@
import subprocess
-FIBER_OUI = 'f4:f5:e8'
-DEFAULT_GFIBERSETUP_SSID = 'GFiberSetupAutomation'
-
-
-def _scan(band, **kwargs):
- try:
- return subprocess.check_output(('wifi', 'scan', '-b', band), **kwargs)
- except subprocess.CalledProcessError:
- return ''
-
-
-GFIBER_OUIS = ['f4:f5:e8']
+GFIBER_VENDOR_IE_OUI = 'f4:f5:e8'
+GFIBER_OUIS = ['00:1a:11', 'f4:f5:e8', 'f8:8f:ca']
VENDOR_IE_FEATURE_ID_AUTOPROVISIONING = '01'
+DEFAULT_GFIBERSETUP_SSID = 'GFiberSetupAutomation'
_BSSID_RE = r'BSS (?P<BSSID>([0-9a-f]{2}:?){6})\(on .*\)'
@@ -28,6 +19,13 @@
'data:(?P<data>( [0-9a-f]{2})+)')
+def _scan(band, **kwargs):
+ try:
+ return subprocess.check_output(('wifi', 'scan', '-b', band), **kwargs)
+ except subprocess.CalledProcessError:
+ return ''
+
+
class BssInfo(object):
"""Contains info about a BSS, parsed from 'iw scan'."""
@@ -119,7 +117,7 @@
continue
for oui, data in bss_info.vendor_ies:
- if oui == FIBER_OUI:
+ if oui == GFIBER_VENDOR_IE_OUI:
octets = data.split()
if octets[0] == '03' and not bss_info.ssid:
bss_info.ssid = ''.join(octets[1:]).decode('hex')
@@ -138,7 +136,7 @@
def _bssid_priority(bss_info):
result = 4 if bss_info.bssid[:8] in GFIBER_OUIS else 2
for oui, data in bss_info.vendor_ies:
- if (oui in GFIBER_OUIS and
+ if (oui == GFIBER_VENDOR_IE_OUI and
data.startswith(VENDOR_IE_FEATURE_ID_AUTOPROVISIONING)):
result = 5
diff --git a/conman/iw_test.py b/conman/iw_test.py
index 3bb3cf7..55b2e7b 100755
--- a/conman/iw_test.py
+++ b/conman/iw_test.py
@@ -553,7 +553,7 @@
Vendor specific: OUI 00:11:22, data: 01 23 45 67
Vendor specific: OUI f4:f5:e8, data: 01
Vendor specific: OUI f4:f5:e8, data: 03 47 46 69 62 65 72 53 65 74 75 70 41 75 74 6f 6d 61 74 69 6f 6e
-BSS f4:f5:e8:f1:36:43(on wcli0)
+BSS 00:1a:11:f1:36:43(on wcli0)
TSF: 12499150000 usec (0d, 03:28:19)
freq: 2437
beacon interval: 100 TUs
@@ -646,7 +646,7 @@
vendor_ies=[test_ie, provisioning_ie,
ssid_ie])
provisioning_bss_info_frenzy = iw.BssInfo(ssid=iw.DEFAULT_GFIBERSETUP_SSID,
- bssid='f4:f5:e8:f1:36:43',
+ bssid='00:1a:11:f1:36:43',
rssi=-66)
wvtest.WVPASSEQ(