Browse Source

Remove unnecessary ifname parameter from set_generic_elem() driver op

Jouni Malinen 15 years ago
parent
commit
aa48451698

+ 1 - 2
src/ap/ap_drv_ops.c

@@ -382,8 +382,7 @@ int hostapd_set_generic_elem(struct hostapd_data *hapd, const u8 *elem,
 {
 	if (hapd->driver == NULL || hapd->driver->set_generic_elem == NULL)
 		return 0;
-	return hapd->driver->set_generic_elem(hapd->conf->iface,
-					      hapd->drv_priv, elem, elem_len);
+	return hapd->driver->set_generic_elem(hapd->drv_priv, elem, elem_len);
 }
 
 

+ 1 - 3
src/drivers/driver.h

@@ -1251,7 +1251,6 @@ struct wpa_driver_ops {
 
 	/**
 	 * set_generic_elem - Add IEs into Beacon/Probe Response frames (AP)
-	 * @ifname: The interface name (main or virtual BSS)
 	 * @priv: Private driver interface data
 	 * @elem: Information elements
 	 * @elem_len: Length of the elem buffer in octets
@@ -1262,8 +1261,7 @@ struct wpa_driver_ops {
 	 * undefined (set to %NULL) if the driver uses the Beacon template from
 	 * set_beacon().
 	 */
-	int (*set_generic_elem)(const char *ifname, void *priv, const u8 *elem,
-				size_t elem_len);
+	int (*set_generic_elem)(void *priv, const u8 *elem, size_t elem_len);
 
 	/**
 	 * read_sta_data - Fetch station data (AP only)

+ 1 - 1
src/drivers/driver_atheros.c

@@ -554,7 +554,7 @@ madwifi_sta_clear_stats(void *priv, const u8 *addr)
 
 
 static int
-madwifi_set_opt_ie(const char *ifname, void *priv, const u8 *ie, size_t ie_len)
+madwifi_set_opt_ie(void *priv, const u8 *ie, size_t ie_len)
 {
 	/*
 	 * Do nothing; we setup parameters at startup that define the

+ 2 - 2
src/drivers/driver_bsd.c

@@ -558,7 +558,7 @@ bsd_set_freq(void *priv, u16 channel)
 }
 
 static int
-bsd_set_opt_ie(const char *ifname, void *priv, const u8 *ie, size_t ie_len)
+bsd_set_opt_ie(void *priv, const u8 *ie, size_t ie_len)
 {
 #ifdef IEEE80211_IOC_APPIE
 	wpa_printf(MSG_DEBUG, "%s: set WPA+RSN ie (len %lu)", __func__,
@@ -881,7 +881,7 @@ wpa_driver_bsd_set_wpa_ie(struct bsd_driver_data *drv, const u8 *wpa_ie,
 			  size_t wpa_ie_len)
 {
 #ifdef IEEE80211_IOC_APPIE
-	return bsd_set_opt_ie(drv->ifname, drv, wpa_ie, wpa_ie_len);
+	return bsd_set_opt_ie(drv, wpa_ie, wpa_ie_len);
 #else /* IEEE80211_IOC_APPIE */
 	return set80211var(drv, IEEE80211_IOC_OPTIE, wpa_ie, wpa_ie_len);
 #endif /* IEEE80211_IOC_APPIE */

+ 1 - 1
src/drivers/driver_hostap.c

@@ -745,7 +745,7 @@ static int hostapd_ioctl_set_generic_elem(struct hostap_driver_data *drv)
 }
 
 
-static int hostap_set_generic_elem(const char *ifname, void *priv,
+static int hostap_set_generic_elem(void *priv,
 				   const u8 *elem, size_t elem_len)
 {
 	struct hostap_driver_data *drv = priv;

+ 1 - 1
src/drivers/driver_madwifi.c

@@ -653,7 +653,7 @@ madwifi_sta_clear_stats(void *priv, const u8 *addr)
 
 
 static int
-madwifi_set_opt_ie(const char *ifname, void *priv, const u8 *ie, size_t ie_len)
+madwifi_set_opt_ie(void *priv, const u8 *ie, size_t ie_len)
 {
 	/*
 	 * Do nothing; we setup parameters at startup that define the

+ 1 - 1
src/drivers/driver_test.c

@@ -815,7 +815,7 @@ static void test_driver_receive_unix(int sock, void *eloop_ctx, void *sock_ctx)
 }
 
 
-static int test_driver_set_generic_elem(const char *ifname, void *priv,
+static int test_driver_set_generic_elem(void *priv,
 					const u8 *elem, size_t elem_len)
 {
 	struct test_driver_bss *bss = priv;