From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 8 20:56:19 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DEA6016A41F for ; Thu, 8 Sep 2005 20:56:19 +0000 (GMT) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [66.127.85.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id 911C343D48 for ; Thu, 8 Sep 2005 20:56:19 +0000 (GMT) (envelope-from sam@errno.com) Received: from [10.0.0.200] ([10.0.0.200]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.6) with ESMTP id j88KuH6j006046 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 8 Sep 2005 13:56:17 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <4320A71A.5060500@errno.com> Date: Thu, 08 Sep 2005 14:03:22 -0700 From: Sam Leffler User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050327) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Sebastien References: <200509071954.17477.sebastien.bourdeauducq@gmail.com> In-Reply-To: <200509071954.17477.sebastien.bourdeauducq@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: ieee80211_input() and fragmented mbufs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2005 20:56:20 -0000 Sebastien wrote: > Hello, > I'm passing ieee80211_input() heavily fragmented mbuf chains and it makes (at > least) the function fail to parse beacons correctly. I have the > "ieee80211_recv_mgmt: no ratesin beacon frame" message, and it makes the > driver unable to scan for networks (always return no results). > Defragmenting the mbuf before passing it to ieee80211_input() works around the > problem. Moreover, in monitor mode, the frames are sent correctly in > userland, regardless the fragmentation of the mbufs. > Is it a bug in ieee80211_input(), or should certain types of frames, such as > beacons, not be contained in fragmented mbufs ? ieee80211_input (implicitly) assumes the 802.11 header is contiguous on entry. Since most drivers use dma into mbuf clusters to recv frames this has never been an issue (others like wi dtrt from what I remember). Sam