From c9e93e2bb32e2f9ef20a759561afb2b051a15776 Mon Sep 17 00:00:00 2001 From: Mike Hansen Date: Thu, 18 Mar 2021 10:32:26 -0400 Subject: [PATCH] WIFI-1808: AP-NOS Passpoint : Access type and internet value is not getting set Interworking element in Beacon for passpoint SSID Fix error setting internet in Hotspot20_Config table had wrong attribute referenced from Profile Add support for "access_network_type", of type int, into the Hotspot20_Config provisioning, add check to make sure it is only set if available in schema as AP has not yet modelled in ovsdb schema. --- .../wlan/opensync/ovsdb/dao/OvsdbHotspotConfig.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/opensync-gateway/src/main/java/com/telecominfraproject/wlan/opensync/ovsdb/dao/OvsdbHotspotConfig.java b/opensync-gateway/src/main/java/com/telecominfraproject/wlan/opensync/ovsdb/dao/OvsdbHotspotConfig.java index 962477f..fa9bc8f 100644 --- a/opensync-gateway/src/main/java/com/telecominfraproject/wlan/opensync/ovsdb/dao/OvsdbHotspotConfig.java +++ b/opensync-gateway/src/main/java/com/telecominfraproject/wlan/opensync/ovsdb/dao/OvsdbHotspotConfig.java @@ -555,7 +555,7 @@ public class OvsdbHotspotConfig extends OvsdbDaoBase { if (hs2Profile.getHessid() != null) { rowColumns.put("hessid", new Atom<>(hs2Profile.getHessid().getAddressAsString())); } - rowColumns.put("internet", new Atom<>(hs2Profile.isEnableInterworkingAndHs20())); + rowColumns.put("internet", new Atom<>(hs2Profile.isInternetConnectivity())); if (hs2Profile.getQosMapSetConfiguration() != null) { rowColumns.put("qos_map_set", new Atom<>(String.join(",", hs2Profile.getQosMapSetConfiguration()))); } @@ -570,6 +570,14 @@ public class OvsdbHotspotConfig extends OvsdbDaoBase { .of(connectionCapabilities); rowColumns.put("connection_capability", connectionCapabilitySet); + // access_network_type to add when supported by AP + if (ovsdbClient.getSchema(ovsdbName).get().getTables().get(hotspot20ConfigDbTable).getColumns().containsKey("access_network_type")) { + if (hs2Profile.getAccessNetworkType() != null) { + rowColumns.put("access_network_type", new Atom<>(hs2Profile.getAccessNetworkType().getId())); + } + } + + // # format: <1-octet encoded value as hex str> // # (ipv4_type & 0x3f) << 2 | (ipv6_type & 0x3) << 2 // 0x3f = 63 in decimal