Re: [PATCH 2/2] mt7601u: run calibration works after finishing scanning

2018-04-16 Thread Arend van Spriel

On 4/14/2018 12:56 PM, Stanislaw Gruszka wrote:

On Fri, Apr 13, 2018 at 11:06:13AM -0700, Jakub Kicinski wrote:

>On Fri, 13 Apr 2018 16:44:38 +0200, Stanislaw Gruszka wrote:

> >When finishing scanning we switch to operational channel sill with
> >SCANNING flag. This mean that we never perform calibration works after
> >scanning. To fix the problem cancel and queue calibration works on
> >.sw_scan_start() and .sw_scan_complete() routines.
> >
> >Signed-off-by: Stanislaw Gruszka

>
>IOW the stack will potentially ask us to return to the original channel
>before calling .sw_scan_complete()?  Hm.  That's unpleasant.

I think the stack need to assure we start and end scanning on
operational channel, otherwise we would have possibility to be on
undefined channel during normal work.


Returning to the operating channels during scanning is mostly important 
when connected so you can receive the beacon of your AP and mc/bc 
traffic and also to handle regular unicast traffic so you are not 
screwing up your TCP window too much for instance.


Regards,
Arend


Re: [PATCH 2/2] mt7601u: run calibration works after finishing scanning

2018-04-14 Thread Stanislaw Gruszka
On Fri, Apr 13, 2018 at 11:06:13AM -0700, Jakub Kicinski wrote:
> On Fri, 13 Apr 2018 16:44:38 +0200, Stanislaw Gruszka wrote:
> > When finishing scanning we switch to operational channel sill with
> > SCANNING flag. This mean that we never perform calibration works after
> > scanning. To fix the problem cancel and queue calibration works on
> > .sw_scan_start() and .sw_scan_complete() routines.
> > 
> > Signed-off-by: Stanislaw Gruszka 
> 
> IOW the stack will potentially ask us to return to the original channel
> before calling .sw_scan_complete()?  Hm.  That's unpleasant.

I think the stack need to assure we start and end scanning on
operational channel, otherwise we would have possibility to be on
undefined channel during normal work.

> I'm not entirely on board with the patch.  Now normal channel setting
> will happen while calibration is running.  Is that necessary? 
> Would it not be sufficient to make sure work is scheduled
> from .sw_scan_complete()?

Yes, that would be sufficient, I'll post v2.

Thanks
Stanislaw


Re: [PATCH 2/2] mt7601u: run calibration works after finishing scanning

2018-04-13 Thread Jakub Kicinski
On Fri, 13 Apr 2018 16:44:38 +0200, Stanislaw Gruszka wrote:
> When finishing scanning we switch to operational channel sill with
> SCANNING flag. This mean that we never perform calibration works after
> scanning. To fix the problem cancel and queue calibration works on
> .sw_scan_start() and .sw_scan_complete() routines.
> 
> Signed-off-by: Stanislaw Gruszka 

IOW the stack will potentially ask us to return to the original channel
before calling .sw_scan_complete()?  Hm.  That's unpleasant.

I'm not entirely on board with the patch.  Now normal channel setting
will happen while calibration is running.  Is that necessary?  Would it
not be sufficient to make sure work is scheduled
from .sw_scan_complete()?