Browse Source

Remove unneeded ifname parameter from set_privacy() driver op

Jouni Malinen 15 years ago
parent
commit
d5dd016a8a

+ 1 - 2
src/ap/ap_drv_ops.c

@@ -373,8 +373,7 @@ int hostapd_set_privacy(struct hostapd_data *hapd, int enabled)
 {
 	if (hapd->driver == NULL || hapd->driver->set_privacy == NULL)
 		return 0;
-	return hapd->driver->set_privacy(hapd->conf->iface, hapd->drv_priv,
-					 enabled);
+	return hapd->driver->set_privacy(hapd->drv_priv, enabled);
 }
 
 

+ 1 - 1
src/drivers/driver.h

@@ -1219,7 +1219,7 @@ struct wpa_driver_ops {
 	 * kernel driver for Beacon frames. This can be left undefined (set to
 	 * %NULL) if the driver uses the Beacon template from set_beacon().
 	 */
-	int (*set_privacy)(const char *ifname, void *priv, int enabled);
+	int (*set_privacy)(void *priv, int enabled);
 
 	/**
 	 * get_seqnum - Fetch the current TSC/packet number (AP only)

+ 2 - 2
src/drivers/driver_atheros.c

@@ -304,7 +304,7 @@ madwifi_set_ieee8021x(void *priv, struct wpa_bss_params *params)
 }
 
 static int
-madwifi_set_privacy(const char *ifname, void *priv, int enabled)
+madwifi_set_privacy(void *priv, int enabled)
 {
 	struct madwifi_driver_data *drv = priv;
 
@@ -1110,7 +1110,7 @@ madwifi_init(struct hostapd_data *hapd, struct wpa_init_params *params)
 
 	/* mark down during setup */
 	linux_set_iface_flags(drv->ioctl_sock, drv->iface, 0);
-	madwifi_set_privacy(drv->iface, drv, 0); /* default to no privacy */
+	madwifi_set_privacy(drv, 0); /* default to no privacy */
 
 	madwifi_receive_probe_req(drv);
 

+ 1 - 1
src/drivers/driver_bsd.c

@@ -596,7 +596,7 @@ ether_sprintf(const u8 *addr)
 }
 
 static int
-bsd_set_privacy(const char *ifname, void *priv, int enabled)
+bsd_set_privacy(void *priv, int enabled)
 {
 	wpa_printf(MSG_DEBUG, "%s: enabled=%d", __func__, enabled);
 

+ 1 - 1
src/drivers/driver_hostap.c

@@ -541,7 +541,7 @@ static int hostap_set_ieee8021x(void *priv, struct wpa_bss_params *params)
 }
 
 
-static int hostap_set_privacy(const char *ifname, void *priv, int enabled)
+static int hostap_set_privacy(void *priv, int enabled)
 {
 	struct hostap_drvier_data *drv = priv;
 

+ 2 - 2
src/drivers/driver_madwifi.c

@@ -349,7 +349,7 @@ madwifi_set_ieee8021x(void *priv, struct wpa_bss_params *params)
 }
 
 static int
-madwifi_set_privacy(const char *ifname, void *priv, int enabled)
+madwifi_set_privacy(void *priv, int enabled)
 {
 	struct madwifi_driver_data *drv = priv;
 
@@ -1180,7 +1180,7 @@ madwifi_init(struct hostapd_data *hapd, struct wpa_init_params *params)
 
 	/* mark down during setup */
 	linux_set_iface_flags(drv->ioctl_sock, drv->iface, 0);
-	madwifi_set_privacy(drv->iface, drv, 0); /* default to no privacy */
+	madwifi_set_privacy(drv, 0); /* default to no privacy */
 
 	madwifi_receive_probe_req(drv);
 

+ 2 - 4
src/drivers/driver_test.c

@@ -1061,13 +1061,11 @@ static int test_driver_set_ssid(const char *ifname, void *priv, const u8 *buf,
 }
 
 
-static int test_driver_set_privacy(const char *ifname, void *priv, int enabled)
+static int test_driver_set_privacy(void *priv, int enabled)
 {
 	struct test_driver_bss *dbss = priv;
 
-	wpa_printf(MSG_DEBUG, "%s(ifname=%s enabled=%d)",
-		   __func__, ifname, enabled);
-
+	wpa_printf(MSG_DEBUG, "%s(enabled=%d)",  __func__, enabled);
 	dbss->privacy = enabled;
 
 	return 0;