|
@@ -709,76 +709,6 @@ static void wma_update_phymode_on_roam(tp_wma_handle wma,
|
|
|
des_chan->ch_cfreq1, des_chan->ch_cfreq2);
|
|
|
}
|
|
|
|
|
|
-int wma_roam_auth_offload_event_handler(WMA_HANDLE handle, uint8_t *event,
|
|
|
- uint32_t len)
|
|
|
-{
|
|
|
- QDF_STATUS status;
|
|
|
- tp_wma_handle wma = (tp_wma_handle) handle;
|
|
|
- struct mac_context *mac_ctx;
|
|
|
- wmi_roam_preauth_start_event_fixed_param *rso_auth_start_ev;
|
|
|
- WMI_ROAM_PREAUTH_START_EVENTID_param_tlvs *param_buf;
|
|
|
- struct qdf_mac_addr ap_bssid;
|
|
|
- uint8_t vdev_id;
|
|
|
-
|
|
|
- if (!event) {
|
|
|
- wma_err_rl("received null event from target");
|
|
|
- return -EINVAL;
|
|
|
- }
|
|
|
-
|
|
|
- param_buf = (WMI_ROAM_PREAUTH_START_EVENTID_param_tlvs *) event;
|
|
|
- if (!param_buf) {
|
|
|
- wma_err_rl("received null buf from target");
|
|
|
- return -EINVAL;
|
|
|
- }
|
|
|
-
|
|
|
- rso_auth_start_ev = param_buf->fixed_param;
|
|
|
- if (!rso_auth_start_ev) {
|
|
|
- wma_err_rl("received null event data from target");
|
|
|
- return -EINVAL;
|
|
|
- }
|
|
|
-
|
|
|
- if (rso_auth_start_ev->vdev_id > wma->max_bssid) {
|
|
|
- wma_err_rl("received invalid vdev_id %d",
|
|
|
- rso_auth_start_ev->vdev_id);
|
|
|
- return -EINVAL;
|
|
|
- }
|
|
|
-
|
|
|
- mac_ctx = cds_get_context(QDF_MODULE_ID_PE);
|
|
|
- if (!mac_ctx) {
|
|
|
- wma_err("NULL mac ptr");
|
|
|
- QDF_ASSERT(0);
|
|
|
- return -EINVAL;
|
|
|
- }
|
|
|
-
|
|
|
- cds_host_diag_log_work(&wma->roam_preauth_wl,
|
|
|
- WMA_ROAM_PREAUTH_WAKE_LOCK_DURATION,
|
|
|
- WIFI_POWER_EVENT_WAKELOCK_WOW);
|
|
|
- qdf_wake_lock_timeout_acquire(&wma->roam_ho_wl,
|
|
|
- WMA_ROAM_HO_WAKE_LOCK_DURATION);
|
|
|
-
|
|
|
- WMI_MAC_ADDR_TO_CHAR_ARRAY(&rso_auth_start_ev->candidate_ap_bssid,
|
|
|
- ap_bssid.bytes);
|
|
|
- if (qdf_is_macaddr_zero(&ap_bssid) ||
|
|
|
- qdf_is_macaddr_broadcast(&ap_bssid) ||
|
|
|
- qdf_is_macaddr_group(&ap_bssid)) {
|
|
|
- wma_err_rl("Invalid bssid");
|
|
|
- return -EINVAL;
|
|
|
- }
|
|
|
-
|
|
|
- vdev_id = rso_auth_start_ev->vdev_id;
|
|
|
- wma_debug("Received Roam auth offload event for bss:"QDF_MAC_ADDR_FMT" vdev_id:%d",
|
|
|
- QDF_MAC_ADDR_REF(ap_bssid.bytes), vdev_id);
|
|
|
-
|
|
|
- lim_sae_auth_cleanup_retry(mac_ctx, vdev_id);
|
|
|
- status = wma->csr_roam_auth_event_handle_cb(mac_ctx, vdev_id, ap_bssid);
|
|
|
- if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
- wma_err_rl("Trigger pre-auth failed");
|
|
|
- return -EINVAL;
|
|
|
- }
|
|
|
-
|
|
|
- return 0;
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
* wma_set_ric_req() - set ric request element
|
|
|
* @wma: wma handle
|