]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WNM: Use CONFIG_WNM more consistently
authorJouni Malinen <j@w1.fi>
Sun, 16 Dec 2012 16:22:54 +0000 (18:22 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 16 Dec 2012 16:22:54 +0000 (18:22 +0200)
Replace CONFIG_IEEE80211V with CONFIG_WNM to get more consistent build
options for WNM-Sleep Mode operations. Previously it was possible to
define CONFIG_IEEE80211V without CONFIG_WNM which would break the build.
In addition, IEEE 802.11v has been merged into IEEE Std 802.11-2012 and
WNM is a better term to use for this new functionality anyway.

Signed-hostap: Jouni Malinen <j@w1.fi>

12 files changed:
hostapd/Makefile
src/ap/drv_callbacks.c
src/ap/wnm_ap.c
src/ap/wpa_auth.c
src/ap/wpa_auth.h
src/ap/wpa_auth_i.h
src/drivers/driver_atheros.c
src/rsn_supp/wpa.c
src/rsn_supp/wpa.h
wpa_supplicant/Makefile
wpa_supplicant/events.c
wpa_supplicant/wnm_sta.c

index 4cc38059b7510b5ff200c2d032b72b4519713505..d8c01e52e0c87247ffc0e272d89163313236eb5b 100644 (file)
@@ -176,8 +176,8 @@ ifdef CONFIG_SAE
 CFLAGS += -DCONFIG_SAE
 endif
 
-ifdef CONFIG_IEEE80211V
-CFLAGS += -DCONFIG_IEEE80211V
+ifdef CONFIG_WNM
+CFLAGS += -DCONFIG_WNM
 OBJS += ../src/ap/wnm_ap.o
 endif
 
@@ -185,10 +185,6 @@ ifdef CONFIG_IEEE80211N
 CFLAGS += -DCONFIG_IEEE80211N
 endif
 
-ifdef CONFIG_WNM
-CFLAGS += -DCONFIG_WNM
-endif
-
 ifdef CONFIG_IEEE80211AC
 CFLAGS += -DCONFIG_IEEE80211AC
 endif
index 86139752fbb1640855e41eb8e5ce866464a187c8..8980bec03f8b1e1aa3910ec0f13022fc33c4bf84 100644 (file)
@@ -512,13 +512,13 @@ static void hostapd_action_rx(struct hostapd_data *hapd,
                                           action->data + 2);
        }
 #endif /* CONFIG_IEEE80211W */
-#ifdef CONFIG_IEEE80211V
+#ifdef CONFIG_WNM
        if (action->category == WLAN_ACTION_WNM) {
                wpa_printf(MSG_DEBUG, "%s: WNM_ACTION length %d",
                           __func__, (int) action->len);
                ieee802_11_rx_wnm_action_ap(hapd, action);
        }
-#endif /* CONFIG_IEEE80211V */
+#endif /* CONFIG_WNM */
 }
 
 
index 25944045fd2a9967616e5bd0f61dbb6d5b230f04..01fe135543c6772f562cc2a20184187c29ce628d 100644 (file)
@@ -19,7 +19,6 @@
 
 #define MAX_TFS_IE_LEN  1024
 
-#ifdef CONFIG_IEEE80211V
 
 /* get the TFS IE from driver */
 static int ieee80211_11_get_tfs_ie(struct hostapd_data *hapd, const u8 *addr,
@@ -254,5 +253,3 @@ void ieee802_11_rx_wnm_action_ap(struct hostapd_data *hapd,
                break;
        }
 }
-
-#endif /* CONFIG_IEEE80211V */
index 0816b25b69b121b8ad7f7717f6d828ebe30a3443..0dc3f58a53b5e7fc96ef682437e68ed59e27554f 100644 (file)
@@ -2413,11 +2413,9 @@ static int wpa_group_update_sta(struct wpa_state_machine *sm, void *ctx)
                                "marking station for GTK rekeying");
        }
 
-#ifdef CONFIG_IEEE80211V
-       /* Do not rekey GTK/IGTK when STA is in wnmsleep */
+       /* Do not rekey GTK/IGTK when STA is in WNM-Sleep Mode */
        if (sm->is_wnmsleep)
                return 0;
-#endif /* CONFIG_IEEE80211V */
 
        sm->group->GKeyDoneStations++;
        sm->GUpdateStationKeys = TRUE;
@@ -2427,8 +2425,8 @@ static int wpa_group_update_sta(struct wpa_state_machine *sm, void *ctx)
 }
 
 
-#ifdef CONFIG_IEEE80211V
-/* update GTK when exiting wnmsleep mode */
+#ifdef CONFIG_WNM
+/* update GTK when exiting WNM-Sleep Mode */
 void wpa_wnmsleep_rekey_gtk(struct wpa_state_machine *sm)
 {
        if (sm->is_wnmsleep)
@@ -2550,7 +2548,7 @@ int wpa_wnmsleep_igtk_subelem(struct wpa_state_machine *sm, u8 *pos)
        return subelem_len;
 }
 #endif /* CONFIG_IEEE80211W */
-#endif /* CONFIG_IEEE80211V */
+#endif /* CONFIG_WNM */
 
 
 static void wpa_group_setkeys(struct wpa_authenticator *wpa_auth,
index 6ab170d14a74e81defe2c7d804029634b6de570c..465eec6a53301bd5162115814babdf80c3bd3244 100644 (file)
@@ -282,14 +282,10 @@ int wpa_ft_rrb_rx(struct wpa_authenticator *wpa_auth, const u8 *src_addr,
 void wpa_ft_push_pmk_r1(struct wpa_authenticator *wpa_auth, const u8 *addr);
 #endif /* CONFIG_IEEE80211R */
 
-#ifdef CONFIG_IEEE80211V
 void wpa_wnmsleep_rekey_gtk(struct wpa_state_machine *sm);
 void wpa_set_wnmsleep(struct wpa_state_machine *sm, int flag);
 int wpa_wnmsleep_gtk_subelem(struct wpa_state_machine *sm, u8 *pos);
-#ifdef CONFIG_IEEE80211W
 int wpa_wnmsleep_igtk_subelem(struct wpa_state_machine *sm, u8 *pos);
-#endif /* CONFIG_IEEE80211W */
-#endif /* CONFIG_IEEE80211V */
 
 int wpa_auth_uses_sae(struct wpa_state_machine *sm);
 
index d5cf2c50e2421679a38ed170a2b2c33ec9db69bb..97489d343d86f876927ddbb9e4fc6fa0e7684bd1 100644 (file)
@@ -87,9 +87,7 @@ struct wpa_state_machine {
        unsigned int ft_completed:1;
        unsigned int pmk_r1_name_valid:1;
 #endif /* CONFIG_IEEE80211R */
-#ifdef CONFIG_IEEE80211V
        unsigned int is_wnmsleep:1;
-#endif /* CONFIG_IEEE80211V */
 
        u8 req_replay_counter[WPA_REPLAY_COUNTER_LEN];
        int req_replay_counter_used;
index a0a521027a06ffe96a9dafd0c93efab9a77c543d..8294e9ea940a02e70e7d763e81e3ba98a448aabf 100644 (file)
@@ -874,7 +874,7 @@ static void atheros_raw_recv_hs20(void *ctx, const u8 *src_addr, const u8 *buf,
 }
 #endif /* CONFIG_HS20 */
 
-#if defined(CONFIG_IEEE80211V) && !defined(CONFIG_IEEE80211R)
+#if defined(CONFIG_WNM) && !defined(CONFIG_IEEE80211R)
 static void atheros_raw_recv_11v(void *ctx, const u8 *src_addr, const u8 *buf,
                                 size_t len)
 {
@@ -921,9 +921,9 @@ static void atheros_raw_recv_11v(void *ctx, const u8 *src_addr, const u8 *buf,
                break;
        }
 }
-#endif /* CONFIG_IEEE80211V */
+#endif /* CONFIG_WNM */
 
-#if defined(CONFIG_WPS) || defined(CONFIG_IEEE80211R) || defined(CONFIG_IEEE80211V)
+#if defined(CONFIG_WPS) || defined(CONFIG_IEEE80211R) || defined(CONFIG_WNM)
 static void atheros_raw_receive(void *ctx, const u8 *src_addr, const u8 *buf,
                                size_t len)
 {
@@ -933,9 +933,9 @@ static void atheros_raw_receive(void *ctx, const u8 *src_addr, const u8 *buf,
 #ifdef CONFIG_IEEE80211R
        atheros_raw_recv_11r(ctx, src_addr, buf, len);
 #endif /* CONFIG_IEEE80211R */
-#if defined(CONFIG_IEEE80211V) && !defined(CONFIG_IEEE80211R)
+#if defined(CONFIG_WNM) && !defined(CONFIG_IEEE80211R)
        atheros_raw_recv_11v(ctx, src_addr, buf, len);
-#endif /* CONFIG_IEEE80211V */
+#endif /* CONFIG_WNM */
 #ifdef CONFIG_HS20
        atheros_raw_recv_hs20(ctx, src_addr, buf, len);
 #endif /* CONFIG_HS20 */
@@ -957,9 +957,9 @@ static int atheros_receive_pkt(struct atheros_driver_data *drv)
                               IEEE80211_FILTER_TYPE_AUTH |
                               IEEE80211_FILTER_TYPE_ACTION);
 #endif
-#ifdef CONFIG_IEEE80211V
+#ifdef CONFIG_WNM
        filt.app_filterype |= IEEE80211_FILTER_TYPE_ACTION;
-#endif /* CONFIG_IEEE80211V */
+#endif /* CONFIG_WNM */
 #ifdef CONFIG_HS20
        filt.app_filterype |= IEEE80211_FILTER_TYPE_ACTION;
 #endif /* CONFIG_HS20 */
@@ -1959,7 +1959,7 @@ static int atheros_send_action(void *priv, unsigned int freq,
 }
 
 
-#ifdef CONFIG_IEEE80211V
+#ifdef CONFIG_WNM
 static int athr_wnm_tfs(struct atheros_driver_data *drv, const u8* peer,
                        u8 *ie, u16 *len, enum wnm_oper oper)
 {
@@ -2112,7 +2112,7 @@ static int atheros_wnm_oper(void *priv, enum wnm_oper oper, const u8 *peer,
                return -1;
        }
 }
-#endif /* CONFIG_IEEE80211V */
+#endif /* CONFIG_WNM */
 
 
 const struct wpa_driver_ops wpa_driver_atheros_ops = {
@@ -2146,7 +2146,7 @@ const struct wpa_driver_ops wpa_driver_atheros_ops = {
        .add_sta_node           = atheros_add_sta_node,
 #endif /* CONFIG_IEEE80211R */
        .send_action            = atheros_send_action,
-#ifdef CONFIG_IEEE80211V
+#ifdef CONFIG_WNM
        .wnm_oper               = atheros_wnm_oper,
-#endif /* CONFIG_IEEE80211V */
+#endif /* CONFIG_WNM */
 };
index 5d1de4c390694cd659c40a1c30863402b51a0039..e50404ce78a79d4137ce16faa4d558b4178642b9 100644 (file)
@@ -2627,7 +2627,7 @@ void wpa_sm_pmksa_cache_flush(struct wpa_sm *sm, void *network_ctx)
 }
 
 
-#ifdef CONFIG_IEEE80211V
+#ifdef CONFIG_WNM
 int wpa_wnmsleep_install_key(struct wpa_sm *sm, u8 subelem_id, u8 *buf)
 {
        struct wpa_gtk_data gd;
@@ -2699,4 +2699,4 @@ int wpa_wnmsleep_install_key(struct wpa_sm *sm, u8 subelem_id, u8 *buf)
 
        return 0;
 }
-#endif /* CONFIG_IEEE80211V */
+#endif /* CONFIG_WNM */
index 8afdf39bf89f22de687b6a57ff0a0e1ae77b9f92..791974c2b3036a833c5219e4e9ef790b3fa9e0d6 100644 (file)
@@ -365,8 +365,6 @@ void wpa_tdls_enable(struct wpa_sm *sm, int enabled);
 void wpa_tdls_disable_link(struct wpa_sm *sm, const u8 *addr);
 int wpa_tdls_is_external_setup(struct wpa_sm *sm);
 
-#ifdef CONFIG_IEEE80211V
 int wpa_wnmsleep_install_key(struct wpa_sm *sm, u8 subelem_id, u8 *buf);
-#endif /* CONFIG_IEEE80211V */
 
 #endif /* WPA_H */
index b5aaaae5b92ef36ba07f010c8731053e317ba25a..bafecccccc7f1247cb4592060286fe9a939f57e7 100644 (file)
@@ -176,8 +176,8 @@ ifdef CONFIG_SAE
 CFLAGS += -DCONFIG_SAE
 endif
 
-ifdef CONFIG_IEEE80211V
-CFLAGS += -DCONFIG_IEEE80211V
+ifdef CONFIG_WNM
+CFLAGS += -DCONFIG_WNM
 OBJS += wnm_sta.o
 endif
 
@@ -758,10 +758,6 @@ OBJS += ../src/ap/hs20.o
 endif
 endif
 
-ifdef CONFIG_WNM
-CFLAGS += -DCONFIG_WNM
-endif
-
 ifdef NEED_RSN_AUTHENTICATOR
 CFLAGS += -DCONFIG_NO_RADIUS
 NEED_AES_WRAP=y
index 492674669fb95773ab6a1fcd8d6b9f519b7055e2..d9ed7a243b91930a0bb13252db4415de3da932b3 100644 (file)
@@ -2138,7 +2138,7 @@ static void wpa_supplicant_event_tdls(struct wpa_supplicant *wpa_s,
 #endif /* CONFIG_TDLS */
 
 
-#ifdef CONFIG_IEEE80211V
+#ifdef CONFIG_WNM
 static void wpa_supplicant_event_wnm(struct wpa_supplicant *wpa_s,
                                     union wpa_event_data *data)
 {
@@ -2154,7 +2154,7 @@ static void wpa_supplicant_event_wnm(struct wpa_supplicant *wpa_s,
                break;
        }
 }
-#endif /* CONFIG_IEEE80211V */
+#endif /* CONFIG_WNM */
 
 
 #ifdef CONFIG_IEEE80211R
@@ -2507,11 +2507,11 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
                wpa_supplicant_event_tdls(wpa_s, data);
                break;
 #endif /* CONFIG_TDLS */
-#ifdef CONFIG_IEEE80211V
+#ifdef CONFIG_WNM
        case EVENT_WNM:
                wpa_supplicant_event_wnm(wpa_s, data);
                break;
-#endif /* CONFIG_IEEE80211V */
+#endif /* CONFIG_WNM */
 #ifdef CONFIG_IEEE80211R
        case EVENT_FT_RESPONSE:
                wpa_supplicant_event_ft_response(wpa_s, data);
@@ -2709,12 +2709,12 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
                }
 #endif /* CONFIG_SME */
 #endif /* CONFIG_IEEE80211W */
-#ifdef CONFIG_IEEE80211V
+#ifdef CONFIG_WNM
                if (data->rx_action.category == WLAN_ACTION_WNM) {
                        ieee802_11_rx_wnm_action(wpa_s, &data->rx_action);
                        break;
                }
-#endif /* CONFIG_IEEE80211V */
+#endif /* CONFIG_WNM */
 #ifdef CONFIG_GAS
                if (data->rx_action.category == WLAN_ACTION_PUBLIC &&
                    gas_query_rx(wpa_s->gas, data->rx_action.da,
index 3a2c17eb838d0eaf6b202f98c00a80a715d3ee9b..35cd032b4d7f8002cff1cf783ee48e0bf6aba9e3 100644 (file)
@@ -16,7 +16,6 @@
 
 #define MAX_TFS_IE_LEN  1024
 
-#ifdef CONFIG_IEEE80211V
 
 /* get the TFS IE from driver */
 static int ieee80211_11_get_tfs_ie(struct wpa_supplicant *wpa_s, u8 *buf,
@@ -307,5 +306,3 @@ void ieee802_11_rx_wnm_action(struct wpa_supplicant *wpa_s,
                break;
        }
 }
-
-#endif /* CONFIG_IEEE80211V */