|
@@ -171,6 +171,22 @@ bool hdd_cm_is_disconnecting(struct hdd_adapter *adapter)
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
+void hdd_cm_set_peer_authenticate(struct hdd_adapter *adapter,
|
|
|
+ struct qdf_mac_addr *bssid,
|
|
|
+ bool is_auth_required)
|
|
|
+{
|
|
|
+ hdd_debug("sta: " QDF_MAC_ADDR_FMT "Changing TL state to %s",
|
|
|
+ QDF_MAC_ADDR_REF(bssid->bytes),
|
|
|
+ is_auth_required ? "CONNECTED" : "AUTHENTICATED");
|
|
|
+
|
|
|
+ hdd_change_peer_state(adapter, bssid->bytes,
|
|
|
+ is_auth_required ?
|
|
|
+ OL_TXRX_PEER_STATE_CONN :
|
|
|
+ OL_TXRX_PEER_STATE_AUTH);
|
|
|
+ hdd_conn_set_authenticated(adapter, !is_auth_required);
|
|
|
+ hdd_objmgr_set_peer_mlme_auth_state(adapter->vdev, !is_auth_required);
|
|
|
+}
|
|
|
+
|
|
|
void hdd_cm_update_rssi_snr_by_bssid(struct hdd_adapter *adapter)
|
|
|
{
|
|
|
struct hdd_station_ctx *sta_ctx;
|
|
@@ -442,9 +458,13 @@ hdd_cm_connect_failure_post_user_update(struct wlan_objmgr_vdev *vdev,
|
|
|
struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
|
|
|
struct hdd_adapter *adapter = hdd_get_adapter_by_vdev(hdd_ctx,
|
|
|
wlan_vdev_get_id(vdev));
|
|
|
+ bool is_roam = false;
|
|
|
|
|
|
- qdf_runtime_pm_allow_suspend(&hdd_ctx->runtime_context.connect);
|
|
|
- hdd_allow_suspend(WIFI_POWER_EVENT_WAKELOCK_CONNECT);
|
|
|
+ if (!is_roam) {
|
|
|
+ /* call only for connect */
|
|
|
+ qdf_runtime_pm_allow_suspend(&hdd_ctx->runtime_context.connect);
|
|
|
+ hdd_allow_suspend(WIFI_POWER_EVENT_WAKELOCK_CONNECT);
|
|
|
+ }
|
|
|
sme_reset_key(hdd_ctx->mac_handle, adapter->vdev_id);
|
|
|
hdd_wmm_dscp_initial_state(adapter);
|
|
|
hdd_debug("Disabling queues");
|
|
@@ -763,6 +783,7 @@ hdd_cm_connect_success_pre_user_update(struct wlan_objmgr_vdev *vdev,
|
|
|
uint32_t ie_len;
|
|
|
uint8_t *ie_field;
|
|
|
mac_handle_t mac_handle;
|
|
|
+ bool is_roam = false;
|
|
|
|
|
|
hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
|
|
|
if (!hdd_ctx) {
|
|
@@ -844,31 +865,33 @@ hdd_cm_connect_success_pre_user_update(struct wlan_objmgr_vdev *vdev,
|
|
|
wlan_hdd_set_mas(adapter, hdd_ctx->miracast_value);
|
|
|
}
|
|
|
|
|
|
- /* Initialize the Linkup event completion variable */
|
|
|
- INIT_COMPLETION(adapter->linkup_event_var);
|
|
|
+ if (!is_roam) {
|
|
|
+ /* Initialize the Linkup event completion variable */
|
|
|
+ INIT_COMPLETION(adapter->linkup_event_var);
|
|
|
|
|
|
- /*
|
|
|
- * Enable Linkup Event Servicing which allows the net
|
|
|
- * device notifier to set the linkup event variable.
|
|
|
- */
|
|
|
- adapter->is_link_up_service_needed = true;
|
|
|
+ /*
|
|
|
+ * Enable Linkup Event Servicing which allows the net
|
|
|
+ * device notifier to set the linkup event variable.
|
|
|
+ */
|
|
|
+ adapter->is_link_up_service_needed = true;
|
|
|
|
|
|
- /* Switch on the Carrier to activate the device */
|
|
|
- wlan_hdd_netif_queue_control(adapter, WLAN_NETIF_CARRIER_ON,
|
|
|
- WLAN_CONTROL_PATH);
|
|
|
+ /* Switch on the Carrier to activate the device */
|
|
|
+ wlan_hdd_netif_queue_control(adapter, WLAN_NETIF_CARRIER_ON,
|
|
|
+ WLAN_CONTROL_PATH);
|
|
|
|
|
|
- /*
|
|
|
- * Wait for the Link to up to ensure all the queues
|
|
|
- * are set properly by the kernel.
|
|
|
- */
|
|
|
- rc = wait_for_completion_timeout(
|
|
|
- &adapter->linkup_event_var,
|
|
|
- msecs_to_jiffies(ASSOC_LINKUP_TIMEOUT));
|
|
|
- /*
|
|
|
- * Disable Linkup Event Servicing - no more service
|
|
|
- * required from the net device notifier call.
|
|
|
- */
|
|
|
- adapter->is_link_up_service_needed = false;
|
|
|
+ /*
|
|
|
+ * Wait for the Link to up to ensure all the queues
|
|
|
+ * are set properly by the kernel.
|
|
|
+ */
|
|
|
+ rc = wait_for_completion_timeout(
|
|
|
+ &adapter->linkup_event_var,
|
|
|
+ msecs_to_jiffies(ASSOC_LINKUP_TIMEOUT));
|
|
|
+ /*
|
|
|
+ * Disable Linkup Event Servicing - no more service
|
|
|
+ * required from the net device notifier call.
|
|
|
+ */
|
|
|
+ adapter->is_link_up_service_needed = false;
|
|
|
+ }
|
|
|
|
|
|
if (ucfg_ipa_is_enabled())
|
|
|
ucfg_ipa_wlan_evt(hdd_ctx->pdev, adapter->dev,
|
|
@@ -884,6 +907,8 @@ hdd_cm_connect_success_pre_user_update(struct wlan_objmgr_vdev *vdev,
|
|
|
QDF_TRACE_DEFAULT_PDEV_ID,
|
|
|
QDF_PROTO_TYPE_MGMT, QDF_PROTO_MGMT_ASSOC));
|
|
|
|
|
|
+ if (is_roam)
|
|
|
+ hdd_nud_indicate_roam(adapter);
|
|
|
/* hdd_objmgr_set_peer_mlme_auth_state */
|
|
|
}
|
|
|
|
|
@@ -900,6 +925,28 @@ bool hdd_cm_is_fils_connection(struct wlan_cm_connect_resp *rsp)
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
+#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
|
|
+static bool hdd_cm_is_roam_auth_required(struct hdd_station_ctx *sta_ctx,
|
|
|
+ struct wlan_cm_connect_resp *rsp)
|
|
|
+{
|
|
|
+#if 0
|
|
|
+ if (!rsp->roaming_info)
|
|
|
+ return false;
|
|
|
+
|
|
|
+ if (rsp->roaming_info->auth_status == ROAM_AUTH_STATUS_AUTHENTICATED ||
|
|
|
+ sta_ctx->conn_info.auth_type == eCSR_AUTH_TYPE_SAE ||
|
|
|
+ sta_ctx->conn_info.auth_type == eCSR_AUTH_TYPE_OWE)
|
|
|
+ return false;
|
|
|
+#endif
|
|
|
+ return true;
|
|
|
+}
|
|
|
+#else
|
|
|
+static bool hdd_cm_is_roam_auth_required(struct hdd_station_ctx *sta_ctx,
|
|
|
+ struct wlan_cm_connect_resp *rsp)
|
|
|
+{
|
|
|
+ return true;
|
|
|
+}
|
|
|
+#endif
|
|
|
|
|
|
static void
|
|
|
hdd_cm_connect_success_post_user_update(struct wlan_objmgr_vdev *vdev,
|
|
@@ -914,9 +961,17 @@ hdd_cm_connect_success_post_user_update(struct wlan_objmgr_vdev *vdev,
|
|
|
uint8_t uapsd_mask =
|
|
|
mlme_obj->ext_vdev_ptr->connect_info.uapsd_per_ac_bitmask;
|
|
|
bool is_auth_required = true;
|
|
|
+ bool is_roam_offload = false;
|
|
|
+ bool is_roam = false;
|
|
|
|
|
|
- qdf_runtime_pm_allow_suspend(&hdd_ctx->runtime_context.connect);
|
|
|
- hdd_allow_suspend(WIFI_POWER_EVENT_WAKELOCK_CONNECT);
|
|
|
+ if (is_roam) {
|
|
|
+ /* If roaming is set check if FW roaming/LFR3 */
|
|
|
+ ucfg_mlme_get_roaming_offload(hdd_ctx->psoc, &is_roam_offload);
|
|
|
+ } else {
|
|
|
+ /* call only for connect */
|
|
|
+ qdf_runtime_pm_allow_suspend(&hdd_ctx->runtime_context.connect);
|
|
|
+ hdd_allow_suspend(WIFI_POWER_EVENT_WAKELOCK_CONNECT);
|
|
|
+ }
|
|
|
|
|
|
cdp_hl_fc_set_td_limit(soc, adapter->vdev_id,
|
|
|
sta_ctx->conn_info.chan_freq);
|
|
@@ -929,7 +984,18 @@ hdd_cm_connect_success_post_user_update(struct wlan_objmgr_vdev *vdev,
|
|
|
hdd_cm_is_fils_connection(rsp)))
|
|
|
is_auth_required = false;
|
|
|
|
|
|
- hdd_roam_register_sta(adapter, &rsp->bssid, is_auth_required);
|
|
|
+ if (is_roam_offload || !is_roam) {
|
|
|
+ /* For FW_ROAM/LFR3 OR connect */
|
|
|
+ /* for LFR 3 get authenticated info from resp */
|
|
|
+ if (is_roam)
|
|
|
+ is_auth_required =
|
|
|
+ hdd_cm_is_roam_auth_required(sta_ctx, rsp);
|
|
|
+ hdd_roam_register_sta(adapter, &rsp->bssid, is_auth_required);
|
|
|
+ } else {
|
|
|
+ /* for host roam/LFR2 */
|
|
|
+ hdd_cm_set_peer_authenticate(adapter, &rsp->bssid,
|
|
|
+ is_auth_required);
|
|
|
+ }
|
|
|
|
|
|
hdd_debug("Enabling queues");
|
|
|
hdd_cm_netif_queue_enable(adapter);
|