202
202
if(!setting->psk().isEmpty())
203
203
map.insert("psk", setting->psk());
205
if(setting->wepKeyType() == Knm::WirelessSecuritySetting::Hex)
207
map.insert(NM_SETTING_WIRELESS_SECURITY_WEP_KEY_TYPE, NM_WEP_KEY_TYPE_KEY);
210
if(!setting->wepkey0().isEmpty())
211
map.insert(QLatin1String(NM_SETTING_WIRELESS_SECURITY_WEP_KEY0), setting->wepkey0());
214
if(!setting->wepkey1().isEmpty())
215
map.insert(QLatin1String(NM_SETTING_WIRELESS_SECURITY_WEP_KEY1), setting->wepkey1());
218
if(!setting->wepkey2().isEmpty())
219
map.insert(QLatin1String(NM_SETTING_WIRELESS_SECURITY_WEP_KEY2), setting->wepkey2());
222
if(!setting->wepkey3().isEmpty())
223
map.insert(QLatin1String(NM_SETTING_WIRELESS_SECURITY_WEP_KEY3), setting->wepkey3());
226
else if(setting->wepKeyType() == Knm::WirelessSecuritySetting::Passphrase)
228
map.insert(NM_SETTING_WIRELESS_SECURITY_WEP_KEY_TYPE, NM_WEP_KEY_TYPE_PASSPHRASE);
229
map.insert(NM_SETTING_WIRELESS_SECURITY_WEP_KEY0, setting->weppassphrase());
232
kWarning() << "Wep key type is not set!";
205
if (setting->securityType() == Knm::WirelessSecuritySetting::EnumSecurityType::StaticWep ||
206
setting->securityType() == Knm::WirelessSecuritySetting::EnumSecurityType::DynamicWep) {
207
if(setting->wepKeyType() == Knm::WirelessSecuritySetting::Hex)
209
map.insert(NM_SETTING_WIRELESS_SECURITY_WEP_KEY_TYPE, NM_WEP_KEY_TYPE_KEY);
212
if(!setting->wepkey0().isEmpty())
213
map.insert(QLatin1String(NM_SETTING_WIRELESS_SECURITY_WEP_KEY0), setting->wepkey0());
216
if(!setting->wepkey1().isEmpty())
217
map.insert(QLatin1String(NM_SETTING_WIRELESS_SECURITY_WEP_KEY1), setting->wepkey1());
220
if(!setting->wepkey2().isEmpty())
221
map.insert(QLatin1String(NM_SETTING_WIRELESS_SECURITY_WEP_KEY2), setting->wepkey2());
224
if(!setting->wepkey3().isEmpty())
225
map.insert(QLatin1String(NM_SETTING_WIRELESS_SECURITY_WEP_KEY3), setting->wepkey3());
228
else if(setting->wepKeyType() == Knm::WirelessSecuritySetting::Passphrase)
230
map.insert(NM_SETTING_WIRELESS_SECURITY_WEP_KEY_TYPE, NM_WEP_KEY_TYPE_PASSPHRASE);
232
if (!setting->weppassphrase().isEmpty())
233
map.insert(NM_SETTING_WIRELESS_SECURITY_WEP_KEY0, setting->weppassphrase());
236
kWarning() << "Wep key type is not set!";
233
238
} // end of if not setting->clear()