Lines Matching refs:sm

179 static inline void wpa_sm_set_state(struct wpa_sm *sm, enum wpa_states state)
181 WPA_ASSERT(sm->ctx->set_state);
182 sm->ctx->set_state(sm->ctx->ctx, state);
185 static inline enum wpa_states wpa_sm_get_state(struct wpa_sm *sm)
187 WPA_ASSERT(sm->ctx->get_state);
188 return sm->ctx->get_state(sm->ctx->ctx);
191 static inline void wpa_sm_deauthenticate(struct wpa_sm *sm, u16 reason_code)
193 WPA_ASSERT(sm->ctx->deauthenticate);
194 sm->ctx->deauthenticate(sm->ctx->ctx, reason_code);
197 static inline int wpa_sm_set_key(struct wpa_sm *sm, enum wpa_alg alg,
202 WPA_ASSERT(sm->ctx->set_key);
203 return sm->ctx->set_key(sm->ctx->ctx, alg, addr, key_idx, set_tx,
207 static inline void * wpa_sm_get_network_ctx(struct wpa_sm *sm)
209 WPA_ASSERT(sm->ctx->get_network_ctx);
210 return sm->ctx->get_network_ctx(sm->ctx->ctx);
213 static inline int wpa_sm_get_bssid(struct wpa_sm *sm, u8 *bssid)
215 WPA_ASSERT(sm->ctx->get_bssid);
216 return sm->ctx->get_bssid(sm->ctx->ctx, bssid);
219 static inline int wpa_sm_ether_send(struct wpa_sm *sm, const u8 *dest,
222 WPA_ASSERT(sm->ctx->ether_send);
223 return sm->ctx->ether_send(sm->ctx->ctx, dest, proto, buf, len);
226 static inline int wpa_sm_get_beacon_ie(struct wpa_sm *sm)
228 WPA_ASSERT(sm->ctx->get_beacon_ie);
229 return sm->ctx->get_beacon_ie(sm->ctx->ctx);
232 static inline void wpa_sm_cancel_auth_timeout(struct wpa_sm *sm)
234 WPA_ASSERT(sm->ctx->cancel_auth_timeout);
235 sm->ctx->cancel_auth_timeout(sm->ctx->ctx);
238 static inline u8 * wpa_sm_alloc_eapol(struct wpa_sm *sm, u8 type,
242 WPA_ASSERT(sm->ctx->alloc_eapol);
243 return sm->ctx->alloc_eapol(sm->ctx->ctx, type, data, data_len,
247 static inline int wpa_sm_add_pmkid(struct wpa_sm *sm, void *network_ctx,
252 WPA_ASSERT(sm->ctx->add_pmkid);
253 return sm->ctx->add_pmkid(sm->ctx->ctx, network_ctx, bssid, pmkid,
257 static inline int wpa_sm_remove_pmkid(struct wpa_sm *sm, void *network_ctx,
261 WPA_ASSERT(sm->ctx->remove_pmkid);
262 return sm->ctx->remove_pmkid(sm->ctx->ctx, network_ctx, bssid, pmkid,
266 static inline int wpa_sm_mlme_setprotection(struct wpa_sm *sm, const u8 *addr,
269 WPA_ASSERT(sm->ctx->mlme_setprotection);
270 return sm->ctx->mlme_setprotection(sm->ctx->ctx, addr, protect_type,
274 static inline int wpa_sm_update_ft_ies(struct wpa_sm *sm, const u8 *md,
277 if (sm->ctx->update_ft_ies)
278 return sm->ctx->update_ft_ies(sm->ctx->ctx, md, ies, ies_len);
282 static inline int wpa_sm_send_ft_action(struct wpa_sm *sm, u8 action,
286 if (sm->ctx->send_ft_action)
287 return sm->ctx->send_ft_action(sm->ctx->ctx, action, target_ap,
292 static inline int wpa_sm_mark_authenticated(struct wpa_sm *sm,
295 if (sm->ctx->mark_authenticated)
296 return sm->ctx->mark_authenticated(sm->ctx->ctx, target_ap);
300 static inline void wpa_sm_set_rekey_offload(struct wpa_sm *sm)
302 if (!sm->ctx->set_rekey_offload)
304 sm->ctx->set_rekey_offload(sm->ctx->ctx, sm->ptk.kek, sm->ptk.kek_len,
305 sm->ptk.kck, sm->ptk.kck_len,
306 sm->rx_replay_counter);
310 static inline int wpa_sm_tdls_get_capa(struct wpa_sm *sm,
315 if (sm->ctx->tdls_get_capa)
316 return sm->ctx->tdls_get_capa(sm->ctx->ctx, tdls_supported,
321 static inline int wpa_sm_send_tdls_mgmt(struct wpa_sm *sm, const u8 *dst,
327 if (sm->ctx->send_tdls_mgmt)
328 return sm->ctx->send_tdls_mgmt(sm->ctx->ctx, dst, action_code,
335 static inline int wpa_sm_tdls_oper(struct wpa_sm *sm, int oper,
338 if (sm->ctx->tdls_oper)
339 return sm->ctx->tdls_oper(sm->ctx->ctx, oper, peer);
344 wpa_sm_tdls_peer_addset(struct wpa_sm *sm, const u8 *addr, int add,
354 if (sm->ctx->tdls_peer_addset)
355 return sm->ctx->tdls_peer_addset(sm->ctx->ctx, addr, add,
368 wpa_sm_tdls_enable_channel_switch(struct wpa_sm *sm, const u8 *addr,
372 if (sm->ctx->tdls_enable_channel_switch)
373 return sm->ctx->tdls_enable_channel_switch(sm->ctx->ctx, addr,
380 wpa_sm_tdls_disable_channel_switch(struct wpa_sm *sm, const u8 *addr)
382 if (sm->ctx->tdls_disable_channel_switch)
383 return sm->ctx->tdls_disable_channel_switch(sm->ctx->ctx, addr);
388 static inline int wpa_sm_key_mgmt_set_pmk(struct wpa_sm *sm,
391 if (!sm->ctx->key_mgmt_set_pmk)
393 return sm->ctx->key_mgmt_set_pmk(sm->ctx->ctx, pmk, pmk_len);
396 static inline void wpa_sm_fils_hlp_rx(struct wpa_sm *sm,
400 if (sm->ctx->fils_hlp_rx)
401 sm->ctx->fils_hlp_rx(sm->ctx->ctx, dst, src, pkt, pkt_len);
404 static inline int wpa_sm_channel_info(struct wpa_sm *sm,
407 if (!sm->ctx->channel_info)
409 return sm->ctx->channel_info(sm->ctx->ctx, ci);
413 int wpa_eapol_key_send(struct wpa_sm *sm, struct wpa_ptk *ptk,
416 int wpa_supplicant_send_2_of_4(struct wpa_sm *sm, const unsigned char *dst,
421 int wpa_supplicant_send_4_of_4(struct wpa_sm *sm, const unsigned char *dst,
426 int wpa_derive_ptk_ft(struct wpa_sm *sm, const unsigned char *src_addr,
429 void wpa_tdls_assoc(struct wpa_sm *sm);
430 void wpa_tdls_disassoc(struct wpa_sm *sm);