WNM: Use CONFIG_WNM more consistently
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>
This commit is contained in:
parent
74b4a3606d
commit
ad3872a372
12 changed files with 29 additions and 53 deletions
|
@ -176,8 +176,8 @@ ifdef CONFIG_SAE
|
||||||
CFLAGS += -DCONFIG_SAE
|
CFLAGS += -DCONFIG_SAE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_IEEE80211V
|
ifdef CONFIG_WNM
|
||||||
CFLAGS += -DCONFIG_IEEE80211V
|
CFLAGS += -DCONFIG_WNM
|
||||||
OBJS += ../src/ap/wnm_ap.o
|
OBJS += ../src/ap/wnm_ap.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -185,10 +185,6 @@ ifdef CONFIG_IEEE80211N
|
||||||
CFLAGS += -DCONFIG_IEEE80211N
|
CFLAGS += -DCONFIG_IEEE80211N
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_WNM
|
|
||||||
CFLAGS += -DCONFIG_WNM
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef CONFIG_IEEE80211AC
|
ifdef CONFIG_IEEE80211AC
|
||||||
CFLAGS += -DCONFIG_IEEE80211AC
|
CFLAGS += -DCONFIG_IEEE80211AC
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -512,13 +512,13 @@ static void hostapd_action_rx(struct hostapd_data *hapd,
|
||||||
action->data + 2);
|
action->data + 2);
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_IEEE80211W */
|
#endif /* CONFIG_IEEE80211W */
|
||||||
#ifdef CONFIG_IEEE80211V
|
#ifdef CONFIG_WNM
|
||||||
if (action->category == WLAN_ACTION_WNM) {
|
if (action->category == WLAN_ACTION_WNM) {
|
||||||
wpa_printf(MSG_DEBUG, "%s: WNM_ACTION length %d",
|
wpa_printf(MSG_DEBUG, "%s: WNM_ACTION length %d",
|
||||||
__func__, (int) action->len);
|
__func__, (int) action->len);
|
||||||
ieee802_11_rx_wnm_action_ap(hapd, action);
|
ieee802_11_rx_wnm_action_ap(hapd, action);
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_IEEE80211V */
|
#endif /* CONFIG_WNM */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
|
|
||||||
#define MAX_TFS_IE_LEN 1024
|
#define MAX_TFS_IE_LEN 1024
|
||||||
|
|
||||||
#ifdef CONFIG_IEEE80211V
|
|
||||||
|
|
||||||
/* get the TFS IE from driver */
|
/* get the TFS IE from driver */
|
||||||
static int ieee80211_11_get_tfs_ie(struct hostapd_data *hapd, const u8 *addr,
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_IEEE80211V */
|
|
||||||
|
|
|
@ -2413,11 +2413,9 @@ static int wpa_group_update_sta(struct wpa_state_machine *sm, void *ctx)
|
||||||
"marking station for GTK rekeying");
|
"marking station for GTK rekeying");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_IEEE80211V
|
/* Do not rekey GTK/IGTK when STA is in WNM-Sleep Mode */
|
||||||
/* Do not rekey GTK/IGTK when STA is in wnmsleep */
|
|
||||||
if (sm->is_wnmsleep)
|
if (sm->is_wnmsleep)
|
||||||
return 0;
|
return 0;
|
||||||
#endif /* CONFIG_IEEE80211V */
|
|
||||||
|
|
||||||
sm->group->GKeyDoneStations++;
|
sm->group->GKeyDoneStations++;
|
||||||
sm->GUpdateStationKeys = TRUE;
|
sm->GUpdateStationKeys = TRUE;
|
||||||
|
@ -2427,8 +2425,8 @@ static int wpa_group_update_sta(struct wpa_state_machine *sm, void *ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_IEEE80211V
|
#ifdef CONFIG_WNM
|
||||||
/* update GTK when exiting wnmsleep mode */
|
/* update GTK when exiting WNM-Sleep Mode */
|
||||||
void wpa_wnmsleep_rekey_gtk(struct wpa_state_machine *sm)
|
void wpa_wnmsleep_rekey_gtk(struct wpa_state_machine *sm)
|
||||||
{
|
{
|
||||||
if (sm->is_wnmsleep)
|
if (sm->is_wnmsleep)
|
||||||
|
@ -2550,7 +2548,7 @@ int wpa_wnmsleep_igtk_subelem(struct wpa_state_machine *sm, u8 *pos)
|
||||||
return subelem_len;
|
return subelem_len;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_IEEE80211W */
|
#endif /* CONFIG_IEEE80211W */
|
||||||
#endif /* CONFIG_IEEE80211V */
|
#endif /* CONFIG_WNM */
|
||||||
|
|
||||||
|
|
||||||
static void wpa_group_setkeys(struct wpa_authenticator *wpa_auth,
|
static void wpa_group_setkeys(struct wpa_authenticator *wpa_auth,
|
||||||
|
|
|
@ -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);
|
void wpa_ft_push_pmk_r1(struct wpa_authenticator *wpa_auth, const u8 *addr);
|
||||||
#endif /* CONFIG_IEEE80211R */
|
#endif /* CONFIG_IEEE80211R */
|
||||||
|
|
||||||
#ifdef CONFIG_IEEE80211V
|
|
||||||
void wpa_wnmsleep_rekey_gtk(struct wpa_state_machine *sm);
|
void wpa_wnmsleep_rekey_gtk(struct wpa_state_machine *sm);
|
||||||
void wpa_set_wnmsleep(struct wpa_state_machine *sm, int flag);
|
void wpa_set_wnmsleep(struct wpa_state_machine *sm, int flag);
|
||||||
int wpa_wnmsleep_gtk_subelem(struct wpa_state_machine *sm, u8 *pos);
|
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);
|
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);
|
int wpa_auth_uses_sae(struct wpa_state_machine *sm);
|
||||||
|
|
||||||
|
|
|
@ -87,9 +87,7 @@ struct wpa_state_machine {
|
||||||
unsigned int ft_completed:1;
|
unsigned int ft_completed:1;
|
||||||
unsigned int pmk_r1_name_valid:1;
|
unsigned int pmk_r1_name_valid:1;
|
||||||
#endif /* CONFIG_IEEE80211R */
|
#endif /* CONFIG_IEEE80211R */
|
||||||
#ifdef CONFIG_IEEE80211V
|
|
||||||
unsigned int is_wnmsleep:1;
|
unsigned int is_wnmsleep:1;
|
||||||
#endif /* CONFIG_IEEE80211V */
|
|
||||||
|
|
||||||
u8 req_replay_counter[WPA_REPLAY_COUNTER_LEN];
|
u8 req_replay_counter[WPA_REPLAY_COUNTER_LEN];
|
||||||
int req_replay_counter_used;
|
int req_replay_counter_used;
|
||||||
|
|
|
@ -874,7 +874,7 @@ static void atheros_raw_recv_hs20(void *ctx, const u8 *src_addr, const u8 *buf,
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_HS20 */
|
#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,
|
static void atheros_raw_recv_11v(void *ctx, const u8 *src_addr, const u8 *buf,
|
||||||
size_t len)
|
size_t len)
|
||||||
{
|
{
|
||||||
|
@ -921,9 +921,9 @@ static void atheros_raw_recv_11v(void *ctx, const u8 *src_addr, const u8 *buf,
|
||||||
break;
|
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,
|
static void atheros_raw_receive(void *ctx, const u8 *src_addr, const u8 *buf,
|
||||||
size_t len)
|
size_t len)
|
||||||
{
|
{
|
||||||
|
@ -933,9 +933,9 @@ static void atheros_raw_receive(void *ctx, const u8 *src_addr, const u8 *buf,
|
||||||
#ifdef CONFIG_IEEE80211R
|
#ifdef CONFIG_IEEE80211R
|
||||||
atheros_raw_recv_11r(ctx, src_addr, buf, len);
|
atheros_raw_recv_11r(ctx, src_addr, buf, len);
|
||||||
#endif /* CONFIG_IEEE80211R */
|
#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);
|
atheros_raw_recv_11v(ctx, src_addr, buf, len);
|
||||||
#endif /* CONFIG_IEEE80211V */
|
#endif /* CONFIG_WNM */
|
||||||
#ifdef CONFIG_HS20
|
#ifdef CONFIG_HS20
|
||||||
atheros_raw_recv_hs20(ctx, src_addr, buf, len);
|
atheros_raw_recv_hs20(ctx, src_addr, buf, len);
|
||||||
#endif /* CONFIG_HS20 */
|
#endif /* CONFIG_HS20 */
|
||||||
|
@ -957,9 +957,9 @@ static int atheros_receive_pkt(struct atheros_driver_data *drv)
|
||||||
IEEE80211_FILTER_TYPE_AUTH |
|
IEEE80211_FILTER_TYPE_AUTH |
|
||||||
IEEE80211_FILTER_TYPE_ACTION);
|
IEEE80211_FILTER_TYPE_ACTION);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_IEEE80211V
|
#ifdef CONFIG_WNM
|
||||||
filt.app_filterype |= IEEE80211_FILTER_TYPE_ACTION;
|
filt.app_filterype |= IEEE80211_FILTER_TYPE_ACTION;
|
||||||
#endif /* CONFIG_IEEE80211V */
|
#endif /* CONFIG_WNM */
|
||||||
#ifdef CONFIG_HS20
|
#ifdef CONFIG_HS20
|
||||||
filt.app_filterype |= IEEE80211_FILTER_TYPE_ACTION;
|
filt.app_filterype |= IEEE80211_FILTER_TYPE_ACTION;
|
||||||
#endif /* CONFIG_HS20 */
|
#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,
|
static int athr_wnm_tfs(struct atheros_driver_data *drv, const u8* peer,
|
||||||
u8 *ie, u16 *len, enum wnm_oper oper)
|
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;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_IEEE80211V */
|
#endif /* CONFIG_WNM */
|
||||||
|
|
||||||
|
|
||||||
const struct wpa_driver_ops wpa_driver_atheros_ops = {
|
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,
|
.add_sta_node = atheros_add_sta_node,
|
||||||
#endif /* CONFIG_IEEE80211R */
|
#endif /* CONFIG_IEEE80211R */
|
||||||
.send_action = atheros_send_action,
|
.send_action = atheros_send_action,
|
||||||
#ifdef CONFIG_IEEE80211V
|
#ifdef CONFIG_WNM
|
||||||
.wnm_oper = atheros_wnm_oper,
|
.wnm_oper = atheros_wnm_oper,
|
||||||
#endif /* CONFIG_IEEE80211V */
|
#endif /* CONFIG_WNM */
|
||||||
};
|
};
|
||||||
|
|
|
@ -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)
|
int wpa_wnmsleep_install_key(struct wpa_sm *sm, u8 subelem_id, u8 *buf)
|
||||||
{
|
{
|
||||||
struct wpa_gtk_data gd;
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_IEEE80211V */
|
#endif /* CONFIG_WNM */
|
||||||
|
|
|
@ -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);
|
void wpa_tdls_disable_link(struct wpa_sm *sm, const u8 *addr);
|
||||||
int wpa_tdls_is_external_setup(struct wpa_sm *sm);
|
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);
|
int wpa_wnmsleep_install_key(struct wpa_sm *sm, u8 subelem_id, u8 *buf);
|
||||||
#endif /* CONFIG_IEEE80211V */
|
|
||||||
|
|
||||||
#endif /* WPA_H */
|
#endif /* WPA_H */
|
||||||
|
|
|
@ -176,8 +176,8 @@ ifdef CONFIG_SAE
|
||||||
CFLAGS += -DCONFIG_SAE
|
CFLAGS += -DCONFIG_SAE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_IEEE80211V
|
ifdef CONFIG_WNM
|
||||||
CFLAGS += -DCONFIG_IEEE80211V
|
CFLAGS += -DCONFIG_WNM
|
||||||
OBJS += wnm_sta.o
|
OBJS += wnm_sta.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -758,10 +758,6 @@ OBJS += ../src/ap/hs20.o
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_WNM
|
|
||||||
CFLAGS += -DCONFIG_WNM
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef NEED_RSN_AUTHENTICATOR
|
ifdef NEED_RSN_AUTHENTICATOR
|
||||||
CFLAGS += -DCONFIG_NO_RADIUS
|
CFLAGS += -DCONFIG_NO_RADIUS
|
||||||
NEED_AES_WRAP=y
|
NEED_AES_WRAP=y
|
||||||
|
|
|
@ -2138,7 +2138,7 @@ static void wpa_supplicant_event_tdls(struct wpa_supplicant *wpa_s,
|
||||||
#endif /* CONFIG_TDLS */
|
#endif /* CONFIG_TDLS */
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_IEEE80211V
|
#ifdef CONFIG_WNM
|
||||||
static void wpa_supplicant_event_wnm(struct wpa_supplicant *wpa_s,
|
static void wpa_supplicant_event_wnm(struct wpa_supplicant *wpa_s,
|
||||||
union wpa_event_data *data)
|
union wpa_event_data *data)
|
||||||
{
|
{
|
||||||
|
@ -2154,7 +2154,7 @@ static void wpa_supplicant_event_wnm(struct wpa_supplicant *wpa_s,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_IEEE80211V */
|
#endif /* CONFIG_WNM */
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_IEEE80211R
|
#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);
|
wpa_supplicant_event_tdls(wpa_s, data);
|
||||||
break;
|
break;
|
||||||
#endif /* CONFIG_TDLS */
|
#endif /* CONFIG_TDLS */
|
||||||
#ifdef CONFIG_IEEE80211V
|
#ifdef CONFIG_WNM
|
||||||
case EVENT_WNM:
|
case EVENT_WNM:
|
||||||
wpa_supplicant_event_wnm(wpa_s, data);
|
wpa_supplicant_event_wnm(wpa_s, data);
|
||||||
break;
|
break;
|
||||||
#endif /* CONFIG_IEEE80211V */
|
#endif /* CONFIG_WNM */
|
||||||
#ifdef CONFIG_IEEE80211R
|
#ifdef CONFIG_IEEE80211R
|
||||||
case EVENT_FT_RESPONSE:
|
case EVENT_FT_RESPONSE:
|
||||||
wpa_supplicant_event_ft_response(wpa_s, data);
|
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_SME */
|
||||||
#endif /* CONFIG_IEEE80211W */
|
#endif /* CONFIG_IEEE80211W */
|
||||||
#ifdef CONFIG_IEEE80211V
|
#ifdef CONFIG_WNM
|
||||||
if (data->rx_action.category == WLAN_ACTION_WNM) {
|
if (data->rx_action.category == WLAN_ACTION_WNM) {
|
||||||
ieee802_11_rx_wnm_action(wpa_s, &data->rx_action);
|
ieee802_11_rx_wnm_action(wpa_s, &data->rx_action);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_IEEE80211V */
|
#endif /* CONFIG_WNM */
|
||||||
#ifdef CONFIG_GAS
|
#ifdef CONFIG_GAS
|
||||||
if (data->rx_action.category == WLAN_ACTION_PUBLIC &&
|
if (data->rx_action.category == WLAN_ACTION_PUBLIC &&
|
||||||
gas_query_rx(wpa_s->gas, data->rx_action.da,
|
gas_query_rx(wpa_s->gas, data->rx_action.da,
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
|
|
||||||
#define MAX_TFS_IE_LEN 1024
|
#define MAX_TFS_IE_LEN 1024
|
||||||
|
|
||||||
#ifdef CONFIG_IEEE80211V
|
|
||||||
|
|
||||||
/* get the TFS IE from driver */
|
/* get the TFS IE from driver */
|
||||||
static int ieee80211_11_get_tfs_ie(struct wpa_supplicant *wpa_s, u8 *buf,
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_IEEE80211V */
|
|
||||||
|
|
Loading…
Reference in a new issue