* [PATCH] ath10k: fix multi BSSID with WPA on FW 10.1
@ 2013-11-29 15:09 Bartosz Markowski
2013-12-02 7:42 ` Kalle Valo
0 siblings, 1 reply; 3+ messages in thread
From: Bartosz Markowski @ 2013-11-29 15:09 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, Michal Kazior
From: Michal Kazior <michal.kazior@tieto.com>
FW 10.1 seems to require the default key index to
be updated to point to group key after it is
installed. Otherwise Txed frames are corrupted.
Tested-by: Tomasz Skapski <tomasz.skapski@tieto.com>
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
drivers/net/wireless/ath/ath10k/mac.c | 40 +++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index b70a3b2..20821e0 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -2717,6 +2717,44 @@ static void ath10k_cancel_hw_scan(struct ieee80211_hw *hw,
mutex_unlock(&ar->conf_mutex);
}
+static void ath10k_set_key_h_def_keyidx(struct ath10k *ar,
+ struct ath10k_vif *arvif,
+ enum set_key_cmd cmd,
+ struct ieee80211_key_conf *key)
+{
+ u32 vdev_param = arvif->ar->wmi.vdev_param->def_keyid;
+ int ret;
+
+ /* 10.1 firmware branch requires default key index to be set to group
+ * key index after installing it. Otherwise FW/HW Txes corrupted
+ * frames with multi-vif APs. This is not required for main firmware
+ * branch (e.g. 636).
+ *
+ * FIXME: This has been tested only in AP. It remains unknown if this
+ * is required for multi-vif STA interfaces on 10.1 */
+
+ if (arvif->vdev_type != WMI_VDEV_TYPE_AP)
+ return;
+
+ if (key->cipher == WLAN_CIPHER_SUITE_WEP40)
+ return;
+
+ if (key->cipher == WLAN_CIPHER_SUITE_WEP104)
+ return;
+
+ if (key->flags & IEEE80211_KEY_FLAG_PAIRWISE)
+ return;
+
+ if (cmd != SET_KEY)
+ return;
+
+ ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param,
+ key->keyidx);
+ if (ret)
+ ath10k_warn("failed to set group key as default key: %d\n",
+ ret);
+}
+
static int ath10k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
struct ieee80211_vif *vif, struct ieee80211_sta *sta,
struct ieee80211_key_conf *key)
@@ -2778,6 +2816,8 @@ static int ath10k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
goto exit;
}
+ ath10k_set_key_h_def_keyidx(ar, arvif, cmd, key);
+
spin_lock_bh(&ar->data_lock);
peer = ath10k_peer_find(ar, arvif->vdev_id, peer_addr);
if (peer && cmd == SET_KEY)
--
1.7.10
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ath10k: fix multi BSSID with WPA on FW 10.1
2013-11-29 15:09 [PATCH] ath10k: fix multi BSSID with WPA on FW 10.1 Bartosz Markowski
@ 2013-12-02 7:42 ` Kalle Valo
2013-12-02 8:03 ` Bartosz Markowski
0 siblings, 1 reply; 3+ messages in thread
From: Kalle Valo @ 2013-12-02 7:42 UTC (permalink / raw)
To: Bartosz Markowski; +Cc: ath10k, linux-wireless, Michal Kazior
Bartosz Markowski <bartosz.markowski@tieto.com> writes:
> From: Michal Kazior <michal.kazior@tieto.com>
>
> FW 10.1 seems to require the default key index to
> be updated to point to group key after it is
> installed. Otherwise Txed frames are corrupted.
>
> Tested-by: Tomasz Skapski <tomasz.skapski@tieto.com>
> Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
I see few checkpatch warnings:
drivers/net/wireless/ath/ath10k/mac.c:2721: ERROR: code indent should use tabs where possible
drivers/net/wireless/ath/ath10k/mac.c:2722: ERROR: code indent should use tabs where possible
drivers/net/wireless/ath/ath10k/mac.c:2723: ERROR: code indent should use tabs where possible
--
Kalle Valo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ath10k: fix multi BSSID with WPA on FW 10.1
2013-12-02 7:42 ` Kalle Valo
@ 2013-12-02 8:03 ` Bartosz Markowski
0 siblings, 0 replies; 3+ messages in thread
From: Bartosz Markowski @ 2013-12-02 8:03 UTC (permalink / raw)
To: Kalle Valo; +Cc: ath10k, linux-wireless@vger.kernel.org, Michal Kazior
On 2 December 2013 08:42, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
> Bartosz Markowski <bartosz.markowski@tieto.com> writes:
>
>> From: Michal Kazior <michal.kazior@tieto.com>
>>
>> FW 10.1 seems to require the default key index to
>> be updated to point to group key after it is
>> installed. Otherwise Txed frames are corrupted.
>>
>> Tested-by: Tomasz Skapski <tomasz.skapski@tieto.com>
>> Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
>
> I see few checkpatch warnings:
>
> drivers/net/wireless/ath/ath10k/mac.c:2721: ERROR: code indent should use tabs where possible
> drivers/net/wireless/ath/ath10k/mac.c:2722: ERROR: code indent should use tabs where possible
> drivers/net/wireless/ath/ath10k/mac.c:2723: ERROR: code indent should use tabs where possible
ouch, sorry for that. I'll send a v2 in a sec.
--
Bartosz
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-12-02 8:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-29 15:09 [PATCH] ath10k: fix multi BSSID with WPA on FW 10.1 Bartosz Markowski
2013-12-02 7:42 ` Kalle Valo
2013-12-02 8:03 ` Bartosz Markowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox