};
+static int wpas_pasn_send_mlme(void *ctx, const u8 *data, size_t data_len,
+ int noack, unsigned int freq, unsigned int wait)
+{
+ struct wpa_supplicant *wpa_s = ctx;
+
+ return wpa_drv_send_mlme(wpa_s, data, data_len, noack, freq, wait);
+}
+
+
static void wpas_pasn_free_auth_work(struct wpa_pasn_auth_work *awork)
{
wpabuf_free(awork->comeback);
goto fail;
}
- ret = wpa_drv_send_mlme(pasn->cb_ctx,
- wpabuf_head(frame), wpabuf_len(frame), 0,
- pasn->freq, 1000);
+ ret = pasn->send_mgmt(pasn->cb_ctx,
+ wpabuf_head(frame), wpabuf_len(frame), 0,
+ pasn->freq, 1000);
wpabuf_free(frame);
if (ret) {
if (wpa_s->drv_flags2 & WPA_DRIVER_FLAGS2_PROT_RANGE_NEG_STA)
capab |= BIT(WLAN_RSNX_CAPAB_PROT_RANGE_NEG);
pasn->rsnxe_capab = capab;
+ pasn->send_mgmt = wpas_pasn_send_mlme;
ssid = wpa_config_get_network(wpa_s->conf, awork->network_id);
goto fail;
}
- ret = wpa_drv_send_mlme(pasn->cb_ctx,
- wpabuf_head(frame), wpabuf_len(frame), 0,
- pasn->freq, 100);
+ ret = pasn->send_mgmt(pasn->cb_ctx,
+ wpabuf_head(frame), wpabuf_len(frame), 0,
+ pasn->freq, 100);
wpabuf_free(frame);
if (ret) {
wpa_printf(MSG_DEBUG, "PASN: Failed sending 3st auth frame");
void *cb_ctx;
u16 rsnxe_capab;
int network_id;
+
+ /**
+ * send_mgmt - Function handler to transmit a Management frame
+ * @ctx: Callback context from cb_ctx
+ * @frame_buf : Frame to transmit
+ * @frame_len: Length of frame to transmit
+ * @freq: Frequency in MHz for the channel on which to transmit
+ * @wait_dur: How many milliseconds to wait for a response frame
+ * Returns: 0 on success, -1 on failure
+ */
+ int (*send_mgmt)(void *ctx, const u8 *data, size_t data_len, int noack,
+ unsigned int freq, unsigned int wait);
};
#endif /* CONFIG_PASN */