From owner-svn-src-head@freebsd.org Wed May 25 06:29:25 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38091B4997C; Wed, 25 May 2016 06:29:25 +0000 (UTC) (envelope-from sgalabov@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E45F41246; Wed, 25 May 2016 06:29:24 +0000 (UTC) (envelope-from sgalabov@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4P6TOCK006436; Wed, 25 May 2016 06:29:24 GMT (envelope-from sgalabov@FreeBSD.org) Received: (from sgalabov@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4P6TOQ6006434; Wed, 25 May 2016 06:29:24 GMT (envelope-from sgalabov@FreeBSD.org) Message-Id: <201605250629.u4P6TOQ6006434@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sgalabov set sender to sgalabov@FreeBSD.org using -f From: Stanislav Galabov Date: Wed, 25 May 2016 06:29:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300657 - head/sys/dev/ral X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2016 06:29:25 -0000 Author: sgalabov Date: Wed May 25 06:29:23 2016 New Revision: 300657 URL: https://svnweb.freebsd.org/changeset/base/300657 Log: Align radiotap structures in ral(4) Currently all radiotap structures in ral(4) are packed, but are not aligned, which causes ral based devices to crash when one does 'ifconfig wlan0 up' for a wlan interface with a ral wlandev on arches that care about structure alignment (e.g., MIPS). Adding an aligned attribute helps fix this problem and ral devices can be properly brought up. Reviewed by: adrian Sponsored by: Smartcom - Bulgaria AD Modified: head/sys/dev/ral/rt2661var.h head/sys/dev/ral/rt2860var.h Modified: head/sys/dev/ral/rt2661var.h ============================================================================== --- head/sys/dev/ral/rt2661var.h Wed May 25 06:15:26 2016 (r300656) +++ head/sys/dev/ral/rt2661var.h Wed May 25 06:29:23 2016 (r300657) @@ -26,7 +26,7 @@ struct rt2661_rx_radiotap_header { uint16_t wr_chan_flags; int8_t wr_antsignal; int8_t wr_antnoise; -} __packed; +} __packed __aligned(8); #define RT2661_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_TSFT) | \ @@ -42,7 +42,7 @@ struct rt2661_tx_radiotap_header { uint8_t wt_rate; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed; +} __packed __aligned(8); #define RT2661_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: head/sys/dev/ral/rt2860var.h ============================================================================== --- head/sys/dev/ral/rt2860var.h Wed May 25 06:15:26 2016 (r300656) +++ head/sys/dev/ral/rt2860var.h Wed May 25 06:29:23 2016 (r300657) @@ -38,7 +38,7 @@ struct rt2860_rx_radiotap_header { uint8_t wr_antenna; int8_t wr_antsignal; int8_t wr_antnoise; -} __packed; +} __packed __aligned(8); #define RT2860_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_TSFT) | \ @@ -55,7 +55,7 @@ struct rt2860_tx_radiotap_header { uint8_t wt_rate; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed; +} __packed __aligned(8); #define RT2860_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \