From 4ac15845277e4dc1f80d249cd77e4d6dc9a41a55 Mon Sep 17 00:00:00 2001 From: Yeshwanth Sriram Guntuka Date: Tue, 16 Jul 2019 15:47:21 +0530 Subject: [PATCH] qcacld-3.0: Cleanup sta_index in TDLS structures and APIs Remove sta index references in TDLS structures and APIs and mac address would be used instead to refer the peer. Change-Id: I861f7ce068f3f545598129b9f3955b84b2a6fbce CRs-Fixed: 2524512 --- .../tdls/core/src/wlan_tdls_cmds_process.c | 58 +++++++++---------- components/tdls/core/src/wlan_tdls_ct.c | 28 ++++----- components/tdls/core/src/wlan_tdls_main.c | 12 ++-- components/tdls/core/src/wlan_tdls_main.h | 9 +-- components/tdls/core/src/wlan_tdls_peer.c | 10 ++-- components/tdls/core/src/wlan_tdls_peer.h | 9 ++- .../dispatcher/inc/wlan_tdls_public_structs.h | 9 --- .../tdls/dispatcher/src/wlan_tdls_ucfg_api.c | 2 +- core/hdd/inc/wlan_hdd_assoc.h | 4 +- core/hdd/inc/wlan_hdd_tdls.h | 6 +- core/hdd/src/wlan_hdd_assoc.c | 3 +- core/hdd/src/wlan_hdd_tdls.c | 5 +- core/mac/src/pe/lim/lim_api.c | 1 - core/mac/src/pe/lim/lim_assoc_utils.c | 16 +---- .../src/pe/lim/lim_send_management_frames.c | 1 - core/mac/src/pe/lim/lim_send_messages.c | 4 +- core/sme/inc/sme_api.h | 2 +- core/wma/src/wma_dev_if.c | 2 +- 18 files changed, 74 insertions(+), 107 deletions(-) diff --git a/components/tdls/core/src/wlan_tdls_cmds_process.c b/components/tdls/core/src/wlan_tdls_cmds_process.c index fa71165d90..2a8c03c59e 100644 --- a/components/tdls/core/src/wlan_tdls_cmds_process.c +++ b/components/tdls/core/src/wlan_tdls_cmds_process.c @@ -459,9 +459,9 @@ static QDF_STATUS tdls_activate_add_peer(struct tdls_add_peer_request *req) /* in add station, we accept existing valid sta_id if there is */ if ((peer->link_status > TDLS_LINK_CONNECTING) || - (TDLS_STA_INDEX_CHECK((peer->sta_id)))) { - tdls_notice("link_status %d sta_id %d add peer ignored", - peer->link_status, peer->sta_id); + (peer->valid_entry)) { + tdls_notice("link_status %d add peer ignored", + peer->link_status); status = QDF_STATUS_SUCCESS; goto addrsp; } @@ -911,19 +911,17 @@ tdls_activate_update_peer(struct tdls_update_peer_request *req) /* in change station, we accept only when sta_id is valid */ if (curr_peer->link_status == TDLS_LINK_TEARING || - !(TDLS_STA_INDEX_CHECK(curr_peer->sta_id))) { - tdls_err(QDF_MAC_ADDR_STR " link %d. sta %d. update peer rejected", - QDF_MAC_ADDR_ARRAY(mac), curr_peer->link_status, - curr_peer->sta_id); + !curr_peer->valid_entry) { + tdls_err(QDF_MAC_ADDR_STR " link %d. update peer rejected", + QDF_MAC_ADDR_ARRAY(mac), curr_peer->link_status); status = QDF_STATUS_E_PERM; goto updatersp; } if (curr_peer->link_status == TDLS_LINK_CONNECTED && - TDLS_STA_INDEX_CHECK(curr_peer->sta_id)) { - tdls_err(QDF_MAC_ADDR_STR " link %d. sta %d. update peer is igonored as tdls state is already connected ", - QDF_MAC_ADDR_ARRAY(mac), curr_peer->link_status, - curr_peer->sta_id); + curr_peer->valid_entry) { + tdls_err(QDF_MAC_ADDR_STR " link %d. update peer is igonored as tdls state is already connected ", + QDF_MAC_ADDR_ARRAY(mac), curr_peer->link_status); status = QDF_STATUS_SUCCESS; goto updatersp; } @@ -1178,7 +1176,7 @@ QDF_STATUS tdls_process_del_peer(struct tdls_oper_request *req) mac = req->peer_addr; peer = tdls_find_peer(vdev_obj, mac); - if (!peer || !(TDLS_STA_INDEX_CHECK((peer->sta_id)))) { + if (!peer) { tdls_err(QDF_MAC_ADDR_STR " not found, ignore NL80211_TDLS_ENABLE_LINK", QDF_MAC_ADDR_ARRAY(mac)); @@ -1420,23 +1418,22 @@ static QDF_STATUS tdls_add_peer_rsp(struct tdls_add_sta_rsp *rsp) conn_rec = soc_obj->tdls_conn_info; for (sta_idx = 0; sta_idx < soc_obj->max_num_tdls_sta; sta_idx++) { - if (INVALID_TDLS_PEER_ID == conn_rec[sta_idx].sta_id) { + if (!conn_rec[sta_idx].valid_entry) { conn_rec[sta_idx].session_id = rsp->session_id; - conn_rec[sta_idx].sta_id = rsp->sta_id; + conn_rec[sta_idx].valid_entry = true; conn_rec[sta_idx].index = sta_idx; qdf_copy_macaddr(&conn_rec[sta_idx].peer_mac, &rsp->peermac); - tdls_warn("TDLS: STA IDX at %d is %d of mac " - QDF_MAC_ADDR_STR, sta_idx, - rsp->sta_id, QDF_MAC_ADDR_ARRAY + tdls_warn("TDLS: Add sta mac " + QDF_MAC_ADDR_STR, + QDF_MAC_ADDR_ARRAY (rsp->peermac.bytes)); break; } } if (sta_idx < soc_obj->max_num_tdls_sta) { - status = tdls_set_sta_id(vdev_obj, rsp->peermac.bytes, - rsp->sta_id); + status = tdls_set_valid(vdev_obj, rsp->peermac.bytes); if (QDF_IS_STATUS_ERROR(status)) { tdls_err("set staid failed"); status = QDF_STATUS_E_FAILURE; @@ -1507,11 +1504,12 @@ QDF_STATUS tdls_process_del_peer_rsp(struct tdls_del_sta_rsp *rsp) conn_rec = soc_obj->tdls_conn_info; for (sta_idx = 0; sta_idx < soc_obj->max_num_tdls_sta; sta_idx++) { if (conn_rec[sta_idx].session_id != rsp->session_id || - conn_rec[sta_idx].sta_id != rsp->sta_id) + qdf_mem_cmp(conn_rec[sta_idx].peer_mac.bytes, + rsp->peermac.bytes, QDF_MAC_ADDR_SIZE)) continue; macaddr = rsp->peermac.bytes; - tdls_warn("TDLS: del STA IDX = %x", rsp->sta_id); + tdls_warn("TDLS: del STA"); curr_peer = tdls_find_peer(vdev_obj, macaddr); if (curr_peer) { tdls_debug(QDF_MAC_ADDR_STR " status is %d", @@ -1533,7 +1531,7 @@ QDF_STATUS tdls_process_del_peer_rsp(struct tdls_del_sta_rsp *rsp) } } tdls_reset_peer(vdev_obj, macaddr); - conn_rec[sta_idx].sta_id = INVALID_TDLS_PEER_ID; + conn_rec[sta_idx].valid_entry = false; conn_rec[sta_idx].session_id = 0xff; conn_rec[sta_idx].index = INVALID_TDLS_PEER_INDEX; qdf_mem_zero(&conn_rec[sta_idx].peer_mac, @@ -1635,9 +1633,9 @@ QDF_STATUS tdls_process_enable_link(struct tdls_oper_request *req) tdls_debug("enable link for peer " QDF_MAC_ADDR_STR " link state %d", QDF_MAC_ADDR_ARRAY(mac), peer->link_status); - if (!TDLS_STA_INDEX_CHECK(peer->sta_id)) { - tdls_err("invalid sta idx %u for " QDF_MAC_ADDR_STR, - peer->sta_id, QDF_MAC_ADDR_ARRAY(mac)); + if (!peer->valid_entry) { + tdls_err("invalid entry " QDF_MAC_ADDR_STR, + QDF_MAC_ADDR_ARRAY(mac)); status = QDF_STATUS_E_INVAL; goto error; } @@ -1649,8 +1647,7 @@ QDF_STATUS tdls_process_enable_link(struct tdls_oper_request *req) id = wlan_vdev_get_id(vdev); status = soc_obj->tdls_reg_peer(soc_obj->tdls_peer_context, - id, mac, peer->sta_id, - peer->qos); + id, mac, peer->qos); if (QDF_IS_STATUS_ERROR(status)) { tdls_err("TDLS register peer fail, status %d", status); goto error; @@ -2154,7 +2151,7 @@ static int tdls_teardown_links(struct tdls_soc_priv_obj *soc_obj, uint32_t mode) conn_rec = soc_obj->tdls_conn_info; for (staidx = 0; staidx < soc_obj->max_num_tdls_sta; staidx++) { - if (conn_rec[staidx].sta_id == INVALID_TDLS_PEER_ID) + if (!conn_rec[staidx].valid_entry) continue; curr_peer = tdls_find_all_peer(soc_obj, @@ -2166,8 +2163,9 @@ static int tdls_teardown_links(struct tdls_soc_priv_obj *soc_obj, uint32_t mode) if (curr_peer->spatial_streams == HW_MODE_SS_1x1) continue; - tdls_debug("Indicate TDLS teardown (staId %d)", - curr_peer->sta_id); + tdls_debug("Indicate TDLS teardown peer bssid " + QDF_MAC_ADDR_STR, QDF_MAC_ADDR_ARRAY( + curr_peer->peer_mac.bytes)); tdls_indicate_teardown(curr_peer->vdev_priv, curr_peer, TDLS_TEARDOWN_PEER_UNSPEC_REASON); diff --git a/components/tdls/core/src/wlan_tdls_ct.c b/components/tdls/core/src/wlan_tdls_ct.c index d5cf9a3f0d..e4283f0d7a 100644 --- a/components/tdls/core/src/wlan_tdls_ct.c +++ b/components/tdls/core/src/wlan_tdls_ct.c @@ -549,26 +549,29 @@ void tdls_indicate_teardown(struct tdls_vdev_priv_obj *tdls_vdev, /** * tdls_get_conn_info() - get the tdls connection information. * @tdls_soc: tdls soc object - * @idx: sta id + * @peer_mac: peer MAC address * * Function to check tdls sta index * * Return: tdls connection information */ static struct tdls_conn_info * -tdls_get_conn_info(struct tdls_soc_priv_obj *tdls_soc, uint8_t idx) +tdls_get_conn_info(struct tdls_soc_priv_obj *tdls_soc, + struct qdf_mac_addr *peer_mac) { uint8_t sta_idx; /* check if there is available index for this new TDLS STA */ for (sta_idx = 0; sta_idx < WLAN_TDLS_STA_MAX_NUM; sta_idx++) { - if (idx == tdls_soc->tdls_conn_info[sta_idx].sta_id) { - tdls_debug("tdls peer with sta_idx %u exists", idx); + if (!qdf_mem_cmp( + tdls_soc->tdls_conn_info[sta_idx].peer_mac.bytes, + peer_mac->bytes, QDF_MAC_ADDR_SIZE)) { + tdls_debug("tdls peer exists %pM", peer_mac->bytes); tdls_soc->tdls_conn_info[sta_idx].index = sta_idx; return &tdls_soc->tdls_conn_info[sta_idx]; } } - tdls_err("tdls peer with staIdx %u not exists", idx); + tdls_err("tdls peer does not exists"); return NULL; } @@ -584,7 +587,7 @@ tdls_ct_process_idle_handler(struct wlan_objmgr_vdev *vdev, &tdls_soc_obj)) return; - if (INVALID_TDLS_PEER_ID == tdls_info->sta_id) { + if (!tdls_info->valid_entry) { tdls_err("peer doesn't exists"); return; } @@ -715,9 +718,9 @@ static void tdls_ct_process_connected_link( (curr_peer->rx_pkt < tdls_vdev->threshold_config.idle_packet_n))) { if (!curr_peer->is_peer_idle_timer_initialised) { - uint8_t sta_id = (uint8_t)curr_peer->sta_id; struct tdls_conn_info *tdls_info; - tdls_info = tdls_get_conn_info(tdls_soc, sta_id); + tdls_info = tdls_get_conn_info(tdls_soc, + &curr_peer->peer_mac); qdf_mc_timer_init(&curr_peer->peer_idle_timer, QDF_TIMER_TYPE_SW, tdls_ct_idle_handler, @@ -1258,8 +1261,7 @@ void tdls_disable_offchan_and_teardown_links( for (staidx = 0; staidx < tdls_soc->max_num_tdls_sta; staidx++) { - if (tdls_soc->tdls_conn_info[staidx].sta_id - == INVALID_TDLS_PEER_ID) + if (!tdls_soc->tdls_conn_info[staidx].valid_entry) continue; curr_peer = tdls_find_all_peer(tdls_soc, @@ -1267,8 +1269,8 @@ void tdls_disable_offchan_and_teardown_links( if (!curr_peer) continue; - tdls_notice("indicate TDLS teardown (staId %d)", - curr_peer->sta_id); + tdls_notice("indicate TDLS teardown %pM", + curr_peer->peer_mac.bytes); /* Indicate teardown to supplicant */ tdls_indicate_teardown(tdls_vdev, @@ -1287,7 +1289,7 @@ void tdls_disable_offchan_and_teardown_links( wlan_vdev_get_id(vdev), &curr_peer->peer_mac); tdls_decrement_peer_count(tdls_soc); - tdls_soc->tdls_conn_info[staidx].sta_id = INVALID_TDLS_PEER_ID; + tdls_soc->tdls_conn_info[staidx].valid_entry = false; tdls_soc->tdls_conn_info[staidx].session_id = 255; tdls_soc->tdls_conn_info[staidx].index = INVALID_TDLS_PEER_INDEX; diff --git a/components/tdls/core/src/wlan_tdls_main.c b/components/tdls/core/src/wlan_tdls_main.c index cc82727184..5e8cfdfe64 100644 --- a/components/tdls/core/src/wlan_tdls_main.c +++ b/components/tdls/core/src/wlan_tdls_main.c @@ -417,9 +417,8 @@ static int __tdls_get_all_peers_from_list( if (buf_len < 32 + 1) break; len = qdf_scnprintf(buf, buf_len, - QDF_MAC_ADDR_STR "%3d%4s%3s%5d\n", + QDF_MAC_ADDR_STR "%4s%3s%5d\n", QDF_MAC_ADDR_ARRAY(curr_peer->peer_mac.bytes), - curr_peer->sta_id, (curr_peer->tdls_support == TDLS_CAP_SUPPORTED) ? "Y" : "N", TDLS_IS_LINK_CONNECTED(curr_peer) ? "Y" : @@ -492,8 +491,7 @@ static QDF_STATUS tdls_process_reset_all_peers(struct wlan_objmgr_vdev *vdev) reset_session_id = tdls_vdev->session_id; for (staidx = 0; staidx < tdls_soc->max_num_tdls_sta; staidx++) { - if (tdls_soc->tdls_conn_info[staidx].sta_id - == INVALID_TDLS_PEER_ID) + if (!tdls_soc->tdls_conn_info[staidx].valid_entry) continue; if (tdls_soc->tdls_conn_info[staidx].session_id != reset_session_id) @@ -506,8 +504,8 @@ static QDF_STATUS tdls_process_reset_all_peers(struct wlan_objmgr_vdev *vdev) if (!curr_peer) continue; - tdls_notice("indicate TDLS teardown (staId %d)", - curr_peer->sta_id); + tdls_notice("indicate TDLS teardown %pM", + curr_peer->peer_mac.bytes); /* Indicate teardown to supplicant */ tdls_indicate_teardown(tdls_vdev, @@ -522,7 +520,7 @@ static QDF_STATUS tdls_process_reset_all_peers(struct wlan_objmgr_vdev *vdev) wlan_vdev_get_id(vdev), &curr_peer->peer_mac); tdls_decrement_peer_count(tdls_soc); - tdls_soc->tdls_conn_info[staidx].sta_id = INVALID_TDLS_PEER_ID; + tdls_soc->tdls_conn_info[staidx].valid_entry = false; tdls_soc->tdls_conn_info[staidx].session_id = 255; tdls_soc->tdls_conn_info[staidx].index = INVALID_TDLS_PEER_INDEX; diff --git a/components/tdls/core/src/wlan_tdls_main.h b/components/tdls/core/src/wlan_tdls_main.h index 6372d8db8d..12ee0ea7de 100644 --- a/components/tdls/core/src/wlan_tdls_main.h +++ b/components/tdls/core/src/wlan_tdls_main.h @@ -94,13 +94,13 @@ /** * struct tdls_conn_info - TDLS connection record * @session_id: session id - * @sta_id: sta id + * @valid_entry: valid entry(set to true upon peer create resp from firmware) * @peer_mac: peer address * @index: index to store array offset. */ struct tdls_conn_info { uint8_t session_id; - uint8_t sta_id; + bool valid_entry; uint8_t index; struct qdf_mac_addr peer_mac; }; @@ -273,7 +273,8 @@ struct tdls_peer_mlme_info { * @node: node * @vdev_priv: tdls vdev priv obj * @peer_mac: peer mac address - * @sta_id: station identifier + * @valid_entry: entry valid or not (set to true when peer create resp is + * received from FW) * @rssi: rssi * @tdls_support: tdls support * @link_status: tdls link status @@ -304,7 +305,7 @@ struct tdls_peer { qdf_list_node_t node; struct tdls_vdev_priv_obj *vdev_priv; struct qdf_mac_addr peer_mac; - uint16_t sta_id; + bool valid_entry; int8_t rssi; enum tdls_peer_capab tdls_support; enum tdls_link_state link_status; diff --git a/components/tdls/core/src/wlan_tdls_peer.c b/components/tdls/core/src/wlan_tdls_peer.c index 1d5051de61..34e74b0602 100644 --- a/components/tdls/core/src/wlan_tdls_peer.c +++ b/components/tdls/core/src/wlan_tdls_peer.c @@ -187,7 +187,7 @@ static struct tdls_peer *tdls_add_peer(struct tdls_vdev_priv_obj *vdev_obj, peer->pref_off_chan_num, soc_obj->tdls_configs.tdls_pre_off_chan_bw); - peer->sta_id = INVALID_TDLS_PEER_ID; + peer->valid_entry = false; qdf_list_insert_back(head, &peer->node); @@ -683,8 +683,8 @@ void tdls_set_peer_caps(struct tdls_vdev_priv_obj *vdev_obj, curr_peer->qos = is_qos_wmm_sta; } -QDF_STATUS tdls_set_sta_id(struct tdls_vdev_priv_obj *vdev_obj, - const uint8_t *macaddr, uint8_t sta_id) +QDF_STATUS tdls_set_valid(struct tdls_vdev_priv_obj *vdev_obj, + const uint8_t *macaddr) { struct tdls_peer *peer; @@ -694,7 +694,7 @@ QDF_STATUS tdls_set_sta_id(struct tdls_vdev_priv_obj *vdev_obj, return QDF_STATUS_E_FAILURE; } - peer->sta_id = sta_id; + peer->valid_entry = true; return QDF_STATUS_SUCCESS; } @@ -770,7 +770,7 @@ QDF_STATUS tdls_reset_peer(struct tdls_vdev_priv_obj *vdev_obj, tdls_set_peer_link_status(curr_peer, TDLS_LINK_IDLE, TDLS_LINK_UNSPECIFIED); - curr_peer->sta_id = INVALID_TDLS_PEER_ID; + curr_peer->valid_entry = false; return QDF_STATUS_SUCCESS; } diff --git a/components/tdls/core/src/wlan_tdls_peer.h b/components/tdls/core/src/wlan_tdls_peer.h index 41ffa8096f..aa6f339eab 100644 --- a/components/tdls/core/src/wlan_tdls_peer.h +++ b/components/tdls/core/src/wlan_tdls_peer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2019 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 @@ -163,15 +163,14 @@ void tdls_set_peer_caps(struct tdls_vdev_priv_obj *vdev_obj, struct tdls_update_peer_params *req_info); /** - * tdls_set_sta_id() - set station ID on a TDLS peer + * tdls_set_valid() - set station ID on a TDLS peer * @vdev_obj: TDLS vdev object * @macaddr: MAC address of the TDLS peer - * @sta_id: station ID * * Return: QDF_STATUS_SUCCESS if success; other values if failed */ -QDF_STATUS tdls_set_sta_id(struct tdls_vdev_priv_obj *vdev_obj, - const uint8_t *macaddr, uint8_t sta_id); +QDF_STATUS tdls_set_valid(struct tdls_vdev_priv_obj *vdev_obj, + const uint8_t *macaddr); /** * tdls_set_force_peer() - set/clear is_forced_peer flag on peer diff --git a/components/tdls/dispatcher/inc/wlan_tdls_public_structs.h b/components/tdls/dispatcher/inc/wlan_tdls_public_structs.h index c4699a638d..f158dfb0d5 100644 --- a/components/tdls/dispatcher/inc/wlan_tdls_public_structs.h +++ b/components/tdls/dispatcher/inc/wlan_tdls_public_structs.h @@ -86,12 +86,8 @@ #define TDLS_TEARDOWN_PEER_UNREACHABLE 25 #define TDLS_TEARDOWN_PEER_UNSPEC_REASON 26 -#define INVALID_TDLS_PEER_ID 0xFF #define INVALID_TDLS_PEER_INDEX 0xFF -#define TDLS_STA_INDEX_CHECK(sta_id) \ - (((sta_id) >= 0) && ((sta_id) < 0xFF)) - /** * enum tdls_add_oper - add peer type * @TDLS_OPER_NONE: none @@ -599,7 +595,6 @@ typedef void (*tdls_evt_callback) (void *data, typedef QDF_STATUS (*tdls_register_peer_callback)(void *userdata, uint32_t vdev_id, const uint8_t *mac, - uint16_t stat_id, uint8_t qos); /* This callback is used to deregister TDLS peer from the datapath */ @@ -1212,7 +1207,6 @@ struct tdls_mgmt_tx_completion_ind { * @status_code: status code as tSirResultCodes * @peermac: MAC address of the TDLS peer * @session_id: session id - * @sta_id: sta id * @sta_type: sta type * @tdls_oper: add peer type * @psoc: soc object @@ -1221,7 +1215,6 @@ struct tdls_add_sta_rsp { QDF_STATUS status_code; struct qdf_mac_addr peermac; uint8_t session_id; - uint16_t sta_id; uint16_t sta_type; enum tdls_add_oper tdls_oper; struct wlan_objmgr_psoc *psoc; @@ -1232,14 +1225,12 @@ struct tdls_add_sta_rsp { * @session_id: session id * @status_code: status code as tSirResultCodes * @peermac: MAC address of the TDLS peer - * @sta_id: sta id * @psoc: soc object */ struct tdls_del_sta_rsp { uint8_t session_id; QDF_STATUS status_code; struct qdf_mac_addr peermac; - uint16_t sta_id; struct wlan_objmgr_psoc *psoc; }; diff --git a/components/tdls/dispatcher/src/wlan_tdls_ucfg_api.c b/components/tdls/dispatcher/src/wlan_tdls_ucfg_api.c index 0489838894..ec813b5282 100644 --- a/components/tdls/dispatcher/src/wlan_tdls_ucfg_api.c +++ b/components/tdls/dispatcher/src/wlan_tdls_ucfg_api.c @@ -340,7 +340,7 @@ QDF_STATUS ucfg_tdls_update_config(struct wlan_objmgr_psoc *psoc, soc_obj->max_num_tdls_sta = WLAN_TDLS_STA_MAX_NUM; for (sta_idx = 0; sta_idx < soc_obj->max_num_tdls_sta; sta_idx++) { - soc_obj->tdls_conn_info[sta_idx].sta_id = INVALID_TDLS_PEER_ID; + soc_obj->tdls_conn_info[sta_idx].valid_entry = false; soc_obj->tdls_conn_info[sta_idx].index = INVALID_TDLS_PEER_INDEX; soc_obj->tdls_conn_info[sta_idx].session_id = 255; diff --git a/core/hdd/inc/wlan_hdd_assoc.h b/core/hdd/inc/wlan_hdd_assoc.h index f9f7de090c..c5111410d5 100644 --- a/core/hdd/inc/wlan_hdd_assoc.h +++ b/core/hdd/inc/wlan_hdd_assoc.h @@ -327,7 +327,6 @@ int hdd_set_csr_auth_type(struct hdd_adapter *adapter, * hdd_roam_register_tdlssta() - register new TDLS station * @adapter: pointer to adapter * @peerMac: pointer to peer MAC address - * @staId: station identifier * @qos: Quality of service * * Construct the txrx_desc and register the new STA with the Data Plane. @@ -336,8 +335,7 @@ int hdd_set_csr_auth_type(struct hdd_adapter *adapter, * Return: QDF_STATUS enumeration */ QDF_STATUS hdd_roam_register_tdlssta(struct hdd_adapter *adapter, - const uint8_t *peerMac, uint16_t staId, - uint8_t qos); + const uint8_t *peerMac, uint8_t qos); /** * hdd_roam_deregister_tdlssta() - deregister new TDLS station * @adapter: pointer to adapter diff --git a/core/hdd/inc/wlan_hdd_tdls.h b/core/hdd/inc/wlan_hdd_tdls.h index 79767ca934..bda94d24a7 100644 --- a/core/hdd/inc/wlan_hdd_tdls.h +++ b/core/hdd/inc/wlan_hdd_tdls.h @@ -160,8 +160,7 @@ int wlan_hdd_cfg80211_configure_tdls_mode(struct wiphy *wiphy, int data_len); QDF_STATUS hdd_tdls_register_peer(void *userdata, uint32_t vdev_id, - const uint8_t *mac, uint16_t sta_id, - uint8_t qos); + const uint8_t *mac, uint8_t qos); QDF_STATUS hdd_tdls_deregister_peer(void *userdata, uint32_t vdev_id, struct qdf_mac_addr *peer_mac); @@ -193,8 +192,7 @@ static inline int wlan_hdd_cfg80211_configure_tdls_mode(struct wiphy *wiphy, static inline QDF_STATUS hdd_tdls_register_peer(void *userdata, uint32_t vdev_id, - const uint8_t *mac, uint16_t sta_id, - uint8_t qos) + const uint8_t *mac, uint8_t qos) { return QDF_STATUS_SUCCESS; } diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index 4a5c8af73d..6baa7d56d0 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -4023,8 +4023,7 @@ roam_roam_connect_status_update_handler(struct hdd_adapter *adapter, #ifdef FEATURE_WLAN_TDLS QDF_STATUS hdd_roam_register_tdlssta(struct hdd_adapter *adapter, - const uint8_t *peerMac, uint16_t sta_id, - uint8_t qos) + const uint8_t *peerMac, uint8_t qos) { QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE; struct ol_txrx_desc_type txrx_desc = { 0 }; diff --git a/core/hdd/src/wlan_hdd_tdls.c b/core/hdd/src/wlan_hdd_tdls.c index c0b605815f..efc308abfe 100644 --- a/core/hdd/src/wlan_hdd_tdls.c +++ b/core/hdd/src/wlan_hdd_tdls.c @@ -835,8 +835,7 @@ int wlan_hdd_tdls_antenna_switch(struct hdd_context *hdd_ctx, } QDF_STATUS hdd_tdls_register_peer(void *userdata, uint32_t vdev_id, - const uint8_t *mac, uint16_t sta_id, - uint8_t qos) + const uint8_t *mac, uint8_t qos) { struct hdd_adapter *adapter; struct hdd_context *hddctx; @@ -852,7 +851,7 @@ QDF_STATUS hdd_tdls_register_peer(void *userdata, uint32_t vdev_id, return QDF_STATUS_E_FAILURE; } - return hdd_roam_register_tdlssta(adapter, mac, sta_id, qos); + return hdd_roam_register_tdlssta(adapter, mac, qos); } QDF_STATUS hdd_tdls_deregister_peer(void *userdata, uint32_t vdev_id, diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c index b0d1bc83df..0c569be526 100644 --- a/core/mac/src/pe/lim/lim_api.c +++ b/core/mac/src/pe/lim/lim_api.c @@ -2416,7 +2416,6 @@ pe_roam_synch_callback(struct mac_context *mac_ctx, return status; } - curr_sta_ds->staIndex = add_bss_params->staContext.staIdx; mac_ctx->roam.reassocRespLen = roam_sync_ind_ptr->reassocRespLength; mac_ctx->roam.pReassocResp = qdf_mem_malloc(mac_ctx->roam.reassocRespLen); diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c index 74c28beea7..bf3ec5fec8 100644 --- a/core/mac/src/pe/lim/lim_assoc_utils.c +++ b/core/mac/src/pe/lim/lim_assoc_utils.c @@ -2301,21 +2301,7 @@ lim_add_sta(struct mac_context *mac_ctx, pe_debug("Assoc ID: %d wmmEnabled: %d listenInterval: %d", add_sta_params->assocId, add_sta_params->wmmEnabled, add_sta_params->listenInterval); - /* This will indicate HAL to "allocate" a new STA index */ -#ifdef FEATURE_WLAN_TDLS - /* - * As there is corner case in-between add_sta and change_sta,if del_sta - * for other staIdx happened, firmware return wrong staIdx - * (recently removed staIdx). Until we get a confirmation from the - * firmware team it is now return correct staIdx for same sta_mac_addr - * for update case, we want to get around it by passing valid staIdx - * given by add_sta time. - */ - if ((STA_ENTRY_TDLS_PEER == sta_ds->staType) && (true == update_entry)) - add_sta_params->staIdx = sta_ds->staIndex; - else -#endif - add_sta_params->staIdx = STA_INVALID_IDX; + add_sta_params->staType = sta_ds->staType; add_sta_params->updateSta = update_entry; diff --git a/core/mac/src/pe/lim/lim_send_management_frames.c b/core/mac/src/pe/lim/lim_send_management_frames.c index 0559316839..9ac12f21e3 100644 --- a/core/mac/src/pe/lim/lim_send_management_frames.c +++ b/core/mac/src/pe/lim/lim_send_management_frames.c @@ -1102,7 +1102,6 @@ static QDF_STATUS lim_assoc_rsp_tx_complete( msg.type = eWNI_SME_ASSOC_IND_UPPER_LAYER; msg.bodyptr = sme_assoc_ind; msg.bodyval = 0; - sme_assoc_ind->staId = sta_ds->staIndex; sme_assoc_ind->reassocReq = sta_ds->mlmStaContext.subType; sme_assoc_ind->timingMeasCap = sta_ds->timingMeasCap; MTRACE(mac_trace_msg_tx(mac_ctx, session_entry->peSessionId, msg.type)); diff --git a/core/mac/src/pe/lim/lim_send_messages.c b/core/mac/src/pe/lim/lim_send_messages.c index 9836adc8d4..44b78aeb5c 100644 --- a/core/mac/src/pe/lim/lim_send_messages.c +++ b/core/mac/src/pe/lim/lim_send_messages.c @@ -481,8 +481,8 @@ QDF_STATUS lim_send_ht40_obss_scanind(struct mac_context *mac_ctx, if (!ht40_obss_scanind) return QDF_STATUS_E_FAILURE; QDF_TRACE(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_ERROR, - "OBSS Scan Indication bss_idx- %d bssid " QDF_MAC_ADDR_STR, - session->bss_idx, QDF_MAC_ADDR_ARRAY(session->bssId)); + "OBSS Scan Indication bssid " QDF_MAC_ADDR_STR, + QDF_MAC_ADDR_ARRAY(session->bssId)); ht40_obss_scanind->cmd = HT40_OBSS_SCAN_PARAM_START; ht40_obss_scanind->scan_type = eSIR_ACTIVE_SCAN; diff --git a/core/sme/inc/sme_api.h b/core/sme/inc/sme_api.h index 5541323389..40f750dd96 100644 --- a/core/sme/inc/sme_api.h +++ b/core/sme/inc/sme_api.h @@ -1120,7 +1120,7 @@ QDF_STATUS sme_request_ibss_peer_info(mac_handle_t mac_handle, void *cb_context, ibss_peer_info_cb peer_info_cb, bool allPeerInfoReqd, - uint8_t *mac_addr); + uint8_t *mac_addr) { return QDF_STATUS_SUCCESS; } diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index 1063d6c151..5cab390d18 100644 --- a/core/wma/src/wma_dev_if.c +++ b/core/wma/src/wma_dev_if.c @@ -2944,7 +2944,7 @@ int wma_peer_assoc_conf_handler(void *handle, uint8_t *cmd_param_info, /* peer assoc conf event means the cmd succeeds */ params->status = QDF_STATUS_SUCCESS; - WMA_LOGD(FL("Send ADD_STA_RSP: statype %d vdev_id %d aid %d bssid %pM status %d") + WMA_LOGD(FL("Send ADD_STA_RSP: statype %d vdev_id %d aid %d bssid %pM status %d"), params->staType, params->smesessionId, params->assocId, params->bssId, params->status);