diff mbox series

[2/2] mac80211_hwsim: Update feature flags

Message ID 20190422213412.16533-2-alexander@wetzel-home.de (mailing list archive)
State Changes Requested
Delegated to: Johannes Berg
Headers show
Series [1/2] mac80211: Fix Extended Key ID auto activation | expand

Commit Message

Alexander Wetzel April 22, 2019, 9:34 p.m. UTC
Hwsim is not using HW crypto offload and can correctly rekey PTK keys.
Set NL80211_EXT_FEATURE_CAN_REPLACE_PTK0 to not trigger workarounds.

Also allow Extended Key ID to be used with hwsim, regardless that the
driver A-MPDU aggregation is violating IEEE 802.11 and can aggregate
MPDUs using different key IDs into one A-MPDU.

Hwsim can only communicate with other hwsim cards and itself is able to
handle the non-standard A-MPDUs on Rx.

Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de>
---
 drivers/net/wireless/mac80211_hwsim.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Johannes Berg April 23, 2019, 10:18 a.m. UTC | #1
On Mon, 2019-04-22 at 23:34 +0200, Alexander Wetzel wrote:
> Hwsim is not using HW crypto offload and can correctly rekey PTK keys.
> Set NL80211_EXT_FEATURE_CAN_REPLACE_PTK0 to not trigger workarounds.

Why not do this generally also in mac80211 when only software crypto is
possible?

> Also allow Extended Key ID to be used with hwsim, regardless that the
> driver A-MPDU aggregation is violating IEEE 802.11 and can aggregate
> MPDUs using different key IDs into one A-MPDU.
> 
> Hwsim can only communicate with other hwsim cards and itself is able to
> handle the non-standard A-MPDUs on Rx.

Makes sense, but a comment would be nice.

Actually though, hwsim never even builds aggregates :-) It negotiates
sessions, but doesn't really make A-MPDUs.

johannes
diff mbox series

Patch

diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 44cffd1f6dbf..7abe52e3357f 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -2810,6 +2810,7 @@  static int mac80211_hwsim_new_radio(struct genl_info *info,
 	ieee80211_hw_set(hw, SIGNAL_DBM);
 	ieee80211_hw_set(hw, SUPPORTS_PS);
 	ieee80211_hw_set(hw, TDLS_WIDER_BW);
+	ieee80211_hw_set(hw, EXT_KEY_ID_NATIVE);
 	if (rctbl)
 		ieee80211_hw_set(hw, SUPPORTS_RC_TABLE);
 	ieee80211_hw_set(hw, SUPPORTS_MULTI_BSSID);
@@ -2824,6 +2825,7 @@  static int mac80211_hwsim_new_radio(struct genl_info *info,
 			       NL80211_FEATURE_DYNAMIC_SMPS |
 			       NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR;
 	wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_VHT_IBSS);
+	wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CAN_REPLACE_PTK0);
 
 	hw->wiphy->interface_modes = param->iftypes;