···129130 If you don't have this card, of course say N.131132- source "drivers/net/arcnet/Kconfig"133134source "drivers/net/phy/Kconfig"135···844845config DM9000846 tristate "DM9000 support"847- depends on ARM && NET_ETHERNET848 select CRC32849 select MII850 ---help---
···129130 If you don't have this card, of course say N.131132+source "drivers/net/arcnet/Kconfig"133134source "drivers/net/phy/Kconfig"135···844845config DM9000846 tristate "DM9000 support"847+ depends on (ARM || MIPS) && NET_ETHERNET848 select CRC32849 select MII850 ---help---
+8-8
drivers/net/ac3200.c
···123 return -ENODEV;124}125126-static void cleanup_card(struct net_device *dev)127-{128- /* Someday free_irq may be in ac_close_card() */129- free_irq(dev->irq, dev);130- release_region(dev->base_addr, AC_IO_EXTENT);131- iounmap(ei_status.mem);132-}133-134#ifndef MODULE135struct net_device * __init ac3200_probe(int unit)136{···396 if (found)397 return 0;398 return -ENXIO;00000000399}400401void
···123 return -ENODEV;124}12500000000126#ifndef MODULE127struct net_device * __init ac3200_probe(int unit)128{···404 if (found)405 return 0;406 return -ENXIO;407+}408+409+static void cleanup_card(struct net_device *dev)410+{411+ /* Someday free_irq may be in ac_close_card() */412+ free_irq(dev->irq, dev);413+ release_region(dev->base_addr, AC_IO_EXTENT);414+ iounmap(ei_status.mem);415}416417void
···71537154 /* Set the Wireless Extension versions */7155 range->we_version_compiled = WIRELESS_EXT;7156- range->we_version_source = 16;71577158// range->retry_capa; /* What retry options are supported */7159// range->retry_flags; /* How to decode max/min retry limit */···7183 range->event_capa[0] = (IW_EVENT_CAPA_K_0 |7184 IW_EVENT_CAPA_MASK(SIOCGIWAP));7185 range->event_capa[1] = IW_EVENT_CAPA_K_1;00071867187 IPW_DEBUG_WX("GET Range\n");7188
···71537154 /* Set the Wireless Extension versions */7155 range->we_version_compiled = WIRELESS_EXT;7156+ range->we_version_source = 18;71577158// range->retry_capa; /* What retry options are supported */7159// range->retry_flags; /* How to decode max/min retry limit */···7183 range->event_capa[0] = (IW_EVENT_CAPA_K_0 |7184 IW_EVENT_CAPA_MASK(SIOCGIWAP));7185 range->event_capa[1] = IW_EVENT_CAPA_K_1;7186+7187+ range->enc_capa = IW_ENC_CAPA_WPA | IW_ENC_CAPA_WPA2 |7188+ IW_ENC_CAPA_CIPHER_TKIP | IW_ENC_CAPA_CIPHER_CCMP;71897190 IPW_DEBUG_WX("GET Range\n");7191
+43-18
net/ieee80211/ieee80211_crypt_wep.c
···75 kfree(priv);76}7778-/* Perform WEP encryption on given skb that has at least 4 bytes of headroom79- * for IV and 4 bytes of tailroom for ICV. Both IV and ICV will be transmitted,80- * so the payload length increases with 8 bytes.81- *82- * WEP frame payload: IV + TX key idx, RC4(data), ICV = RC4(CRC32(data))83- */84-static int prism2_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv)85{86 struct prism2_wep_data *wep = priv;87- u32 crc, klen, len;88- u8 key[WEP_KEY_LEN + 3];89- u8 *pos, *icv;90- struct scatterlist sg;91-92- if (skb_headroom(skb) < 4 || skb_tailroom(skb) < 4 ||93- skb->len < hdr_len)94 return -1;9596 len = skb->len - hdr_len;···104 }105106 /* Prepend 24-bit IV to RC4 key and TX frame */107- *pos++ = key[0] = (wep->iv >> 16) & 0xff;108- *pos++ = key[1] = (wep->iv >> 8) & 0xff;109- *pos++ = key[2] = wep->iv & 0xff;110 *pos++ = wep->key_idx << 6;0000000000000000000000000000111112 /* Copy rest of the WEP key (the secret part) */113 memcpy(key + 3, wep->key, wep->key_len);0000114115- /* Append little-endian CRC32 and encrypt it to produce ICV */116 crc = ~crc32_le(~0, pos, len);117 icv = skb_put(skb, 4);118 icv[0] = crc;···255 .name = "WEP",256 .init = prism2_wep_init,257 .deinit = prism2_wep_deinit,0258 .encrypt_mpdu = prism2_wep_encrypt,259 .decrypt_mpdu = prism2_wep_decrypt,260 .encrypt_msdu = NULL,
···75 kfree(priv);76}7778+/* Add WEP IV/key info to a frame that has at least 4 bytes of headroom */79+static int prism2_wep_build_iv(struct sk_buff *skb, int hdr_len, void *priv)0000080{81 struct prism2_wep_data *wep = priv;82+ u32 klen, len;83+ u8 *pos;84+85+ if (skb_headroom(skb) < 4 || skb->len < hdr_len)00086 return -1;8788 len = skb->len - hdr_len;···112 }113114 /* Prepend 24-bit IV to RC4 key and TX frame */115+ *pos++ = (wep->iv >> 16) & 0xff;116+ *pos++ = (wep->iv >> 8) & 0xff;117+ *pos++ = wep->iv & 0xff;118 *pos++ = wep->key_idx << 6;119+120+ return 0;121+}122+123+/* Perform WEP encryption on given skb that has at least 4 bytes of headroom124+ * for IV and 4 bytes of tailroom for ICV. Both IV and ICV will be transmitted,125+ * so the payload length increases with 8 bytes.126+ *127+ * WEP frame payload: IV + TX key idx, RC4(data), ICV = RC4(CRC32(data))128+ */129+static int prism2_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv)130+{131+ struct prism2_wep_data *wep = priv;132+ u32 crc, klen, len;133+ u8 *pos, *icv;134+ struct scatterlist sg;135+ u8 key[WEP_KEY_LEN + 3];136+137+ /* other checks are in prism2_wep_build_iv */138+ if (skb_tailroom(skb) < 4)139+ return -1;140+141+ /* add the IV to the frame */142+ if (prism2_wep_build_iv(skb, hdr_len, priv))143+ return -1;144+145+ /* Copy the IV into the first 3 bytes of the key */146+ memcpy(key, skb->data + hdr_len, 3);147148 /* Copy rest of the WEP key (the secret part) */149 memcpy(key + 3, wep->key, wep->key_len);150+151+ len = skb->len - hdr_len - 4;152+ pos = skb->data + hdr_len + 4;153+ klen = 3 + wep->key_len;154155+ /* Append little-endian CRC32 over only the data and encrypt it to produce ICV */156 crc = ~crc32_le(~0, pos, len);157 icv = skb_put(skb, 4);158 icv[0] = crc;···231 .name = "WEP",232 .init = prism2_wep_init,233 .deinit = prism2_wep_deinit,234+ .build_iv = prism2_wep_build_iv,235 .encrypt_mpdu = prism2_wep_encrypt,236 .decrypt_mpdu = prism2_wep_decrypt,237 .encrypt_msdu = NULL,
+1-1
net/ieee80211/ieee80211_tx.c
···288 /* Determine total amount of storage required for TXB packets */289 bytes = skb->len + SNAP_SIZE + sizeof(u16);290291- if (host_encrypt)292 fc = IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA |293 IEEE80211_FCTL_PROTECTED;294 else
···288 /* Determine total amount of storage required for TXB packets */289 bytes = skb->len + SNAP_SIZE + sizeof(u16);290291+ if (host_encrypt || host_build_iv)292 fc = IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA |293 IEEE80211_FCTL_PROTECTED;294 else
+1-1
net/ieee80211/ieee80211_wx.c
···284 };285 int i, key, key_provided, len;286 struct ieee80211_crypt_data **crypt;287- int host_crypto = ieee->host_encrypt || ieee->host_decrypt;288289 IEEE80211_DEBUG_WX("SET_ENCODE\n");290
···284 };285 int i, key, key_provided, len;286 struct ieee80211_crypt_data **crypt;287+ int host_crypto = ieee->host_encrypt || ieee->host_decrypt || ieee->host_build_iv;288289 IEEE80211_DEBUG_WX("SET_ENCODE\n");290