···649649650650/* Context information for a noise calculation (Link Quality). */651651struct b43_noise_calculation {652652- u8 channel_at_start;653652 bool calculation_running;654653 u8 nr_samples;655654 s8 samples[8][4];
+46-47
drivers/net/wireless/b43/dma.c
···795795{796796 struct b43_dmaring *ring;797797 int err;798798- int nr_slots;799798 dma_addr_t dma_test;800799801800 ring = kzalloc(sizeof(*ring), GFP_KERNEL);802801 if (!ring)803802 goto out;804804- ring->type = type;805803806806- nr_slots = B43_RXRING_SLOTS;804804+ ring->nr_slots = B43_RXRING_SLOTS;807805 if (for_tx)808808- nr_slots = B43_TXRING_SLOTS;806806+ ring->nr_slots = B43_TXRING_SLOTS;809807810810- ring->meta = kcalloc(nr_slots, sizeof(struct b43_dmadesc_meta),808808+ ring->meta = kcalloc(ring->nr_slots, sizeof(struct b43_dmadesc_meta),811809 GFP_KERNEL);812810 if (!ring->meta)813811 goto err_kfree_ring;814814- if (for_tx) {815815- ring->txhdr_cache = kcalloc(nr_slots,816816- b43_txhdr_size(dev),817817- GFP_KERNEL);818818- if (!ring->txhdr_cache)819819- goto err_kfree_meta;820812821821- /* test for ability to dma to txhdr_cache */822822- dma_test = dma_map_single(dev->dev->dma_dev,823823- ring->txhdr_cache,824824- b43_txhdr_size(dev),825825- DMA_TO_DEVICE);826826-827827- if (b43_dma_mapping_error(ring, dma_test,828828- b43_txhdr_size(dev), 1)) {829829- /* ugh realloc */830830- kfree(ring->txhdr_cache);831831- ring->txhdr_cache = kcalloc(nr_slots,832832- b43_txhdr_size(dev),833833- GFP_KERNEL | GFP_DMA);834834- if (!ring->txhdr_cache)835835- goto err_kfree_meta;836836-837837- dma_test = dma_map_single(dev->dev->dma_dev,838838- ring->txhdr_cache,839839- b43_txhdr_size(dev),840840- DMA_TO_DEVICE);841841-842842- if (b43_dma_mapping_error(ring, dma_test,843843- b43_txhdr_size(dev), 1)) {844844-845845- b43err(dev->wl,846846- "TXHDR DMA allocation failed\n");847847- goto err_kfree_txhdr_cache;848848- }849849- }850850-851851- dma_unmap_single(dev->dev->dma_dev,852852- dma_test, b43_txhdr_size(dev),853853- DMA_TO_DEVICE);854854- }855855-813813+ ring->type = type;856814 ring->dev = dev;857857- ring->nr_slots = nr_slots;858815 ring->mmio_base = b43_dmacontroller_base(type, controller_index);859816 ring->index = controller_index;860817 if (type == B43_DMA_64BIT)···835878#ifdef CONFIG_B43_DEBUG836879 ring->last_injected_overflow = jiffies;837880#endif881881+882882+ if (for_tx) {883883+ ring->txhdr_cache = kcalloc(ring->nr_slots,884884+ b43_txhdr_size(dev),885885+ GFP_KERNEL);886886+ if (!ring->txhdr_cache)887887+ goto err_kfree_meta;888888+889889+ /* test for ability to dma to txhdr_cache */890890+ dma_test = dma_map_single(dev->dev->dma_dev,891891+ ring->txhdr_cache,892892+ b43_txhdr_size(dev),893893+ DMA_TO_DEVICE);894894+895895+ if (b43_dma_mapping_error(ring, dma_test,896896+ b43_txhdr_size(dev), 1)) {897897+ /* ugh realloc */898898+ kfree(ring->txhdr_cache);899899+ ring->txhdr_cache = kcalloc(ring->nr_slots,900900+ b43_txhdr_size(dev),901901+ GFP_KERNEL | GFP_DMA);902902+ if (!ring->txhdr_cache)903903+ goto err_kfree_meta;904904+905905+ dma_test = dma_map_single(dev->dev->dma_dev,906906+ ring->txhdr_cache,907907+ b43_txhdr_size(dev),908908+ DMA_TO_DEVICE);909909+910910+ if (b43_dma_mapping_error(ring, dma_test,911911+ b43_txhdr_size(dev), 1)) {912912+913913+ b43err(dev->wl,914914+ "TXHDR DMA allocation failed\n");915915+ goto err_kfree_txhdr_cache;916916+ }917917+ }918918+919919+ dma_unmap_single(dev->dev->dma_dev,920920+ dma_test, b43_txhdr_size(dev),921921+ DMA_TO_DEVICE);922922+ }838923839924 err = alloc_ringmemory(ring);840925 if (err)
+10-6
drivers/net/wireless/b43/main.c
···11451145 b43_jssi_write(dev, 0x7F7F7F7F);11461146 b43_write32(dev, B43_MMIO_MACCMD,11471147 b43_read32(dev, B43_MMIO_MACCMD) | B43_MACCMD_BGNOISE);11481148- B43_WARN_ON(dev->noisecalc.channel_at_start != dev->phy.channel);11491148}1150114911511150static void b43_calculate_link_quality(struct b43_wldev *dev)···1153115411541155 if (dev->noisecalc.calculation_running)11551156 return;11561156- dev->noisecalc.channel_at_start = dev->phy.channel;11571157 dev->noisecalc.calculation_running = 1;11581158 dev->noisecalc.nr_samples = 0;11591159···1169117111701172 /* Bottom half of Link Quality calculation. */1171117311741174+ /* Possible race condition: It might be possible that the user11751175+ * changed to a different channel in the meantime since we11761176+ * started the calculation. We ignore that fact, since it's11771177+ * not really that much of a problem. The background noise is11781178+ * an estimation only anyway. Slightly wrong results will get damped11791179+ * by the averaging of the 8 sample rounds. Additionally the11801180+ * value is shortlived. So it will be replaced by the next noise11811181+ * calculation round soon. */11821182+11721183 B43_WARN_ON(!dev->noisecalc.calculation_running);11731173- if (dev->noisecalc.channel_at_start != phy->channel)11741174- goto drop_calculation;11751184 *((__le32 *)noise) = cpu_to_le32(b43_jssi_read(dev));11761185 if (noise[0] == 0x7F || noise[1] == 0x7F ||11771186 noise[2] == 0x7F || noise[3] == 0x7F)···12191214 average -= 48;1220121512211216 dev->stats.link_noise = average;12221222- drop_calculation:12231217 dev->noisecalc.calculation_running = 0;12241218 return;12251219 }12261226- generate_new:12201220+generate_new:12271221 b43_generate_noise_sample(dev);12281222}12291223
+10-9
drivers/net/wireless/rt2x00/Kconfig
···3636config RT2X00_LIB_RFKILL3737 boolean3838 depends on RT2X00_LIB3939+ depends on INPUT3940 select RFKILL4041 select INPUT_POLLDEV41424243config RT2X00_LIB_LEDS4344 boolean4444- depends on RT2X00_LIB4545+ depends on RT2X00_LIB && NEW_LEDS45464647config RT2400PCI4748 tristate "Ralink rt2400 (PCI/PCMCIA) support"···57565857config RT2400PCI_RFKILL5958 bool "Ralink rt2400 rfkill support"6060- depends on RT2400PCI5959+ depends on RT2400PCI && INPUT6160 select RT2X00_LIB_RFKILL6261 ---help---6362 This adds support for integrated rt2400 hardware that features a···66656766config RT2400PCI_LEDS6867 bool "Ralink rt2400 leds support"6969- depends on RT2400PCI6868+ depends on RT2400PCI && NEW_LEDS7069 select LEDS_CLASS7170 select RT2X00_LIB_LEDS7271 ---help---···85848685config RT2500PCI_RFKILL8786 bool "Ralink rt2500 rfkill support"8888- depends on RT2500PCI8787+ depends on RT2500PCI && INPUT8988 select RT2X00_LIB_RFKILL9089 ---help---9190 This adds support for integrated rt2500 hardware that features a···94939594config RT2500PCI_LEDS9695 bool "Ralink rt2500 leds support"9797- depends on RT2500PCI9696+ depends on RT2500PCI && NEW_LEDS9897 select LEDS_CLASS9998 select RT2X00_LIB_LEDS10099 ---help---···115114116115config RT61PCI_RFKILL117116 bool "Ralink rt2501/rt61 rfkill support"118118- depends on RT61PCI117117+ depends on RT61PCI && INPUT119118 select RT2X00_LIB_RFKILL120119 ---help---121120 This adds support for integrated rt61 hardware that features a···124123125124config RT61PCI_LEDS126125 bool "Ralink rt2501/rt61 leds support"127127- depends on RT61PCI126126+ depends on RT61PCI && NEW_LEDS128127 select LEDS_CLASS129128 select RT2X00_LIB_LEDS130129 ---help---···142141143142config RT2500USB_LEDS144143 bool "Ralink rt2500 leds support"145145- depends on RT2500USB144144+ depends on RT2500USB && NEW_LEDS146145 select LEDS_CLASS147146 select RT2X00_LIB_LEDS148147 ---help---···162161163162config RT73USB_LEDS164163 bool "Ralink rt2501/rt73 leds support"165165- depends on RT73USB164164+ depends on RT73USB && NEW_LEDS166165 select LEDS_CLASS167166 select RT2X00_LIB_LEDS168167 ---help---
+1-2
drivers/net/wireless/rt2x00/rt2x00pci.c
···357357 if (pci_set_mwi(pci_dev))358358 ERROR_PROBE("MWI not available.\n");359359360360- if (pci_set_dma_mask(pci_dev, DMA_64BIT_MASK) &&361361- pci_set_dma_mask(pci_dev, DMA_32BIT_MASK)) {360360+ if (pci_set_dma_mask(pci_dev, DMA_32BIT_MASK)) {362361 ERROR_PROBE("PCI DMA not supported.\n");363362 retval = -EIO;364363 goto exit_disable_device;
+4-1
drivers/net/wireless/rt2x00/rt2x00usb.c
···345345 }346346347347 /*348348- * Kill guardian urb.348348+ * Kill guardian urb (if required by driver).349349 */350350+ if (!test_bit(DRIVER_REQUIRE_BEACON_GUARD, &rt2x00dev->flags))351351+ return;352352+350353 for (i = 0; i < rt2x00dev->bcn->limit; i++) {351354 bcn_priv = rt2x00dev->bcn->entries[i].priv_data;352355 if (bcn_priv->guardian_urb)
···637637#ifdef CONFIG_MAC80211_HT_DEBUG638638 if (net_ratelimit())639639 printk(KERN_DEBUG "allocated aggregation queue"640640- " %d tid %d addr %s pool=0x%lX",640640+ " %d tid %d addr %s pool=0x%lX\n",641641 i, tid, print_mac(mac, sta->addr),642642 q->qdisc_pool[0]);643643#endif /* CONFIG_MAC80211_HT_DEBUG */
+15-8
net/sched/sch_htb.c
···2626 * and many others. thanks.2727 */2828#include <linux/module.h>2929+#include <linux/moduleparam.h>2930#include <linux/types.h>3031#include <linux/kernel.h>3132#include <linux/string.h>···5251*/53525453#define HTB_HSIZE 16 /* classid hash size */5555-#define HTB_HYSTERESIS 1 /* whether to use mode hysteresis for speedup */5454+static int htb_hysteresis __read_mostly = 0; /* whether to use mode hysteresis for speedup */5655#define HTB_VER 0x30011 /* major must be matched with number suplied by TC as version */57565857#if HTB_VER >> 16 != TC_HTB_PROTOVER5958#error "Mismatched sch_htb.c and pkt_sch.h"6059#endif6060+6161+/* Module parameter and sysfs export */6262+module_param (htb_hysteresis, int, 0640);6363+MODULE_PARM_DESC(htb_hysteresis, "Hysteresis mode, less CPU load, less accurate");61646265/* used internaly to keep status of single class */6366enum htb_cmode {···465460 htb_remove_class_from_row(q, cl, mask);466461}467462468468-#if HTB_HYSTERESIS469463static inline long htb_lowater(const struct htb_class *cl)470464{471471- return cl->cmode != HTB_CANT_SEND ? -cl->cbuffer : 0;465465+ if (htb_hysteresis)466466+ return cl->cmode != HTB_CANT_SEND ? -cl->cbuffer : 0;467467+ else468468+ return 0;472469}473470static inline long htb_hiwater(const struct htb_class *cl)474471{475475- return cl->cmode == HTB_CAN_SEND ? -cl->buffer : 0;472472+ if (htb_hysteresis)473473+ return cl->cmode == HTB_CAN_SEND ? -cl->buffer : 0;474474+ else475475+ return 0;476476}477477-#else478478-#define htb_lowater(cl) (0)479479-#define htb_hiwater(cl) (0)480480-#endif477477+481478482479/**483480 * htb_class_mode - computes and returns current class mode
+11-2
net/sctp/associola.c
···476476void sctp_assoc_set_primary(struct sctp_association *asoc,477477 struct sctp_transport *transport)478478{479479+ int changeover = 0;480480+481481+ /* it's a changeover only if we already have a primary path482482+ * that we are changing483483+ */484484+ if (asoc->peer.primary_path != NULL &&485485+ asoc->peer.primary_path != transport)486486+ changeover = 1 ;487487+479488 asoc->peer.primary_path = transport;480489481490 /* Set a default msg_name for events. */···510501 * double switch to the same destination address.511502 */512503 if (transport->cacc.changeover_active)513513- transport->cacc.cycling_changeover = 1;504504+ transport->cacc.cycling_changeover = changeover;514505515506 /* 2) The sender MUST set CHANGEOVER_ACTIVE to indicate that516507 * a changeover has occurred.517508 */518518- transport->cacc.changeover_active = 1;509509+ transport->cacc.changeover_active = changeover;519510520511 /* 3) The sender MUST store the next TSN to be sent in521512 * next_tsn_at_change.
+15-4
net/sctp/protocol.c
···108108 }109109110110 if (sctp_snmp_proc_init())111111- goto out_nomem;111111+ goto out_snmp_proc_init;112112 if (sctp_eps_proc_init())113113- goto out_nomem;113113+ goto out_eps_proc_init;114114 if (sctp_assocs_proc_init())115115- goto out_nomem;115115+ goto out_assocs_proc_init;116116 if (sctp_remaddr_proc_init())117117- goto out_nomem;117117+ goto out_remaddr_proc_init;118118119119 return 0;120120121121+out_remaddr_proc_init:122122+ sctp_remaddr_proc_exit();123123+out_assocs_proc_init:124124+ sctp_eps_proc_exit();125125+out_eps_proc_init:126126+ sctp_snmp_proc_exit();127127+out_snmp_proc_init:128128+ if (proc_net_sctp) {129129+ proc_net_sctp = NULL;130130+ remove_proc_entry("sctp", init_net.proc_net);131131+ }121132out_nomem:122133 return -ENOMEM;123134}