public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8723bs: fix network selection in rtw_mlme.c
@ 2024-12-24  8:50 Atharva Tiwari
  2024-12-24  8:54 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Atharva Tiwari @ 2024-12-24  8:50 UTC (permalink / raw)
  Cc: evepolonium, Greg Kroah-Hartman, Meir Elisha, Philipp Hortmann,
	Dan Carpenter, linux-staging, linux-kernel

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@gmail.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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging: rtl8723bs: fix network selection in rtw_mlme.c
  2024-12-24  8:50 [PATCH] staging: rtl8723bs: fix network selection in rtw_mlme.c Atharva Tiwari
@ 2024-12-24  8:54 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2024-12-24  8:54 UTC (permalink / raw)
  To: Atharva Tiwari
  Cc: Meir Elisha, Philipp Hortmann, Dan Carpenter, linux-staging,
	linux-kernel

On Tue, Dec 24, 2024 at 02:20:47PM +0530, Atharva Tiwari wrote:
> 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@gmail.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
> 
> 

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- This looks like a new version of a previously submitted patch, but you
  did not list below the --- line any changes from the previous version.
  Please read the section entitled "The canonical patch format" in the
  kernel file, Documentation/process/submitting-patches.rst for what
  needs to be done here to properly describe this.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-12-24  8:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-24  8:50 [PATCH] staging: rtl8723bs: fix network selection in rtw_mlme.c Atharva Tiwari
2024-12-24  8:54 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox