|
@@ -483,6 +483,29 @@ mwifiex_cfg80211_add_key(struct wiphy *wiphy, struct net_device *netdev,
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+/*
|
|
|
+ * CFG802.11 operation handler to set default mgmt key.
|
|
|
+ */
|
|
|
+static int
|
|
|
+mwifiex_cfg80211_set_default_mgmt_key(struct wiphy *wiphy,
|
|
|
+ struct net_device *netdev,
|
|
|
+ u8 key_index)
|
|
|
+{
|
|
|
+ struct mwifiex_private *priv = mwifiex_netdev_get_priv(netdev);
|
|
|
+ struct mwifiex_ds_encrypt_key encrypt_key;
|
|
|
+
|
|
|
+ wiphy_dbg(wiphy, "set default mgmt key, key index=%d\n", key_index);
|
|
|
+
|
|
|
+ memset(&encrypt_key, 0, sizeof(struct mwifiex_ds_encrypt_key));
|
|
|
+ encrypt_key.key_len = WLAN_KEY_LEN_CCMP;
|
|
|
+ encrypt_key.key_index = key_index;
|
|
|
+ encrypt_key.is_igtk_def_key = true;
|
|
|
+ eth_broadcast_addr(encrypt_key.mac_addr);
|
|
|
+
|
|
|
+ return mwifiex_send_cmd(priv, HostCmd_CMD_802_11_KEY_MATERIAL,
|
|
|
+ HostCmd_ACT_GEN_SET, true, &encrypt_key, true);
|
|
|
+}
|
|
|
+
|
|
|
/*
|
|
|
* This function sends domain information to the firmware.
|
|
|
*
|
|
@@ -4082,6 +4105,7 @@ static struct cfg80211_ops mwifiex_cfg80211_ops = {
|
|
|
.leave_ibss = mwifiex_cfg80211_leave_ibss,
|
|
|
.add_key = mwifiex_cfg80211_add_key,
|
|
|
.del_key = mwifiex_cfg80211_del_key,
|
|
|
+ .set_default_mgmt_key = mwifiex_cfg80211_set_default_mgmt_key,
|
|
|
.mgmt_tx = mwifiex_cfg80211_mgmt_tx,
|
|
|
.mgmt_frame_register = mwifiex_cfg80211_mgmt_frame_register,
|
|
|
.remain_on_channel = mwifiex_cfg80211_remain_on_channel,
|