[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241224085050.61133-1-evepolonium@gmail.com>
Date: Tue, 24 Dec 2024 14:20:47 +0530
From: Atharva Tiwari <evepolonium@...il.com>
To:
Cc: evepolonium@...il.com,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Meir Elisha <meir6264@...il.com>,
Philipp Hortmann <philipp.g.hortmann@...il.com>,
Dan Carpenter <dan.carpenter@...aro.org>,
linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: [PATCH] staging: rtl8723bs: fix network selection in rtw_mlme.c
this patch fixes the network selection logic to avoid selectiong a network with the same ESSID as the oldest scanned network if it was scanned within the last 500 milisecond
and please give me a value for "new enough" on line 481
Signed-off-by: Atharva Tiwari <evepolonium@...il.com>
---
drivers/staging/rtl8723bs/core/rtw_mlme.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 5ded183aa08c..06db4f8a7e24 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -481,7 +481,9 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t
}
if (rtw_roam_flags(adapter)) {
- /* TODO: don't select network in the same ess as oldest if it's new enough*/
+ if (is_same_ess(&pnetwork->network, &oldest->network) &&
+ time_after(pnetwork->last_scanned, (unsigned long)msecs_to_jiffies(500)))
+ continue;
}
if (!oldest || time_after(oldest->last_scanned, pnetwork->last_scanned))
--
2.39.5
Powered by blists - more mailing lists