* [PATCH] wlcore: disable multicast filter in AP mode
@ 2017-01-30 14:49 Iain Hunter
2017-01-31 7:22 ` Kalle Valo
0 siblings, 1 reply; 5+ messages in thread
From: Iain Hunter @ 2017-01-30 14:49 UTC (permalink / raw)
To: linux-wireless; +Cc: kvalo, Iain Hunter
Enable AP support allmulticast for MDNS. It can be enabled by bringing up
the interface with ip command with the argument allmulticast on
Signed-off-by: Iain Hunter <i-hunter1@ti.com>
---
drivers/net/wireless/ti/wlcore/main.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 3241e9eba73..1ab0561ab13 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -3281,6 +3281,20 @@ static void wl1271_op_configure_filter(struct ieee80211_hw *hw,
if (ret < 0)
goto out_sleep;
}
+
+ /*
+ * If interface in AP mode and created with allmulticast then disable
+ * the firmware filters so that all multicast packets are passed
+ * This is mandatory for MDNS based discovery protocols
+ */
+ if (wlvif->bss_type == BSS_TYPE_AP_BSS) {
+ if (*total & FIF_ALLMULTI)
+ ret = wl1271_acx_group_address_tbl(wl, wlvif,
+ false,
+ NULL, 0);
+
+ }
+
}
/*
--
2.11.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] wlcore: disable multicast filter in AP mode
2017-01-30 14:49 [PATCH] wlcore: disable multicast filter in AP mode Iain Hunter
@ 2017-01-31 7:22 ` Kalle Valo
0 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2017-01-31 7:22 UTC (permalink / raw)
To: Iain Hunter; +Cc: linux-wireless, Iain Hunter
Iain Hunter <drhunter95@gmail.com> writes:
> Enable AP support allmulticast for MDNS. It can be enabled by bringing up
>
> the interface with ip command with the argument allmulticast on
>
> Signed-off-by: Iain Hunter <i-hunter1@ti.com>
The commit log looks now ok, except there's an unnecessare empty line.
But I can fix that.
> @@ -3281,6 +3281,20 @@ static void wl1271_op_configure_filter(struct ieee80211_hw *hw,
> if (ret < 0)
> goto out_sleep;
> }
> +
> + /*
> + * If interface in AP mode and created with allmulticast then disable
> + * the firmware filters so that all multicast packets are passed
> + * This is mandatory for MDNS based discovery protocols
> + */
> + if (wlvif->bss_type == BSS_TYPE_AP_BSS) {
> + if (*total & FIF_ALLMULTI)
> + ret = wl1271_acx_group_address_tbl(wl, wlvif,
> + false,
> + NULL, 0);
> +
> + }
> +
> }
Sorry, I missed this earlier but here you don't check ret value at all.
I think you should bail out from the look if an error happens, like
other commands in the same loop does.
--
Kalle Valo
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] wlcore: disable multicast filter in AP mode
@ 2017-01-31 11:31 Iain Hunter
0 siblings, 0 replies; 5+ messages in thread
From: Iain Hunter @ 2017-01-31 11:31 UTC (permalink / raw)
To: linux-wireless; +Cc: kvalo, Iain Hunter
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 3241e9eba73..7d3f15d5d5c 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -3281,6 +3281,21 @@ static void wl1271_op_configure_filter(struct ieee80211_hw *hw,
if (ret < 0)
goto out_sleep;
}
+
+ /*
+ * If interface in AP mode and created with allmulticast then disable
+ * the firmware filters so that all multicast packets are passed
+ * This is mandatory for MDNS based discovery protocols
+ */
+ if (wlvif->bss_type == BSS_TYPE_AP_BSS) {
+ if (*total & FIF_ALLMULTI) {
+ ret = wl1271_acx_group_address_tbl(wl, wlvif,
+ false,
+ NULL, 0);
+ if (ret < 0)
+ goto out_sleep;
+ }
+ }
}
/*
--
2.11.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] wlcore: disable multicast filter in AP mode
@ 2017-01-31 11:26 Iain Hunter
0 siblings, 0 replies; 5+ messages in thread
From: Iain Hunter @ 2017-01-31 11:26 UTC (permalink / raw)
To: linux-wireless; +Cc: kvalo, Iain Hunter
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 3241e9eba73..7d3f15d5d5c 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -3281,6 +3281,21 @@ static void wl1271_op_configure_filter(struct ieee80211_hw *hw,
if (ret < 0)
goto out_sleep;
}
+
+ /*
+ * If interface in AP mode and created with allmulticast then disable
+ * the firmware filters so that all multicast packets are passed
+ * This is mandatory for MDNS based discovery protocols
+ */
+ if (wlvif->bss_type == BSS_TYPE_AP_BSS) {
+ if (*total & FIF_ALLMULTI) {
+ ret = wl1271_acx_group_address_tbl(wl, wlvif,
+ false,
+ NULL, 0);
+ if (ret < 0)
+ goto out_sleep;
+ }
+ }
}
/*
--
2.11.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] wlcore: disable multicast filter in AP mode
@ 2017-01-31 10:48 Iain Hunter
0 siblings, 0 replies; 5+ messages in thread
From: Iain Hunter @ 2017-01-31 10:48 UTC (permalink / raw)
To: linux-wireless; +Cc: kvalo, Iain Hunter
Enable AP support for allmulticast for MDNS It can be enabled by bringing
up the interface with ip command with argument allmulticast on
Signed-off-by: Iain Hunter <i-hunter1@ti.com>
---
PATCH v2: resumbitting to handle error return value
drivers/net/wireless/ti/wlcore/main.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 3241e9eba73..4fabbb486e7 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -3281,6 +3281,21 @@ static void wl1271_op_configure_filter(struct ieee80211_hw *hw,
if (ret < 0)
goto out_sleep;
}
+
+ /*
+ * If interface in AP mode and created with allmulticast then disable
+ * the firmware filters so that all multicast packets are passed
+ * This is mandatory for MDNS based discovery protocols
+ */
+ if (wlvif->bss_type == BSS_TYPE_AP_BSS) {
+ if (*total & FIF_ALLMULTI) {
+ ret = wl1271_acx_group_address_tbl(wl, wlvif,
+ false,
+ NULL, 0);
+ if (ret < 0)
+ goto out_sleep;
+ }
+ }
}
/*
--
2.11.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-01-31 11:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-30 14:49 [PATCH] wlcore: disable multicast filter in AP mode Iain Hunter
2017-01-31 7:22 ` Kalle Valo
2017-01-31 10:48 Iain Hunter
2017-01-31 11:26 Iain Hunter
2017-01-31 11:31 Iain Hunter
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.