Author: cy
Date: Wed May 29 19:11:09 2019
New Revision: 348369
URL: https://svnweb.freebsd.org/changeset/base/348369

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.
  
  Approved by:  re (gjb@)

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

Modified: stable/11/contrib/wpa/wpa_supplicant/main.c
==============================================================================
--- stable/11/contrib/wpa/wpa_supplicant/main.c Wed May 29 18:32:43 2019        
(r348368)
+++ stable/11/contrib/wpa/wpa_supplicant/main.c Wed May 29 19:11:09 2019        
(r348369)
@@ -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/11/contrib/wpa/wpa_supplicant/wpa_supplicant.c
==============================================================================
--- stable/11/contrib/wpa/wpa_supplicant/wpa_supplicant.c       Wed May 29 
18:32:43 2019        (r348368)
+++ stable/11/contrib/wpa/wpa_supplicant/wpa_supplicant.c       Wed May 29 
19:11:09 2019        (r348369)
@@ -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 */
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to