aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-03-07 09:42:41 (GMT)
committerJouni Malinen <j@w1.fi>2010-03-07 09:42:41 (GMT)
commit62847751e4d7e478198424767944ce79a464fecd (patch)
tree52134eb4c09e0caa37e3ff8f130a17f11af7e562 /src
parent8709de1ae8e48c53f9530cd4f84a2b751d9d5081 (diff)
downloadhostap-62847751e4d7e478198424767944ce79a464fecd.zip
hostap-62847751e4d7e478198424767944ce79a464fecd.tar.gz
hostap-62847751e4d7e478198424767944ce79a464fecd.tar.bz2
Remove unnecessary ifname parameter from sta_add() driver op
Diffstat (limited to 'src')
-rw-r--r--src/ap/ap_drv_ops.c4
-rw-r--r--src/ap/hostapd.h2
-rw-r--r--src/ap/ieee802_11.c6
-rw-r--r--src/drivers/driver.h4
-rw-r--r--src/drivers/driver_hostap.c3
-rw-r--r--src/drivers/driver_nl80211.c4
-rw-r--r--src/drivers/driver_test.c4
7 files changed, 12 insertions, 15 deletions
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
index b392ebd..2261cdf 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
@@ -299,7 +299,7 @@ static int hostapd_sta_disassoc(struct hostapd_data *hapd, const u8 *addr,
}
-static int hostapd_sta_add(const char *ifname, struct hostapd_data *hapd,
+static int hostapd_sta_add(struct hostapd_data *hapd,
const u8 *addr, u16 aid, u16 capability,
const u8 *supp_rates, size_t supp_rates_len,
u16 listen_interval,
@@ -320,7 +320,7 @@ static int hostapd_sta_add(const char *ifname, struct hostapd_data *hapd,
params.supp_rates_len = supp_rates_len;
params.listen_interval = listen_interval;
params.ht_capabilities = ht_capab;
- return hapd->driver->sta_add(ifname, hapd->drv_priv, &params);
+ return hapd->driver->sta_add(hapd->drv_priv, &params);
}
diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h
index 13b6722..61956f8 100644
--- a/src/ap/hostapd.h
+++ b/src/ap/hostapd.h
@@ -89,7 +89,7 @@ struct hostapd_driver_ops {
int reason);
int (*sta_disassoc)(struct hostapd_data *hapd, const u8 *addr,
int reason);
- int (*sta_add)(const char *ifname, struct hostapd_data *hapd,
+ int (*sta_add)(struct hostapd_data *hapd,
const u8 *addr, u16 aid, u16 capability,
const u8 *supp_rates, size_t supp_rates_len,
u16 listen_interval,
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 80815ac..b6ac50b 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -1550,9 +1550,9 @@ static void handle_assoc_cb(struct hostapd_data *hapd,
hostapd_get_ht_capab(hapd, sta->ht_capabilities, &ht_cap);
#endif /* CONFIG_IEEE80211N */
- if (hapd->drv.sta_add(hapd->conf->iface, hapd, sta->addr, sta->aid,
- sta->capability, sta->supported_rates,
- sta->supported_rates_len, sta->listen_interval,
+ if (hapd->drv.sta_add(hapd, sta->addr, sta->aid, sta->capability,
+ sta->supported_rates, sta->supported_rates_len,
+ sta->listen_interval,
sta->flags & WLAN_STA_HT ? &ht_cap : NULL)) {
hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
HOSTAPD_LEVEL_NOTICE,
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index d3b8e85..c146bf0 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -1359,7 +1359,6 @@ struct wpa_driver_ops {
/**
* sta_add - Add a station entry
- * @ifname: Interface (master or virtual)
* @priv: Private driver interface data
* @params: Station parameters
* Returns: 0 on success, -1 on failure
@@ -1368,8 +1367,7 @@ struct wpa_driver_ops {
* station has completed association. This is only used if the driver
* does not take care of association processing.
*/
- int (*sta_add)(const char *ifname, void *priv,
- struct hostapd_sta_add_params *params);
+ int (*sta_add)(void *priv, struct hostapd_sta_add_params *params);
/**
* get_inact_sec - Get station inactivity duration (AP only)
diff --git a/src/drivers/driver_hostap.c b/src/drivers/driver_hostap.c
index a0cd132..476cba5 100644
--- a/src/drivers/driver_hostap.c
+++ b/src/drivers/driver_hostap.c
@@ -624,8 +624,7 @@ static int hostap_read_sta_data(void *priv,
}
-static int hostap_sta_add(const char *ifname, void *priv,
- struct hostapd_sta_add_params *params)
+static int hostap_sta_add(void *priv, struct hostapd_sta_add_params *params)
{
struct hostap_driver_data *drv = priv;
struct prism2_hostapd_param param;
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 2841ffc..e566703 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -2771,7 +2771,7 @@ nla_put_failure:
}
-static int wpa_driver_nl80211_sta_add(const char *ifname, void *priv,
+static int wpa_driver_nl80211_sta_add(void *priv,
struct hostapd_sta_add_params *params)
{
struct i802_bss *bss = priv;
@@ -2786,7 +2786,7 @@ static int wpa_driver_nl80211_sta_add(const char *ifname, void *priv,
genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0,
0, NL80211_CMD_NEW_STATION, 0);
- NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, if_nametoindex(ifname));
+ NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, if_nametoindex(bss->ifname));
NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, params->addr);
NLA_PUT_U16(msg, NL80211_ATTR_STA_AID, params->aid);
NLA_PUT(msg, NL80211_ATTR_STA_SUPPORTED_RATES, params->supp_rates_len,
diff --git a/src/drivers/driver_test.c b/src/drivers/driver_test.c
index e6b1f1f..9cd36ba 100644
--- a/src/drivers/driver_test.c
+++ b/src/drivers/driver_test.c
@@ -1080,7 +1080,7 @@ static int test_driver_set_sta_vlan(void *priv, const u8 *addr,
}
-static int test_driver_sta_add(const char *ifname, void *priv,
+static int test_driver_sta_add(void *priv,
struct hostapd_sta_add_params *params)
{
struct test_driver_bss *bss = priv;
@@ -1089,7 +1089,7 @@ static int test_driver_sta_add(const char *ifname, void *priv,
wpa_printf(MSG_DEBUG, "%s(ifname=%s addr=" MACSTR " aid=%d "
"capability=0x%x listen_interval=%d)",
- __func__, ifname, MAC2STR(params->addr), params->aid,
+ __func__, bss->ifname, MAC2STR(params->addr), params->aid,
params->capability, params->listen_interval);
wpa_hexdump(MSG_DEBUG, "test_driver_sta_add - supp_rates",
params->supp_rates, params->supp_rates_len);