All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mesh: don't process mesh channel switch unless csa ie provided
@ 2018-04-27 19:26 peter.oh
  2018-05-07 19:44 ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: peter.oh @ 2018-04-27 19:26 UTC (permalink / raw)
  To: linux-wireless, johannes; +Cc: Peter Oh, johannes.berg

From: Peter Oh <peter.oh@bowerswilkins.com>

There is no meaning to call ieee80211_mesh_process_chnswitch
without CSA IE provided, since the function will always return error.

Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
---
 net/mac80211/mesh.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index d51da26e9c18..8ced757dff8d 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -1196,7 +1196,7 @@ static void ieee80211_mesh_rx_bcn_presp(struct ieee80211_sub_if_data *sdata,
 			stype, mgmt, &elems, rx_status);
 
 	if (ifmsh->csa_role != IEEE80211_MESH_CSA_ROLE_INIT &&
-	    !sdata->vif.csa_active)
+	    !sdata->vif.csa_active && elems.ch_switch_ie)
 		ieee80211_mesh_process_chnswitch(sdata, &elems, true);
 }
 
-- 
2.11.0 (Apple Git-81)

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

* Re: [PATCH] mesh: don't process mesh channel switch unless csa ie provided
  2018-04-27 19:26 [PATCH] mesh: don't process mesh channel switch unless csa ie provided peter.oh
@ 2018-05-07 19:44 ` Johannes Berg
  2018-05-07 20:04   ` Peter Oh
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2018-05-07 19:44 UTC (permalink / raw)
  To: peter.oh, linux-wireless

On Fri, 2018-04-27 at 12:26 -0700, peter.oh@bowerswilkins.com wrote:
> From: Peter Oh <peter.oh@bowerswilkins.com>
> 
> There is no meaning to call ieee80211_mesh_process_chnswitch
> without CSA IE provided, since the function will always return error.

I'm not convinced, an extended channel switch element might be present
instead?

johannes

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

* Re: [PATCH] mesh: don't process mesh channel switch unless csa ie provided
  2018-05-07 19:44 ` Johannes Berg
@ 2018-05-07 20:04   ` Peter Oh
  2018-05-07 20:06     ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Oh @ 2018-05-07 20:04 UTC (permalink / raw)
  To: Johannes Berg, linux-wireless



On 05/07/2018 12:44 PM, Johannes Berg wrote:
> On Fri, 2018-04-27 at 12:26 -0700, peter.oh@bowerswilkins.com wrote:
>> From: Peter Oh <peter.oh@bowerswilkins.com>
>>
>> There is no meaning to call ieee80211_mesh_process_chnswitch
>> without CSA IE provided, since the function will always return error.
> I'm not convinced, an extended channel switch element might be present
> instead?
I expected the comment. Yes, extended channel switch element could be 
present instead of channel switch element which I missed to take care 
of. So you can ignore the patch for now and I'll get back with right 
patch for it.

Thanks,
Peter

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

* Re: [PATCH] mesh: don't process mesh channel switch unless csa ie provided
  2018-05-07 20:04   ` Peter Oh
@ 2018-05-07 20:06     ` Johannes Berg
  2018-05-07 20:28       ` Peter Oh
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2018-05-07 20:06 UTC (permalink / raw)
  To: Peter Oh, linux-wireless

On Mon, 2018-05-07 at 13:04 -0700, Peter Oh wrote:
> 
> On 05/07/2018 12:44 PM, Johannes Berg wrote:
> > On Fri, 2018-04-27 at 12:26 -0700, peter.oh@bowerswilkins.com wrote:
> > > From: Peter Oh <peter.oh@bowerswilkins.com>
> > > 
> > > There is no meaning to call ieee80211_mesh_process_chnswitch
> > > without CSA IE provided, since the function will always return error.
> > 
> > I'm not convinced, an extended channel switch element might be present
> > instead?
> 
> I expected the comment. Yes, extended channel switch element could be 
> present instead of channel switch element which I missed to take care 
> of. So you can ignore the patch for now and I'll get back with right 
> patch for it.

Heh. Well, but then why bother at all? I mean, the inner function will
do the check and fail, and nothing will happen, so why bother?

johannes

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

* Re: [PATCH] mesh: don't process mesh channel switch unless csa ie provided
  2018-05-07 20:06     ` Johannes Berg
@ 2018-05-07 20:28       ` Peter Oh
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Oh @ 2018-05-07 20:28 UTC (permalink / raw)
  To: Johannes Berg, linux-wireless



On 05/07/2018 01:06 PM, Johannes Berg wrote:
> On Mon, 2018-05-07 at 13:04 -0700, Peter Oh wrote:
>> On 05/07/2018 12:44 PM, Johannes Berg wrote:
>>> On Fri, 2018-04-27 at 12:26 -0700, peter.oh@bowerswilkins.com wrote:
>>>> From: Peter Oh <peter.oh@bowerswilkins.com>
>>>>
>>>> There is no meaning to call ieee80211_mesh_process_chnswitch
>>>> without CSA IE provided, since the function will always return error.
>>> I'm not convinced, an extended channel switch element might be present
>>> instead?
>> I expected the comment. Yes, extended channel switch element could be
>> present instead of channel switch element which I missed to take care
>> of. So you can ignore the patch for now and I'll get back with right
>> patch for it.
> Heh. Well, but then why bother at all? I mean, the inner function will
> do the check and fail, and nothing will happen, so why bother?
>
My real concern is that ieee80211_mesh_process_chnswitch function could 
process at certain level of channel switch procedure although mesh 
channel switch parameter element is not given which is mandatory of CSA 
for mesh.
However the reason I didn't use mesh_chansw_params_ie to check is 
because even though it is correct for standard, I'm not sure if it's 
practically right. IMPO, sending CSA means devices (ap or mesh) detected 
radar, so the ultimate goal to achieve is to evacuate the channel 
although there is something missed in frames.

Peter

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

end of thread, other threads:[~2018-05-07 20:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-27 19:26 [PATCH] mesh: don't process mesh channel switch unless csa ie provided peter.oh
2018-05-07 19:44 ` Johannes Berg
2018-05-07 20:04   ` Peter Oh
2018-05-07 20:06     ` Johannes Berg
2018-05-07 20:28       ` Peter Oh

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.