* [PATCH] mt76: fix monitor rx FCS error in DFS channel
@ 2022-03-16 9:51 ` Deren Wu
0 siblings, 0 replies; 8+ messages in thread
From: Deren Wu @ 2022-03-16 9:51 UTC (permalink / raw)
To: Felix Fietkau, Lorenzo Bianconi
Cc: Sean Wang, Soul Huang, YN Chen, Leon Yen, Eric-SY Chang,
Deren Wu, KM Lin, Robin Chiu, CH Yeh, Posh Sun, Eric Liang,
Stella Chang, Evelyn Tsai, Ryder Lee, Shayne Chen,
linux-wireless, linux-mediatek, Deren Wu
From: Deren Wu <deren.wu@mediatek.com>
When setup monitor mode in DFS channel, mt76 send CH_SWITCH_DFS to
fw for channel config. This would cause rx performance bad while
monitoring frames. Settings CH_SWITCH_NORMAL in monitor mode would
get the same performance as normal channels.
Reviewed-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
---
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 3 ++-
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 3 ++-
drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 3 ++-
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
index 390add3144c2..97e2a85cb728 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
@@ -2151,7 +2151,8 @@ int mt7615_mcu_set_chan_info(struct mt7615_phy *phy, int cmd)
.center_chan2 = ieee80211_frequency_to_channel(freq2),
};
- if (cmd == MCU_EXT_CMD(SET_RX_PATH))
+ if (cmd == MCU_EXT_CMD(SET_RX_PATH) ||
+ dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR)
req.switch_reason = CH_SWITCH_NORMAL;
else if (phy->mt76->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD;
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
index 10dc4bf5adec..c56d48342aaf 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
@@ -2833,7 +2833,8 @@ int mt7915_mcu_set_chan_info(struct mt7915_phy *phy, int cmd)
}
#endif
- if (cmd == MCU_EXT_CMD(SET_RX_PATH))
+ if (cmd == MCU_EXT_CMD(SET_RX_PATH) ||
+ dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR)
req.switch_reason = CH_SWITCH_NORMAL;
else if (phy->mt76->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD;
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
index 5ef8b24f0ab3..da2be050ed7c 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
@@ -863,7 +863,8 @@ int mt7921_mcu_set_chan_info(struct mt7921_phy *phy, int cmd)
else
req.channel_band = chandef->chan->band;
- if (cmd == MCU_EXT_CMD(SET_RX_PATH))
+ if (cmd == MCU_EXT_CMD(SET_RX_PATH) ||
+ dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR)
req.switch_reason = CH_SWITCH_NORMAL;
else if (dev->mt76.hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD;
--
2.18.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] mt76: fix monitor rx FCS error in DFS channel
@ 2022-03-16 9:51 ` Deren Wu
0 siblings, 0 replies; 8+ messages in thread
From: Deren Wu @ 2022-03-16 9:51 UTC (permalink / raw)
To: Felix Fietkau, Lorenzo Bianconi
Cc: Sean Wang, Soul Huang, YN Chen, Leon Yen, Eric-SY Chang,
Deren Wu, KM Lin, Robin Chiu, CH Yeh, Posh Sun, Eric Liang,
Stella Chang, Evelyn Tsai, Ryder Lee, Shayne Chen,
linux-wireless, linux-mediatek, Deren Wu
From: Deren Wu <deren.wu@mediatek.com>
When setup monitor mode in DFS channel, mt76 send CH_SWITCH_DFS to
fw for channel config. This would cause rx performance bad while
monitoring frames. Settings CH_SWITCH_NORMAL in monitor mode would
get the same performance as normal channels.
Reviewed-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
---
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 3 ++-
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 3 ++-
drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 3 ++-
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
index 390add3144c2..97e2a85cb728 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
@@ -2151,7 +2151,8 @@ int mt7615_mcu_set_chan_info(struct mt7615_phy *phy, int cmd)
.center_chan2 = ieee80211_frequency_to_channel(freq2),
};
- if (cmd == MCU_EXT_CMD(SET_RX_PATH))
+ if (cmd == MCU_EXT_CMD(SET_RX_PATH) ||
+ dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR)
req.switch_reason = CH_SWITCH_NORMAL;
else if (phy->mt76->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD;
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
index 10dc4bf5adec..c56d48342aaf 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
@@ -2833,7 +2833,8 @@ int mt7915_mcu_set_chan_info(struct mt7915_phy *phy, int cmd)
}
#endif
- if (cmd == MCU_EXT_CMD(SET_RX_PATH))
+ if (cmd == MCU_EXT_CMD(SET_RX_PATH) ||
+ dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR)
req.switch_reason = CH_SWITCH_NORMAL;
else if (phy->mt76->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD;
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
index 5ef8b24f0ab3..da2be050ed7c 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
@@ -863,7 +863,8 @@ int mt7921_mcu_set_chan_info(struct mt7921_phy *phy, int cmd)
else
req.channel_band = chandef->chan->band;
- if (cmd == MCU_EXT_CMD(SET_RX_PATH))
+ if (cmd == MCU_EXT_CMD(SET_RX_PATH) ||
+ dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR)
req.switch_reason = CH_SWITCH_NORMAL;
else if (dev->mt76.hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD;
--
2.18.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] mt76: fix monitor rx FCS error in DFS channel
2022-03-16 9:51 ` Deren Wu
@ 2022-03-16 15:15 ` Lorenzo Bianconi
-1 siblings, 0 replies; 8+ messages in thread
From: Lorenzo Bianconi @ 2022-03-16 15:15 UTC (permalink / raw)
To: Deren Wu
Cc: Felix Fietkau, Sean Wang, Soul Huang, YN Chen, Leon Yen,
Eric-SY Chang, KM Lin, Robin Chiu, CH Yeh, Posh Sun, Eric Liang,
Stella Chang, Evelyn Tsai, Ryder Lee, Shayne Chen,
linux-wireless, linux-mediatek
[-- Attachment #1: Type: text/plain, Size: 2934 bytes --]
> From: Deren Wu <deren.wu@mediatek.com>
>
> When setup monitor mode in DFS channel, mt76 send CH_SWITCH_DFS to
> fw for channel config. This would cause rx performance bad while
> monitoring frames. Settings CH_SWITCH_NORMAL in monitor mode would
> get the same performance as normal channels.
Hi Deren,
>
> Reviewed-by: Shayne Chen <shayne.chen@mediatek.com>
> Signed-off-by: Deren Wu <deren.wu@mediatek.com>
> ---
> drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 3 ++-
> drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 3 ++-
> drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 3 ++-
> 3 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> index 390add3144c2..97e2a85cb728 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> @@ -2151,7 +2151,8 @@ int mt7615_mcu_set_chan_info(struct mt7615_phy *phy, int cmd)
> .center_chan2 = ieee80211_frequency_to_channel(freq2),
> };
>
> - if (cmd == MCU_EXT_CMD(SET_RX_PATH))
> + if (cmd == MCU_EXT_CMD(SET_RX_PATH) ||
> + dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR)
is this patch compliant with 802.11h DFS standard?
Regards,
Lorenzo
> req.switch_reason = CH_SWITCH_NORMAL;
> else if (phy->mt76->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
> req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD;
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
> index 10dc4bf5adec..c56d48342aaf 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
> @@ -2833,7 +2833,8 @@ int mt7915_mcu_set_chan_info(struct mt7915_phy *phy, int cmd)
> }
> #endif
>
> - if (cmd == MCU_EXT_CMD(SET_RX_PATH))
> + if (cmd == MCU_EXT_CMD(SET_RX_PATH) ||
> + dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR)
> req.switch_reason = CH_SWITCH_NORMAL;
> else if (phy->mt76->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
> req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD;
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
> index 5ef8b24f0ab3..da2be050ed7c 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
> @@ -863,7 +863,8 @@ int mt7921_mcu_set_chan_info(struct mt7921_phy *phy, int cmd)
> else
> req.channel_band = chandef->chan->band;
>
> - if (cmd == MCU_EXT_CMD(SET_RX_PATH))
> + if (cmd == MCU_EXT_CMD(SET_RX_PATH) ||
> + dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR)
> req.switch_reason = CH_SWITCH_NORMAL;
> else if (dev->mt76.hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
> req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD;
> --
> 2.18.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mt76: fix monitor rx FCS error in DFS channel
@ 2022-03-16 15:15 ` Lorenzo Bianconi
0 siblings, 0 replies; 8+ messages in thread
From: Lorenzo Bianconi @ 2022-03-16 15:15 UTC (permalink / raw)
To: Deren Wu
Cc: Felix Fietkau, Sean Wang, Soul Huang, YN Chen, Leon Yen,
Eric-SY Chang, KM Lin, Robin Chiu, CH Yeh, Posh Sun, Eric Liang,
Stella Chang, Evelyn Tsai, Ryder Lee, Shayne Chen,
linux-wireless, linux-mediatek
[-- Attachment #1.1: Type: text/plain, Size: 2934 bytes --]
> From: Deren Wu <deren.wu@mediatek.com>
>
> When setup monitor mode in DFS channel, mt76 send CH_SWITCH_DFS to
> fw for channel config. This would cause rx performance bad while
> monitoring frames. Settings CH_SWITCH_NORMAL in monitor mode would
> get the same performance as normal channels.
Hi Deren,
>
> Reviewed-by: Shayne Chen <shayne.chen@mediatek.com>
> Signed-off-by: Deren Wu <deren.wu@mediatek.com>
> ---
> drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 3 ++-
> drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 3 ++-
> drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 3 ++-
> 3 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> index 390add3144c2..97e2a85cb728 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> @@ -2151,7 +2151,8 @@ int mt7615_mcu_set_chan_info(struct mt7615_phy *phy, int cmd)
> .center_chan2 = ieee80211_frequency_to_channel(freq2),
> };
>
> - if (cmd == MCU_EXT_CMD(SET_RX_PATH))
> + if (cmd == MCU_EXT_CMD(SET_RX_PATH) ||
> + dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR)
is this patch compliant with 802.11h DFS standard?
Regards,
Lorenzo
> req.switch_reason = CH_SWITCH_NORMAL;
> else if (phy->mt76->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
> req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD;
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
> index 10dc4bf5adec..c56d48342aaf 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
> @@ -2833,7 +2833,8 @@ int mt7915_mcu_set_chan_info(struct mt7915_phy *phy, int cmd)
> }
> #endif
>
> - if (cmd == MCU_EXT_CMD(SET_RX_PATH))
> + if (cmd == MCU_EXT_CMD(SET_RX_PATH) ||
> + dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR)
> req.switch_reason = CH_SWITCH_NORMAL;
> else if (phy->mt76->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
> req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD;
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
> index 5ef8b24f0ab3..da2be050ed7c 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
> @@ -863,7 +863,8 @@ int mt7921_mcu_set_chan_info(struct mt7921_phy *phy, int cmd)
> else
> req.channel_band = chandef->chan->band;
>
> - if (cmd == MCU_EXT_CMD(SET_RX_PATH))
> + if (cmd == MCU_EXT_CMD(SET_RX_PATH) ||
> + dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR)
> req.switch_reason = CH_SWITCH_NORMAL;
> else if (dev->mt76.hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
> req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD;
> --
> 2.18.0
>
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 170 bytes --]
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mt76: fix monitor rx FCS error in DFS channel
2022-03-16 15:15 ` Lorenzo Bianconi
@ 2022-03-17 7:02 ` Deren Wu
-1 siblings, 0 replies; 8+ messages in thread
From: Deren Wu @ 2022-03-17 7:02 UTC (permalink / raw)
To: Lorenzo Bianconi
Cc: Felix Fietkau, Sean Wang, Soul Huang, YN Chen, Leon Yen,
Eric-SY Chang, KM Lin, Robin Chiu, CH Yeh, Posh Sun, Eric Liang,
Stella Chang, Evelyn Tsai, Ryder Lee, Shayne Chen,
linux-wireless, linux-mediatek
Hi Lore,
On Wed, 2022-03-16 at 16:15 +0100, Lorenzo Bianconi wrote:
> > From: Deren Wu <deren.wu@mediatek.com>
> >
> > When setup monitor mode in DFS channel, mt76 send CH_SWITCH_DFS to
> > fw for channel config. This would cause rx performance bad while
> > monitoring frames. Settings CH_SWITCH_NORMAL in monitor mode would
> > get the same performance as normal channels.
>
> Hi Deren,
>
> >
> > Reviewed-by: Shayne Chen <shayne.chen@mediatek.com>
> > Signed-off-by: Deren Wu <deren.wu@mediatek.com>
> > ---
> > drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 3 ++-
> > drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 3 ++-
> > drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 3 ++-
> > 3 files changed, 6 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> > b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> > index 390add3144c2..97e2a85cb728 100644
> > --- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> > +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> > @@ -2151,7 +2151,8 @@ int mt7615_mcu_set_chan_info(struct
> > mt7615_phy *phy, int cmd)
> > .center_chan2 = ieee80211_frequency_to_channel(freq2),
> > };
> >
> > - if (cmd == MCU_EXT_CMD(SET_RX_PATH))
> > + if (cmd == MCU_EXT_CMD(SET_RX_PATH) ||
> > + dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR)
>
> is this patch compliant with 802.11h DFS standard?
Monitor mode would not tx packets and still follow standard. We will
keep tracking this point to avoid violations.
Regards,
Deren
>
> Regards,
> Lorenzo
>
> > req.switch_reason = CH_SWITCH_NORMAL;
> > else if (phy->mt76->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
> > req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD;
> > diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
> > b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
> > index 10dc4bf5adec..c56d48342aaf 100644
> > --- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
> > +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
> > @@ -2833,7 +2833,8 @@ int mt7915_mcu_set_chan_info(struct
> > mt7915_phy *phy, int cmd)
> > }
> > #endif
> >
> > - if (cmd == MCU_EXT_CMD(SET_RX_PATH))
> > + if (cmd == MCU_EXT_CMD(SET_RX_PATH) ||
> > + dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR)
> > req.switch_reason = CH_SWITCH_NORMAL;
> > else if (phy->mt76->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
> > req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD;
> > diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
> > b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
> > index 5ef8b24f0ab3..da2be050ed7c 100644
> > --- a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
> > +++ b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
> > @@ -863,7 +863,8 @@ int mt7921_mcu_set_chan_info(struct mt7921_phy
> > *phy, int cmd)
> > else
> > req.channel_band = chandef->chan->band;
> >
> > - if (cmd == MCU_EXT_CMD(SET_RX_PATH))
> > + if (cmd == MCU_EXT_CMD(SET_RX_PATH) ||
> > + dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR)
> > req.switch_reason = CH_SWITCH_NORMAL;
> > else if (dev->mt76.hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
> > req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD;
> > --
> > 2.18.0
> >
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mt76: fix monitor rx FCS error in DFS channel
@ 2022-03-17 7:02 ` Deren Wu
0 siblings, 0 replies; 8+ messages in thread
From: Deren Wu @ 2022-03-17 7:02 UTC (permalink / raw)
To: Lorenzo Bianconi
Cc: Felix Fietkau, Sean Wang, Soul Huang, YN Chen, Leon Yen,
Eric-SY Chang, KM Lin, Robin Chiu, CH Yeh, Posh Sun, Eric Liang,
Stella Chang, Evelyn Tsai, Ryder Lee, Shayne Chen,
linux-wireless, linux-mediatek
Hi Lore,
On Wed, 2022-03-16 at 16:15 +0100, Lorenzo Bianconi wrote:
> > From: Deren Wu <deren.wu@mediatek.com>
> >
> > When setup monitor mode in DFS channel, mt76 send CH_SWITCH_DFS to
> > fw for channel config. This would cause rx performance bad while
> > monitoring frames. Settings CH_SWITCH_NORMAL in monitor mode would
> > get the same performance as normal channels.
>
> Hi Deren,
>
> >
> > Reviewed-by: Shayne Chen <shayne.chen@mediatek.com>
> > Signed-off-by: Deren Wu <deren.wu@mediatek.com>
> > ---
> > drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 3 ++-
> > drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 3 ++-
> > drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 3 ++-
> > 3 files changed, 6 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> > b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> > index 390add3144c2..97e2a85cb728 100644
> > --- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> > +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> > @@ -2151,7 +2151,8 @@ int mt7615_mcu_set_chan_info(struct
> > mt7615_phy *phy, int cmd)
> > .center_chan2 = ieee80211_frequency_to_channel(freq2),
> > };
> >
> > - if (cmd == MCU_EXT_CMD(SET_RX_PATH))
> > + if (cmd == MCU_EXT_CMD(SET_RX_PATH) ||
> > + dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR)
>
> is this patch compliant with 802.11h DFS standard?
Monitor mode would not tx packets and still follow standard. We will
keep tracking this point to avoid violations.
Regards,
Deren
>
> Regards,
> Lorenzo
>
> > req.switch_reason = CH_SWITCH_NORMAL;
> > else if (phy->mt76->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
> > req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD;
> > diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
> > b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
> > index 10dc4bf5adec..c56d48342aaf 100644
> > --- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
> > +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
> > @@ -2833,7 +2833,8 @@ int mt7915_mcu_set_chan_info(struct
> > mt7915_phy *phy, int cmd)
> > }
> > #endif
> >
> > - if (cmd == MCU_EXT_CMD(SET_RX_PATH))
> > + if (cmd == MCU_EXT_CMD(SET_RX_PATH) ||
> > + dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR)
> > req.switch_reason = CH_SWITCH_NORMAL;
> > else if (phy->mt76->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
> > req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD;
> > diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
> > b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
> > index 5ef8b24f0ab3..da2be050ed7c 100644
> > --- a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
> > +++ b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
> > @@ -863,7 +863,8 @@ int mt7921_mcu_set_chan_info(struct mt7921_phy
> > *phy, int cmd)
> > else
> > req.channel_band = chandef->chan->band;
> >
> > - if (cmd == MCU_EXT_CMD(SET_RX_PATH))
> > + if (cmd == MCU_EXT_CMD(SET_RX_PATH) ||
> > + dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR)
> > req.switch_reason = CH_SWITCH_NORMAL;
> > else if (dev->mt76.hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
> > req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD;
> > --
> > 2.18.0
> >
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mt76: fix monitor rx FCS error in DFS channel
2022-03-17 7:02 ` Deren Wu
@ 2022-03-17 9:03 ` Lorenzo Bianconi
-1 siblings, 0 replies; 8+ messages in thread
From: Lorenzo Bianconi @ 2022-03-17 9:03 UTC (permalink / raw)
To: Deren Wu
Cc: Felix Fietkau, Sean Wang, Soul Huang, YN Chen, Leon Yen,
Eric-SY Chang, KM Lin, Robin Chiu, CH Yeh, Posh Sun, Eric Liang,
Stella Chang, Evelyn Tsai, Ryder Lee, Shayne Chen,
linux-wireless, linux-mediatek
[-- Attachment #1: Type: text/plain, Size: 3823 bytes --]
> Hi Lore,
>
> On Wed, 2022-03-16 at 16:15 +0100, Lorenzo Bianconi wrote:
> > > From: Deren Wu <deren.wu@mediatek.com>
> > >
> > > When setup monitor mode in DFS channel, mt76 send CH_SWITCH_DFS to
> > > fw for channel config. This would cause rx performance bad while
> > > monitoring frames. Settings CH_SWITCH_NORMAL in monitor mode would
> > > get the same performance as normal channels.
> >
> > Hi Deren,
> >
> > >
> > > Reviewed-by: Shayne Chen <shayne.chen@mediatek.com>
> > > Signed-off-by: Deren Wu <deren.wu@mediatek.com>
> > > ---
> > > drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 3 ++-
> > > drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 3 ++-
> > > drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 3 ++-
> > > 3 files changed, 6 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> > > b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> > > index 390add3144c2..97e2a85cb728 100644
> > > --- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> > > +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> > > @@ -2151,7 +2151,8 @@ int mt7615_mcu_set_chan_info(struct
> > > mt7615_phy *phy, int cmd)
> > > .center_chan2 = ieee80211_frequency_to_channel(freq2),
> > > };
> > >
> > > - if (cmd == MCU_EXT_CMD(SET_RX_PATH))
> > > + if (cmd == MCU_EXT_CMD(SET_RX_PATH) ||
> > > + dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR)
> >
> > is this patch compliant with 802.11h DFS standard?
>
> Monitor mode would not tx packets and still follow standard. We will
> keep tracking this point to avoid violations.
Hi Deren,
this IEEE80211_CONF_MONITOR flags indicates there is a monitor interface,
not it is the only one so we can have multiple vifs on the device
(e.g. AP + monitor). I was wondering if CH_SWITCH_SCAN_BYPASS_DPD is used
to avoid transmitting packets during chip calibration on DFS channels.
Regards,
Lorenzo
>
>
> Regards,
> Deren
>
>
> >
> > Regards,
> > Lorenzo
> >
> > > req.switch_reason = CH_SWITCH_NORMAL;
> > > else if (phy->mt76->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
> > > req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD;
> > > diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
> > > b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
> > > index 10dc4bf5adec..c56d48342aaf 100644
> > > --- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
> > > +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
> > > @@ -2833,7 +2833,8 @@ int mt7915_mcu_set_chan_info(struct
> > > mt7915_phy *phy, int cmd)
> > > }
> > > #endif
> > >
> > > - if (cmd == MCU_EXT_CMD(SET_RX_PATH))
> > > + if (cmd == MCU_EXT_CMD(SET_RX_PATH) ||
> > > + dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR)
> > > req.switch_reason = CH_SWITCH_NORMAL;
> > > else if (phy->mt76->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
> > > req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD;
> > > diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
> > > b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
> > > index 5ef8b24f0ab3..da2be050ed7c 100644
> > > --- a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
> > > +++ b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
> > > @@ -863,7 +863,8 @@ int mt7921_mcu_set_chan_info(struct mt7921_phy
> > > *phy, int cmd)
> > > else
> > > req.channel_band = chandef->chan->band;
> > >
> > > - if (cmd == MCU_EXT_CMD(SET_RX_PATH))
> > > + if (cmd == MCU_EXT_CMD(SET_RX_PATH) ||
> > > + dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR)
> > > req.switch_reason = CH_SWITCH_NORMAL;
> > > else if (dev->mt76.hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
> > > req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD;
> > > --
> > > 2.18.0
> > >
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mt76: fix monitor rx FCS error in DFS channel
@ 2022-03-17 9:03 ` Lorenzo Bianconi
0 siblings, 0 replies; 8+ messages in thread
From: Lorenzo Bianconi @ 2022-03-17 9:03 UTC (permalink / raw)
To: Deren Wu
Cc: Felix Fietkau, Sean Wang, Soul Huang, YN Chen, Leon Yen,
Eric-SY Chang, KM Lin, Robin Chiu, CH Yeh, Posh Sun, Eric Liang,
Stella Chang, Evelyn Tsai, Ryder Lee, Shayne Chen,
linux-wireless, linux-mediatek
[-- Attachment #1.1: Type: text/plain, Size: 3823 bytes --]
> Hi Lore,
>
> On Wed, 2022-03-16 at 16:15 +0100, Lorenzo Bianconi wrote:
> > > From: Deren Wu <deren.wu@mediatek.com>
> > >
> > > When setup monitor mode in DFS channel, mt76 send CH_SWITCH_DFS to
> > > fw for channel config. This would cause rx performance bad while
> > > monitoring frames. Settings CH_SWITCH_NORMAL in monitor mode would
> > > get the same performance as normal channels.
> >
> > Hi Deren,
> >
> > >
> > > Reviewed-by: Shayne Chen <shayne.chen@mediatek.com>
> > > Signed-off-by: Deren Wu <deren.wu@mediatek.com>
> > > ---
> > > drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 3 ++-
> > > drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 3 ++-
> > > drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 3 ++-
> > > 3 files changed, 6 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> > > b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> > > index 390add3144c2..97e2a85cb728 100644
> > > --- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> > > +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> > > @@ -2151,7 +2151,8 @@ int mt7615_mcu_set_chan_info(struct
> > > mt7615_phy *phy, int cmd)
> > > .center_chan2 = ieee80211_frequency_to_channel(freq2),
> > > };
> > >
> > > - if (cmd == MCU_EXT_CMD(SET_RX_PATH))
> > > + if (cmd == MCU_EXT_CMD(SET_RX_PATH) ||
> > > + dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR)
> >
> > is this patch compliant with 802.11h DFS standard?
>
> Monitor mode would not tx packets and still follow standard. We will
> keep tracking this point to avoid violations.
Hi Deren,
this IEEE80211_CONF_MONITOR flags indicates there is a monitor interface,
not it is the only one so we can have multiple vifs on the device
(e.g. AP + monitor). I was wondering if CH_SWITCH_SCAN_BYPASS_DPD is used
to avoid transmitting packets during chip calibration on DFS channels.
Regards,
Lorenzo
>
>
> Regards,
> Deren
>
>
> >
> > Regards,
> > Lorenzo
> >
> > > req.switch_reason = CH_SWITCH_NORMAL;
> > > else if (phy->mt76->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
> > > req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD;
> > > diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
> > > b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
> > > index 10dc4bf5adec..c56d48342aaf 100644
> > > --- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
> > > +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
> > > @@ -2833,7 +2833,8 @@ int mt7915_mcu_set_chan_info(struct
> > > mt7915_phy *phy, int cmd)
> > > }
> > > #endif
> > >
> > > - if (cmd == MCU_EXT_CMD(SET_RX_PATH))
> > > + if (cmd == MCU_EXT_CMD(SET_RX_PATH) ||
> > > + dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR)
> > > req.switch_reason = CH_SWITCH_NORMAL;
> > > else if (phy->mt76->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
> > > req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD;
> > > diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
> > > b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
> > > index 5ef8b24f0ab3..da2be050ed7c 100644
> > > --- a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
> > > +++ b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
> > > @@ -863,7 +863,8 @@ int mt7921_mcu_set_chan_info(struct mt7921_phy
> > > *phy, int cmd)
> > > else
> > > req.channel_band = chandef->chan->band;
> > >
> > > - if (cmd == MCU_EXT_CMD(SET_RX_PATH))
> > > + if (cmd == MCU_EXT_CMD(SET_RX_PATH) ||
> > > + dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR)
> > > req.switch_reason = CH_SWITCH_NORMAL;
> > > else if (dev->mt76.hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
> > > req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD;
> > > --
> > > 2.18.0
> > >
>
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 170 bytes --]
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-03-17 9:04 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-16 9:51 [PATCH] mt76: fix monitor rx FCS error in DFS channel Deren Wu
2022-03-16 9:51 ` Deren Wu
2022-03-16 15:15 ` Lorenzo Bianconi
2022-03-16 15:15 ` Lorenzo Bianconi
2022-03-17 7:02 ` Deren Wu
2022-03-17 7:02 ` Deren Wu
2022-03-17 9:03 ` Lorenzo Bianconi
2022-03-17 9:03 ` Lorenzo Bianconi
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.