wlan: Add PMF (802.11w) support for station mode
These changes add Protected Management Frames (802.11w) support for
the device in station mode.
Change-Id: I2cdc60c4a9ed3ab40303de11ca3b679a9fe1d455
CRs-Fixed: 452422, 452831, 455139, 450564, 452558
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 5fa9cce..58fffeb 100755
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -164,6 +164,9 @@
#ifdef FEATURE_WLAN_WAPI
WLAN_CIPHER_SUITE_SMS4,
#endif
+#ifdef WLAN_FEATURE_11W
+ WLAN_CIPHER_SUITE_AES_CMAC,
+#endif
};
static inline int is_broadcast_ether_addr(const u8 *addr)
@@ -704,6 +707,13 @@
sme_RegisterMgmtFrame(hHal, pAdapter->sessionId, type,
(v_U8_t*)P2P_ACTION_FRAME,
P2P_ACTION_FRAME_SIZE );
+
+#ifdef WLAN_FEATURE_11W
+ /* SA Query Response Action Frame */
+ sme_RegisterMgmtFrame(hHal, pAdapter->sessionId, type,
+ (v_U8_t*)SA_QUERY_FRAME_RSP,
+ SA_QUERY_FRAME_RSP_SIZE );
+#endif /* WLAN_FEATURE_11W */
}
void wlan_hdd_cfg80211_pre_voss_stop(hdd_adapter_t* pAdapter)
@@ -743,6 +753,13 @@
sme_DeregisterMgmtFrame(hHal, pAdapter->sessionId, type,
(v_U8_t*)P2P_ACTION_FRAME,
P2P_ACTION_FRAME_SIZE );
+
+#ifdef WLAN_FEATURE_11W
+ /* SA Query Response Action Frame */
+ sme_DeregisterMgmtFrame(hHal, pAdapter->sessionId, type,
+ (v_U8_t*)SA_QUERY_FRAME_RSP,
+ SA_QUERY_FRAME_RSP_SIZE );
+#endif /* WLAN_FEATURE_11W */
}
#ifdef FEATURE_WLAN_WAPI
@@ -3111,11 +3128,23 @@
return 0;
}
#endif
+
#ifdef FEATURE_WLAN_CCX
case WLAN_CIPHER_SUITE_KRK:
setKey.encType = eCSR_ENCRYPT_TYPE_KRK;
break;
#endif
+
+#ifdef WLAN_FEATURE_11W
+ case WLAN_CIPHER_SUITE_AES_CMAC:
+ setKey.encType = eCSR_ENCRYPT_TYPE_AES_CMAC;
+ /* Temporarily we will ignore the setting of the IGTK. Once the Riva
+ firmware is modified to handle the IGTK, then we will proceeed normally.
+ For now, we just return success. */
+ return 0;
+ /* break; */
+#endif
+
default:
hddLog(VOS_TRACE_LEVEL_ERROR, "%s: unsupported cipher type %lu",
__func__, params->cipher);
@@ -4811,6 +4840,11 @@
pRoamProfile->ChannelInfo.ChannelList = &operatingChannel;
pRoamProfile->ChannelInfo.numOfChannels = 1;
}
+ else
+ {
+ pRoamProfile->ChannelInfo.ChannelList = NULL;
+ pRoamProfile->ChannelInfo.numOfChannels = 0;
+ }
/* change conn_state to connecting before sme_RoamConnect(), because sme_RoamConnect()
* has a direct path to call hdd_smeRoamCallback(), which will change the conn_state
@@ -5365,6 +5399,10 @@
return status;
}
+#ifdef WLAN_FEATURE_11W
+ pWextState->roamProfile.MFPEnabled = (req->mfp == NL80211_MFP_REQUIRED);
+#endif
+
/*parse WPA/RSN IE, and set the correspoing fileds in Roam profile*/
if (req->ie_len)
{