diff --git a/src/common/WiFiSettings/WiFiForm.js b/src/common/WiFiSettings/WiFiForm.js
index 7539045..35f52d7 100644
--- a/src/common/WiFiSettings/WiFiForm.js
+++ b/src/common/WiFiSettings/WiFiForm.js
@@ -8,7 +8,6 @@
import React from "react";
import PropTypes from "prop-types";
import { Switch } from "../../bootstrap/Switch";
-import { CheckBox } from "../../bootstrap/CheckBox";
import { PasswordInput } from "../../bootstrap/PasswordInput";
import { RadioSet } from "../../bootstrap/RadioSet";
import { Select } from "../../bootstrap/Select";
@@ -65,6 +64,7 @@ DeviceForm.propTypes = {
guest_wifi: PropTypes.object.isRequired,
encryption: PropTypes.string.isRequired,
available_bands: PropTypes.array.isRequired,
+ ieee80211w_disabled: PropTypes.bool.isRequired,
}),
formErrors: PropTypes.object.isRequired,
setFormValue: PropTypes.func.isRequired,
@@ -102,7 +102,7 @@ function DeviceForm({
switchHeading
{...props}
/>
- {formData.enabled ? (
+ {formData.enabled && (
<>
-
+ {(formData.encryption === "WPA3" ||
+ formData.encryption === "WPA2/3") && (
+ ({
+ devices: {
+ [deviceIndex]: {
+ ieee80211w_disabled: { $set: value },
+ },
+ },
+ }))}
+ {...props}
+ />
+ )}
+
{hasGuestNetwork && (
)}
>
- ) : null}
- {divider ?
: null}
+ )}
+ {divider &&
}
>
);
}
diff --git a/src/common/WiFiSettings/WiFiSettings.js b/src/common/WiFiSettings/WiFiSettings.js
index d97ba7a..217e242 100644
--- a/src/common/WiFiSettings/WiFiSettings.js
+++ b/src/common/WiFiSettings/WiFiSettings.js
@@ -59,6 +59,10 @@ function prepDataToSubmit(formData) {
if (!device.guest_wifi.enabled)
formData.devices[idx].guest_wifi = { enabled: false };
+
+ if (device.encryption === "WPA2") {
+ delete formData.devices[idx].ieee80211w_disabled;
+ }
});
return formData;
}