Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 May 2019 02:00:09 +0000 (UTC)
From:      Cy Schubert <cy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r348321 - stable/12/contrib/wpa/wpa_supplicant
Message-ID:  <201905280200.x4S209dG072649@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cy
Date: Tue May 28 02:00:09 2019
New Revision: 348321
URL: https://svnweb.freebsd.org/changeset/base/348321

Log:
  MFC r347642:
  
  The driver list prints "(null)" for the NDIS driver when -h (help) or
  an unknown switch is passed outputting the command usage. This is
  because the NDIS driver is uninitialized when usage help is printed.
  To resolve this we initialize the driver prior to the possibility of
  printing the usage help message.
  
  Obtained from:	The wpa_supplicant port

Modified:
  stable/12/contrib/wpa/wpa_supplicant/main.c
  stable/12/contrib/wpa/wpa_supplicant/wpa_supplicant.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/contrib/wpa/wpa_supplicant/main.c
==============================================================================
--- stable/12/contrib/wpa/wpa_supplicant/main.c	Tue May 28 01:41:08 2019	(r348320)
+++ stable/12/contrib/wpa/wpa_supplicant/main.c	Tue May 28 02:00:09 2019	(r348321)
@@ -199,6 +199,11 @@ int main(int argc, char *argv[])
 
 	wpa_supplicant_fd_workaround(1);
 
+#ifdef CONFIG_DRIVER_NDIS
+	void driver_ndis_init_ops(void);
+	driver_ndis_init_ops();
+#endif /* CONFIG_DRIVER_NDIS */
+
 	for (;;) {
 		c = getopt(argc, argv,
 			   "b:Bc:C:D:de:f:g:G:hi:I:KLMm:No:O:p:P:qsTtuvW");

Modified: stable/12/contrib/wpa/wpa_supplicant/wpa_supplicant.c
==============================================================================
--- stable/12/contrib/wpa/wpa_supplicant/wpa_supplicant.c	Tue May 28 01:41:08 2019	(r348320)
+++ stable/12/contrib/wpa/wpa_supplicant/wpa_supplicant.c	Tue May 28 02:00:09 2019	(r348321)
@@ -6357,13 +6357,6 @@ struct wpa_global * wpa_supplicant_init(struct wpa_par
 	if (params == NULL)
 		return NULL;
 
-#ifdef CONFIG_DRIVER_NDIS
-	{
-		void driver_ndis_init_ops(void);
-		driver_ndis_init_ops();
-	}
-#endif /* CONFIG_DRIVER_NDIS */
-
 #ifndef CONFIG_NO_WPA_MSG
 	wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb);
 #endif /* CONFIG_NO_WPA_MSG */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905280200.x4S209dG072649>