/* Default to enabling full open WEP with host based encrypt/decrypt */
ieee->host_encrypt = 1;
ieee->host_decrypt = 1;
+ ieee->host_mc_decrypt = 1;
+
/* Host fragementation in Open mode. Default is enabled.
* Note: host fragmentation is always enabled if host encryption
* is enabled. For cards can do hardware encryption, they must do
return 1;
}
- if (ieee->host_decrypt) {
+ if (is_multicast_ether_addr(hdr->addr1) ? ieee->host_mc_decrypt :
+ ieee->host_decrypt) {
int idx = 0;
if (skb->len >= hdrlen + 3)
idx = skb->data[hdrlen + 3] >> 6;
network->flags = 0;
network->atim_window = 0;
network->erp_value = (network->capability & WLAN_CAPABILITY_IBSS) ?
- 0x3 : 0x0;
+ 0x3 : 0x0;
if (stats->freq == IEEE80211_52GHZ_BAND) {
/* for A band (No DS info) */
struct iw_point *encoding = &wrqu->encoding;
struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
int i, idx, ret = 0;
+ int group_key = 0;
const char *alg, *module;
struct ieee80211_crypto_ops *ops;
struct ieee80211_crypt_data **crypt;
} else
idx = ieee->tx_keyidx;
- if (ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY)
+ if (ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY) {
crypt = &ieee->crypt[idx];
- else {
+ group_key = 1;
+ } else {
if (idx != 0)
return -EINVAL;
if (ieee->iw_mode == IW_MODE_INFRA)
sec.enabled = 1;
sec.encrypt = 1;
- if (!(ieee->host_encrypt || ieee->host_decrypt))
+ if (group_key ? !ieee->host_mc_decrypt :
+ !(ieee->host_encrypt || ieee->host_decrypt ||
+ ieee->host_encrypt_msdu))
goto skip_host_crypt;
switch (ext->alg) {
sec.flags |= SEC_LEVEL;
sec.level = SEC_LEVEL_3;
}
+ /* Don't set sec level for group keys. */
+ if (group_key)
+ sec.flags &= ~SEC_LEVEL;
}
done:
if (ieee->set_security)