Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 Jun 2009 23:19:51 -0400
From:      Chris Buechler <cmb@pfsense.org>
To:        freebsd-net@freebsd.org
Subject:   ath(4) randomly changes MTU to 2290 after explicitly set to 1500
Message-ID:  <4A249A57.1070900@pfsense.org>

next in thread | raw e-mail | index | archive | help
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


I have access to several systems that can replicate this, please let me 
know if any further information would be helpful.

thanks,
Chris




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