git: 33b73d010d01 - stable/13 - wpa: Address CTRL-EVENT-SCAN-FAILED

From: Cy Schubert <cy_at_FreeBSD.org>
Date: Thu, 04 Nov 2021 18:32:13 UTC
The branch stable/13 has been updated by cy:

URL: https://cgit.FreeBSD.org/src/commit/?id=33b73d010d01ef24739562f93e7156448045d720

commit 33b73d010d01ef24739562f93e7156448045d720
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2021-09-09 00:20:52 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2021-11-04 18:30:25 +0000

    wpa: Address CTRL-EVENT-SCAN-FAILED
    
    5fcdc19a8111 didn't fully resolve the issue. There remains a report
    that an ifconfig wlan0 up by itself is insufficient. Ifconfig down
    must precede it.
    
    Reported by:    Filipe da Silva Santos <contact _ shiori_com_br>
    Fixes:          5fcdc19a8111
    
    (cherry picked from commit d06d7eb09131edea666bf049d6c0c55672726f76)
---
 libexec/rc/rc.d/wpa_supplicant | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libexec/rc/rc.d/wpa_supplicant b/libexec/rc/rc.d/wpa_supplicant
index 3c5c9d243f68..9e5f64a5373f 100755
--- a/libexec/rc/rc.d/wpa_supplicant
+++ b/libexec/rc/rc.d/wpa_supplicant
@@ -29,6 +29,8 @@ is_ndis_interface()
 }
 
 wpa_poststart() {
+	ifconfig ${ifn} down
+	sleep 2
 	ifconfig ${ifn} up
 }