diff mbox series

[4/6] mt76: mt7615: unlock dfs bands

Message ID 33184e0b78983fe7c79fa70c5fbb21042aafa4f5.1561804422.git.lorenzo@kernel.org (mailing list archive)
State Superseded
Delegated to: Felix Fietkau
Headers show
Series add hw dfs pattern detector support to mt7615 driver | expand

Commit Message

Lorenzo Bianconi June 29, 2019, 10:36 a.m. UTC
Unlock dfs channels since now mt7615 driver supports radar detection

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 drivers/net/wireless/mediatek/mt76/mt7615/init.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Kalle Valo June 30, 2019, 9:28 a.m. UTC | #1
Lorenzo Bianconi <lorenzo@kernel.org> writes:

> Unlock dfs channels since now mt7615 driver supports radar detection
>
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
>  drivers/net/wireless/mediatek/mt76/mt7615/init.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/init.c b/drivers/net/wireless/mediatek/mt76/mt7615/init.c
> index 5dc4cced5789..6d336d82cafe 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7615/init.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7615/init.c
> @@ -152,6 +152,12 @@ static const struct ieee80211_iface_combination if_comb[] = {
>  		.max_interfaces = 4,
>  		.num_different_channels = 1,
>  		.beacon_int_infra_match = true,
> +		.radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) |
> +				       BIT(NL80211_CHAN_WIDTH_20) |
> +				       BIT(NL80211_CHAN_WIDTH_40) |
> +				       BIT(NL80211_CHAN_WIDTH_80) |
> +				       BIT(NL80211_CHAN_WIDTH_160) |
> +				       BIT(NL80211_CHAN_WIDTH_80P80),

Isn't it questionable to enable these without any testing on real
hardware? Getting DFS to work correctly is hard so I'm very suspicious
about this.
Lorenzo Bianconi June 30, 2019, 11:25 a.m. UTC | #2
>
> Lorenzo Bianconi <lorenzo@kernel.org> writes:
>
> > Unlock dfs channels since now mt7615 driver supports radar detection
> >
> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> > ---
> >  drivers/net/wireless/mediatek/mt76/mt7615/init.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/init.c b/drivers/net/wireless/mediatek/mt76/mt7615/init.c
> > index 5dc4cced5789..6d336d82cafe 100644
> > --- a/drivers/net/wireless/mediatek/mt76/mt7615/init.c
> > +++ b/drivers/net/wireless/mediatek/mt76/mt7615/init.c
> > @@ -152,6 +152,12 @@ static const struct ieee80211_iface_combination if_comb[] = {
> >               .max_interfaces = 4,
> >               .num_different_channels = 1,
> >               .beacon_int_infra_match = true,
> > +             .radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) |
> > +                                    BIT(NL80211_CHAN_WIDTH_20) |
> > +                                    BIT(NL80211_CHAN_WIDTH_40) |
> > +                                    BIT(NL80211_CHAN_WIDTH_80) |
> > +                                    BIT(NL80211_CHAN_WIDTH_160) |
> > +                                    BIT(NL80211_CHAN_WIDTH_80P80),
>
> Isn't it questionable to enable these without any testing on real
> hardware? Getting DFS to work correctly is hard so I'm very suspicious
> about this.
>
> --
> Kalle Valo

Hi Kalle,

unfortunately at the moment I am not able to run any tests with a real
signal generator so I just ported the code from vendor sdk.
I am pretty confident it works since the radar pattern detection is
done in fw/hw so I guess it has been already tested in the vendor sdk
but we can postpone this patch and apply just the rest of the series
until we have some test results.

@Ryder: do you have the possibility to carry out some real tests?

Regards,
Lorenzo
Kalle Valo July 1, 2019, 7:59 a.m. UTC | #3
Lorenzo Bianconi <lorenzo.bianconi@redhat.com> writes:

>>
>> Lorenzo Bianconi <lorenzo@kernel.org> writes:
>>
>> > Unlock dfs channels since now mt7615 driver supports radar detection
>> >
>> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
>> > ---
>> >  drivers/net/wireless/mediatek/mt76/mt7615/init.c | 6 ++++++
>> >  1 file changed, 6 insertions(+)
>> >
>> > diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/init.c b/drivers/net/wireless/mediatek/mt76/mt7615/init.c
>> > index 5dc4cced5789..6d336d82cafe 100644
>> > --- a/drivers/net/wireless/mediatek/mt76/mt7615/init.c
>> > +++ b/drivers/net/wireless/mediatek/mt76/mt7615/init.c
>> > @@ -152,6 +152,12 @@ static const struct ieee80211_iface_combination if_comb[] = {
>> >               .max_interfaces = 4,
>> >               .num_different_channels = 1,
>> >               .beacon_int_infra_match = true,
>> > +             .radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) |
>> > +                                    BIT(NL80211_CHAN_WIDTH_20) |
>> > +                                    BIT(NL80211_CHAN_WIDTH_40) |
>> > +                                    BIT(NL80211_CHAN_WIDTH_80) |
>> > +                                    BIT(NL80211_CHAN_WIDTH_160) |
>> > +                                    BIT(NL80211_CHAN_WIDTH_80P80),
>>
>> Isn't it questionable to enable these without any testing on real
>> hardware? Getting DFS to work correctly is hard so I'm very suspicious
>> about this.
>>
>> --
>> Kalle Valo
>
> Hi Kalle,
>
> unfortunately at the moment I am not able to run any tests with a real
> signal generator so I just ported the code from vendor sdk.
> I am pretty confident it works since the radar pattern detection is
> done in fw/hw so I guess it has been already tested in the vendor sdk

DFS is really tricky to get it working right, so I'm not easily
convinced :)

> but we can postpone this patch and apply just the rest of the series
> until we have some test results.

Yeah, I think it would be best to drop this patch so that DFS is not
enabled by default and apply this patch only after positive test
results.
Ryder Lee July 1, 2019, 9:57 a.m. UTC | #4
On Mon, 2019-07-01 at 10:59 +0300, Kalle Valo wrote:
> Lorenzo Bianconi <lorenzo.bianconi@redhat.com> writes:
> 
> >>
> >> Lorenzo Bianconi <lorenzo@kernel.org> writes:
> >>
> >> > Unlock dfs channels since now mt7615 driver supports radar detection
> >> >
> >> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> >> > ---
> >> >  drivers/net/wireless/mediatek/mt76/mt7615/init.c | 6 ++++++
> >> >  1 file changed, 6 insertions(+)
> >> >
> >> > diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/init.c b/drivers/net/wireless/mediatek/mt76/mt7615/init.c
> >> > index 5dc4cced5789..6d336d82cafe 100644
> >> > --- a/drivers/net/wireless/mediatek/mt76/mt7615/init.c
> >> > +++ b/drivers/net/wireless/mediatek/mt76/mt7615/init.c
> >> > @@ -152,6 +152,12 @@ static const struct ieee80211_iface_combination if_comb[] = {
> >> >               .max_interfaces = 4,
> >> >               .num_different_channels = 1,
> >> >               .beacon_int_infra_match = true,
> >> > +             .radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) |
> >> > +                                    BIT(NL80211_CHAN_WIDTH_20) |
> >> > +                                    BIT(NL80211_CHAN_WIDTH_40) |
> >> > +                                    BIT(NL80211_CHAN_WIDTH_80) |
> >> > +                                    BIT(NL80211_CHAN_WIDTH_160) |
> >> > +                                    BIT(NL80211_CHAN_WIDTH_80P80),
> >>
> >> Isn't it questionable to enable these without any testing on real
> >> hardware? Getting DFS to work correctly is hard so I'm very suspicious
> >> about this.
> >>
> >> --
> >> Kalle Valo
> >
> > Hi Kalle,
> >
> > unfortunately at the moment I am not able to run any tests with a real
> > signal generator so I just ported the code from vendor sdk.
> > I am pretty confident it works since the radar pattern detection is
> > done in fw/hw so I guess it has been already tested in the vendor sdk
> 
> DFS is really tricky to get it working right, so I'm not easily
> convinced :)
> 
> > but we can postpone this patch and apply just the rest of the series
> > until we have some test results.
> 
> Yeah, I think it would be best to drop this patch so that DFS is not
> enabled by default and apply this patch only after positive test
> results.
> 

That's why I suggested Lorenzo to add this one - "[6/6] mt76: mt7615:
add radar pattern test knob to debugfs"

We can feed radar pattern through debugfs to test if a pattern is
detected as radar pattern or not and verify the fw radar detection
algorithm.

In this format:
RadarPulsePattern="3680128-2-245;3683878-2-245;3687628-2-245;3691378-2-245;3695128-2-245;3698878-2-245;3702628-2-245;3706378-2-245;3710128-2-245;3713878-2-245"

As for testing it on 'real hardware' I need to take some other time to
borrow equipment.

Ryder
Kalle Valo July 1, 2019, 10:49 a.m. UTC | #5
Ryder Lee <ryder.lee@mediatek.com> writes:

> On Mon, 2019-07-01 at 10:59 +0300, Kalle Valo wrote:
>> Lorenzo Bianconi <lorenzo.bianconi@redhat.com> writes:
>> 
>> >>
>> >> Lorenzo Bianconi <lorenzo@kernel.org> writes:
>> >>
>> >> > Unlock dfs channels since now mt7615 driver supports radar detection
>> >> >
>> >> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
>> >> > ---
>> >> >  drivers/net/wireless/mediatek/mt76/mt7615/init.c | 6 ++++++
>> >> >  1 file changed, 6 insertions(+)
>> >> >
>> >> > diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/init.c b/drivers/net/wireless/mediatek/mt76/mt7615/init.c
>> >> > index 5dc4cced5789..6d336d82cafe 100644
>> >> > --- a/drivers/net/wireless/mediatek/mt76/mt7615/init.c
>> >> > +++ b/drivers/net/wireless/mediatek/mt76/mt7615/init.c
>> >> > @@ -152,6 +152,12 @@ static const struct ieee80211_iface_combination if_comb[] = {
>> >> >               .max_interfaces = 4,
>> >> >               .num_different_channels = 1,
>> >> >               .beacon_int_infra_match = true,
>> >> > +             .radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) |
>> >> > +                                    BIT(NL80211_CHAN_WIDTH_20) |
>> >> > +                                    BIT(NL80211_CHAN_WIDTH_40) |
>> >> > +                                    BIT(NL80211_CHAN_WIDTH_80) |
>> >> > +                                    BIT(NL80211_CHAN_WIDTH_160) |
>> >> > +                                    BIT(NL80211_CHAN_WIDTH_80P80),
>> >>
>> >> Isn't it questionable to enable these without any testing on real
>> >> hardware? Getting DFS to work correctly is hard so I'm very suspicious
>> >> about this.
>> >>
>> >> --
>> >> Kalle Valo
>> >
>> > Hi Kalle,
>> >
>> > unfortunately at the moment I am not able to run any tests with a real
>> > signal generator so I just ported the code from vendor sdk.
>> > I am pretty confident it works since the radar pattern detection is
>> > done in fw/hw so I guess it has been already tested in the vendor sdk
>> 
>> DFS is really tricky to get it working right, so I'm not easily
>> convinced :)
>> 
>> > but we can postpone this patch and apply just the rest of the series
>> > until we have some test results.
>> 
>> Yeah, I think it would be best to drop this patch so that DFS is not
>> enabled by default and apply this patch only after positive test
>> results.
>> 
>
> That's why I suggested Lorenzo to add this one - "[6/6] mt76: mt7615:
> add radar pattern test knob to debugfs"
>
> We can feed radar pattern through debugfs to test if a pattern is
> detected as radar pattern or not and verify the fw radar detection
> algorithm.

Sure, that's nice for testing but does not guarantee that it works with
real hardware as well. I take regulatory rules very seriously and that's
why I'm extra careful here.
diff mbox series

Patch

diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/init.c b/drivers/net/wireless/mediatek/mt76/mt7615/init.c
index 5dc4cced5789..6d336d82cafe 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/init.c
@@ -152,6 +152,12 @@  static const struct ieee80211_iface_combination if_comb[] = {
 		.max_interfaces = 4,
 		.num_different_channels = 1,
 		.beacon_int_infra_match = true,
+		.radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) |
+				       BIT(NL80211_CHAN_WIDTH_20) |
+				       BIT(NL80211_CHAN_WIDTH_40) |
+				       BIT(NL80211_CHAN_WIDTH_80) |
+				       BIT(NL80211_CHAN_WIDTH_160) |
+				       BIT(NL80211_CHAN_WIDTH_80P80),
 	}
 };