mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
cfg80211/nl80211: separate unicast/multicast default TX keys
Allow userspace to specify that a given key is default only for unicast and/or multicast transmissions. Only WEP keys are for both, WPA/RSN keys set here are GTKs for multicast only. For more future flexibility, allow to specify all combiations. Wireless extensions can only set both so use nl80211; WEP keys (connect keys) must be set as default for both (but 802.1X WEP is still possible). Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
897bed8b43
commit
dbd2fd656f
9 changed files with 153 additions and 30 deletions
|
@ -548,8 +548,8 @@ static int __cfg80211_set_encryption(struct cfg80211_registered_device *rdev,
|
|||
__cfg80211_leave_ibss(rdev, wdev->netdev, true);
|
||||
rejoin = true;
|
||||
}
|
||||
err = rdev->ops->set_default_key(&rdev->wiphy,
|
||||
dev, idx);
|
||||
err = rdev->ops->set_default_key(&rdev->wiphy, dev,
|
||||
idx, true, true);
|
||||
}
|
||||
if (!err) {
|
||||
wdev->wext.default_key = idx;
|
||||
|
@ -627,8 +627,8 @@ int cfg80211_wext_siwencode(struct net_device *dev,
|
|||
err = 0;
|
||||
wdev_lock(wdev);
|
||||
if (wdev->current_bss)
|
||||
err = rdev->ops->set_default_key(&rdev->wiphy,
|
||||
dev, idx);
|
||||
err = rdev->ops->set_default_key(&rdev->wiphy, dev,
|
||||
idx, true, true);
|
||||
if (!err)
|
||||
wdev->wext.default_key = idx;
|
||||
wdev_unlock(wdev);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue