Remove unnecessary ifname parameter to sta_set_flags() driver op
This commit is contained in:
parent
62847751e4
commit
3234cba40e
8 changed files with 11 additions and 14 deletions
|
@ -487,7 +487,7 @@ int hostapd_sta_set_flags(struct hostapd_data *hapd, u8 *addr,
|
||||||
{
|
{
|
||||||
if (hapd->driver == NULL || hapd->driver->sta_set_flags == NULL)
|
if (hapd->driver == NULL || hapd->driver->sta_set_flags == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
return hapd->driver->sta_set_flags(hapd->conf->iface, hapd->drv_priv, addr, total_flags,
|
return hapd->driver->sta_set_flags(hapd->drv_priv, addr, total_flags,
|
||||||
flags_or, flags_and);
|
flags_or, flags_and);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1411,7 +1411,6 @@ struct wpa_driver_ops {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sta_set_flags - Set station flags (AP only)
|
* sta_set_flags - Set station flags (AP only)
|
||||||
* @ifname: Interface name (for multi-SSID/VLAN support)
|
|
||||||
* @priv: Private driver interface data
|
* @priv: Private driver interface data
|
||||||
* @addr: Station address
|
* @addr: Station address
|
||||||
* @total_flags: Bitmap of all WPA_STA_* flags currently set
|
* @total_flags: Bitmap of all WPA_STA_* flags currently set
|
||||||
|
@ -1419,7 +1418,7 @@ struct wpa_driver_ops {
|
||||||
* @flags_and: Bitmap of WPA_STA_* flags to us as a mask
|
* @flags_and: Bitmap of WPA_STA_* flags to us as a mask
|
||||||
* Returns: 0 on success, -1 on failure
|
* Returns: 0 on success, -1 on failure
|
||||||
*/
|
*/
|
||||||
int (*sta_set_flags)(const char *ifname, void *priv, const u8 *addr,
|
int (*sta_set_flags)(void *priv, const u8 *addr,
|
||||||
int total_flags, int flags_or, int flags_and);
|
int total_flags, int flags_or, int flags_and);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -339,7 +339,7 @@ madwifi_set_sta_authorized(void *priv, const u8 *addr, int authorized)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
madwifi_sta_set_flags(const char *ifname, void *priv, const u8 *addr,
|
madwifi_sta_set_flags(void *priv, const u8 *addr,
|
||||||
int total_flags, int flags_or, int flags_and)
|
int total_flags, int flags_or, int flags_and)
|
||||||
{
|
{
|
||||||
/* For now, only support setting Authorized flag */
|
/* For now, only support setting Authorized flag */
|
||||||
|
|
|
@ -468,7 +468,7 @@ bsd_set_ieee8021x(void *priv, struct wpa_bss_params *params)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
bsd_set_sta_authorized(const char *ifname, void *priv, const u8 *addr,
|
bsd_set_sta_authorized(void *priv, const u8 *addr,
|
||||||
int total_flags, int flags_or, int flags_and)
|
int total_flags, int flags_or, int flags_and)
|
||||||
{
|
{
|
||||||
int authorized = -1;
|
int authorized = -1;
|
||||||
|
|
|
@ -333,7 +333,7 @@ static int hostap_send_eapol(void *priv, const u8 *addr, const u8 *data,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int hostap_sta_set_flags(const char *ifname, void *priv, const u8 *addr,
|
static int hostap_sta_set_flags(void *priv, const u8 *addr,
|
||||||
int total_flags, int flags_or, int flags_and)
|
int total_flags, int flags_or, int flags_and)
|
||||||
{
|
{
|
||||||
struct hostap_driver_data *drv = priv;
|
struct hostap_driver_data *drv = priv;
|
||||||
|
@ -662,8 +662,7 @@ static int hostap_sta_remove(void *priv, const u8 *addr)
|
||||||
struct hostap_driver_data *drv = priv;
|
struct hostap_driver_data *drv = priv;
|
||||||
struct prism2_hostapd_param param;
|
struct prism2_hostapd_param param;
|
||||||
|
|
||||||
hostap_sta_set_flags(drv->iface, drv, addr, 0, 0,
|
hostap_sta_set_flags(drv, addr, 0, 0, ~WPA_STA_AUTHORIZED);
|
||||||
~WPA_STA_AUTHORIZED);
|
|
||||||
|
|
||||||
memset(¶m, 0, sizeof(param));
|
memset(¶m, 0, sizeof(param));
|
||||||
param.cmd = PRISM2_HOSTAPD_REMOVE_STA;
|
param.cmd = PRISM2_HOSTAPD_REMOVE_STA;
|
||||||
|
|
|
@ -384,7 +384,7 @@ madwifi_set_sta_authorized(void *priv, const u8 *addr, int authorized)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
madwifi_sta_set_flags(const char *ifname, void *priv, const u8 *addr,
|
madwifi_sta_set_flags(void *priv, const u8 *addr,
|
||||||
int total_flags, int flags_or, int flags_and)
|
int total_flags, int flags_or, int flags_and)
|
||||||
{
|
{
|
||||||
/* For now, only support setting Authorized flag */
|
/* For now, only support setting Authorized flag */
|
||||||
|
|
|
@ -3404,8 +3404,8 @@ static u32 sta_flags_nl80211(int flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int wpa_driver_nl80211_sta_set_flags(const char *ifname, void *priv,
|
static int wpa_driver_nl80211_sta_set_flags(void *priv, const u8 *addr,
|
||||||
const u8 *addr, int total_flags,
|
int total_flags,
|
||||||
int flags_or, int flags_and)
|
int flags_or, int flags_and)
|
||||||
{
|
{
|
||||||
struct i802_bss *bss = priv;
|
struct i802_bss *bss = priv;
|
||||||
|
@ -3427,7 +3427,7 @@ static int wpa_driver_nl80211_sta_set_flags(const char *ifname, void *priv,
|
||||||
0, NL80211_CMD_SET_STATION, 0);
|
0, NL80211_CMD_SET_STATION, 0);
|
||||||
|
|
||||||
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX,
|
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX,
|
||||||
if_nametoindex(ifname));
|
if_nametoindex(bss->ifname));
|
||||||
NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, addr);
|
NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, addr);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -365,8 +365,7 @@ static inline int wpa_drv_sta_set_flags(struct wpa_supplicant *wpa_s,
|
||||||
int flags_or, int flags_and)
|
int flags_or, int flags_and)
|
||||||
{
|
{
|
||||||
if (wpa_s->driver->sta_set_flags)
|
if (wpa_s->driver->sta_set_flags)
|
||||||
return wpa_s->driver->sta_set_flags(wpa_s->ifname,
|
return wpa_s->driver->sta_set_flags(wpa_s->drv_priv, addr,
|
||||||
wpa_s->drv_priv, addr,
|
|
||||||
total_flags, flags_or,
|
total_flags, flags_or,
|
||||||
flags_and);
|
flags_and);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in a new issue