Commit f8c76165 authored by samueltan's avatar samueltan Committed by Commit bot

Add an ONC property for setting per-network roam threshold

This CL maps an  ONC property for setting per-network roam threshold.

BUG=chrome-os-partner:38681
TEST=Expanded test ONC and JSON test sets

Review URL: https://codereview.chromium.org/1087353002

Cr-Commit-Position: refs/heads/master@{#325515}
parent 274eb320
......@@ -210,6 +210,7 @@ const OncFieldSignature wifi_fields[] = {
{::onc::wifi::kHexSSID, &kStringSignature},
{::onc::wifi::kHiddenSSID, &kBoolSignature},
{::onc::wifi::kPassphrase, &kStringSignature},
{::onc::wifi::kRoamThreshold, &kIntegerSignature},
{::onc::wifi::kSSID, &kStringSignature},
{::onc::wifi::kSecurity, &kStringSignature},
{NULL}};
......
......@@ -120,6 +120,7 @@ const FieldTranslationEntry wifi_fields[] = {
{::onc::wifi::kHexSSID, shill::kWifiHexSsid},
{::onc::wifi::kHiddenSSID, shill::kWifiHiddenSsid},
{::onc::wifi::kPassphrase, shill::kPassphraseProperty},
{::onc::wifi::kRoamThreshold, shill::kWifiRoamThresholdProperty},
// This field is converted during translation, see onc_translator_*.
// { ::onc::wifi::kSecurity, shill::kSecurityClassProperty },
{::onc::wifi::kSignalStrength, shill::kSignalStrengthProperty},
......
......@@ -8,5 +8,6 @@
"WiFi.HexSSID": "4F70656E577274", // "OpenWrt"
"WiFi.HiddenSSID": false,
"WiFi.Frequency": 2412,
"WiFi.FrequencyList": [2412, 5180]
"WiFi.FrequencyList": [2412, 5180],
"WiFi.RoamThreshold": 20
}
......@@ -13,5 +13,6 @@
"Type": "wifi",
"WiFi.BSSID": "00:12:34:ca:56:8b",
"WiFi.HexSSID": "4F70656E577274", // "OpenWrt"
"WiFi.HiddenSSID": false
"WiFi.HiddenSSID": false,
"WiFi.RoamThreshold": 20
}
......@@ -10,6 +10,7 @@
"HexSSID": "4F70656E577274", // "OpenWrt"
"HiddenSSID": false,
"Passphrase": "some passphrase",
"RoamThreshold": 20,
"SSID": "OpenWrt",
"Security": "WPA-PSK",
"SignalStrength": 10
......
......@@ -30,6 +30,7 @@
"HexSSID": "4F70656E577274", // "OpenWrt"
"HiddenSSID": false,
"Passphrase": "some passphrase",
"RoamThreshold": 20,
"Security": "WPA-PSK"
}
}
......@@ -724,6 +724,17 @@
40, 104, 128, or 232 bits.
</dd>
<dt class="field">RoamThreshold</dt>
<dd>
<span class="field_meta">
(optional)
<span class="type">integer</span>
</span>
The roam threshold for this network, which is the signal-to-noise value
(in dB) below which we will attempt to roam to a new network. If this
value is not set, the default value will be used.
</dd>
<dt class="field">Security</dt>
<dd>
<span class="field_meta">
......
......@@ -208,6 +208,7 @@ const char kFrequencyList[] = "FrequencyList";
const char kHexSSID[] = "HexSSID";
const char kHiddenSSID[] = "HiddenSSID";
const char kPassphrase[] = "Passphrase";
const char kRoamThreshold[] = "RoamThreshold";
const char kSSID[] = "SSID";
const char kSecurity[] = "Security";
const char kSecurityNone[] = "None";
......
......@@ -226,6 +226,7 @@ ONC_EXPORT extern const char kFrequencyList[];
ONC_EXPORT extern const char kHexSSID[];
ONC_EXPORT extern const char kHiddenSSID[];
ONC_EXPORT extern const char kPassphrase[];
ONC_EXPORT extern const char kRoamThreshold[];
ONC_EXPORT extern const char kSSID[];
ONC_EXPORT extern const char kSecurity[];
ONC_EXPORT extern const char kSecurityNone[];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment