cfg80211.c (93fbff1197474d7b65e598c6f48fa82a5c334539) | cfg80211.c (e7a7b84e33178db4a839c5e1773247be17597c1f) |
---|---|
1// SPDX-License-Identifier: ISC 2/* 3 * Copyright (c) 2012-2017 Qualcomm Atheros, Inc. 4 * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. 5 */ 6 7#include <linux/etherdevice.h> 8#include <linux/moduleparam.h> --- 1606 unchanged lines hidden (view full) --- 1615 cc->key_set = false; 1616 break; 1617 default: 1618 break; 1619 } 1620} 1621 1622static int wil_cfg80211_add_key(struct wiphy *wiphy, | 1// SPDX-License-Identifier: ISC 2/* 3 * Copyright (c) 2012-2017 Qualcomm Atheros, Inc. 4 * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. 5 */ 6 7#include <linux/etherdevice.h> 8#include <linux/moduleparam.h> --- 1606 unchanged lines hidden (view full) --- 1615 cc->key_set = false; 1616 break; 1617 default: 1618 break; 1619 } 1620} 1621 1622static int wil_cfg80211_add_key(struct wiphy *wiphy, |
1623 struct net_device *ndev, | 1623 struct net_device *ndev, int link_id, |
1624 u8 key_index, bool pairwise, 1625 const u8 *mac_addr, 1626 struct key_params *params) 1627{ 1628 int rc; 1629 struct wil6210_vif *vif = ndev_to_vif(ndev); 1630 struct wil6210_priv *wil = wiphy_to_wil(wiphy); 1631 struct wireless_dev *wdev = vif_to_wdev(vif); --- 59 unchanged lines hidden (view full) --- 1691 */ 1692 wil_set_crypto_rx(key_index, key_usage, cs, params); 1693 } 1694 1695 return rc; 1696} 1697 1698static int wil_cfg80211_del_key(struct wiphy *wiphy, | 1624 u8 key_index, bool pairwise, 1625 const u8 *mac_addr, 1626 struct key_params *params) 1627{ 1628 int rc; 1629 struct wil6210_vif *vif = ndev_to_vif(ndev); 1630 struct wil6210_priv *wil = wiphy_to_wil(wiphy); 1631 struct wireless_dev *wdev = vif_to_wdev(vif); --- 59 unchanged lines hidden (view full) --- 1691 */ 1692 wil_set_crypto_rx(key_index, key_usage, cs, params); 1693 } 1694 1695 return rc; 1696} 1697 1698static int wil_cfg80211_del_key(struct wiphy *wiphy, |
1699 struct net_device *ndev, | 1699 struct net_device *ndev, int link_id, |
1700 u8 key_index, bool pairwise, 1701 const u8 *mac_addr) 1702{ 1703 struct wil6210_vif *vif = ndev_to_vif(ndev); 1704 struct wil6210_priv *wil = wiphy_to_wil(wiphy); 1705 struct wireless_dev *wdev = vif_to_wdev(vif); 1706 enum wmi_key_usage key_usage = wil_detect_key_usage(wdev, pairwise); 1707 struct wil_sta_info *cs = wil_find_sta_by_key_usage(wil, vif->mid, --- 10 unchanged lines hidden (view full) --- 1718 if (!IS_ERR_OR_NULL(cs)) 1719 wil_del_rx_key(key_index, key_usage, cs); 1720 1721 return wmi_del_cipher_key(vif, key_index, mac_addr, key_usage); 1722} 1723 1724/* Need to be present or wiphy_new() will WARN */ 1725static int wil_cfg80211_set_default_key(struct wiphy *wiphy, | 1700 u8 key_index, bool pairwise, 1701 const u8 *mac_addr) 1702{ 1703 struct wil6210_vif *vif = ndev_to_vif(ndev); 1704 struct wil6210_priv *wil = wiphy_to_wil(wiphy); 1705 struct wireless_dev *wdev = vif_to_wdev(vif); 1706 enum wmi_key_usage key_usage = wil_detect_key_usage(wdev, pairwise); 1707 struct wil_sta_info *cs = wil_find_sta_by_key_usage(wil, vif->mid, --- 10 unchanged lines hidden (view full) --- 1718 if (!IS_ERR_OR_NULL(cs)) 1719 wil_del_rx_key(key_index, key_usage, cs); 1720 1721 return wmi_del_cipher_key(vif, key_index, mac_addr, key_usage); 1722} 1723 1724/* Need to be present or wiphy_new() will WARN */ 1725static int wil_cfg80211_set_default_key(struct wiphy *wiphy, |
1726 struct net_device *ndev, | 1726 struct net_device *ndev, int link_id, |
1727 u8 key_index, bool unicast, 1728 bool multicast) 1729{ 1730 struct wil6210_priv *wil = wiphy_to_wil(wiphy); 1731 1732 wil_dbg_misc(wil, "set_default_key: entered\n"); 1733 return 0; 1734} --- 332 unchanged lines hidden (view full) --- 2067 } 2068 2069 if (!vif->privacy || vif->gtk_len == 0) 2070 continue; 2071 2072 key_params.key = vif->gtk; 2073 key_params.key_len = vif->gtk_len; 2074 key_params.seq_len = IEEE80211_GCMP_PN_LEN; | 1727 u8 key_index, bool unicast, 1728 bool multicast) 1729{ 1730 struct wil6210_priv *wil = wiphy_to_wil(wiphy); 1731 1732 wil_dbg_misc(wil, "set_default_key: entered\n"); 1733 return 0; 1734} --- 332 unchanged lines hidden (view full) --- 2067 } 2068 2069 if (!vif->privacy || vif->gtk_len == 0) 2070 continue; 2071 2072 key_params.key = vif->gtk; 2073 key_params.key_len = vif->gtk_len; 2074 key_params.seq_len = IEEE80211_GCMP_PN_LEN; |
2075 rc = wil_cfg80211_add_key(wiphy, ndev, vif->gtk_index, false, 2076 NULL, &key_params); | 2075 rc = wil_cfg80211_add_key(wiphy, ndev, -1, vif->gtk_index, 2076 false, NULL, &key_params); |
2077 if (rc) 2078 wil_err(wil, "vif %d recovery add key failed (%d)\n", 2079 i, rc); 2080 } 2081} 2082 2083static int wil_cfg80211_change_beacon(struct wiphy *wiphy, 2084 struct net_device *ndev, --- 1228 unchanged lines hidden --- | 2077 if (rc) 2078 wil_err(wil, "vif %d recovery add key failed (%d)\n", 2079 i, rc); 2080 } 2081} 2082 2083static int wil_cfg80211_change_beacon(struct wiphy *wiphy, 2084 struct net_device *ndev, --- 1228 unchanged lines hidden --- |