Skip to content

Commit

Permalink
fix: Modify hotspot configuration error
Browse files Browse the repository at this point in the history
Modifying hotspot configuration errors resulted in inability to connect issues

Log:
pms: BUG-294499
pms: BUG-286589
  • Loading branch information
caixr23 committed Dec 16, 2024
1 parent ad36c6f commit 2c08eca
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions dcc-network/qml/PageHotspot.qml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ DccObject {
}, {
"text": qsTr("WPA/WPA2 Personal"),
"value": "wpa-psk"
}, {
"text": qsTr("WPA3 Personal"),
"value": "sae"
}]
currentIndex: indexOfValue(keyMgmt)
onActivated: {
Expand Down Expand Up @@ -300,10 +303,24 @@ DccObject {
return
}
close()
if (keyMgmt.length === 0) {
delete editDlg.config["802-11-wireless-security"]
} else {
switch (keyMgmt) {
case "wpa-psk":
editDlg.config["802-11-wireless-security"]["proto"] = ['wpa', 'rsn']
editDlg.config["802-11-wireless-security"]["group"] = ['ccmp']
editDlg.config["802-11-wireless-security"]["pairwise"] = ['ccmp']
editDlg.config["802-11-wireless-security"]["psk-flags"] = 1
editDlg.config["802-11-wireless-security"]["key-mgmt"] = keyMgmt
break
case "sae":
editDlg.config["802-11-wireless-security"]["proto"] = ['rsn']
editDlg.config["802-11-wireless-security"]["group"] = ['ccmp']
editDlg.config["802-11-wireless-security"]["pairwise"] = ['ccmp']
editDlg.config["802-11-wireless-security"]["psk-flags"] = 1
editDlg.config["802-11-wireless-security"]["key-mgmt"] = keyMgmt
break
default:
delete editDlg.config["802-11-wireless-security"]
break
}
editDlg.config["connection"]["id"] = editDlg.config["802-11-wireless"].ssid
dccData.exec(NetManager.SetConnectInfo, item.id, editDlg.config)
Expand Down

0 comments on commit 2c08eca

Please sign in to comment.