]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Move nl80211_init_connect_handle() to avoid forward declaration
authorJouni Malinen <j@w1.fi>
Sun, 19 Apr 2020 13:41:47 +0000 (16:41 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 19 Apr 2020 14:42:41 +0000 (17:42 +0300)
This has no changes to the function itself, i.e., it is just moved to a
location that is above the first caller.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/drivers/driver_nl80211.c

index e221e58677da0b7d63b8fd228f0d368d7c208edb..75792f340ac0748be809afddcbb49faafd61f543 100644 (file)
@@ -158,7 +158,6 @@ static void wpa_driver_nl80211_deinit(struct i802_bss *bss);
 static int wpa_driver_nl80211_set_mode_ibss(struct i802_bss *bss,
                                            struct hostapd_freq_params *freq);
 
-static int nl80211_init_connect_handle(struct i802_bss *bss);
 static int
 wpa_driver_nl80211_finish_drv_init(struct wpa_driver_nl80211_data *drv,
                                   const u8 *set_addr, int first,
@@ -1964,6 +1963,25 @@ static void wpa_driver_nl80211_handle_eapol_tx_status(int sock,
 }
 
 
+static int nl80211_init_connect_handle(struct i802_bss *bss)
+{
+       if (bss->nl_connect) {
+               wpa_printf(MSG_DEBUG,
+                          "nl80211: Connect handle already created (nl_connect=%p)",
+                          bss->nl_connect);
+               return -1;
+       }
+
+       bss->nl_connect = nl_create_handle(bss->nl_cb, "connect");
+       if (!bss->nl_connect)
+               return -1;
+       nl80211_register_eloop_read(&bss->nl_connect,
+                                   wpa_driver_nl80211_event_receive,
+                                   bss->nl_cb, 1);
+       return 0;
+}
+
+
 static int nl80211_init_bss(struct i802_bss *bss)
 {
        bss->nl_cb = nl_cb_alloc(NL_CB_DEFAULT);
@@ -2211,25 +2229,6 @@ static int nl80211_register_action_frame(struct i802_bss *bss,
 }
 
 
-static int nl80211_init_connect_handle(struct i802_bss *bss)
-{
-       if (bss->nl_connect) {
-               wpa_printf(MSG_DEBUG,
-                          "nl80211: Connect handle already created (nl_connect=%p)",
-                          bss->nl_connect);
-               return -1;
-       }
-
-       bss->nl_connect = nl_create_handle(bss->nl_cb, "connect");
-       if (!bss->nl_connect)
-               return -1;
-       nl80211_register_eloop_read(&bss->nl_connect,
-                                   wpa_driver_nl80211_event_receive,
-                                   bss->nl_cb, 1);
-       return 0;
-}
-
-
 static int nl80211_mgmt_subscribe_non_ap(struct i802_bss *bss)
 {
        struct wpa_driver_nl80211_data *drv = bss->drv;