Skip to content

Commit 0262122

Browse files
committed
rtl8720dn: allow connecting to open wifi access points
Signed-off-by: deadprogram <ron@hybridgroup.com>
1 parent 7d24c3c commit 0262122

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

rtl8720dn/rtl8720dn.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,11 @@ func (r *rtl8720dn) connectToAP() error {
111111
}
112112

113113
// Start the connection process
114-
securityType := uint32(0x00400004)
114+
securityType := uint32(0) // RTW_SECURITY_OPEN
115+
if len(r.params.Passphrase) != 0 {
116+
securityType = 0x00400004 // RTW_SECURITY_WPA2_AES_PSK
117+
}
118+
115119
result := r.rpc_wifi_connect(r.params.Ssid, r.params.Passphrase, securityType, -1, 0)
116120
if result != 0 {
117121
if debugging(debugBasic) {

0 commit comments

Comments
 (0)