From cbd74207c09ce96aa7d618f3c4d21a68c72b40db Mon Sep 17 00:00:00 2001
From: Jakob Olsson <jakob.olsson@iopsys.eu>
Date: Thu, 28 Sep 2023 17:20:47 +0200
Subject: [PATCH] delete sta ref cnt usage

---
 src/agent.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/agent.c b/src/agent.c
index 5e5c07b8d..6e7f0c064 100644
--- a/src/agent.c
+++ b/src/agent.c
@@ -1052,7 +1052,6 @@ static void wifi_sta_finalize(atimer_t *t)
 
 	list_for_each_entry_safe(p, tmp, &vif->stalist, list) {
 		if (!memcmp(p->macaddr, s->macaddr, 6)) {
-			s->ref--;
 			if (s->legacy_steered)
 				s->legacy_steered = false;
 
@@ -1087,7 +1086,6 @@ static int steer_sta_legacy(struct sta *s)
 	}
 
 	s->legacy_steered = true;
-	s->ref++;
 	dbg("Try to Legacy Steer " MACFMT " ------>\n", MAC2STR(s->macaddr));
 	wifi_disconnect_sta(vif->name, s->macaddr, reason);
 	wifiagent_log_steer(vif->agent, s->macaddr, vif->name,
@@ -1493,7 +1491,6 @@ static int wifi_add_sta(struct agent *a, const char *vif,
 		if (!memcmp(sptr->macaddr, macaddr, 6)) {
 			dbg("STA " MACFMT "already in list.\n",
 					MAC2STR(macaddr));
-			sptr->ref++;
 			if (sptr->legacy_steered) {
 				timer_set(&sptr->sta_finalize_timer,
 						ifptr->cfg->steer_legacy_retry_secs * 1000);
@@ -1511,7 +1508,6 @@ static int wifi_add_sta(struct agent *a, const char *vif,
 	memset(new, 0, sizeof(struct sta));
 	memcpy(new->macaddr, macaddr, 6);
 	new->vif = ifptr;
-	new->ref++;
 	timer_init(&new->sta_timer, wifi_sta_periodic_run);
 	timer_init(&new->sta_bcn_req_timer, wifi_sta_bcn_req);
 	timer_init(&new->sta_steer_timer, wifi_sta_steer_timeout);
-- 
GitLab