Remove unused disassociate() driver_ops

Commits 07783eaaa0 and
3da372fae8 removed the only users of the
disassociate() driver operation, so these driver wrapper functions can
also be removed now.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2012-11-15 00:06:12 +02:00 committed by Jouni Malinen
parent d2901915e7
commit 1ce0aa044c
8 changed files with 0 additions and 93 deletions

View file

@ -1200,17 +1200,6 @@ struct wpa_driver_ops {
*/ */
int (*deauthenticate)(void *priv, const u8 *addr, int reason_code); int (*deauthenticate)(void *priv, const u8 *addr, int reason_code);
/**
* disassociate - Request driver to disassociate
* @priv: private driver interface data
* @addr: peer address (BSSID of the AP)
* @reason_code: 16-bit reason code to be sent in the disassociation
* frame
*
* Returns: 0 on success, -1 on failure
*/
int (*disassociate)(void *priv, const u8 *addr, int reason_code);
/** /**
* associate - Request driver to associate * associate - Request driver to associate
* @priv: private driver interface data * @priv: private driver interface data

View file

@ -972,13 +972,6 @@ wpa_driver_bsd_deauthenticate(void *priv, const u8 *addr, int reason_code)
addr); addr);
} }
static int
wpa_driver_bsd_disassociate(void *priv, const u8 *addr, int reason_code)
{
return bsd_send_mlme_param(priv, IEEE80211_MLME_DISASSOC, reason_code,
addr);
}
static int static int
wpa_driver_bsd_set_auth_alg(void *priv, int auth_alg) wpa_driver_bsd_set_auth_alg(void *priv, int auth_alg)
{ {
@ -1564,7 +1557,6 @@ const struct wpa_driver_ops wpa_driver_bsd_ops = {
.scan2 = wpa_driver_bsd_scan, .scan2 = wpa_driver_bsd_scan,
.get_scan_results2 = wpa_driver_bsd_get_scan_results2, .get_scan_results2 = wpa_driver_bsd_get_scan_results2,
.deauthenticate = wpa_driver_bsd_deauthenticate, .deauthenticate = wpa_driver_bsd_deauthenticate,
.disassociate = wpa_driver_bsd_disassociate,
.associate = wpa_driver_bsd_associate, .associate = wpa_driver_bsd_associate,
.get_capa = wpa_driver_bsd_get_capa, .get_capa = wpa_driver_bsd_get_capa,
#endif /* HOSTAPD */ #endif /* HOSTAPD */

View file

@ -725,14 +725,6 @@ static int wpa_driver_ndis_deauthenticate(void *priv, const u8 *addr,
} }
static int wpa_driver_ndis_disassociate(void *priv, const u8 *addr,
int reason_code)
{
struct wpa_driver_ndis_data *drv = priv;
return wpa_driver_ndis_disconnect(drv);
}
static void wpa_driver_ndis_scan_timeout(void *eloop_ctx, void *timeout_ctx) static void wpa_driver_ndis_scan_timeout(void *eloop_ctx, void *timeout_ctx)
{ {
wpa_printf(MSG_DEBUG, "Scan timeout - try to get results"); wpa_printf(MSG_DEBUG, "Scan timeout - try to get results");
@ -3223,7 +3215,6 @@ void driver_ndis_init_ops(void)
wpa_driver_ndis_ops.init = wpa_driver_ndis_init; wpa_driver_ndis_ops.init = wpa_driver_ndis_init;
wpa_driver_ndis_ops.deinit = wpa_driver_ndis_deinit; wpa_driver_ndis_ops.deinit = wpa_driver_ndis_deinit;
wpa_driver_ndis_ops.deauthenticate = wpa_driver_ndis_deauthenticate; wpa_driver_ndis_ops.deauthenticate = wpa_driver_ndis_deauthenticate;
wpa_driver_ndis_ops.disassociate = wpa_driver_ndis_disassociate;
wpa_driver_ndis_ops.associate = wpa_driver_ndis_associate; wpa_driver_ndis_ops.associate = wpa_driver_ndis_associate;
wpa_driver_ndis_ops.add_pmkid = wpa_driver_ndis_add_pmkid; wpa_driver_ndis_ops.add_pmkid = wpa_driver_ndis_add_pmkid;
wpa_driver_ndis_ops.remove_pmkid = wpa_driver_ndis_remove_pmkid; wpa_driver_ndis_ops.remove_pmkid = wpa_driver_ndis_remove_pmkid;

View file

@ -4547,20 +4547,6 @@ static int wpa_driver_nl80211_deauthenticate(void *priv, const u8 *addr,
} }
static int wpa_driver_nl80211_disassociate(void *priv, const u8 *addr,
int reason_code)
{
struct i802_bss *bss = priv;
struct wpa_driver_nl80211_data *drv = bss->drv;
if (!(drv->capa.flags & WPA_DRIVER_FLAGS_SME))
return wpa_driver_nl80211_disconnect(drv, reason_code);
wpa_printf(MSG_DEBUG, "%s", __func__);
drv->associated = 0;
return wpa_driver_nl80211_mlme(drv, addr, NL80211_CMD_DISASSOCIATE,
reason_code, 0);
}
static void nl80211_copy_auth_params(struct wpa_driver_nl80211_data *drv, static void nl80211_copy_auth_params(struct wpa_driver_nl80211_data *drv,
struct wpa_driver_auth_params *params) struct wpa_driver_auth_params *params)
{ {
@ -9177,7 +9163,6 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
.stop_sched_scan = wpa_driver_nl80211_stop_sched_scan, .stop_sched_scan = wpa_driver_nl80211_stop_sched_scan,
.get_scan_results2 = wpa_driver_nl80211_get_scan_results, .get_scan_results2 = wpa_driver_nl80211_get_scan_results,
.deauthenticate = wpa_driver_nl80211_deauthenticate, .deauthenticate = wpa_driver_nl80211_deauthenticate,
.disassociate = wpa_driver_nl80211_disassociate,
.authenticate = wpa_driver_nl80211_authenticate, .authenticate = wpa_driver_nl80211_authenticate,
.associate = wpa_driver_nl80211_associate, .associate = wpa_driver_nl80211_associate,
.global_init = nl80211_global_init, .global_init = nl80211_global_init,

View file

@ -304,17 +304,6 @@ static int wpa_driver_privsep_deauthenticate(void *priv, const u8 *addr,
} }
static int wpa_driver_privsep_disassociate(void *priv, const u8 *addr,
int reason_code)
{
//struct wpa_driver_privsep_data *drv = priv;
wpa_printf(MSG_DEBUG, "%s addr=" MACSTR " reason_code=%d",
__func__, MAC2STR(addr), reason_code);
wpa_printf(MSG_DEBUG, "%s - TODO", __func__);
return 0;
}
static void wpa_driver_privsep_event_assoc(void *ctx, static void wpa_driver_privsep_event_assoc(void *ctx,
enum wpa_event_type event, enum wpa_event_type event,
u8 *buf, size_t len) u8 *buf, size_t len)
@ -736,7 +725,6 @@ struct wpa_driver_ops wpa_driver_privsep_ops = {
.set_param = wpa_driver_privsep_set_param, .set_param = wpa_driver_privsep_set_param,
.scan2 = wpa_driver_privsep_scan, .scan2 = wpa_driver_privsep_scan,
.deauthenticate = wpa_driver_privsep_deauthenticate, .deauthenticate = wpa_driver_privsep_deauthenticate,
.disassociate = wpa_driver_privsep_disassociate,
.associate = wpa_driver_privsep_associate, .associate = wpa_driver_privsep_associate,
.get_capa = wpa_driver_privsep_get_capa, .get_capa = wpa_driver_privsep_get_capa,
.get_mac_addr = wpa_driver_privsep_get_mac_addr, .get_mac_addr = wpa_driver_privsep_get_mac_addr,

View file

@ -1714,20 +1714,6 @@ static int wpa_driver_test_deauthenticate(void *priv, const u8 *addr,
} }
static int wpa_driver_test_disassociate(void *priv, const u8 *addr,
int reason_code)
{
struct test_driver_bss *dbss = priv;
struct wpa_driver_test_data *drv = dbss->drv;
wpa_printf(MSG_DEBUG, "%s addr=" MACSTR " reason_code=%d",
__func__, MAC2STR(addr), reason_code);
os_memset(dbss->bssid, 0, ETH_ALEN);
drv->associated = 0;
wpa_supplicant_event(drv->ctx, EVENT_DISASSOC, NULL);
return wpa_driver_test_send_disassoc(drv);
}
static const u8 * wpa_scan_get_ie(const struct wpa_scan_res *res, u8 ie) static const u8 * wpa_scan_get_ie(const struct wpa_scan_res *res, u8 ie)
{ {
const u8 *end, *pos; const u8 *end, *pos;
@ -3299,7 +3285,6 @@ const struct wpa_driver_ops wpa_driver_test_ops = {
.deinit = wpa_driver_test_deinit, .deinit = wpa_driver_test_deinit,
.set_param = wpa_driver_test_set_param, .set_param = wpa_driver_test_set_param,
.deauthenticate = wpa_driver_test_deauthenticate, .deauthenticate = wpa_driver_test_deauthenticate,
.disassociate = wpa_driver_test_disassociate,
.associate = wpa_driver_test_associate, .associate = wpa_driver_test_associate,
.get_capa = wpa_driver_test_get_capa, .get_capa = wpa_driver_test_get_capa,
.get_mac_addr = wpa_driver_test_get_mac_addr, .get_mac_addr = wpa_driver_test_get_mac_addr,

View file

@ -1938,18 +1938,6 @@ static int wpa_driver_wext_deauthenticate(void *priv, const u8 *addr,
} }
static int wpa_driver_wext_disassociate(void *priv, const u8 *addr,
int reason_code)
{
struct wpa_driver_wext_data *drv = priv;
int ret;
wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
ret = wpa_driver_wext_mlme(drv, addr, IW_MLME_DISASSOC, reason_code);
wpa_driver_wext_disconnect(drv);
return ret;
}
static int wpa_driver_wext_set_gen_ie(void *priv, const u8 *ie, static int wpa_driver_wext_set_gen_ie(void *priv, const u8 *ie,
size_t ie_len) size_t ie_len)
{ {
@ -2485,7 +2473,6 @@ const struct wpa_driver_ops wpa_driver_wext_ops = {
.scan2 = wpa_driver_wext_scan, .scan2 = wpa_driver_wext_scan,
.get_scan_results2 = wpa_driver_wext_get_scan_results, .get_scan_results2 = wpa_driver_wext_get_scan_results,
.deauthenticate = wpa_driver_wext_deauthenticate, .deauthenticate = wpa_driver_wext_deauthenticate,
.disassociate = wpa_driver_wext_disassociate,
.associate = wpa_driver_wext_associate, .associate = wpa_driver_wext_associate,
.init = wpa_driver_wext_init, .init = wpa_driver_wext_init,
.deinit = wpa_driver_wext_deinit, .deinit = wpa_driver_wext_deinit,

View file

@ -139,16 +139,6 @@ static inline int wpa_drv_deauthenticate(struct wpa_supplicant *wpa_s,
return -1; return -1;
} }
static inline int wpa_drv_disassociate(struct wpa_supplicant *wpa_s,
const u8 *addr, int reason_code)
{
if (wpa_s->driver->disassociate) {
return wpa_s->driver->disassociate(wpa_s->drv_priv, addr,
reason_code);
}
return -1;
}
static inline int wpa_drv_add_pmkid(struct wpa_supplicant *wpa_s, static inline int wpa_drv_add_pmkid(struct wpa_supplicant *wpa_s,
const u8 *bssid, const u8 *pmkid) const u8 *bssid, const u8 *pmkid)
{ {