]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
ath6kl: Use delayed key configuration for WAPI in AP mode
authorJouni Malinen <jouni@qca.qualcomm.com>
Thu, 8 Dec 2011 14:50:30 +0000 (16:50 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Tue, 13 Dec 2011 12:21:30 +0000 (14:21 +0200)
This is needed to allow WAPI AP to configure the initial group key
to the target in the same way as is done with TKIP/CCMP. This
fixes broadcast data frame delivery with the initial group key.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath6kl/cfg80211.c
drivers/net/wireless/ath/ath6kl/main.c

index 92d862dea5849b4fb837736fa274d722b5720d53..a2dd0fc05b9136279cc11df115b8b893a426f7c6 100644 (file)
@@ -999,7 +999,8 @@ static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
                   key_usage, key->seq_len);
 
        if (vif->nw_type == AP_NETWORK && !pairwise &&
-           (key_type == TKIP_CRYPT || key_type == AES_CRYPT) && params) {
+           (key_type == TKIP_CRYPT || key_type == AES_CRYPT ||
+            key_type == WAPI_CRYPT) && params) {
                ar->ap_mode_bkey.valid = true;
                ar->ap_mode_bkey.key_index = key_index;
                ar->ap_mode_bkey.key_type = key_type;
index d9b4ba4109909d26d9b89354ef428e3491bbe02a..9cf48f449a343a84bac3bd86803ad741b68b0924 100644 (file)
@@ -397,7 +397,9 @@ void ath6kl_connect_ap_mode_bss(struct ath6kl_vif *vif, u16 channel)
        case NONE_AUTH:
                if (vif->prwise_crypto == WEP_CRYPT)
                        ath6kl_install_static_wep_keys(vif);
-               break;
+               if (!ik->valid || ik->key_type != WAPI_CRYPT)
+                       break;
+               /* for WAPI, we need to set the delayed group key, continue: */
        case WPA_PSK_AUTH:
        case WPA2_PSK_AUTH:
        case (WPA_PSK_AUTH | WPA2_PSK_AUTH):