* [PATCH] mt76: mt76x02u: enable multi-vif support
@ 2019-08-02 14:36 Lorenzo Bianconi
2019-08-05 10:09 ` Stanislaw Gruszka
0 siblings, 1 reply; 4+ messages in thread
From: Lorenzo Bianconi @ 2019-08-02 14:36 UTC (permalink / raw)
To: nbd; +Cc: lorenzo.bianconi, linux-wireless, sgruszka
Enable multi-interface support for mt76x02u driver. For the moment
allow max two concurrent interfaces in order to preserve enough room
for ps traffic since we are using beacon slots for it.
I have successfully tested the following configuration:
- AP + STA
- AP0 + AP1
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
.../net/wireless/mediatek/mt76/mt76x02_util.c | 26 +++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
index fa45ed280ab1..476f0157a370 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
@@ -61,6 +61,20 @@ static const struct ieee80211_iface_limit mt76x02_if_limits[] = {
},
};
+static const struct ieee80211_iface_limit mt76x02u_if_limits[] = {
+ {
+ .max = 1,
+ .types = BIT(NL80211_IFTYPE_ADHOC)
+ }, {
+ .max = 2,
+ .types = BIT(NL80211_IFTYPE_STATION) |
+#ifdef CONFIG_MAC80211_MESH
+ BIT(NL80211_IFTYPE_MESH_POINT) |
+#endif
+ BIT(NL80211_IFTYPE_AP)
+ },
+};
+
static const struct ieee80211_iface_combination mt76x02_if_comb[] = {
{
.limits = mt76x02_if_limits,
@@ -75,6 +89,16 @@ static const struct ieee80211_iface_combination mt76x02_if_comb[] = {
}
};
+static const struct ieee80211_iface_combination mt76x02u_if_comb[] = {
+ {
+ .limits = mt76x02u_if_limits,
+ .n_limits = ARRAY_SIZE(mt76x02u_if_limits),
+ .max_interfaces = 2,
+ .num_different_channels = 1,
+ .beacon_int_infra_match = true,
+ }
+};
+
static void
mt76x02_led_set_config(struct mt76_dev *mdev, u8 delay_on,
u8 delay_off)
@@ -151,6 +175,8 @@ void mt76x02_init_device(struct mt76x02_dev *dev)
if (mt76_is_usb(dev)) {
hw->extra_tx_headroom += sizeof(struct mt76x02_txwi) +
MT_DMA_HDR_LEN;
+ wiphy->iface_combinations = mt76x02u_if_comb;
+ wiphy->n_iface_combinations = ARRAY_SIZE(mt76x02u_if_comb);
} else {
INIT_DELAYED_WORK(&dev->wdt_work, mt76x02_wdt_work);
--
2.21.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mt76: mt76x02u: enable multi-vif support
2019-08-02 14:36 [PATCH] mt76: mt76x02u: enable multi-vif support Lorenzo Bianconi
@ 2019-08-05 10:09 ` Stanislaw Gruszka
2019-08-05 11:08 ` Lorenzo Bianconi
0 siblings, 1 reply; 4+ messages in thread
From: Stanislaw Gruszka @ 2019-08-05 10:09 UTC (permalink / raw)
To: Lorenzo Bianconi; +Cc: nbd, lorenzo.bianconi, linux-wireless
On Fri, Aug 02, 2019 at 04:36:20PM +0200, Lorenzo Bianconi wrote:
> Enable multi-interface support for mt76x02u driver. For the moment
> allow max two concurrent interfaces in order to preserve enough room
> for ps traffic since we are using beacon slots for it.
> I have successfully tested the following configuration:
> - AP + STA
> - AP0 + AP1
The combination that did not work in my testing was STA + STA .
This should be fixed or disabled.
Stanislaw
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mt76: mt76x02u: enable multi-vif support
2019-08-05 10:09 ` Stanislaw Gruszka
@ 2019-08-05 11:08 ` Lorenzo Bianconi
2019-08-12 11:37 ` Stanislaw Gruszka
0 siblings, 1 reply; 4+ messages in thread
From: Lorenzo Bianconi @ 2019-08-05 11:08 UTC (permalink / raw)
To: Stanislaw Gruszka; +Cc: Lorenzo Bianconi, Felix Fietkau, linux-wireless
>
> On Fri, Aug 02, 2019 at 04:36:20PM +0200, Lorenzo Bianconi wrote:
> > Enable multi-interface support for mt76x02u driver. For the moment
> > allow max two concurrent interfaces in order to preserve enough room
> > for ps traffic since we are using beacon slots for it.
> > I have successfully tested the following configuration:
> > - AP + STA
> > - AP0 + AP1
>
> The combination that did not work in my testing was STA + STA .
> This should be fixed or disabled.
>
Hi Stanislaw,
I have just tested STA/STA configuration and it works in my setup.
Regards,
Lorenzo
> Stanislaw
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mt76: mt76x02u: enable multi-vif support
2019-08-05 11:08 ` Lorenzo Bianconi
@ 2019-08-12 11:37 ` Stanislaw Gruszka
0 siblings, 0 replies; 4+ messages in thread
From: Stanislaw Gruszka @ 2019-08-12 11:37 UTC (permalink / raw)
To: Lorenzo Bianconi; +Cc: Lorenzo Bianconi, Felix Fietkau, linux-wireless
On Mon, Aug 05, 2019 at 01:08:15PM +0200, Lorenzo Bianconi wrote:
> >
> > On Fri, Aug 02, 2019 at 04:36:20PM +0200, Lorenzo Bianconi wrote:
> > > Enable multi-interface support for mt76x02u driver. For the moment
> > > allow max two concurrent interfaces in order to preserve enough room
> > > for ps traffic since we are using beacon slots for it.
> > > I have successfully tested the following configuration:
> > > - AP + STA
> > > - AP0 + AP1
> >
> > The combination that did not work in my testing was STA + STA .
> > This should be fixed or disabled.
> >
>
> Hi Stanislaw,
>
> I have just tested STA/STA configuration and it works in my setup.
Confirmed, it works for me as well on current code base.
Tested-by: Stanislaw Gruszka <sgruszka@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-08-12 11:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-02 14:36 [PATCH] mt76: mt76x02u: enable multi-vif support Lorenzo Bianconi
2019-08-05 10:09 ` Stanislaw Gruszka
2019-08-05 11:08 ` Lorenzo Bianconi
2019-08-12 11:37 ` Stanislaw Gruszka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).