Stefan Sperling | 2 Oct 2011 01:03
Picon
Favicon

ath(4) sends duplicate multicast frames with AR5212 chipset

I am running the following ath(4) card in hostap mode with WPA:

ath0 at pci0 dev 12 function 0 "Atheros AR5212 (IBM MiniPCI)" rev 0x01: irq 9
ath0: AR5213A 5.9 phy 4.3 rf5112a 3.6, WOR01W, address 00:0e:9b:d7:36:f8

STAs can connect fine. However, multicast frames cause a lot of RX errors
at the STA side. The "tkip replays" counter in netstat -W keeps increasing.
This results in occasional stutter in the wireless connection.
It is small, but noticable when typing into an ssh session to the STA.

Note that I have a carp setup running in this network which creates a lot
of multicast frames. With few multicast frames the problem is probably not
noticable. (TKIP is used for multicast frames, other traffic is using CCMP.)

This only happens with ath(4).
A ral(4) card I have doesn't show this problem at all.

Modyfing the code on the STA side as follows shows the problem:

Index: ieee80211_crypto_tkip.c
===================================================================
RCS file: /cvs/src/sys/net80211/ieee80211_crypto_tkip.c,v
retrieving revision 1.19
diff -u -p -r1.19 ieee80211_crypto_tkip.c
--- ieee80211_crypto_tkip.c	5 Apr 2011 11:48:28 -0000	1.19
+++ ieee80211_crypto_tkip.c	1 Oct 2011 21:51:46 -0000
 <at>  <at>  -362,7 +362,10  <at>  <at>  ieee80211_tkip_decrypt(struct ieee80211c
 		/* replayed frame, discard */
 		ic->ic_stats.is_tkip_replays++;
 		m_freem(m0);
(Continue reading)

Stefan Sperling | 2 Oct 2011 01:14
Picon
Favicon

Re: ath(4) sends duplicate multicast frames with AR5212 chipset

On Sun, Oct 02, 2011 at 01:03:33AM +0200, Stefan Sperling wrote:
> Our AR5212 code retries 15 times, whether or not the frame is multicast.
> The tx retries value passed to the HAL is 11 and the HAL always adds 4
> (not sure what's the point -- only the AR5212 HAL changes the value
> passed in, the other HALs don't).
> 
> The following patch sets the amount of TX attempts for multicast frames
> to 1 which fixes the problem for me. ssh to the STA stays responsive and
> no replays are reported.
> 
> Is this right?

To clarify: Since the tx retry counter is passsed from outside the HAL,
the diff affects every ath(4) chipset, not just the AR5212 (sorry, it's
been a long night). I don't have other ath(4) cards to test, though.

Christiano F. Haesbaert | 2 Oct 2011 04:10
Picon
Favicon

Re: fix a seg and minor improvements to config(8)

Makes sense to me, ok.

Later we should fix the include orderning and change the warning
printfs to stderr. 

Can we get another ok ?

On Wed, Sep 28, 2011 at 02:37:34AM +0100, Edd Barrett wrote:
> Evening,
> 
> When using `config -e`:
>  * Don't print a NULL pointer if binary loaded is not a kernel.
>  * Don't segfault of binary loaded is not a kernel.
>  * Report non-existent kernel via a preliminary stat().
>  * Make a warning look like the rest.
> 
>  OK?
> 
> Index: exec.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/config/exec.c,v
> retrieving revision 1.7
> diff -u -r1.7 exec.c
> --- exec.c	27 Oct 2009 23:59:51 -0000	1.7
> +++ exec.c	28 Sep 2011 01:19:49 -0000
>  <at>  <at>  -26,6 +26,8  <at>  <at> 
>  
>  #include <err.h>
>  #include <sys/types.h>
> +#include <sys/stat.h>
(Continue reading)

Nicholas Marriott | 2 Oct 2011 08:22
Picon

Re: terminal emulators using /usr/local/share/terminfo and a bug in perl's Term::Cap

This seems fine to me, but I'm not a perl guru. Have you talked to
upstream?

Cheers

On Thu, Sep 29, 2011 at 10:49:36AM +0200, David Coppa wrote:
> Hi,
> 
> The patch to ncurses nicm <at>  commited some days ago, exposes a bug
> in perl's cpan/Term-Cap/Cap.pm. So, when you use rxvt-unicode on
> a recent -current, you will hit this bug with pkg_* tools:
> 
> # pkg_delete -v xclip
> failed termcap lookup on rxvt-unicode-256color at
/usr/libdata/perl5/OpenBSD/ProgressMeter/Term.pm line 125
> 
> If you use a terminal emulator that has a terminfo entry but not
> a termcap one (just like x11/rxvt-unicode or x11/st), you should
> fall back to the case where perl uses infocmp to fake up a
> termcap entry from terminfo, but this never happens because the
> logic is flawed.
> 
> Here's a diff:
> 
> Index: cpan/Term-Cap/Cap.pm
> ===================================================================
> RCS file: /cvs/src/gnu/usr.bin/perl/cpan/Term-Cap/Cap.pm,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 Cap.pm
> --- cpan/Term-Cap/Cap.pm	24 Sep 2010 14:49:05 -0000	1.1.1.1
(Continue reading)

Nicholas Marriott | 2 Oct 2011 08:22
Picon

Re: fix a seg and minor improvements to config(8)

Hi

All but the stat bit looks fine. How do you reproduce the problems? It
seems to fail just fine without it.

$ config -f /x
config: cannot read /x: No such file or directory

Also maybe use access(2) instead?

On Wed, Sep 28, 2011 at 02:37:34AM +0100, Edd Barrett wrote:
> Evening,
> 
> When using `config -e`:
>  * Don't print a NULL pointer if binary loaded is not a kernel.
>  * Don't segfault of binary loaded is not a kernel.
>  * Report non-existent kernel via a preliminary stat().
>  * Make a warning look like the rest.
> 
>  OK?
> 
> Index: exec.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/config/exec.c,v
> retrieving revision 1.7
> diff -u -r1.7 exec.c
> --- exec.c	27 Oct 2009 23:59:51 -0000	1.7
> +++ exec.c	28 Sep 2011 01:19:49 -0000
>  <at>  <at>  -26,6 +26,8  <at>  <at> 
>  
(Continue reading)

Stefan Sperling | 2 Oct 2011 10:55
Picon
Favicon

carp error message diff

Sync error strings between v4 and v6 carp code.

ok?

Index: ip_carp.c
===================================================================
RCS file: /cvs/src/sys/netinet/ip_carp.c,v
retrieving revision 1.190
diff -u -p -r1.190 ip_carp.c
--- ip_carp.c	6 Sep 2011 16:00:22 -0000	1.190
+++ ip_carp.c	2 Oct 2011 08:50:13 -0000
 <at>  <at>  -586,8 +586,8  <at>  <at>  carp_proto_input(struct mbuf *m, ...)
 	len = iplen + sizeof(*ch);
 	if (len > m->m_pkthdr.len) {
 		carpstats.carps_badlen++;
-		CARP_LOG(LOG_INFO, sc, ("packet too short %d on %s", m->m_pkthdr.len,
-		    m->m_pkthdr.rcvif->if_xname));
+		CARP_LOG(LOG_INFO, sc, ("packet size %d too small on %s",
+		    m->m_pkthdr.len, m->m_pkthdr.rcvif->if_xname));
 		m_freem(m);
 		return;
 	}
 <at>  <at>  -621,7 +621,8  <at>  <at>  carp6_proto_input(struct mbuf **mp, int 
 	struct carp_softc *sc = NULL;
 	struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *);
 	struct carp_header *ch;
-	u_int len;
+	int len;
+	char *if_xname;

(Continue reading)

Matthieu Herrb | 2 Oct 2011 11:26
Picon
Picon
Favicon

gpioiic: allow SDA and SCL pins to be inverted

Hi,

the patch below adds a 'flags' locator to gpioiic(4). It allows to swap
the SDA and SCL pins assigment during attach.  The current gpio attach
code did only allow for SDA being the lowest numbered pin.

But for instance on geode (cs5536) SCL is gpio pin 3 and SDA is pin 4. 

This is a joint work with mbalmer <at> NetBSD.

My initial code used the offset as SDA pin number and mask as the SCL
pin number, but Marc conviced me that this is inconsistent with other
gpio attachments and that adding a  flag to swap the pins is the way
to go and fixed my code to implement the flag.

Opinions? ok?

Index: share/man/man4/gpioiic.4
===================================================================
RCS file: /cvs/OpenBSD/src/share/man/man4/gpioiic.4,v
retrieving revision 1.6
diff -u -r1.6 gpioiic.4
--- share/man/man4/gpioiic.4	24 Nov 2008 15:30:21 -0000	1.6
+++ share/man/man4/gpioiic.4	2 Oct 2011 09:15:09 -0000
 <at>  <at>  -21,7 +21,7  <at>  <at> 
 .Nm gpioiic
 .Nd GPIO I2C controller
 .Sh SYNOPSIS
-.Cd "gpioiic* at gpio? offset 0 mask 0x3"
+.Cd "gpioiic* at gpio? offset 0 mask 0x3 flags 0x0"
(Continue reading)

Edd Barrett | 2 Oct 2011 11:46
Picon
Gravatar

Re: fix a seg and minor improvements to config(8)

On Sun, Oct 02, 2011 at 07:22:07AM +0100, Nicholas Marriott wrote:
> Hi
> 
> All but the stat bit looks fine. How do you reproduce the problems? It
> seems to fail just fine without it.
> 
> $ config -f /x
> config: cannot read /x: No such file or directory

To reproduce these, you would use -e.

If you pass a non-existent file:

% config -e /missing_file
config: no supported exec type

If you pass in a non-kernel binary:

% file ~/a
/home/edd/a: ELF 32-bit LSB executable, Intel 80386, version 1, for
OpenBSD, dynamically linked (uses shared libs), not stripped
% config -e ~/a
(null)warning: no output file specified
WARNING this kernel doesn't contain all information needed!
WARNING the commands add and change might not work.
WARNING this kernel doesn't support pseudo devices.
WARNING this kernel doesn't support modification of BUFCACHEPERCENT.
WARNING this kernel doesn't support modification of NKMEMPAGES.
zsh: segmentation fault  config -e ~/a

(Continue reading)


Gmane