u8 algs[num_algs];
int i, pos;
algs[0] = algs[1] = algs[2] = 0xff;
- if (wpa_s->mlme.auth_algs & IEEE80211_AUTH_ALG_OPEN)
+ if (wpa_s->mlme.auth_algs & WPA_AUTH_ALG_OPEN)
algs[0] = WLAN_AUTH_OPEN;
- if (wpa_s->mlme.auth_algs &
- IEEE80211_AUTH_ALG_SHARED_KEY)
+ if (wpa_s->mlme.auth_algs & WPA_AUTH_ALG_SHARED)
algs[1] = WLAN_AUTH_SHARED_KEY;
- if (wpa_s->mlme.auth_algs & IEEE80211_AUTH_ALG_LEAP)
+ if (wpa_s->mlme.auth_algs & WPA_AUTH_ALG_LEAP)
algs[2] = WLAN_AUTH_LEAP;
if (wpa_s->mlme.auth_alg == WLAN_AUTH_OPEN)
pos = 0;
}
-static int ieee80211_ft_assoc_resp(struct wpa_supplicant *wpa_s,
- struct ieee802_11_elems *elems)
-{
-#ifdef CONFIG_IEEE80211R
- const u8 *mobility_domain = NULL;
- const u8 *r0kh_id = NULL;
- size_t r0kh_id_len = 0;
- const u8 *r1kh_id = NULL;
- struct rsn_ftie *hdr;
- const u8 *pos, *end;
-
- if (elems->mdie && elems->mdie_len >= MOBILITY_DOMAIN_ID_LEN)
- mobility_domain = elems->mdie;
- if (elems->ftie && elems->ftie_len >= sizeof(struct rsn_ftie)) {
- end = elems->ftie + elems->ftie_len;
- hdr = (struct rsn_ftie *) elems->ftie;
- pos = (const u8 *) (hdr + 1);
- while (pos + 1 < end) {
- if (pos + 2 + pos[1] > end)
- break;
- if (pos[0] == FTIE_SUBELEM_R1KH_ID &&
- pos[1] == FT_R1KH_ID_LEN)
- r1kh_id = pos + 2;
- else if (pos[0] == FTIE_SUBELEM_R0KH_ID &&
- pos[1] >= 1 && pos[1] <= FT_R0KH_ID_MAX_LEN) {
- r0kh_id = pos + 2;
- r0kh_id_len = pos[1];
- }
- pos += 2 + pos[1];
- }
- }
- return wpa_sm_set_ft_params(wpa_s->wpa, mobility_domain, r0kh_id,
- r0kh_id_len, r1kh_id);
-#else /* CONFIG_IEEE80211R */
- return 0;
-#endif /* CONFIG_IEEE80211R */
-}
-
-
static void ieee80211_build_tspec(struct wpabuf *buf)
{
struct wmm_tspec_element *tspec;
"Resp failed");
return;
}
- } else if (ieee80211_ft_assoc_resp(wpa_s, &elems) < 0)
+ } else if (wpa_sm_set_ft_params(wpa_s->wpa, pos,
+ len - (pos - (u8 *) mgmt)) < 0)
return;
wpa_printf(MSG_DEBUG, "MLME: associated");
case WLAN_ACTION_WMM:
ieee80211_rx_mgmt_wmm_action(wpa_s, mgmt, len, rx_status);
break;
+ case WLAN_ACTION_PUBLIC:
+ if (wpa_s->mlme.public_action_cb) {
+ wpa_s->mlme.public_action_cb(
+ wpa_s->mlme.public_action_cb_ctx,
+ (u8 *) mgmt, len, rx_status->freq);
+ return;
+ }
+ break;
default:
wpa_printf(MSG_DEBUG, "MLME: unknown Action Category %d",
mgmt->u.action.category);
os_memset(¶ms, 0, sizeof(params));
params.ssids[0].ssid = wpa_s->mlme.ssid;
params.ssids[0].ssid_len = wpa_s->mlme.ssid_len;
- params.num_ssids = wpa_s->mlme.ssid ? 1 : 0;
+ params.num_ssids = wpa_s->mlme.ssid_len ? 1 : 0;
ieee80211_sta_req_scan(wpa_s, ¶ms);
}
wpa_s->mlme.wmm_last_param_set = -1; /* allow any WMM update */
- if (wpa_s->mlme.auth_algs & IEEE80211_AUTH_ALG_OPEN)
+ if (wpa_s->mlme.auth_algs & WPA_AUTH_ALG_OPEN)
wpa_s->mlme.auth_alg = WLAN_AUTH_OPEN;
- else if (wpa_s->mlme.auth_algs & IEEE80211_AUTH_ALG_SHARED_KEY)
+ else if (wpa_s->mlme.auth_algs & WPA_AUTH_ALG_SHARED)
wpa_s->mlme.auth_alg = WLAN_AUTH_SHARED_KEY;
- else if (wpa_s->mlme.auth_algs & IEEE80211_AUTH_ALG_LEAP)
+ else if (wpa_s->mlme.auth_algs & WPA_AUTH_ALG_LEAP)
wpa_s->mlme.auth_alg = WLAN_AUTH_LEAP;
else
wpa_s->mlme.auth_alg = WLAN_AUTH_OPEN;