Remove unnecessary ifname parameter from set_generic_elem() driver op

This commit is contained in:
Jouni Malinen 2010-03-07 11:33:06 +02:00
parent d5dd016a8a
commit aa48451698
7 changed files with 8 additions and 11 deletions

View file

@ -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) if (hapd->driver == NULL || hapd->driver->set_generic_elem == NULL)
return 0; return 0;
return hapd->driver->set_generic_elem(hapd->conf->iface, return hapd->driver->set_generic_elem(hapd->drv_priv, elem, elem_len);
hapd->drv_priv, elem, elem_len);
} }

View file

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

View file

@ -554,7 +554,7 @@ madwifi_sta_clear_stats(void *priv, const u8 *addr)
static int 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 * Do nothing; we setup parameters at startup that define the

View file

@ -558,7 +558,7 @@ bsd_set_freq(void *priv, u16 channel)
} }
static int 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 #ifdef IEEE80211_IOC_APPIE
wpa_printf(MSG_DEBUG, "%s: set WPA+RSN ie (len %lu)", __func__, 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) size_t wpa_ie_len)
{ {
#ifdef IEEE80211_IOC_APPIE #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 */ #else /* IEEE80211_IOC_APPIE */
return set80211var(drv, IEEE80211_IOC_OPTIE, wpa_ie, wpa_ie_len); return set80211var(drv, IEEE80211_IOC_OPTIE, wpa_ie, wpa_ie_len);
#endif /* IEEE80211_IOC_APPIE */ #endif /* IEEE80211_IOC_APPIE */

View file

@ -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) const u8 *elem, size_t elem_len)
{ {
struct hostap_driver_data *drv = priv; struct hostap_driver_data *drv = priv;

View file

@ -653,7 +653,7 @@ madwifi_sta_clear_stats(void *priv, const u8 *addr)
static int 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 * Do nothing; we setup parameters at startup that define the

View file

@ -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) const u8 *elem, size_t elem_len)
{ {
struct test_driver_bss *bss = priv; struct test_driver_bss *bss = priv;