aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2012-11-05 15:05:37 (GMT)
committerJouni Malinen <j@w1.fi>2012-11-05 15:05:37 (GMT)
commit1e8a6e7553ad23fbd41b8b10671aef306c12d8f9 (patch)
tree291d48ef41a4add03af5edb5f26b19bfc1005e16
parent3da372fae8b25a4aec12245b05680646f3bd0ccd (diff)
downloadhostap-1e8a6e7553ad23fbd41b8b10671aef306c12d8f9.zip
hostap-1e8a6e7553ad23fbd41b8b10671aef306c12d8f9.tar.gz
hostap-1e8a6e7553ad23fbd41b8b10671aef306c12d8f9.tar.bz2
Remove unused wpa_supplicant_disassociate()
This function is now unused after the last couple of commits that removed the last uses, so remove this to keep code simpler since all places that disassociate, can use deauthentication instead. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
-rw-r--r--src/rsn_supp/wpa.h1
-rw-r--r--src/rsn_supp/wpa_i.h6
-rw-r--r--wpa_supplicant/preauth_test.c7
-rw-r--r--wpa_supplicant/wpa_supplicant.c51
-rw-r--r--wpa_supplicant/wpa_supplicant_i.h2
-rw-r--r--wpa_supplicant/wpas_glue.c9
6 files changed, 0 insertions, 76 deletions
diff --git a/src/rsn_supp/wpa.h b/src/rsn_supp/wpa.h
index 1077b5a..8afdf39 100644
--- a/src/rsn_supp/wpa.h
+++ b/src/rsn_supp/wpa.h
@@ -24,7 +24,6 @@ struct wpa_sm_ctx {
void (*set_state)(void *ctx, enum wpa_states state);
enum wpa_states (*get_state)(void *ctx);
void (*deauthenticate)(void * ctx, int reason_code);
- void (*disassociate)(void *ctx, int reason_code);
int (*set_key)(void *ctx, enum wpa_alg alg,
const u8 *addr, int key_idx, int set_tx,
const u8 *seq, size_t seq_len,
diff --git a/src/rsn_supp/wpa_i.h b/src/rsn_supp/wpa_i.h
index c30d09e..9f9e641 100644
--- a/src/rsn_supp/wpa_i.h
+++ b/src/rsn_supp/wpa_i.h
@@ -143,12 +143,6 @@ static inline void wpa_sm_deauthenticate(struct wpa_sm *sm, int reason_code)
sm->ctx->deauthenticate(sm->ctx->ctx, reason_code);
}
-static inline void wpa_sm_disassociate(struct wpa_sm *sm, int reason_code)
-{
- WPA_ASSERT(sm->ctx->disassociate);
- sm->ctx->disassociate(sm->ctx->ctx, reason_code);
-}
-
static inline int wpa_sm_set_key(struct wpa_sm *sm, enum wpa_alg alg,
const u8 *addr, int key_idx, int set_tx,
const u8 *seq, size_t seq_len,
diff --git a/wpa_supplicant/preauth_test.c b/wpa_supplicant/preauth_test.c
index 62b7538..3503e65 100644
--- a/wpa_supplicant/preauth_test.c
+++ b/wpa_supplicant/preauth_test.c
@@ -38,12 +38,6 @@ struct preauth_test_data {
};
-static void _wpa_supplicant_disassociate(void *wpa_s, int reason_code)
-{
- wpa_supplicant_disassociate(wpa_s, reason_code);
-}
-
-
static void _wpa_supplicant_deauthenticate(void *wpa_s, int reason_code)
{
wpa_supplicant_deauthenticate(wpa_s, reason_code);
@@ -238,7 +232,6 @@ static void wpa_init_conf(struct wpa_supplicant *wpa_s, const char *ifname)
ctx->set_state = _wpa_supplicant_set_state;
ctx->get_state = _wpa_supplicant_get_state;
ctx->deauthenticate = _wpa_supplicant_deauthenticate;
- ctx->disassociate = _wpa_supplicant_disassociate;
ctx->set_key = wpa_supplicant_set_key;
ctx->get_network_ctx = wpa_supplicant_get_network_ctx;
ctx->get_bssid = wpa_supplicant_get_bssid;
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 82edae2..ee283b7 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -1682,57 +1682,6 @@ static void wpa_supplicant_clear_connection(struct wpa_supplicant *wpa_s,
/**
- * wpa_supplicant_disassociate - Disassociate the current connection
- * @wpa_s: Pointer to wpa_supplicant data
- * @reason_code: IEEE 802.11 reason code for the disassociate frame
- *
- * This function is used to request %wpa_supplicant to disassociate with the
- * current AP.
- */
-void wpa_supplicant_disassociate(struct wpa_supplicant *wpa_s,
- int reason_code)
-{
- u8 *addr = NULL;
- union wpa_event_data event;
- int zero_addr = 0;
-
- wpa_dbg(wpa_s, MSG_DEBUG, "Request to disassociate - bssid=" MACSTR
- " pending_bssid=" MACSTR " reason=%d state=%s",
- MAC2STR(wpa_s->bssid), MAC2STR(wpa_s->pending_bssid),
- reason_code, wpa_supplicant_state_txt(wpa_s->wpa_state));
-
- if (!is_zero_ether_addr(wpa_s->bssid))
- addr = wpa_s->bssid;
- else if (!is_zero_ether_addr(wpa_s->pending_bssid) &&
- (wpa_s->wpa_state == WPA_AUTHENTICATING ||
- wpa_s->wpa_state == WPA_ASSOCIATING))
- addr = wpa_s->pending_bssid;
- else if (wpa_s->wpa_state == WPA_ASSOCIATING) {
- /*
- * When using driver-based BSS selection, we may not know the
- * BSSID with which we are currently trying to associate. We
- * need to notify the driver of this disconnection even in such
- * a case, so use the all zeros address here.
- */
- addr = wpa_s->bssid;
- zero_addr = 1;
- }
-
- if (addr) {
- wpa_drv_disassociate(wpa_s, addr, reason_code);
- os_memset(&event, 0, sizeof(event));
- event.disassoc_info.reason_code = (u16) reason_code;
- event.disassoc_info.locally_generated = 1;
- wpa_supplicant_event(wpa_s, EVENT_DISASSOC, &event);
- if (zero_addr)
- addr = NULL;
- }
-
- wpa_supplicant_clear_connection(wpa_s, addr);
-}
-
-
-/**
* wpa_supplicant_deauthenticate - Deauthenticate the current connection
* @wpa_s: Pointer to wpa_supplicant data
* @reason_code: IEEE 802.11 reason code for the deauthenticate frame
diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h
index 3761fbf..5e77028 100644
--- a/wpa_supplicant/wpa_supplicant_i.h
+++ b/wpa_supplicant/wpa_supplicant_i.h
@@ -660,8 +660,6 @@ const char * wpa_supplicant_get_eap_mode(struct wpa_supplicant *wpa_s);
void wpa_supplicant_cancel_auth_timeout(struct wpa_supplicant *wpa_s);
void wpa_supplicant_deauthenticate(struct wpa_supplicant *wpa_s,
int reason_code);
-void wpa_supplicant_disassociate(struct wpa_supplicant *wpa_s,
- int reason_code);
void wpa_supplicant_enable_network(struct wpa_supplicant *wpa_s,
struct wpa_ssid *ssid);
diff --git a/wpa_supplicant/wpas_glue.c b/wpa_supplicant/wpas_glue.c
index 6aa5205..aec639a 100644
--- a/wpa_supplicant/wpas_glue.c
+++ b/wpa_supplicant/wpas_glue.c
@@ -406,14 +406,6 @@ static enum wpa_states _wpa_supplicant_get_state(void *wpa_s)
}
-static void _wpa_supplicant_disassociate(void *wpa_s, int reason_code)
-{
- wpa_supplicant_disassociate(wpa_s, reason_code);
- /* Schedule a scan to make sure we continue looking for networks */
- wpa_supplicant_req_scan(wpa_s, 5, 0);
-}
-
-
static void _wpa_supplicant_deauthenticate(void *wpa_s, int reason_code)
{
wpa_supplicant_deauthenticate(wpa_s, reason_code);
@@ -839,7 +831,6 @@ int wpa_supplicant_init_wpa(struct wpa_supplicant *wpa_s)
ctx->set_state = _wpa_supplicant_set_state;
ctx->get_state = _wpa_supplicant_get_state;
ctx->deauthenticate = _wpa_supplicant_deauthenticate;
- ctx->disassociate = _wpa_supplicant_disassociate;
ctx->set_key = wpa_supplicant_set_key;
ctx->get_network_ctx = wpa_supplicant_get_network_ctx;
ctx->get_bssid = wpa_supplicant_get_bssid;