3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 21:22:37 +01:00

station: use CamelCase for MFP setting

This commit is contained in:
Denis Kenzior 2019-10-24 21:15:17 -05:00
parent 7abd998d00
commit 1fbf64b667

View File

@ -56,6 +56,7 @@
static struct l_queue *station_list; static struct l_queue *station_list;
static uint32_t netdev_watch; static uint32_t netdev_watch;
static uint32_t mfp_setting;
struct station { struct station {
enum station_state state; enum station_state state;
@ -733,11 +734,9 @@ static int station_build_handshake_rsn(struct handshake_state *hs,
bool add_mde = false; bool add_mde = false;
bool fils_hint = false; bool fils_hint = false;
const struct l_settings *settings = iwd_get_config();
struct ie_rsn_info bss_info; struct ie_rsn_info bss_info;
uint8_t rsne_buf[256]; uint8_t rsne_buf[256];
struct ie_rsn_info info; struct ie_rsn_info info;
uint32_t mfp_setting;
uint8_t *ap_ie; uint8_t *ap_ie;
memset(&info, 0, sizeof(info)); memset(&info, 0, sizeof(info));
@ -785,22 +784,6 @@ static int station_build_handshake_rsn(struct handshake_state *hs,
goto build_ie; goto build_ie;
} }
if (!l_settings_get_uint(settings, "General",
"management_frame_protection",
&mfp_setting)) {
if (!l_settings_get_uint(settings, "General",
"ManagementFrameProtection", &mfp_setting)) {
mfp_setting = 1;
} else
l_warn("ManagementFrameProtection option is deprecated "
"use 'management_frame_protection'");
}
if (mfp_setting > 2) {
l_error("Invalid MFP value, using default of 1");
mfp_setting = 1;
}
switch (mfp_setting) { switch (mfp_setting) {
case 0: case 0:
break; break;
@ -3197,6 +3180,18 @@ static int station_init(void)
l_dbus_register_interface(dbus_get_bus(), IWD_STATION_INTERFACE, l_dbus_register_interface(dbus_get_bus(), IWD_STATION_INTERFACE,
station_setup_interface, station_setup_interface,
station_destroy_interface, false); station_destroy_interface, false);
if (!l_settings_get_uint(iwd_get_config(), "General",
"ManagementFrameProtection",
&mfp_setting))
mfp_setting = 1;
if (mfp_setting > 2) {
l_error("Invalid [General].ManagementFrameProtection value: %d,"
" using default of 1", mfp_setting);
mfp_setting = 1;
}
return true; return true;
} }