diff options
Diffstat (limited to 'drivers/net/wireless/mwifiex/cfg80211.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/cfg80211.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index ff627e1f8378..e09f0c2e46ab 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c | |||
@@ -97,8 +97,10 @@ mwifiex_cfg80211_del_key(struct wiphy *wiphy, struct net_device *netdev, | |||
97 | u8 key_index, bool pairwise, const u8 *mac_addr) | 97 | u8 key_index, bool pairwise, const u8 *mac_addr) |
98 | { | 98 | { |
99 | struct mwifiex_private *priv = mwifiex_netdev_get_priv(netdev); | 99 | struct mwifiex_private *priv = mwifiex_netdev_get_priv(netdev); |
100 | const u8 bc_mac[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; | ||
101 | const u8 *peer_mac = pairwise ? mac_addr : bc_mac; | ||
100 | 102 | ||
101 | if (mwifiex_set_encode(priv, NULL, 0, key_index, 1)) { | 103 | if (mwifiex_set_encode(priv, NULL, 0, key_index, peer_mac, 1)) { |
102 | wiphy_err(wiphy, "deleting the crypto keys\n"); | 104 | wiphy_err(wiphy, "deleting the crypto keys\n"); |
103 | return -EFAULT; | 105 | return -EFAULT; |
104 | } | 106 | } |
@@ -168,7 +170,7 @@ mwifiex_cfg80211_set_default_key(struct wiphy *wiphy, struct net_device *netdev, | |||
168 | if (!priv->sec_info.wep_enabled) | 170 | if (!priv->sec_info.wep_enabled) |
169 | return 0; | 171 | return 0; |
170 | 172 | ||
171 | if (mwifiex_set_encode(priv, NULL, 0, key_index, 0)) { | 173 | if (mwifiex_set_encode(priv, NULL, 0, key_index, NULL, 0)) { |
172 | wiphy_err(wiphy, "set default Tx key index\n"); | 174 | wiphy_err(wiphy, "set default Tx key index\n"); |
173 | return -EFAULT; | 175 | return -EFAULT; |
174 | } | 176 | } |
@@ -185,9 +187,11 @@ mwifiex_cfg80211_add_key(struct wiphy *wiphy, struct net_device *netdev, | |||
185 | struct key_params *params) | 187 | struct key_params *params) |
186 | { | 188 | { |
187 | struct mwifiex_private *priv = mwifiex_netdev_get_priv(netdev); | 189 | struct mwifiex_private *priv = mwifiex_netdev_get_priv(netdev); |
190 | const u8 bc_mac[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; | ||
191 | const u8 *peer_mac = pairwise ? mac_addr : bc_mac; | ||
188 | 192 | ||
189 | if (mwifiex_set_encode(priv, params->key, params->key_len, | 193 | if (mwifiex_set_encode(priv, params->key, params->key_len, |
190 | key_index, 0)) { | 194 | key_index, peer_mac, 0)) { |
191 | wiphy_err(wiphy, "crypto keys added\n"); | 195 | wiphy_err(wiphy, "crypto keys added\n"); |
192 | return -EFAULT; | 196 | return -EFAULT; |
193 | } | 197 | } |
@@ -947,7 +951,7 @@ mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len, u8 *ssid, | |||
947 | priv->wep_key_curr_index = 0; | 951 | priv->wep_key_curr_index = 0; |
948 | priv->sec_info.encryption_mode = 0; | 952 | priv->sec_info.encryption_mode = 0; |
949 | priv->sec_info.is_authtype_auto = 0; | 953 | priv->sec_info.is_authtype_auto = 0; |
950 | ret = mwifiex_set_encode(priv, NULL, 0, 0, 1); | 954 | ret = mwifiex_set_encode(priv, NULL, 0, 0, NULL, 1); |
951 | 955 | ||
952 | if (mode == NL80211_IFTYPE_ADHOC) { | 956 | if (mode == NL80211_IFTYPE_ADHOC) { |
953 | /* "privacy" is set only for ad-hoc mode */ | 957 | /* "privacy" is set only for ad-hoc mode */ |
@@ -995,7 +999,7 @@ mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len, u8 *ssid, | |||
995 | " with key len %d\n", sme->key_len); | 999 | " with key len %d\n", sme->key_len); |
996 | priv->wep_key_curr_index = sme->key_idx; | 1000 | priv->wep_key_curr_index = sme->key_idx; |
997 | ret = mwifiex_set_encode(priv, sme->key, sme->key_len, | 1001 | ret = mwifiex_set_encode(priv, sme->key, sme->key_len, |
998 | sme->key_idx, 0); | 1002 | sme->key_idx, NULL, 0); |
999 | } | 1003 | } |
1000 | } | 1004 | } |
1001 | done: | 1005 | done: |