aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-03-06 20:36:40 (GMT)
committerJouni Malinen <j@w1.fi>2010-03-06 20:36:40 (GMT)
commit8b897f5a17739b506a7f757905594d8d3a61c3bf (patch)
treee39262e6c750ff3ac5e369b0fbac87032d11bbb3 /src
parent53f3d6f3e616398d7e1fa936119c009b7fa6c7f1 (diff)
downloadhostap-8b897f5a17739b506a7f757905594d8d3a61c3bf.zip
hostap-8b897f5a17739b506a7f757905594d8d3a61c3bf.tar.gz
hostap-8b897f5a17739b506a7f757905594d8d3a61c3bf.tar.bz2
Remove unnecessary ifname parameter from set_beacon()
The new per-BSS driver context makes this unnecessary.
Diffstat (limited to 'src')
-rw-r--r--src/ap/ap_drv_ops.c4
-rw-r--r--src/ap/beacon.c3
-rw-r--r--src/ap/hostapd.h2
-rw-r--r--src/drivers/driver.h4
-rw-r--r--src/drivers/driver_nl80211.c4
5 files changed, 7 insertions, 10 deletions
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
index 07c0e69..b7298dc 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
@@ -227,14 +227,14 @@ static int hostapd_set_bss_params(struct hostapd_data *hapd,
}
-static int hostapd_set_beacon(const char *ifname, struct hostapd_data *hapd,
+static int hostapd_set_beacon(struct hostapd_data *hapd,
const u8 *head, size_t head_len,
const u8 *tail, size_t tail_len, int dtim_period,
int beacon_int)
{
if (hapd->driver == NULL || hapd->driver->set_beacon == NULL)
return 0;
- return hapd->driver->set_beacon(ifname, hapd->drv_priv,
+ return hapd->driver->set_beacon(hapd->drv_priv,
head, head_len, tail, tail_len,
dtim_period, beacon_int);
}
diff --git a/src/ap/beacon.c b/src/ap/beacon.c
index 4026056..1a4cc1a 100644
--- a/src/ap/beacon.c
+++ b/src/ap/beacon.c
@@ -429,8 +429,7 @@ void ieee802_11_set_beacon(struct hostapd_data *hapd)
tail_len = tailpos > tail ? tailpos - tail : 0;
- if (hapd->drv.set_beacon(hapd->conf->iface, hapd,
- (u8 *) head, head_len,
+ if (hapd->drv.set_beacon(hapd, (u8 *) head, head_len,
tail, tail_len, hapd->conf->dtim_period,
hapd->iconf->beacon_int))
wpa_printf(MSG_ERROR, "Failed to set beacon head/tail or DTIM "
diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h
index 7c6b0b7..13b6722 100644
--- a/src/ap/hostapd.h
+++ b/src/ap/hostapd.h
@@ -74,7 +74,7 @@ struct hostapd_driver_ops {
int (*set_radius_acl_expire)(struct hostapd_data *hapd,
const u8 *mac);
int (*set_bss_params)(struct hostapd_data *hapd, int use_protection);
- int (*set_beacon)(const char *ifname, struct hostapd_data *hapd,
+ int (*set_beacon)(struct hostapd_data *hapd,
const u8 *head, size_t head_len,
const u8 *tail, size_t tail_len, int dtim_period,
int beacon_int);
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index a3ed90f..453738e 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -1159,7 +1159,6 @@ struct wpa_driver_ops {
/**
* set_beacon - Set Beacon frame template
- * @iface: Interface name (main interface or virtual BSS)
* @priv: Private driver interface data
* @head: Beacon head from IEEE 802.11 header to IEs before TIM IE
* @head_len: Length of the head buffer in octets
@@ -1174,8 +1173,7 @@ struct wpa_driver_ops {
* frame by concatenating the head part with TIM IE generated by the
* driver/firmware and finishing with the tail part.
*/
- int (*set_beacon)(const char *ifname, void *priv,
- const u8 *head, size_t head_len,
+ int (*set_beacon)(void *priv, const u8 *head, size_t head_len,
const u8 *tail, size_t tail_len, int dtim_period,
int beacon_int);
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index c0f1fae..c74adf7 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -2682,7 +2682,7 @@ static int wpa_driver_nl80211_send_mlme(void *priv, const u8 *data,
}
-static int wpa_driver_nl80211_set_beacon(const char *ifname, void *priv,
+static int wpa_driver_nl80211_set_beacon(void *priv,
const u8 *head, size_t head_len,
const u8 *tail, size_t tail_len,
int dtim_period, int beacon_int)
@@ -2693,7 +2693,7 @@ static int wpa_driver_nl80211_set_beacon(const char *ifname, void *priv,
u8 cmd = NL80211_CMD_NEW_BEACON;
int ret;
int beacon_set;
- int ifindex = if_nametoindex(ifname);
+ int ifindex = if_nametoindex(bss->ifname);
beacon_set = bss->beacon_set;