summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2020-04-13 02:09:24 -0700
committerLinux Build Service Account <lnxbuild@localhost>2020-04-13 02:09:24 -0700
commit48d6d33704f79f496fcc19234df736636230be2b (patch)
tree769facbc4f1d6e20b83610806856a37b11c64ea1
parentaa151aa02a11159b4e19fa98e9812aeac4906c0e (diff)
parent824e6b85ec4db820c02ed134a1ae82d713ddfb52 (diff)
Merge 824e6b85ec4db820c02ed134a1ae82d713ddfb52 on remote branch
Change-Id: I8967667aabba38791481a67aa4eb7d0326407cec
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.c11
-rw-r--r--core/mac/inc/qwlan_version.h4
-rw-r--r--core/sme/inc/csr_neighbor_roam.h25
-rw-r--r--core/sme/src/common/sme_api.c76
-rw-r--r--core/sme/src/csr/csr_api_roam.c89
5 files changed, 132 insertions, 73 deletions
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index fdc20ab86bc9..0da2e57c8d53 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -18624,8 +18624,13 @@ static int wlan_hdd_reassoc_bssid_hint(hdd_adapter_t *adapter,
qdf_mem_copy(wext_state->req_bssId.bytes, bssid,
QDF_MAC_ADDR_SIZE);
+ hdd_set_roaming_in_progress(true);
+
status = hdd_reassoc(adapter, bssid, channel,
CONNECT_CMD_USERSPACE);
+ if (QDF_IS_STATUS_ERROR(status))
+ hdd_set_roaming_in_progress(false);
+
hdd_debug("hdd_reassoc: status: %d", status);
}
return status;
@@ -18764,10 +18769,8 @@ static int __wlan_hdd_cfg80211_connect(struct wiphy *wiphy,
* Check if this is reassoc to same bssid, if reassoc is success, return
*/
status = wlan_hdd_reassoc_bssid_hint(pAdapter, req);
- if (!status) {
- hdd_set_roaming_in_progress(true);
+ if (!status)
return status;
- }
/* Try disconnecting if already in connected state */
status = wlan_hdd_try_disconnect(pAdapter);
diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h
index 4f6f782c30b8..3bc4886f0a0b 100644
--- a/core/mac/inc/qwlan_version.h
+++ b/core/mac/inc/qwlan_version.h
@@ -32,9 +32,9 @@
#define QWLAN_VERSION_MAJOR 5
#define QWLAN_VERSION_MINOR 1
#define QWLAN_VERSION_PATCH 1
-#define QWLAN_VERSION_EXTRA "D"
+#define QWLAN_VERSION_EXTRA "F"
#define QWLAN_VERSION_BUILD 76
-#define QWLAN_VERSIONSTR "5.1.1.76D"
+#define QWLAN_VERSIONSTR "5.1.1.76F"
#endif /* QWLAN_VERSION_H */
diff --git a/core/sme/inc/csr_neighbor_roam.h b/core/sme/inc/csr_neighbor_roam.h
index 46e9811137d4..2ef3fc2d435c 100644
--- a/core/sme/inc/csr_neighbor_roam.h
+++ b/core/sme/inc/csr_neighbor_roam.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -385,6 +385,21 @@ QDF_STATUS csr_roam_synch_callback(tpAniSirGlobal mac,
roam_offload_synch_ind *roam_synch_data,
tpSirBssDescription bss_desc_ptr, enum sir_roam_op_code reason);
+/**
+ * csr_fast_reassoc() - invokes FAST REASSOC command
+ * @hal: handle returned by mac_open
+ * @profile: current connected profile
+ * @bssid: bssid to look for in scan cache
+ * @ch_freq: channel on which reassoc should be send
+ * @vdev_id: vdev id
+ * @connected_bssid: bssid of currently connected profile
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS csr_fast_reassoc(tHalHandle hal, tCsrRoamProfile *profile,
+ const tSirMacAddr bssid, int channel,
+ uint8_t vdev_id, const tSirMacAddr connected_bssid);
+
#ifdef WLAN_FEATURE_FIPS
/**
* csr_roam_pmkid_req_callback() - Registered CSR Callback function to handle
@@ -427,6 +442,14 @@ static inline QDF_STATUS csr_roam_synch_callback(tpAniSirGlobal mac,
return QDF_STATUS_E_NOSUPPORT;
}
+static inline
+QDF_STATUS csr_fast_reassoc(tHalHandle hal, tCsrRoamProfile *profile,
+ const tSirMacAddr bssid, int channel,
+ uint8_t vdev_id, const tSirMacAddr connected_bssid)
+{
+ return QDF_STATUS_SUCCESS;
+}
+
static inline QDF_STATUS
csr_roam_pmkid_req_callback(tpAniSirGlobal mac_ctx, uint8_t vdev_id,
struct roam_pmkid_req_event *bss_list)
diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c
index d75124737651..ff32941eff97 100644
--- a/core/sme/src/common/sme_api.c
+++ b/core/sme/src/common/sme_api.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -19372,77 +19372,23 @@ QDF_STATUS sme_fast_reassoc(tHalHandle hal, tCsrRoamProfile *profile,
const tSirMacAddr bssid, int channel,
uint8_t vdev_id, const tSirMacAddr connected_bssid)
{
- QDF_STATUS status;
- struct wma_roam_invoke_cmd *fastreassoc;
- cds_msg_t msg = {0};
+ QDF_STATUS status = QDF_STATUS_E_FAILURE;
tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal);
- tCsrRoamSession *session;
- session = CSR_GET_SESSION(mac_ctx, vdev_id);
- if (!session || !session->pCurRoamProfile) {
- sme_err("session %d not found", vdev_id);
- return QDF_STATUS_E_FAILURE;
- }
- if (session->pCurRoamProfile->driver_disabled_roaming) {
- sme_debug("roaming status in driver %d",
- session->pCurRoamProfile->driver_disabled_roaming);
+ if (!mac_ctx)
return QDF_STATUS_E_FAILURE;
- }
- fastreassoc = qdf_mem_malloc(sizeof(*fastreassoc));
- if (NULL == fastreassoc) {
- sme_err("qdf_mem_malloc failed for fastreassoc");
- return QDF_STATUS_E_NOMEM;
- }
- /* if both are same then set the flag */
- if (!qdf_mem_cmp(connected_bssid, bssid, ETH_ALEN)) {
- fastreassoc->is_same_bssid = true;
- sme_debug("bssid same, bssid[%pM]", bssid);
- }
- fastreassoc->vdev_id = vdev_id;
- fastreassoc->bssid[0] = bssid[0];
- fastreassoc->bssid[1] = bssid[1];
- fastreassoc->bssid[2] = bssid[2];
- fastreassoc->bssid[3] = bssid[3];
- fastreassoc->bssid[4] = bssid[4];
- fastreassoc->bssid[5] = bssid[5];
-
- status = sme_get_beacon_frm(hal, profile, bssid,
- &fastreassoc->frame_buf,
- &fastreassoc->frame_len,
- &channel);
-
- if (!channel) {
- sme_err("channel retrieval from BSS desc fails!");
- qdf_mem_free(fastreassoc);
- return QDF_STATUS_E_FAULT;
+ if (!CSR_IS_SESSION_VALID(mac_ctx, vdev_id)) {
+ sme_err("Invalid vdev_id: %d", vdev_id);
+ return QDF_STATUS_E_INVAL;
}
- fastreassoc->channel = channel;
- if (QDF_STATUS_SUCCESS != status) {
- sme_warn("sme_get_beacon_frm failed");
- fastreassoc->frame_buf = NULL;
- fastreassoc->frame_len = 0;
- }
-
- if (csr_is_auth_type_ese(mac_ctx->roam.roamSession[vdev_id].
- connectedProfile.AuthType)) {
- sme_debug("Beacon is not required for ESE");
- if (fastreassoc->frame_len) {
- qdf_mem_free(fastreassoc->frame_buf);
- fastreassoc->frame_buf = NULL;
- fastreassoc->frame_len = 0;
- }
- }
+ if (QDF_IS_STATUS_ERROR(sme_acquire_global_lock(&mac_ctx->sme)))
+ return QDF_STATUS_E_FAILURE;
- msg.type = eWNI_SME_ROAM_INVOKE;
- msg.reserved = 0;
- msg.bodyptr = fastreassoc;
- status = cds_mq_post_message(QDF_MODULE_ID_PE, &msg);
- if (QDF_STATUS_SUCCESS != status) {
- sme_err("Not able to post ROAM_INVOKE_CMD message to PE");
- qdf_mem_free(fastreassoc);
- }
+ status = csr_fast_reassoc(hal, profile, bssid, channel, vdev_id,
+ connected_bssid);
+ sme_release_global_lock(&mac_ctx->sme);
return status;
}
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index ef9bdd63b8bc..8d20580c7734 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -20463,6 +20463,93 @@ csr_create_per_roam_request(tpAniSirGlobal mac_ctx, uint8_t session_id)
return req_buf;
}
+#ifdef WLAN_FEATURE_ROAM_OFFLOAD
+QDF_STATUS csr_fast_reassoc(tHalHandle hal, tCsrRoamProfile *profile,
+ const tSirMacAddr bssid, int channel,
+ uint8_t vdev_id, const tSirMacAddr connected_bssid)
+{
+ QDF_STATUS status;
+ struct wma_roam_invoke_cmd *fastreassoc;
+ cds_msg_t msg = {0};
+ tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal);
+ tCsrRoamSession *session;
+
+ session = CSR_GET_SESSION(mac_ctx, vdev_id);
+ if (!session || !session->pCurRoamProfile) {
+ sme_err("session %d not found", vdev_id);
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ if (!csr_is_conn_state_connected(mac_ctx, vdev_id)) {
+ sme_debug("Not in connected state, Roam Invoke not sent");
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ if (session->pCurRoamProfile->driver_disabled_roaming) {
+ sme_debug("roaming status in driver %d",
+ session->pCurRoamProfile->driver_disabled_roaming);
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ fastreassoc = qdf_mem_malloc(sizeof(*fastreassoc));
+ if (NULL == fastreassoc) {
+ sme_err("qdf_mem_malloc failed for fastreassoc");
+ return QDF_STATUS_E_NOMEM;
+ }
+ /* if both are same then set the flag */
+ if (!qdf_mem_cmp(connected_bssid, bssid, ETH_ALEN)) {
+ fastreassoc->is_same_bssid = true;
+ sme_debug("bssid same, bssid[%pM]", bssid);
+ }
+ fastreassoc->vdev_id = vdev_id;
+ fastreassoc->bssid[0] = bssid[0];
+ fastreassoc->bssid[1] = bssid[1];
+ fastreassoc->bssid[2] = bssid[2];
+ fastreassoc->bssid[3] = bssid[3];
+ fastreassoc->bssid[4] = bssid[4];
+ fastreassoc->bssid[5] = bssid[5];
+
+ status = sme_get_beacon_frm(hal, profile, bssid,
+ &fastreassoc->frame_buf,
+ &fastreassoc->frame_len,
+ &channel);
+
+ if (!channel) {
+ sme_err("channel retrieval from BSS desc fails!");
+ qdf_mem_free(fastreassoc);
+ return QDF_STATUS_E_FAULT;
+ }
+
+ fastreassoc->channel = channel;
+ if (QDF_STATUS_SUCCESS != status) {
+ sme_warn("sme_get_beacon_frm failed");
+ fastreassoc->frame_buf = NULL;
+ fastreassoc->frame_len = 0;
+ }
+
+ if (csr_is_auth_type_ese(mac_ctx->roam.roamSession[vdev_id].
+ connectedProfile.AuthType)) {
+ sme_debug("Beacon is not required for ESE");
+ if (fastreassoc->frame_len) {
+ qdf_mem_free(fastreassoc->frame_buf);
+ fastreassoc->frame_buf = NULL;
+ fastreassoc->frame_len = 0;
+ }
+ }
+
+ msg.type = eWNI_SME_ROAM_INVOKE;
+ msg.reserved = 0;
+ msg.bodyptr = fastreassoc;
+ status = cds_mq_post_message(QDF_MODULE_ID_PE, &msg);
+ if (QDF_STATUS_SUCCESS != status) {
+ sme_err("Not able to post ROAM_INVOKE_CMD message to PE");
+ qdf_mem_free(fastreassoc);
+ }
+
+ return status;
+}
+#endif
+
/**
* csr_roam_offload_per_scan() - populates roam offload scan request and sends
* to WMA