WIFI-1898: Fix passpoint config parameters

Fixes the following passpoint config params:

- Network Auth Type
- Connection Capability
- IP Address Availability

Signed-off-by: Arif Alam <arif.alam@netexperience.com>
This commit is contained in:
Arif Alam
2021-04-29 21:25:58 -04:00
committed by Rick Sommerville
parent b0a660ba31
commit 0c621a4da1
3 changed files with 31 additions and 9 deletions

View File

@@ -321,9 +321,9 @@ hostapd_common_add_bss_config() {
config_add_string osu_ssid hs20_wan_metrics hs20_operating_class hs20_t_c_filename hs20_t_c_timestamp
config_add_boolean interworking internet
config_add_int access_network_type asra esr uesa venue_group venue_type ipaddr_type_availability \
config_add_int access_network_type asra esr uesa venue_group venue_type \
gas_address3
config_add_string hessid network_auth_type \
config_add_string hessid network_auth_type ipaddr_type_availability \
anqp_3gpp_cell_net anqp_elem domain_name qos_map_set hs20_t_c_server_url
config_add_array airtime_sta_weight
@@ -956,7 +956,6 @@ hostapd_set_bss_options() {
set_default access_network_type 0
set_default venue_group 0
set_default venue_type 0
set_default ipaddr_type_availability 0
set_default gas_address3 0
set_default hs20_deauth_req_timeout 60
if [ "$hs20" = "1" ]; then
@@ -988,7 +987,7 @@ hostapd_set_bss_options() {
[ "$uesa" -gt 0 ] && append bss_conf "uesa=$uesa" "$N"
[ "$venue_group" -gt 0 ] && append bss_conf "venue_group=$venue_group" "$N"
[ "$venue_type" -gt 0 ] && append bss_conf "venue_type=$venue_type" "$N"
[ "$ipaddr_type_availability" -gt 0 ] && append bss_conf "ipaddr_type_availability=$ipaddr_type_availability" "$N"
[ -n "$ipaddr_type_availability" ] && append bss_conf "ipaddr_type_availability=$ipaddr_type_availability" "$N"
[ "$gas_address3" -gt 0 ] && append bss_conf "gas_address3=$gas_address3" "$N"
[ -n "$hessid" ] && append bss_conf "hessid=$hessid" "$N"
[ -n "$network_auth_type" ] && append bss_conf "network_auth_type=$network_auth_type" "$N"

View File

@@ -304,9 +304,9 @@ hostapd_common_add_bss_config() {
config_add_string osu_ssid hs20_wan_metrics hs20_operating_class hs20_t_c_filename hs20_t_c_timestamp
config_add_boolean interworking internet
config_add_int access_network_type asra esr uesa venue_group venue_type ipaddr_type_availability \
config_add_int access_network_type asra esr uesa venue_group venue_type \
gas_address3
config_add_string hessid network_auth_type \
config_add_string hessid network_auth_type ipaddr_type_availability \
anqp_3gpp_cell_net anqp_elem domain_name qos_map_set hs20_t_c_server_url
config_add_int airtime_bss_weight airtime_bss_limit
@@ -890,7 +890,6 @@ hostapd_set_bss_options() {
set_default access_network_type 0
set_default venue_group 0
set_default venue_type 0
set_default ipaddr_type_availability 0
set_default gas_address3 0
set_default hs20_deauth_req_timeout 60
if [ "$hs20" = "1" ]; then
@@ -922,7 +921,7 @@ hostapd_set_bss_options() {
[ "$uesa" -gt 0 ] && append bss_conf "uesa=$uesa" "$N"
[ "$venue_group" -gt 0 ] && append bss_conf "venue_group=$venue_group" "$N"
[ "$venue_type" -gt 0 ] && append bss_conf "venue_type=$venue_type" "$N"
[ "$ipaddr_type_availability" -gt 0 ] && append bss_conf "ipaddr_type_availability=$ipaddr_type_availability" "$N"
[ -n "$ipaddr_type_availability" ] && append bss_conf "ipaddr_type_availability=$ipaddr_type_availability" "$N"
[ "$gas_address3" -gt 0 ] && append bss_conf "gas_address3=$gas_address3" "$N"
[ -n "$hessid" ] && append bss_conf "hessid=$hessid" "$N"
[ -n "$network_auth_type" ] && append bss_conf "network_auth_type=$network_auth_type" "$N"

View File

@@ -94,6 +94,7 @@ enum {
WIF_ATTR_VENUE_URL,
WIF_ATTR_NETWORK_AUTH_TYPE,
WIF_ATTR_IPADDR_TYPE_AVAILABILITY,
WIF_ATTR_CONNECTION_CAPABILITY,
WIF_ATTR_DOMAIN_NAME,
WIF_ATTR_MCC_MNC,
WIF_ATTR_NAI_REALM,
@@ -189,7 +190,8 @@ static const struct blobmsg_policy wifi_iface_policy[__WIF_ATTR_MAX] = {
[WIF_ATTR_VENUE_TYPE] = { .name = "venue_type", BLOBMSG_TYPE_INT32 },
[WIF_ATTR_VENUE_URL] = { .name = "venue_url", BLOBMSG_TYPE_ARRAY },
[WIF_ATTR_NETWORK_AUTH_TYPE] = { .name = "network_auth_type", BLOBMSG_TYPE_STRING },
[WIF_ATTR_IPADDR_TYPE_AVAILABILITY] = { .name = "ipaddr_type_availability", BLOBMSG_TYPE_INT32 },
[WIF_ATTR_IPADDR_TYPE_AVAILABILITY] = { .name = "ipaddr_type_availability", BLOBMSG_TYPE_STRING },
[WIF_ATTR_CONNECTION_CAPABILITY] = { .name = "hs20_conn_capab", BLOBMSG_TYPE_ARRAY },
[WIF_ATTR_DOMAIN_NAME] = { .name = "domain_name", BLOBMSG_TYPE_STRING },
[WIF_ATTR_MCC_MNC] = { .name = "anqp_3gpp_cell_net", BLOBMSG_TYPE_STRING },
[WIF_ATTR_NAI_REALM] = { .name = "nai_realm", BLOBMSG_TYPE_ARRAY },
@@ -1162,6 +1164,7 @@ static void hs20_vif_config(struct blob_buf *b,
int i = 0;
unsigned int len = 0;
char domain_name[256];
char str[3] = {};
if (hs2conf->enable) {
blobmsg_add_bool(b, "interworking", 1);
@@ -1274,6 +1277,20 @@ static void hs20_vif_config(struct blob_buf *b,
if (strlen(hs2conf->wan_metrics))
blobmsg_add_string(b, "hs20_wan_metrics", hs2conf->wan_metrics);
len = strlen(hs2conf->ipaddr_type_availability);
if (len)
{
if (len == 1)
{
snprintf(str, sizeof(str), "0%s", hs2conf->ipaddr_type_availability);
blobmsg_add_string(b, "ipaddr_type_availability", str);
}
else
{
blobmsg_add_string(b, "ipaddr_type_availability", hs2conf->ipaddr_type_availability);
}
}
n = blobmsg_open_array(b, "hs20_oper_friendly_name");
for (i = 0; i < hs2conf->operator_friendly_name_len; i++)
{
@@ -1290,6 +1307,13 @@ static void hs20_vif_config(struct blob_buf *b,
blobmsg_add_u32(b, "venue_type", venue_type);
}
n = blobmsg_open_array(b, "hs20_conn_capab");
for (i = 0; i < hs2conf->connection_capability_len; i++)
{
blobmsg_add_string(b, NULL, hs2conf->connection_capability[i]);
}
blobmsg_close_array(b, n);
if (hs2conf->operator_icons_len)
{
n = blobmsg_open_array(b, "operator_icon");