Remove unused variables

This commit is contained in:
Jouni Malinen 2011-10-23 12:42:55 +03:00
parent 80267c9cec
commit 46eeedac61
4 changed files with 21 additions and 17 deletions

View file

@ -1230,7 +1230,10 @@ static int robust_action_frame(u8 category)
static void handle_action(struct hostapd_data *hapd,
const struct ieee80211_mgmt *mgmt, size_t len)
{
#if defined(CONFIG_IEEE80211W) || defined(CONFIG_IEEE80211R)
struct sta_info *sta;
sta = ap_get_sta(hapd, mgmt->sa);
#endif /* CONFIG_IEEE80211W || CONFIG_IEEE80211R */
if (len < IEEE80211_HDRLEN + 1) {
hostapd_logger(hapd, mgmt->sa, HOSTAPD_MODULE_IEEE80211,
@ -1240,7 +1243,6 @@ static void handle_action(struct hostapd_data *hapd,
return;
}
sta = ap_get_sta(hapd, mgmt->sa);
#ifdef CONFIG_IEEE80211W
if (sta && (sta->flags & WLAN_STA_MFP) &&
!(mgmt->frame_control & host_to_le16(WLAN_FC_ISWEP) &&

View file

@ -2764,7 +2764,6 @@ static int wpa_driver_test_send_action(void *priv, unsigned int freq,
static void test_send_action_cb(void *eloop_ctx, void *timeout_ctx)
{
struct wpa_driver_test_data *drv = eloop_ctx;
int res;
if (drv->pending_action_tx == NULL)
return;
@ -2777,7 +2776,7 @@ static void test_send_action_cb(void *eloop_ctx, void *timeout_ctx)
}
wpa_printf(MSG_DEBUG, "P2P: Sending pending Action frame to "
MACSTR, MAC2STR(drv->pending_action_dst));
res = wpa_driver_test_send_action(drv, drv->pending_action_freq, 0,
wpa_driver_test_send_action(drv, drv->pending_action_freq, 0,
drv->pending_action_dst,
drv->pending_action_src,
drv->pending_action_bssid,

View file

@ -778,12 +778,11 @@ static int p2p_run_after_scan(struct p2p_data *p2p)
enum p2p_after_scan op;
if (p2p->after_scan_tx) {
int ret;
/* TODO: schedule p2p_run_after_scan to be called from TX
* status callback(?) */
wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG, "P2P: Send pending "
"Action frame at p2p_scan completion");
ret = p2p->cfg->send_action(p2p->cfg->cb_ctx,
p2p->cfg->send_action(p2p->cfg->cb_ctx,
p2p->after_scan_tx->freq,
p2p->after_scan_tx->dst,
p2p->after_scan_tx->src,

View file

@ -557,7 +557,9 @@ int wps_parse_msg(const struct wpabuf *msg, struct wps_parse_attr *attr)
{
const u8 *pos, *end;
u16 type, len;
#ifdef WPS_WORKAROUNDS
u16 prev_type = 0;
#endif /* WPS_WORKAROUNDS */
os_memset(attr, 0, sizeof(*attr));
pos = wpabuf_head(msg);
@ -622,7 +624,9 @@ int wps_parse_msg(const struct wpabuf *msg, struct wps_parse_attr *attr)
if (wps_set_attr(attr, type, pos, len) < 0)
return -1;
#ifdef WPS_WORKAROUNDS
prev_type = type;
#endif /* WPS_WORKAROUNDS */
pos += len;
}