Search Linux Wireless

[PATCH 12/15] mac80211: support changing default key index via cfg80211

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This adds the necessary hook to mac80211 so that you can
change the default key index via nl80211/cfg80211.

Signed-off-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>

---
 net/mac80211/cfg.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)

--- wireless-dev.orig/net/mac80211/cfg.c	2007-08-24 14:16:41.539417211 +0200
+++ wireless-dev/net/mac80211/cfg.c	2007-08-24 14:16:51.139417211 +0200
@@ -144,9 +144,22 @@ static int ieee80211_del_key(struct wiph
 	return 0;
 }
 
+static int ieee80211_config_default_key(struct wiphy *wiphy,
+					struct net_device *dev,
+					u8 key_idx)
+{
+	struct ieee80211_sub_if_data *sdata;
+
+	sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+	ieee80211_set_default_key(sdata, key_idx);
+
+	return 0;
+}
+
 struct cfg80211_ops mac80211_config_ops = {
 	.add_virtual_intf = ieee80211_add_iface,
 	.del_virtual_intf = ieee80211_del_iface,
 	.add_key = ieee80211_add_key,
 	.del_key = ieee80211_del_key,
+	.set_default_key = ieee80211_config_default_key,
 };

-- 

-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux