Search Linux Wireless

Re: [PATCH] carl9170: fix spurious transmissions in sniffer mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/11/2012 05:18 PM, Christian Lamparter wrote:
> Several people have complained about an unusual
> and undocumented feature of the AR9170 hardware:
> 
> In siffer mode, the hardware generates spurious
> ACK frames for every received frame... even
> broadcasts.
> 
> The reason for this malfunction is unknown:
> <http://marc.info/?l=linux-wireless&m=134517238506033>
> But there's a workaround: Instead of the special
> sniffer mode, the hardware will be put into
> station mode and all rx filters are disabled.
I am by no means an expert here but wouldn't it be better to disable
ACK? Or is this not really an option?

Did you test to see if this actually does receive the same number of
packets as "special sniffer mode"? If so, that really should be in the
commit message imho. (I know you tested it, but since you didn't say it
the commit message reads like you didn't).

Thanks,
Zero
> 
> Reported-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>
> Reported-by: Marco Fonseca <marco@xxxxxxxxxxxxxxx>
> Reported-by: Janusz Dziedzic <janusz.dziedzic@xxxxxxxxx>
> Signed-off-by: Christian Lamparter <chunkeey@xxxxxxxxxxxxxx>
> ---
>  drivers/net/wireless/ath/carl9170/mac.c |   21 ++++++++++++++++++---
>  1 file changed, 18 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/carl9170/mac.c b/drivers/net/wireless/ath/carl9170/mac.c
> index e3b1b6e..24d75ab 100644
> --- a/drivers/net/wireless/ath/carl9170/mac.c
> +++ b/drivers/net/wireless/ath/carl9170/mac.c
> @@ -343,7 +343,24 @@ int carl9170_set_operating_mode(struct ar9170 *ar)
>  			break;
>  		}
>  	} else {
> -		mac_addr = NULL;
> +		/*
> +		 * Enable monitor mode
> +		 *
> +		 * rx_ctrl |= AR9170_MAC_RX_CTRL_ACK_IN_SNIFFER;
> +		 * sniffer |= AR9170_MAC_SNIFFER_ENABLE_PROMISC;
> +		 *
> +		 * When the hardware is in SNIFFER_PROMISC mode,
> +		 * it generates spurious ACKs for every incoming
> +		 * frame. This confuses every peer in the
> +		 * vicinity and the network throughput will suffer
> +		 * badly.
> +		 *
> +		 * Hence, the hardware will be put into station
> +		 * mode and just the rx filters are disabled.
> +		 */
> +		cam_mode |= AR9170_MAC_CAM_STA;
> +		rx_ctrl |= AR9170_MAC_RX_CTRL_PASS_TO_HOST;
> +		mac_addr = common->macaddr;
>  		bssid = NULL;
>  	}
>  	rcu_read_unlock();
> @@ -355,8 +372,6 @@ int carl9170_set_operating_mode(struct ar9170 *ar)
>  		enc_mode |= AR9170_MAC_ENCRYPTION_RX_SOFTWARE;
>  
>  	if (ar->sniffer_enabled) {
> -		rx_ctrl |= AR9170_MAC_RX_CTRL_ACK_IN_SNIFFER;
> -		sniffer |= AR9170_MAC_SNIFFER_ENABLE_PROMISC;
>  		enc_mode |= AR9170_MAC_ENCRYPTION_RX_SOFTWARE;
>  	}
>  
> 

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


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux