nl80211: Fix compiler warnings on non-P2P build

This commit is contained in:
Jouni Malinen 2010-11-27 13:05:37 +02:00
parent 6859f1cb24
commit 482856c8ba

View file

@ -5484,6 +5484,8 @@ static enum nl80211_iftype wpa_driver_nl80211_if_type(
} }
#ifdef CONFIG_P2P
static int nl80211_addr_in_use(struct nl80211_global *global, const u8 *addr) static int nl80211_addr_in_use(struct nl80211_global *global, const u8 *addr)
{ {
struct wpa_driver_nl80211_data *drv; struct wpa_driver_nl80211_data *drv;
@ -5520,6 +5522,8 @@ static int nl80211_p2p_interface_addr(struct wpa_driver_nl80211_data *drv,
return 0; return 0;
} }
#endif /* CONFIG_P2P */
static int wpa_driver_nl80211_if_add(void *priv, enum wpa_driver_if_type type, static int wpa_driver_nl80211_if_add(void *priv, enum wpa_driver_if_type type,
const char *ifname, const u8 *addr, const char *ifname, const u8 *addr,
@ -6089,15 +6093,15 @@ static int nl80211_set_intra_bss(void *priv, int enabled)
static int nl80211_set_param(void *priv, const char *param) static int nl80211_set_param(void *priv, const char *param)
{ {
struct i802_bss *bss = priv;
struct wpa_driver_nl80211_data *drv = bss->drv;
wpa_printf(MSG_DEBUG, "nl80211: driver param='%s'", param); wpa_printf(MSG_DEBUG, "nl80211: driver param='%s'", param);
if (param == NULL) if (param == NULL)
return 0; return 0;
#ifdef CONFIG_P2P #ifdef CONFIG_P2P
if (os_strstr(param, "use_p2p_group_interface=1")) { if (os_strstr(param, "use_p2p_group_interface=1")) {
struct i802_bss *bss = priv;
struct wpa_driver_nl80211_data *drv = bss->drv;
wpa_printf(MSG_DEBUG, "nl80211: Use separate P2P group " wpa_printf(MSG_DEBUG, "nl80211: Use separate P2P group "
"interface"); "interface");
drv->capa.flags |= WPA_DRIVER_FLAGS_P2P_CONCURRENT; drv->capa.flags |= WPA_DRIVER_FLAGS_P2P_CONCURRENT;