2018-07-09 10:20:36

by Lorenzo Bianconi

[permalink] [raw]
Subject: [PATCH 0/2] enable 802.11w in mt7601u driver

Lorenzo Bianconi (1):
mt7601u: use sw encryption for hw unsupported ciphers

Davide Caratti (1):
mt7601u: expose 802.11w support

drivers/net/wireless/mediatek/mt7601u/init.c | 1 +
drivers/net/wireless/mediatek/mt7601u/main.c | 11 +++++++++++
2 files changed, 12 insertions(+)

--
2.17.1


2018-07-30 16:06:31

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH 1/2] mt7601u: use sw encryption for hw unsupported ciphers

Lorenzo Bianconi <[email protected]> wrote:

> Fall back to software encryption for hw unsupported ciphers in order
> to enable 802.11w
>
> Signed-off-by: Lorenzo Bianconi <[email protected]>

2 patches applied to wireless-drivers-next.git, thanks.

03d677c50ad7 mt7601u: use sw encryption for hw unsupported ciphers
53c2cb8df327 mt7601u: expose 802.11w support

--
https://patchwork.kernel.org/patch/10514171/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

2018-07-09 10:20:42

by Lorenzo Bianconi

[permalink] [raw]
Subject: [PATCH 2/2] mt7601u: expose 802.11w support

From: Davide Caratti <[email protected]>

Set MFP_CAPABLE bit in hw flag capabilities exported by the driver

Signed-off-by: Davide Caratti <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
---
drivers/net/wireless/mediatek/mt7601u/init.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/mediatek/mt7601u/init.c b/drivers/net/wireless/mediatek/mt7601u/init.c
index d3b611aaf061..faea99b7a445 100644
--- a/drivers/net/wireless/mediatek/mt7601u/init.c
+++ b/drivers/net/wireless/mediatek/mt7601u/init.c
@@ -603,6 +603,7 @@ int mt7601u_register_device(struct mt7601u_dev *dev)
ieee80211_hw_set(hw, SUPPORTS_HT_CCK_RATES);
ieee80211_hw_set(hw, AMPDU_AGGREGATION);
ieee80211_hw_set(hw, SUPPORTS_RC_TABLE);
+ ieee80211_hw_set(hw, MFP_CAPABLE);
hw->max_rates = 1;
hw->max_report_rates = 7;
hw->max_rate_tries = 1;
--
2.17.1

2018-07-09 10:20:39

by Lorenzo Bianconi

[permalink] [raw]
Subject: [PATCH 1/2] mt7601u: use sw encryption for hw unsupported ciphers

Fall back to software encryption for hw unsupported ciphers in order
to enable 802.11w

Signed-off-by: Lorenzo Bianconi <[email protected]>
---
drivers/net/wireless/mediatek/mt7601u/main.c | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/drivers/net/wireless/mediatek/mt7601u/main.c b/drivers/net/wireless/mediatek/mt7601u/main.c
index 7b21016012c3..0f1789020960 100644
--- a/drivers/net/wireless/mediatek/mt7601u/main.c
+++ b/drivers/net/wireless/mediatek/mt7601u/main.c
@@ -308,6 +308,17 @@ mt7601u_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
int idx = key->keyidx;
int ret;

+ /* fall back to sw encryption for unsupported ciphers */
+ switch (key->cipher) {
+ case WLAN_CIPHER_SUITE_WEP40:
+ case WLAN_CIPHER_SUITE_WEP104:
+ case WLAN_CIPHER_SUITE_TKIP:
+ case WLAN_CIPHER_SUITE_CCMP:
+ break;
+ default:
+ return -EOPNOTSUPP;
+ }
+
if (cmd == SET_KEY) {
key->hw_key_idx = wcid->idx;
wcid->hw_key_idx = idx;
--
2.17.1

2018-07-10 03:14:18

by Jakub Kicinski

[permalink] [raw]
Subject: Re: [PATCH 0/2] enable 802.11w in mt7601u driver

On Mon, 9 Jul 2018 12:20:25 +0200, Lorenzo Bianconi wrote:
> Lorenzo Bianconi (1):
> mt7601u: use sw encryption for hw unsupported ciphers
>
> Davide Caratti (1):
> mt7601u: expose 802.11w support
>
> drivers/net/wireless/mediatek/mt7601u/init.c | 1 +
> drivers/net/wireless/mediatek/mt7601u/main.c | 11 +++++++++++
> 2 files changed, 12 insertions(+)

Acked-by: Jakub Kicinski <[email protected]>