Added a separate ctx pointer for wpa_msg() calls in WPA supp
[mech_eap.git] / wpa_supplicant / ibss_rsn.c
index 892609b..080c1f6 100644 (file)
@@ -144,6 +144,7 @@ int ibss_rsn_supp_init(struct ibss_rsn_peer *peer, const u8 *own_addr,
                return -1;
 
        ctx->ctx = peer;
+       ctx->msg_ctx = peer->ibss_rsn->wpa_s;
        ctx->set_state = supp_set_state;
        ctx->ether_send = supp_ether_send;
        ctx->get_beacon_ie = supp_get_beacon_ie;
@@ -446,3 +447,9 @@ int ibss_rsn_rx_eapol(struct ibss_rsn *ibss_rsn, const u8 *src_addr,
 
        return 0;
 }
+
+
+void ibss_rsn_set_psk(struct ibss_rsn *ibss_rsn, const u8 *psk)
+{
+       os_memcpy(ibss_rsn->psk, psk, PMK_LEN);
+}