FIX: [mac80211] wlcore: adding support to IGTK key - AES-CMAC128
(cherry picked from commit c42a7fc5f5)
This commit is contained in:
parent
7c47a3374f
commit
7420bbdc01
|
|
@ -1,4 +1,4 @@
|
|||
From 570a5113d096abd20168f93b3ab3ed3625fda840 Mon Sep 17 00:00:00 2001
|
||||
From 3ec00c7616f20083d3775e28bcf76b660838e9b3 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Walther <patrick.walther@netmodule.com>
|
||||
Date: Fri, 24 Jul 2020 18:56:44 +0200
|
||||
Subject: [PATCH] backport of netmodule patches from openwrt
|
||||
|
|
@ -9,21 +9,21 @@ Subject: [PATCH] backport of netmodule patches from openwrt
|
|||
drivers/net/wireless/ath/regd.c | 2 +-
|
||||
drivers/net/wireless/ath/regd.h | 3 +-
|
||||
drivers/net/wireless/ath/regd_common.h | 1 +
|
||||
drivers/net/wireless/ti/wlcore/cmd.c | 13 +++-----
|
||||
drivers/net/wireless/ti/wlcore/cmd.h | 2 +-
|
||||
drivers/net/wireless/ti/wlcore/cmd.c | 13 +++----
|
||||
drivers/net/wireless/ti/wlcore/cmd.h | 3 +-
|
||||
drivers/net/wireless/ti/wlcore/conf.h | 3 ++
|
||||
drivers/net/wireless/ti/wlcore/init.c | 22 ++++++++++---
|
||||
drivers/net/wireless/ti/wlcore/main.c | 54 +++++++++++++++++++------------
|
||||
drivers/net/wireless/ti/wlcore/init.c | 22 +++++++++---
|
||||
drivers/net/wireless/ti/wlcore/main.c | 58 ++++++++++++++++++++-----------
|
||||
drivers/net/wireless/ti/wlcore/wlcore_i.h | 1 +
|
||||
include/net/cfg80211.h | 10 ++++--
|
||||
include/net/mac80211.h | 7 ++--
|
||||
include/uapi/linux/nl80211.h | 3 ++
|
||||
net/mac80211/cfg.c | 13 ++++++++
|
||||
net/mac80211/cfg.c | 13 +++++++
|
||||
net/mac80211/main.c | 4 +--
|
||||
net/wireless/core.c | 41 +++++++++++++++++++----
|
||||
net/wireless/nl80211.c | 13 ++++++++
|
||||
net/wireless/reg.c | 23 ++++++++++---
|
||||
19 files changed, 162 insertions(+), 57 deletions(-)
|
||||
net/wireless/core.c | 41 ++++++++++++++++++----
|
||||
net/wireless/nl80211.c | 13 +++++++
|
||||
net/wireless/reg.c | 23 +++++++++---
|
||||
19 files changed, 167 insertions(+), 57 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
|
||||
index 7946d3b..ba289ad 100644
|
||||
|
|
@ -130,7 +130,7 @@ index 2a48fc6..888cfd7 100644
|
|||
cmd->supported_rates, sta->uapsd_queues);
|
||||
|
||||
diff --git a/drivers/net/wireless/ti/wlcore/cmd.h b/drivers/net/wireless/ti/wlcore/cmd.h
|
||||
index 084375b..bfad7b5 100644
|
||||
index 084375b..24ee7ab 100644
|
||||
--- a/drivers/net/wireless/ti/wlcore/cmd.h
|
||||
+++ b/drivers/net/wireless/ti/wlcore/cmd.h
|
||||
@@ -65,7 +65,7 @@ int wl1271_cmd_set_sta_key(struct wl1271 *wl, struct wl12xx_vif *wlvif,
|
||||
|
|
@ -142,6 +142,14 @@ index 084375b..bfad7b5 100644
|
|||
int wl12xx_cmd_set_peer_state(struct wl1271 *wl, struct wl12xx_vif *wlvif,
|
||||
u8 hlid);
|
||||
int wl12xx_roc(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 role_id,
|
||||
@@ -458,6 +458,7 @@ enum wl1271_cmd_key_type {
|
||||
KEY_TKIP = 2,
|
||||
KEY_AES = 3,
|
||||
KEY_GEM = 4,
|
||||
+ KEY_IGTK = 5,
|
||||
};
|
||||
|
||||
struct wl1271_cmd_set_keys {
|
||||
diff --git a/drivers/net/wireless/ti/wlcore/conf.h b/drivers/net/wireless/ti/wlcore/conf.h
|
||||
index 6116383..e33f577 100644
|
||||
--- a/drivers/net/wireless/ti/wlcore/conf.h
|
||||
|
|
@ -202,7 +210,7 @@ index 03b49ba..6334351 100644
|
|||
rc.long_retry_limit = 10;
|
||||
rc.aflags = 0;
|
||||
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
|
||||
index 6d36cbf..355d186 100644
|
||||
index 6d36cbf..aa6f22c 100644
|
||||
--- a/drivers/net/wireless/ti/wlcore/main.c
|
||||
+++ b/drivers/net/wireless/ti/wlcore/main.c
|
||||
@@ -2213,12 +2213,13 @@ static u8 wl12xx_get_role_type(struct wl1271 *wl, struct wl12xx_vif *wlvif)
|
||||
|
|
@ -301,7 +309,17 @@ index 6d36cbf..355d186 100644
|
|||
|
||||
wl1271_debug(DEBUG_MAC80211, "mac80211 set key");
|
||||
|
||||
@@ -3551,12 +3556,14 @@ int wlcore_set_key(struct wl1271 *wl, enum set_key_cmd cmd,
|
||||
@@ -3538,6 +3543,9 @@ int wlcore_set_key(struct wl1271 *wl, enum set_key_cmd cmd,
|
||||
key_type = KEY_TKIP;
|
||||
key_conf->hw_key_idx = key_conf->keyidx;
|
||||
break;
|
||||
+ case WLAN_CIPHER_SUITE_AES_CMAC:
|
||||
+ key_type = KEY_IGTK;
|
||||
+ break;
|
||||
case WLAN_CIPHER_SUITE_CCMP:
|
||||
key_type = KEY_AES;
|
||||
key_conf->flags |= IEEE80211_KEY_FLAG_PUT_IV_SPACE;
|
||||
@@ -3551,12 +3559,14 @@ int wlcore_set_key(struct wl1271 *wl, enum set_key_cmd cmd,
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
|
|
@ -317,7 +335,7 @@ index 6d36cbf..355d186 100644
|
|||
if (ret < 0) {
|
||||
wl1271_error("Could not add or replace key");
|
||||
return ret;
|
||||
@@ -3582,7 +3589,7 @@ int wlcore_set_key(struct wl1271 *wl, enum set_key_cmd cmd,
|
||||
@@ -3582,7 +3592,7 @@ int wlcore_set_key(struct wl1271 *wl, enum set_key_cmd cmd,
|
||||
ret = wl1271_set_key(wl, wlvif, KEY_REMOVE,
|
||||
key_conf->keyidx, key_type,
|
||||
key_conf->keylen, key_conf->key,
|
||||
|
|
@ -326,7 +344,7 @@ index 6d36cbf..355d186 100644
|
|||
if (ret < 0) {
|
||||
wl1271_error("Could not remove key");
|
||||
return ret;
|
||||
@@ -5216,11 +5223,6 @@ static int wl12xx_update_sta_state(struct wl1271 *wl,
|
||||
@@ -5216,11 +5226,6 @@ static int wl12xx_update_sta_state(struct wl1271 *wl,
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
|
@ -338,7 +356,7 @@ index 6d36cbf..355d186 100644
|
|||
ret = wl1271_acx_set_ht_capabilities(wl, &sta->ht_cap, true,
|
||||
wl_sta->hlid);
|
||||
if (ret)
|
||||
@@ -5794,9 +5796,16 @@ static void wlcore_op_sta_statistics(struct ieee80211_hw *hw,
|
||||
@@ -5794,9 +5799,16 @@ static void wlcore_op_sta_statistics(struct ieee80211_hw *hw,
|
||||
{
|
||||
struct wl1271 *wl = hw->priv;
|
||||
struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif);
|
||||
|
|
@ -355,7 +373,15 @@ index 6d36cbf..355d186 100644
|
|||
wl1271_debug(DEBUG_MAC80211, "mac80211 get_rssi");
|
||||
|
||||
mutex_lock(&wl->mutex);
|
||||
@@ -6224,6 +6233,7 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)
|
||||
@@ -6210,6 +6222,7 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)
|
||||
WLAN_CIPHER_SUITE_TKIP,
|
||||
WLAN_CIPHER_SUITE_CCMP,
|
||||
WL1271_CIPHER_SUITE_GEM,
|
||||
+ WLAN_CIPHER_SUITE_AES_CMAC,
|
||||
};
|
||||
|
||||
/* The tx descriptor buffer */
|
||||
@@ -6224,6 +6237,7 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)
|
||||
|
||||
ieee80211_hw_set(wl->hw, SUPPORT_FAST_XMIT);
|
||||
ieee80211_hw_set(wl->hw, CHANCTX_STA_CSA);
|
||||
|
|
@ -363,7 +389,7 @@ index 6d36cbf..355d186 100644
|
|||
ieee80211_hw_set(wl->hw, QUEUE_CONTROL);
|
||||
ieee80211_hw_set(wl->hw, TX_AMPDU_SETUP_IN_HW);
|
||||
ieee80211_hw_set(wl->hw, AMPDU_AGGREGATION);
|
||||
@@ -6268,9 +6278,11 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)
|
||||
@@ -6268,9 +6282,11 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)
|
||||
|
||||
wl->hw->wiphy->flags |= WIPHY_FLAG_AP_UAPSD |
|
||||
WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL |
|
||||
|
|
|
|||
Loading…
Reference in New Issue