linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath5k: add support of HW encryption in management frames
@ 2012-08-28  9:34 Chun-Yeow Yeoh
  2012-08-31  6:58 ` Adrian Chadd
  2012-09-04  8:11 ` Johannes Berg
  0 siblings, 2 replies; 37+ messages in thread
From: Chun-Yeow Yeoh @ 2012-08-28  9:34 UTC (permalink / raw)
  To: linux-wireless; +Cc: jirislaby, mickflemm, mcgrof, ath5k-devel, Chun-Yeow Yeoh

This patch provides the support of hardware encyrption for
management frame, including the support of AES CMAC. This
patch is tested with the following chipsets:
- AR5213A
- AR5413
- AR2413/AR2414

Beside, this patch also extends the IBSS RSN to mesh.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
---
 drivers/net/wireless/ath/ath5k/base.c         |    4 +++-
 drivers/net/wireless/ath/ath5k/mac80211-ops.c |    7 +++++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index a0a202d..084162e 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -2446,7 +2446,9 @@ ath5k_init_ah(struct ath5k_hw *ah, const struct ath_bus_ops *bus_ops)
 	hw->flags = IEEE80211_HW_RX_INCLUDES_FCS |
 			IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING |
 			IEEE80211_HW_SIGNAL_DBM |
-			IEEE80211_HW_REPORTS_TX_ACK_STATUS;
+			IEEE80211_HW_REPORTS_TX_ACK_STATUS |
+			IEEE80211_HW_MFP_CAPABLE |
+			IEEE80211_HW_SUPPORTS_PER_STA_GTK;
 
 	hw->wiphy->interface_modes =
 		BIT(NL80211_IFTYPE_AP) |
diff --git a/drivers/net/wireless/ath/ath5k/mac80211-ops.c b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
index df61a09..7f78caa 100644
--- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c
+++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
@@ -489,7 +489,8 @@ ath5k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
 	if (ath5k_modparam_nohwcrypt)
 		return -EOPNOTSUPP;
 
-	if (vif->type == NL80211_IFTYPE_ADHOC &&
+	if ((vif->type == NL80211_IFTYPE_ADHOC ||
+	     vif->type == NL80211_IFTYPE_MESH_POINT) &&
 	    (key->cipher == WLAN_CIPHER_SUITE_TKIP ||
 	     key->cipher == WLAN_CIPHER_SUITE_CCMP) &&
 	    !(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) {
@@ -502,6 +503,7 @@ ath5k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
 	case WLAN_CIPHER_SUITE_WEP104:
 	case WLAN_CIPHER_SUITE_TKIP:
 		break;
+	case WLAN_CIPHER_SUITE_AES_CMAC:
 	case WLAN_CIPHER_SUITE_CCMP:
 		if (common->crypt_caps & ATH_CRYPT_CAP_CIPHER_AESCCM)
 			break;
@@ -522,7 +524,8 @@ ath5k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
 			key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
 			if (key->cipher == WLAN_CIPHER_SUITE_TKIP)
 				key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC;
-			if (key->cipher == WLAN_CIPHER_SUITE_CCMP)
+			if (key->cipher == WLAN_CIPHER_SUITE_CCMP &&
+			    !(common->crypt_caps & ATH_CRYPT_CAP_CIPHER_AESCCM))
 				key->flags |= IEEE80211_KEY_FLAG_SW_MGMT;
 			ret = 0;
 		}
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2012-09-11 17:48 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-28  9:34 [PATCH] ath5k: add support of HW encryption in management frames Chun-Yeow Yeoh
2012-08-31  6:58 ` Adrian Chadd
2012-08-31 15:24   ` Yeoh Chun-Yeow
2012-09-03 19:24     ` Adrian Chadd
2012-09-04  1:03       ` Yeoh Chun-Yeow
2012-09-04  8:11 ` Johannes Berg
2012-09-04  9:28   ` Yeoh Chun-Yeow
2012-09-04  9:31     ` Johannes Berg
2012-09-04 10:22     ` Jouni Malinen
2012-09-04 11:21       ` Yeoh Chun-Yeow
2012-09-04 11:25         ` Yeoh Chun-Yeow
2012-09-04 11:35           ` Johannes Berg
2012-09-04 16:41             ` Yeoh Chun-Yeow
2012-09-04 16:54               ` Johannes Berg
2012-09-05  6:52                 ` Yeoh Chun-Yeow
2012-09-04 16:55               ` Christian Lamparter
2012-09-04 16:57                 ` Johannes Berg
2012-09-05  7:16               ` Jouni Malinen
2012-09-05  7:31                 ` Yeoh Chun-Yeow
2012-09-05  8:03                   ` Jouni Malinen
2012-09-07  3:51                     ` Yeoh Chun-Yeow
2012-09-09  1:47                       ` Adrian Chadd
2012-09-10 13:13                         ` Kalle Valo
2012-09-10 15:11                           ` Yeoh Chun-Yeow
2012-09-11  6:46                             ` Nick Kossifidis
2012-09-11  9:42                               ` Yeoh Chun-Yeow
2012-09-11 15:05                                 ` Nick Kossifidis
2012-09-11 15:51                                   ` Yeoh Chun-Yeow
2012-09-11 16:06                                     ` Nick Kossifidis
2012-09-11 16:07                                       ` Nick Kossifidis
2012-09-11 16:20                                         ` Yeoh Chun-Yeow
2012-09-11 16:30                                           ` Adrian Chadd
2012-09-11 16:36                                           ` Nick Kossifidis
2012-09-11 16:39                                             ` Johannes Berg
2012-09-11 17:31                                             ` Christian Lamparter
2012-09-11 17:48                                               ` Nick Kossifidis
2012-09-05  7:11             ` Jouni Malinen

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).