Remove unnecessary ifname parameter from hapd_get_ssid/hapd_set_ssid
authorJouni Malinen <j@w1.fi>
Sun, 7 Mar 2010 09:36:45 +0000 (11:36 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 7 Mar 2010 09:36:45 +0000 (11:36 +0200)
src/ap/ap_drv_ops.c
src/drivers/driver.h
src/drivers/driver_atheros.c
src/drivers/driver_bsd.c
src/drivers/driver_hostap.c
src/drivers/driver_madwifi.c
src/drivers/driver_test.c

index e387073..b392ebd 100644 (file)
@@ -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);
 }
 
 
index 5cf9c94..d3b8e85 100644 (file)
@@ -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
index 63a6d22..ba21de3 100644 (file)
@@ -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;
index 92ef30c..941db51 100644 (file)
@@ -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
index 05096b2..a0cd132 100644 (file)
@@ -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;
index d0acf34..40abdb5 100644 (file)
@@ -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;
index 2fa4108..e6b1f1f 100644 (file)
@@ -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))