From 16e8f0114ec12a3264114d2740529506775bcb10 Mon Sep 17 00:00:00 2001 From: Varun Reddy Yeturu Date: Wed, 3 Feb 2016 17:21:09 -0800 Subject: [PATCH] qcacld-3.0: Do not send replay counter for CCKM Do not include replay counter attribute when roaming is done for CCKM authentication type. For 11R and CCKM roaming, the re-association frame carries additional IE's which help cut down the Key exchange post association. Hence there would be no EAPOL exchange and hence it is not needed to include the replay counter attribute to the supplicant after roaming. CRs-Fixed: 972486 Change-Id: Ib861bdc91e949605788a19df4a706e6544dd4c73 --- core/hdd/src/wlan_hdd_cfg80211.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 4e513d6e56..e9a74a044d 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -2998,6 +2998,7 @@ int wlan_hdd_send_roam_auth_event(hdd_context_t *hdd_ctx_ptr, uint8_t *bssid, uint32_t rsp_rsn_len, tCsrRoamInfo *roam_info_ptr) { struct sk_buff *skb = NULL; + eCsrAuthType auth_type; ENTER(); if (wlan_hdd_validate_context(hdd_ctx_ptr)) { @@ -3043,14 +3044,17 @@ int wlan_hdd_send_roam_auth_event(hdd_context_t *hdd_ctx_ptr, uint8_t *bssid, hdd_err("nla put fail"); goto nla_put_failure; } - /* if FT connection: dont send ROAM_AUTH_KEY_REPLAY_CTR */ - if (roam_info_ptr->u.pConnectedProfile->AuthType != - eCSR_AUTH_TYPE_FT_RSN && - roam_info_ptr->u.pConnectedProfile->AuthType != - eCSR_AUTH_TYPE_FT_RSN_PSK && - nla_put(skb, QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_KEY_REPLAY_CTR, - SIR_REPLAY_CTR_LEN, roam_info_ptr->replay_ctr)) { - hdd_err("non FT connection."); + auth_type = roam_info_ptr->u.pConnectedProfile->AuthType; + /* if FT or CCKM connection: dont send replay counter */ + if (auth_type != eCSR_AUTH_TYPE_FT_RSN && + auth_type != eCSR_AUTH_TYPE_FT_RSN_PSK && + auth_type != eCSR_AUTH_TYPE_CCKM_WPA && + auth_type != eCSR_AUTH_TYPE_CCKM_RSN && + nla_put(skb, + QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_KEY_REPLAY_CTR, + SIR_REPLAY_CTR_LEN, + roam_info_ptr->replay_ctr)) { + hdd_err("non FT/non CCKM connection."); hdd_err("failed to send replay counter."); goto nla_put_failure; }