diff options
Diffstat (limited to 'drivers/net/wireless/mwifiex/sta_ioctl.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/sta_ioctl.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c index 58970e0f7d13..106c449477b2 100644 --- a/drivers/net/wireless/mwifiex/sta_ioctl.c +++ b/drivers/net/wireless/mwifiex/sta_ioctl.c | |||
@@ -462,7 +462,7 @@ int mwifiex_get_bss_info(struct mwifiex_private *priv, | |||
462 | 462 | ||
463 | info->bss_chan = bss_desc->channel; | 463 | info->bss_chan = bss_desc->channel; |
464 | 464 | ||
465 | memcpy(info->country_code, priv->country_code, | 465 | memcpy(info->country_code, adapter->country_code, |
466 | IEEE80211_COUNTRY_STRING_LEN); | 466 | IEEE80211_COUNTRY_STRING_LEN); |
467 | 467 | ||
468 | info->media_connected = priv->media_connected; | 468 | info->media_connected = priv->media_connected; |
@@ -1219,7 +1219,8 @@ mwifiex_drv_get_driver_version(struct mwifiex_adapter *adapter, char *version, | |||
1219 | * with requisite parameters and calls the IOCTL handler. | 1219 | * with requisite parameters and calls the IOCTL handler. |
1220 | */ | 1220 | */ |
1221 | int mwifiex_set_encode(struct mwifiex_private *priv, const u8 *key, | 1221 | int mwifiex_set_encode(struct mwifiex_private *priv, const u8 *key, |
1222 | int key_len, u8 key_index, int disable) | 1222 | int key_len, u8 key_index, |
1223 | const u8 *mac_addr, int disable) | ||
1223 | { | 1224 | { |
1224 | struct mwifiex_ds_encrypt_key encrypt_key; | 1225 | struct mwifiex_ds_encrypt_key encrypt_key; |
1225 | 1226 | ||
@@ -1229,8 +1230,12 @@ int mwifiex_set_encode(struct mwifiex_private *priv, const u8 *key, | |||
1229 | encrypt_key.key_index = key_index; | 1230 | encrypt_key.key_index = key_index; |
1230 | if (key_len) | 1231 | if (key_len) |
1231 | memcpy(encrypt_key.key_material, key, key_len); | 1232 | memcpy(encrypt_key.key_material, key, key_len); |
1233 | if (mac_addr) | ||
1234 | memcpy(encrypt_key.mac_addr, mac_addr, ETH_ALEN); | ||
1232 | } else { | 1235 | } else { |
1233 | encrypt_key.key_disable = true; | 1236 | encrypt_key.key_disable = true; |
1237 | if (mac_addr) | ||
1238 | memcpy(encrypt_key.mac_addr, mac_addr, ETH_ALEN); | ||
1234 | } | 1239 | } |
1235 | 1240 | ||
1236 | return mwifiex_sec_ioctl_encrypt_key(priv, &encrypt_key); | 1241 | return mwifiex_sec_ioctl_encrypt_key(priv, &encrypt_key); |