1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-18 02:19:39 +00:00

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
MFC after:	1 week
This commit is contained in:
Cy Schubert 2019-05-16 02:41:25 +00:00
parent b685454a11
commit e1c50020af
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=347642
2 changed files with 5 additions and 7 deletions

View File

@ -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");

View File

@ -6357,13 +6357,6 @@ struct wpa_global * wpa_supplicant_init(struct wpa_params *params)
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 */