From: Jouni Malinen Date: Sat, 22 Oct 2011 19:51:49 +0000 (+0300) Subject: nl80211: Remove some unnecessary ifdef HOSTAPD blocks X-Git-Tag: hostap-1-bp~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd2df8921be63b9e05f30cac6f751864ac2e7f13;p=thirdparty%2Fhostap.git nl80211: Remove some unnecessary ifdef HOSTAPD blocks --- diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 50b73de4f..63c407fbf 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -277,7 +277,15 @@ static int wpa_driver_nl80211_if_remove(void *priv, enum wpa_driver_if_type type, const char *ifname); #else /* HOSTAPD */ -static int have_ifidx(struct wpa_driver_nl80211_data *drv, int ifidx) +static inline void add_ifidx(struct wpa_driver_nl80211_data *drv, int ifidx) +{ +} + +static inline void del_ifidx(struct wpa_driver_nl80211_data *drv, int ifidx) +{ +} + +static inline int have_ifidx(struct wpa_driver_nl80211_data *drv, int ifidx) { return 0; } @@ -637,7 +645,6 @@ static void wpa_driver_nl80211_event_rtm_newlink(void *ctx, attr = RTA_NEXT(attr, attrlen); } -#ifdef HOSTAPD if (ifi->ifi_family == AF_BRIDGE && brid) { /* device has been added to bridge */ char namebuf[IFNAMSIZ]; @@ -646,7 +653,6 @@ static void wpa_driver_nl80211_event_rtm_newlink(void *ctx, brid, namebuf); add_ifidx(drv, brid); } -#endif /* HOSTAPD */ } @@ -682,7 +688,6 @@ static void wpa_driver_nl80211_event_rtm_dellink(void *ctx, attr = RTA_NEXT(attr, attrlen); } -#ifdef HOSTAPD if (ifi->ifi_family == AF_BRIDGE && brid) { /* device has been removed from bridge */ char namebuf[IFNAMSIZ]; @@ -691,7 +696,6 @@ static void wpa_driver_nl80211_event_rtm_dellink(void *ctx, "%s", brid, namebuf); del_ifidx(drv, brid); } -#endif /* HOSTAPD */ } @@ -4463,10 +4467,8 @@ static void nl80211_remove_iface(struct wpa_driver_nl80211_data *drv, wpa_printf(MSG_DEBUG, "nl80211: Remove interface ifindex=%d", ifidx); -#ifdef HOSTAPD /* stop listening for EAPOL on this interface */ del_ifidx(drv, ifidx); -#endif /* HOSTAPD */ msg = nlmsg_alloc(); if (!msg) @@ -4558,10 +4560,8 @@ static int nl80211_create_iface_once(struct wpa_driver_nl80211_data *drv, if (ifidx <= 0) return -1; -#ifdef HOSTAPD /* start listening for EAPOL on this interface */ add_ifidx(drv, ifidx); -#endif /* HOSTAPD */ if (addr && iftype != NL80211_IFTYPE_MONITOR && linux_set_ifhwaddr(drv->global->ioctl_sock, ifname, addr)) {