Lines Matching refs:sm

241 static inline void wpa_sm_set_state(struct wpa_sm *sm, enum wpa_states state)  in wpa_sm_set_state()  argument
243 WPA_ASSERT(sm->ctx->set_state); in wpa_sm_set_state()
244 sm->ctx->set_state(sm->ctx->ctx, state); in wpa_sm_set_state()
247 static inline enum wpa_states wpa_sm_get_state(struct wpa_sm *sm) in wpa_sm_get_state() argument
249 WPA_ASSERT(sm->ctx->get_state); in wpa_sm_get_state()
250 return sm->ctx->get_state(sm->ctx->ctx); in wpa_sm_get_state()
253 static inline void wpa_sm_deauthenticate(struct wpa_sm *sm, u16 reason_code) in wpa_sm_deauthenticate() argument
255 WPA_ASSERT(sm->ctx->deauthenticate); in wpa_sm_deauthenticate()
256 sm->ctx->deauthenticate(sm->ctx->ctx, reason_code); in wpa_sm_deauthenticate()
259 static inline int wpa_sm_set_key(struct wpa_sm *sm, int link_id, in wpa_sm_set_key() argument
265 WPA_ASSERT(sm->ctx->set_key); in wpa_sm_set_key()
266 return sm->ctx->set_key(sm->ctx->ctx, link_id, alg, addr, key_idx, in wpa_sm_set_key()
270 static inline void wpa_sm_reconnect(struct wpa_sm *sm) in wpa_sm_reconnect() argument
272 WPA_ASSERT(sm->ctx->reconnect); in wpa_sm_reconnect()
273 sm->ctx->reconnect(sm->ctx->ctx); in wpa_sm_reconnect()
276 static inline void * wpa_sm_get_network_ctx(struct wpa_sm *sm) in wpa_sm_get_network_ctx() argument
278 WPA_ASSERT(sm->ctx->get_network_ctx); in wpa_sm_get_network_ctx()
279 return sm->ctx->get_network_ctx(sm->ctx->ctx); in wpa_sm_get_network_ctx()
282 static inline int wpa_sm_get_bssid(struct wpa_sm *sm, u8 *bssid) in wpa_sm_get_bssid() argument
284 WPA_ASSERT(sm->ctx->get_bssid); in wpa_sm_get_bssid()
285 return sm->ctx->get_bssid(sm->ctx->ctx, bssid); in wpa_sm_get_bssid()
288 static inline int wpa_sm_ether_send(struct wpa_sm *sm, const u8 *dest, in wpa_sm_ether_send() argument
291 WPA_ASSERT(sm->ctx->ether_send); in wpa_sm_ether_send()
292 return sm->ctx->ether_send(sm->ctx->ctx, dest, proto, buf, len); in wpa_sm_ether_send()
295 static inline int wpa_sm_get_beacon_ie(struct wpa_sm *sm) in wpa_sm_get_beacon_ie() argument
297 WPA_ASSERT(sm->ctx->get_beacon_ie); in wpa_sm_get_beacon_ie()
298 return sm->ctx->get_beacon_ie(sm->ctx->ctx); in wpa_sm_get_beacon_ie()
301 static inline void wpa_sm_cancel_auth_timeout(struct wpa_sm *sm) in wpa_sm_cancel_auth_timeout() argument
303 WPA_ASSERT(sm->ctx->cancel_auth_timeout); in wpa_sm_cancel_auth_timeout()
304 sm->ctx->cancel_auth_timeout(sm->ctx->ctx); in wpa_sm_cancel_auth_timeout()
307 static inline u8 * wpa_sm_alloc_eapol(struct wpa_sm *sm, u8 type, in wpa_sm_alloc_eapol() argument
311 WPA_ASSERT(sm->ctx->alloc_eapol); in wpa_sm_alloc_eapol()
312 return sm->ctx->alloc_eapol(sm->ctx->ctx, type, data, data_len, in wpa_sm_alloc_eapol()
316 static inline int wpa_sm_add_pmkid(struct wpa_sm *sm, void *network_ctx, in wpa_sm_add_pmkid() argument
322 WPA_ASSERT(sm->ctx->add_pmkid); in wpa_sm_add_pmkid()
323 return sm->ctx->add_pmkid(sm->ctx->ctx, network_ctx, bssid, pmkid, in wpa_sm_add_pmkid()
328 static inline int wpa_sm_remove_pmkid(struct wpa_sm *sm, void *network_ctx, in wpa_sm_remove_pmkid() argument
332 WPA_ASSERT(sm->ctx->remove_pmkid); in wpa_sm_remove_pmkid()
333 return sm->ctx->remove_pmkid(sm->ctx->ctx, network_ctx, bssid, pmkid, in wpa_sm_remove_pmkid()
337 static inline int wpa_sm_mlme_setprotection(struct wpa_sm *sm, const u8 *addr, in wpa_sm_mlme_setprotection() argument
340 WPA_ASSERT(sm->ctx->mlme_setprotection); in wpa_sm_mlme_setprotection()
341 return sm->ctx->mlme_setprotection(sm->ctx->ctx, addr, protect_type, in wpa_sm_mlme_setprotection()
345 static inline int wpa_sm_update_ft_ies(struct wpa_sm *sm, const u8 *md, in wpa_sm_update_ft_ies() argument
348 if (sm->ctx->update_ft_ies) in wpa_sm_update_ft_ies()
349 return sm->ctx->update_ft_ies(sm->ctx->ctx, md, ies, ies_len); in wpa_sm_update_ft_ies()
353 static inline int wpa_sm_send_ft_action(struct wpa_sm *sm, u8 action, in wpa_sm_send_ft_action() argument
357 if (sm->ctx->send_ft_action) in wpa_sm_send_ft_action()
358 return sm->ctx->send_ft_action(sm->ctx->ctx, action, target_ap, in wpa_sm_send_ft_action()
363 static inline int wpa_sm_mark_authenticated(struct wpa_sm *sm, in wpa_sm_mark_authenticated() argument
366 if (sm->ctx->mark_authenticated) in wpa_sm_mark_authenticated()
367 return sm->ctx->mark_authenticated(sm->ctx->ctx, target_ap); in wpa_sm_mark_authenticated()
371 static inline void wpa_sm_set_rekey_offload(struct wpa_sm *sm) in wpa_sm_set_rekey_offload() argument
373 if (!sm->ctx->set_rekey_offload) in wpa_sm_set_rekey_offload()
375 sm->ctx->set_rekey_offload(sm->ctx->ctx, sm->ptk.kek, sm->ptk.kek_len, in wpa_sm_set_rekey_offload()
376 sm->ptk.kck, sm->ptk.kck_len, in wpa_sm_set_rekey_offload()
377 sm->rx_replay_counter); in wpa_sm_set_rekey_offload()
381 static inline int wpa_sm_tdls_get_capa(struct wpa_sm *sm, in wpa_sm_tdls_get_capa() argument
386 if (sm->ctx->tdls_get_capa) in wpa_sm_tdls_get_capa()
387 return sm->ctx->tdls_get_capa(sm->ctx->ctx, tdls_supported, in wpa_sm_tdls_get_capa()
392 static inline int wpa_sm_send_tdls_mgmt(struct wpa_sm *sm, const u8 *dst, in wpa_sm_send_tdls_mgmt() argument
398 if (sm->ctx->send_tdls_mgmt) in wpa_sm_send_tdls_mgmt()
399 return sm->ctx->send_tdls_mgmt(sm->ctx->ctx, dst, action_code, in wpa_sm_send_tdls_mgmt()
406 static inline int wpa_sm_tdls_oper(struct wpa_sm *sm, int oper, in wpa_sm_tdls_oper() argument
409 if (sm->ctx->tdls_oper) in wpa_sm_tdls_oper()
410 return sm->ctx->tdls_oper(sm->ctx->ctx, oper, peer); in wpa_sm_tdls_oper()
415 wpa_sm_tdls_peer_addset(struct wpa_sm *sm, const u8 *addr, int add, in wpa_sm_tdls_peer_addset() argument
430 if (sm->ctx->tdls_peer_addset) in wpa_sm_tdls_peer_addset()
431 return sm->ctx->tdls_peer_addset(sm->ctx->ctx, addr, add, in wpa_sm_tdls_peer_addset()
448 wpa_sm_tdls_enable_channel_switch(struct wpa_sm *sm, const u8 *addr, in wpa_sm_tdls_enable_channel_switch() argument
452 if (sm->ctx->tdls_enable_channel_switch) in wpa_sm_tdls_enable_channel_switch()
453 return sm->ctx->tdls_enable_channel_switch(sm->ctx->ctx, addr, in wpa_sm_tdls_enable_channel_switch()
460 wpa_sm_tdls_disable_channel_switch(struct wpa_sm *sm, const u8 *addr) in wpa_sm_tdls_disable_channel_switch() argument
462 if (sm->ctx->tdls_disable_channel_switch) in wpa_sm_tdls_disable_channel_switch()
463 return sm->ctx->tdls_disable_channel_switch(sm->ctx->ctx, addr); in wpa_sm_tdls_disable_channel_switch()
468 static inline int wpa_sm_key_mgmt_set_pmk(struct wpa_sm *sm, in wpa_sm_key_mgmt_set_pmk() argument
471 if (!sm->ctx->key_mgmt_set_pmk) in wpa_sm_key_mgmt_set_pmk()
473 return sm->ctx->key_mgmt_set_pmk(sm->ctx->ctx, pmk, pmk_len); in wpa_sm_key_mgmt_set_pmk()
476 static inline void wpa_sm_fils_hlp_rx(struct wpa_sm *sm, in wpa_sm_fils_hlp_rx() argument
480 if (sm->ctx->fils_hlp_rx) in wpa_sm_fils_hlp_rx()
481 sm->ctx->fils_hlp_rx(sm->ctx->ctx, dst, src, pkt, pkt_len); in wpa_sm_fils_hlp_rx()
484 static inline int wpa_sm_channel_info(struct wpa_sm *sm, in wpa_sm_channel_info() argument
487 if (!sm->ctx->channel_info) in wpa_sm_channel_info()
489 return sm->ctx->channel_info(sm->ctx->ctx, ci); in wpa_sm_channel_info()
492 static inline void wpa_sm_transition_disable(struct wpa_sm *sm, u8 bitmap) in wpa_sm_transition_disable() argument
494 if (sm->ctx->transition_disable) in wpa_sm_transition_disable()
495 sm->ctx->transition_disable(sm->ctx->ctx, bitmap); in wpa_sm_transition_disable()
498 static inline void wpa_sm_store_ptk(struct wpa_sm *sm, in wpa_sm_store_ptk() argument
502 if (sm->ctx->store_ptk) in wpa_sm_store_ptk()
503 sm->ctx->store_ptk(sm->ctx->ctx, addr, cipher, life_time, in wpa_sm_store_ptk()
508 static inline int wpa_sm_set_ltf_keyseed(struct wpa_sm *sm, const u8 *own_addr, in wpa_sm_set_ltf_keyseed() argument
513 WPA_ASSERT(sm->ctx->set_ltf_keyseed); in wpa_sm_set_ltf_keyseed()
514 return sm->ctx->set_ltf_keyseed(sm->ctx->ctx, own_addr, peer_addr, in wpa_sm_set_ltf_keyseed()
520 wpa_sm_notify_pmksa_cache_entry(struct wpa_sm *sm, in wpa_sm_notify_pmksa_cache_entry() argument
523 if (sm->ctx->notify_pmksa_cache_entry) in wpa_sm_notify_pmksa_cache_entry()
524 sm->ctx->notify_pmksa_cache_entry(sm->ctx->ctx, entry); in wpa_sm_notify_pmksa_cache_entry()
527 static inline void wpa_sm_ssid_verified(struct wpa_sm *sm) in wpa_sm_ssid_verified() argument
529 if (sm->ctx->ssid_verified) in wpa_sm_ssid_verified()
530 sm->ctx->ssid_verified(sm->ctx->ctx); in wpa_sm_ssid_verified()
533 int wpa_eapol_key_send(struct wpa_sm *sm, struct wpa_ptk *ptk,
536 int wpa_supplicant_send_2_of_4(struct wpa_sm *sm, const unsigned char *dst,
541 int wpa_supplicant_send_4_of_4(struct wpa_sm *sm, const unsigned char *dst,
546 int wpa_derive_ptk_ft(struct wpa_sm *sm, const unsigned char *src_addr,
549 void wpa_tdls_assoc(struct wpa_sm *sm);
550 void wpa_tdls_disassoc(struct wpa_sm *sm);
551 bool wpa_sm_rsn_overriding_supported(struct wpa_sm *sm);