From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from he.sipsolutions.net ([78.46.109.217]:49192 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753528Ab2LLQUm (ORCPT ); Wed, 12 Dec 2012 11:20:42 -0500 Message-ID: <1355329248.9708.16.camel@jlt4.sipsolutions.net> (sfid-20121212_172045_095829_9396B373) Subject: Re: [PATCHv2 00/21] cw1200: ST-Ericsson cw1200 wlan device driver From: Johannes Berg To: Solomon Peachy Cc: Christian Lamparter , "John W. Linville" , Steev Klimaszewski , Janusz Dziedzic , Dmitry Tarnyagin , linux-wireless@vger.kernel.org Date: Wed, 12 Dec 2012 17:20:48 +0100 In-Reply-To: <20121212161845.GA21461@shaftnet.org> References: <1330720003-15866-1-git-send-email-dmitry.tarnyagin@stericsson.com> <20120706201839.GE1879@tuxdriver.com> <20121211232311.GA9080@shaftnet.org> <201212121613.12750.chunkeey@googlemail.com> <20121212161845.GA21461@shaftnet.org> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org List-ID: On Wed, 2012-12-12 at 11:18 -0500, Solomon Peachy wrote: > On Wed, Dec 12, 2012 at 04:13:12PM +0100, Christian Lamparter wrote: > > Mac80211 already reserves at least 18 bytes tailroom [which can be > > allocated by a simple skb_put]. In fact p54 uses this tailroom to > > pass the MIC (8 bytes) + ICV (4 bytes) to the firmware. Do you need > > more than 18 bytes? > > I just went back and had a look at the code -- There were two related > workarounds: One made room for the MIC, but as you said, that hasn't > been necessary for a while so the code was disabled. > > The other workaround is still in place, however -- cw1200 also needs a > gap in the frame payload for the IV, even though it's generated by the > firmware. I worked around this by telling setting the > IEEE80211_KEY_FLAG_GENERATE_IV flag on the mac80211 keys, and then > zeroing that part of the payload when the frame went out to the harware. > > I figured it was a less costly approach than memmoving the whole payload > over by sizeof(ICV). > > Is there a better way to handle this now? There's IEEE80211_KEY_FLAG_PUT_IV_SPACE now which does exactly that. johannes