qcacld-3.0: Release MLD sta info

Currently, sta_info is allocated for MLD address but never freed. Add
logic to free the station info for MLD address too.

Change-Id: If957bb5e77e83f2bf272f2d4d58bd3ab8d5e19e0
CRs-fixed: 3059099
This commit is contained in:
Lincoln Tran
2021-10-20 17:08:29 -07:00
committed by Madan Koyyalamudi
parent ba278fcccd
commit 289154d1c8
2 changed files with 22 additions and 1 deletions

View File

@@ -1632,6 +1632,8 @@ static void hdd_fill_station_info(struct hdd_adapter *adapter,
} }
} }
qdf_mem_copy(&stainfo->mld_addr, &event->sta_mld, QDF_MAC_ADDR_SIZE);
cache_sta_info = cache_sta_info =
hdd_get_sta_info_by_mac(&adapter->cache_sta_info_list, hdd_get_sta_info_by_mac(&adapter->cache_sta_info_list,
event->staMac.bytes, event->staMac.bytes,
@@ -1909,7 +1911,8 @@ QDF_STATUS hdd_hostapd_sap_event_cb(struct sap_event *sap_event,
tSap_StationSetKeyCompleteEvent *key_complete; tSap_StationSetKeyCompleteEvent *key_complete;
int ret = 0; int ret = 0;
tSap_StationDisassocCompleteEvent *disassoc_comp; tSap_StationDisassocCompleteEvent *disassoc_comp;
struct hdd_station_info *stainfo, *cache_stainfo, *tmp = NULL; struct hdd_station_info *stainfo, *cache_stainfo, *tmp = NULL,
*mld_sta_info;
mac_handle_t mac_handle; mac_handle_t mac_handle;
struct sap_config *sap_config; struct sap_config *sap_config;
struct sap_context *sap_ctx = NULL; struct sap_context *sap_ctx = NULL;
@@ -2573,6 +2576,22 @@ QDF_STATUS hdd_hostapd_sap_event_cb(struct sap_event *sap_event,
return QDF_STATUS_E_INVAL; return QDF_STATUS_E_INVAL;
} }
if (wlan_vdev_mlme_is_mlo_vdev(adapter->vdev)) {
mld_sta_info = hdd_get_sta_info_by_mac(
&adapter->sta_info_list,
stainfo->mld_addr.bytes,
STA_INFO_HOSTAPD_SAP_EVENT_CB);
if (!mld_sta_info) {
hdd_debug("Failed to find the MLD station");
} else {
hdd_softap_deregister_sta(adapter,
&mld_sta_info);
hdd_put_sta_info_ref(&adapter->sta_info_list,
&mld_sta_info, true,
STA_INFO_HOSTAPD_SAP_EVENT_CB);
}
}
/* Send DHCP STOP indication to FW */ /* Send DHCP STOP indication to FW */
stainfo->dhcp_phase = DHCP_PHASE_ACK; stainfo->dhcp_phase = DHCP_PHASE_ACK;
if (stainfo->dhcp_nego_status == if (stainfo->dhcp_nego_status ==

View File

@@ -169,6 +169,7 @@ char *sta_info_string_from_dbgid(wlan_sta_info_dbgid id);
* Broadcast uses station ID zero by default. * Broadcast uses station ID zero by default.
* @sta_type: Type of station i.e. p2p client or infrastructure station * @sta_type: Type of station i.e. p2p client or infrastructure station
* @sta_mac: MAC address of the station * @sta_mac: MAC address of the station
* @mld_addr: MLD address of the station
* @peer_state: Current Station state so HDD knows how to deal with packet * @peer_state: Current Station state so HDD knows how to deal with packet
* queue. Most recent states used to change TLSHIM STA state. * queue. Most recent states used to change TLSHIM STA state.
* @is_qos_enabled: Track QoS status of station * @is_qos_enabled: Track QoS status of station
@@ -236,6 +237,7 @@ struct hdd_station_info {
uint8_t sta_id; uint8_t sta_id;
eStationType sta_type; eStationType sta_type;
struct qdf_mac_addr sta_mac; struct qdf_mac_addr sta_mac;
struct qdf_mac_addr mld_addr;
enum ol_txrx_peer_state peer_state; enum ol_txrx_peer_state peer_state;
bool is_qos_enabled; bool is_qos_enabled;
bool is_deauth_in_progress; bool is_deauth_in_progress;