Browse Source

Remove unnecessary ifname parameter from hapd_get_ssid/hapd_set_ssid

Jouni Malinen 15 years ago
parent
commit
8709de1ae8

+ 2 - 4
src/ap/ap_drv_ops.c

@@ -390,8 +390,7 @@ int hostapd_get_ssid(struct hostapd_data *hapd, u8 *buf, size_t len)
 {
 	if (hapd->driver == NULL || hapd->driver->hapd_get_ssid == NULL)
 		return 0;
-	return hapd->driver->hapd_get_ssid(hapd->conf->iface, hapd->drv_priv,
-					   buf, len);
+	return hapd->driver->hapd_get_ssid(hapd->drv_priv, buf, len);
 }
 
 
@@ -399,8 +398,7 @@ int hostapd_set_ssid(struct hostapd_data *hapd, const u8 *buf, size_t len)
 {
 	if (hapd->driver == NULL || hapd->driver->hapd_set_ssid == NULL)
 		return 0;
-	return hapd->driver->hapd_set_ssid(hapd->conf->iface, hapd->drv_priv,
-					   buf, len);
+	return hapd->driver->hapd_set_ssid(hapd->drv_priv, buf, len);
 }
 
 

+ 3 - 5
src/drivers/driver.h

@@ -1326,7 +1326,6 @@ struct wpa_driver_ops {
 
 	/**
 	 * hapd_get_ssid - Get the current SSID (AP only)
-	 * @ifname: Interface (master or virtual BSS)
 	 * @priv: Private driver interface data
 	 * @buf: Buffer for returning the SSID
 	 * @len: Maximum length of the buffer
@@ -1336,18 +1335,17 @@ struct wpa_driver_ops {
 	 * template from set_beacon() and does not reply to Probe Request
 	 * frames.
 	 */
-	int (*hapd_get_ssid)(const char *ifname, void *priv, u8 *buf, int len);
+	int (*hapd_get_ssid)(void *priv, u8 *buf, int len);
 
 	/**
 	 * hapd_set_ssid - Set SSID (AP only)
-	 * @ifname: Interface (master or virtual BSS)
 	 * @priv: Private driver interface data
 	 * @buf: SSID
 	 * @len: Length of the SSID in octets
 	 * Returns: 0 on success, -1 on failure
 	 */
-	int (*hapd_set_ssid)(const char *ifname, void *priv, const u8 *buf,
-			     int len);
+	int (*hapd_set_ssid)(void *priv, const u8 *buf, int len);
+
 	/**
 	 * hapd_set_countermeasures - Enable/disable TKIP countermeasures (AP)
 	 * @priv: Private driver interface data

+ 2 - 2
src/drivers/driver_atheros.c

@@ -1148,7 +1148,7 @@ madwifi_deinit(void *priv)
 }
 
 static int
-madwifi_set_ssid(const char *ifname, void *priv, const u8 *buf, int len)
+madwifi_set_ssid(void *priv, const u8 *buf, int len)
 {
 	struct madwifi_driver_data *drv = priv;
 	struct iwreq iwr;
@@ -1168,7 +1168,7 @@ madwifi_set_ssid(const char *ifname, void *priv, const u8 *buf, int len)
 }
 
 static int
-madwifi_get_ssid(const char *ifname, void *priv, u8 *buf, int len)
+madwifi_get_ssid(void *priv, u8 *buf, int len)
 {
 	struct madwifi_driver_data *drv = priv;
 	struct iwreq iwr;

+ 2 - 2
src/drivers/driver_bsd.c

@@ -134,7 +134,7 @@ set80211param(struct bsd_driver_data *drv, int op, int arg)
 }
 
 static int
-bsd_get_ssid(const char *ifname, void *priv, u8 *ssid, int len)
+bsd_get_ssid(void *priv, u8 *ssid, int len)
 {
 	struct bsd_driver_data *drv = priv;
 #ifdef SIOCG80211NWID
@@ -155,7 +155,7 @@ bsd_get_ssid(const char *ifname, void *priv, u8 *ssid, int len)
 }
 
 static int
-bsd_set_ssid(const char *ifname, void *priv, const u8 *ssid, int ssid_len)
+bsd_set_ssid(void *priv, const u8 *ssid, int ssid_len)
 {
 	struct bsd_driver_data *drv = priv;
 #ifdef SIOCS80211NWID

+ 1 - 2
src/drivers/driver_hostap.c

@@ -550,8 +550,7 @@ static int hostap_set_privacy(void *priv, int enabled)
 }
 
 
-static int hostap_set_ssid(const char *ifname, void *priv, const u8 *buf,
-			   int len)
+static int hostap_set_ssid(void *priv, const u8 *buf, int len)
 {
 	struct hostap_driver_data *drv = priv;
 	struct iwreq iwr;

+ 2 - 2
src/drivers/driver_madwifi.c

@@ -1218,7 +1218,7 @@ madwifi_deinit(void *priv)
 }
 
 static int
-madwifi_set_ssid(const char *ifname, void *priv, const u8 *buf, int len)
+madwifi_set_ssid(void *priv, const u8 *buf, int len)
 {
 	struct madwifi_driver_data *drv = priv;
 	struct iwreq iwr;
@@ -1238,7 +1238,7 @@ madwifi_set_ssid(const char *ifname, void *priv, const u8 *buf, int len)
 }
 
 static int
-madwifi_get_ssid(const char *ifname, void *priv, u8 *buf, int len)
+madwifi_get_ssid(void *priv, u8 *buf, int len)
 {
 	struct madwifi_driver_data *drv = priv;
 	struct iwreq iwr;

+ 2 - 3
src/drivers/driver_test.c

@@ -1043,12 +1043,11 @@ static int test_driver_valid_bss_mask(void *priv, const u8 *addr,
 }
 
 
-static int test_driver_set_ssid(const char *ifname, void *priv, const u8 *buf,
-				int len)
+static int test_driver_set_ssid(void *priv, const u8 *buf, int len)
 {
 	struct test_driver_bss *bss = priv;
 
-	wpa_printf(MSG_DEBUG, "%s(ifname=%s)", __func__, ifname);
+	wpa_printf(MSG_DEBUG, "%s(ifname=%s)", __func__, bss->ifname);
 	wpa_hexdump_ascii(MSG_DEBUG, "test_driver_set_ssid: SSID", buf, len);
 
 	if (len < 0 || (size_t) len > sizeof(bss->ssid))