diff mbox

[RFC] mac80211: remove ARP filter enable/disable logic

Message ID 1358351162.6252.7.camel@cumari.coelho.fi (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Luciano Coelho Jan. 16, 2013, 3:46 p.m. UTC
Hi,

On Mon, 2013-01-14 at 16:43 +0100, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
> 
> Depending on the driver, having ARP filtering for
> some addresses may be possible. Remove the logic
> that tracks whether ARP filter is enabled or not
> and give the driver the total number of addresses
> instead of the length of the list so it can make
> its own decision.
> 
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> ---

As we discussed on IRC, I checked this change (the mac80211 part) and it
looks good to me.

[...]

> diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
> index ce6e62a..c2497b0 100644
> --- a/drivers/net/wireless/ti/wlcore/main.c
> +++ b/drivers/net/wireless/ti/wlcore/main.c
> @@ -4107,14 +4107,14 @@ sta_not_found:
>  	}
>  
>  	/* Handle arp filtering. Done after join. */
> -	if ((changed & BSS_CHANGED_ARP_FILTER) ||
> -	    (!is_ibss && (changed & BSS_CHANGED_QOS))) {
> +	if (bss_conf->assoc &&
> +	    ((changed & BSS_CHANGED_ARP_FILTER) ||
> +	     (!is_ibss && (changed & BSS_CHANGED_QOS)))) {
>  		__be32 addr = bss_conf->arp_addr_list[0];
>  		wlvif->sta.qos = bss_conf->qos;
>  		WARN_ON(wlvif->bss_type != BSS_TYPE_STA_BSS);
>  
> -		if (bss_conf->arp_addr_cnt == 1 &&
> -		    bss_conf->arp_filter_enabled) {
> +		if (bss_conf->arp_addr_cnt == 1) {
>  			wlvif->ip_addr = addr;
>  			/*
>  			 * The template should have been configured only upon

This part, though, I think it's safer to do slightly different:


This is because the WiLink firmwares are quite finicky and in many cases
they don't clean things up on disassoc, so we can get into weird bugs.

So I think it's good to keep the wl1271_acx_arp_ip_filter() call to
explicitly disable ARP filtering when we get a BSS_CHANGED_ARP_FILTER
during disassociation (and bss_conf->assoc is false).

--
Luca.

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index d7de063..88fb587 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -4115,8 +4115,8 @@  sta_not_found:
                wlvif->sta.qos = bss_conf->qos;
                WARN_ON(wlvif->bss_type != BSS_TYPE_STA_BSS);
 
-               if (bss_conf->arp_addr_cnt == 1 &&
-                   bss_conf->arp_filter_enabled) {
+               if (bss_conf->assoc &&
+                   bss_conf->arp_addr_cnt == 1) {
                        wlvif->ip_addr = addr;
                        /*
                         * The template should have been configured only upon