Please pull 'upstream-fixes' branch of wireless-2.6
Subsystems (4)
The following changes since commit 51018b0a3160d253283173c2f54f16746cee5852:
Ulrich Drepper:
make UML compile (FC6/x86-64)
are found in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git upstream-fixes
Dave Kleikamp:
airo: check if need to freeze
Eric Sesterhenn:
zd1201: Possible NULL dereference
Florin Malita:
airo.c: check returned values
Jean Tourrilhes:
orinoco: fix WE-21 buffer overflow
wireless: More WE-21 potential overflows...
John W. Linville:
zd1211rw: fix build-break caused by association race fix
Larry Finger:
bcm43xx-softmac: check returned value from pci_enable_device
bcm43xx-softmac: Fix system hang for x86-64 with >1GB RAM
Laurent Riffard:
sotftmac: fix a slab corruption in WEP restricted key association
Michael Buesch:
bcm43xx: fix race condition in periodic work handler
softmac: Fix WX and association related races
drivers/net/wireless/airo.c | 105 +++++++++++++++++------ drivers/net/wireless/atmel.c | 2 drivers/net/wireless/bcm43xx/bcm43xx_dma.c | 28 +++++- drivers/net/wireless/bcm43xx/bcm43xx_dma.h | 17 ++++ drivers/net/wireless/bcm43xx/bcm43xx_leds.c | 2 drivers/net/wireless/bcm43xx/bcm43xx_main.c | 34 +++---- drivers/net/wireless/bcm43xx/bcm43xx_wx.c | 2 drivers/net/wireless/orinoco.c | 16 ++-- drivers/net/wireless/ray_cs.c | 1 drivers/net/wireless/zd1201.c | 6 - drivers/net/wireless/zd1211rw/zd_mac.c | 2 include/net/ieee80211softmac.h | 35 ++++---- net/ieee80211/softmac/ieee80211softmac_assoc.c | 56 ++++++------ net/ieee80211/softmac/ieee80211softmac_io.c | 11 ++ net/ieee80211/softmac/ieee80211softmac_module.c | 1 net/ieee80211/softmac/ieee80211softmac_wx.c | 71 ++++++++++------ 16 files changed, 238 insertions(+), 151 deletions(-)
drivers/net/wireless/airo.c +76 -29
@@ -2897,6 +2897,8 @@ static struct net_device *_init_airo_car goto err_out_map; } ai->wifidev =init_wifidev (ai, dev); +if (!ai->wifidev) + goto err_out_reg;set_bit (FLAG_REGISTERED ,&ai->flags); airo_print_info(dev->name, "MAC enabled %x:%x:%x:%x:%x:%x",
@@ -2908,11 +2910,18 @@ static struct net_device *_init_airo_carfor ( i =0 ; i <MAX_FIDS ; i++ ) ai->fids[i] =transmit_allocate (ai,AIRO_DEF_MTU ,i>=MAX_FIDS /2 ); -setup_proc_entry ( dev, dev->priv );/* XXX check for failure */ +if (setup_proc_entry (dev, dev->priv) <0 ) + goto err_out_wifi; +netif_start_queue (dev);SET_MODULE_OWNER (dev);return dev; +err_out_wifi: +unregister_netdev (ai->wifidev); +free_netdev (ai->wifidev); +err_out_reg: +unregister_netdev (dev); err_out_map:if (test_bit (FLAG_MPI ,&ai->flags) && pci) {pci_free_consistent (pci,PCI_SHARED_LEN , ai->shared, ai->shared_dma);
@@ -3089,7 +3098,8 @@ static int airo_thread(void *data) {set_bit (JOB_AUTOWEP , &ai->jobs);break ; } -if (!kthread_should_stop ()) { +if (!kthread_should_stop () && + !freezing (current)) {unsigned long wake_at;if (!ai->expires || !ai->scan_timeout) { wake_at = max(ai->expires,
@@ -3101,7 +3111,8 @@ static int airo_thread(void *data) {schedule_timeout (wake_at - jiffies);continue ; } - }else if (!kthread_should_stop ()) { + }else if (!kthread_should_stop () && + !freezing (current)) {schedule ();continue ; }
@@ -4495,91 +4506,128 @@ static int setup_proc_entry( struct net_ apriv->proc_entry =create_proc_entry (apriv->proc_name,S_IFDIR |airo_perm, airo_entry); - apriv->proc_entry->uid = proc_uid; - apriv->proc_entry->gid = proc_gid; - apriv->proc_entry->owner =THIS_MODULE ; +if (!apriv->proc_entry) + goto fail; + apriv->proc_entry->uid = proc_uid; + apriv->proc_entry->gid = proc_gid; + apriv->proc_entry->owner =THIS_MODULE ;/* Setup the StatsDelta */ entry =create_proc_entry ("StatsDelta" ,S_IFREG | (S_IRUGO &proc_perm), apriv->proc_entry); - entry->uid = proc_uid; - entry->gid = proc_gid; +if (!entry) + goto fail_stats_delta; + entry->uid = proc_uid; + entry->gid = proc_gid; entry->data = dev; - entry->owner =THIS_MODULE ; + entry->owner =THIS_MODULE ;SETPROC_OPS (entry, proc_statsdelta_ops);/* Setup the Stats */ entry =create_proc_entry ("Stats" ,S_IFREG | (S_IRUGO &proc_perm), apriv->proc_entry); - entry->uid = proc_uid; - entry->gid = proc_gid; +if (!entry) + goto fail_stats; + entry->uid = proc_uid; + entry->gid = proc_gid; entry->data = dev; - entry->owner =THIS_MODULE ; + entry->owner =THIS_MODULE ;SETPROC_OPS (entry, proc_stats_ops);/* Setup the Status */ entry =create_proc_entry ("Status" ,S_IFREG | (S_IRUGO &proc_perm), apriv->proc_entry); - entry->uid = proc_uid; - entry->gid = proc_gid; +if (!entry) + goto fail_status; + entry->uid = proc_uid; + entry->gid = proc_gid; entry->data = dev; - entry->owner =THIS_MODULE ; + entry->owner =THIS_MODULE ;SETPROC_OPS (entry, proc_status_ops);/* Setup the Config */ entry =create_proc_entry ("Config" ,S_IFREG | proc_perm, apriv->proc_entry); - entry->uid = proc_uid; - entry->gid = proc_gid; +if (!entry) + goto fail_config; + entry->uid = proc_uid; + entry->gid = proc_gid; entry->data = dev; - entry->owner =THIS_MODULE ; + entry->owner =THIS_MODULE ;SETPROC_OPS (entry, proc_config_ops);/* Setup the SSID */ entry =create_proc_entry ("SSID" ,S_IFREG | proc_perm, apriv->proc_entry); - entry->uid = proc_uid; - entry->gid = proc_gid; +if (!entry) + goto fail_ssid; + entry->uid = proc_uid; + entry->gid = proc_gid; entry->data = dev; - entry->owner =THIS_MODULE ; + entry->owner =THIS_MODULE ;SETPROC_OPS (entry, proc_SSID_ops);/* Setup the APList */ entry =create_proc_entry ("APList" ,S_IFREG | proc_perm, apriv->proc_entry); - entry->uid = proc_uid; - entry->gid = proc_gid; +if (!entry) + goto fail_aplist; + entry->uid = proc_uid; + entry->gid = proc_gid; entry->data = dev; - entry->owner =THIS_MODULE ; + entry->owner =THIS_MODULE ;SETPROC_OPS (entry, proc_APList_ops);/* Setup the BSSList */ entry =create_proc_entry ("BSSList" ,S_IFREG | proc_perm, apriv->proc_entry); +if (!entry) + goto fail_bsslist; entry->uid = proc_uid; entry->gid = proc_gid; entry->data = dev; - entry->owner =THIS_MODULE ; + entry->owner =THIS_MODULE ;SETPROC_OPS (entry, proc_BSSList_ops);/* Setup the WepKey */ entry =create_proc_entry ("WepKey" ,S_IFREG | proc_perm, apriv->proc_entry); - entry->uid = proc_uid; - entry->gid = proc_gid; +if (!entry) + goto fail_wepkey; + entry->uid = proc_uid; + entry->gid = proc_gid; entry->data = dev; - entry->owner =THIS_MODULE ; + entry->owner =THIS_MODULE ;SETPROC_OPS (entry, proc_wepkey_ops);return 0 ; + +fail_wepkey: +remove_proc_entry ("BSSList" , apriv->proc_entry); +fail_bsslist: +remove_proc_entry ("APList" , apriv->proc_entry); +fail_aplist: +remove_proc_entry ("SSID" , apriv->proc_entry); +fail_ssid: +remove_proc_entry ("Config" , apriv->proc_entry); +fail_config: +remove_proc_entry ("Status" , apriv->proc_entry); +fail_status: +remove_proc_entry ("Stats" , apriv->proc_entry); +fail_stats: +remove_proc_entry ("StatsDelta" , apriv->proc_entry); +fail_stats_delta: +remove_proc_entry (apriv->proc_name, airo_entry); +fail: +return -ENOMEM ; } static int takedown_proc_entry( struct net_device *dev,
@@ -5924,7 +5972,6 @@ static int airo_get_essid(struct net_dev/* Get the current SSID */ memcpy (extra, status_rid.SSID, status_rid.SSIDlen); - extra[status_rid.SSIDlen] ='\0' ;/* If none, we may want to get the one that was set */ /* Push it out ! */
drivers/net/wireless/atmel.c +0 -2
@@ -1678,11 +1678,9 @@ static int atmel_get_essid(struct net_de/* Get the current SSID */ if (priv->new_SSID_size !=0 ) {memcpy (extra, priv->new_SSID, priv->new_SSID_size); - extra[priv->new_SSID_size] ='\0' ; dwrq->length = priv->new_SSID_size; }else {memcpy (extra, priv->SSID, priv->SSID_size); - extra[priv->SSID_size] ='\0' ; dwrq->length = priv->SSID_size; }
drivers/net/wireless/bcm43xx/bcm43xx_dma.c +23 -5
@@ -705,11 +705,30 @@ int bcm43xx_dma_init(struct bcm43xx_privstruct bcm43xx_dmaring *ring;int err = -ENOMEM ;int dma64 =0 ; -u32 sbtmstatehi; +u64 mask =bcm43xx_get_supported_dma_mask (bcm); +int nobits; - sbtmstatehi =bcm43xx_read32 (bcm, BCM43xx_CIR_SBTMSTATEHIGH); -if (sbtmstatehi & BCM43xx_SBTMSTATEHIGH_DMA64BIT) +if (mask ==DMA_64BIT_MASK ) { dma64 =1 ; + nobits =64 ; + }else if (mask ==DMA_32BIT_MASK ) + nobits =32 ; +else + nobits =30 ; + err =pci_set_dma_mask (bcm->pci_dev, mask); + err |=pci_set_consistent_dma_mask (bcm->pci_dev, mask); +if (err) { +#ifdef CONFIG_BCM43XX_PIO + printk(KERN_WARNING PFX "DMA not supported on this device." + " Falling back to PIO.\n"); + bcm->__using_pio =1 ; +return -ENOSYS ; +#else + printk(KERN_ERR PFX "FATAL: DMA not supported and PIO not configured. " + "Please recompile the driver with PIO support.\n"); +return -ENODEV ; +#endif /* CONFIG_BCM43XX_PIO */ + }/* setup TX DMA channels. */ ring =bcm43xx_setup_dmaring (bcm,0 ,1 , dma64);
@@ -755,8 +774,7 @@ int bcm43xx_dma_init(struct bcm43xx_priv dma->rx_ring3 = ring; } - dprintk(KERN_INFO PFX "%s DMA initialized\n", - dma64 ? "64-bit" : "32-bit"); + dprintk(KERN_INFO PFX "%d-bit DMA initialized\n", nobits); err =0 ; out:return err;
drivers/net/wireless/bcm43xx/bcm43xx_dma.h +17 -0
@@ -314,6 +314,23 @@ int bcm43xx_dma_tx(struct bcm43xx_privat struct ieee80211_txb *txb);void bcm43xx_dma_rx (struct bcm43xx_dmaring *ring); +/* Helper function that returns the dma mask for this device. */ +static inline +u64 bcm43xx_get_supported_dma_mask (struct bcm43xx_private *bcm) +{ +int dma64 =bcm43xx_read32 (bcm, BCM43xx_CIR_SBTMSTATEHIGH) & + BCM43xx_SBTMSTATEHIGH_DMA64BIT; +u16 mmio_base =bcm43xx_dmacontroller_base (dma64,0 ); +u32 mask = BCM43xx_DMA32_TXADDREXT_MASK; + +if (dma64) +return DMA_64BIT_MASK ; +bcm43xx_write32 (bcm, mmio_base + BCM43xx_DMA32_TXCTL, mask); +if (bcm43xx_read32 (bcm, mmio_base + BCM43xx_DMA32_TXCTL) & mask) +return DMA_32BIT_MASK ; +return DMA_30BIT_MASK ; +} +#else /* CONFIG_BCM43XX_DMA */
drivers/net/wireless/bcm43xx/bcm43xx_leds.c +1 -1
@@ -242,7 +242,7 @@ void bcm43xx_leds_update(struct bcm43xx_//TODO break ;case BCM43xx_LED_ASSOC: -if (bcm->softmac->associated) +if (bcm->softmac->associnfo.associated) turn_on =1 ;break ;#ifdef CONFIG_BCM43XX_DEBUG
drivers/net/wireless/bcm43xx/bcm43xx_main.c +12 -22
@@ -2925,10 +2925,13 @@ static int bcm43xx_wireless_core_init(stbcm43xx_write16 (bcm,0x043C ,0x000C );if (active_wlcore) { -if (bcm43xx_using_pio (bcm)) +if (bcm43xx_using_pio (bcm)) { err =bcm43xx_pio_init (bcm); -else + }else { err =bcm43xx_dma_init (bcm); +if (err == -ENOSYS ) + err =bcm43xx_pio_init (bcm); + }if (err) goto err_chip_cleanup; }
@@ -3164,12 +3167,12 @@ static void bcm43xx_periodic_work_handleu32 savedirqs =0 ;int badness; +mutex_lock (&bcm->mutex); badness =estimate_periodic_work_badness (bcm->periodic_state);if (badness >BADNESS_LIMIT ) {/* Periodic work will take a long time, so we want it to * be preemtible. */ -mutex_lock (&bcm->mutex);netif_tx_disable (bcm->net_dev);spin_lock_irqsave (&bcm->irq_lock, flags);bcm43xx_mac_suspend (bcm);
@@ -3182,7 +3185,6 @@ static void bcm43xx_periodic_work_handle/* Periodic work should take short time, so we want low * locking overhead. */ -mutex_lock (&bcm->mutex);spin_lock_irqsave (&bcm->irq_lock, flags); }
@@ -3993,8 +3995,6 @@ static int bcm43xx_init_private(struct bstruct net_device *net_dev, struct pci_dev *pci_dev) { - int err; -bcm43xx_set_status (bcm ,BCM43xx_STAT_UNINIT ); bcm->ieee =netdev_priv (net_dev); bcm->softmac =ieee80211_priv (net_dev);
@@ -4012,22 +4012,8 @@ static int bcm43xx_init_private(struct b (void (*)(unsigned long ))bcm43xx_interrupt_tasklet, (unsigned long)bcm);tasklet_disable_nosync (&bcm->isr_tasklet); -if (modparam_pio) { +if (modparam_pio) bcm->__using_pio =1 ; - }else { - err =pci_set_dma_mask (pci_dev,DMA_30BIT_MASK ); - err |=pci_set_consistent_dma_mask (pci_dev,DMA_30BIT_MASK ); -if (err) { -#ifdef CONFIG_BCM43XX_PIO - printk(KERN_WARNING PFX "DMA not supported. Falling back to PIO.\n"); - bcm->__using_pio =1 ; -#else - printk(KERN_ERR PFX "FATAL: DMA not supported and PIO not configured. " - "Recompile the driver with PIO support, please.\n"); -return -ENODEV ; -#endif /* CONFIG_BCM43XX_PIO */ - } - } bcm->rts_threshold = BCM43xx_DEFAULT_RTS_THRESHOLD;/* default to sw encryption for now */
@@ -4208,7 +4194,11 @@ static int bcm43xx_resume(struct pci_dev dprintk(KERN_INFO PFX "Resuming...\n");pci_set_power_state (pdev,0 ); -pci_enable_device (pdev); + err =pci_enable_device (pdev); +if (err) { + printk(KERN_ERR PFX "Failure with pci_enable_device!\n"); +return err; + }pci_restore_state (pdev);bcm43xx_chipset_attach (bcm);
drivers/net/wireless/bcm43xx/bcm43xx_wx.c +1 -1
@@ -847,7 +847,7 @@ static struct iw_statistics *bcm43xx_getunsigned long flags; wstats = &bcm->stats.wstats; -if (!mac->associated) { +if (!mac->associnfo.associated) { wstats->miss.beacon =0 ;// bcm->ieee->ieee_stats.tx_retry_limit_exceeded = 0; // FIXME: should this be cleared here? wstats->discard.retries =0 ;
drivers/net/wireless/orinoco.c +9 -7
@@ -2457,6 +2457,7 @@ void free_orinocodev(struct net_device */* Wireless extensions */ /********************************************************************/ +/* Return : < 0 -> error code ; >= 0 -> length */ static int orinoco_hw_get_essid (struct orinoco_private *priv,int *active,char buf[IW_ESSID_MAX_SIZE +1 ]) {
@@ -2501,9 +2502,9 @@ static int orinoco_hw_get_essid(struct o len =le16_to_cpu (essidbuf.len);BUG_ON (len >IW_ESSID_MAX_SIZE ); -memset (buf,0 ,IW_ESSID_MAX_SIZE +1 ); +memset (buf,0 ,IW_ESSID_MAX_SIZE );memcpy (buf, p, len); - buf[len] ='\0' ; + err = len; fail_unlock:orinoco_unlock (priv, &flags);
@@ -3027,17 +3028,18 @@ static int orinoco_ioctl_getessid(structif (netif_running (dev)) { err =orinoco_hw_get_essid (priv, &active, essidbuf); -if (err) +if (err <0 )return err; + erq->length = err; }else {if (orinoco_lock (priv, &flags) !=0 )return -EBUSY ; -memcpy (essidbuf, priv->desired_essid,IW_ESSID_MAX_SIZE +1 ); +memcpy (essidbuf, priv->desired_essid,IW_ESSID_MAX_SIZE ); + erq->length =strlen (priv->desired_essid);orinoco_unlock (priv, &flags); } erq->flags =1 ; - erq->length =strlen (essidbuf);return 0 ; }
@@ -3075,10 +3077,10 @@ static int orinoco_ioctl_getnick(structif (orinoco_lock (priv, &flags) !=0 )return -EBUSY ; -memcpy (nickbuf, priv->nick,IW_ESSID_MAX_SIZE +1 ); +memcpy (nickbuf, priv->nick,IW_ESSID_MAX_SIZE );orinoco_unlock (priv, &flags); - nrq->length =strlen (nickbuf); + nrq->length =strlen (priv->nick);return 0 ; }
drivers/net/wireless/ray_cs.c +0 -1
@@ -1198,7 +1198,6 @@ static int ray_get_essid(struct net_devi/* Get the essid that was set */ memcpy (extra, local->sparm.b5.a_current_ess_id,IW_ESSID_MAX_SIZE ); - extra[IW_ESSID_MAX_SIZE ] ='\0' ;/* Push it out ! */ dwrq->length =strlen (extra);
drivers/net/wireless/zd1201.c +2 -4
@@ -193,10 +193,8 @@ static void zd1201_usbrx(struct urb *urbstruct sk_buff *skb;unsigned char type; -if (!zd) { - free =1 ; - goto exit; - } +if (!zd) +return ;switch (urb->status) {case -EILSEQ :
drivers/net/wireless/zd1211rw/zd_mac.c +1 -1
@@ -1099,7 +1099,7 @@ static void link_led_handler(void *p)int r;spin_lock_irq (&mac->lock); - is_associated = sm->associated !=0 ; + is_associated = sm->associnfo.associated !=0 ;spin_unlock_irq (&mac->lock); r = zd_chip_control_leds(chip,
include/net/ieee80211softmac.h +16 -19
@@ -63,13 +63,11 @@ struct ieee80211softmac_wpa {/* * Information about association -* -* Do we need a lock for this? -* We only ever use this structure inlined -* into our global struct. I've used its lock, -* but maybe we need a local one here? */ struct ieee80211softmac_assoc_info { + +struct mutex mutex; +/* * This is the requested ESSID. It is written * only by the WX handlers.
@@ -99,12 +97,13 @@ struct ieee80211softmac_assoc_info {* * bssfixed is used for SIOCSIWAP. */ - u8 static_essid:1, - short_preamble_available:1, - associating:1, - assoc_wait:1, - bssvalid:1, - bssfixed:1; +u8 static_essid; +u8 short_preamble_available; +u8 associating; +u8 associated; +u8 assoc_wait; +u8 bssvalid; +u8 bssfixed;/* Scan retries remaining */ int scan_retry;
@@ -229,12 +228,10 @@ struct ieee80211softmac_device {/* private stuff follows */ /* this lock protects this structure */ spinlock_t lock; - -/* couple of flags */ - u8 scanning:1, /* protects scanning from being done multiple times at once */ - associated:1, - running:1; - + +u8 running;/* SoftMAC started? */ +u8 scanning; +struct ieee80211softmac_scaninfo *scaninfo;struct ieee80211softmac_assoc_info associnfo;struct ieee80211softmac_bss_info bssinfo;
@@ -250,7 +247,7 @@ struct ieee80211softmac_device {/* we need to keep a list of network structs we copied */ struct list_head network_list; - +/* This must be the last item so that it points to the data * allocated beyond this structure by alloc_ieee80211 */ u8 priv[0 ];
@@ -295,7 +292,7 @@ static inline u8 ieee80211softmac_sugges {struct ieee80211softmac_txrates *txrates = &mac->txrates; -if (!mac->associated) +if (!mac->associnfo.associated)return txrates->mgt_mcast_rate;/* We are associated, sending unicast frame */
net/ieee80211/softmac/ieee80211softmac_assoc.c +27 -29
157 lines not on this page · raw message
net/ieee80211/softmac/ieee80211softmac_io.c +8 -3
@@ -304,7 +304,7 @@ ieee80211softmac_auth(struct ieee80211_a2 +/* Auth Transaction Seq */ 2 +/* Status Code */ /* Challenge Text IE */ - is_shared_response ?0 :1 +1 + net->challenge_len + (is_shared_response ?1 +1 + net->challenge_len :0 ) );if (unlikely ((*pkt) ==NULL ))return 0 ;
@@ -475,8 +475,13 @@ int ieee80211softmac_handle_beacon(struc {struct ieee80211softmac_device *mac =ieee80211_priv (dev); -if (mac->associated &&memcmp (network->bssid, mac->associnfo.bssid,ETH_ALEN ) ==0 ) -ieee80211softmac_process_erp (mac, network->erp_value); +/* This might race, but we don't really care and it's not worth +* adding heavyweight locking in this fastpath. +*/ +if (mac->associnfo.associated) { +if (memcmp (network->bssid, mac->associnfo.bssid,ETH_ALEN ) ==0 ) +ieee80211softmac_process_erp (mac, network->erp_value); + }return 0 ; }
net/ieee80211/softmac/ieee80211softmac_module.c +1 -0
@@ -57,6 +57,7 @@ struct net_device *alloc_ieee80211softmaINIT_LIST_HEAD (&softmac->network_list);INIT_LIST_HEAD (&softmac->events); +mutex_init (&softmac->associnfo.mutex);INIT_WORK (&softmac->associnfo.work, ieee80211softmac_assoc_work, softmac);INIT_WORK (&softmac->associnfo.timeout, ieee80211softmac_assoc_timeout, softmac); softmac->start_scan = ieee80211softmac_start_scan_implementation;
net/ieee80211/softmac/ieee80211softmac_wx.c +44 -27
213 lines not on this page · raw message
Signature · 2 lines
John W. Linville [email protected]
Please pull 'upstream' branch of wireless-2.6
The following changes since commit 41072a1be57f63bf83afc31c44d72de018d800fa:
John W. Linville:
zd1211rw: fix build-break caused by association race fix
are found in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git upstream
Alexey Dobriyan:
prism54: use BUILD_BUG_ON
Daniel Drake:
zd1211rw: Add 3 more device IDs
ieee80211: Move IV/ICV stripping into ieee80211_rx
Dmitry Torokhov:
atmel: save on array initialization
atmel: use ARRAY_SIZE()
atmel: whitespace cleanup
prism54: fix potential race in reset scheduling
prism54: whitespace cleanup
Holden Karau:
atmel: output signal strength information
Larry Finger:
bcm43xx: output proper link quality with scans
ieee80211: Drop and count duplicate data frames to remove 'replay detected' log messages
matthieu castet:
ieee80211: allow mtu bigger than 1500
Stefano Brivio:
bcm43xx: add PCI-E code
drivers/net/wireless/atmel.c | 36 ++++-- drivers/net/wireless/atmel_cs.c | 74 ++++++------- drivers/net/wireless/atmel_pci.c | 10 +- drivers/net/wireless/bcm43xx/bcm43xx.h | 32 ++++++ drivers/net/wireless/bcm43xx/bcm43xx_main.c | 145 +++++++++++++++++++------ drivers/net/wireless/bcm43xx/bcm43xx_power.c | 28 ++++- drivers/net/wireless/bcm43xx/bcm43xx_wx.c | 4 - drivers/net/wireless/bcm43xx/bcm43xx_xmit.c | 19 --- drivers/net/wireless/prism54/isl_38xx.c | 17 +-- drivers/net/wireless/prism54/isl_38xx.h | 7 + drivers/net/wireless/prism54/isl_ioctl.c | 61 +++++------ drivers/net/wireless/prism54/isl_ioctl.h | 1 drivers/net/wireless/prism54/isl_oid.h | 48 ++++---- drivers/net/wireless/prism54/islpci_dev.c | 13 +- drivers/net/wireless/prism54/islpci_dev.h | 11 +- drivers/net/wireless/prism54/islpci_eth.c | 30 +++-- drivers/net/wireless/prism54/islpci_eth.h | 1 drivers/net/wireless/prism54/islpci_hotplug.c | 23 ++-- drivers/net/wireless/prism54/islpci_mgt.c | 3 - drivers/net/wireless/prism54/islpci_mgt.h | 5 - drivers/net/wireless/prism54/oid_mgt.c | 6 + drivers/net/wireless/prism54/prismcompat.h | 4 - drivers/net/wireless/zd1211rw/zd_usb.c | 3 + include/net/ieee80211.h | 6 + net/ieee80211/ieee80211_module.c | 9 ++ net/ieee80211/ieee80211_rx.c | 61 +++++++++-- 26 files changed, 409 insertions(+), 248 deletions(-)
drivers/net/wireless/atmel.c +22 -14
@@ -595,7 +595,7 @@ static void atmel_join_bss(struct atmel_static void atmel_smooth_qual (struct atmel_private *priv);static void atmel_writeAR (struct net_device *dev,u16 data);static int probe_atmel_card (struct net_device *dev); -static int reset_atmel_card (struct net_device *dev ); +static int reset_atmel_card (struct net_device *dev);static void atmel_enter_state (struct atmel_private *priv,int new_state);int atmel_open (struct net_device *dev);
@@ -784,11 +784,11 @@ static void tx_update_descriptor(structstatic int start_tx (struct sk_buff *skb,struct net_device *dev) { +static const u8 SNAP_RFC1024 [6 ] = {0xaa ,0xaa ,0x03 ,0x00 ,0x00 ,0x00 };struct atmel_private *priv =netdev_priv (dev);struct ieee80211_hdr_4addr header;unsigned long flags;u16 buff, frame_ctl, len = (ETH_ZLEN < skb->len) ? skb->len :ETH_ZLEN ; -u8 SNAP_RFC1024 [6 ] = {0xaa ,0xaa ,0x03 ,0x00 ,0x00 ,0x00 };if (priv->card && priv->present_callback && !(*priv->present_callback)(priv->card)) {
@@ -1193,7 +1193,7 @@ static irqreturn_t service_interrupt(intatmel_set_gcr (dev,GCR_ACKINT );/* acknowledge interrupt */ -for (i =0 ; i <sizeof (irq_order)/sizeof (u8); i++) +for (i =0 ; i <ARRAY_SIZE (irq_order); i++)if (isr & irq_order[i])break ;
@@ -1345,10 +1345,10 @@ int atmel_open(struct net_device *dev)atmel_set_mib8 (priv, Phy_Mib_Type,PHY_MIB_REG_DOMAIN_POS , priv->reg_domain); }else { priv->reg_domain =atmel_get_mib8 (priv, Phy_Mib_Type,PHY_MIB_REG_DOMAIN_POS ); -for (i =0 ; i <sizeof (channel_table)/sizeof (channel_table[0 ]); i++) +for (i =0 ; i <ARRAY_SIZE (channel_table); i++)if (priv->reg_domain == channel_table[i].reg_domain)break ; -if (i ==sizeof (channel_table)/sizeof (channel_table[0 ])) { +if (i ==ARRAY_SIZE (channel_table)) { priv->reg_domain =REG_DOMAIN_MKK1 ;printk (KERN_ALERT "%s: failed to get regulatory domain: assuming MKK1.\n" , dev->name); }
@@ -1393,7 +1393,7 @@ static int atmel_validate_channel(structelse return suitable default channel */ int i; -for (i =0 ; i <sizeof (channel_table)/sizeof (channel_table[0 ]); i++) +for (i =0 ; i <ARRAY_SIZE (channel_table); i++)if (priv->reg_domain == channel_table[i].reg_domain) {if (channel >= channel_table[i].min && channel <= channel_table[i].max)
@@ -1437,7 +1437,7 @@ static int atmel_proc_output (char *buf, } r ="<unknown>" ; -for (i =0 ; i <sizeof (channel_table)/sizeof (channel_table[0 ]); i++) +for (i =0 ; i <ARRAY_SIZE (channel_table); i++)if (priv->reg_domain == channel_table[i].reg_domain) r = channel_table[i].name;
@@ -1736,7 +1736,7 @@ static int atmel_set_encode(struct net_d/* Disable the key */ priv->wep_key_len[index] =0 ;/* Check if the key is not marked as invalid */ -if (!(dwrq->flags &IW_ENCODE_NOKEY )) { +if (!(dwrq->flags &IW_ENCODE_NOKEY )) {/* Cleanup */ memset (priv->wep_keys[index],0 ,13 );/* Copy the key in the driver */
@@ -1907,7 +1907,7 @@ static int atmel_get_encodeext(struct ne encoding->flags = idx +1 ;memset (ext,0 ,sizeof (*ext)); - +if (!priv->wep_is_on) { ext->alg =IW_ENCODE_ALG_NONE ; ext->key_len =0 ;
@@ -2343,6 +2343,14 @@ static int atmel_get_scan(struct net_dev iwe.u.freq.e =0 ; current_ev =iwe_stream_add_event (current_ev, extra +IW_SCAN_MAX_DATA , &iwe,IW_EV_FREQ_LEN ); +/* Add quality statistics */ + iwe.cmd =IWEVQUAL ; + iwe.u.qual.level = priv->BSSinfo[i].RSSI; + iwe.u.qual.qual = iwe.u.qual.level; +/* iwe.u.qual.noise = SOMETHING */ + current_ev =iwe_stream_add_event (current_ev, extra +IW_SCAN_MAX_DATA , &iwe,IW_EV_QUAL_LEN ); + + iwe.cmd =SIOCGIWENCODE ;if (priv->BSSinfo[i].UsingWEP) iwe.u.data.flags =IW_ENCODE_ENABLED |IW_ENCODE_NOKEY ;
@@ -2373,7 +2381,7 @@ static int atmel_get_range(struct net_de range->min_nwid =0x0000 ; range->max_nwid =0x0000 ; range->num_channels =0 ; -for (j =0 ; j <sizeof (channel_table)/sizeof (channel_table[0 ]); j++) +for (j =0 ; j <ARRAY_SIZE (channel_table); j++)if (priv->reg_domain == channel_table[j].reg_domain) { range->num_channels = channel_table[j].max - channel_table[j].min +1 ;break ;
@@ -2579,9 +2587,9 @@ static const struct iw_priv_args atmel_pstatic const struct iw_handler_def atmel_handler_def = { - .num_standard =sizeof (atmel_handler)/sizeof (iw_handler), - .num_private =sizeof (atmel_private_handler)/sizeof (iw_handler), - .num_private_args =sizeof (atmel_private_args)/sizeof (struct iw_priv_args ), + .num_standard =ARRAY_SIZE (atmel_handler), + .num_private =ARRAY_SIZE (atmel_private_handler), + .num_private_args =ARRAY_SIZE (atmel_private_args), .standard = (iw_handler *) atmel_handler, .private = (iw_handler *) atmel_private_handler, .private_args = (struct iw_priv_args *) atmel_private_args,
@@ -2645,7 +2653,7 @@ static int atmel_ioctl(struct net_device domain[REGDOMAINSZ ] =0 ; rc = -EINVAL ; -for (i =0 ; i <sizeof (channel_table)/sizeof (channel_table[0 ]); i++) { +for (i =0 ; i <ARRAY_SIZE (channel_table); i++) {/* strcasecmp doesn't exist in the library */ char *a = channel_table[i].name;char *b = domain;
drivers/net/wireless/atmel_cs.c +37 -37
215 lines not on this page · raw message
drivers/net/wireless/atmel_pci.c +5 -5
@@ -53,18 +53,18 @@ static int __devinit atmel_pci_probe(str const struct pci_device_id *pent) {struct net_device *dev; - +if (pci_enable_device (pdev))return -ENODEV ; - +pci_set_master (pdev); - - dev =init_atmel_card (pdev->irq, pdev->resource[1 ].start, + + dev =init_atmel_card (pdev->irq, pdev->resource[1 ].start,ATMEL_FW_TYPE_506 , &pdev->dev,NULL ,NULL );if (!dev)return -ENODEV ; - +pci_set_drvdata (pdev, dev);return 0 ; }
drivers/net/wireless/bcm43xx/bcm43xx.h +32 -0
@@ -159,6 +159,7 @@ #define BCM43xx_MACFILTER_ASSOC 0x0003/* Chipcommon registers. */ #define BCM43xx_CHIPCOMMON_CAPABILITIES 0x04 +#define BCM43xx_CHIPCOMMON_CTL 0x28#define BCM43xx_CHIPCOMMON_PLLONDELAY 0xB0#define BCM43xx_CHIPCOMMON_FREFSELDELAY 0xB4#define BCM43xx_CHIPCOMMON_SLOWCLKCTL 0xB8
@@ -172,6 +173,33 @@ #define BCM43xx_PCICORE_SBTOPCI2 0x108/* SBTOPCI2 values. */ #define BCM43xx_SBTOPCI2_PREFETCH 0x4#define BCM43xx_SBTOPCI2_BURST 0x8 +#define BCM43xx_SBTOPCI2_MEMREAD_MULTI 0x20 + +/* PCI-E core registers. */ +#define BCM43xx_PCIECORE_REG_ADDR 0x0130 +#define BCM43xx_PCIECORE_REG_DATA 0x0134 +#define BCM43xx_PCIECORE_MDIO_CTL 0x0128 +#define BCM43xx_PCIECORE_MDIO_DATA 0x012C + +/* PCI-E registers. */ +#define BCM43xx_PCIE_TLP_WORKAROUND 0x0004 +#define BCM43xx_PCIE_DLLP_LINKCTL 0x0100 + +/* PCI-E MDIO bits. */ +#define BCM43xx_PCIE_MDIO_ST 0x40000000 +#define BCM43xx_PCIE_MDIO_WT 0x10000000 +#define BCM43xx_PCIE_MDIO_DEV 22 +#define BCM43xx_PCIE_MDIO_REG 18 +#define BCM43xx_PCIE_MDIO_TA 0x00020000 +#define BCM43xx_PCIE_MDIO_TC 0x0100 + +/* MDIO devices. */ +#define BCM43xx_MDIO_SERDES_RX 0x1F + +/* SERDES RX registers. */ +#define BCM43xx_SERDES_RXTIMER 0x2 +#define BCM43xx_SERDES_CDR 0x6 +#define BCM43xx_SERDES_CDR_BW 0x7/* Chipcommon capabilities. */ #define BCM43xx_CAPABILITIES_PCTL 0x00040000
@@ -221,6 +249,7 @@ #define BCM43xx_COREID_USB11_DEV#define BCM43xx_COREID_USB20_HOST 0x819#define BCM43xx_COREID_USB20_DEV 0x81a#define BCM43xx_COREID_SDIO_HOST 0x81b +#define BCM43xx_COREID_PCIE 0x820/* Core Information Registers */ #define BCM43xx_CIR_BASE 0xf00
@@ -365,6 +394,9 @@ #define BCM43xx_DEFAULT_RTS_THRESHOLD B#define BCM43xx_DEFAULT_SHORT_RETRY_LIMIT 7#define BCM43xx_DEFAULT_LONG_RETRY_LIMIT 4 +/* FIXME: the next line is a guess as to what the maximum RSSI value might be */ +#define RX_RSSI_MAX 60 +/* Max size of a security key */ #define BCM43xx_SEC_KEYSIZE 16/* Security algorithms. */
drivers/net/wireless/bcm43xx/bcm43xx_main.c +108 -37
219 lines not on this page · raw message
drivers/net/wireless/bcm43xx/bcm43xx_power.c +21 -7
@@ -153,8 +153,6 @@ int bcm43xx_pctl_init(struct bcm43xx_priint err, maxfreq;struct bcm43xx_coreinfo *old_core; -if (!(bcm->chipcommon_capabilities & BCM43xx_CAPABILITIES_PCTL)) -return 0 ; old_core = bcm->current_core; err =bcm43xx_switch_core (bcm, &bcm->core_chipcommon);if (err == -ENODEV )
@@ -162,11 +160,27 @@ int bcm43xx_pctl_init(struct bcm43xx_priif (err) goto out; - maxfreq =bcm43xx_pctl_clockfreqlimit (bcm,1 ); -bcm43xx_write32 (bcm, BCM43xx_CHIPCOMMON_PLLONDELAY, - (maxfreq *150 +999999 ) /1000000 ); -bcm43xx_write32 (bcm, BCM43xx_CHIPCOMMON_FREFSELDELAY, - (maxfreq *15 +999999 ) /1000000 ); +if (bcm->chip_id ==0x4321 ) { +if (bcm->chip_rev ==0 ) +bcm43xx_write32 (bcm, BCM43xx_CHIPCOMMON_CTL,0x03A4 ); +if (bcm->chip_rev ==1 ) +bcm43xx_write32 (bcm, BCM43xx_CHIPCOMMON_CTL,0x00A4 ); + } + +if (bcm->chipcommon_capabilities & BCM43xx_CAPABILITIES_PCTL) { +if (bcm->current_core->rev >=10 ) { +/* Set Idle Power clock rate to 1Mhz */ +bcm43xx_write32 (bcm, BCM43xx_CHIPCOMMON_SYSCLKCTL, + (bcm43xx_read32 (bcm, BCM43xx_CHIPCOMMON_SYSCLKCTL) + &0x0000FFFF ) |0x40000 ); + }else { + maxfreq =bcm43xx_pctl_clockfreqlimit (bcm,1 ); +bcm43xx_write32 (bcm, BCM43xx_CHIPCOMMON_PLLONDELAY, + (maxfreq *150 +999999 ) /1000000 ); +bcm43xx_write32 (bcm, BCM43xx_CHIPCOMMON_FREFSELDELAY, + (maxfreq *15 +999999 ) /1000000 ); + } + } err =bcm43xx_switch_core (bcm, old_core);assert (err ==0 );
drivers/net/wireless/bcm43xx/bcm43xx_wx.c +1 -3
@@ -47,9 +47,6 @@ #include "bcm43xx_phy.h"#define BCM43xx_WX_VERSION 18#define MAX_WX_STRING 80 -/* FIXME: the next line is a guess as to what the maximum RSSI value might be */ -#define RX_RSSI_MAX 60 - static int bcm43xx_wx_get_name(struct net_device *net_dev, struct iw_request_info *info,
@@ -693,6 +690,7 @@ static int bcm43xx_wx_set_swencryption(s bcm->ieee->host_encrypt = !!on; bcm->ieee->host_decrypt = !!on; bcm->ieee->host_build_iv = !on; + bcm->ieee->host_strip_iv_icv = !on;spin_unlock_irqrestore (&bcm->irq_lock, flags);mutex_unlock (&bcm->mutex);
drivers/net/wireless/bcm43xx/bcm43xx_xmit.c +0 -19
@@ -543,25 +543,6 @@ int bcm43xx_rx(struct bcm43xx_private *bbreak ; } - frame_ctl =le16_to_cpu (wlhdr->frame_ctl); -if ((frame_ctl &IEEE80211_FCTL_PROTECTED ) && !bcm->ieee->host_decrypt) { - frame_ctl &= ~IEEE80211_FCTL_PROTECTED ; - wlhdr->frame_ctl =cpu_to_le16 (frame_ctl); -/* trim IV and ICV */ -/* FIXME: this must be done only for WEP encrypted packets */ -if (skb->len <32 ) { - dprintkl(KERN_ERR PFX "RX packet dropped (PROTECTED flag " - "set and length < 32)\n"); -return -EINVAL ; - }else { -memmove (skb->data +4 , skb->data,24 ); -skb_pull (skb,4 ); -skb_trim (skb, skb->len -4 ); - stats.len -=8 ; - } - wlhdr = (struct ieee80211_hdr_4addr *)(skb->data); - } -switch (WLAN_FC_GET_TYPE (frame_ctl)) {case IEEE80211_FTYPE_MGMT :ieee80211_rx_mgt (bcm->ieee, wlhdr, &stats);
drivers/net/wireless/prism54/isl_38xx.c +8 -9
@@ -1,5 +1,4 @@/* -* * Copyright (C) 2002 Intersil Americas Inc. * Copyright (C) 2003-2004 Luis R. Rodriguez <[email protected]>_ *
@@ -38,7 +37,7 @@ #include "islpci_mgt.h"* isl38xx_disable_interrupts - disable all interrupts * @device: pci memory base address * -* Instructs the device to disable all interrupt reporting by asserting +* Instructs the device to disable all interrupt reporting by asserting * the IRQ line. New events may still show up in the interrupt identification * register located at offset %ISL38XX_INT_IDENT_REG. */
@@ -204,17 +203,19 @@ #endif/* enable the interrupt for detecting initialization */ /* Note: Do not enable other interrupts here. We want the -* device to have come up first 100% before allowing any other +* device to have come up first 100% before allowing any other * interrupts. */ isl38xx_w32_flush (device_base,ISL38XX_INT_IDENT_INIT ,ISL38XX_INT_EN_REG );udelay (ISL38XX_WRITEIO_DELAY );/* allow complete full reset */ }void -isl38xx_enable_common_interrupts (void __iomem *device_base) { +isl38xx_enable_common_interrupts (void __iomem *device_base) +{u32 reg; - reg = (ISL38XX_INT_IDENT_UPDATE | -ISL38XX_INT_IDENT_SLEEP |ISL38XX_INT_IDENT_WAKEUP ); + + reg =ISL38XX_INT_IDENT_UPDATE |ISL38XX_INT_IDENT_SLEEP | +ISL38XX_INT_IDENT_WAKEUP ;isl38xx_w32_flush (device_base, reg,ISL38XX_INT_EN_REG );udelay (ISL38XX_WRITEIO_DELAY ); }
@@ -234,23 +235,21 @@ isl38xx_in_queue(isl38xx_control_block */* send queues */ case ISL38XX_CB_TX_MGMTQ :BUG_ON (delta >ISL38XX_CB_MGMT_QSIZE ); +case ISL38XX_CB_TX_DATA_LQ :case ISL38XX_CB_TX_DATA_HQ :BUG_ON (delta >ISL38XX_CB_TX_QSIZE );return delta; -break ;/* receive queues */ case ISL38XX_CB_RX_MGMTQ :BUG_ON (delta >ISL38XX_CB_MGMT_QSIZE );return ISL38XX_CB_MGMT_QSIZE - delta; -break ;case ISL38XX_CB_RX_DATA_LQ :case ISL38XX_CB_RX_DATA_HQ :BUG_ON (delta >ISL38XX_CB_RX_QSIZE );return ISL38XX_CB_RX_QSIZE - delta; -break ; }BUG ();return 0 ;
drivers/net/wireless/prism54/isl_38xx.h +3 -4
@@ -1,5 +1,4 @@/* -* * Copyright (C) 2002 Intersil Americas Inc. * * This program is free software; you can redistribute it and/or modify
@@ -67,10 +66,10 @@ #define ISL38XX_PCI_POSTING_FLUSH ISL38* @base: (host) memory base address of the device * @val: 32bit value (host order) to write * @offset: byte offset into @base to write value to -* +* * This helper takes care of writing a 32bit datum to the -* specified offset into the device's pci memory space, and making sure -* the pci memory buffers get flushed by performing one harmless read +* specified offset into the device's pci memory space, and making sure +* the pci memory buffers get flushed by performing one harmless read * from the %ISL38XX_PCI_POSTING_FLUSH offset. */ static inline void
drivers/net/wireless/prism54/isl_ioctl.c +30 -31
209 lines not on this page · raw message
drivers/net/wireless/prism54/isl_ioctl.h +0 -1
@@ -1,5 +1,4 @@/* -* * Copyright (C) 2002 Intersil Americas Inc. * (C) 2003 Aurelien Alleaume <[email protected]> * (C) 2003 Luis R. Rodriguez <[email protected]>
drivers/net/wireless/prism54/isl_oid.h +23 -25
120 lines not on this page · raw message
drivers/net/wireless/prism54/islpci_dev.c +6 -7
@@ -1,5 +1,4 @@/* -* * Copyright (C) 2002 Intersil Americas Inc. * Copyright (C) 2003 Herbert Valerio Riedel <[email protected]> * Copyright (C) 2003 Luis R. Rodriguez <[email protected]>
@@ -413,7 +412,7 @@ prism54_bring_down(islpci_private *priv)islpci_set_state (priv,PRV_STATE_PREBOOT );/* disable all device interrupts in case they weren't */ -isl38xx_disable_interrupts (priv->device_base); +isl38xx_disable_interrupts (priv->device_base);/* For safety reasons, we may want to ensure that no DMA transfer is * currently in progress by emptying the TX and RX queues. */
@@ -480,7 +479,7 @@ islpci_reset_if(islpci_private *priv)DEFINE_WAIT (wait);prepare_to_wait (&priv->reset_done, &wait,TASK_UNINTERRUPTIBLE ); - +/* now the last step is to reset the interface */ isl38xx_interface_reset (priv->device_base, priv->device_host_address);islpci_set_state (priv,PRV_STATE_PREINIT );
@@ -488,7 +487,7 @@ islpci_reset_if(islpci_private *priv)for (count =0 ; count <2 && result; count++) {/* The software reset acknowledge needs about 220 msec here. * Be conservative and wait for up to one second. */ - + remaining =schedule_timeout_uninterruptible (HZ );if (remaining >0 ) {
@@ -496,7 +495,7 @@ islpci_reset_if(islpci_private *priv)break ; } -/* If we're here it's because our IRQ hasn't yet gone through. +/* If we're here it's because our IRQ hasn't yet gone through. * Retry a bit more... */ printk(KERN_ERR "%s: no 'reset complete' IRQ seen - retrying\n",
@@ -514,7 +513,7 @@ islpci_reset_if(islpci_private *priv)/* Now that the device is 100% up, let's allow * for the other interrupts -- -* NOTE: this is not *yet* true since we've only allowed the +* NOTE: this is not *yet* true since we've only allowed the * INIT interrupt on the IRQ line. We can perhaps poll * the IRQ line until we know for sure the reset went through */ isl38xx_enable_common_interrupts (priv->device_base);
@@ -716,7 +715,7 @@ #endifprism54_acl_init (&priv->acl);prism54_wpa_bss_ie_init (priv); -if (mgt_init (priv)) +if (mgt_init (priv)) goto out_free;return 0 ;
drivers/net/wireless/prism54/islpci_dev.h +5 -6
@@ -1,6 +1,5 @@/* -* -* Copyright (C) 2002 Intersil Americas Inc. +* Copyright (C) 2002 Intersil Americas Inc. * Copyright (C) 2003 Herbert Valerio Riedel <[email protected]> * Copyright (C) 2003 Luis R. Rodriguez <[email protected]> * Copyright (C) 2003 Aurelien Alleaume <[email protected]>
@@ -72,12 +71,12 @@ struct islpci_bss_wpa_ie {u8 bssid[ETH_ALEN ];u8 wpa_ie[MAX_WPA_IE_LEN ];size_t wpa_ie_len; - + }; typedef struct { spinlock_t slock; /* generic spinlock; */ - + u32 priv_oid; /* our mib cache */
@@ -85,7 +84,7 @@ typedef struct {struct rw_semaphore mib_sem;void **mib;char nickname[IW_ESSID_MAX_SIZE +1 ]; - +/* Take care of the wireless stats */ struct work_struct stats_work;struct semaphore stats_sem;
@@ -120,7 +119,7 @@ typedef struct {struct net_device *ndev;/* device queue interface members */ -struct isl38xx_cb *control_block;/* device control block +struct isl38xx_cb *control_block;/* device control block (== driver_mem_address!) */ /* Each queue has three indexes:
drivers/net/wireless/prism54/islpci_eth.c +16 -14
@@ -1,5 +1,4 @@/* -* * Copyright (C) 2002 Intersil Americas Inc. * Copyright (C) 2004 Aurelien Alleaume <[email protected]> * This program is free software; you can redistribute it and/or modify
@@ -48,7 +47,7 @@ islpci_eth_cleanup_transmit(islpci_priva/* read the index of the first fragment to be freed */ index = priv->free_data_tx %ISL38XX_CB_TX_QSIZE ; -/* check for holes in the arrays caused by multi fragment frames +/* check for holes in the arrays caused by multi fragment frames * searching for the last fragment of a frame */ if (priv->pci_map_tx_address[index] != (dma_addr_t )NULL ) {/* entry is the last fragment of a frame
@@ -253,6 +252,7 @@ islpci_monitor_rx(islpci_private *priv,* header and without the FCS. But there a is a bit that * indicates if the packet is corrupted :-) */ struct rfmon_header *hdr = (struct rfmon_header *) (*skb)->data; +if (hdr->flags &0x01 )/* This one is bad. Drop it ! */ return -1 ;
@@ -284,7 +284,7 @@ islpci_monitor_rx(islpci_private *priv, (struct avs_80211_1_header *)skb_push (*skb,sizeof (struct avs_80211_1_header )); - + avs->version =cpu_to_be32 (P80211CAPTURE_VERSION ); avs->length =cpu_to_be32 (sizeof (struct avs_80211_1_header )); avs->mactime =cpu_to_be64 (le64_to_cpu (clock));
@@ -390,7 +390,7 @@ #endifstruct rx_annex_header *annex = (struct rx_annex_header *) skb->data; wstats.level = annex->rfmon.rssi; -/* The noise value can be a bit outdated if nobody's +/* The noise value can be a bit outdated if nobody's * reading wireless stats... */ wstats.noise = priv->local_iwstatistics.qual.noise; wstats.qual = wstats.level - wstats.noise;
@@ -464,10 +464,8 @@ #endifbreak ; }/* update the fragment address */ - control_block->rx_data_low[index].address =cpu_to_le32 ((u32 ) - priv-> - pci_map_rx_address - [index]); + control_block->rx_data_low[index].address = +cpu_to_le32 ((u32 )priv->pci_map_rx_address[index]);wmb ();/* increment the driver read pointer */
@@ -484,10 +482,12 @@ #endifvoid islpci_do_reset_and_wake (void *data) { -islpci_private *priv = (islpci_private *) data; +islpci_private *priv = data; +islpci_reset (priv,1 ); -netif_wake_queue (priv->ndev); priv->reset_task_pending =0 ; +smp_wmb (); +netif_wake_queue (priv->ndev); }void
@@ -499,12 +499,14 @@ islpci_eth_tx_timeout(struct net_device/* increment the transmit error counter */ statistics->tx_errors++; -printk (KERN_WARNING "%s: tx_timeout" , ndev->name);if (!priv->reset_task_pending) { - priv->reset_task_pending =1 ; -printk (", scheduling a reset" ); +printk (KERN_WARNING +"%s: tx_timeout, scheduling reset" , ndev->name);netif_stop_queue (ndev); + priv->reset_task_pending =1 ;schedule_work (&priv->reset_task); + }else { +printk (KERN_WARNING +"%s: tx_timeout, waiting for reset" , ndev->name); } -printk ("\n" ); }
drivers/net/wireless/prism54/islpci_eth.h +0 -1
@@ -1,5 +1,4 @@/* -* * Copyright (C) 2002 Intersil Americas Inc. * * This program is free software; you can redistribute it and/or modify
drivers/net/wireless/prism54/islpci_hotplug.c +11 -12
@@ -1,5 +1,4 @@/* -* * Copyright (C) 2002 Intersil Americas Inc. * Copyright (C) 2003 Herbert Valerio Riedel <[email protected]> *
@@ -40,8 +39,8 @@ static int init_pcitm = 0;module_param (init_pcitm, int,0 );/* In this order: vendor, device, subvendor, subdevice, class, class_mask, -* driver_data -* If you have an update for this please contact [email protected] +* driver_data +* If you have an update for this please contact [email protected] * The latest list can be found at http://prism54.org/supported_cards.php */ static const struct pci_device_id prism54_id_tbl[] = {/* Intersil PRISM Duette/Prism GT Wireless LAN adapter */
@@ -132,15 +131,15 @@ #endif/* 0x40 is the programmable timer to configure the response timeout (TRDY_TIMEOUT) * 0x41 is the programmable timer to configure the retry timeout (RETRY_TIMEOUT) -* The RETRY_TIMEOUT is used to set the number of retries that the core, as a -* Master, will perform before abandoning a cycle. The default value for -* RETRY_TIMEOUT is 0x80, which far exceeds the PCI 2.1 requirement for new -* devices. A write of zero to the RETRY_TIMEOUT register disables this -* function to allow use with any non-compliant legacy devices that may -* execute more retries. +* The RETRY_TIMEOUT is used to set the number of retries that the core, as a +* Master, will perform before abandoning a cycle. The default value for +* RETRY_TIMEOUT is 0x80, which far exceeds the PCI 2.1 requirement for new +* devices. A write of zero to the RETRY_TIMEOUT register disables this +* function to allow use with any non-compliant legacy devices that may +* execute more retries. * -* Writing zero to both these two registers will disable both timeouts and -* *can* solve problems caused by devices that are slow to respond. +* Writing zero to both these two registers will disable both timeouts and +* *can* solve problems caused by devices that are slow to respond. * Make this configurable - MSW */ if ( init_pcitm >=0 ) {
@@ -241,7 +240,7 @@ prism54_remove(struct pci_dev *pdev)isl38xx_disable_interrupts (priv->device_base);islpci_set_state (priv,PRV_STATE_OFF );/* This bellow causes a lockup at rmmod time. It might be -* because some interrupts still linger after rmmod time, +* because some interrupts still linger after rmmod time, * see bug #17 */ /* pci_set_power_state(pdev, 3);*/ /* try to power-off */ }
drivers/net/wireless/prism54/islpci_mgt.c +1 -2
@@ -1,5 +1,4 @@/* -* * Copyright (C) 2002 Intersil Americas Inc. * Copyright 2004 Jens Maurer <[email protected]> *
@@ -502,7 +501,7 @@ islpci_mgt_transaction(struct net_deviceprintk (KERN_WARNING "%s: timeout waiting for mgmt response\n" , ndev->name); -/* TODO: we should reset the device here */ +/* TODO: we should reset the device here */ out:finish_wait (&priv->mgmt_wqueue, &wait);up (&priv->mgmt_sem);
drivers/net/wireless/prism54/islpci_mgt.h +2 -3
@@ -1,5 +1,4 @@/* -* * Copyright (C) 2002 Intersil Americas Inc. * Copyright (C) 2003 Luis R. Rodriguez <[email protected]> *
@@ -36,8 +35,8 @@ #define init_wds 0 /* help compiler opti/* General driver definitions */ -#define PCIDEVICE_LATENCY_TIMER_MIN 0x40 -#define PCIDEVICE_LATENCY_TIMER_VAL 0x50 +#define PCIDEVICE_LATENCY_TIMER_MIN 0x40 +#define PCIDEVICE_LATENCY_TIMER_VAL 0x50/* Debugging verbose definitions */ #define SHOW_NOTHING 0x00/* overrules everything */
drivers/net/wireless/prism54/oid_mgt.c +3 -3
@@ -1,4 +1,4 @@ -/* +/* * Copyright (C) 2003,2004 Aurelien Alleaume <[email protected]> * * This program is free software; you can redistribute it and/or modify
@@ -503,7 +503,7 @@ mgt_set_varlen(islpci_private *priv, enu }if (ret || response_op ==PIMFOR_OP_ERROR ) ret = -EIO ; - }else + }else ret = -EIO ;/* re-set given data to what it was */
@@ -727,7 +727,7 @@ mgt_commit(islpci_private *priv)* MEDIUMLIMIT,BEACONPERIOD,DTIMPERIOD,ATIMWINDOW,LISTENINTERVAL * FREQUENCY,EXTENDEDRATES. * -* The way to do this is to set ESSID. Note though that they may get +* The way to do this is to set ESSID. Note though that they may get * unlatch before though by setting another OID. */ #if 0 void
drivers/net/wireless/prism54/prismcompat.h +2 -2
@@ -1,4 +1,4 @@ -/* +/* * (C) 2004 Margit Schubert-While <[email protected]> * * This program is free software; you can redistribute it and/or modify
@@ -16,7 +16,7 @@* */ -/* +/* * Compatibility header file to aid support of different kernel versions */
drivers/net/wireless/zd1211rw/zd_usb.c +3 -0
@@ -47,6 +47,9 @@ static struct usb_device_id usb_ids[] = { USB_DEVICE(0x0586, 0x3402), .driver_info = DEVICE_ZD1211 }, { USB_DEVICE(0x0b3b, 0x5630), .driver_info = DEVICE_ZD1211 }, { USB_DEVICE(0x0b05, 0x170c), .driver_info = DEVICE_ZD1211 }, + { USB_DEVICE(0x1435, 0x0711), .driver_info = DEVICE_ZD1211 }, + { USB_DEVICE(0x0586, 0x3409), .driver_info = DEVICE_ZD1211 }, + { USB_DEVICE(0x0b3b, 0x1630), .driver_info = DEVICE_ZD1211 }, /* ZD1211B */ { USB_DEVICE(0x0ace, 0x1215), .driver_info = DEVICE_ZD1211B }, { USB_DEVICE(0x157e, 0x300d), .driver_info = DEVICE_ZD1211B },
include/net/ieee80211.h +6 -0
@@ -1037,6 +1037,10 @@ struct ieee80211_device {/* host performs multicast decryption */ int host_mc_decrypt; +/* host should strip IV and ICV from protected frames */ +/* meaningful only when hardware decryption is being used */ +int host_strip_iv_icv; +int host_open_frag;int host_build_iv;int ieee802_1x;/* is IEEE 802.1X used */
@@ -1076,6 +1080,8 @@ struct ieee80211_device {int perfect_rssi;int worst_rssi; +u16 prev_seq_ctl;/* used to drop duplicate frames */ +/* Callback functions */ void (*set_security) (struct net_device * dev,struct ieee80211_security * sec);
net/ieee80211/ieee80211_module.c +9 -0
@@ -118,6 +118,14 @@ static void ieee80211_networks_initializ &ieee->network_free_list); } +static int ieee80211_change_mtu (struct net_device *dev,int new_mtu) +{ +if ((new_mtu <68 ) || (new_mtu >IEEE80211_DATA_LEN )) +return -EINVAL ; + dev->mtu = new_mtu; +return 0 ; +} +struct net_device *alloc_ieee80211 (int sizeof_priv) {struct ieee80211_device *ieee;
@@ -133,6 +141,7 @@ struct net_device *alloc_ieee80211(int s } ieee =netdev_priv (dev); dev->hard_start_xmit = ieee80211_xmit; + dev->change_mtu = ieee80211_change_mtu; ieee->dev = dev;
net/ieee80211/ieee80211_rx.c +55 -6
84 lines not on this page · raw message
Signature · 2 lines
John W. Linville [email protected]
Re: Please pull 'upstream' branch of wireless-2.6
Quoted 29 lines · John W. Linville
The following changes since commit
41072a1be57f63bf83afc31c44d72de018d800fa:
John W. Linville:
zd1211rw: fix build-break caused by association race fixare found in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.gitupstreamAlexey Dobriyan:
prism54: useBUILD_BUG_ONDaniel Drake:
zd1211rw: Add 3 more device IDs
ieee80211: Move IV/ICV stripping intoieee80211_rxDmitry Torokhov:
atmel: save on array initialization
atmel: useARRAY_SIZE()
atmel: whitespace cleanup
prism54: fix potential race in reset scheduling
prism54: whitespace cleanupHolden Karau:
atmel: output signal strength informationLarry Finger:
bcm43xx: output proper link quality with scans
ieee80211: Drop and count duplicate data frames to remove 'replay detected' log messages
Quoted 5 lines
matthieu castet:
ieee80211: allow mtu bigger than 1500Stefano Brivio:
bcm43xx: add PCI-E code
pulled
Quoted 28 lines · John W. Linville
The following changes since commit
51018b0a3160d253283173c2f54f16746cee5852:
Ulrich Drepper:make UML compile (FC6/x86-64)are found in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.gitupstream-fixesDave Kleikamp:
airo: check if need to freezeEric Sesterhenn:
zd1201: Possible NULL dereferenceFlorin Malita:
airo.c: check returned valuesJean Tourrilhes:
orinoco: fix WE-21 buffer overflow
wireless: More WE-21 potential overflows...John W. Linville:
zd1211rw: fix build-break caused by association race fixLarry Finger:
bcm43xx-softmac: check returned value frompci_enable_device
bcm43xx-softmac: Fix system hang for x86-64 with >1GB RAM
Quoted 6 lines
Laurent Riffard:
sotftmac: fix a slab corruption in WEP restricted key associationMichael Buesch:
bcm43xx: fix race condition in periodic work handler
softmac: Fix WX and association related races
pulled