Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 02 Jun 2009 00:58:14 -0400
From:      Chris Buechler <cmb@pfsense.org>
To:        freebsd-net@freebsd.org
Subject:   Re: ath(4) randomly changes MTU to 2290 after explicitly set to 1500
Message-ID:  <4A24B166.7020000@pfsense.org>
In-Reply-To: <4A249A57.1070900@pfsense.org>
References:  <4A249A57.1070900@pfsense.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Chris Buechler wrote:
> In FreeBSD 7.1 using this patch:
> http://people.freebsd.org/~sam/ath_hal-releng7.patch
>
> and 7.2 with stock ath(4) (the above does not cleanly apply to 7.2), 
> there are numerous pfsense users seeing problems with ath when 
> bridging. This did not occur in 7.0. Upon investigation of a few 
> systems, though we explicitly configure the interface with MTU 1500 
> twice (once when bringing up the ath interface, and again when setting 
> up the bridge interface), somehow it ends up switching MTU to 2290 
> when we never configure it as such. This breaks bridging to an 
> Ethernet interface because if_bridge requires the MTU to be the same 
> on both interfaces.
>
> None of the commands we're running to setup ath or the bridge will 
> replicate it, no matter what I do to the interface it stays to 1500 
> unless it sits there for a while ("a while" might be hours or days). 
> There isn't anything that runs in the background to touch interfaces, 
> a completely idle untouched box will change its configuration. It is 
> setup fine and works initially, but given time, it'll switch to 2290 
> and stop working.
>
> example bridge setup commands:
>
> /sbin/ifconfig bridge0 destroy
> /sbin/ifconfig bridge0 create
> /sbin/ifconfig ath0 mtu 1500
> /sbin/ifconfig vr1 mtu 1500
> /sbin/ifconfig ath0 up
> /sbin/ifconfig vr1 up
> /sbin/ifconfig bridge0  addm ath0  addm vr1  up
>
> example ath setup commands:
>
> /sbin/ifconfig ath0 down
> /sbin/ifconfig ath0 mode '11g'
> /sbin/ifconfig ath0 channel any
> /sbin/ifconfig ath0 -mediaopt turbo
> /sbin/ifconfig ath0 ssid 'cmb'
> /sbin/ifconfig ath0 -hidessid
> /sbin/ifconfig ath0 -mediaopt adhoc
> /sbin/ifconfig ath0 protmode 'off'
> /sbin/ifconfig ath0 -pureg
> /sbin/ifconfig ath0 apbridge
> /sbin/ifconfig ath0 -wme
> /sbin/ifconfig ath0 authmode open wepmode off
> /sbin/ifconfig ath0 txpower '99'
> /sbin/ifconfig ath0 mediaopt hostap
> /sbin/ifconfig ath0 mtu 1500
> /sbin/ifconfig ath0 up
> /usr/sbin/hostapd -B /var/etc/hostapd_ath0.conf
>
> $ dmesg|grep ath
> ath0: <Atheros 5212> mem 0xe00c0000-0xe00cffff irq 9 at device 12.0 on 
> pci0
> ath0: [ITHREAD]
> ath0: WARNING: using obsoleted if_watchdog interface
> ath0: Ethernet address: 00:0b:6b:84:3d:7c
> ath0: mac 5.9 phy 4.3 radio 3.6
> ath0: promiscuous mode enabled
>
> another that can replicate it is:
> ath0: <Atheros 5413> mem 0x80000000-0x8000ffff irq 12 at device 13.0 
> on pci0
>
> $ sysctl -a hw.ath
> hw.ath.txbuf: 200
> hw.ath.rxbuf: 40
> hw.ath.regdomain: 0
> hw.ath.countrycode: 0
> hw.ath.xchanmode: 1
> hw.ath.outdoor: 1
> hw.ath.calibrate: 30
> hw.ath.hal.swba_backoff: 0
> hw.ath.hal.sw_brt: 10
> hw.ath.hal.dma_brt: 2

A little more related info on two additional boxes I now have access to 
with similar problems. In this case, every time hostapd is started it 
sets the MTU to 2290. I'm not sure if hostapd is the only thing causing 
difficulties, as these two behave differently from the others where 
initially MTU is 1500 and it changes on its own at some point. I see no 
mention of MTU in hostapd.conf(5).

The hostapd.conf being used follows:

interface=ath0
driver=bsd
logger_syslog=-1
logger_syslog_level=0
logger_stdout=-1
logger_stdout_level=0
dump_file=/tmp/hostapd_ath0.dump
ctrl_interface=/var/run/hostapd
ctrl_interface_group=wheel
ssid=fw2
debug=
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
wpa_group_rekey=60
wpa_gmk_rekey=3600
wpa_strict_rekey=
wpa_passphrase=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ieee8021x=




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A24B166.7020000>