diff options
author | Cy Schubert <cy@FreeBSD.org> | 2019-05-16 02:41:25 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2019-05-16 02:41:25 +0000 |
commit | e1c50020affe7b8e1435c265949453f88f0727ac (patch) | |
tree | 09fbca713ec6a49c2531204741d57fcabfc4c1be /contrib/wpa | |
parent | b685454a1107a512e105ceb09b5ff04dadc04d1a (diff) | |
download | src-e1c50020affe7b8e1435c265949453f88f0727ac.tar.gz src-e1c50020affe7b8e1435c265949453f88f0727ac.zip |
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
Notes
Notes:
svn path=/head/; revision=347642
Diffstat (limited to 'contrib/wpa')
-rw-r--r-- | contrib/wpa/wpa_supplicant/main.c | 5 | ||||
-rw-r--r-- | contrib/wpa/wpa_supplicant/wpa_supplicant.c | 7 |
2 files changed, 5 insertions, 7 deletions
diff --git a/contrib/wpa/wpa_supplicant/main.c b/contrib/wpa/wpa_supplicant/main.c index 51a8a0298a9b..745eebe71d7d 100644 --- a/contrib/wpa/wpa_supplicant/main.c +++ b/contrib/wpa/wpa_supplicant/main.c @@ -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"); diff --git a/contrib/wpa/wpa_supplicant/wpa_supplicant.c b/contrib/wpa/wpa_supplicant/wpa_supplicant.c index 96a3691cf3cf..85769870c142 100644 --- a/contrib/wpa/wpa_supplicant/wpa_supplicant.c +++ b/contrib/wpa/wpa_supplicant/wpa_supplicant.c @@ -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 */ |