summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2018-03-01 09:49:21 +0000
committerRoy Marples <roy@marples.name>2018-03-01 09:49:21 +0000
commitc1e232e0f969be4a1bb274ce7f24e748cfab8e65 (patch)
tree65a66af96302e10705753f8e9d6ae508876dffd2
parent2059623f18bf8763caab0bea6243bd4c0b2c61e7 (diff)
downloaddhcpcd-ui-c1e232e0f969be4a1bb274ce7f24e748cfab8e65.tar.xz
wpa: update frequency on each dhcpcd event
This fixes an issue with the AP reconnecting to the same AP but not updating the frequency correctly. Thanks to Simon Long.
-rw-r--r--src/libdhcpcd/wpa.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libdhcpcd/wpa.c b/src/libdhcpcd/wpa.c
index ccca155..350c781 100644
--- a/src/libdhcpcd/wpa.c
+++ b/src/libdhcpcd/wpa.c
@@ -1142,8 +1142,11 @@ dhcpcd_wpa_if_event(DHCPCD_IF *i)
dhcpcd_wpa_close(wpa);
} else if (i->wireless && i->con->wpa_started) {
wpa = dhcpcd_wpa_new(i->con, i->ifname);
- if (wpa && wpa->listen_fd == -1)
- dhcpcd_wpa_open(wpa);
+ if (wpa) {
+ if (wpa->listen_fd == -1)
+ dhcpcd_wpa_open(wpa);
+ i->freq = dhcpcd_wpa_freq(wpa);
+ }
}
}
}