Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] mac80211: disable BSSID filtering for mesh interfaces
@ 2008-10-31 21:50 Andrey Yurovsky
  2008-10-31 21:54 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Andrey Yurovsky @ 2008-10-31 21:50 UTC (permalink / raw)
  To: linux-wireless; +Cc: johannes

Mesh interfaces are currently opened with the FIF_ALLMULTI rx filter flag set,
however there is no BSSID in mesh so BSSID filtering should be disabled by
setting the FIF_OTHER_BSS flag as well.  Also explicitly call 
ieee80211_configure_filter for mesh.

Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
Signed-off-by: Javier Cardona <javier@cozbit.com>
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index cde1452..6c3901a 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -229,8 +229,14 @@ static int ieee80211_open(struct net_device *dev)
 		if (res)
 			goto err_stop;
 
-		if (ieee80211_vif_is_mesh(&sdata->vif))
+		if (ieee80211_vif_is_mesh(&sdata->vif)) {
+			local->fif_other_bss++;
+			netif_addr_lock_bh(local->mdev);
+			ieee80211_configure_filter(local);
+			netif_addr_unlock_bh(local->mdev);
+
 			ieee80211_start_mesh(sdata);
+		}
 		changed |= ieee80211_reset_erp_info(sdata);
 		ieee80211_bss_info_change_notify(sdata, changed);
 		ieee80211_enable_keys(sdata);
@@ -456,8 +462,15 @@ static int ieee80211_stop(struct net_device *dev)
 		/* fall through */
 	case NL80211_IFTYPE_MESH_POINT:
 		if (ieee80211_vif_is_mesh(&sdata->vif)) {
-			/* allmulti is always set on mesh ifaces */
+			/* other_bss and allmulti are always set on mesh
+			 * ifaces */
+			local->fif_other_bss--;
 			atomic_dec(&local->iff_allmultis);
+
+			netif_addr_lock_bh(local->mdev);
+			ieee80211_configure_filter(local);
+			netif_addr_unlock_bh(local->mdev);
+
 			ieee80211_stop_mesh(sdata);
 		}
 		/* fall through */



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mac80211: disable BSSID filtering for mesh interfaces
  2008-10-31 21:50 [PATCH] mac80211: disable BSSID filtering for mesh interfaces Andrey Yurovsky
@ 2008-10-31 21:54 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2008-10-31 21:54 UTC (permalink / raw)
  To: Andrey Yurovsky; +Cc: linux-wireless

[-- Attachment #1: Type: text/plain, Size: 1801 bytes --]

On Fri, 2008-10-31 at 14:50 -0700, Andrey Yurovsky wrote:
> Mesh interfaces are currently opened with the FIF_ALLMULTI rx filter flag set,
> however there is no BSSID in mesh so BSSID filtering should be disabled by
> setting the FIF_OTHER_BSS flag as well.  Also explicitly call 
> ieee80211_configure_filter for mesh.
> 
> Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
> Signed-off-by: Javier Cardona <javier@cozbit.com>

Acked-by: Johannes Berg <johannes@sipsolutions.net>

> diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
> index cde1452..6c3901a 100644
> --- a/net/mac80211/iface.c
> +++ b/net/mac80211/iface.c
> @@ -229,8 +229,14 @@ static int ieee80211_open(struct net_device *dev)
>  		if (res)
>  			goto err_stop;
>  
> -		if (ieee80211_vif_is_mesh(&sdata->vif))
> +		if (ieee80211_vif_is_mesh(&sdata->vif)) {
> +			local->fif_other_bss++;
> +			netif_addr_lock_bh(local->mdev);
> +			ieee80211_configure_filter(local);
> +			netif_addr_unlock_bh(local->mdev);
> +
>  			ieee80211_start_mesh(sdata);
> +		}
>  		changed |= ieee80211_reset_erp_info(sdata);
>  		ieee80211_bss_info_change_notify(sdata, changed);
>  		ieee80211_enable_keys(sdata);
> @@ -456,8 +462,15 @@ static int ieee80211_stop(struct net_device *dev)
>  		/* fall through */
>  	case NL80211_IFTYPE_MESH_POINT:
>  		if (ieee80211_vif_is_mesh(&sdata->vif)) {
> -			/* allmulti is always set on mesh ifaces */
> +			/* other_bss and allmulti are always set on mesh
> +			 * ifaces */
> +			local->fif_other_bss--;
>  			atomic_dec(&local->iff_allmultis);
> +
> +			netif_addr_lock_bh(local->mdev);
> +			ieee80211_configure_filter(local);
> +			netif_addr_unlock_bh(local->mdev);
> +
>  			ieee80211_stop_mesh(sdata);
>  		}
>  		/* fall through */
> 
> 
> 

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-10-31 21:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-31 21:50 [PATCH] mac80211: disable BSSID filtering for mesh interfaces Andrey Yurovsky
2008-10-31 21:54 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox