mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-02-21 03:23:04 -05:00
Remove unnecessary ifname parameter from hapd_get_ssid/hapd_set_ssid
This commit is contained in:
parent
aa48451698
commit
8709de1ae8
@ -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)
|
if (hapd->driver == NULL || hapd->driver->hapd_get_ssid == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
return hapd->driver->hapd_get_ssid(hapd->conf->iface, hapd->drv_priv,
|
return hapd->driver->hapd_get_ssid(hapd->drv_priv, buf, len);
|
||||||
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)
|
if (hapd->driver == NULL || hapd->driver->hapd_set_ssid == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
return hapd->driver->hapd_set_ssid(hapd->conf->iface, hapd->drv_priv,
|
return hapd->driver->hapd_set_ssid(hapd->drv_priv, buf, len);
|
||||||
buf, len);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1326,7 +1326,6 @@ struct wpa_driver_ops {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* hapd_get_ssid - Get the current SSID (AP only)
|
* hapd_get_ssid - Get the current SSID (AP only)
|
||||||
* @ifname: Interface (master or virtual BSS)
|
|
||||||
* @priv: Private driver interface data
|
* @priv: Private driver interface data
|
||||||
* @buf: Buffer for returning the SSID
|
* @buf: Buffer for returning the SSID
|
||||||
* @len: Maximum length of the buffer
|
* @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
|
* template from set_beacon() and does not reply to Probe Request
|
||||||
* frames.
|
* 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)
|
* hapd_set_ssid - Set SSID (AP only)
|
||||||
* @ifname: Interface (master or virtual BSS)
|
|
||||||
* @priv: Private driver interface data
|
* @priv: Private driver interface data
|
||||||
* @buf: SSID
|
* @buf: SSID
|
||||||
* @len: Length of the SSID in octets
|
* @len: Length of the SSID in octets
|
||||||
* Returns: 0 on success, -1 on failure
|
* Returns: 0 on success, -1 on failure
|
||||||
*/
|
*/
|
||||||
int (*hapd_set_ssid)(const char *ifname, void *priv, const u8 *buf,
|
int (*hapd_set_ssid)(void *priv, const u8 *buf, int len);
|
||||||
int len);
|
|
||||||
/**
|
/**
|
||||||
* hapd_set_countermeasures - Enable/disable TKIP countermeasures (AP)
|
* hapd_set_countermeasures - Enable/disable TKIP countermeasures (AP)
|
||||||
* @priv: Private driver interface data
|
* @priv: Private driver interface data
|
||||||
|
@ -1148,7 +1148,7 @@ madwifi_deinit(void *priv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
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 madwifi_driver_data *drv = priv;
|
||||||
struct iwreq iwr;
|
struct iwreq iwr;
|
||||||
@ -1168,7 +1168,7 @@ madwifi_set_ssid(const char *ifname, void *priv, const u8 *buf, int len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
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 madwifi_driver_data *drv = priv;
|
||||||
struct iwreq iwr;
|
struct iwreq iwr;
|
||||||
|
@ -134,7 +134,7 @@ set80211param(struct bsd_driver_data *drv, int op, int arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
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;
|
struct bsd_driver_data *drv = priv;
|
||||||
#ifdef SIOCG80211NWID
|
#ifdef SIOCG80211NWID
|
||||||
@ -155,7 +155,7 @@ bsd_get_ssid(const char *ifname, void *priv, u8 *ssid, int len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
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;
|
struct bsd_driver_data *drv = priv;
|
||||||
#ifdef SIOCS80211NWID
|
#ifdef SIOCS80211NWID
|
||||||
|
@ -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,
|
static int hostap_set_ssid(void *priv, const u8 *buf, int len)
|
||||||
int len)
|
|
||||||
{
|
{
|
||||||
struct hostap_driver_data *drv = priv;
|
struct hostap_driver_data *drv = priv;
|
||||||
struct iwreq iwr;
|
struct iwreq iwr;
|
||||||
|
@ -1218,7 +1218,7 @@ madwifi_deinit(void *priv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
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 madwifi_driver_data *drv = priv;
|
||||||
struct iwreq iwr;
|
struct iwreq iwr;
|
||||||
@ -1238,7 +1238,7 @@ madwifi_set_ssid(const char *ifname, void *priv, const u8 *buf, int len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
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 madwifi_driver_data *drv = priv;
|
||||||
struct iwreq iwr;
|
struct iwreq iwr;
|
||||||
|
@ -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,
|
static int test_driver_set_ssid(void *priv, const u8 *buf, int len)
|
||||||
int len)
|
|
||||||
{
|
{
|
||||||
struct test_driver_bss *bss = priv;
|
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);
|
wpa_hexdump_ascii(MSG_DEBUG, "test_driver_set_ssid: SSID", buf, len);
|
||||||
|
|
||||||
if (len < 0 || (size_t) len > sizeof(bss->ssid))
|
if (len < 0 || (size_t) len > sizeof(bss->ssid))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user