All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mac80211: fix to follow standard
@ 2018-08-28  2:24 Yuan-Chi Pang
  2018-08-28  9:23 ` Sergei Shtylyov
  2018-08-28 12:44 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Yuan-Chi Pang @ 2018-08-28  2:24 UTC (permalink / raw)
  To: johannes; +Cc: davem, linux-wireless, netdev, linux-kernel, fu3mo6goo

IEEE 802.11-2016 14.10.8.3 HWMP sequence numbering says:
If it is a target mesh STA, it shall update its own HWMP SN to
maximum (current HWMP SN, target HWMP SN in the PREQ element) + 1
immediately before it generates a PREP element in response to a
PREQ element.

Signed-off-by: Yuan-Chi Pang <fu3mo6goo@gmail.com>
---
 net/mac80211/mesh_hwmp.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index 35ad398..6c21a26 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -572,6 +572,11 @@ static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata,
 		forward = false;
 		reply = true;
 		target_metric = 0;
+
+		if (SN_GT(target_sn, ifmsh->sn)) {
+			ifmsh->sn = target_sn;
+		}
+
 		if (time_after(jiffies, ifmsh->last_sn_update +
 					net_traversal_jiffies(sdata)) ||
 		    time_before(jiffies, ifmsh->last_sn_update)) {
-- 
2.7.4

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

* Re: [PATCH] mac80211: fix to follow standard
  2018-08-28  2:24 [PATCH] mac80211: fix to follow standard Yuan-Chi Pang
@ 2018-08-28  9:23 ` Sergei Shtylyov
  2018-08-28 12:44 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2018-08-28  9:23 UTC (permalink / raw)
  To: Yuan-Chi Pang, johannes; +Cc: davem, linux-wireless, netdev, linux-kernel

Hello!

On 8/28/2018 5:24 AM, Yuan-Chi Pang wrote:

> IEEE 802.11-2016 14.10.8.3 HWMP sequence numbering says:
> If it is a target mesh STA, it shall update its own HWMP SN to
> maximum (current HWMP SN, target HWMP SN in the PREQ element) + 1
> immediately before it generates a PREP element in response to a
> PREQ element.
> 
> Signed-off-by: Yuan-Chi Pang <fu3mo6goo@gmail.com>
> ---
>   net/mac80211/mesh_hwmp.c | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
> index 35ad398..6c21a26 100644
> --- a/net/mac80211/mesh_hwmp.c
> +++ b/net/mac80211/mesh_hwmp.c
> @@ -572,6 +572,11 @@ static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata,
>   		forward = false;
>   		reply = true;
>   		target_metric = 0;
> +
> +		if (SN_GT(target_sn, ifmsh->sn)) {
> +			ifmsh->sn = target_sn;
> +		}

    No need for {} enclosing a single statement.

[...]

MBR, Sergei

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

* Re: [PATCH] mac80211: fix to follow standard
  2018-08-28  2:24 [PATCH] mac80211: fix to follow standard Yuan-Chi Pang
  2018-08-28  9:23 ` Sergei Shtylyov
@ 2018-08-28 12:44 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2018-08-28 12:44 UTC (permalink / raw)
  To: Yuan-Chi Pang; +Cc: johannes, davem, linux-wireless, netdev, linux-kernel

Yuan-Chi Pang <fu3mo6goo@gmail.com> writes:

> IEEE 802.11-2016 14.10.8.3 HWMP sequence numbering says:
> If it is a target mesh STA, it shall update its own HWMP SN to
> maximum (current HWMP SN, target HWMP SN in the PREQ element) + 1
> immediately before it generates a PREP element in response to a
> PREQ element.
>
> Signed-off-by: Yuan-Chi Pang <fu3mo6goo@gmail.com>

The patch title is quite generic, you could make it a bit more
informative and unique. For example:

mac80211: fix HWMP sequence numbering to follow standard

-- 
Kalle Valo

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

end of thread, other threads:[~2018-08-28 16:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-28  2:24 [PATCH] mac80211: fix to follow standard Yuan-Chi Pang
2018-08-28  9:23 ` Sergei Shtylyov
2018-08-28 12:44 ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.