Add support for CONFIG_NO_ROAMING to Makefile

Commit e9af53ad39 introduced new
CONFIG_NO_ROAMING configuration parameter but unfortunately it was added
only to Android.mk. Enabling this parameter didn't have any effect when
Makefile was used to build wpa_supplicant. This commit fixes that problem
and cleans "unused variable" compiler warning.

Signed-off-by: Lauri Hintsala <lauri.hintsala@silabs.com>
This commit is contained in:
Lauri Hintsala 2015-03-20 20:46:03 +02:00 committed by Jouni Malinen
parent 65a7b21f5e
commit ce18c10773
2 changed files with 6 additions and 0 deletions

View file

@ -317,6 +317,10 @@ CFLAGS += -DCONFIG_INTERWORKING
NEED_GAS=y NEED_GAS=y
endif endif
ifdef CONFIG_NO_ROAMING
CFLAGS += -DCONFIG_NO_ROAMING
endif
include ../src/drivers/drivers.mak include ../src/drivers/drivers.mak
ifdef CONFIG_AP ifdef CONFIG_AP
OBJS_d += $(DRV_BOTH_OBJS) OBJS_d += $(DRV_BOTH_OBJS)

View file

@ -1286,7 +1286,9 @@ static int wpa_supplicant_need_to_roam(struct wpa_supplicant *wpa_s,
struct wpa_ssid *ssid) struct wpa_ssid *ssid)
{ {
struct wpa_bss *current_bss = NULL; struct wpa_bss *current_bss = NULL;
#ifndef CONFIG_NO_ROAMING
int min_diff; int min_diff;
#endif /* CONFIG_NO_ROAMING */
if (wpa_s->reassociate) if (wpa_s->reassociate)
return 1; /* explicit request to reassociate */ return 1; /* explicit request to reassociate */