Loading drivers/net/wireless/Kconfig +5 −2 Original line number Diff line number Diff line Loading @@ -6,7 +6,8 @@ menu "Wireless LAN (non-hamradio)" depends on NETDEVICES config NET_RADIO bool "Wireless LAN drivers (non-hamradio) & Wireless Extensions" bool "Wireless LAN drivers (non-hamradio)" select WIRELESS_EXT ---help--- Support for wireless LANs and everything having to do with radio, but not with amateur radio or FM broadcasting. Loading Loading @@ -239,7 +240,8 @@ config IPW2200_DEBUG config AIRO tristate "Cisco/Aironet 34X/35X/4500/4800 ISA and PCI cards" depends on NET_RADIO && ISA_DMA_API && CRYPTO && (PCI || BROKEN) depends on NET_RADIO && ISA_DMA_API && (PCI || BROKEN) select CRYPTO ---help--- This is the standard Linux driver to support Cisco/Aironet ISA and PCI 802.11 wireless cards. Loading Loading @@ -387,6 +389,7 @@ config PCMCIA_SPECTRUM config AIRO_CS tristate "Cisco/Aironet 34X/35X/4500/4800 PCMCIA cards" depends on NET_RADIO && PCMCIA && (BROKEN || !M32R) select CRYPTO ---help--- This is the standard Linux driver to support Cisco/Aironet PCMCIA 802.11 wireless cards. This driver is the same as the Aironet Loading drivers/net/wireless/airo.c +276 −55 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ #include <linux/in.h> #include <linux/bitops.h> #include <linux/scatterlist.h> #include <linux/crypto.h> #include <asm/io.h> #include <asm/system.h> Loading Loading @@ -87,14 +88,6 @@ static struct pci_driver airo_driver = { #include <linux/delay.h> #endif /* Support Cisco MIC feature */ #define MICSUPPORT #if defined(MICSUPPORT) && !defined(CONFIG_CRYPTO) #warning MIC support requires Crypto API #undef MICSUPPORT #endif /* Hack to do some power saving */ #define POWER_ON_DOWN Loading Loading @@ -1118,7 +1111,6 @@ static int readrids(struct net_device *dev, aironet_ioctl *comp); static int writerids(struct net_device *dev, aironet_ioctl *comp); static int flashcard(struct net_device *dev, aironet_ioctl *comp); #endif /* CISCO_EXT */ #ifdef MICSUPPORT static void micinit(struct airo_info *ai); static int micsetup(struct airo_info *ai); static int encapsulate(struct airo_info *ai, etherHead *pPacket, MICBuffer *buffer, int len); Loading @@ -1127,9 +1119,6 @@ static int decapsulate(struct airo_info *ai, MICBuffer *mic, etherHead *pPacket, static u8 airo_rssi_to_dbm (tdsRssiEntry *rssi_rid, u8 rssi); static u8 airo_dbm_to_pct (tdsRssiEntry *rssi_rid, u8 dbm); #include <linux/crypto.h> #endif struct airo_info { struct net_device_stats stats; struct net_device *dev; Loading Loading @@ -1190,12 +1179,10 @@ struct airo_info { unsigned long scan_timestamp; /* Time started to scan */ struct iw_spy_data spy_data; struct iw_public_data wireless_data; #ifdef MICSUPPORT /* MIC stuff */ struct crypto_tfm *tfm; mic_module mod[2]; mic_statistics micstats; #endif HostRxDesc rxfids[MPI_MAX_FIDS]; // rx/tx/config MPI350 descriptors HostTxDesc txfids[MPI_MAX_FIDS]; HostRidDesc config_desc; Loading Loading @@ -1229,7 +1216,6 @@ static int flashgchar(struct airo_info *ai,int matchbyte,int dwelltime); static int flashputbuf(struct airo_info *ai); static int flashrestart(struct airo_info *ai,struct net_device *dev); #ifdef MICSUPPORT /*********************************************************************** * MIC ROUTINES * *********************************************************************** Loading Loading @@ -1686,7 +1672,6 @@ static void emmh32_final(emmh32_context *context, u8 digest[4]) digest[2] = (val>>8) & 0xFF; digest[3] = val & 0xFF; } #endif static int readBSSListRid(struct airo_info *ai, int first, BSSListRid *list) { Loading Loading @@ -2005,7 +1990,6 @@ static int mpi_send_packet (struct net_device *dev) * Firmware automaticly puts 802 header on so * we don't need to account for it in the length */ #ifdef MICSUPPORT if (test_bit(FLAG_MIC_CAPABLE, &ai->flags) && ai->micstats.enabled && (ntohs(((u16 *)buffer)[6]) != 0x888E)) { MICBuffer pMic; Loading @@ -2022,9 +2006,7 @@ static int mpi_send_packet (struct net_device *dev) memcpy (sendbuf, &pMic, sizeof(pMic)); sendbuf += sizeof(pMic); memcpy (sendbuf, buffer, len - sizeof(etherHead)); } else #endif { } else { *payloadLen = cpu_to_le16(len - sizeof(etherHead)); dev->trans_start = jiffies; Loading Loading @@ -2400,9 +2382,7 @@ void stop_airo_card( struct net_device *dev, int freeres ) ai->shared, ai->shared_dma); } } #ifdef MICSUPPORT crypto_free_tfm(ai->tfm); #endif del_airo_dev( dev ); free_netdev( dev ); } Loading Loading @@ -2726,9 +2706,7 @@ static struct net_device *_init_airo_card( unsigned short irq, int port, ai->thr_pid = kernel_thread(airo_thread, dev, CLONE_FS | CLONE_FILES); if (ai->thr_pid < 0) goto err_out_free; #ifdef MICSUPPORT ai->tfm = NULL; #endif rc = add_airo_dev( dev ); if (rc) goto err_out_thr; Loading Loading @@ -2969,10 +2947,8 @@ static int airo_thread(void *data) { airo_read_wireless_stats(ai); else if (test_bit(JOB_PROMISC, &ai->flags)) airo_set_promisc(ai); #ifdef MICSUPPORT else if (test_bit(JOB_MIC, &ai->flags)) micinit(ai); #endif else if (test_bit(JOB_EVENT, &ai->flags)) airo_send_event(dev); else if (test_bit(JOB_AUTOWEP, &ai->flags)) Loading Loading @@ -3010,12 +2986,10 @@ static irqreturn_t airo_interrupt ( int irq, void* dev_id, struct pt_regs *regs) if ( status & EV_MIC ) { OUT4500( apriv, EVACK, EV_MIC ); #ifdef MICSUPPORT if (test_bit(FLAG_MIC_CAPABLE, &apriv->flags)) { set_bit(JOB_MIC, &apriv->flags); wake_up_interruptible(&apriv->thr_wait); } #endif } if ( status & EV_LINK ) { union iwreq_data wrqu; Loading Loading @@ -3194,11 +3168,8 @@ static irqreturn_t airo_interrupt ( int irq, void* dev_id, struct pt_regs *regs) } bap_read (apriv, buffer + hdrlen/2, len, BAP0); } else { #ifdef MICSUPPORT MICBuffer micbuf; #endif bap_read (apriv, buffer, ETH_ALEN*2, BAP0); #ifdef MICSUPPORT if (apriv->micstats.enabled) { bap_read (apriv,(u16*)&micbuf,sizeof(micbuf),BAP0); if (ntohs(micbuf.typelen) > 0x05DC) Loading @@ -3211,15 +3182,10 @@ static irqreturn_t airo_interrupt ( int irq, void* dev_id, struct pt_regs *regs) skb_trim (skb, len + hdrlen); } } #endif bap_read(apriv,buffer+ETH_ALEN,len,BAP0); #ifdef MICSUPPORT if (decapsulate(apriv,&micbuf,(etherHead*)buffer,len)) { badmic: dev_kfree_skb_irq (skb); #else if (0) { #endif badrx: OUT4500( apriv, EVACK, EV_RX); goto exitrx; Loading Loading @@ -3430,10 +3396,8 @@ static void mpi_receive_802_3(struct airo_info *ai) int len = 0; struct sk_buff *skb; char *buffer; #ifdef MICSUPPORT int off = 0; MICBuffer micbuf; #endif memcpy_fromio(&rxd, ai->rxfids[0].card_ram_off, sizeof(rxd)); /* Make sure we got something */ Loading @@ -3448,7 +3412,6 @@ static void mpi_receive_802_3(struct airo_info *ai) goto badrx; } buffer = skb_put(skb,len); #ifdef MICSUPPORT memcpy(buffer, ai->rxfids[0].virtual_host_addr, ETH_ALEN * 2); if (ai->micstats.enabled) { memcpy(&micbuf, Loading @@ -3470,9 +3433,6 @@ static void mpi_receive_802_3(struct airo_info *ai) dev_kfree_skb_irq (skb); goto badrx; } #else memcpy(buffer, ai->rxfids[0].virtual_host_addr, len); #endif #ifdef WIRELESS_SPY if (ai->spy_data.spy_number > 0) { char *sa; Loading Loading @@ -3689,13 +3649,11 @@ static u16 setup_card(struct airo_info *ai, u8 *mac, int lock) ai->config.authType = AUTH_OPEN; ai->config.modulation = MOD_CCK; #ifdef MICSUPPORT if ((cap_rid.len>=sizeof(cap_rid)) && (cap_rid.extSoftCap&1) && (micsetup(ai) == SUCCESS)) { ai->config.opmode |= MODE_MIC; set_bit(FLAG_MIC_CAPABLE, &ai->flags); } #endif /* Save off the MAC */ for( i = 0; i < ETH_ALEN; i++ ) { Loading Loading @@ -4170,15 +4128,12 @@ static int transmit_802_3_packet(struct airo_info *ai, int len, char *pPacket) } len -= ETH_ALEN * 2; #ifdef MICSUPPORT if (test_bit(FLAG_MIC_CAPABLE, &ai->flags) && ai->micstats.enabled && (ntohs(((u16 *)pPacket)[6]) != 0x888E)) { if (encapsulate(ai,(etherHead *)pPacket,&pMic,len) != SUCCESS) return ERROR; miclen = sizeof(pMic); } #endif // packet is destination[6], source[6], payload[len-12] // write the payload length and dst/src/payload if (bap_setup(ai, txFid, 0x0036, BAP1) != SUCCESS) return ERROR; Loading Loading @@ -5801,11 +5756,13 @@ static int airo_set_wap(struct net_device *dev, Cmd cmd; Resp rsp; APListRid APList_rid; static const unsigned char bcast[ETH_ALEN] = { 255, 255, 255, 255, 255, 255 }; static const u8 any[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; static const u8 off[ETH_ALEN] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; if (awrq->sa_family != ARPHRD_ETHER) return -EINVAL; else if (!memcmp(bcast, awrq->sa_data, ETH_ALEN)) { else if (!memcmp(any, awrq->sa_data, ETH_ALEN) || !memcmp(off, awrq->sa_data, ETH_ALEN)) { memset(&cmd, 0, sizeof(cmd)); cmd.cmd=CMD_LOSE_SYNC; if (down_interruptible(&local->sem)) Loading Loading @@ -6294,6 +6251,267 @@ static int airo_get_encode(struct net_device *dev, return 0; } /*------------------------------------------------------------------*/ /* * Wireless Handler : set extended Encryption parameters */ static int airo_set_encodeext(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { struct airo_info *local = dev->priv; struct iw_point *encoding = &wrqu->encoding; struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; CapabilityRid cap_rid; /* Card capability info */ int perm = ( encoding->flags & IW_ENCODE_TEMP ? 0 : 1 ); u16 currentAuthType = local->config.authType; int idx, key_len, alg = ext->alg; /* Check encryption mode */ wep_key_t key; /* Is WEP supported ? */ readCapabilityRid(local, &cap_rid, 1); /* Older firmware doesn't support this... if(!(cap_rid.softCap & 2)) { return -EOPNOTSUPP; } */ readConfigRid(local, 1); /* Determine and validate the key index */ idx = encoding->flags & IW_ENCODE_INDEX; if (idx) { if (idx < 1 || idx > ((cap_rid.softCap & 0x80) ? 4:1)) return -EINVAL; idx--; } else idx = get_wep_key(local, 0xffff); if (encoding->flags & IW_ENCODE_DISABLED) alg = IW_ENCODE_ALG_NONE; /* Just setting the transmit key? */ if (ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY) { set_wep_key(local, idx, NULL, 0, perm, 1); } else { /* Set the requested key first */ memset(key.key, 0, MAX_KEY_SIZE); switch (alg) { case IW_ENCODE_ALG_NONE: key.len = 0; break; case IW_ENCODE_ALG_WEP: if (ext->key_len > MIN_KEY_SIZE) { key.len = MAX_KEY_SIZE; } else if (ext->key_len > 0) { key.len = MIN_KEY_SIZE; } else { return -EINVAL; } key_len = min (ext->key_len, key.len); memcpy(key.key, ext->key, key_len); break; default: return -EINVAL; } /* Send the key to the card */ set_wep_key(local, idx, key.key, key.len, perm, 1); } /* Read the flags */ if(encoding->flags & IW_ENCODE_DISABLED) local->config.authType = AUTH_OPEN; // disable encryption if(encoding->flags & IW_ENCODE_RESTRICTED) local->config.authType = AUTH_SHAREDKEY; // Only Both if(encoding->flags & IW_ENCODE_OPEN) local->config.authType = AUTH_ENCRYPT; // Only Wep /* Commit the changes to flags if needed */ if (local->config.authType != currentAuthType) set_bit (FLAG_COMMIT, &local->flags); return -EINPROGRESS; } /*------------------------------------------------------------------*/ /* * Wireless Handler : get extended Encryption parameters */ static int airo_get_encodeext(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { struct airo_info *local = dev->priv; struct iw_point *encoding = &wrqu->encoding; struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; CapabilityRid cap_rid; /* Card capability info */ int idx, max_key_len; /* Is it supported ? */ readCapabilityRid(local, &cap_rid, 1); if(!(cap_rid.softCap & 2)) { return -EOPNOTSUPP; } readConfigRid(local, 1); max_key_len = encoding->length - sizeof(*ext); if (max_key_len < 0) return -EINVAL; idx = encoding->flags & IW_ENCODE_INDEX; if (idx) { if (idx < 1 || idx > ((cap_rid.softCap & 0x80) ? 4:1)) return -EINVAL; idx--; } else idx = get_wep_key(local, 0xffff); encoding->flags = idx + 1; memset(ext, 0, sizeof(*ext)); /* Check encryption mode */ switch(local->config.authType) { case AUTH_ENCRYPT: encoding->flags = IW_ENCODE_ALG_WEP | IW_ENCODE_ENABLED; break; case AUTH_SHAREDKEY: encoding->flags = IW_ENCODE_ALG_WEP | IW_ENCODE_ENABLED; break; default: case AUTH_OPEN: encoding->flags = IW_ENCODE_ALG_NONE | IW_ENCODE_DISABLED; break; } /* We can't return the key, so set the proper flag and return zero */ encoding->flags |= IW_ENCODE_NOKEY; memset(extra, 0, 16); /* Copy the key to the user buffer */ ext->key_len = get_wep_key(local, idx); if (ext->key_len > 16) { ext->key_len=0; } return 0; } /*------------------------------------------------------------------*/ /* * Wireless Handler : set extended authentication parameters */ static int airo_set_auth(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { struct airo_info *local = dev->priv; struct iw_param *param = &wrqu->param; u16 currentAuthType = local->config.authType; switch (param->flags & IW_AUTH_INDEX) { case IW_AUTH_WPA_VERSION: case IW_AUTH_CIPHER_PAIRWISE: case IW_AUTH_CIPHER_GROUP: case IW_AUTH_KEY_MGMT: case IW_AUTH_RX_UNENCRYPTED_EAPOL: case IW_AUTH_PRIVACY_INVOKED: /* * airo does not use these parameters */ break; case IW_AUTH_DROP_UNENCRYPTED: if (param->value) { /* Only change auth type if unencrypted */ if (currentAuthType == AUTH_OPEN) local->config.authType = AUTH_ENCRYPT; } else { local->config.authType = AUTH_OPEN; } /* Commit the changes to flags if needed */ if (local->config.authType != currentAuthType) set_bit (FLAG_COMMIT, &local->flags); break; case IW_AUTH_80211_AUTH_ALG: { /* FIXME: What about AUTH_OPEN? This API seems to * disallow setting our auth to AUTH_OPEN. */ if (param->value & IW_AUTH_ALG_SHARED_KEY) { local->config.authType = AUTH_SHAREDKEY; } else if (param->value & IW_AUTH_ALG_OPEN_SYSTEM) { local->config.authType = AUTH_ENCRYPT; } else return -EINVAL; break; /* Commit the changes to flags if needed */ if (local->config.authType != currentAuthType) set_bit (FLAG_COMMIT, &local->flags); } case IW_AUTH_WPA_ENABLED: /* Silently accept disable of WPA */ if (param->value > 0) return -EOPNOTSUPP; break; default: return -EOPNOTSUPP; } return -EINPROGRESS; } /*------------------------------------------------------------------*/ /* * Wireless Handler : get extended authentication parameters */ static int airo_get_auth(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { struct airo_info *local = dev->priv; struct iw_param *param = &wrqu->param; u16 currentAuthType = local->config.authType; switch (param->flags & IW_AUTH_INDEX) { case IW_AUTH_DROP_UNENCRYPTED: switch (currentAuthType) { case AUTH_SHAREDKEY: case AUTH_ENCRYPT: param->value = 1; break; default: param->value = 0; break; } break; case IW_AUTH_80211_AUTH_ALG: switch (currentAuthType) { case AUTH_SHAREDKEY: param->value = IW_AUTH_ALG_SHARED_KEY; break; case AUTH_ENCRYPT: default: param->value = IW_AUTH_ALG_OPEN_SYSTEM; break; } break; case IW_AUTH_WPA_ENABLED: param->value = 0; break; default: return -EOPNOTSUPP; } return 0; } /*------------------------------------------------------------------*/ /* * Wireless Handler : set Tx-Power Loading Loading @@ -7050,6 +7268,15 @@ static const iw_handler airo_handler[] = (iw_handler) airo_get_encode, /* SIOCGIWENCODE */ (iw_handler) airo_set_power, /* SIOCSIWPOWER */ (iw_handler) airo_get_power, /* SIOCGIWPOWER */ (iw_handler) NULL, /* -- hole -- */ (iw_handler) NULL, /* -- hole -- */ (iw_handler) NULL, /* SIOCSIWGENIE */ (iw_handler) NULL, /* SIOCGIWGENIE */ (iw_handler) airo_set_auth, /* SIOCSIWAUTH */ (iw_handler) airo_get_auth, /* SIOCGIWAUTH */ (iw_handler) airo_set_encodeext, /* SIOCSIWENCODEEXT */ (iw_handler) airo_get_encodeext, /* SIOCGIWENCODEEXT */ (iw_handler) NULL, /* SIOCSIWPMKSA */ }; /* Note : don't describe AIROIDIFC and AIROOLDIDIFC in here. Loading Loading @@ -7270,13 +7497,11 @@ static int readrids(struct net_device *dev, aironet_ioctl *comp) { case AIROGSTAT: ridcode = RID_STATUS; break; case AIROGSTATSD32: ridcode = RID_STATSDELTA; break; case AIROGSTATSC32: ridcode = RID_STATS; break; #ifdef MICSUPPORT case AIROGMICSTATS: if (copy_to_user(comp->data, &ai->micstats, min((int)comp->len,(int)sizeof(ai->micstats)))) return -EFAULT; return 0; #endif case AIRORRID: ridcode = comp->ridnum; break; default: return -EINVAL; Loading Loading @@ -7308,9 +7533,7 @@ static int readrids(struct net_device *dev, aironet_ioctl *comp) { static int writerids(struct net_device *dev, aironet_ioctl *comp) { struct airo_info *ai = dev->priv; int ridcode; #ifdef MICSUPPORT int enabled; #endif Resp rsp; static int (* writer)(struct airo_info *, u16 rid, const void *, int, int); unsigned char *iobuf; Loading Loading @@ -7367,11 +7590,9 @@ static int writerids(struct net_device *dev, aironet_ioctl *comp) { PC4500_readrid(ai,RID_STATSDELTACLEAR,iobuf,RIDSIZE, 1); #ifdef MICSUPPORT enabled = ai->micstats.enabled; memset(&ai->micstats,0,sizeof(ai->micstats)); ai->micstats.enabled = enabled; #endif if (copy_to_user(comp->data, iobuf, min((int)comp->len, (int)RIDSIZE))) { Loading drivers/net/wireless/ipw2100.c +37 −11 Original line number Diff line number Diff line Loading @@ -167,7 +167,7 @@ that only one external action is invoked at a time. #include "ipw2100.h" #define IPW2100_VERSION "1.1.3" #define IPW2100_VERSION "git-1.1.4" #define DRV_NAME "ipw2100" #define DRV_VERSION IPW2100_VERSION Loading Loading @@ -1672,6 +1672,18 @@ static int ipw2100_start_scan(struct ipw2100_priv *priv) return err; } static const struct ieee80211_geo ipw_geos[] = { { /* Restricted */ "---", .bg_channels = 14, .bg = {{2412, 1}, {2417, 2}, {2422, 3}, {2427, 4}, {2432, 5}, {2437, 6}, {2442, 7}, {2447, 8}, {2452, 9}, {2457, 10}, {2462, 11}, {2467, 12}, {2472, 13}, {2484, 14}}, }, }; static int ipw2100_up(struct ipw2100_priv *priv, int deferred) { unsigned long flags; Loading Loading @@ -1727,6 +1739,13 @@ static int ipw2100_up(struct ipw2100_priv *priv, int deferred) goto exit; } /* Initialize the geo */ if (ieee80211_set_geo(priv->ieee, &ipw_geos[0])) { printk(KERN_WARNING DRV_NAME "Could not set geo\n"); return 0; } priv->ieee->freq_band = IEEE80211_24GHZ_BAND; lock = LOCK_NONE; if (ipw2100_set_ordinal(priv, IPW_ORD_PERS_DB_LOCK, &lock, &ord_len)) { printk(KERN_ERR DRV_NAME Loading Loading @@ -5107,12 +5126,13 @@ static int ipw2100_set_tx_power(struct ipw2100_priv *priv, u32 tx_power) .host_command_length = 4 }; int err = 0; u32 tmp = tx_power; if (tx_power != IPW_TX_POWER_DEFAULT) tx_power = (tx_power - IPW_TX_POWER_MIN_DBM) * 16 / tmp = (tx_power - IPW_TX_POWER_MIN_DBM) * 16 / (IPW_TX_POWER_MAX_DBM - IPW_TX_POWER_MIN_DBM); cmd.host_command_parameters[0] = tx_power; cmd.host_command_parameters[0] = tmp; if (priv->ieee->iw_mode == IW_MODE_ADHOC) err = ipw2100_hw_send_command(priv, &cmd); Loading Loading @@ -5365,9 +5385,12 @@ static int ipw2100_configure_security(struct ipw2100_priv *priv, int batch_mode) SEC_LEVEL_0, 0, 1); } else { auth_mode = IPW_AUTH_OPEN; if ((priv->ieee->sec.flags & SEC_AUTH_MODE) && (priv->ieee->sec.auth_mode == WLAN_AUTH_SHARED_KEY)) if (priv->ieee->sec.flags & SEC_AUTH_MODE) { if (priv->ieee->sec.auth_mode == WLAN_AUTH_SHARED_KEY) auth_mode = IPW_AUTH_SHARED; else if (priv->ieee->sec.auth_mode == WLAN_AUTH_LEAP) auth_mode = IPW_AUTH_LEAP_CISCO_ID; } sec_level = SEC_LEVEL_0; if (priv->ieee->sec.flags & SEC_LEVEL) Loading Loading @@ -5760,6 +5783,9 @@ static int ipw2100_wpa_set_auth_algs(struct ipw2100_priv *priv, int value) } else if (value & IW_AUTH_ALG_OPEN_SYSTEM) { sec.auth_mode = WLAN_AUTH_OPEN; ieee->open_wep = 1; } else if (value & IW_AUTH_ALG_LEAP) { sec.auth_mode = WLAN_AUTH_LEAP; ieee->open_wep = 1; } else return -EINVAL; Loading @@ -5771,7 +5797,7 @@ static int ipw2100_wpa_set_auth_algs(struct ipw2100_priv *priv, int value) return ret; } void ipw2100_wpa_assoc_frame(struct ipw2100_priv *priv, static void ipw2100_wpa_assoc_frame(struct ipw2100_priv *priv, char *wpa_ie, int wpa_ie_len) { Loading drivers/net/wireless/ipw2100.h +4 −2 Original line number Diff line number Diff line Loading @@ -394,6 +394,8 @@ struct ipw2100_notification { #define IPW_AUTH_OPEN 0 #define IPW_AUTH_SHARED 1 #define IPW_AUTH_LEAP 2 #define IPW_AUTH_LEAP_CISCO_ID 0x80 struct statistic { int value; Loading Loading
drivers/net/wireless/Kconfig +5 −2 Original line number Diff line number Diff line Loading @@ -6,7 +6,8 @@ menu "Wireless LAN (non-hamradio)" depends on NETDEVICES config NET_RADIO bool "Wireless LAN drivers (non-hamradio) & Wireless Extensions" bool "Wireless LAN drivers (non-hamradio)" select WIRELESS_EXT ---help--- Support for wireless LANs and everything having to do with radio, but not with amateur radio or FM broadcasting. Loading Loading @@ -239,7 +240,8 @@ config IPW2200_DEBUG config AIRO tristate "Cisco/Aironet 34X/35X/4500/4800 ISA and PCI cards" depends on NET_RADIO && ISA_DMA_API && CRYPTO && (PCI || BROKEN) depends on NET_RADIO && ISA_DMA_API && (PCI || BROKEN) select CRYPTO ---help--- This is the standard Linux driver to support Cisco/Aironet ISA and PCI 802.11 wireless cards. Loading Loading @@ -387,6 +389,7 @@ config PCMCIA_SPECTRUM config AIRO_CS tristate "Cisco/Aironet 34X/35X/4500/4800 PCMCIA cards" depends on NET_RADIO && PCMCIA && (BROKEN || !M32R) select CRYPTO ---help--- This is the standard Linux driver to support Cisco/Aironet PCMCIA 802.11 wireless cards. This driver is the same as the Aironet Loading
drivers/net/wireless/airo.c +276 −55 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ #include <linux/in.h> #include <linux/bitops.h> #include <linux/scatterlist.h> #include <linux/crypto.h> #include <asm/io.h> #include <asm/system.h> Loading Loading @@ -87,14 +88,6 @@ static struct pci_driver airo_driver = { #include <linux/delay.h> #endif /* Support Cisco MIC feature */ #define MICSUPPORT #if defined(MICSUPPORT) && !defined(CONFIG_CRYPTO) #warning MIC support requires Crypto API #undef MICSUPPORT #endif /* Hack to do some power saving */ #define POWER_ON_DOWN Loading Loading @@ -1118,7 +1111,6 @@ static int readrids(struct net_device *dev, aironet_ioctl *comp); static int writerids(struct net_device *dev, aironet_ioctl *comp); static int flashcard(struct net_device *dev, aironet_ioctl *comp); #endif /* CISCO_EXT */ #ifdef MICSUPPORT static void micinit(struct airo_info *ai); static int micsetup(struct airo_info *ai); static int encapsulate(struct airo_info *ai, etherHead *pPacket, MICBuffer *buffer, int len); Loading @@ -1127,9 +1119,6 @@ static int decapsulate(struct airo_info *ai, MICBuffer *mic, etherHead *pPacket, static u8 airo_rssi_to_dbm (tdsRssiEntry *rssi_rid, u8 rssi); static u8 airo_dbm_to_pct (tdsRssiEntry *rssi_rid, u8 dbm); #include <linux/crypto.h> #endif struct airo_info { struct net_device_stats stats; struct net_device *dev; Loading Loading @@ -1190,12 +1179,10 @@ struct airo_info { unsigned long scan_timestamp; /* Time started to scan */ struct iw_spy_data spy_data; struct iw_public_data wireless_data; #ifdef MICSUPPORT /* MIC stuff */ struct crypto_tfm *tfm; mic_module mod[2]; mic_statistics micstats; #endif HostRxDesc rxfids[MPI_MAX_FIDS]; // rx/tx/config MPI350 descriptors HostTxDesc txfids[MPI_MAX_FIDS]; HostRidDesc config_desc; Loading Loading @@ -1229,7 +1216,6 @@ static int flashgchar(struct airo_info *ai,int matchbyte,int dwelltime); static int flashputbuf(struct airo_info *ai); static int flashrestart(struct airo_info *ai,struct net_device *dev); #ifdef MICSUPPORT /*********************************************************************** * MIC ROUTINES * *********************************************************************** Loading Loading @@ -1686,7 +1672,6 @@ static void emmh32_final(emmh32_context *context, u8 digest[4]) digest[2] = (val>>8) & 0xFF; digest[3] = val & 0xFF; } #endif static int readBSSListRid(struct airo_info *ai, int first, BSSListRid *list) { Loading Loading @@ -2005,7 +1990,6 @@ static int mpi_send_packet (struct net_device *dev) * Firmware automaticly puts 802 header on so * we don't need to account for it in the length */ #ifdef MICSUPPORT if (test_bit(FLAG_MIC_CAPABLE, &ai->flags) && ai->micstats.enabled && (ntohs(((u16 *)buffer)[6]) != 0x888E)) { MICBuffer pMic; Loading @@ -2022,9 +2006,7 @@ static int mpi_send_packet (struct net_device *dev) memcpy (sendbuf, &pMic, sizeof(pMic)); sendbuf += sizeof(pMic); memcpy (sendbuf, buffer, len - sizeof(etherHead)); } else #endif { } else { *payloadLen = cpu_to_le16(len - sizeof(etherHead)); dev->trans_start = jiffies; Loading Loading @@ -2400,9 +2382,7 @@ void stop_airo_card( struct net_device *dev, int freeres ) ai->shared, ai->shared_dma); } } #ifdef MICSUPPORT crypto_free_tfm(ai->tfm); #endif del_airo_dev( dev ); free_netdev( dev ); } Loading Loading @@ -2726,9 +2706,7 @@ static struct net_device *_init_airo_card( unsigned short irq, int port, ai->thr_pid = kernel_thread(airo_thread, dev, CLONE_FS | CLONE_FILES); if (ai->thr_pid < 0) goto err_out_free; #ifdef MICSUPPORT ai->tfm = NULL; #endif rc = add_airo_dev( dev ); if (rc) goto err_out_thr; Loading Loading @@ -2969,10 +2947,8 @@ static int airo_thread(void *data) { airo_read_wireless_stats(ai); else if (test_bit(JOB_PROMISC, &ai->flags)) airo_set_promisc(ai); #ifdef MICSUPPORT else if (test_bit(JOB_MIC, &ai->flags)) micinit(ai); #endif else if (test_bit(JOB_EVENT, &ai->flags)) airo_send_event(dev); else if (test_bit(JOB_AUTOWEP, &ai->flags)) Loading Loading @@ -3010,12 +2986,10 @@ static irqreturn_t airo_interrupt ( int irq, void* dev_id, struct pt_regs *regs) if ( status & EV_MIC ) { OUT4500( apriv, EVACK, EV_MIC ); #ifdef MICSUPPORT if (test_bit(FLAG_MIC_CAPABLE, &apriv->flags)) { set_bit(JOB_MIC, &apriv->flags); wake_up_interruptible(&apriv->thr_wait); } #endif } if ( status & EV_LINK ) { union iwreq_data wrqu; Loading Loading @@ -3194,11 +3168,8 @@ static irqreturn_t airo_interrupt ( int irq, void* dev_id, struct pt_regs *regs) } bap_read (apriv, buffer + hdrlen/2, len, BAP0); } else { #ifdef MICSUPPORT MICBuffer micbuf; #endif bap_read (apriv, buffer, ETH_ALEN*2, BAP0); #ifdef MICSUPPORT if (apriv->micstats.enabled) { bap_read (apriv,(u16*)&micbuf,sizeof(micbuf),BAP0); if (ntohs(micbuf.typelen) > 0x05DC) Loading @@ -3211,15 +3182,10 @@ static irqreturn_t airo_interrupt ( int irq, void* dev_id, struct pt_regs *regs) skb_trim (skb, len + hdrlen); } } #endif bap_read(apriv,buffer+ETH_ALEN,len,BAP0); #ifdef MICSUPPORT if (decapsulate(apriv,&micbuf,(etherHead*)buffer,len)) { badmic: dev_kfree_skb_irq (skb); #else if (0) { #endif badrx: OUT4500( apriv, EVACK, EV_RX); goto exitrx; Loading Loading @@ -3430,10 +3396,8 @@ static void mpi_receive_802_3(struct airo_info *ai) int len = 0; struct sk_buff *skb; char *buffer; #ifdef MICSUPPORT int off = 0; MICBuffer micbuf; #endif memcpy_fromio(&rxd, ai->rxfids[0].card_ram_off, sizeof(rxd)); /* Make sure we got something */ Loading @@ -3448,7 +3412,6 @@ static void mpi_receive_802_3(struct airo_info *ai) goto badrx; } buffer = skb_put(skb,len); #ifdef MICSUPPORT memcpy(buffer, ai->rxfids[0].virtual_host_addr, ETH_ALEN * 2); if (ai->micstats.enabled) { memcpy(&micbuf, Loading @@ -3470,9 +3433,6 @@ static void mpi_receive_802_3(struct airo_info *ai) dev_kfree_skb_irq (skb); goto badrx; } #else memcpy(buffer, ai->rxfids[0].virtual_host_addr, len); #endif #ifdef WIRELESS_SPY if (ai->spy_data.spy_number > 0) { char *sa; Loading Loading @@ -3689,13 +3649,11 @@ static u16 setup_card(struct airo_info *ai, u8 *mac, int lock) ai->config.authType = AUTH_OPEN; ai->config.modulation = MOD_CCK; #ifdef MICSUPPORT if ((cap_rid.len>=sizeof(cap_rid)) && (cap_rid.extSoftCap&1) && (micsetup(ai) == SUCCESS)) { ai->config.opmode |= MODE_MIC; set_bit(FLAG_MIC_CAPABLE, &ai->flags); } #endif /* Save off the MAC */ for( i = 0; i < ETH_ALEN; i++ ) { Loading Loading @@ -4170,15 +4128,12 @@ static int transmit_802_3_packet(struct airo_info *ai, int len, char *pPacket) } len -= ETH_ALEN * 2; #ifdef MICSUPPORT if (test_bit(FLAG_MIC_CAPABLE, &ai->flags) && ai->micstats.enabled && (ntohs(((u16 *)pPacket)[6]) != 0x888E)) { if (encapsulate(ai,(etherHead *)pPacket,&pMic,len) != SUCCESS) return ERROR; miclen = sizeof(pMic); } #endif // packet is destination[6], source[6], payload[len-12] // write the payload length and dst/src/payload if (bap_setup(ai, txFid, 0x0036, BAP1) != SUCCESS) return ERROR; Loading Loading @@ -5801,11 +5756,13 @@ static int airo_set_wap(struct net_device *dev, Cmd cmd; Resp rsp; APListRid APList_rid; static const unsigned char bcast[ETH_ALEN] = { 255, 255, 255, 255, 255, 255 }; static const u8 any[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; static const u8 off[ETH_ALEN] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; if (awrq->sa_family != ARPHRD_ETHER) return -EINVAL; else if (!memcmp(bcast, awrq->sa_data, ETH_ALEN)) { else if (!memcmp(any, awrq->sa_data, ETH_ALEN) || !memcmp(off, awrq->sa_data, ETH_ALEN)) { memset(&cmd, 0, sizeof(cmd)); cmd.cmd=CMD_LOSE_SYNC; if (down_interruptible(&local->sem)) Loading Loading @@ -6294,6 +6251,267 @@ static int airo_get_encode(struct net_device *dev, return 0; } /*------------------------------------------------------------------*/ /* * Wireless Handler : set extended Encryption parameters */ static int airo_set_encodeext(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { struct airo_info *local = dev->priv; struct iw_point *encoding = &wrqu->encoding; struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; CapabilityRid cap_rid; /* Card capability info */ int perm = ( encoding->flags & IW_ENCODE_TEMP ? 0 : 1 ); u16 currentAuthType = local->config.authType; int idx, key_len, alg = ext->alg; /* Check encryption mode */ wep_key_t key; /* Is WEP supported ? */ readCapabilityRid(local, &cap_rid, 1); /* Older firmware doesn't support this... if(!(cap_rid.softCap & 2)) { return -EOPNOTSUPP; } */ readConfigRid(local, 1); /* Determine and validate the key index */ idx = encoding->flags & IW_ENCODE_INDEX; if (idx) { if (idx < 1 || idx > ((cap_rid.softCap & 0x80) ? 4:1)) return -EINVAL; idx--; } else idx = get_wep_key(local, 0xffff); if (encoding->flags & IW_ENCODE_DISABLED) alg = IW_ENCODE_ALG_NONE; /* Just setting the transmit key? */ if (ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY) { set_wep_key(local, idx, NULL, 0, perm, 1); } else { /* Set the requested key first */ memset(key.key, 0, MAX_KEY_SIZE); switch (alg) { case IW_ENCODE_ALG_NONE: key.len = 0; break; case IW_ENCODE_ALG_WEP: if (ext->key_len > MIN_KEY_SIZE) { key.len = MAX_KEY_SIZE; } else if (ext->key_len > 0) { key.len = MIN_KEY_SIZE; } else { return -EINVAL; } key_len = min (ext->key_len, key.len); memcpy(key.key, ext->key, key_len); break; default: return -EINVAL; } /* Send the key to the card */ set_wep_key(local, idx, key.key, key.len, perm, 1); } /* Read the flags */ if(encoding->flags & IW_ENCODE_DISABLED) local->config.authType = AUTH_OPEN; // disable encryption if(encoding->flags & IW_ENCODE_RESTRICTED) local->config.authType = AUTH_SHAREDKEY; // Only Both if(encoding->flags & IW_ENCODE_OPEN) local->config.authType = AUTH_ENCRYPT; // Only Wep /* Commit the changes to flags if needed */ if (local->config.authType != currentAuthType) set_bit (FLAG_COMMIT, &local->flags); return -EINPROGRESS; } /*------------------------------------------------------------------*/ /* * Wireless Handler : get extended Encryption parameters */ static int airo_get_encodeext(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { struct airo_info *local = dev->priv; struct iw_point *encoding = &wrqu->encoding; struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; CapabilityRid cap_rid; /* Card capability info */ int idx, max_key_len; /* Is it supported ? */ readCapabilityRid(local, &cap_rid, 1); if(!(cap_rid.softCap & 2)) { return -EOPNOTSUPP; } readConfigRid(local, 1); max_key_len = encoding->length - sizeof(*ext); if (max_key_len < 0) return -EINVAL; idx = encoding->flags & IW_ENCODE_INDEX; if (idx) { if (idx < 1 || idx > ((cap_rid.softCap & 0x80) ? 4:1)) return -EINVAL; idx--; } else idx = get_wep_key(local, 0xffff); encoding->flags = idx + 1; memset(ext, 0, sizeof(*ext)); /* Check encryption mode */ switch(local->config.authType) { case AUTH_ENCRYPT: encoding->flags = IW_ENCODE_ALG_WEP | IW_ENCODE_ENABLED; break; case AUTH_SHAREDKEY: encoding->flags = IW_ENCODE_ALG_WEP | IW_ENCODE_ENABLED; break; default: case AUTH_OPEN: encoding->flags = IW_ENCODE_ALG_NONE | IW_ENCODE_DISABLED; break; } /* We can't return the key, so set the proper flag and return zero */ encoding->flags |= IW_ENCODE_NOKEY; memset(extra, 0, 16); /* Copy the key to the user buffer */ ext->key_len = get_wep_key(local, idx); if (ext->key_len > 16) { ext->key_len=0; } return 0; } /*------------------------------------------------------------------*/ /* * Wireless Handler : set extended authentication parameters */ static int airo_set_auth(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { struct airo_info *local = dev->priv; struct iw_param *param = &wrqu->param; u16 currentAuthType = local->config.authType; switch (param->flags & IW_AUTH_INDEX) { case IW_AUTH_WPA_VERSION: case IW_AUTH_CIPHER_PAIRWISE: case IW_AUTH_CIPHER_GROUP: case IW_AUTH_KEY_MGMT: case IW_AUTH_RX_UNENCRYPTED_EAPOL: case IW_AUTH_PRIVACY_INVOKED: /* * airo does not use these parameters */ break; case IW_AUTH_DROP_UNENCRYPTED: if (param->value) { /* Only change auth type if unencrypted */ if (currentAuthType == AUTH_OPEN) local->config.authType = AUTH_ENCRYPT; } else { local->config.authType = AUTH_OPEN; } /* Commit the changes to flags if needed */ if (local->config.authType != currentAuthType) set_bit (FLAG_COMMIT, &local->flags); break; case IW_AUTH_80211_AUTH_ALG: { /* FIXME: What about AUTH_OPEN? This API seems to * disallow setting our auth to AUTH_OPEN. */ if (param->value & IW_AUTH_ALG_SHARED_KEY) { local->config.authType = AUTH_SHAREDKEY; } else if (param->value & IW_AUTH_ALG_OPEN_SYSTEM) { local->config.authType = AUTH_ENCRYPT; } else return -EINVAL; break; /* Commit the changes to flags if needed */ if (local->config.authType != currentAuthType) set_bit (FLAG_COMMIT, &local->flags); } case IW_AUTH_WPA_ENABLED: /* Silently accept disable of WPA */ if (param->value > 0) return -EOPNOTSUPP; break; default: return -EOPNOTSUPP; } return -EINPROGRESS; } /*------------------------------------------------------------------*/ /* * Wireless Handler : get extended authentication parameters */ static int airo_get_auth(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { struct airo_info *local = dev->priv; struct iw_param *param = &wrqu->param; u16 currentAuthType = local->config.authType; switch (param->flags & IW_AUTH_INDEX) { case IW_AUTH_DROP_UNENCRYPTED: switch (currentAuthType) { case AUTH_SHAREDKEY: case AUTH_ENCRYPT: param->value = 1; break; default: param->value = 0; break; } break; case IW_AUTH_80211_AUTH_ALG: switch (currentAuthType) { case AUTH_SHAREDKEY: param->value = IW_AUTH_ALG_SHARED_KEY; break; case AUTH_ENCRYPT: default: param->value = IW_AUTH_ALG_OPEN_SYSTEM; break; } break; case IW_AUTH_WPA_ENABLED: param->value = 0; break; default: return -EOPNOTSUPP; } return 0; } /*------------------------------------------------------------------*/ /* * Wireless Handler : set Tx-Power Loading Loading @@ -7050,6 +7268,15 @@ static const iw_handler airo_handler[] = (iw_handler) airo_get_encode, /* SIOCGIWENCODE */ (iw_handler) airo_set_power, /* SIOCSIWPOWER */ (iw_handler) airo_get_power, /* SIOCGIWPOWER */ (iw_handler) NULL, /* -- hole -- */ (iw_handler) NULL, /* -- hole -- */ (iw_handler) NULL, /* SIOCSIWGENIE */ (iw_handler) NULL, /* SIOCGIWGENIE */ (iw_handler) airo_set_auth, /* SIOCSIWAUTH */ (iw_handler) airo_get_auth, /* SIOCGIWAUTH */ (iw_handler) airo_set_encodeext, /* SIOCSIWENCODEEXT */ (iw_handler) airo_get_encodeext, /* SIOCGIWENCODEEXT */ (iw_handler) NULL, /* SIOCSIWPMKSA */ }; /* Note : don't describe AIROIDIFC and AIROOLDIDIFC in here. Loading Loading @@ -7270,13 +7497,11 @@ static int readrids(struct net_device *dev, aironet_ioctl *comp) { case AIROGSTAT: ridcode = RID_STATUS; break; case AIROGSTATSD32: ridcode = RID_STATSDELTA; break; case AIROGSTATSC32: ridcode = RID_STATS; break; #ifdef MICSUPPORT case AIROGMICSTATS: if (copy_to_user(comp->data, &ai->micstats, min((int)comp->len,(int)sizeof(ai->micstats)))) return -EFAULT; return 0; #endif case AIRORRID: ridcode = comp->ridnum; break; default: return -EINVAL; Loading Loading @@ -7308,9 +7533,7 @@ static int readrids(struct net_device *dev, aironet_ioctl *comp) { static int writerids(struct net_device *dev, aironet_ioctl *comp) { struct airo_info *ai = dev->priv; int ridcode; #ifdef MICSUPPORT int enabled; #endif Resp rsp; static int (* writer)(struct airo_info *, u16 rid, const void *, int, int); unsigned char *iobuf; Loading Loading @@ -7367,11 +7590,9 @@ static int writerids(struct net_device *dev, aironet_ioctl *comp) { PC4500_readrid(ai,RID_STATSDELTACLEAR,iobuf,RIDSIZE, 1); #ifdef MICSUPPORT enabled = ai->micstats.enabled; memset(&ai->micstats,0,sizeof(ai->micstats)); ai->micstats.enabled = enabled; #endif if (copy_to_user(comp->data, iobuf, min((int)comp->len, (int)RIDSIZE))) { Loading
drivers/net/wireless/ipw2100.c +37 −11 Original line number Diff line number Diff line Loading @@ -167,7 +167,7 @@ that only one external action is invoked at a time. #include "ipw2100.h" #define IPW2100_VERSION "1.1.3" #define IPW2100_VERSION "git-1.1.4" #define DRV_NAME "ipw2100" #define DRV_VERSION IPW2100_VERSION Loading Loading @@ -1672,6 +1672,18 @@ static int ipw2100_start_scan(struct ipw2100_priv *priv) return err; } static const struct ieee80211_geo ipw_geos[] = { { /* Restricted */ "---", .bg_channels = 14, .bg = {{2412, 1}, {2417, 2}, {2422, 3}, {2427, 4}, {2432, 5}, {2437, 6}, {2442, 7}, {2447, 8}, {2452, 9}, {2457, 10}, {2462, 11}, {2467, 12}, {2472, 13}, {2484, 14}}, }, }; static int ipw2100_up(struct ipw2100_priv *priv, int deferred) { unsigned long flags; Loading Loading @@ -1727,6 +1739,13 @@ static int ipw2100_up(struct ipw2100_priv *priv, int deferred) goto exit; } /* Initialize the geo */ if (ieee80211_set_geo(priv->ieee, &ipw_geos[0])) { printk(KERN_WARNING DRV_NAME "Could not set geo\n"); return 0; } priv->ieee->freq_band = IEEE80211_24GHZ_BAND; lock = LOCK_NONE; if (ipw2100_set_ordinal(priv, IPW_ORD_PERS_DB_LOCK, &lock, &ord_len)) { printk(KERN_ERR DRV_NAME Loading Loading @@ -5107,12 +5126,13 @@ static int ipw2100_set_tx_power(struct ipw2100_priv *priv, u32 tx_power) .host_command_length = 4 }; int err = 0; u32 tmp = tx_power; if (tx_power != IPW_TX_POWER_DEFAULT) tx_power = (tx_power - IPW_TX_POWER_MIN_DBM) * 16 / tmp = (tx_power - IPW_TX_POWER_MIN_DBM) * 16 / (IPW_TX_POWER_MAX_DBM - IPW_TX_POWER_MIN_DBM); cmd.host_command_parameters[0] = tx_power; cmd.host_command_parameters[0] = tmp; if (priv->ieee->iw_mode == IW_MODE_ADHOC) err = ipw2100_hw_send_command(priv, &cmd); Loading Loading @@ -5365,9 +5385,12 @@ static int ipw2100_configure_security(struct ipw2100_priv *priv, int batch_mode) SEC_LEVEL_0, 0, 1); } else { auth_mode = IPW_AUTH_OPEN; if ((priv->ieee->sec.flags & SEC_AUTH_MODE) && (priv->ieee->sec.auth_mode == WLAN_AUTH_SHARED_KEY)) if (priv->ieee->sec.flags & SEC_AUTH_MODE) { if (priv->ieee->sec.auth_mode == WLAN_AUTH_SHARED_KEY) auth_mode = IPW_AUTH_SHARED; else if (priv->ieee->sec.auth_mode == WLAN_AUTH_LEAP) auth_mode = IPW_AUTH_LEAP_CISCO_ID; } sec_level = SEC_LEVEL_0; if (priv->ieee->sec.flags & SEC_LEVEL) Loading Loading @@ -5760,6 +5783,9 @@ static int ipw2100_wpa_set_auth_algs(struct ipw2100_priv *priv, int value) } else if (value & IW_AUTH_ALG_OPEN_SYSTEM) { sec.auth_mode = WLAN_AUTH_OPEN; ieee->open_wep = 1; } else if (value & IW_AUTH_ALG_LEAP) { sec.auth_mode = WLAN_AUTH_LEAP; ieee->open_wep = 1; } else return -EINVAL; Loading @@ -5771,7 +5797,7 @@ static int ipw2100_wpa_set_auth_algs(struct ipw2100_priv *priv, int value) return ret; } void ipw2100_wpa_assoc_frame(struct ipw2100_priv *priv, static void ipw2100_wpa_assoc_frame(struct ipw2100_priv *priv, char *wpa_ie, int wpa_ie_len) { Loading
drivers/net/wireless/ipw2100.h +4 −2 Original line number Diff line number Diff line Loading @@ -394,6 +394,8 @@ struct ipw2100_notification { #define IPW_AUTH_OPEN 0 #define IPW_AUTH_SHARED 1 #define IPW_AUTH_LEAP 2 #define IPW_AUTH_LEAP_CISCO_ID 0x80 struct statistic { int value; Loading