qcacld-3.0: Correct cached connection info
qcacld-2.0 to qcacld-3.0 propagation The variables used for cached ssid and authentication type will be cleared after disconnection, hence user will get incorrect info from vendor event after disconnection. Use separate variables to save last ssid and auth info. This is to fix issues of change I5b64d9942a54d35eac0f08b4d8fbed9d1d66a504. Change-Id: Icc1a5d53e33d650726905e50e4846b77b10cf4ee CRs-Fixed: 2098560
This commit is contained in:

committed by
Anjaneedevi Kapparapu

parent
5e2fef5d39
commit
32fd43e7d0
@@ -174,6 +174,8 @@ struct hdd_conn_flag {
|
||||
* @signal: holds rssi info
|
||||
* @assoc_status_code: holds assoc fail reason
|
||||
* @congestion: holds congestion percentage
|
||||
* @last_ssid: holds last ssid
|
||||
* @last_auth_type: holds last auth type
|
||||
*/
|
||||
struct hdd_connection_info {
|
||||
eConnectionState connState;
|
||||
@@ -206,6 +208,8 @@ struct hdd_connection_info {
|
||||
int8_t signal;
|
||||
int32_t assoc_status_code;
|
||||
uint32_t cca;
|
||||
tCsrSSIDInfo last_ssid;
|
||||
eCsrAuthType last_auth_type;
|
||||
};
|
||||
|
||||
/* Forward declarations */
|
||||
|
@@ -885,6 +885,8 @@ hdd_conn_save_connect_info(hdd_adapter_t *pAdapter, tCsrRoamInfo *pRoamInfo,
|
||||
|
||||
pHddStaCtx->conn_info.authType =
|
||||
pRoamInfo->u.pConnectedProfile->AuthType;
|
||||
pHddStaCtx->conn_info.last_auth_type =
|
||||
pHddStaCtx->conn_info.authType;
|
||||
|
||||
pHddStaCtx->conn_info.operationChannel =
|
||||
pRoamInfo->u.pConnectedProfile->operationChannel;
|
||||
@@ -893,6 +895,9 @@ hdd_conn_save_connect_info(hdd_adapter_t *pAdapter, tCsrRoamInfo *pRoamInfo,
|
||||
qdf_mem_copy(&pHddStaCtx->conn_info.SSID.SSID,
|
||||
&pRoamInfo->u.pConnectedProfile->SSID,
|
||||
sizeof(tSirMacSSid));
|
||||
qdf_mem_copy(&pHddStaCtx->conn_info.last_ssid.SSID,
|
||||
&pRoamInfo->u.pConnectedProfile->SSID,
|
||||
sizeof(tSirMacSSid));
|
||||
|
||||
/* Save dot11mode in which STA associated to AP */
|
||||
pHddStaCtx->conn_info.dot11Mode =
|
||||
@@ -1523,10 +1528,10 @@ static void hdd_print_bss_info(hdd_station_ctx_t *hdd_sta_ctx)
|
||||
hdd_info("dot11mode: %d",
|
||||
hdd_sta_ctx->conn_info.dot11Mode);
|
||||
hdd_info("AKM: %d",
|
||||
hdd_sta_ctx->conn_info.authType);
|
||||
hdd_sta_ctx->conn_info.last_auth_type);
|
||||
hdd_info("ssid: %.*s",
|
||||
hdd_sta_ctx->conn_info.SSID.SSID.length,
|
||||
hdd_sta_ctx->conn_info.SSID.SSID.ssId);
|
||||
hdd_sta_ctx->conn_info.last_ssid.SSID.length,
|
||||
hdd_sta_ctx->conn_info.last_ssid.SSID.ssId);
|
||||
hdd_info("roam count: %d",
|
||||
hdd_sta_ctx->conn_info.roam_count);
|
||||
hdd_info("ant_info: %d",
|
||||
|
@@ -4365,8 +4365,8 @@ hdd_add_link_standard_info(struct sk_buff *skb,
|
||||
goto fail;
|
||||
if (nla_put(skb,
|
||||
NL80211_ATTR_SSID,
|
||||
hdd_sta_ctx->conn_info.SSID.SSID.length,
|
||||
hdd_sta_ctx->conn_info.SSID.SSID.ssId)) {
|
||||
hdd_sta_ctx->conn_info.last_ssid.SSID.length,
|
||||
hdd_sta_ctx->conn_info.last_ssid.SSID.ssId)) {
|
||||
hdd_err("put fail");
|
||||
goto fail;
|
||||
}
|
||||
@@ -4435,14 +4435,14 @@ static int hdd_get_station_info(hdd_context_t *hdd_ctx,
|
||||
hdd_sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
|
||||
|
||||
nl_buf_len = NLMSG_HDRLEN;
|
||||
nl_buf_len += sizeof(hdd_sta_ctx->conn_info.SSID.SSID.length) +
|
||||
nl_buf_len += sizeof(hdd_sta_ctx->conn_info.last_ssid.SSID.length) +
|
||||
sizeof(hdd_sta_ctx->conn_info.freq) +
|
||||
sizeof(hdd_sta_ctx->conn_info.noise) +
|
||||
sizeof(hdd_sta_ctx->conn_info.signal) +
|
||||
(sizeof(uint32_t) * 2) +
|
||||
sizeof(hdd_sta_ctx->conn_info.txrate.nss) +
|
||||
sizeof(hdd_sta_ctx->conn_info.roam_count) +
|
||||
sizeof(hdd_sta_ctx->conn_info.authType) +
|
||||
sizeof(hdd_sta_ctx->conn_info.last_auth_type) +
|
||||
sizeof(hdd_sta_ctx->conn_info.dot11Mode);
|
||||
if (hdd_sta_ctx->conn_info.conn_flag.vht_present)
|
||||
nl_buf_len += sizeof(hdd_sta_ctx->conn_info.vht_caps);
|
||||
@@ -4479,7 +4479,7 @@ static int hdd_get_station_info(hdd_context_t *hdd_ctx,
|
||||
hdd_sta_ctx->conn_info.roam_count) ||
|
||||
nla_put_u32(skb, INFO_AKM,
|
||||
hdd_convert_auth_type(
|
||||
hdd_sta_ctx->conn_info.authType)) ||
|
||||
hdd_sta_ctx->conn_info.last_auth_type)) ||
|
||||
nla_put_u32(skb, WLAN802_11_MODE,
|
||||
hdd_convert_dot11mode(
|
||||
hdd_sta_ctx->conn_info.dot11Mode))) {
|
||||
|
@@ -6967,6 +6967,7 @@ static void csr_roam_process_join_res(tpAniSirGlobal mac_ctx,
|
||||
}
|
||||
session = CSR_GET_SESSION(mac_ctx, session_id);
|
||||
|
||||
qdf_mem_set(&roam_info, sizeof(roam_info), 0);
|
||||
conn_profile = &session->connectedProfile;
|
||||
if (eCsrReassocSuccess == res) {
|
||||
roam_info.reassoc = true;
|
||||
@@ -6976,7 +6977,6 @@ static void csr_roam_process_join_res(tpAniSirGlobal mac_ctx,
|
||||
ind_qos = SME_QOS_CSR_ASSOC_COMPLETE;
|
||||
}
|
||||
sme_debug("receives association indication");
|
||||
qdf_mem_set(&roam_info, sizeof(roam_info), 0);
|
||||
/* always free the memory here */
|
||||
if (session->pWpaRsnRspIE) {
|
||||
session->nWpaRsnRspIeLength = 0;
|
||||
|
Reference in New Issue
Block a user