linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: ath10k@lists.infradead.org, linux-wireless@vger.kernel.org,
	Janusz Dziedzic <janusz.dziedzic@tieto.com>
Subject: Re: [PATCH 4/4] ath10k: enable ibss-rsn
Date: Fri, 10 Apr 2015 14:57:24 -0700	[thread overview]
Message-ID: <55284744.80105@candelatech.com> (raw)
In-Reply-To: <1428672203-8604-5-git-send-email-michal.kazior@tieto.com>

On 04/10/2015 06:23 AM, Michal Kazior wrote:
> From: Janusz Dziedzic <janusz.dziedzic@tieto.com>
> 
> 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
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");


Thanks,
Ben


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


  reply	other threads:[~2015-04-10 21:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-10 13:23 [PATCH 0/4] ath10k: ibss crypto fixes Michal Kazior
2015-04-10 13:23 ` [PATCH 1/4] ath10k: don't use reassoc flag Michal Kazior
2015-04-10 13:23 ` [PATCH 2/4] ath10k: fix multiple key static wep with ibss Michal Kazior
2015-04-10 17:17   ` Ben Greear
2015-04-10 13:23 ` [PATCH 3/4] ath10k: set def key idx for ibss Michal Kazior
2015-04-10 13:23 ` [PATCH 4/4] ath10k: enable ibss-rsn Michal Kazior
2015-04-10 21:57   ` Ben Greear [this message]
2015-04-13  8:41   ` Michal Kazior
2015-04-15 13:02 ` [PATCH 0/4] ath10k: ibss crypto fixes Kalle Valo
2015-04-17  6:37 ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55284744.80105@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=ath10k@lists.infradead.org \
    --cc=janusz.dziedzic@tieto.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=michal.kazior@tieto.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).