From patchwork Fri Apr 10 21:57:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Greear X-Patchwork-Id: 6199731 Return-Path: X-Original-To: patchwork-ath10k@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 939539F1C4 for ; Fri, 10 Apr 2015 21:58:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9B7212041F for ; Fri, 10 Apr 2015 21:58:02 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B99152041E for ; Fri, 10 Apr 2015 21:58:01 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Yggvu-000518-6J; Fri, 10 Apr 2015 21:57:50 +0000 Received: from mail2.candelatech.com ([208.74.158.173]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Yggvs-0004v9-2u for ath10k@lists.infradead.org; Fri, 10 Apr 2015 21:57:48 +0000 Received: from [192.168.100.236] (unknown [50.251.239.81]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail2.candelatech.com (Postfix) with ESMTPSA id 0D19540EA45; Fri, 10 Apr 2015 14:57:25 -0700 (PDT) Message-ID: <55284744.80105@candelatech.com> Date: Fri, 10 Apr 2015 14:57:24 -0700 From: Ben Greear Organization: Candela Technologies User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Michal Kazior Subject: Re: [PATCH 4/4] ath10k: enable ibss-rsn References: <1428672203-8604-1-git-send-email-michal.kazior@tieto.com> <1428672203-8604-5-git-send-email-michal.kazior@tieto.com> In-Reply-To: <1428672203-8604-5-git-send-email-michal.kazior@tieto.com> X-Enigmail-Version: 1.5.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150410_145748_159227_295AE4C1 X-CRM114-Status: GOOD ( 21.31 ) X-Spam-Score: -0.0 (/) Cc: Janusz Dziedzic , linux-wireless@vger.kernel.org, ath10k@lists.infradead.org X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 04/10/2015 06:23 AM, Michal Kazior wrote: > From: Janusz Dziedzic > > With latest additions to the driver it seems > viable to enable support for IBSS-RSN. > > It seems to work on QCA988X and 999.999.0.636 but > is a bit slow to exchange RSN keys for some > reason. This may be a firmware quirk or ath10k is > missing something. Nevertheless it makes sense to > finally enable IBSS-RSN in ath10k even if somewhat > handicapped. > > QCA6174 firmware doesn't seem to be able to Tx > EAPOL frames at all now (they get stuck in hw > queues for some reason) so it never gets to set > the keys in driver. It's fairly safe to assume that > once this is fixed IBSS-RSN will work with QCA6174 > firmware without any additional changes. Hence no > special handling for advertising > IEEE80211_HW_SUPPORTS_PER_STA_GTK and > WIPHY_FLAG_IBSS_RSN is done now. With your patches (though not certain they are all needed on my firmware now), and this patch below, my 10.1 system seems to be doing IBSS + RSN properly. In case you are seeing any issues with small packets on your IBSS systems, I would be curious to know your results if you gave this patch a try. Without this, I see runt frames received on the peer (ARP responses in this particular case). I was also seeing similarly corrupted EAPOL frames from what I can tell. I don't really know why this is required, or if it is required for more than just IBSS + RSN at this point. [greearb@ben-dt2 ath10k]$ git diff Thanks, Ben diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index d3add01..853bf55 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -2631,6 +2631,19 @@ static void ath10k_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif = info->control.vif; struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; + + if (vif && vif->type == NL80211_IFTYPE_ADHOC) { + static int my_zlen = 78; + /* This nasty little hack fixes IBSS + RSN with small + * frames frames (ARP, etc) on 10.1 (CT) firmware. + * Shouldn't hurt any firmware, and may help other as well. --Ben + */ + if (skb->len < my_zlen) { + if (skb_put_padto(skb, my_zlen)) + return; /* skb was consumed by skb_padto on error */ + } + } + /* We should disable CCK RATE due to P2P */ if (info->flags & IEEE80211_TX_CTL_NO_CCK_RATE) ath10k_dbg(ar, ATH10K_DBG_MAC, "IEEE80211_TX_CTL_NO_CCK_RATE\n");