···129129130130 If you don't have this card, of course say N.131131132132- source "drivers/net/arcnet/Kconfig"132132+source "drivers/net/arcnet/Kconfig"133133134134source "drivers/net/phy/Kconfig"135135···844844845845config DM9000846846 tristate "DM9000 support"847847- depends on ARM && NET_ETHERNET847847+ depends on (ARM || MIPS) && NET_ETHERNET848848 select CRC32849849 select MII850850 ---help---
+8-8
drivers/net/ac3200.c
···123123 return -ENODEV;124124}125125126126-static void cleanup_card(struct net_device *dev)127127-{128128- /* Someday free_irq may be in ac_close_card() */129129- free_irq(dev->irq, dev);130130- release_region(dev->base_addr, AC_IO_EXTENT);131131- iounmap(ei_status.mem);132132-}133133-134126#ifndef MODULE135127struct net_device * __init ac3200_probe(int unit)136128{···396404 if (found)397405 return 0;398406 return -ENXIO;407407+}408408+409409+static void cleanup_card(struct net_device *dev)410410+{411411+ /* Someday free_irq may be in ac_close_card() */412412+ free_irq(dev->irq, dev);413413+ release_region(dev->base_addr, AC_IO_EXTENT);414414+ iounmap(ei_status.mem);399415}400416401417void
···7153715371547154 /* Set the Wireless Extension versions */71557155 range->we_version_compiled = WIRELESS_EXT;71567156- range->we_version_source = 16;71567156+ range->we_version_source = 18;7157715771587158// range->retry_capa; /* What retry options are supported */71597159// range->retry_flags; /* How to decode max/min retry limit */···71837183 range->event_capa[0] = (IW_EVENT_CAPA_K_0 |71847184 IW_EVENT_CAPA_MASK(SIOCGIWAP));71857185 range->event_capa[1] = IW_EVENT_CAPA_K_1;71867186+71877187+ range->enc_capa = IW_ENC_CAPA_WPA | IW_ENC_CAPA_WPA2 |71887188+ IW_ENC_CAPA_CIPHER_TKIP | IW_ENC_CAPA_CIPHER_CCMP;7186718971877190 IPW_DEBUG_WX("GET Range\n");71887191
+43-18
net/ieee80211/ieee80211_crypt_wep.c
···7575 kfree(priv);7676}77777878-/* Perform WEP encryption on given skb that has at least 4 bytes of headroom7979- * for IV and 4 bytes of tailroom for ICV. Both IV and ICV will be transmitted,8080- * so the payload length increases with 8 bytes.8181- *8282- * WEP frame payload: IV + TX key idx, RC4(data), ICV = RC4(CRC32(data))8383- */8484-static int prism2_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv)7878+/* Add WEP IV/key info to a frame that has at least 4 bytes of headroom */7979+static int prism2_wep_build_iv(struct sk_buff *skb, int hdr_len, void *priv)8580{8681 struct prism2_wep_data *wep = priv;8787- u32 crc, klen, len;8888- u8 key[WEP_KEY_LEN + 3];8989- u8 *pos, *icv;9090- struct scatterlist sg;9191-9292- if (skb_headroom(skb) < 4 || skb_tailroom(skb) < 4 ||9393- skb->len < hdr_len)8282+ u32 klen, len;8383+ u8 *pos;8484+8585+ if (skb_headroom(skb) < 4 || skb->len < hdr_len)9486 return -1;95879688 len = skb->len - hdr_len;···104112 }105113106114 /* Prepend 24-bit IV to RC4 key and TX frame */107107- *pos++ = key[0] = (wep->iv >> 16) & 0xff;108108- *pos++ = key[1] = (wep->iv >> 8) & 0xff;109109- *pos++ = key[2] = wep->iv & 0xff;115115+ *pos++ = (wep->iv >> 16) & 0xff;116116+ *pos++ = (wep->iv >> 8) & 0xff;117117+ *pos++ = wep->iv & 0xff;110118 *pos++ = wep->key_idx << 6;119119+120120+ return 0;121121+}122122+123123+/* Perform WEP encryption on given skb that has at least 4 bytes of headroom124124+ * for IV and 4 bytes of tailroom for ICV. Both IV and ICV will be transmitted,125125+ * so the payload length increases with 8 bytes.126126+ *127127+ * WEP frame payload: IV + TX key idx, RC4(data), ICV = RC4(CRC32(data))128128+ */129129+static int prism2_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv)130130+{131131+ struct prism2_wep_data *wep = priv;132132+ u32 crc, klen, len;133133+ u8 *pos, *icv;134134+ struct scatterlist sg;135135+ u8 key[WEP_KEY_LEN + 3];136136+137137+ /* other checks are in prism2_wep_build_iv */138138+ if (skb_tailroom(skb) < 4)139139+ return -1;140140+141141+ /* add the IV to the frame */142142+ if (prism2_wep_build_iv(skb, hdr_len, priv))143143+ return -1;144144+145145+ /* Copy the IV into the first 3 bytes of the key */146146+ memcpy(key, skb->data + hdr_len, 3);111147112148 /* Copy rest of the WEP key (the secret part) */113149 memcpy(key + 3, wep->key, wep->key_len);150150+151151+ len = skb->len - hdr_len - 4;152152+ pos = skb->data + hdr_len + 4;153153+ klen = 3 + wep->key_len;114154115115- /* Append little-endian CRC32 and encrypt it to produce ICV */155155+ /* Append little-endian CRC32 over only the data and encrypt it to produce ICV */116156 crc = ~crc32_le(~0, pos, len);117157 icv = skb_put(skb, 4);118158 icv[0] = crc;···255231 .name = "WEP",256232 .init = prism2_wep_init,257233 .deinit = prism2_wep_deinit,234234+ .build_iv = prism2_wep_build_iv,258235 .encrypt_mpdu = prism2_wep_encrypt,259236 .decrypt_mpdu = prism2_wep_decrypt,260237 .encrypt_msdu = NULL,
+1-1
net/ieee80211/ieee80211_tx.c
···288288 /* Determine total amount of storage required for TXB packets */289289 bytes = skb->len + SNAP_SIZE + sizeof(u16);290290291291- if (host_encrypt)291291+ if (host_encrypt || host_build_iv)292292 fc = IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA |293293 IEEE80211_FCTL_PROTECTED;294294 else
+1-1
net/ieee80211/ieee80211_wx.c
···284284 };285285 int i, key, key_provided, len;286286 struct ieee80211_crypt_data **crypt;287287- int host_crypto = ieee->host_encrypt || ieee->host_decrypt;287287+ int host_crypto = ieee->host_encrypt || ieee->host_decrypt || ieee->host_build_iv;288288289289 IEEE80211_DEBUG_WX("SET_ENCODE\n");290290