diff for duplicates of <20080129212703.GA3180@tuxdriver.com> diff --git a/a/1.txt b/N1/1.txt index 79300f9..879b75b 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -13,20 +13,17 @@ John Individual patches are available here: - http://www.kernel.org/pub/linux/kernel/people/linville/wireless-2.6/up= -stream + http://www.kernel.org/pub/linux/kernel/people/linville/wireless-2.6/upstream --- -The following changes since commit 85040bcb4643cba578839e953f25e2d1965d= -83d0: +The following changes since commit 85040bcb4643cba578839e953f25e2d1965d83d0: YOSHIFUJI Hideaki (1): [IPV6] ADDRLABEL: Fix double free on label deletion. are available in the git repository at: - git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.g= -it upstream + git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git upstream Adrian Bassett (1): rtl8180_dev.c: add support for 1799:700f @@ -49,7 +46,7 @@ Holger Schurig (1): Ihar Hrachyshka (1): libertas: fix memory alignment problems on the blackfin -I=F1aky P=E9rez-Gonz=E1lez (1): +Iñaky Pérez-González (1): rfkill: add the WiMAX radio type Johannes Berg (1): @@ -88,16 +85,14 @@ Stefano Brivio (1): b43legacy: fix MAC control and microcode init drivers/net/wireless/ath5k/base.c | 10 +- - drivers/net/wireless/ath5k/debug.c | 124 +++++++++++++++++++= -++---- + drivers/net/wireless/ath5k/debug.c | 124 +++++++++++++++++++++---- drivers/net/wireless/ath5k/debug.h | 18 ++-- drivers/net/wireless/b43/dma.c | 30 +++++- drivers/net/wireless/b43/main.c | 19 +++- drivers/net/wireless/b43/xmit.c | 23 +++-- drivers/net/wireless/b43/xmit.h | 10 +- drivers/net/wireless/b43legacy/b43legacy.h | 31 +++---- - drivers/net/wireless/b43legacy/main.c | 133 ++++++++++++++++++-= --------- + drivers/net/wireless/b43legacy/main.c | 133 ++++++++++++++++++--------- drivers/net/wireless/b43legacy/phy.c | 14 ++-- drivers/net/wireless/b43legacy/pio.c | 6 +- drivers/net/wireless/b43legacy/radio.c | 16 ++-- @@ -124,24 +119,22 @@ Stefano Brivio (1): net/rfkill/rfkill.c | 3 + 33 files changed, 490 insertions(+), 236 deletions(-) -diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/a= -th5k/base.c +diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c index 72bcf32..d6599d2 100644 --- a/drivers/net/wireless/ath5k/base.c +++ b/drivers/net/wireless/ath5k/base.c @@ -1980,7 +1980,7 @@ ath5k_beacon_send(struct ath5k_softc *sc) - struct ath5k_buf *bf =3D sc->bbuf; - struct ath5k_hw *ah =3D sc->ah; -=20 + struct ath5k_buf *bf = sc->bbuf; + struct ath5k_hw *ah = sc->ah; + - ATH5K_DBG(sc, ATH5K_DEBUG_BEACON_PROC, "in beacon_send\n"); + ATH5K_DBG_UNLIMIT(sc, ATH5K_DEBUG_BEACON, "in beacon_send\n"); -=20 - if (unlikely(bf->skb =3D=3D NULL || sc->opmode =3D=3D IEEE80211_IF_TY= -PE_STA || - sc->opmode =3D=3D IEEE80211_IF_TYPE_MNTR)) { + + if (unlikely(bf->skb == NULL || sc->opmode == IEEE80211_IF_TYPE_STA || + sc->opmode == IEEE80211_IF_TYPE_MNTR)) { @@ -1996,10 +1996,10 @@ ath5k_beacon_send(struct ath5k_softc *sc) */ - if (unlikely(ath5k_hw_num_tx_pending(ah, sc->bhalq) !=3D 0)) { + if (unlikely(ath5k_hw_num_tx_pending(ah, sc->bhalq) != 0)) { sc->bmisscount++; - ATH5K_DBG(sc, ATH5K_DEBUG_BEACON_PROC, + ATH5K_DBG(sc, ATH5K_DEBUG_BEACON, @@ -155,23 +148,22 @@ PE_STA || @@ -2007,7 +2007,7 @@ ath5k_beacon_send(struct ath5k_softc *sc) return; } - if (unlikely(sc->bmisscount !=3D 0)) { + if (unlikely(sc->bmisscount != 0)) { - ATH5K_DBG(sc, ATH5K_DEBUG_BEACON_PROC, + ATH5K_DBG(sc, ATH5K_DEBUG_BEACON, "resume beacon xmit after %u misses\n", sc->bmisscount); - sc->bmisscount =3D 0; + sc->bmisscount = 0; @@ -2027,7 +2027,7 @@ ath5k_beacon_send(struct ath5k_softc *sc) -=20 + ath5k_hw_put_tx_buf(ah, sc->bhalq, bf->daddr); ath5k_hw_tx_start(ah, sc->bhalq); -- ATH5K_DBG(sc, ATH5K_DEBUG_BEACON_PROC, "TXDP[%u] =3D %llx (%p)\n", -+ ATH5K_DBG(sc, ATH5K_DEBUG_BEACON, "TXDP[%u] =3D %llx (%p)\n", +- ATH5K_DBG(sc, ATH5K_DEBUG_BEACON_PROC, "TXDP[%u] = %llx (%p)\n", ++ ATH5K_DBG(sc, ATH5K_DEBUG_BEACON, "TXDP[%u] = %llx (%p)\n", sc->bhalq, (unsigned long long)bf->daddr, bf->desc); -=20 + sc->bsent++; -diff --git a/drivers/net/wireless/ath5k/debug.c b/drivers/net/wireless/= -ath5k/debug.c +diff --git a/drivers/net/wireless/ath5k/debug.c b/drivers/net/wireless/ath5k/debug.c index 4ba649e..bb581ef 100644 --- a/drivers/net/wireless/ath5k/debug.c +++ b/drivers/net/wireless/ath5k/debug.c @@ -180,78 +172,71 @@ index 4ba649e..bb581ef 100644 - * Copyright (c) 2007 Bruno Randolf <bruno@thinktube.com> + * Copyright (c) 2007-2008 Bruno Randolf <bruno@thinktube.com> * - * This file is free software: you may copy, redistribute and/or modi= -fy it - * under the terms of the GNU General Public License as published by = -the -@@ -200,7 +200,7 @@ static ssize_t read_file_tsf(struct file *file, cha= -r __user *user_buf, + * This file is free software: you may copy, redistribute and/or modify it + * under the terms of the GNU General Public License as published by the +@@ -200,7 +200,7 @@ static ssize_t read_file_tsf(struct file *file, char __user *user_buf, { - struct ath5k_softc *sc =3D file->private_data; + struct ath5k_softc *sc = file->private_data; char buf[100]; - snprintf(buf, 100, "0x%016llx\n", ath5k_hw_get_tsf64(sc->ah)); -+ snprintf(buf, sizeof(buf), "0x%016llx\n", ath5k_hw_get_tsf64(sc->ah))= -; ++ snprintf(buf, sizeof(buf), "0x%016llx\n", ath5k_hw_get_tsf64(sc->ah)); return simple_read_from_buffer(user_buf, count, ppos, buf, 19); } -=20 + @@ -209,7 +209,12 @@ static ssize_t write_file_tsf(struct file *file, size_t count, loff_t *ppos) { - struct ath5k_softc *sc =3D file->private_data; -- if (strncmp(userbuf, "reset", 5) =3D=3D 0) { + struct ath5k_softc *sc = file->private_data; +- if (strncmp(userbuf, "reset", 5) == 0) { + char buf[20]; + + if (copy_from_user(buf, userbuf, min(count, sizeof(buf)))) + return -EFAULT; + -+ if (strncmp(buf, "reset", 5) =3D=3D 0) { ++ if (strncmp(buf, "reset", 5) == 0) { ath5k_hw_reset_tsf(sc->ah); printk(KERN_INFO "debugfs reset TSF\n"); } -@@ -231,8 +236,8 @@ static ssize_t read_file_beacon(struct file *file, = -char __user *user_buf, +@@ -231,8 +236,8 @@ static ssize_t read_file_beacon(struct file *file, char __user *user_buf, { - struct ath5k_softc *sc =3D file->private_data; - struct ath5k_hw *ah =3D sc->ah; + struct ath5k_softc *sc = file->private_data; + struct ath5k_hw *ah = sc->ah; - char buf[1000]; -- int len =3D 0; +- int len = 0; + char buf[500]; -+ unsigned int len =3D 0; ++ unsigned int len = 0; unsigned int v; u64 tsf; -=20 -@@ -277,11 +282,15 @@ static ssize_t write_file_beacon(struct file *fil= -e, + +@@ -277,11 +282,15 @@ static ssize_t write_file_beacon(struct file *file, { - struct ath5k_softc *sc =3D file->private_data; - struct ath5k_hw *ah =3D sc->ah; + struct ath5k_softc *sc = file->private_data; + struct ath5k_hw *ah = sc->ah; + char buf[20]; + + if (copy_from_user(buf, userbuf, min(count, sizeof(buf)))) + return -EFAULT; -=20 -- if (strncmp(userbuf, "disable", 7) =3D=3D 0) { -+ if (strncmp(buf, "disable", 7) =3D=3D 0) { + +- if (strncmp(userbuf, "disable", 7) == 0) { ++ if (strncmp(buf, "disable", 7) == 0) { AR5K_REG_DISABLE_BITS(ah, AR5K_BEACON, AR5K_BEACON_ENABLE); printk(KERN_INFO "debugfs disable beacons\n"); -- } else if (strncmp(userbuf, "enable", 6) =3D=3D 0) { -+ } else if (strncmp(buf, "enable", 6) =3D=3D 0) { +- } else if (strncmp(userbuf, "enable", 6) == 0) { ++ } else if (strncmp(buf, "enable", 6) == 0) { AR5K_REG_ENABLE_BITS(ah, AR5K_BEACON, AR5K_BEACON_ENABLE); printk(KERN_INFO "debugfs enable beacons\n"); } -@@ -314,6 +323,82 @@ static const struct file_operations fops_reset =3D= - { +@@ -314,6 +323,82 @@ static const struct file_operations fops_reset = { }; -=20 -=20 + + +/* debugfs: debug level */ + +static struct { + enum ath5k_debug_level level; + const char *name; + const char *desc; -+} dbg_info[] =3D { ++} dbg_info[] = { + { ATH5K_DEBUG_RESET, "reset", "reset and initialization" }, + { ATH5K_DEBUG_INTR, "intr", "interrupt handling" }, + { ATH5K_DEBUG_MODE, "mode", "mode init/setup" }, @@ -267,27 +252,26 @@ e, + { ATH5K_DEBUG_ANY, "all", "show all debug levels" }, +}; + -+static ssize_t read_file_debug(struct file *file, char __user *user_bu= -f, ++static ssize_t read_file_debug(struct file *file, char __user *user_buf, + size_t count, loff_t *ppos) +{ -+ struct ath5k_softc *sc =3D file->private_data; ++ struct ath5k_softc *sc = file->private_data; + char buf[700]; -+ unsigned int len =3D 0; ++ unsigned int len = 0; + unsigned int i; + -+ len +=3D snprintf(buf+len, sizeof(buf)-len, ++ len += snprintf(buf+len, sizeof(buf)-len, + "DEBUG LEVEL: 0x%08x\n\n", sc->debug.level); + -+ for (i =3D 0; i < ARRAY_SIZE(dbg_info) - 1; i++) { -+ len +=3D snprintf(buf+len, sizeof(buf)-len, ++ for (i = 0; i < ARRAY_SIZE(dbg_info) - 1; i++) { ++ len += snprintf(buf+len, sizeof(buf)-len, + "%10s %c 0x%08x - %s\n", dbg_info[i].name, + sc->debug.level & dbg_info[i].level ? '+' : ' ', + dbg_info[i].level, dbg_info[i].desc); + } -+ len +=3D snprintf(buf+len, sizeof(buf)-len, ++ len += snprintf(buf+len, sizeof(buf)-len, + "%10s %c 0x%08x - %s\n", dbg_info[i].name, -+ sc->debug.level =3D=3D dbg_info[i].level ? '+' : ' ', ++ sc->debug.level == dbg_info[i].level ? '+' : ' ', + dbg_info[i].level, dbg_info[i].desc); + + return simple_read_from_buffer(user_buf, count, ppos, buf, len); @@ -297,95 +281,90 @@ f, + const char __user *userbuf, + size_t count, loff_t *ppos) +{ -+ struct ath5k_softc *sc =3D file->private_data; ++ struct ath5k_softc *sc = file->private_data; + unsigned int i; + char buf[20]; + + if (copy_from_user(buf, userbuf, min(count, sizeof(buf)))) + return -EFAULT; + -+ for (i =3D 0; i < ARRAY_SIZE(dbg_info); i++) { ++ for (i = 0; i < ARRAY_SIZE(dbg_info); i++) { + if (strncmp(buf, dbg_info[i].name, -+ strlen(dbg_info[i].name)) =3D=3D 0) { -+ sc->debug.level ^=3D dbg_info[i].level; /* toggle bit */ ++ strlen(dbg_info[i].name)) == 0) { ++ sc->debug.level ^= dbg_info[i].level; /* toggle bit */ + break; + } + } + return count; +} + -+static const struct file_operations fops_debug =3D { -+ .read =3D read_file_debug, -+ .write =3D write_file_debug, -+ .open =3D ath5k_debugfs_open, -+ .owner =3D THIS_MODULE, ++static const struct file_operations fops_debug = { ++ .read = read_file_debug, ++ .write = write_file_debug, ++ .open = ath5k_debugfs_open, ++ .owner = THIS_MODULE, +}; + + /* init */ -=20 + void @@ -326,26 +411,24 @@ void ath5k_debug_init_device(struct ath5k_softc *sc) { - sc->debug.level =3D ath5k_debug; + sc->debug.level = ath5k_debug; + - sc->debug.debugfs_phydir =3D debugfs_create_dir(wiphy_name(sc->hw->wi= -phy), + sc->debug.debugfs_phydir = debugfs_create_dir(wiphy_name(sc->hw->wiphy), - ath5k_global_debugfs); -- sc->debug.debugfs_debug =3D debugfs_create_u32("debug", +- sc->debug.debugfs_debug = debugfs_create_u32("debug", - 0666, sc->debug.debugfs_phydir, &sc->debug.level); + ath5k_global_debugfs); + -+ sc->debug.debugfs_debug =3D debugfs_create_file("debug", 0666, ++ sc->debug.debugfs_debug = debugfs_create_file("debug", 0666, + sc->debug.debugfs_phydir, sc, &fops_debug); -=20 - sc->debug.debugfs_registers =3D debugfs_create_file("registers", 0444= -, + + sc->debug.debugfs_registers = debugfs_create_file("registers", 0444, - sc->debug.debugfs_phydir, - sc, &fops_registers); + sc->debug.debugfs_phydir, sc, &fops_registers); -=20 - sc->debug.debugfs_tsf =3D debugfs_create_file("tsf", 0666, + + sc->debug.debugfs_tsf = debugfs_create_file("tsf", 0666, - sc->debug.debugfs_phydir, - sc, &fops_tsf); + sc->debug.debugfs_phydir, sc, &fops_tsf); -=20 - sc->debug.debugfs_beacon =3D debugfs_create_file("beacon", 0666, + + sc->debug.debugfs_beacon = debugfs_create_file("beacon", 0666, - sc->debug.debugfs_phydir, - sc, &fops_beacon); + sc->debug.debugfs_phydir, sc, &fops_beacon); -=20 - sc->debug.debugfs_reset =3D debugfs_create_file("reset", 0222, + + sc->debug.debugfs_reset = debugfs_create_file("reset", 0222, - sc->debug.debugfs_phydir, - sc, &fops_reset); + sc->debug.debugfs_phydir, sc, &fops_reset); } -=20 + void -@@ -415,8 +498,7 @@ ath5k_debug_printrxbuffs(struct ath5k_softc *sc, st= -ruct ath5k_hw *ah) +@@ -415,8 +498,7 @@ ath5k_debug_printrxbuffs(struct ath5k_softc *sc, struct ath5k_hw *ah) struct ath5k_buf *bf; int status; -=20 + - if (likely(!(sc->debug.level & - (ATH5K_DEBUG_RESET | ATH5K_DEBUG_FATAL)))) + if (likely(!(sc->debug.level & ATH5K_DEBUG_RESET))) return; -=20 + printk(KERN_DEBUG "rx queue %x, link %p\n", -@@ -426,7 +508,7 @@ ath5k_debug_printrxbuffs(struct ath5k_softc *sc, st= -ruct ath5k_hw *ah) +@@ -426,7 +508,7 @@ ath5k_debug_printrxbuffs(struct ath5k_softc *sc, struct ath5k_hw *ah) list_for_each_entry(bf, &sc->rxbuf, list) { - ds =3D bf->desc; - status =3D ah->ah_proc_rx_desc(ah, ds); + ds = bf->desc; + status = ah->ah_proc_rx_desc(ah, ds); - if (!status || (sc->debug.level & ATH5K_DEBUG_FATAL)) + if (!status) - ath5k_debug_printrxbuf(bf, status =3D=3D 0); + ath5k_debug_printrxbuf(bf, status == 0); } spin_unlock_bh(&sc->rxbuflock); -diff --git a/drivers/net/wireless/ath5k/debug.h b/drivers/net/wireless/= -ath5k/debug.h +diff --git a/drivers/net/wireless/ath5k/debug.h b/drivers/net/wireless/ath5k/debug.h index 2b491cb..c4fd8c4 100644 --- a/drivers/net/wireless/ath5k/debug.h +++ b/drivers/net/wireless/ath5k/debug.h @@ -404,126 +383,117 @@ index 2b491cb..c4fd8c4 100644 - * @ATH5K_DEBUG_FATAL: fatal errors * @ATH5K_DEBUG_ANY: show at any debug level * - * The debug level is used to control the amount and type of debugging= - output + * The debug level is used to control the amount and type of debugging output @@ -115,15 +113,13 @@ enum ath5k_debug_level { - ATH5K_DEBUG_MODE =3D 0x00000004, - ATH5K_DEBUG_XMIT =3D 0x00000008, - ATH5K_DEBUG_BEACON =3D 0x00000010, -- ATH5K_DEBUG_BEACON_PROC =3D 0x00000020, -- ATH5K_DEBUG_CALIBRATE =3D 0x00000100, -- ATH5K_DEBUG_TXPOWER =3D 0x00000200, -- ATH5K_DEBUG_LED =3D 0x00000400, -- ATH5K_DEBUG_DUMP_RX =3D 0x00001000, -- ATH5K_DEBUG_DUMP_TX =3D 0x00002000, -- ATH5K_DEBUG_DUMPMODES =3D 0x00004000, -- ATH5K_DEBUG_TRACE =3D 0x00010000, -- ATH5K_DEBUG_FATAL =3D 0x80000000, -+ ATH5K_DEBUG_CALIBRATE =3D 0x00000020, -+ ATH5K_DEBUG_TXPOWER =3D 0x00000040, -+ ATH5K_DEBUG_LED =3D 0x00000080, -+ ATH5K_DEBUG_DUMP_RX =3D 0x00000100, -+ ATH5K_DEBUG_DUMP_TX =3D 0x00000200, -+ ATH5K_DEBUG_DUMPMODES =3D 0x00000400, -+ ATH5K_DEBUG_TRACE =3D 0x00001000, - ATH5K_DEBUG_ANY =3D 0xffffffff + ATH5K_DEBUG_MODE = 0x00000004, + ATH5K_DEBUG_XMIT = 0x00000008, + ATH5K_DEBUG_BEACON = 0x00000010, +- ATH5K_DEBUG_BEACON_PROC = 0x00000020, +- ATH5K_DEBUG_CALIBRATE = 0x00000100, +- ATH5K_DEBUG_TXPOWER = 0x00000200, +- ATH5K_DEBUG_LED = 0x00000400, +- ATH5K_DEBUG_DUMP_RX = 0x00001000, +- ATH5K_DEBUG_DUMP_TX = 0x00002000, +- ATH5K_DEBUG_DUMPMODES = 0x00004000, +- ATH5K_DEBUG_TRACE = 0x00010000, +- ATH5K_DEBUG_FATAL = 0x80000000, ++ ATH5K_DEBUG_CALIBRATE = 0x00000020, ++ ATH5K_DEBUG_TXPOWER = 0x00000040, ++ ATH5K_DEBUG_LED = 0x00000080, ++ ATH5K_DEBUG_DUMP_RX = 0x00000100, ++ ATH5K_DEBUG_DUMP_TX = 0x00000200, ++ ATH5K_DEBUG_DUMPMODES = 0x00000400, ++ ATH5K_DEBUG_TRACE = 0x00001000, + ATH5K_DEBUG_ANY = 0xffffffff }; -=20 -diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/= -dma.c + +diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c index 3e73d2a..8a708b7 100644 --- a/drivers/net/wireless/b43/dma.c +++ b/drivers/net/wireless/b43/dma.c -@@ -1114,7 +1114,7 @@ static int dma_tx_fragment(struct b43_dmaring *ri= -ng, +@@ -1114,7 +1114,7 @@ static int dma_tx_fragment(struct b43_dmaring *ring, { - const struct b43_dma_ops *ops =3D ring->ops; + const struct b43_dma_ops *ops = ring->ops; u8 *header; - int slot; + int slot, old_top_slot, old_used_slots; int err; struct b43_dmadesc_generic *desc; struct b43_dmadesc_meta *meta; -@@ -1126,6 +1126,9 @@ static int dma_tx_fragment(struct b43_dmaring *ri= -ng, +@@ -1126,6 +1126,9 @@ static int dma_tx_fragment(struct b43_dmaring *ring, #define SLOTS_PER_PACKET 2 B43_WARN_ON(skb_shinfo(skb)->nr_frags); -=20 -+ old_top_slot =3D ring->current_slot; -+ old_used_slots =3D ring->used_slots; + ++ old_top_slot = ring->current_slot; ++ old_used_slots = ring->used_slots; + /* Get a slot for the header. */ - slot =3D request_slot(ring); - desc =3D ops->idx2desc(ring, slot, &meta_hdr); -@@ -1133,13 +1136,21 @@ static int dma_tx_fragment(struct b43_dmaring *= -ring, -=20 - header =3D &(ring->txhdr_cache[slot * hdrsize]); - cookie =3D generate_cookie(ring, slot); + slot = request_slot(ring); + desc = ops->idx2desc(ring, slot, &meta_hdr); +@@ -1133,13 +1136,21 @@ static int dma_tx_fragment(struct b43_dmaring *ring, + + header = &(ring->txhdr_cache[slot * hdrsize]); + cookie = generate_cookie(ring, slot); - b43_generate_txhdr(ring->dev, header, - skb->data, skb->len, ctl, cookie); -+ err =3D b43_generate_txhdr(ring->dev, header, ++ err = b43_generate_txhdr(ring->dev, header, + skb->data, skb->len, ctl, cookie); + if (unlikely(err)) { -+ ring->current_slot =3D old_top_slot; -+ ring->used_slots =3D old_used_slots; ++ ring->current_slot = old_top_slot; ++ ring->used_slots = old_used_slots; + return err; + } -=20 - meta_hdr->dmaaddr =3D map_descbuffer(ring, (unsigned char *)header, + + meta_hdr->dmaaddr = map_descbuffer(ring, (unsigned char *)header, hdrsize, 1); - if (dma_mapping_error(meta_hdr->dmaaddr)) + if (dma_mapping_error(meta_hdr->dmaaddr)) { -+ ring->current_slot =3D old_top_slot; -+ ring->used_slots =3D old_used_slots; ++ ring->current_slot = old_top_slot; ++ ring->used_slots = old_used_slots; return -EIO; + } ops->fill_descriptor(ring, desc, meta_hdr->dmaaddr, hdrsize, 1, 0, 0); -=20 -@@ -1157,6 +1168,8 @@ static int dma_tx_fragment(struct b43_dmaring *ri= -ng, + +@@ -1157,6 +1168,8 @@ static int dma_tx_fragment(struct b43_dmaring *ring, if (dma_mapping_error(meta->dmaaddr)) { - bounce_skb =3D __dev_alloc_skb(skb->len, GFP_ATOMIC | GFP_DMA); + bounce_skb = __dev_alloc_skb(skb->len, GFP_ATOMIC | GFP_DMA); if (!bounce_skb) { -+ ring->current_slot =3D old_top_slot; -+ ring->used_slots =3D old_used_slots; - err =3D -ENOMEM; ++ ring->current_slot = old_top_slot; ++ ring->used_slots = old_used_slots; + err = -ENOMEM; goto out_unmap_hdr; } -@@ -1167,6 +1180,8 @@ static int dma_tx_fragment(struct b43_dmaring *ri= -ng, - meta->skb =3D skb; - meta->dmaaddr =3D map_descbuffer(ring, skb->data, skb->len, 1); +@@ -1167,6 +1180,8 @@ static int dma_tx_fragment(struct b43_dmaring *ring, + meta->skb = skb; + meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1); if (dma_mapping_error(meta->dmaaddr)) { -+ ring->current_slot =3D old_top_slot; -+ ring->used_slots =3D old_used_slots; - err =3D -EIO; ++ ring->current_slot = old_top_slot; ++ ring->used_slots = old_used_slots; + err = -EIO; goto out_free_bounce; } @@ -1252,6 +1267,13 @@ int b43_dma_tx(struct b43_wldev *dev, B43_WARN_ON(ring->stopped); -=20 - err =3D dma_tx_fragment(ring, skb, ctl); -+ if (unlikely(err =3D=3D -ENOKEY)) { + + err = dma_tx_fragment(ring, skb, ctl); ++ if (unlikely(err == -ENOKEY)) { + /* Drop this packet, as we don't have the encryption key + * anymore and must not transmit it unencrypted. */ + dev_kfree_skb_any(skb); -+ err =3D 0; ++ err = 0; + goto out_unlock; + } if (unlikely(err)) { b43err(dev->wl, "DMA tx mapping failure\n"); goto out_unlock; -diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43= -/main.c +diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 88d2c15..64c154d 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c -@@ -3532,8 +3532,6 @@ static int b43_wireless_core_init(struct b43_wlde= -v *dev) +@@ -3532,8 +3532,6 @@ static int b43_wireless_core_init(struct b43_wldev *dev) b43_bluetooth_coext_enable(dev); -=20 + ssb_bus_powerup(bus, 1); /* Enable dynamic PCTL */ - memset(wl->bssid, 0, ETH_ALEN); - memset(wl->mac_addr, 0, ETH_ALEN); @@ -531,59 +501,58 @@ v *dev) b43_security_init(dev); b43_rng_init(wl); @@ -3630,6 +3628,15 @@ static int b43_op_start(struct ieee80211_hw *hw) - struct b43_wldev *dev =3D wl->current_dev; - int did_init =3D 0; - int err =3D 0; -+ bool do_rfkill_exit =3D 0; + struct b43_wldev *dev = wl->current_dev; + int did_init = 0; + int err = 0; ++ bool do_rfkill_exit = 0; + + /* Kill all old instance specific information to make sure + * the card won't use it in the short timeframe between start + * and mac80211 reconfiguring it. */ + memset(wl->bssid, 0, ETH_ALEN); + memset(wl->mac_addr, 0, ETH_ALEN); -+ wl->filter_flags =3D 0; -+ wl->radiotap_enabled =3D 0; -=20 ++ wl->filter_flags = 0; ++ wl->radiotap_enabled = 0; + /* First register RFkill. * LEDs that are registered later depend on it. */ @@ -3639,8 +3646,10 @@ static int b43_op_start(struct ieee80211_hw *hw) -=20 + if (b43_status(dev) < B43_STAT_INITIALIZED) { - err =3D b43_wireless_core_init(dev); + err = b43_wireless_core_init(dev); - if (err) + if (err) { -+ do_rfkill_exit =3D 1; ++ do_rfkill_exit = 1; goto out_mutex_unlock; + } - did_init =3D 1; + did_init = 1; } -=20 + @@ -3649,6 +3658,7 @@ static int b43_op_start(struct ieee80211_hw *hw) if (err) { if (did_init) b43_wireless_core_exit(dev); -+ do_rfkill_exit =3D 1; ++ do_rfkill_exit = 1; goto out_mutex_unlock; } } @@ -3656,6 +3666,9 @@ static int b43_op_start(struct ieee80211_hw *hw) out_mutex_unlock: mutex_unlock(&wl->mutex); -=20 + + if (do_rfkill_exit) + b43_rfkill_exit(dev); + return err; } -=20 -diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43= -/xmit.c + +diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c index 3fc53e8..7caa26e 100644 --- a/drivers/net/wireless/b43/xmit.c +++ b/drivers/net/wireless/b43/xmit.c @@ -178,12 +178,12 @@ static u8 b43_calc_fallback_rate(u8 bitrate) } -=20 + /* Generate a TX data header. */ -void b43_generate_txhdr(struct b43_wldev *dev, - u8 *_txhdr, @@ -598,12 +567,12 @@ index 3fc53e8..7caa26e 100644 + const struct ieee80211_tx_control *txctl, + u16 cookie) { - struct b43_txhdr *txhdr =3D (struct b43_txhdr *)_txhdr; - const struct b43_phy *phy =3D &dev->phy; + struct b43_txhdr *txhdr = (struct b43_txhdr *)_txhdr; + const struct b43_phy *phy = &dev->phy; @@ -237,7 +237,15 @@ void b43_generate_txhdr(struct b43_wldev *dev, -=20 - B43_WARN_ON(key_idx >=3D dev->max_nr_keys); - key =3D &(dev->key[key_idx]); + + B43_WARN_ON(key_idx >= dev->max_nr_keys); + key = &(dev->key[key_idx]); - B43_WARN_ON(!key->keyconf); + + if (unlikely(!key->keyconf)) { @@ -614,26 +583,25 @@ index 3fc53e8..7caa26e 100644 + * unencrypted to avoid leaking information. */ + return -ENOKEY; + } -=20 + /* Hardware appends ICV. */ - plcp_fragment_len +=3D txctl->icv_len; + plcp_fragment_len += txctl->icv_len; @@ -408,6 +416,7 @@ void b43_generate_txhdr(struct b43_wldev *dev, - txhdr->phy_ctl =3D cpu_to_le16(phy_ctl); - txhdr->extra_ft =3D extra_ft; -=20 + txhdr->phy_ctl = cpu_to_le16(phy_ctl); + txhdr->extra_ft = extra_ft; + + return 0; } -=20 + static s8 b43_rssi_postprocess(struct b43_wldev *dev, -diff --git a/drivers/net/wireless/b43/xmit.h b/drivers/net/wireless/b43= -/xmit.h +diff --git a/drivers/net/wireless/b43/xmit.h b/drivers/net/wireless/b43/xmit.h index ca2a2ab..4176503 100644 --- a/drivers/net/wireless/b43/xmit.h +++ b/drivers/net/wireless/b43/xmit.h @@ -174,11 +174,11 @@ size_t b43_txhdr_size(struct b43_wldev *dev) } -=20 -=20 + + -void b43_generate_txhdr(struct b43_wldev *dev, - u8 * txhdr, - const unsigned char *fragment_data, @@ -644,23 +612,22 @@ index ca2a2ab..4176503 100644 + const unsigned char *fragment_data, + unsigned int fragment_len, + const struct ieee80211_tx_control *txctl, u16 cookie); -=20 + /* Transmit Status */ struct b43_txstatus { -diff --git a/drivers/net/wireless/b43legacy/b43legacy.h b/drivers/net/w= -ireless/b43legacy/b43legacy.h +diff --git a/drivers/net/wireless/b43legacy/b43legacy.h b/drivers/net/wireless/b43legacy/b43legacy.h index 93419ad..c80edd2 100644 --- a/drivers/net/wireless/b43legacy/b43legacy.h +++ b/drivers/net/wireless/b43legacy/b43legacy.h @@ -23,7 +23,7 @@ #include "phy.h" -=20 -=20 + + -#define B43legacy_IRQWAIT_MAX_RETRIES 100 +#define B43legacy_IRQWAIT_MAX_RETRIES 20 -=20 + #define B43legacy_RX_MAX_SSI 60 /* best guess at max ssi */ -=20 + @@ -40,9 +40,8 @@ #define B43legacy_MMIO_DMA4_IRQ_MASK 0x44 #define B43legacy_MMIO_DMA5_REASON 0x48 @@ -675,31 +642,27 @@ index 93419ad..c80edd2 100644 #define B43legacy_MMIO_RAM_CONTROL 0x130 @@ -177,31 +176,25 @@ #define B43legacy_RADIOCTL_ID 0x01 -=20 + /* MAC Control bitfield */ +#define B43legacy_MACCTL_ENABLED 0x00000001 /* MAC Enabled */ +#define B43legacy_MACCTL_PSM_RUN 0x00000002 /* Run Microcode */ +#define B43legacy_MACCTL_PSM_JMP0 0x00000004 /* Microcode jump to 0 */ +#define B43legacy_MACCTL_SHM_ENABLED 0x00000100 /* SHM Enabled */ - #define B43legacy_MACCTL_IHR_ENABLED 0x00000400 /* IHR Region Enabled = -*/ + #define B43legacy_MACCTL_IHR_ENABLED 0x00000400 /* IHR Region Enabled */ +#define B43legacy_MACCTL_BE 0x00010000 /* Big Endian mode */ #define B43legacy_MACCTL_INFRA 0x00020000 /* Infrastructure mode */ #define B43legacy_MACCTL_AP 0x00040000 /* AccessPoint mode */ +#define B43legacy_MACCTL_RADIOLOCK 0x00080000 /* Radio lock */ - #define B43legacy_MACCTL_BEACPROMISC 0x00100000 /* Beacon Promiscuous = -*/ - #define B43legacy_MACCTL_KEEP_BADPLCP 0x00200000 /* Keep bad PLCP fram= -es */ + #define B43legacy_MACCTL_BEACPROMISC 0x00100000 /* Beacon Promiscuous */ + #define B43legacy_MACCTL_KEEP_BADPLCP 0x00200000 /* Keep bad PLCP frames */ #define B43legacy_MACCTL_KEEP_CTL 0x00400000 /* Keep control frames */ - #define B43legacy_MACCTL_KEEP_BAD 0x00800000 /* Keep bad frames (FCS) = -*/ + #define B43legacy_MACCTL_KEEP_BAD 0x00800000 /* Keep bad frames (FCS) */ #define B43legacy_MACCTL_PROMISC 0x01000000 /* Promiscuous mode */ +#define B43legacy_MACCTL_HWPS 0x02000000 /* Hardware Power Saving */ +#define B43legacy_MACCTL_AWAKE 0x04000000 /* Device is awake */ +#define B43legacy_MACCTL_TBTTHOLD 0x10000000 /* TBTT Hold */ #define B43legacy_MACCTL_GMODE 0x80000000 /* G Mode */ -=20 + -/* StatusBitField */ -#define B43legacy_SBF_MAC_ENABLED 0x00000001 -#define B43legacy_SBF_CORE_READY 0x00000004 @@ -717,68 +680,59 @@ es */ - /* 802.11 core specific TM State Low flags */ #define B43legacy_TMSLOW_GMODE 0x20000000 /* G Mode Enable */ - #define B43legacy_TMSLOW_PLLREFSEL 0x00200000 /* PLL Freq Ref Select *= -/ -diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wirele= -ss/b43legacy/main.c + #define B43legacy_TMSLOW_PLLREFSEL 0x00200000 /* PLL Freq Ref Select */ +diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c index 4ed4243..aa20d5d 100644 --- a/drivers/net/wireless/b43legacy/main.c +++ b/drivers/net/wireless/b43legacy/main.c -@@ -225,8 +225,8 @@ static void b43legacy_ram_write(struct b43legacy_wl= -dev *dev, u16 offset, -=20 - B43legacy_WARN_ON(offset % 4 !=3D 0); -=20 -- status =3D b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD); +@@ -225,8 +225,8 @@ static void b43legacy_ram_write(struct b43legacy_wldev *dev, u16 offset, + + B43legacy_WARN_ON(offset % 4 != 0); + +- status = b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD); - if (status & B43legacy_SBF_XFER_REG_BYTESWAP) -+ status =3D b43legacy_read32(dev, B43legacy_MMIO_MACCTL); ++ status = b43legacy_read32(dev, B43legacy_MMIO_MACCTL); + if (status & B43legacy_MACCTL_BE) - val =3D swab32(val); -=20 + val = swab32(val); + b43legacy_write32(dev, B43legacy_MMIO_RAM_CONTROL, offset); -@@ -434,9 +434,9 @@ static void b43legacy_time_lock(struct b43legacy_wl= -dev *dev) +@@ -434,9 +434,9 @@ static void b43legacy_time_lock(struct b43legacy_wldev *dev) { u32 status; -=20 -- status =3D b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD); -- status |=3D B43legacy_SBF_TIME_UPDATE; + +- status = b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD); +- status |= B43legacy_SBF_TIME_UPDATE; - b43legacy_write32(dev, B43legacy_MMIO_STATUS_BITFIELD, status); -+ status =3D b43legacy_read32(dev, B43legacy_MMIO_MACCTL); -+ status |=3D B43legacy_MACCTL_TBTTHOLD; ++ status = b43legacy_read32(dev, B43legacy_MMIO_MACCTL); ++ status |= B43legacy_MACCTL_TBTTHOLD; + b43legacy_write32(dev, B43legacy_MMIO_MACCTL, status); mmiowb(); } -=20 -@@ -444,9 +444,9 @@ static void b43legacy_time_unlock(struct b43legacy_= -wldev *dev) + +@@ -444,9 +444,9 @@ static void b43legacy_time_unlock(struct b43legacy_wldev *dev) { u32 status; -=20 -- status =3D b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD); -- status &=3D ~B43legacy_SBF_TIME_UPDATE; + +- status = b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD); +- status &= ~B43legacy_SBF_TIME_UPDATE; - b43legacy_write32(dev, B43legacy_MMIO_STATUS_BITFIELD, status); -+ status =3D b43legacy_read32(dev, B43legacy_MMIO_MACCTL); -+ status &=3D ~B43legacy_MACCTL_TBTTHOLD; ++ status = b43legacy_read32(dev, B43legacy_MMIO_MACCTL); ++ status &= ~B43legacy_MACCTL_TBTTHOLD; + b43legacy_write32(dev, B43legacy_MMIO_MACCTL, status); } -=20 - static void b43legacy_tsf_write_locked(struct b43legacy_wldev *dev, u6= -4 tsf) -@@ -647,7 +647,7 @@ void b43legacy_dummy_transmission(struct b43legacy_= -wldev *dev) + + static void b43legacy_tsf_write_locked(struct b43legacy_wldev *dev, u64 tsf) +@@ -647,7 +647,7 @@ void b43legacy_dummy_transmission(struct b43legacy_wldev *dev) b43legacy_ram_write(dev, i * 4, buffer[i]); -=20 + /* dummy read follows */ - b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD); + b43legacy_read32(dev, B43legacy_MMIO_MACCTL); -=20 + b43legacy_write16(dev, 0x0568, 0x0000); b43legacy_write16(dev, 0x07C0, 0x0000); -@@ -794,9 +794,9 @@ static void b43legacy_jssi_write(struct b43legacy_w= -ldev *dev, u32 jssi) - static void b43legacy_generate_noise_sample(struct b43legacy_wldev *de= -v) +@@ -794,9 +794,9 @@ static void b43legacy_jssi_write(struct b43legacy_wldev *dev, u32 jssi) + static void b43legacy_generate_noise_sample(struct b43legacy_wldev *dev) { b43legacy_jssi_write(dev, 0x7F7F7F7F); - b43legacy_write32(dev, B43legacy_MMIO_STATUS2_BITFIELD, @@ -787,10 +741,9 @@ v) - B43legacy_MMIO_STATUS2_BITFIELD) + B43legacy_MMIO_MACCMD) | (1 << 4)); - B43legacy_WARN_ON(dev->noisecalc.channel_at_start !=3D + B43legacy_WARN_ON(dev->noisecalc.channel_at_start != dev->phy.channel); -@@ -895,8 +895,8 @@ static void handle_irq_atim_end(struct b43legacy_wl= -dev *dev) +@@ -895,8 +895,8 @@ static void handle_irq_atim_end(struct b43legacy_wldev *dev) { if (!dev->reg124_set_0x4) /*FIXME rename this variable*/ return; @@ -800,35 +753,32 @@ dev *dev) + b43legacy_read32(dev, B43legacy_MMIO_MACCMD) | 0x4); } -=20 -@@ -1106,9 +1106,9 @@ static void b43legacy_update_templates(struct b43= -legacy_wldev *dev) + +@@ -1106,9 +1106,9 @@ static void b43legacy_update_templates(struct b43legacy_wldev *dev) b43legacy_write_probe_resp_template(dev, 0x268, 0x4A, B43legacy_CCK_RATE_11MB); -=20 -- status =3D b43legacy_read32(dev, B43legacy_MMIO_STATUS2_BITFIELD); -+ status =3D b43legacy_read32(dev, B43legacy_MMIO_MACCMD); - status |=3D 0x03; + +- status = b43legacy_read32(dev, B43legacy_MMIO_STATUS2_BITFIELD); ++ status = b43legacy_read32(dev, B43legacy_MMIO_MACCMD); + status |= 0x03; - b43legacy_write32(dev, B43legacy_MMIO_STATUS2_BITFIELD, status); + b43legacy_write32(dev, B43legacy_MMIO_MACCMD, status); } -=20 + static void b43legacy_refresh_templates(struct b43legacy_wldev *dev, -@@ -1166,7 +1166,7 @@ static void handle_irq_beacon(struct b43legacy_wl= -dev *dev) +@@ -1166,7 +1166,7 @@ static void handle_irq_beacon(struct b43legacy_wldev *dev) return; -=20 - dev->irq_savedstate &=3D ~B43legacy_IRQ_BEACON; -- status =3D b43legacy_read32(dev, B43legacy_MMIO_STATUS2_BITFIELD); -+ status =3D b43legacy_read32(dev, B43legacy_MMIO_MACCMD); -=20 + + dev->irq_savedstate &= ~B43legacy_IRQ_BEACON; +- status = b43legacy_read32(dev, B43legacy_MMIO_STATUS2_BITFIELD); ++ status = b43legacy_read32(dev, B43legacy_MMIO_MACCMD); + if (!dev->cached_beacon || ((status & 0x1) && (status & 0x2))) { /* ACK beacon IRQ. */ -@@ -1182,14 +1182,14 @@ static void handle_irq_beacon(struct b43legacy_= -wldev *dev) +@@ -1182,14 +1182,14 @@ static void handle_irq_beacon(struct b43legacy_wldev *dev) b43legacy_write_beacon_template(dev, 0x68, 0x18, B43legacy_CCK_RATE_1MB); - status |=3D 0x1; + status |= 0x1; - b43legacy_write32(dev, B43legacy_MMIO_STATUS2_BITFIELD, + b43legacy_write32(dev, B43legacy_MMIO_MACCMD, status); @@ -836,115 +786,107 @@ wldev *dev) if (!(status & 0x2)) { b43legacy_write_beacon_template(dev, 0x468, 0x1A, B43legacy_CCK_RATE_1MB); - status |=3D 0x2; + status |= 0x2; - b43legacy_write32(dev, B43legacy_MMIO_STATUS2_BITFIELD, + b43legacy_write32(dev, B43legacy_MMIO_MACCMD, status); } } -@@ -1548,9 +1548,20 @@ static int b43legacy_upload_microcode(struct b43= -legacy_wldev *dev) +@@ -1548,9 +1548,20 @@ static int b43legacy_upload_microcode(struct b43legacy_wldev *dev) u16 fwpatch; u16 fwdate; u16 fwtime; - u32 tmp; + u32 tmp, macctl; - int err =3D 0; -=20 + int err = 0; + + /* Jump the microcode PSM to offset 0 */ -+ macctl =3D b43legacy_read32(dev, B43legacy_MMIO_MACCTL); ++ macctl = b43legacy_read32(dev, B43legacy_MMIO_MACCTL); + B43legacy_WARN_ON(macctl & B43legacy_MACCTL_PSM_RUN); -+ macctl |=3D B43legacy_MACCTL_PSM_JMP0; ++ macctl |= B43legacy_MACCTL_PSM_JMP0; + b43legacy_write32(dev, B43legacy_MMIO_MACCTL, macctl); + /* Zero out all microcode PSM registers and shared memory. */ -+ for (i =3D 0; i < 64; i++) ++ for (i = 0; i < 64; i++) + b43legacy_shm_write16(dev, B43legacy_SHM_WIRELESS, i, 0); -+ for (i =3D 0; i < 4096; i +=3D 2) ++ for (i = 0; i < 4096; i += 2) + b43legacy_shm_write16(dev, B43legacy_SHM_SHARED, i, 0); + /* Upload Microcode. */ - data =3D (__be32 *) (dev->fw.ucode->data + hdr_len); - len =3D (dev->fw.ucode->size - hdr_len) / sizeof(__be32); -@@ -1581,7 +1592,12 @@ static int b43legacy_upload_microcode(struct b43= -legacy_wldev *dev) -=20 + data = (__be32 *) (dev->fw.ucode->data + hdr_len); + len = (dev->fw.ucode->size - hdr_len) / sizeof(__be32); +@@ -1581,7 +1592,12 @@ static int b43legacy_upload_microcode(struct b43legacy_wldev *dev) + b43legacy_write32(dev, B43legacy_MMIO_GEN_IRQ_REASON, B43legacy_IRQ_ALL); - b43legacy_write32(dev, B43legacy_MMIO_STATUS_BITFIELD, 0x00020402); + + /* Start the microcode PSM */ -+ macctl =3D b43legacy_read32(dev, B43legacy_MMIO_MACCTL); -+ macctl &=3D ~B43legacy_MACCTL_PSM_JMP0; -+ macctl |=3D B43legacy_MACCTL_PSM_RUN; ++ macctl = b43legacy_read32(dev, B43legacy_MMIO_MACCTL); ++ macctl &= ~B43legacy_MACCTL_PSM_JMP0; ++ macctl |= B43legacy_MACCTL_PSM_RUN; + b43legacy_write32(dev, B43legacy_MMIO_MACCTL, macctl); -=20 + /* Wait for the microcode to load and respond */ - i =3D 0; -@@ -1594,9 +1610,13 @@ static int b43legacy_upload_microcode(struct b43= -legacy_wldev *dev) + i = 0; +@@ -1594,9 +1610,13 @@ static int b43legacy_upload_microcode(struct b43legacy_wldev *dev) b43legacyerr(dev->wl, "Microcode not responding\n"); b43legacy_print_fw_helptext(dev->wl); - err =3D -ENODEV; + err = -ENODEV; - goto out; + goto error; + } + msleep_interruptible(50); + if (signal_pending(current)) { -+ err =3D -EINTR; ++ err = -EINTR; + goto error; } - udelay(10); } /* dummy read follows */ b43legacy_read32(dev, B43legacy_MMIO_GEN_IRQ_REASON); -@@ -1617,9 +1637,8 @@ static int b43legacy_upload_microcode(struct b43l= -egacy_wldev *dev) +@@ -1617,9 +1637,8 @@ static int b43legacy_upload_microcode(struct b43legacy_wldev *dev) " is supported. You must change your firmware" " files.\n"); b43legacy_print_fw_helptext(dev->wl); - b43legacy_write32(dev, B43legacy_MMIO_STATUS_BITFIELD, 0); - err =3D -EOPNOTSUPP; + err = -EOPNOTSUPP; - goto out; + goto error; } - b43legacydbg(dev->wl, "Loading firmware version 0x%X, patch level %u = -" + b43legacydbg(dev->wl, "Loading firmware version 0x%X, patch level %u " "(20%.2i-%.2i-%.2i %.2i:%.2i:%.2i)\n", fwrev, fwpatch, -@@ -1629,7 +1648,14 @@ static int b43legacy_upload_microcode(struct b43= -legacy_wldev *dev) - dev->fw.rev =3D fwrev; - dev->fw.patch =3D fwpatch; -=20 +@@ -1629,7 +1648,14 @@ static int b43legacy_upload_microcode(struct b43legacy_wldev *dev) + dev->fw.rev = fwrev; + dev->fw.patch = fwpatch; + -out: + return 0; + +error: -+ macctl =3D b43legacy_read32(dev, B43legacy_MMIO_MACCTL); -+ macctl &=3D ~B43legacy_MACCTL_PSM_RUN; -+ macctl |=3D B43legacy_MACCTL_PSM_JMP0; ++ macctl = b43legacy_read32(dev, B43legacy_MMIO_MACCTL); ++ macctl &= ~B43legacy_MACCTL_PSM_RUN; ++ macctl |= B43legacy_MACCTL_PSM_JMP0; + b43legacy_write32(dev, B43legacy_MMIO_MACCTL, macctl); + return err; } -=20 -@@ -1736,9 +1762,9 @@ static int b43legacy_gpio_init(struct b43legacy_w= -ldev *dev) + +@@ -1736,9 +1762,9 @@ static int b43legacy_gpio_init(struct b43legacy_wldev *dev) u32 mask; u32 set; -=20 + - b43legacy_write32(dev, B43legacy_MMIO_STATUS_BITFIELD, + b43legacy_write32(dev, B43legacy_MMIO_MACCTL, b43legacy_read32(dev, - B43legacy_MMIO_STATUS_BITFIELD) + B43legacy_MMIO_MACCTL) & 0xFFFF3FFF); -=20 + b43legacy_write16(dev, B43legacy_MMIO_GPIO_MASK, -@@ -1798,14 +1824,14 @@ void b43legacy_mac_enable(struct b43legacy_wlde= -v *dev) +@@ -1798,14 +1824,14 @@ void b43legacy_mac_enable(struct b43legacy_wldev *dev) B43legacy_WARN_ON(dev->mac_suspended < 0); B43legacy_WARN_ON(irqs_disabled()); - if (dev->mac_suspended =3D=3D 0) { + if (dev->mac_suspended == 0) { - b43legacy_write32(dev, B43legacy_MMIO_STATUS_BITFIELD, + b43legacy_write32(dev, B43legacy_MMIO_MACCTL, b43legacy_read32(dev, @@ -959,11 +901,10 @@ v *dev) + b43legacy_read32(dev, B43legacy_MMIO_MACCTL); b43legacy_read32(dev, B43legacy_MMIO_GEN_IRQ_REASON); b43legacy_power_saving_ctl_bits(dev, -1, -1); -=20 -@@ -1836,10 +1862,10 @@ void b43legacy_mac_suspend(struct b43legacy_wld= -ev *dev) - dev->irq_savedstate =3D tmp; -=20 + +@@ -1836,10 +1862,10 @@ void b43legacy_mac_suspend(struct b43legacy_wldev *dev) + dev->irq_savedstate = tmp; + b43legacy_power_saving_ctl_bits(dev, -1, 1); - b43legacy_write32(dev, B43legacy_MMIO_STATUS_BITFIELD, + b43legacy_write32(dev, B43legacy_MMIO_MACCTL, @@ -973,218 +914,200 @@ ev *dev) + B43legacy_MMIO_MACCTL) + & ~B43legacy_MACCTL_ENABLED); b43legacy_read32(dev, B43legacy_MMIO_GEN_IRQ_REASON); - for (i =3D 40; i; i--) { - tmp =3D b43legacy_read32(dev, -@@ -2007,12 +2033,15 @@ static int b43legacy_chip_init(struct b43legacy= -_wldev *dev) - struct b43legacy_phy *phy =3D &dev->phy; + for (i = 40; i; i--) { + tmp = b43legacy_read32(dev, +@@ -2007,12 +2033,15 @@ static int b43legacy_chip_init(struct b43legacy_wldev *dev) + struct b43legacy_phy *phy = &dev->phy; int err; int tmp; - u32 value32; + u32 value32, macctl; u16 value16; -=20 + - b43legacy_write32(dev, B43legacy_MMIO_STATUS_BITFIELD, - B43legacy_SBF_CORE_READY - | B43legacy_SBF_400); + /* Initialize the MAC control */ -+ macctl =3D B43legacy_MACCTL_IHR_ENABLED | B43legacy_MACCTL_SHM_ENABLE= -D; ++ macctl = B43legacy_MACCTL_IHR_ENABLED | B43legacy_MACCTL_SHM_ENABLED; + if (dev->phy.gmode) -+ macctl |=3D B43legacy_MACCTL_GMODE; -+ macctl |=3D B43legacy_MACCTL_INFRA; ++ macctl |= B43legacy_MACCTL_GMODE; ++ macctl |= B43legacy_MACCTL_INFRA; + b43legacy_write32(dev, B43legacy_MMIO_MACCTL, macctl); -=20 - err =3D b43legacy_request_firmware(dev); + + err = b43legacy_request_firmware(dev); if (err) -@@ -2052,12 +2081,12 @@ static int b43legacy_chip_init(struct b43legacy= -_wldev *dev) +@@ -2052,12 +2081,12 @@ static int b43legacy_chip_init(struct b43legacy_wldev *dev) if (dev->dev->id.revision < 5) b43legacy_write32(dev, 0x010C, 0x01000000); -=20 -- value32 =3D b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD); -- value32 &=3D ~B43legacy_SBF_MODE_NOTADHOC; + +- value32 = b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD); +- value32 &= ~B43legacy_SBF_MODE_NOTADHOC; - b43legacy_write32(dev, B43legacy_MMIO_STATUS_BITFIELD, value32); -- value32 =3D b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD); -- value32 |=3D B43legacy_SBF_MODE_NOTADHOC; +- value32 = b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD); +- value32 |= B43legacy_SBF_MODE_NOTADHOC; - b43legacy_write32(dev, B43legacy_MMIO_STATUS_BITFIELD, value32); -+ value32 =3D b43legacy_read32(dev, B43legacy_MMIO_MACCTL); -+ value32 &=3D ~B43legacy_MACCTL_INFRA; ++ value32 = b43legacy_read32(dev, B43legacy_MMIO_MACCTL); ++ value32 &= ~B43legacy_MACCTL_INFRA; + b43legacy_write32(dev, B43legacy_MMIO_MACCTL, value32); -+ value32 =3D b43legacy_read32(dev, B43legacy_MMIO_MACCTL); -+ value32 |=3D B43legacy_MACCTL_INFRA; ++ value32 = b43legacy_read32(dev, B43legacy_MMIO_MACCTL); ++ value32 |= B43legacy_MACCTL_INFRA; + b43legacy_write32(dev, B43legacy_MMIO_MACCTL, value32); -=20 + if (b43legacy_using_pio(dev)) { b43legacy_write32(dev, 0x0210, 0x00000100); -@@ -2951,12 +2980,19 @@ static void b43legacy_wireless_core_exit(struct= - b43legacy_wldev *dev) +@@ -2951,12 +2980,19 @@ static void b43legacy_wireless_core_exit(struct b43legacy_wldev *dev) { - struct b43legacy_wl *wl =3D dev->wl; - struct b43legacy_phy *phy =3D &dev->phy; + struct b43legacy_wl *wl = dev->wl; + struct b43legacy_phy *phy = &dev->phy; + u32 macctl; -=20 - B43legacy_WARN_ON(b43legacy_status(dev) > B43legacy_STAT_INITIALIZED)= -; - if (b43legacy_status(dev) !=3D B43legacy_STAT_INITIALIZED) + + B43legacy_WARN_ON(b43legacy_status(dev) > B43legacy_STAT_INITIALIZED); + if (b43legacy_status(dev) != B43legacy_STAT_INITIALIZED) return; b43legacy_set_status(dev, B43legacy_STAT_UNINIT); -=20 + + /* Stop the microcode PSM. */ -+ macctl =3D b43legacy_read32(dev, B43legacy_MMIO_MACCTL); -+ macctl &=3D ~B43legacy_MACCTL_PSM_RUN; -+ macctl |=3D B43legacy_MACCTL_PSM_JMP0; ++ macctl = b43legacy_read32(dev, B43legacy_MMIO_MACCTL); ++ macctl &= ~B43legacy_MACCTL_PSM_RUN; ++ macctl |= B43legacy_MACCTL_PSM_JMP0; + b43legacy_write32(dev, B43legacy_MMIO_MACCTL, macctl); + mutex_unlock(&wl->mutex); /* Must unlock as it would otherwise deadlock. No races here. * Cancel possibly pending workqueues. */ -@@ -3221,6 +3257,7 @@ static int b43legacy_op_start(struct ieee80211_hw= - *hw) - struct b43legacy_wldev *dev =3D wl->current_dev; - int did_init =3D 0; - int err =3D 0; -+ bool do_rfkill_exit =3D 0; -=20 +@@ -3221,6 +3257,7 @@ static int b43legacy_op_start(struct ieee80211_hw *hw) + struct b43legacy_wldev *dev = wl->current_dev; + int did_init = 0; + int err = 0; ++ bool do_rfkill_exit = 0; + /* First register RFkill. * LEDs that are registered later depend on it. */ -@@ -3230,8 +3267,10 @@ static int b43legacy_op_start(struct ieee80211_h= -w *hw) -=20 +@@ -3230,8 +3267,10 @@ static int b43legacy_op_start(struct ieee80211_hw *hw) + if (b43legacy_status(dev) < B43legacy_STAT_INITIALIZED) { - err =3D b43legacy_wireless_core_init(dev); + err = b43legacy_wireless_core_init(dev); - if (err) + if (err) { -+ do_rfkill_exit =3D 1; ++ do_rfkill_exit = 1; goto out_mutex_unlock; + } - did_init =3D 1; + did_init = 1; } -=20 -@@ -3240,6 +3279,7 @@ static int b43legacy_op_start(struct ieee80211_hw= - *hw) + +@@ -3240,6 +3279,7 @@ static int b43legacy_op_start(struct ieee80211_hw *hw) if (err) { if (did_init) b43legacy_wireless_core_exit(dev); -+ do_rfkill_exit =3D 1; ++ do_rfkill_exit = 1; goto out_mutex_unlock; } } -@@ -3247,6 +3287,9 @@ static int b43legacy_op_start(struct ieee80211_hw= - *hw) +@@ -3247,6 +3287,9 @@ static int b43legacy_op_start(struct ieee80211_hw *hw) out_mutex_unlock: mutex_unlock(&wl->mutex); -=20 + + if (do_rfkill_exit) + b43legacy_rfkill_exit(dev); + return err; } -=20 -diff --git a/drivers/net/wireless/b43legacy/phy.c b/drivers/net/wireles= -s/b43legacy/phy.c + +diff --git a/drivers/net/wireless/b43legacy/phy.c b/drivers/net/wireless/b43legacy/phy.c index c16febb..8e5c09b 100644 --- a/drivers/net/wireless/b43legacy/phy.c +++ b/drivers/net/wireless/b43legacy/phy.c -@@ -140,7 +140,7 @@ void b43legacy_phy_calibrate(struct b43legacy_wldev= - *dev) +@@ -140,7 +140,7 @@ void b43legacy_phy_calibrate(struct b43legacy_wldev *dev) { - struct b43legacy_phy *phy =3D &dev->phy; -=20 -- b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD); /* Dummy read.= - */ + struct b43legacy_phy *phy = &dev->phy; + +- b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD); /* Dummy read. */ + b43legacy_read32(dev, B43legacy_MMIO_MACCTL); /* Dummy read. */ if (phy->calibrated) return; - if (phy->type =3D=3D B43legacy_PHYTYPE_G && phy->rev =3D=3D 1) { -@@ -2231,16 +2231,16 @@ bit26 =3D 1; + if (phy->type == B43legacy_PHYTYPE_G && phy->rev == 1) { +@@ -2231,16 +2231,16 @@ bit26 = 1; * or the latest PS-Poll packet sent was successful, * set bit26 */ } -- status =3D b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD); -+ status =3D b43legacy_read32(dev, B43legacy_MMIO_MACCTL); +- status = b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD); ++ status = b43legacy_read32(dev, B43legacy_MMIO_MACCTL); if (bit25) -- status |=3D B43legacy_SBF_PS1; -+ status |=3D B43legacy_MACCTL_HWPS; +- status |= B43legacy_SBF_PS1; ++ status |= B43legacy_MACCTL_HWPS; else -- status &=3D ~B43legacy_SBF_PS1; -+ status &=3D ~B43legacy_MACCTL_HWPS; +- status &= ~B43legacy_SBF_PS1; ++ status &= ~B43legacy_MACCTL_HWPS; if (bit26) -- status |=3D B43legacy_SBF_PS2; -+ status |=3D B43legacy_MACCTL_AWAKE; +- status |= B43legacy_SBF_PS2; ++ status |= B43legacy_MACCTL_AWAKE; else -- status &=3D ~B43legacy_SBF_PS2; +- status &= ~B43legacy_SBF_PS2; - b43legacy_write32(dev, B43legacy_MMIO_STATUS_BITFIELD, status); -+ status &=3D ~B43legacy_MACCTL_AWAKE; ++ status &= ~B43legacy_MACCTL_AWAKE; + b43legacy_write32(dev, B43legacy_MMIO_MACCTL, status); - if (bit26 && dev->dev->id.revision >=3D 5) { - for (i =3D 0; i < 100; i++) { + if (bit26 && dev->dev->id.revision >= 5) { + for (i = 0; i < 100; i++) { if (b43legacy_shm_read32(dev, B43legacy_SHM_SHARED, -diff --git a/drivers/net/wireless/b43legacy/pio.c b/drivers/net/wireles= -s/b43legacy/pio.c +diff --git a/drivers/net/wireless/b43legacy/pio.c b/drivers/net/wireless/b43legacy/pio.c index de843ac..e4f4c5c 100644 --- a/drivers/net/wireless/b43legacy/pio.c +++ b/drivers/net/wireless/b43legacy/pio.c -@@ -334,9 +334,9 @@ struct b43legacy_pioqueue *b43legacy_setup_pioqueue= -(struct b43legacy_wldev *dev, +@@ -334,9 +334,9 @@ struct b43legacy_pioqueue *b43legacy_setup_pioqueue(struct b43legacy_wldev *dev, tasklet_init(&queue->txtask, tx_tasklet, (unsigned long)queue); -=20 -- value =3D b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD); -- value &=3D ~B43legacy_SBF_XFER_REG_BYTESWAP; + +- value = b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD); +- value &= ~B43legacy_SBF_XFER_REG_BYTESWAP; - b43legacy_write32(dev, B43legacy_MMIO_STATUS_BITFIELD, value); -+ value =3D b43legacy_read32(dev, B43legacy_MMIO_MACCTL); -+ value &=3D ~B43legacy_MACCTL_BE; ++ value = b43legacy_read32(dev, B43legacy_MMIO_MACCTL); ++ value &= ~B43legacy_MACCTL_BE; + b43legacy_write32(dev, B43legacy_MMIO_MACCTL, value); -=20 - qsize =3D b43legacy_read16(dev, queue->mmio_base + + qsize = b43legacy_read16(dev, queue->mmio_base + B43legacy_PIO_TXQBUFSIZE); -diff --git a/drivers/net/wireless/b43legacy/radio.c b/drivers/net/wirel= -ess/b43legacy/radio.c +diff --git a/drivers/net/wireless/b43legacy/radio.c b/drivers/net/wireless/b43legacy/radio.c index 318a270..955832e 100644 --- a/drivers/net/wireless/b43legacy/radio.c +++ b/drivers/net/wireless/b43legacy/radio.c -@@ -91,10 +91,10 @@ void b43legacy_radio_lock(struct b43legacy_wldev *d= -ev) +@@ -91,10 +91,10 @@ void b43legacy_radio_lock(struct b43legacy_wldev *dev) { u32 status; -=20 -- status =3D b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD); + +- status = b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD); - B43legacy_WARN_ON(status & B43legacy_SBF_RADIOREG_LOCK); -- status |=3D B43legacy_SBF_RADIOREG_LOCK; +- status |= B43legacy_SBF_RADIOREG_LOCK; - b43legacy_write32(dev, B43legacy_MMIO_STATUS_BITFIELD, status); -+ status =3D b43legacy_read32(dev, B43legacy_MMIO_MACCTL); ++ status = b43legacy_read32(dev, B43legacy_MMIO_MACCTL); + B43legacy_WARN_ON(status & B43legacy_MACCTL_RADIOLOCK); -+ status |=3D B43legacy_MACCTL_RADIOLOCK; ++ status |= B43legacy_MACCTL_RADIOLOCK; + b43legacy_write32(dev, B43legacy_MMIO_MACCTL, status); mmiowb(); udelay(10); } -@@ -104,10 +104,10 @@ void b43legacy_radio_unlock(struct b43legacy_wlde= -v *dev) +@@ -104,10 +104,10 @@ void b43legacy_radio_unlock(struct b43legacy_wldev *dev) u32 status; -=20 + b43legacy_read16(dev, B43legacy_MMIO_PHY_VER); /* dummy read */ -- status =3D b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD); +- status = b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD); - B43legacy_WARN_ON(!(status & B43legacy_SBF_RADIOREG_LOCK)); -- status &=3D ~B43legacy_SBF_RADIOREG_LOCK; +- status &= ~B43legacy_SBF_RADIOREG_LOCK; - b43legacy_write32(dev, B43legacy_MMIO_STATUS_BITFIELD, status); -+ status =3D b43legacy_read32(dev, B43legacy_MMIO_MACCTL); ++ status = b43legacy_read32(dev, B43legacy_MMIO_MACCTL); + B43legacy_WARN_ON(!(status & B43legacy_MACCTL_RADIOLOCK)); -+ status &=3D ~B43legacy_MACCTL_RADIOLOCK; ++ status &= ~B43legacy_MACCTL_RADIOLOCK; + b43legacy_write32(dev, B43legacy_MMIO_MACCTL, status); mmiowb(); } -=20 -diff --git a/drivers/net/wireless/hostap/hostap_80211.h b/drivers/net/w= -ireless/hostap/hostap_80211.h + +diff --git a/drivers/net/wireless/hostap/hostap_80211.h b/drivers/net/wireless/hostap/hostap_80211.h index d6b9362..3694b1e 100644 --- a/drivers/net/wireless/hostap/hostap_80211.h +++ b/drivers/net/wireless/hostap/hostap_80211.h @@ -71,11 +71,6 @@ struct hostap_80211_rx_status { u16 rate; /* in 100 kbps */ }; -=20 + - -void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb, - struct hostap_80211_rx_status *rx_stats); @@ -1193,13 +1116,11 @@ index d6b9362..3694b1e 100644 /* prism2_rx_80211 'type' argument */ enum { PRISM2_RX_MONITOR, PRISM2_RX_MGMT, PRISM2_RX_NON_ASSOC, -diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wire= -less/hostap/hostap_cs.c +diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c index 0759380..437a9bc 100644 --- a/drivers/net/wireless/hostap/hostap_cs.c +++ b/drivers/net/wireless/hostap/hostap_cs.c -@@ -891,6 +891,9 @@ static struct pcmcia_device_id hostap_cs_ids[] =3D = -{ +@@ -891,6 +891,9 @@ static struct pcmcia_device_id hostap_cs_ids[] = { PCMCIA_DEVICE_PROD_ID123( "The Linksys Group, Inc.", "Wireless Network CF Card", "ISL37300P", 0xa5f472c2, 0x9c05598d, 0xc9049a39), @@ -1209,44 +1130,33 @@ index 0759380..437a9bc 100644 PCMCIA_DEVICE_NULL }; MODULE_DEVICE_TABLE(pcmcia, hostap_cs_ids); -diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-hw.h b/drivers/net/w= -ireless/iwlwifi/iwl-3945-hw.h +diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-hw.h b/drivers/net/wireless/iwlwifi/iwl-3945-hw.h index 6e01873..571815d 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945-hw.h +++ b/drivers/net/wireless/iwlwifi/iwl-3945-hw.h @@ -373,7 +373,7 @@ struct iwl3945_eeprom { - #define CSR_INT_BIT_HW_ERR (1 << 29) /* DMA hardware error FH_IN= -T[31] */ + #define CSR_INT_BIT_HW_ERR (1 << 29) /* DMA hardware error FH_INT[31] */ #define CSR_INT_BIT_DNLD (1 << 28) /* uCode Download */ #define CSR_INT_BIT_FH_TX (1 << 27) /* Tx DMA FH_INT[1:0] */ --#define CSR_INT_BIT_MAC_CLK_ACTV (1 << 26) /* NIC controller's clock t= -oggled on/off */ +-#define CSR_INT_BIT_MAC_CLK_ACTV (1 << 26) /* NIC controller's clock toggled on/off */ +#define CSR_INT_BIT_SCD (1 << 26) /* TXQ pointer advanced */ #define CSR_INT_BIT_SW_ERR (1 << 25) /* uCode error */ - #define CSR_INT_BIT_RF_KILL (1 << 7) /* HW RFKILL switch GP_CNTR= -L[27] toggled */ - #define CSR_INT_BIT_CT_KILL (1 << 6) /* Critical temp (chip too = -hot) rfkill */ -diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wire= -less/iwlwifi/iwl-3945.c + #define CSR_INT_BIT_RF_KILL (1 << 7) /* HW RFKILL switch GP_CNTRL[27] toggled */ + #define CSR_INT_BIT_CT_KILL (1 << 6) /* Critical temp (chip too hot) rfkill */ +diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index 76c4ed1..4fdeb53 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c -@@ -2369,18 +2369,4 @@ struct pci_device_id iwl3945_hw_card_ids[] =3D { +@@ -2369,18 +2369,4 @@ struct pci_device_id iwl3945_hw_card_ids[] = { {0} }; -=20 + -/* -- * Clear the OWNER_MSK, to establish driver (instead of uCode running = -on -- * embedded controller) as EEPROM reader; each read is a series of pul= -ses -- * to/from the EEPROM chip, not a single event, so even reads could co= -nflict -- * if they weren't arbitrated by some ownership mechanism. Here, the = -driver -- * simply claims ownership, which should be safe when this function is= - called +- * Clear the OWNER_MSK, to establish driver (instead of uCode running on +- * embedded controller) as EEPROM reader; each read is a series of pulses +- * to/from the EEPROM chip, not a single event, so even reads could conflict +- * if they weren't arbitrated by some ownership mechanism. Here, the driver +- * simply claims ownership, which should be safe when this function is called - * (i.e. before loading uCode!). - */ -inline int iwl3945_eeprom_acquire_semaphore(struct iwl3945_priv *priv) @@ -1256,60 +1166,48 @@ driver -} - MODULE_DEVICE_TABLE(pci, iwl3945_hw_card_ids); -diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h b/drivers/net/wire= -less/iwlwifi/iwl-3945.h +diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h b/drivers/net/wireless/iwlwifi/iwl-3945.h index 20b925f..1da14f9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.h +++ b/drivers/net/wireless/iwlwifi/iwl-3945.h -@@ -671,7 +671,6 @@ extern int iwl3945_hw_channel_switch(struct iwl3945= -_priv *priv, u16 channel); +@@ -671,7 +671,6 @@ extern int iwl3945_hw_channel_switch(struct iwl3945_priv *priv, u16 channel); /* * Forward declare iwl-3945.c functions for iwl-base.c */ --extern int iwl3945_eeprom_acquire_semaphore(struct iwl3945_priv *priv)= -; - extern __le32 iwl3945_get_antenna_flags(const struct iwl3945_priv *pri= -v); +-extern int iwl3945_eeprom_acquire_semaphore(struct iwl3945_priv *priv); + extern __le32 iwl3945_get_antenna_flags(const struct iwl3945_priv *priv); extern int iwl3945_init_hw_rate_table(struct iwl3945_priv *priv); extern void iwl3945_reg_txpower_periodic(struct iwl3945_priv *priv); @@ -791,7 +790,6 @@ struct iwl3945_priv { u16 active_rate_basic; -=20 + u8 call_post_assoc_from_beacon; - u8 assoc_station_added; /* Rate scaling data */ s8 data_retry_limit; u8 retry_rate; -diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-hw.h b/drivers/net/w= -ireless/iwlwifi/iwl-4965-hw.h +diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-hw.h b/drivers/net/wireless/iwlwifi/iwl-4965-hw.h index ff71c09..ffe1e9d 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965-hw.h +++ b/drivers/net/wireless/iwlwifi/iwl-4965-hw.h @@ -465,7 +465,7 @@ struct iwl4965_eeprom { - #define CSR_INT_BIT_HW_ERR (1 << 29) /* DMA hardware error FH_IN= -T[31] */ + #define CSR_INT_BIT_HW_ERR (1 << 29) /* DMA hardware error FH_INT[31] */ #define CSR_INT_BIT_DNLD (1 << 28) /* uCode Download */ #define CSR_INT_BIT_FH_TX (1 << 27) /* Tx DMA FH_INT[1:0] */ --#define CSR_INT_BIT_MAC_CLK_ACTV (1 << 26) /* NIC controller's clock t= -oggled on/off */ +-#define CSR_INT_BIT_MAC_CLK_ACTV (1 << 26) /* NIC controller's clock toggled on/off */ +#define CSR_INT_BIT_SCD (1 << 26) /* TXQ pointer advanced */ #define CSR_INT_BIT_SW_ERR (1 << 25) /* uCode error */ - #define CSR_INT_BIT_RF_KILL (1 << 7) /* HW RFKILL switch GP_CNTR= -L[27] toggled */ - #define CSR_INT_BIT_CT_KILL (1 << 6) /* Critical temp (chip too = -hot) rfkill */ -diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wire= -less/iwlwifi/iwl-4965.c + #define CSR_INT_BIT_RF_KILL (1 << 7) /* HW RFKILL switch GP_CNTRL[27] toggled */ + #define CSR_INT_BIT_CT_KILL (1 << 6) /* Critical temp (chip too hot) rfkill */ +diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index 04db34b..569347f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c -@@ -4961,11 +4961,4 @@ int iwl4965_eeprom_acquire_semaphore(struct iwl4= -965_priv *priv) +@@ -4961,11 +4961,4 @@ int iwl4965_eeprom_acquire_semaphore(struct iwl4965_priv *priv) return rc; } -=20 --inline void iwl4965_eeprom_release_semaphore(struct iwl4965_priv *priv= -) + +-inline void iwl4965_eeprom_release_semaphore(struct iwl4965_priv *priv) -{ - iwl4965_clear_bit(priv, CSR_HW_IF_CONFIG_REG, - CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM); @@ -1317,65 +1215,52 @@ index 04db34b..569347f 100644 - - MODULE_DEVICE_TABLE(pci, iwl4965_hw_card_ids); -diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.h b/drivers/net/wire= -less/iwlwifi/iwl-4965.h +diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.h b/drivers/net/wireless/iwlwifi/iwl-4965.h index 78bc148..9cb82be 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.h +++ b/drivers/net/wireless/iwlwifi/iwl-4965.h @@ -750,7 +750,6 @@ struct iwl4965_priv; * Forward declare iwl-4965.c functions for iwl-base.c */ - extern int iwl4965_eeprom_acquire_semaphore(struct iwl4965_priv *priv)= -; --extern void iwl4965_eeprom_release_semaphore(struct iwl4965_priv *priv= -); -=20 + extern int iwl4965_eeprom_acquire_semaphore(struct iwl4965_priv *priv); +-extern void iwl4965_eeprom_release_semaphore(struct iwl4965_priv *priv); + extern int iwl4965_tx_queue_update_wr_ptr(struct iwl4965_priv *priv, struct iwl4965_tx_queue *txq, -diff --git a/drivers/net/wireless/iwlwifi/iwl-helpers.h b/drivers/net/w= -ireless/iwlwifi/iwl-helpers.h +diff --git a/drivers/net/wireless/iwlwifi/iwl-helpers.h b/drivers/net/wireless/iwlwifi/iwl-helpers.h index cd2eb18..cb009f4 100644 --- a/drivers/net/wireless/iwlwifi/iwl-helpers.h +++ b/drivers/net/wireless/iwlwifi/iwl-helpers.h -@@ -246,10 +246,10 @@ static inline int iwl_check_bits(unsigned long fi= -eld, unsigned long mask) +@@ -246,10 +246,10 @@ static inline int iwl_check_bits(unsigned long field, unsigned long mask) static inline unsigned long elapsed_jiffies(unsigned long start, unsigned long end) { - if (end > start) -+ if (end >=3D start) ++ if (end >= start) return end - start; -=20 + - return end + (MAX_JIFFY_OFFSET - start); + return end + (MAX_JIFFY_OFFSET - start) + 1; } -=20 + static inline u8 iwl_get_dma_hi_address(dma_addr_t addr) -diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/= -wireless/iwlwifi/iwl3945-base.c +diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 748ac12..33239f1 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c -@@ -1557,6 +1557,20 @@ static void get_eeprom_mac(struct iwl3945_priv *= -priv, u8 *mac) +@@ -1557,6 +1557,20 @@ static void get_eeprom_mac(struct iwl3945_priv *priv, u8 *mac) memcpy(mac, priv->eeprom.mac_address, 6); } -=20 + +/* -+ * Clear the OWNER_MSK, to establish driver (instead of uCode running = -on -+ * embedded controller) as EEPROM reader; each read is a series of pul= -ses -+ * to/from the EEPROM chip, not a single event, so even reads could co= -nflict -+ * if they weren't arbitrated by some ownership mechanism. Here, the = -driver -+ * simply claims ownership, which should be safe when this function is= - called ++ * Clear the OWNER_MSK, to establish driver (instead of uCode running on ++ * embedded controller) as EEPROM reader; each read is a series of pulses ++ * to/from the EEPROM chip, not a single event, so even reads could conflict ++ * if they weren't arbitrated by some ownership mechanism. Here, the driver ++ * simply claims ownership, which should be safe when this function is called + * (i.e. before loading uCode!). + */ -+static inline int iwl3945_eeprom_acquire_semaphore(struct iwl3945_priv= - *priv) ++static inline int iwl3945_eeprom_acquire_semaphore(struct iwl3945_priv *priv) +{ + _iwl3945_clear_bit(priv, CSR_EEPROM_GP, CSR_EEPROM_GP_IF_OWNER_MSK); + return 0; @@ -1384,18 +1269,16 @@ driver /** * iwl3945_eeprom_init - read EEPROM contents * -@@ -2792,7 +2806,7 @@ static int iwl3945_tx_skb(struct iwl3945_priv *pr= -iv, +@@ -2792,7 +2806,7 @@ static int iwl3945_tx_skb(struct iwl3945_priv *priv, #endif -=20 + /* drop all data frame if we are not associated */ - if (!iwl3945_is_associated(priv) && !priv->assoc_id && + if ((!iwl3945_is_associated(priv) || !priv->assoc_id) && - ((fc & IEEE80211_FCTL_FTYPE) =3D=3D IEEE80211_FTYPE_DATA)) { + ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA)) { IWL_DEBUG_DROP("Dropping - !iwl3945_is_associated\n"); goto drop_unlock; -@@ -4745,8 +4759,9 @@ static void iwl3945_irq_tasklet(struct iwl3945_pr= -iv *priv) +@@ -4745,8 +4759,9 @@ static void iwl3945_irq_tasklet(struct iwl3945_priv *priv) #ifdef CONFIG_IWL3945_DEBUG if (iwl3945_debug_level & (IWL_DL_ISR)) { /* NIC fires this, but we don't use it, redundant with WAKEUP */ @@ -1404,59 +1287,51 @@ iv *priv) + if (inta & CSR_INT_BIT_SCD) + IWL_DEBUG_ISR("Scheduler finished to transmit " + "the frame/frames.\n"); -=20 + /* Alive notification via Rx interrupt will do the real work */ if (inta & CSR_INT_BIT_ALIVE) -@@ -4754,7 +4769,7 @@ static void iwl3945_irq_tasklet(struct iwl3945_pr= -iv *priv) +@@ -4754,7 +4769,7 @@ static void iwl3945_irq_tasklet(struct iwl3945_priv *priv) } #endif /* Safely ignore these bits for debug checks below */ -- inta &=3D ~(CSR_INT_BIT_MAC_CLK_ACTV | CSR_INT_BIT_ALIVE); -+ inta &=3D ~(CSR_INT_BIT_SCD | CSR_INT_BIT_ALIVE); -=20 +- inta &= ~(CSR_INT_BIT_MAC_CLK_ACTV | CSR_INT_BIT_ALIVE); ++ inta &= ~(CSR_INT_BIT_SCD | CSR_INT_BIT_ALIVE); + /* HW RF KILL switch toggled (4965 only) */ if (inta & CSR_INT_BIT_RF_KILL) { -@@ -4890,8 +4905,11 @@ static irqreturn_t iwl3945_isr(int irq, void *da= -ta) +@@ -4890,8 +4905,11 @@ static irqreturn_t iwl3945_isr(int irq, void *data) IWL_DEBUG_ISR("ISR inta 0x%08x, enabled 0x%08x, fh 0x%08x\n", inta, inta_mask, inta_fh); -=20 -+ inta &=3D ~CSR_INT_BIT_SCD; + ++ inta &= ~CSR_INT_BIT_SCD; + - /* iwl3945_irq_tasklet() will service interrupts and re-enable them *= -/ + /* iwl3945_irq_tasklet() will service interrupts and re-enable them */ - tasklet_schedule(&priv->irq_tasklet); + if (likely(inta || inta_fh)) + tasklet_schedule(&priv->irq_tasklet); unplugged: spin_unlock(&priv->lock); -=20 -@@ -5146,6 +5164,15 @@ static int iwl3945_init_channel_map(struct iwl39= -45_priv *priv) + +@@ -5146,6 +5164,15 @@ static int iwl3945_init_channel_map(struct iwl3945_priv *priv) return 0; } -=20 + +/* -+ * iwl3945_free_channel_map - undo allocations in iwl3945_init_channel= -_map ++ * iwl3945_free_channel_map - undo allocations in iwl3945_init_channel_map + */ +static void iwl3945_free_channel_map(struct iwl3945_priv *priv) +{ + kfree(priv->channel_info); -+ priv->channel_count =3D 0; ++ priv->channel_count = 0; +} + - /* For active scan, listen ACTIVE_DWELL_TIME (msec) on each channel af= -ter - * sending probe req. This should be set long enough to hear probe re= -sponses + /* For active scan, listen ACTIVE_DWELL_TIME (msec) on each channel after + * sending probe req. This should be set long enough to hear probe responses * from more than one AP. */ -@@ -5471,6 +5498,17 @@ static int iwl3945_init_geos(struct iwl3945_priv= - *priv) +@@ -5471,6 +5498,17 @@ static int iwl3945_init_geos(struct iwl3945_priv *priv) return 0; } -=20 + +/* + * iwl3945_free_geos - undo allocations in iwl3945_init_geos + */ @@ -1468,16 +1343,14 @@ sponses + clear_bit(STATUS_GEO_CONFIGURED, &priv->status); +} + - /*********************************************************************= -********* + /****************************************************************************** * * uCode download functions -@@ -6130,15 +6168,6 @@ static void iwl3945_alive_start(struct iwl3945_p= -riv *priv) +@@ -6130,15 +6168,6 @@ static void iwl3945_alive_start(struct iwl3945_priv *priv) /* Clear out the uCode error bit if it is set */ clear_bit(STATUS_FW_ERROR, &priv->status); -=20 -- rc =3D iwl3945_init_channel_map(priv); + +- rc = iwl3945_init_channel_map(priv); - if (rc) { - IWL_ERROR("initializing regulatory failed: %d\n", rc); - return; @@ -1488,39 +1361,36 @@ riv *priv) - if (iwl3945_is_rfkill(priv)) return; -=20 -@@ -6599,7 +6628,7 @@ static void iwl3945_bg_request_scan(struct work_s= -truct *data) + +@@ -6599,7 +6628,7 @@ static void iwl3945_bg_request_scan(struct work_struct *data) * that based on the direct_mask added to each channel entry */ - scan->tx_cmd.len =3D cpu_to_le16( + scan->tx_cmd.len = cpu_to_le16( iwl3945_fill_probe_req(priv, (struct ieee80211_mgmt *)scan->data, - IWL_MAX_SCAN_SIZE - sizeof(scan), 0)); + IWL_MAX_SCAN_SIZE - sizeof(*scan), 0)); - scan->tx_cmd.tx_flags =3D TX_CMD_FLG_SEQ_CTL_MSK; - scan->tx_cmd.sta_id =3D priv->hw_setting.bcast_sta_id; - scan->tx_cmd.stop_time.life_time =3D TX_CMD_LIFE_TIME_INFINITE; -@@ -7120,7 +7149,7 @@ static void iwl3945_config_ap(struct iwl3945_priv= - *priv) + scan->tx_cmd.tx_flags = TX_CMD_FLG_SEQ_CTL_MSK; + scan->tx_cmd.sta_id = priv->hw_setting.bcast_sta_id; + scan->tx_cmd.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE; +@@ -7120,7 +7149,7 @@ static void iwl3945_config_ap(struct iwl3945_priv *priv) { - int rc =3D 0; -=20 + int rc = 0; + - if (priv->status & STATUS_EXIT_PENDING) + if (test_bit(STATUS_EXIT_PENDING, &priv->status)) return; -=20 + /* The following should be done only at AP bring up */ -@@ -8614,11 +8643,24 @@ static int iwl3945_pci_probe(struct pci_dev *pd= -ev, const struct pci_device_id *e +@@ -8614,11 +8643,24 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e IWL_DEBUG_INFO("MAC address: %s\n", print_mac(mac, priv->mac_addr)); SET_IEEE80211_PERM_ADDR(priv->hw, priv->mac_addr); -=20 -+ err =3D iwl3945_init_channel_map(priv); + ++ err = iwl3945_init_channel_map(priv); + if (err) { + IWL_ERROR("initializing regulatory failed: %d\n", err); + goto out_remove_sysfs; + } + -+ err =3D iwl3945_init_geos(priv); ++ err = iwl3945_init_geos(priv); + if (err) { + IWL_ERROR("initializing geos failed: %d\n", err); + goto out_free_channel_map; @@ -1528,52 +1398,47 @@ ev, const struct pci_device_id *e + iwl3945_reset_channel_flag(priv); + iwl3945_rate_control_register(priv->hw); - err =3D ieee80211_register_hw(priv->hw); + err = ieee80211_register_hw(priv->hw); if (err) { IWL_ERROR("Failed to register network device (error %d)\n", err); - goto out_remove_sysfs; + goto out_free_geos; } -=20 - priv->hw->conf.beacon_int =3D 100; -@@ -8628,6 +8670,10 @@ static int iwl3945_pci_probe(struct pci_dev *pde= -v, const struct pci_device_id *e -=20 + + priv->hw->conf.beacon_int = 100; +@@ -8628,6 +8670,10 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e + return 0; -=20 + + out_free_geos: + iwl3945_free_geos(priv); + out_free_channel_map: + iwl3945_free_channel_map(priv); out_remove_sysfs: sysfs_remove_group(&pdev->dev.kobj, &iwl3945_attribute_group); -=20 -@@ -8702,10 +8748,8 @@ static void iwl3945_pci_remove(struct pci_dev *p= -dev) + +@@ -8702,10 +8748,8 @@ static void iwl3945_pci_remove(struct pci_dev *pdev) pci_disable_device(pdev); pci_set_drvdata(pdev, NULL); -=20 + - kfree(priv->channel_info); - - kfree(priv->ieee_channels); - kfree(priv->ieee_rates); + iwl3945_free_channel_map(priv); + iwl3945_free_geos(priv); -=20 + if (priv->ibss_beacon) dev_kfree_skb(priv->ibss_beacon); -diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/= -wireless/iwlwifi/iwl4965-base.c +diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index c86da5c..bf3a60c 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c -@@ -1639,6 +1639,12 @@ static void get_eeprom_mac(struct iwl4965_priv *= -priv, u8 *mac) +@@ -1639,6 +1639,12 @@ static void get_eeprom_mac(struct iwl4965_priv *priv, u8 *mac) memcpy(mac, priv->eeprom.mac_address, 6); } -=20 -+static inline void iwl4965_eeprom_release_semaphore(struct iwl4965_pri= -v *priv) + ++static inline void iwl4965_eeprom_release_semaphore(struct iwl4965_priv *priv) +{ + iwl4965_clear_bit(priv, CSR_HW_IF_CONFIG_REG, + CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM); @@ -1582,22 +1447,20 @@ v *priv) /** * iwl4965_eeprom_init - read EEPROM contents * -@@ -2927,8 +2933,10 @@ static int iwl4965_tx_skb(struct iwl4965_priv *p= -riv, +@@ -2927,8 +2933,10 @@ static int iwl4965_tx_skb(struct iwl4965_priv *priv, #endif -=20 + /* drop all data frame if we are not associated */ - if (!iwl4965_is_associated(priv) && !priv->assoc_id && -- ((fc & IEEE80211_FCTL_FTYPE) =3D=3D IEEE80211_FTYPE_DATA)) { -+ if (((fc & IEEE80211_FCTL_FTYPE) =3D=3D IEEE80211_FTYPE_DATA) && +- ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA)) { ++ if (((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA) && + (!iwl4965_is_associated(priv) || + !priv->assoc_id || + !priv->assoc_station_added)) { IWL_DEBUG_DROP("Dropping - !iwl4965_is_associated\n"); goto drop_unlock; } -@@ -5131,8 +5139,9 @@ static void iwl4965_irq_tasklet(struct iwl4965_pr= -iv *priv) +@@ -5131,8 +5139,9 @@ static void iwl4965_irq_tasklet(struct iwl4965_priv *priv) #ifdef CONFIG_IWL4965_DEBUG if (iwl4965_debug_level & (IWL_DL_ISR)) { /* NIC fires this, but we don't use it, redundant with WAKEUP */ @@ -1606,59 +1469,51 @@ iv *priv) + if (inta & CSR_INT_BIT_SCD) + IWL_DEBUG_ISR("Scheduler finished to transmit " + "the frame/frames.\n"); -=20 + /* Alive notification via Rx interrupt will do the real work */ if (inta & CSR_INT_BIT_ALIVE) -@@ -5140,7 +5149,7 @@ static void iwl4965_irq_tasklet(struct iwl4965_pr= -iv *priv) +@@ -5140,7 +5149,7 @@ static void iwl4965_irq_tasklet(struct iwl4965_priv *priv) } #endif /* Safely ignore these bits for debug checks below */ -- inta &=3D ~(CSR_INT_BIT_MAC_CLK_ACTV | CSR_INT_BIT_ALIVE); -+ inta &=3D ~(CSR_INT_BIT_SCD | CSR_INT_BIT_ALIVE); -=20 +- inta &= ~(CSR_INT_BIT_MAC_CLK_ACTV | CSR_INT_BIT_ALIVE); ++ inta &= ~(CSR_INT_BIT_SCD | CSR_INT_BIT_ALIVE); + /* HW RF KILL switch toggled */ if (inta & CSR_INT_BIT_RF_KILL) { -@@ -5269,8 +5278,11 @@ static irqreturn_t iwl4965_isr(int irq, void *da= -ta) +@@ -5269,8 +5278,11 @@ static irqreturn_t iwl4965_isr(int irq, void *data) IWL_DEBUG_ISR("ISR inta 0x%08x, enabled 0x%08x, fh 0x%08x\n", inta, inta_mask, inta_fh); -=20 -+ inta &=3D ~CSR_INT_BIT_SCD; + ++ inta &= ~CSR_INT_BIT_SCD; + - /* iwl4965_irq_tasklet() will service interrupts and re-enable them *= -/ + /* iwl4965_irq_tasklet() will service interrupts and re-enable them */ - tasklet_schedule(&priv->irq_tasklet); + if (likely(inta || inta_fh)) + tasklet_schedule(&priv->irq_tasklet); -=20 + unplugged: spin_unlock(&priv->lock); -@@ -5576,6 +5588,15 @@ static int iwl4965_init_channel_map(struct iwl49= -65_priv *priv) +@@ -5576,6 +5588,15 @@ static int iwl4965_init_channel_map(struct iwl4965_priv *priv) return 0; } -=20 + +/* -+ * iwl4965_free_channel_map - undo allocations in iwl4965_init_channel= -_map ++ * iwl4965_free_channel_map - undo allocations in iwl4965_init_channel_map + */ +static void iwl4965_free_channel_map(struct iwl4965_priv *priv) +{ + kfree(priv->channel_info); -+ priv->channel_count =3D 0; ++ priv->channel_count = 0; +} + - /* For active scan, listen ACTIVE_DWELL_TIME (msec) on each channel af= -ter - * sending probe req. This should be set long enough to hear probe re= -sponses + /* For active scan, listen ACTIVE_DWELL_TIME (msec) on each channel after + * sending probe req. This should be set long enough to hear probe responses * from more than one AP. */ -@@ -5909,6 +5930,17 @@ static int iwl4965_init_geos(struct iwl4965_priv= - *priv) +@@ -5909,6 +5930,17 @@ static int iwl4965_init_geos(struct iwl4965_priv *priv) return 0; } -=20 + +/* + * iwl4965_free_geos - undo allocations in iwl4965_init_geos + */ @@ -1670,16 +1525,14 @@ sponses + clear_bit(STATUS_GEO_CONFIGURED, &priv->status); +} + - /*********************************************************************= -********* + /****************************************************************************** * * uCode download functions -@@ -6560,15 +6592,6 @@ static void iwl4965_alive_start(struct iwl4965_p= -riv *priv) +@@ -6560,15 +6592,6 @@ static void iwl4965_alive_start(struct iwl4965_priv *priv) /* Clear out the uCode error bit if it is set */ clear_bit(STATUS_FW_ERROR, &priv->status); -=20 -- rc =3D iwl4965_init_channel_map(priv); + +- rc = iwl4965_init_channel_map(priv); - if (rc) { - IWL_ERROR("initializing regulatory failed: %d\n", rc); - return; @@ -1690,49 +1543,45 @@ riv *priv) - if (iwl4965_is_rfkill(priv)) return; -=20 -@@ -7023,7 +7046,7 @@ static void iwl4965_bg_request_scan(struct work_s= -truct *data) + +@@ -7023,7 +7046,7 @@ static void iwl4965_bg_request_scan(struct work_struct *data) * that based on the direct_mask added to each channel entry */ - scan->tx_cmd.len =3D cpu_to_le16( + scan->tx_cmd.len = cpu_to_le16( iwl4965_fill_probe_req(priv, (struct ieee80211_mgmt *)scan->data, - IWL_MAX_SCAN_SIZE - sizeof(scan), 0)); + IWL_MAX_SCAN_SIZE - sizeof(*scan), 0)); - scan->tx_cmd.tx_flags =3D TX_CMD_FLG_SEQ_CTL_MSK; - scan->tx_cmd.sta_id =3D priv->hw_setting.bcast_sta_id; - scan->tx_cmd.stop_time.life_time =3D TX_CMD_LIFE_TIME_INFINITE; -@@ -7448,7 +7471,7 @@ static int iwl4965_mac_add_interface(struct ieee8= -0211_hw *hw, -=20 + scan->tx_cmd.tx_flags = TX_CMD_FLG_SEQ_CTL_MSK; + scan->tx_cmd.sta_id = priv->hw_setting.bcast_sta_id; + scan->tx_cmd.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE; +@@ -7448,7 +7471,7 @@ static int iwl4965_mac_add_interface(struct ieee80211_hw *hw, + if (priv->vif) { - IWL_DEBUG_MAC80211("leave - vif !=3D NULL\n"); + IWL_DEBUG_MAC80211("leave - vif != NULL\n"); - return 0; + return -EOPNOTSUPP; } -=20 + spin_lock_irqsave(&priv->lock, flags); -@@ -7580,7 +7603,7 @@ static void iwl4965_config_ap(struct iwl4965_priv= - *priv) +@@ -7580,7 +7603,7 @@ static void iwl4965_config_ap(struct iwl4965_priv *priv) { - int rc =3D 0; -=20 + int rc = 0; + - if (priv->status & STATUS_EXIT_PENDING) + if (test_bit(STATUS_EXIT_PENDING, &priv->status)) return; -=20 + /* The following should be done only at AP bring up */ -@@ -9198,11 +9221,24 @@ static int iwl4965_pci_probe(struct pci_dev *pd= -ev, const struct pci_device_id *e +@@ -9198,11 +9221,24 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e IWL_DEBUG_INFO("MAC address: %s\n", print_mac(mac, priv->mac_addr)); SET_IEEE80211_PERM_ADDR(priv->hw, priv->mac_addr); -=20 -+ err =3D iwl4965_init_channel_map(priv); + ++ err = iwl4965_init_channel_map(priv); + if (err) { + IWL_ERROR("initializing regulatory failed: %d\n", err); + goto out_remove_sysfs; + } + -+ err =3D iwl4965_init_geos(priv); ++ err = iwl4965_init_geos(priv); + if (err) { + IWL_ERROR("initializing geos failed: %d\n", err); + goto out_free_channel_map; @@ -1740,62 +1589,56 @@ ev, const struct pci_device_id *e + iwl4965_reset_channel_flag(priv); + iwl4965_rate_control_register(priv->hw); - err =3D ieee80211_register_hw(priv->hw); + err = ieee80211_register_hw(priv->hw); if (err) { IWL_ERROR("Failed to register network device (error %d)\n", err); - goto out_remove_sysfs; + goto out_free_geos; } -=20 - priv->hw->conf.beacon_int =3D 100; -@@ -9212,6 +9248,10 @@ static int iwl4965_pci_probe(struct pci_dev *pde= -v, const struct pci_device_id *e -=20 + + priv->hw->conf.beacon_int = 100; +@@ -9212,6 +9248,10 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e + return 0; -=20 + + out_free_geos: + iwl4965_free_geos(priv); + out_free_channel_map: + iwl4965_free_channel_map(priv); out_remove_sysfs: sysfs_remove_group(&pdev->dev.kobj, &iwl4965_attribute_group); -=20 -@@ -9286,10 +9326,8 @@ static void iwl4965_pci_remove(struct pci_dev *p= -dev) + +@@ -9286,10 +9326,8 @@ static void iwl4965_pci_remove(struct pci_dev *pdev) pci_disable_device(pdev); pci_set_drvdata(pdev, NULL); -=20 + - kfree(priv->channel_info); - - kfree(priv->ieee_channels); - kfree(priv->ieee_rates); + iwl4965_free_channel_map(priv); + iwl4965_free_geos(priv); -=20 + if (priv->ibss_beacon) dev_kfree_skb(priv->ibss_beacon); -diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wirele= -ss/libertas/assoc.c +diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wireless/libertas/assoc.c index c622e9b..87e145f 100644 --- a/drivers/net/wireless/libertas/assoc.c +++ b/drivers/net/wireless/libertas/assoc.c @@ -12,8 +12,10 @@ #include "cmd.h" -=20 -=20 --static const u8 bssid_any[ETH_ALEN] =3D { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF= -, 0xFF }; --static const u8 bssid_off[ETH_ALEN] =3D { 0x00, 0x00, 0x00, 0x00, 0x00= -, 0x00 }; -+static const u8 bssid_any[ETH_ALEN] __attribute__ ((aligned (2))) =3D + + +-static const u8 bssid_any[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; +-static const u8 bssid_off[ETH_ALEN] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; ++static const u8 bssid_any[ETH_ALEN] __attribute__ ((aligned (2))) = + { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; -+static const u8 bssid_off[ETH_ALEN] __attribute__ ((aligned (2))) =3D ++static const u8 bssid_off[ETH_ALEN] __attribute__ ((aligned (2))) = + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -=20 -=20 + + static int assoc_helper_essid(struct lbs_private *priv, -diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless= -/libertas/dev.h +diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless/libertas/dev.h index 58d7ef6..5a69f2b 100644 --- a/drivers/net/wireless/libertas/dev.h +++ b/drivers/net/wireless/libertas/dev.h @@ -1805,71 +1648,65 @@ index 58d7ef6..5a69f2b 100644 u8 mode; - u8 bssid[ETH_ALEN]; + u8 bssid[ETH_ALEN] __attribute__ ((aligned (2))); -=20 + /** WEP keys */ struct enc_key wep_keys[4]; -diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wirele= -ss/libertas/if_cs.c +diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c index 4b5ab9a..5a9cadb 100644 --- a/drivers/net/wireless/libertas/if_cs.c +++ b/drivers/net/wireless/libertas/if_cs.c -@@ -249,14 +249,14 @@ static irqreturn_t if_cs_interrupt(int irq, void = -*data) +@@ -249,14 +249,14 @@ static irqreturn_t if_cs_interrupt(int irq, void *data) lbs_deb_enter(LBS_DEB_CS); -=20 - int_cause =3D if_cs_read16(card, IF_CS_C_INT_CAUSE); -- if(int_cause =3D=3D 0x0) { -+ if (int_cause =3D=3D 0x0) { + + int_cause = if_cs_read16(card, IF_CS_C_INT_CAUSE); +- if(int_cause == 0x0) { ++ if (int_cause == 0x0) { /* Not for us */ return IRQ_NONE; -=20 - } else if (int_cause =3D=3D 0xffff) { + + } else if (int_cause == 0xffff) { /* Read in junk, the card has probably been removed */ - card->priv->surpriseremoved =3D 1; + card->priv->surpriseremoved = 1; - + return IRQ_HANDLED; } else { if (int_cause & IF_CS_H_IC_TX_OVER) lbs_host_to_card_done(card->priv); -@@ -717,8 +717,8 @@ static void if_cs_release(struct pcmcia_device *p_d= -ev) -=20 +@@ -717,8 +717,8 @@ static void if_cs_release(struct pcmcia_device *p_dev) + lbs_deb_enter(LBS_DEB_CS); -=20 + - pcmcia_disable_device(p_dev); free_irq(p_dev->irq.AssignedIRQ, card); + pcmcia_disable_device(p_dev); if (card->iobase) ioport_unmap(card->iobase); -=20 -diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wirele= -ss/rt2x00/rt61pci.c + +diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index ab52f22..b31f0c2 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c -@@ -1736,7 +1736,8 @@ static void rt61pci_txdone(struct rt2x00_dev *rt2= -x00dev) +@@ -1736,7 +1736,8 @@ static void rt61pci_txdone(struct rt2x00_dev *rt2x00dev) WARNING(rt2x00dev, "TX status report missed for entry %p\n", entry_done); - rt2x00lib_txdone(entry_done, TX_FAIL_OTHER, 0); + rt2x00pci_txdone(rt2x00dev, entry_done, TX_FAIL_OTHER, + 0); - entry_done =3D rt2x00_get_data_entry_done(ring); + entry_done = rt2x00_get_data_entry_done(ring); } -=20 -diff --git a/drivers/net/wireless/rtl8180_dev.c b/drivers/net/wireless/= -rtl8180_dev.c + +diff --git a/drivers/net/wireless/rtl8180_dev.c b/drivers/net/wireless/rtl8180_dev.c index 07f37b0..27ebd68 100644 --- a/drivers/net/wireless/rtl8180_dev.c +++ b/drivers/net/wireless/rtl8180_dev.c @@ -36,6 +36,7 @@ MODULE_LICENSE("GPL"); - static struct pci_device_id rtl8180_table[] __devinitdata =3D { + static struct pci_device_id rtl8180_table[] __devinitdata = { /* rtl8185 */ { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8185) }, + { PCI_DEVICE(PCI_VENDOR_ID_BELKIN, 0x700f) }, { PCI_DEVICE(PCI_VENDOR_ID_BELKIN, 0x701f) }, -=20 + /* rtl8180 */ diff --git a/include/linux/input.h b/include/linux/input.h index 2075d6d..056a17a 100644 @@ -1878,7 +1715,7 @@ index 2075d6d..056a17a 100644 @@ -371,6 +371,8 @@ struct input_absinfo { #define KEY_BRIGHTNESS_ZERO 244 /* brightness off, use ambient */ #define KEY_DISPLAY_OFF 245 /* display device to off state */ -=20 + +#define KEY_WIMAX 246 + #define BTN_MISC 0x100 @@ -1901,16 +1738,15 @@ index 0ce5e0b..e3ab21d 100644 + RFKILL_TYPE_WIMAX, RFKILL_TYPE_MAX, }; -=20 + diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 89e1e30..d44c872 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c -@@ -340,9 +340,42 @@ static u32 ieee80211_rx_load_stats(struct ieee8021= -1_local *local, +@@ -340,9 +340,42 @@ static u32 ieee80211_rx_load_stats(struct ieee80211_local *local, return load; } -=20 + +static ieee80211_txrx_result +ieee80211_rx_h_verify_ip_alignment(struct ieee80211_txrx_data *rx) +{ @@ -1935,35 +1771,33 @@ index 89e1e30..d44c872 100644 + * header and the payload is not supported, the driver is required + * to move the 802.11 header further back in that case. + */ -+ hdrlen =3D ieee80211_get_hdrlen(rx->fc); ++ hdrlen = ieee80211_get_hdrlen(rx->fc); + if (rx->flags & IEEE80211_TXRXD_RX_AMSDU) -+ hdrlen +=3D ETH_HLEN; ++ hdrlen += ETH_HLEN; + WARN_ON_ONCE(((unsigned long)(rx->skb->data + hdrlen)) & 3); + + return TXRX_CONTINUE; +} + - ieee80211_rx_handler ieee80211_rx_pre_handlers[] =3D + ieee80211_rx_handler ieee80211_rx_pre_handlers[] = { ieee80211_rx_h_parse_qos, + ieee80211_rx_h_verify_ip_alignment, NULL }; -=20 -@@ -1679,7 +1712,6 @@ static void __ieee80211_rx_handle_packet(struct i= -eee80211_hw *hw, - struct ieee80211_sub_if_data *prev =3D NULL; + +@@ -1679,7 +1712,6 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw, + struct ieee80211_sub_if_data *prev = NULL; struct sk_buff *skb_new; u8 *bssid; - int hdrlen; -=20 - hdr =3D (struct ieee80211_hdr *) skb->data; + + hdr = (struct ieee80211_hdr *) skb->data; memset(&rx, 0, sizeof(rx)); -@@ -1691,18 +1723,6 @@ static void __ieee80211_rx_handle_packet(struct = -ieee80211_hw *hw, - rx.fc =3D le16_to_cpu(hdr->frame_control); - type =3D rx.fc & IEEE80211_FCTL_FTYPE; -=20 +@@ -1691,18 +1723,6 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw, + rx.fc = le16_to_cpu(hdr->frame_control); + type = rx.fc & IEEE80211_FCTL_FTYPE; + - /* - * Drivers are required to align the payload data to a four-byte - * boundary, so the last two bits of the address where it starts @@ -1973,39 +1807,34 @@ ieee80211_hw *hw, - * the driver is required to move the 802.11 header further back - * in that case. - */ -- hdrlen =3D ieee80211_get_hdrlen(rx.fc); +- hdrlen = ieee80211_get_hdrlen(rx.fc); - WARN_ON_ONCE(((unsigned long)(skb->data + hdrlen)) & 3); - - if (type =3D=3D IEEE80211_FTYPE_DATA || type =3D=3D IEEE80211_FTYPE_M= -GMT) + if (type == IEEE80211_FTYPE_DATA || type == IEEE80211_FTYPE_MGMT) local->dot11ReceivedFragmentCount++; -=20 -@@ -1952,7 +1972,7 @@ static u8 ieee80211_rx_reorder_ampdu(struct ieee8= -0211_local *local, + +@@ -1952,7 +1972,7 @@ static u8 ieee80211_rx_reorder_ampdu(struct ieee80211_local *local, goto end_reorder; -=20 + /* null data frames are excluded */ - if (unlikely(fc & IEEE80211_STYPE_QOS_NULLFUNC)) + if (unlikely(fc & IEEE80211_STYPE_NULLFUNC)) goto end_reorder; -=20 + /* new un-ordered ampdu frame - process it */ diff --git a/net/rfkill/rfkill-input.c b/net/rfkill/rfkill-input.c index d1e9d68..e4b051d 100644 --- a/net/rfkill/rfkill-input.c +++ b/net/rfkill/rfkill-input.c -@@ -84,6 +84,7 @@ static void rfkill_schedule_toggle(struct rfkill_task= - *task) +@@ -84,6 +84,7 @@ static void rfkill_schedule_toggle(struct rfkill_task *task) static DEFINE_RFKILL_TASK(rfkill_wlan, RFKILL_TYPE_WLAN); static DEFINE_RFKILL_TASK(rfkill_bt, RFKILL_TYPE_BLUETOOTH); static DEFINE_RFKILL_TASK(rfkill_uwb, RFKILL_TYPE_UWB); +static DEFINE_RFKILL_TASK(rfkill_wimax, RFKILL_TYPE_WIMAX); -=20 - static void rfkill_event(struct input_handle *handle, unsigned int typ= -e, + + static void rfkill_event(struct input_handle *handle, unsigned int type, unsigned int code, int down) -@@ -99,6 +100,9 @@ static void rfkill_event(struct input_handle *handle= -, unsigned int type, +@@ -99,6 +100,9 @@ static void rfkill_event(struct input_handle *handle, unsigned int type, case KEY_UWB: rfkill_schedule_toggle(&rfkill_uwb); break; @@ -2015,39 +1844,32 @@ e, default: break; } -@@ -159,6 +163,11 @@ static const struct input_device_id rfkill_ids[] =3D= - { - .evbit =3D { BIT_MASK(EV_KEY) }, - .keybit =3D { [BIT_WORD(KEY_UWB)] =3D BIT_MASK(KEY_UWB) }, +@@ -159,6 +163,11 @@ static const struct input_device_id rfkill_ids[] = { + .evbit = { BIT_MASK(EV_KEY) }, + .keybit = { [BIT_WORD(KEY_UWB)] = BIT_MASK(KEY_UWB) }, }, + { -+ .flags =3D INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_KEYBI= -T, -+ .evbit =3D { BIT_MASK(EV_KEY) }, -+ .keybit =3D { [BIT_WORD(KEY_WIMAX)] =3D BIT_MASK(KEY_WIMAX) }, ++ .flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_KEYBIT, ++ .evbit = { BIT_MASK(EV_KEY) }, ++ .keybit = { [BIT_WORD(KEY_WIMAX)] = BIT_MASK(KEY_WIMAX) }, + }, { } }; -=20 + diff --git a/net/rfkill/rfkill.c b/net/rfkill/rfkill.c index d06d338..6562f86 100644 --- a/net/rfkill/rfkill.c +++ b/net/rfkill/rfkill.c @@ -126,6 +126,9 @@ static ssize_t rfkill_type_show(struct device *dev, case RFKILL_TYPE_UWB: - type =3D "ultrawideband"; + type = "ultrawideband"; break; + case RFKILL_TYPE_WIMAX: -+ type =3D "wimax"; ++ type = "wimax"; + break; default: BUG(); } ---=20 +-- John W. Linville linville@tuxdriver.com -- -To unsubscribe from this list: send the line "unsubscribe linux-wireles= -s" in -the body of a message to majordomo@vger.kernel.org -More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/a/content_digest b/N1/content_digest index 9d5e0a4..90ac030 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -21,20 +21,17 @@ "\n" "Individual patches are available here:\n" "\n" - "\thttp://www.kernel.org/pub/linux/kernel/people/linville/wireless-2.6/up=\n" - "stream\n" + "\thttp://www.kernel.org/pub/linux/kernel/people/linville/wireless-2.6/upstream\n" "\n" "---\n" "\n" - "The following changes since commit 85040bcb4643cba578839e953f25e2d1965d=\n" - "83d0:\n" + "The following changes since commit 85040bcb4643cba578839e953f25e2d1965d83d0:\n" " YOSHIFUJI Hideaki (1):\n" " [IPV6] ADDRLABEL: Fix double free on label deletion.\n" "\n" "are available in the git repository at:\n" "\n" - " git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.g=\n" - "it upstream\n" + " git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git upstream\n" "\n" "Adrian Bassett (1):\n" " rtl8180_dev.c: add support for 1799:700f\n" @@ -57,7 +54,7 @@ "Ihar Hrachyshka (1):\n" " libertas: fix memory alignment problems on the blackfin\n" "\n" - "I=F1aky P=E9rez-Gonz=E1lez (1):\n" + "I\303\261aky P\303\251rez-Gonz\303\241lez (1):\n" " rfkill: add the WiMAX radio type\n" "\n" "Johannes Berg (1):\n" @@ -96,16 +93,14 @@ " b43legacy: fix MAC control and microcode init\n" "\n" " drivers/net/wireless/ath5k/base.c | 10 +-\n" - " drivers/net/wireless/ath5k/debug.c | 124 +++++++++++++++++++=\n" - "++----\n" + " drivers/net/wireless/ath5k/debug.c | 124 +++++++++++++++++++++----\n" " drivers/net/wireless/ath5k/debug.h | 18 ++--\n" " drivers/net/wireless/b43/dma.c | 30 +++++-\n" " drivers/net/wireless/b43/main.c | 19 +++-\n" " drivers/net/wireless/b43/xmit.c | 23 +++--\n" " drivers/net/wireless/b43/xmit.h | 10 +-\n" " drivers/net/wireless/b43legacy/b43legacy.h | 31 +++----\n" - " drivers/net/wireless/b43legacy/main.c | 133 ++++++++++++++++++-=\n" - "--------\n" + " drivers/net/wireless/b43legacy/main.c | 133 ++++++++++++++++++---------\n" " drivers/net/wireless/b43legacy/phy.c | 14 ++--\n" " drivers/net/wireless/b43legacy/pio.c | 6 +-\n" " drivers/net/wireless/b43legacy/radio.c | 16 ++--\n" @@ -132,24 +127,22 @@ " net/rfkill/rfkill.c | 3 +\n" " 33 files changed, 490 insertions(+), 236 deletions(-)\n" "\n" - "diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/a=\n" - "th5k/base.c\n" + "diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c\n" "index 72bcf32..d6599d2 100644\n" "--- a/drivers/net/wireless/ath5k/base.c\n" "+++ b/drivers/net/wireless/ath5k/base.c\n" "@@ -1980,7 +1980,7 @@ ath5k_beacon_send(struct ath5k_softc *sc)\n" - " \tstruct ath5k_buf *bf =3D sc->bbuf;\n" - " \tstruct ath5k_hw *ah =3D sc->ah;\n" - "=20\n" + " \tstruct ath5k_buf *bf = sc->bbuf;\n" + " \tstruct ath5k_hw *ah = sc->ah;\n" + " \n" "-\tATH5K_DBG(sc, ATH5K_DEBUG_BEACON_PROC, \"in beacon_send\\n\");\n" "+\tATH5K_DBG_UNLIMIT(sc, ATH5K_DEBUG_BEACON, \"in beacon_send\\n\");\n" - "=20\n" - " \tif (unlikely(bf->skb =3D=3D NULL || sc->opmode =3D=3D IEEE80211_IF_TY=\n" - "PE_STA ||\n" - " \t\t\tsc->opmode =3D=3D IEEE80211_IF_TYPE_MNTR)) {\n" + " \n" + " \tif (unlikely(bf->skb == NULL || sc->opmode == IEEE80211_IF_TYPE_STA ||\n" + " \t\t\tsc->opmode == IEEE80211_IF_TYPE_MNTR)) {\n" "@@ -1996,10 +1996,10 @@ ath5k_beacon_send(struct ath5k_softc *sc)\n" " \t */\n" - " \tif (unlikely(ath5k_hw_num_tx_pending(ah, sc->bhalq) !=3D 0)) {\n" + " \tif (unlikely(ath5k_hw_num_tx_pending(ah, sc->bhalq) != 0)) {\n" " \t\tsc->bmisscount++;\n" "-\t\tATH5K_DBG(sc, ATH5K_DEBUG_BEACON_PROC,\n" "+\t\tATH5K_DBG(sc, ATH5K_DEBUG_BEACON,\n" @@ -163,23 +156,22 @@ "@@ -2007,7 +2007,7 @@ ath5k_beacon_send(struct ath5k_softc *sc)\n" " \t\treturn;\n" " \t}\n" - " \tif (unlikely(sc->bmisscount !=3D 0)) {\n" + " \tif (unlikely(sc->bmisscount != 0)) {\n" "-\t\tATH5K_DBG(sc, ATH5K_DEBUG_BEACON_PROC,\n" "+\t\tATH5K_DBG(sc, ATH5K_DEBUG_BEACON,\n" " \t\t\t\"resume beacon xmit after %u misses\\n\",\n" " \t\t\tsc->bmisscount);\n" - " \t\tsc->bmisscount =3D 0;\n" + " \t\tsc->bmisscount = 0;\n" "@@ -2027,7 +2027,7 @@ ath5k_beacon_send(struct ath5k_softc *sc)\n" - "=20\n" + " \n" " \tath5k_hw_put_tx_buf(ah, sc->bhalq, bf->daddr);\n" " \tath5k_hw_tx_start(ah, sc->bhalq);\n" - "-\tATH5K_DBG(sc, ATH5K_DEBUG_BEACON_PROC, \"TXDP[%u] =3D %llx (%p)\\n\",\n" - "+\tATH5K_DBG(sc, ATH5K_DEBUG_BEACON, \"TXDP[%u] =3D %llx (%p)\\n\",\n" + "-\tATH5K_DBG(sc, ATH5K_DEBUG_BEACON_PROC, \"TXDP[%u] = %llx (%p)\\n\",\n" + "+\tATH5K_DBG(sc, ATH5K_DEBUG_BEACON, \"TXDP[%u] = %llx (%p)\\n\",\n" " \t\tsc->bhalq, (unsigned long long)bf->daddr, bf->desc);\n" - "=20\n" + " \n" " \tsc->bsent++;\n" - "diff --git a/drivers/net/wireless/ath5k/debug.c b/drivers/net/wireless/=\n" - "ath5k/debug.c\n" + "diff --git a/drivers/net/wireless/ath5k/debug.c b/drivers/net/wireless/ath5k/debug.c\n" "index 4ba649e..bb581ef 100644\n" "--- a/drivers/net/wireless/ath5k/debug.c\n" "+++ b/drivers/net/wireless/ath5k/debug.c\n" @@ -188,78 +180,71 @@ "- * Copyright (c) 2007 Bruno Randolf <bruno@thinktube.com>\n" "+ * Copyright (c) 2007-2008 Bruno Randolf <bruno@thinktube.com>\n" " *\n" - " * This file is free software: you may copy, redistribute and/or modi=\n" - "fy it\n" - " * under the terms of the GNU General Public License as published by =\n" - "the\n" - "@@ -200,7 +200,7 @@ static ssize_t read_file_tsf(struct file *file, cha=\n" - "r __user *user_buf,\n" + " * This file is free software: you may copy, redistribute and/or modify it\n" + " * under the terms of the GNU General Public License as published by the\n" + "@@ -200,7 +200,7 @@ static ssize_t read_file_tsf(struct file *file, char __user *user_buf,\n" " {\n" - " \tstruct ath5k_softc *sc =3D file->private_data;\n" + " \tstruct ath5k_softc *sc = file->private_data;\n" " \tchar buf[100];\n" "-\tsnprintf(buf, 100, \"0x%016llx\\n\", ath5k_hw_get_tsf64(sc->ah));\n" - "+\tsnprintf(buf, sizeof(buf), \"0x%016llx\\n\", ath5k_hw_get_tsf64(sc->ah))=\n" - ";\n" + "+\tsnprintf(buf, sizeof(buf), \"0x%016llx\\n\", ath5k_hw_get_tsf64(sc->ah));\n" " \treturn simple_read_from_buffer(user_buf, count, ppos, buf, 19);\n" " }\n" - "=20\n" + " \n" "@@ -209,7 +209,12 @@ static ssize_t write_file_tsf(struct file *file,\n" " \t\t\t\t size_t count, loff_t *ppos)\n" " {\n" - " \tstruct ath5k_softc *sc =3D file->private_data;\n" - "-\tif (strncmp(userbuf, \"reset\", 5) =3D=3D 0) {\n" + " \tstruct ath5k_softc *sc = file->private_data;\n" + "-\tif (strncmp(userbuf, \"reset\", 5) == 0) {\n" "+\tchar buf[20];\n" "+\n" "+\tif (copy_from_user(buf, userbuf, min(count, sizeof(buf))))\n" "+\t\treturn -EFAULT;\n" "+\n" - "+\tif (strncmp(buf, \"reset\", 5) =3D=3D 0) {\n" + "+\tif (strncmp(buf, \"reset\", 5) == 0) {\n" " \t\tath5k_hw_reset_tsf(sc->ah);\n" " \t\tprintk(KERN_INFO \"debugfs reset TSF\\n\");\n" " \t}\n" - "@@ -231,8 +236,8 @@ static ssize_t read_file_beacon(struct file *file, =\n" - "char __user *user_buf,\n" + "@@ -231,8 +236,8 @@ static ssize_t read_file_beacon(struct file *file, char __user *user_buf,\n" " {\n" - " \tstruct ath5k_softc *sc =3D file->private_data;\n" - " \tstruct ath5k_hw *ah =3D sc->ah;\n" + " \tstruct ath5k_softc *sc = file->private_data;\n" + " \tstruct ath5k_hw *ah = sc->ah;\n" "-\tchar buf[1000];\n" - "-\tint len =3D 0;\n" + "-\tint len = 0;\n" "+\tchar buf[500];\n" - "+\tunsigned int len =3D 0;\n" + "+\tunsigned int len = 0;\n" " \tunsigned int v;\n" " \tu64 tsf;\n" - "=20\n" - "@@ -277,11 +282,15 @@ static ssize_t write_file_beacon(struct file *fil=\n" - "e,\n" + " \n" + "@@ -277,11 +282,15 @@ static ssize_t write_file_beacon(struct file *file,\n" " {\n" - " \tstruct ath5k_softc *sc =3D file->private_data;\n" - " \tstruct ath5k_hw *ah =3D sc->ah;\n" + " \tstruct ath5k_softc *sc = file->private_data;\n" + " \tstruct ath5k_hw *ah = sc->ah;\n" "+\tchar buf[20];\n" "+\n" "+\tif (copy_from_user(buf, userbuf, min(count, sizeof(buf))))\n" "+\t\treturn -EFAULT;\n" - "=20\n" - "-\tif (strncmp(userbuf, \"disable\", 7) =3D=3D 0) {\n" - "+\tif (strncmp(buf, \"disable\", 7) =3D=3D 0) {\n" + " \n" + "-\tif (strncmp(userbuf, \"disable\", 7) == 0) {\n" + "+\tif (strncmp(buf, \"disable\", 7) == 0) {\n" " \t\tAR5K_REG_DISABLE_BITS(ah, AR5K_BEACON, AR5K_BEACON_ENABLE);\n" " \t\tprintk(KERN_INFO \"debugfs disable beacons\\n\");\n" - "-\t} else if (strncmp(userbuf, \"enable\", 6) =3D=3D 0) {\n" - "+\t} else if (strncmp(buf, \"enable\", 6) =3D=3D 0) {\n" + "-\t} else if (strncmp(userbuf, \"enable\", 6) == 0) {\n" + "+\t} else if (strncmp(buf, \"enable\", 6) == 0) {\n" " \t\tAR5K_REG_ENABLE_BITS(ah, AR5K_BEACON, AR5K_BEACON_ENABLE);\n" " \t\tprintk(KERN_INFO \"debugfs enable beacons\\n\");\n" " \t}\n" - "@@ -314,6 +323,82 @@ static const struct file_operations fops_reset =3D=\n" - " {\n" + "@@ -314,6 +323,82 @@ static const struct file_operations fops_reset = {\n" " };\n" - "=20\n" - "=20\n" + " \n" + " \n" "+/* debugfs: debug level */\n" "+\n" "+static struct {\n" "+\tenum ath5k_debug_level level;\n" "+\tconst char *name;\n" "+\tconst char *desc;\n" - "+} dbg_info[] =3D {\n" + "+} dbg_info[] = {\n" "+\t{ ATH5K_DEBUG_RESET,\t\"reset\",\t\"reset and initialization\" },\n" "+\t{ ATH5K_DEBUG_INTR,\t\"intr\",\t\t\"interrupt handling\" },\n" "+\t{ ATH5K_DEBUG_MODE,\t\"mode\",\t\t\"mode init/setup\" },\n" @@ -275,27 +260,26 @@ "+\t{ ATH5K_DEBUG_ANY,\t\"all\",\t\t\"show all debug levels\" },\n" "+};\n" "+\n" - "+static ssize_t read_file_debug(struct file *file, char __user *user_bu=\n" - "f,\n" + "+static ssize_t read_file_debug(struct file *file, char __user *user_buf,\n" "+\t\t\t\t size_t count, loff_t *ppos)\n" "+{\n" - "+\tstruct ath5k_softc *sc =3D file->private_data;\n" + "+\tstruct ath5k_softc *sc = file->private_data;\n" "+\tchar buf[700];\n" - "+\tunsigned int len =3D 0;\n" + "+\tunsigned int len = 0;\n" "+\tunsigned int i;\n" "+\n" - "+\tlen +=3D snprintf(buf+len, sizeof(buf)-len,\n" + "+\tlen += snprintf(buf+len, sizeof(buf)-len,\n" "+\t\t\"DEBUG LEVEL: 0x%08x\\n\\n\", sc->debug.level);\n" "+\n" - "+\tfor (i =3D 0; i < ARRAY_SIZE(dbg_info) - 1; i++) {\n" - "+\t\tlen +=3D snprintf(buf+len, sizeof(buf)-len,\n" + "+\tfor (i = 0; i < ARRAY_SIZE(dbg_info) - 1; i++) {\n" + "+\t\tlen += snprintf(buf+len, sizeof(buf)-len,\n" "+\t\t\t\"%10s %c 0x%08x - %s\\n\", dbg_info[i].name,\n" "+\t\t\tsc->debug.level & dbg_info[i].level ? '+' : ' ',\n" "+\t\t\tdbg_info[i].level, dbg_info[i].desc);\n" "+\t}\n" - "+\tlen +=3D snprintf(buf+len, sizeof(buf)-len,\n" + "+\tlen += snprintf(buf+len, sizeof(buf)-len,\n" "+\t\t\"%10s %c 0x%08x - %s\\n\", dbg_info[i].name,\n" - "+\t\tsc->debug.level =3D=3D dbg_info[i].level ? '+' : ' ',\n" + "+\t\tsc->debug.level == dbg_info[i].level ? '+' : ' ',\n" "+\t\tdbg_info[i].level, dbg_info[i].desc);\n" "+\n" "+\treturn simple_read_from_buffer(user_buf, count, ppos, buf, len);\n" @@ -305,95 +289,90 @@ "+\t\t\t\t const char __user *userbuf,\n" "+\t\t\t\t size_t count, loff_t *ppos)\n" "+{\n" - "+\tstruct ath5k_softc *sc =3D file->private_data;\n" + "+\tstruct ath5k_softc *sc = file->private_data;\n" "+\tunsigned int i;\n" "+\tchar buf[20];\n" "+\n" "+\tif (copy_from_user(buf, userbuf, min(count, sizeof(buf))))\n" "+\t\treturn -EFAULT;\n" "+\n" - "+\tfor (i =3D 0; i < ARRAY_SIZE(dbg_info); i++) {\n" + "+\tfor (i = 0; i < ARRAY_SIZE(dbg_info); i++) {\n" "+\t\tif (strncmp(buf, dbg_info[i].name,\n" - "+\t\t\t\t\tstrlen(dbg_info[i].name)) =3D=3D 0) {\n" - "+\t\t\tsc->debug.level ^=3D dbg_info[i].level; /* toggle bit */\n" + "+\t\t\t\t\tstrlen(dbg_info[i].name)) == 0) {\n" + "+\t\t\tsc->debug.level ^= dbg_info[i].level; /* toggle bit */\n" "+\t\t\tbreak;\n" "+\t\t}\n" "+\t}\n" "+\treturn count;\n" "+}\n" "+\n" - "+static const struct file_operations fops_debug =3D {\n" - "+\t.read =3D read_file_debug,\n" - "+\t.write =3D write_file_debug,\n" - "+\t.open =3D ath5k_debugfs_open,\n" - "+\t.owner =3D THIS_MODULE,\n" + "+static const struct file_operations fops_debug = {\n" + "+\t.read = read_file_debug,\n" + "+\t.write = write_file_debug,\n" + "+\t.open = ath5k_debugfs_open,\n" + "+\t.owner = THIS_MODULE,\n" "+};\n" "+\n" "+\n" " /* init */\n" - "=20\n" + " \n" " void\n" "@@ -326,26 +411,24 @@ void\n" " ath5k_debug_init_device(struct ath5k_softc *sc)\n" " {\n" - " \tsc->debug.level =3D ath5k_debug;\n" + " \tsc->debug.level = ath5k_debug;\n" "+\n" - " \tsc->debug.debugfs_phydir =3D debugfs_create_dir(wiphy_name(sc->hw->wi=\n" - "phy),\n" + " \tsc->debug.debugfs_phydir = debugfs_create_dir(wiphy_name(sc->hw->wiphy),\n" "-\t\t\tath5k_global_debugfs);\n" - "-\tsc->debug.debugfs_debug =3D debugfs_create_u32(\"debug\",\n" + "-\tsc->debug.debugfs_debug = debugfs_create_u32(\"debug\",\n" "-\t\t\t0666, sc->debug.debugfs_phydir, &sc->debug.level);\n" "+\t\t\t\tath5k_global_debugfs);\n" "+\n" - "+\tsc->debug.debugfs_debug =3D debugfs_create_file(\"debug\", 0666,\n" + "+\tsc->debug.debugfs_debug = debugfs_create_file(\"debug\", 0666,\n" "+\t\t\t\tsc->debug.debugfs_phydir, sc, &fops_debug);\n" - "=20\n" - " \tsc->debug.debugfs_registers =3D debugfs_create_file(\"registers\", 0444=\n" - ",\n" + " \n" + " \tsc->debug.debugfs_registers = debugfs_create_file(\"registers\", 0444,\n" "-\t\t\t\tsc->debug.debugfs_phydir,\n" "-\t\t\t\tsc, &fops_registers);\n" "+\t\t\t\tsc->debug.debugfs_phydir, sc, &fops_registers);\n" - "=20\n" - " \tsc->debug.debugfs_tsf =3D debugfs_create_file(\"tsf\", 0666,\n" + " \n" + " \tsc->debug.debugfs_tsf = debugfs_create_file(\"tsf\", 0666,\n" "-\t\t\t\tsc->debug.debugfs_phydir,\n" "-\t\t\t\tsc, &fops_tsf);\n" "+\t\t\t\tsc->debug.debugfs_phydir, sc, &fops_tsf);\n" - "=20\n" - " \tsc->debug.debugfs_beacon =3D debugfs_create_file(\"beacon\", 0666,\n" + " \n" + " \tsc->debug.debugfs_beacon = debugfs_create_file(\"beacon\", 0666,\n" "-\t\t\t\tsc->debug.debugfs_phydir,\n" "-\t\t\t\tsc, &fops_beacon);\n" "+\t\t\t\tsc->debug.debugfs_phydir, sc, &fops_beacon);\n" - "=20\n" - " \tsc->debug.debugfs_reset =3D debugfs_create_file(\"reset\", 0222,\n" + " \n" + " \tsc->debug.debugfs_reset = debugfs_create_file(\"reset\", 0222,\n" "-\t\t\t\tsc->debug.debugfs_phydir,\n" "-\t\t\t\tsc, &fops_reset);\n" "+\t\t\t\tsc->debug.debugfs_phydir, sc, &fops_reset);\n" " }\n" - "=20\n" + " \n" " void\n" - "@@ -415,8 +498,7 @@ ath5k_debug_printrxbuffs(struct ath5k_softc *sc, st=\n" - "ruct ath5k_hw *ah)\n" + "@@ -415,8 +498,7 @@ ath5k_debug_printrxbuffs(struct ath5k_softc *sc, struct ath5k_hw *ah)\n" " \tstruct ath5k_buf *bf;\n" " \tint status;\n" - "=20\n" + " \n" "-\tif (likely(!(sc->debug.level &\n" "-\t (ATH5K_DEBUG_RESET | ATH5K_DEBUG_FATAL))))\n" "+\tif (likely(!(sc->debug.level & ATH5K_DEBUG_RESET)))\n" " \t\treturn;\n" - "=20\n" + " \n" " \tprintk(KERN_DEBUG \"rx queue %x, link %p\\n\",\n" - "@@ -426,7 +508,7 @@ ath5k_debug_printrxbuffs(struct ath5k_softc *sc, st=\n" - "ruct ath5k_hw *ah)\n" + "@@ -426,7 +508,7 @@ ath5k_debug_printrxbuffs(struct ath5k_softc *sc, struct ath5k_hw *ah)\n" " \tlist_for_each_entry(bf, &sc->rxbuf, list) {\n" - " \t\tds =3D bf->desc;\n" - " \t\tstatus =3D ah->ah_proc_rx_desc(ah, ds);\n" + " \t\tds = bf->desc;\n" + " \t\tstatus = ah->ah_proc_rx_desc(ah, ds);\n" "-\t\tif (!status || (sc->debug.level & ATH5K_DEBUG_FATAL))\n" "+\t\tif (!status)\n" - " \t\t\tath5k_debug_printrxbuf(bf, status =3D=3D 0);\n" + " \t\t\tath5k_debug_printrxbuf(bf, status == 0);\n" " \t}\n" " \tspin_unlock_bh(&sc->rxbuflock);\n" - "diff --git a/drivers/net/wireless/ath5k/debug.h b/drivers/net/wireless/=\n" - "ath5k/debug.h\n" + "diff --git a/drivers/net/wireless/ath5k/debug.h b/drivers/net/wireless/ath5k/debug.h\n" "index 2b491cb..c4fd8c4 100644\n" "--- a/drivers/net/wireless/ath5k/debug.h\n" "+++ b/drivers/net/wireless/ath5k/debug.h\n" @@ -412,126 +391,117 @@ "- * @ATH5K_DEBUG_FATAL: fatal errors\n" " * @ATH5K_DEBUG_ANY: show at any debug level\n" " *\n" - " * The debug level is used to control the amount and type of debugging=\n" - " output\n" + " * The debug level is used to control the amount and type of debugging output\n" "@@ -115,15 +113,13 @@ enum ath5k_debug_level {\n" - " \tATH5K_DEBUG_MODE\t=3D 0x00000004,\n" - " \tATH5K_DEBUG_XMIT\t=3D 0x00000008,\n" - " \tATH5K_DEBUG_BEACON\t=3D 0x00000010,\n" - "-\tATH5K_DEBUG_BEACON_PROC\t=3D 0x00000020,\n" - "-\tATH5K_DEBUG_CALIBRATE\t=3D 0x00000100,\n" - "-\tATH5K_DEBUG_TXPOWER\t=3D 0x00000200,\n" - "-\tATH5K_DEBUG_LED\t\t=3D 0x00000400,\n" - "-\tATH5K_DEBUG_DUMP_RX\t=3D 0x00001000,\n" - "-\tATH5K_DEBUG_DUMP_TX\t=3D 0x00002000,\n" - "-\tATH5K_DEBUG_DUMPMODES\t=3D 0x00004000,\n" - "-\tATH5K_DEBUG_TRACE\t=3D 0x00010000,\n" - "-\tATH5K_DEBUG_FATAL\t=3D 0x80000000,\n" - "+\tATH5K_DEBUG_CALIBRATE\t=3D 0x00000020,\n" - "+\tATH5K_DEBUG_TXPOWER\t=3D 0x00000040,\n" - "+\tATH5K_DEBUG_LED\t\t=3D 0x00000080,\n" - "+\tATH5K_DEBUG_DUMP_RX\t=3D 0x00000100,\n" - "+\tATH5K_DEBUG_DUMP_TX\t=3D 0x00000200,\n" - "+\tATH5K_DEBUG_DUMPMODES\t=3D 0x00000400,\n" - "+\tATH5K_DEBUG_TRACE\t=3D 0x00001000,\n" - " \tATH5K_DEBUG_ANY\t\t=3D 0xffffffff\n" + " \tATH5K_DEBUG_MODE\t= 0x00000004,\n" + " \tATH5K_DEBUG_XMIT\t= 0x00000008,\n" + " \tATH5K_DEBUG_BEACON\t= 0x00000010,\n" + "-\tATH5K_DEBUG_BEACON_PROC\t= 0x00000020,\n" + "-\tATH5K_DEBUG_CALIBRATE\t= 0x00000100,\n" + "-\tATH5K_DEBUG_TXPOWER\t= 0x00000200,\n" + "-\tATH5K_DEBUG_LED\t\t= 0x00000400,\n" + "-\tATH5K_DEBUG_DUMP_RX\t= 0x00001000,\n" + "-\tATH5K_DEBUG_DUMP_TX\t= 0x00002000,\n" + "-\tATH5K_DEBUG_DUMPMODES\t= 0x00004000,\n" + "-\tATH5K_DEBUG_TRACE\t= 0x00010000,\n" + "-\tATH5K_DEBUG_FATAL\t= 0x80000000,\n" + "+\tATH5K_DEBUG_CALIBRATE\t= 0x00000020,\n" + "+\tATH5K_DEBUG_TXPOWER\t= 0x00000040,\n" + "+\tATH5K_DEBUG_LED\t\t= 0x00000080,\n" + "+\tATH5K_DEBUG_DUMP_RX\t= 0x00000100,\n" + "+\tATH5K_DEBUG_DUMP_TX\t= 0x00000200,\n" + "+\tATH5K_DEBUG_DUMPMODES\t= 0x00000400,\n" + "+\tATH5K_DEBUG_TRACE\t= 0x00001000,\n" + " \tATH5K_DEBUG_ANY\t\t= 0xffffffff\n" " };\n" - "=20\n" - "diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/=\n" - "dma.c\n" + " \n" + "diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c\n" "index 3e73d2a..8a708b7 100644\n" "--- a/drivers/net/wireless/b43/dma.c\n" "+++ b/drivers/net/wireless/b43/dma.c\n" - "@@ -1114,7 +1114,7 @@ static int dma_tx_fragment(struct b43_dmaring *ri=\n" - "ng,\n" + "@@ -1114,7 +1114,7 @@ static int dma_tx_fragment(struct b43_dmaring *ring,\n" " {\n" - " \tconst struct b43_dma_ops *ops =3D ring->ops;\n" + " \tconst struct b43_dma_ops *ops = ring->ops;\n" " \tu8 *header;\n" "-\tint slot;\n" "+\tint slot, old_top_slot, old_used_slots;\n" " \tint err;\n" " \tstruct b43_dmadesc_generic *desc;\n" " \tstruct b43_dmadesc_meta *meta;\n" - "@@ -1126,6 +1126,9 @@ static int dma_tx_fragment(struct b43_dmaring *ri=\n" - "ng,\n" + "@@ -1126,6 +1126,9 @@ static int dma_tx_fragment(struct b43_dmaring *ring,\n" " #define SLOTS_PER_PACKET 2\n" " \tB43_WARN_ON(skb_shinfo(skb)->nr_frags);\n" - "=20\n" - "+\told_top_slot =3D ring->current_slot;\n" - "+\told_used_slots =3D ring->used_slots;\n" + " \n" + "+\told_top_slot = ring->current_slot;\n" + "+\told_used_slots = ring->used_slots;\n" "+\n" " \t/* Get a slot for the header. */\n" - " \tslot =3D request_slot(ring);\n" - " \tdesc =3D ops->idx2desc(ring, slot, &meta_hdr);\n" - "@@ -1133,13 +1136,21 @@ static int dma_tx_fragment(struct b43_dmaring *=\n" - "ring,\n" - "=20\n" - " \theader =3D &(ring->txhdr_cache[slot * hdrsize]);\n" - " \tcookie =3D generate_cookie(ring, slot);\n" + " \tslot = request_slot(ring);\n" + " \tdesc = ops->idx2desc(ring, slot, &meta_hdr);\n" + "@@ -1133,13 +1136,21 @@ static int dma_tx_fragment(struct b43_dmaring *ring,\n" + " \n" + " \theader = &(ring->txhdr_cache[slot * hdrsize]);\n" + " \tcookie = generate_cookie(ring, slot);\n" "-\tb43_generate_txhdr(ring->dev, header,\n" "-\t\t\t skb->data, skb->len, ctl, cookie);\n" - "+\terr =3D b43_generate_txhdr(ring->dev, header,\n" + "+\terr = b43_generate_txhdr(ring->dev, header,\n" "+\t\t\t\t skb->data, skb->len, ctl, cookie);\n" "+\tif (unlikely(err)) {\n" - "+\t\tring->current_slot =3D old_top_slot;\n" - "+\t\tring->used_slots =3D old_used_slots;\n" + "+\t\tring->current_slot = old_top_slot;\n" + "+\t\tring->used_slots = old_used_slots;\n" "+\t\treturn err;\n" "+\t}\n" - "=20\n" - " \tmeta_hdr->dmaaddr =3D map_descbuffer(ring, (unsigned char *)header,\n" + " \n" + " \tmeta_hdr->dmaaddr = map_descbuffer(ring, (unsigned char *)header,\n" " \t\t\t\t\t hdrsize, 1);\n" "-\tif (dma_mapping_error(meta_hdr->dmaaddr))\n" "+\tif (dma_mapping_error(meta_hdr->dmaaddr)) {\n" - "+\t\tring->current_slot =3D old_top_slot;\n" - "+\t\tring->used_slots =3D old_used_slots;\n" + "+\t\tring->current_slot = old_top_slot;\n" + "+\t\tring->used_slots = old_used_slots;\n" " \t\treturn -EIO;\n" "+\t}\n" " \tops->fill_descriptor(ring, desc, meta_hdr->dmaaddr,\n" " \t\t\t hdrsize, 1, 0, 0);\n" - "=20\n" - "@@ -1157,6 +1168,8 @@ static int dma_tx_fragment(struct b43_dmaring *ri=\n" - "ng,\n" + " \n" + "@@ -1157,6 +1168,8 @@ static int dma_tx_fragment(struct b43_dmaring *ring,\n" " \tif (dma_mapping_error(meta->dmaaddr)) {\n" - " \t\tbounce_skb =3D __dev_alloc_skb(skb->len, GFP_ATOMIC | GFP_DMA);\n" + " \t\tbounce_skb = __dev_alloc_skb(skb->len, GFP_ATOMIC | GFP_DMA);\n" " \t\tif (!bounce_skb) {\n" - "+\t\t\tring->current_slot =3D old_top_slot;\n" - "+\t\t\tring->used_slots =3D old_used_slots;\n" - " \t\t\terr =3D -ENOMEM;\n" + "+\t\t\tring->current_slot = old_top_slot;\n" + "+\t\t\tring->used_slots = old_used_slots;\n" + " \t\t\terr = -ENOMEM;\n" " \t\t\tgoto out_unmap_hdr;\n" " \t\t}\n" - "@@ -1167,6 +1180,8 @@ static int dma_tx_fragment(struct b43_dmaring *ri=\n" - "ng,\n" - " \t\tmeta->skb =3D skb;\n" - " \t\tmeta->dmaaddr =3D map_descbuffer(ring, skb->data, skb->len, 1);\n" + "@@ -1167,6 +1180,8 @@ static int dma_tx_fragment(struct b43_dmaring *ring,\n" + " \t\tmeta->skb = skb;\n" + " \t\tmeta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1);\n" " \t\tif (dma_mapping_error(meta->dmaaddr)) {\n" - "+\t\t\tring->current_slot =3D old_top_slot;\n" - "+\t\t\tring->used_slots =3D old_used_slots;\n" - " \t\t\terr =3D -EIO;\n" + "+\t\t\tring->current_slot = old_top_slot;\n" + "+\t\t\tring->used_slots = old_used_slots;\n" + " \t\t\terr = -EIO;\n" " \t\t\tgoto out_free_bounce;\n" " \t\t}\n" "@@ -1252,6 +1267,13 @@ int b43_dma_tx(struct b43_wldev *dev,\n" " \tB43_WARN_ON(ring->stopped);\n" - "=20\n" - " \terr =3D dma_tx_fragment(ring, skb, ctl);\n" - "+\tif (unlikely(err =3D=3D -ENOKEY)) {\n" + " \n" + " \terr = dma_tx_fragment(ring, skb, ctl);\n" + "+\tif (unlikely(err == -ENOKEY)) {\n" "+\t\t/* Drop this packet, as we don't have the encryption key\n" "+\t\t * anymore and must not transmit it unencrypted. */\n" "+\t\tdev_kfree_skb_any(skb);\n" - "+\t\terr =3D 0;\n" + "+\t\terr = 0;\n" "+\t\tgoto out_unlock;\n" "+\t}\n" " \tif (unlikely(err)) {\n" " \t\tb43err(dev->wl, \"DMA tx mapping failure\\n\");\n" " \t\tgoto out_unlock;\n" - "diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43=\n" - "/main.c\n" + "diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c\n" "index 88d2c15..64c154d 100644\n" "--- a/drivers/net/wireless/b43/main.c\n" "+++ b/drivers/net/wireless/b43/main.c\n" - "@@ -3532,8 +3532,6 @@ static int b43_wireless_core_init(struct b43_wlde=\n" - "v *dev)\n" + "@@ -3532,8 +3532,6 @@ static int b43_wireless_core_init(struct b43_wldev *dev)\n" " \tb43_bluetooth_coext_enable(dev);\n" - "=20\n" + " \n" " \tssb_bus_powerup(bus, 1);\t/* Enable dynamic PCTL */\n" "-\tmemset(wl->bssid, 0, ETH_ALEN);\n" "-\tmemset(wl->mac_addr, 0, ETH_ALEN);\n" @@ -539,59 +509,58 @@ " \tb43_security_init(dev);\n" " \tb43_rng_init(wl);\n" "@@ -3630,6 +3628,15 @@ static int b43_op_start(struct ieee80211_hw *hw)\n" - " \tstruct b43_wldev *dev =3D wl->current_dev;\n" - " \tint did_init =3D 0;\n" - " \tint err =3D 0;\n" - "+\tbool do_rfkill_exit =3D 0;\n" + " \tstruct b43_wldev *dev = wl->current_dev;\n" + " \tint did_init = 0;\n" + " \tint err = 0;\n" + "+\tbool do_rfkill_exit = 0;\n" "+\n" "+\t/* Kill all old instance specific information to make sure\n" "+\t * the card won't use it in the short timeframe between start\n" "+\t * and mac80211 reconfiguring it. */\n" "+\tmemset(wl->bssid, 0, ETH_ALEN);\n" "+\tmemset(wl->mac_addr, 0, ETH_ALEN);\n" - "+\twl->filter_flags =3D 0;\n" - "+\twl->radiotap_enabled =3D 0;\n" - "=20\n" + "+\twl->filter_flags = 0;\n" + "+\twl->radiotap_enabled = 0;\n" + " \n" " \t/* First register RFkill.\n" " \t * LEDs that are registered later depend on it. */\n" "@@ -3639,8 +3646,10 @@ static int b43_op_start(struct ieee80211_hw *hw)\n" - "=20\n" + " \n" " \tif (b43_status(dev) < B43_STAT_INITIALIZED) {\n" - " \t\terr =3D b43_wireless_core_init(dev);\n" + " \t\terr = b43_wireless_core_init(dev);\n" "-\t\tif (err)\n" "+\t\tif (err) {\n" - "+\t\t\tdo_rfkill_exit =3D 1;\n" + "+\t\t\tdo_rfkill_exit = 1;\n" " \t\t\tgoto out_mutex_unlock;\n" "+\t\t}\n" - " \t\tdid_init =3D 1;\n" + " \t\tdid_init = 1;\n" " \t}\n" - "=20\n" + " \n" "@@ -3649,6 +3658,7 @@ static int b43_op_start(struct ieee80211_hw *hw)\n" " \t\tif (err) {\n" " \t\t\tif (did_init)\n" " \t\t\t\tb43_wireless_core_exit(dev);\n" - "+\t\t\tdo_rfkill_exit =3D 1;\n" + "+\t\t\tdo_rfkill_exit = 1;\n" " \t\t\tgoto out_mutex_unlock;\n" " \t\t}\n" " \t}\n" "@@ -3656,6 +3666,9 @@ static int b43_op_start(struct ieee80211_hw *hw)\n" " out_mutex_unlock:\n" " \tmutex_unlock(&wl->mutex);\n" - "=20\n" + " \n" "+\tif (do_rfkill_exit)\n" "+\t\tb43_rfkill_exit(dev);\n" "+\n" " \treturn err;\n" " }\n" - "=20\n" - "diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43=\n" - "/xmit.c\n" + " \n" + "diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c\n" "index 3fc53e8..7caa26e 100644\n" "--- a/drivers/net/wireless/b43/xmit.c\n" "+++ b/drivers/net/wireless/b43/xmit.c\n" "@@ -178,12 +178,12 @@ static u8 b43_calc_fallback_rate(u8 bitrate)\n" " }\n" - "=20\n" + " \n" " /* Generate a TX data header. */\n" "-void b43_generate_txhdr(struct b43_wldev *dev,\n" "-\t\t\tu8 *_txhdr,\n" @@ -606,12 +575,12 @@ "+\t\t const struct ieee80211_tx_control *txctl,\n" "+\t\t u16 cookie)\n" " {\n" - " \tstruct b43_txhdr *txhdr =3D (struct b43_txhdr *)_txhdr;\n" - " \tconst struct b43_phy *phy =3D &dev->phy;\n" + " \tstruct b43_txhdr *txhdr = (struct b43_txhdr *)_txhdr;\n" + " \tconst struct b43_phy *phy = &dev->phy;\n" "@@ -237,7 +237,15 @@ void b43_generate_txhdr(struct b43_wldev *dev,\n" - "=20\n" - " \t\tB43_WARN_ON(key_idx >=3D dev->max_nr_keys);\n" - " \t\tkey =3D &(dev->key[key_idx]);\n" + " \n" + " \t\tB43_WARN_ON(key_idx >= dev->max_nr_keys);\n" + " \t\tkey = &(dev->key[key_idx]);\n" "-\t\tB43_WARN_ON(!key->keyconf);\n" "+\n" "+\t\tif (unlikely(!key->keyconf)) {\n" @@ -622,26 +591,25 @@ "+\t\t\t * unencrypted to avoid leaking information. */\n" "+\t\t\treturn -ENOKEY;\n" "+\t\t}\n" - "=20\n" + " \n" " \t\t/* Hardware appends ICV. */\n" - " \t\tplcp_fragment_len +=3D txctl->icv_len;\n" + " \t\tplcp_fragment_len += txctl->icv_len;\n" "@@ -408,6 +416,7 @@ void b43_generate_txhdr(struct b43_wldev *dev,\n" - " \ttxhdr->phy_ctl =3D cpu_to_le16(phy_ctl);\n" - " \ttxhdr->extra_ft =3D extra_ft;\n" - "=20\n" + " \ttxhdr->phy_ctl = cpu_to_le16(phy_ctl);\n" + " \ttxhdr->extra_ft = extra_ft;\n" + " \n" "+\treturn 0;\n" " }\n" - "=20\n" + " \n" " static s8 b43_rssi_postprocess(struct b43_wldev *dev,\n" - "diff --git a/drivers/net/wireless/b43/xmit.h b/drivers/net/wireless/b43=\n" - "/xmit.h\n" + "diff --git a/drivers/net/wireless/b43/xmit.h b/drivers/net/wireless/b43/xmit.h\n" "index ca2a2ab..4176503 100644\n" "--- a/drivers/net/wireless/b43/xmit.h\n" "+++ b/drivers/net/wireless/b43/xmit.h\n" "@@ -174,11 +174,11 @@ size_t b43_txhdr_size(struct b43_wldev *dev)\n" " }\n" - "=20\n" - "=20\n" + " \n" + " \n" "-void b43_generate_txhdr(struct b43_wldev *dev,\n" "-\t\t\tu8 * txhdr,\n" "-\t\t\tconst unsigned char *fragment_data,\n" @@ -652,23 +620,22 @@ "+\t\t const unsigned char *fragment_data,\n" "+\t\t unsigned int fragment_len,\n" "+\t\t const struct ieee80211_tx_control *txctl, u16 cookie);\n" - "=20\n" + " \n" " /* Transmit Status */\n" " struct b43_txstatus {\n" - "diff --git a/drivers/net/wireless/b43legacy/b43legacy.h b/drivers/net/w=\n" - "ireless/b43legacy/b43legacy.h\n" + "diff --git a/drivers/net/wireless/b43legacy/b43legacy.h b/drivers/net/wireless/b43legacy/b43legacy.h\n" "index 93419ad..c80edd2 100644\n" "--- a/drivers/net/wireless/b43legacy/b43legacy.h\n" "+++ b/drivers/net/wireless/b43legacy/b43legacy.h\n" "@@ -23,7 +23,7 @@\n" " #include \"phy.h\"\n" - "=20\n" - "=20\n" + " \n" + " \n" "-#define B43legacy_IRQWAIT_MAX_RETRIES\t100\n" "+#define B43legacy_IRQWAIT_MAX_RETRIES\t20\n" - "=20\n" + " \n" " #define B43legacy_RX_MAX_SSI\t\t60 /* best guess at max ssi */\n" - "=20\n" + " \n" "@@ -40,9 +40,8 @@\n" " #define B43legacy_MMIO_DMA4_IRQ_MASK\t0x44\n" " #define B43legacy_MMIO_DMA5_REASON\t0x48\n" @@ -683,31 +650,27 @@ " #define B43legacy_MMIO_RAM_CONTROL\t0x130\n" "@@ -177,31 +176,25 @@\n" " #define B43legacy_RADIOCTL_ID\t\t0x01\n" - "=20\n" + " \n" " /* MAC Control bitfield */\n" "+#define B43legacy_MACCTL_ENABLED\t0x00000001 /* MAC Enabled */\n" "+#define B43legacy_MACCTL_PSM_RUN\t0x00000002 /* Run Microcode */\n" "+#define B43legacy_MACCTL_PSM_JMP0\t0x00000004 /* Microcode jump to 0 */\n" "+#define B43legacy_MACCTL_SHM_ENABLED\t0x00000100 /* SHM Enabled */\n" - " #define B43legacy_MACCTL_IHR_ENABLED\t0x00000400 /* IHR Region Enabled =\n" - "*/\n" + " #define B43legacy_MACCTL_IHR_ENABLED\t0x00000400 /* IHR Region Enabled */\n" "+#define B43legacy_MACCTL_BE\t\t0x00010000 /* Big Endian mode */\n" " #define B43legacy_MACCTL_INFRA\t\t0x00020000 /* Infrastructure mode */\n" " #define B43legacy_MACCTL_AP\t\t0x00040000 /* AccessPoint mode */\n" "+#define B43legacy_MACCTL_RADIOLOCK\t0x00080000 /* Radio lock */\n" - " #define B43legacy_MACCTL_BEACPROMISC\t0x00100000 /* Beacon Promiscuous =\n" - "*/\n" - " #define B43legacy_MACCTL_KEEP_BADPLCP\t0x00200000 /* Keep bad PLCP fram=\n" - "es */\n" + " #define B43legacy_MACCTL_BEACPROMISC\t0x00100000 /* Beacon Promiscuous */\n" + " #define B43legacy_MACCTL_KEEP_BADPLCP\t0x00200000 /* Keep bad PLCP frames */\n" " #define B43legacy_MACCTL_KEEP_CTL\t0x00400000 /* Keep control frames */\n" - " #define B43legacy_MACCTL_KEEP_BAD\t0x00800000 /* Keep bad frames (FCS) =\n" - "*/\n" + " #define B43legacy_MACCTL_KEEP_BAD\t0x00800000 /* Keep bad frames (FCS) */\n" " #define B43legacy_MACCTL_PROMISC\t0x01000000 /* Promiscuous mode */\n" "+#define B43legacy_MACCTL_HWPS\t\t0x02000000 /* Hardware Power Saving */\n" "+#define B43legacy_MACCTL_AWAKE\t\t0x04000000 /* Device is awake */\n" "+#define B43legacy_MACCTL_TBTTHOLD\t0x10000000 /* TBTT Hold */\n" " #define B43legacy_MACCTL_GMODE\t\t0x80000000 /* G Mode */\n" - "=20\n" + " \n" "-/* StatusBitField */\n" "-#define B43legacy_SBF_MAC_ENABLED\t0x00000001\n" "-#define B43legacy_SBF_CORE_READY\t0x00000004\n" @@ -725,68 +688,59 @@ "-\n" " /* 802.11 core specific TM State Low flags */\n" " #define B43legacy_TMSLOW_GMODE\t\t0x20000000 /* G Mode Enable */\n" - " #define B43legacy_TMSLOW_PLLREFSEL\t0x00200000 /* PLL Freq Ref Select *=\n" - "/\n" - "diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wirele=\n" - "ss/b43legacy/main.c\n" + " #define B43legacy_TMSLOW_PLLREFSEL\t0x00200000 /* PLL Freq Ref Select */\n" + "diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c\n" "index 4ed4243..aa20d5d 100644\n" "--- a/drivers/net/wireless/b43legacy/main.c\n" "+++ b/drivers/net/wireless/b43legacy/main.c\n" - "@@ -225,8 +225,8 @@ static void b43legacy_ram_write(struct b43legacy_wl=\n" - "dev *dev, u16 offset,\n" - "=20\n" - " \tB43legacy_WARN_ON(offset % 4 !=3D 0);\n" - "=20\n" - "-\tstatus =3D b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD);\n" + "@@ -225,8 +225,8 @@ static void b43legacy_ram_write(struct b43legacy_wldev *dev, u16 offset,\n" + " \n" + " \tB43legacy_WARN_ON(offset % 4 != 0);\n" + " \n" + "-\tstatus = b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD);\n" "-\tif (status & B43legacy_SBF_XFER_REG_BYTESWAP)\n" - "+\tstatus =3D b43legacy_read32(dev, B43legacy_MMIO_MACCTL);\n" + "+\tstatus = b43legacy_read32(dev, B43legacy_MMIO_MACCTL);\n" "+\tif (status & B43legacy_MACCTL_BE)\n" - " \t\tval =3D swab32(val);\n" - "=20\n" + " \t\tval = swab32(val);\n" + " \n" " \tb43legacy_write32(dev, B43legacy_MMIO_RAM_CONTROL, offset);\n" - "@@ -434,9 +434,9 @@ static void b43legacy_time_lock(struct b43legacy_wl=\n" - "dev *dev)\n" + "@@ -434,9 +434,9 @@ static void b43legacy_time_lock(struct b43legacy_wldev *dev)\n" " {\n" " \tu32 status;\n" - "=20\n" - "-\tstatus =3D b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD);\n" - "-\tstatus |=3D B43legacy_SBF_TIME_UPDATE;\n" + " \n" + "-\tstatus = b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD);\n" + "-\tstatus |= B43legacy_SBF_TIME_UPDATE;\n" "-\tb43legacy_write32(dev, B43legacy_MMIO_STATUS_BITFIELD, status);\n" - "+\tstatus =3D b43legacy_read32(dev, B43legacy_MMIO_MACCTL);\n" - "+\tstatus |=3D B43legacy_MACCTL_TBTTHOLD;\n" + "+\tstatus = b43legacy_read32(dev, B43legacy_MMIO_MACCTL);\n" + "+\tstatus |= B43legacy_MACCTL_TBTTHOLD;\n" "+\tb43legacy_write32(dev, B43legacy_MMIO_MACCTL, status);\n" " \tmmiowb();\n" " }\n" - "=20\n" - "@@ -444,9 +444,9 @@ static void b43legacy_time_unlock(struct b43legacy_=\n" - "wldev *dev)\n" + " \n" + "@@ -444,9 +444,9 @@ static void b43legacy_time_unlock(struct b43legacy_wldev *dev)\n" " {\n" " \tu32 status;\n" - "=20\n" - "-\tstatus =3D b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD);\n" - "-\tstatus &=3D ~B43legacy_SBF_TIME_UPDATE;\n" + " \n" + "-\tstatus = b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD);\n" + "-\tstatus &= ~B43legacy_SBF_TIME_UPDATE;\n" "-\tb43legacy_write32(dev, B43legacy_MMIO_STATUS_BITFIELD, status);\n" - "+\tstatus =3D b43legacy_read32(dev, B43legacy_MMIO_MACCTL);\n" - "+\tstatus &=3D ~B43legacy_MACCTL_TBTTHOLD;\n" + "+\tstatus = b43legacy_read32(dev, B43legacy_MMIO_MACCTL);\n" + "+\tstatus &= ~B43legacy_MACCTL_TBTTHOLD;\n" "+\tb43legacy_write32(dev, B43legacy_MMIO_MACCTL, status);\n" " }\n" - "=20\n" - " static void b43legacy_tsf_write_locked(struct b43legacy_wldev *dev, u6=\n" - "4 tsf)\n" - "@@ -647,7 +647,7 @@ void b43legacy_dummy_transmission(struct b43legacy_=\n" - "wldev *dev)\n" + " \n" + " static void b43legacy_tsf_write_locked(struct b43legacy_wldev *dev, u64 tsf)\n" + "@@ -647,7 +647,7 @@ void b43legacy_dummy_transmission(struct b43legacy_wldev *dev)\n" " \t\tb43legacy_ram_write(dev, i * 4, buffer[i]);\n" - "=20\n" + " \n" " \t/* dummy read follows */\n" "-\tb43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD);\n" "+\tb43legacy_read32(dev, B43legacy_MMIO_MACCTL);\n" - "=20\n" + " \n" " \tb43legacy_write16(dev, 0x0568, 0x0000);\n" " \tb43legacy_write16(dev, 0x07C0, 0x0000);\n" - "@@ -794,9 +794,9 @@ static void b43legacy_jssi_write(struct b43legacy_w=\n" - "ldev *dev, u32 jssi)\n" - " static void b43legacy_generate_noise_sample(struct b43legacy_wldev *de=\n" - "v)\n" + "@@ -794,9 +794,9 @@ static void b43legacy_jssi_write(struct b43legacy_wldev *dev, u32 jssi)\n" + " static void b43legacy_generate_noise_sample(struct b43legacy_wldev *dev)\n" " {\n" " \tb43legacy_jssi_write(dev, 0x7F7F7F7F);\n" "-\tb43legacy_write32(dev, B43legacy_MMIO_STATUS2_BITFIELD,\n" @@ -795,10 +749,9 @@ "-\t\t\t B43legacy_MMIO_STATUS2_BITFIELD)\n" "+\t\t\t B43legacy_MMIO_MACCMD)\n" " \t\t\t | (1 << 4));\n" - " \tB43legacy_WARN_ON(dev->noisecalc.channel_at_start !=3D\n" + " \tB43legacy_WARN_ON(dev->noisecalc.channel_at_start !=\n" " \t\t\t dev->phy.channel);\n" - "@@ -895,8 +895,8 @@ static void handle_irq_atim_end(struct b43legacy_wl=\n" - "dev *dev)\n" + "@@ -895,8 +895,8 @@ static void handle_irq_atim_end(struct b43legacy_wldev *dev)\n" " {\n" " \tif (!dev->reg124_set_0x4) /*FIXME rename this variable*/\n" " \t\treturn;\n" @@ -808,35 +761,32 @@ "+\t\t\t b43legacy_read32(dev, B43legacy_MMIO_MACCMD)\n" " \t\t\t | 0x4);\n" " }\n" - "=20\n" - "@@ -1106,9 +1106,9 @@ static void b43legacy_update_templates(struct b43=\n" - "legacy_wldev *dev)\n" + " \n" + "@@ -1106,9 +1106,9 @@ static void b43legacy_update_templates(struct b43legacy_wldev *dev)\n" " \tb43legacy_write_probe_resp_template(dev, 0x268, 0x4A,\n" " \t\t\t\t\t B43legacy_CCK_RATE_11MB);\n" - "=20\n" - "-\tstatus =3D b43legacy_read32(dev, B43legacy_MMIO_STATUS2_BITFIELD);\n" - "+\tstatus =3D b43legacy_read32(dev, B43legacy_MMIO_MACCMD);\n" - " \tstatus |=3D 0x03;\n" + " \n" + "-\tstatus = b43legacy_read32(dev, B43legacy_MMIO_STATUS2_BITFIELD);\n" + "+\tstatus = b43legacy_read32(dev, B43legacy_MMIO_MACCMD);\n" + " \tstatus |= 0x03;\n" "-\tb43legacy_write32(dev, B43legacy_MMIO_STATUS2_BITFIELD, status);\n" "+\tb43legacy_write32(dev, B43legacy_MMIO_MACCMD, status);\n" " }\n" - "=20\n" + " \n" " static void b43legacy_refresh_templates(struct b43legacy_wldev *dev,\n" - "@@ -1166,7 +1166,7 @@ static void handle_irq_beacon(struct b43legacy_wl=\n" - "dev *dev)\n" + "@@ -1166,7 +1166,7 @@ static void handle_irq_beacon(struct b43legacy_wldev *dev)\n" " \t\treturn;\n" - "=20\n" - " \tdev->irq_savedstate &=3D ~B43legacy_IRQ_BEACON;\n" - "-\tstatus =3D b43legacy_read32(dev, B43legacy_MMIO_STATUS2_BITFIELD);\n" - "+\tstatus =3D b43legacy_read32(dev, B43legacy_MMIO_MACCMD);\n" - "=20\n" + " \n" + " \tdev->irq_savedstate &= ~B43legacy_IRQ_BEACON;\n" + "-\tstatus = b43legacy_read32(dev, B43legacy_MMIO_STATUS2_BITFIELD);\n" + "+\tstatus = b43legacy_read32(dev, B43legacy_MMIO_MACCMD);\n" + " \n" " \tif (!dev->cached_beacon || ((status & 0x1) && (status & 0x2))) {\n" " \t\t/* ACK beacon IRQ. */\n" - "@@ -1182,14 +1182,14 @@ static void handle_irq_beacon(struct b43legacy_=\n" - "wldev *dev)\n" + "@@ -1182,14 +1182,14 @@ static void handle_irq_beacon(struct b43legacy_wldev *dev)\n" " \t\tb43legacy_write_beacon_template(dev, 0x68, 0x18,\n" " \t\t\t\t\t\tB43legacy_CCK_RATE_1MB);\n" - " \t\tstatus |=3D 0x1;\n" + " \t\tstatus |= 0x1;\n" "-\t\tb43legacy_write32(dev, B43legacy_MMIO_STATUS2_BITFIELD,\n" "+\t\tb43legacy_write32(dev, B43legacy_MMIO_MACCMD,\n" " \t\t\t\t status);\n" @@ -844,115 +794,107 @@ " \tif (!(status & 0x2)) {\n" " \t\tb43legacy_write_beacon_template(dev, 0x468, 0x1A,\n" " \t\t\t\t\t\tB43legacy_CCK_RATE_1MB);\n" - " \t\tstatus |=3D 0x2;\n" + " \t\tstatus |= 0x2;\n" "-\t\tb43legacy_write32(dev, B43legacy_MMIO_STATUS2_BITFIELD,\n" "+\t\tb43legacy_write32(dev, B43legacy_MMIO_MACCMD,\n" " \t\t\t\t status);\n" " \t}\n" " }\n" - "@@ -1548,9 +1548,20 @@ static int b43legacy_upload_microcode(struct b43=\n" - "legacy_wldev *dev)\n" + "@@ -1548,9 +1548,20 @@ static int b43legacy_upload_microcode(struct b43legacy_wldev *dev)\n" " \tu16 fwpatch;\n" " \tu16 fwdate;\n" " \tu16 fwtime;\n" "-\tu32 tmp;\n" "+\tu32 tmp, macctl;\n" - " \tint err =3D 0;\n" - "=20\n" + " \tint err = 0;\n" + " \n" "+\t/* Jump the microcode PSM to offset 0 */\n" - "+\tmacctl =3D b43legacy_read32(dev, B43legacy_MMIO_MACCTL);\n" + "+\tmacctl = b43legacy_read32(dev, B43legacy_MMIO_MACCTL);\n" "+\tB43legacy_WARN_ON(macctl & B43legacy_MACCTL_PSM_RUN);\n" - "+\tmacctl |=3D B43legacy_MACCTL_PSM_JMP0;\n" + "+\tmacctl |= B43legacy_MACCTL_PSM_JMP0;\n" "+\tb43legacy_write32(dev, B43legacy_MMIO_MACCTL, macctl);\n" "+\t/* Zero out all microcode PSM registers and shared memory. */\n" - "+\tfor (i =3D 0; i < 64; i++)\n" + "+\tfor (i = 0; i < 64; i++)\n" "+\t\tb43legacy_shm_write16(dev, B43legacy_SHM_WIRELESS, i, 0);\n" - "+\tfor (i =3D 0; i < 4096; i +=3D 2)\n" + "+\tfor (i = 0; i < 4096; i += 2)\n" "+\t\tb43legacy_shm_write16(dev, B43legacy_SHM_SHARED, i, 0);\n" "+\n" " \t/* Upload Microcode. */\n" - " \tdata =3D (__be32 *) (dev->fw.ucode->data + hdr_len);\n" - " \tlen =3D (dev->fw.ucode->size - hdr_len) / sizeof(__be32);\n" - "@@ -1581,7 +1592,12 @@ static int b43legacy_upload_microcode(struct b43=\n" - "legacy_wldev *dev)\n" - "=20\n" + " \tdata = (__be32 *) (dev->fw.ucode->data + hdr_len);\n" + " \tlen = (dev->fw.ucode->size - hdr_len) / sizeof(__be32);\n" + "@@ -1581,7 +1592,12 @@ static int b43legacy_upload_microcode(struct b43legacy_wldev *dev)\n" + " \n" " \tb43legacy_write32(dev, B43legacy_MMIO_GEN_IRQ_REASON,\n" " \t\t\t B43legacy_IRQ_ALL);\n" "-\tb43legacy_write32(dev, B43legacy_MMIO_STATUS_BITFIELD, 0x00020402);\n" "+\n" "+\t/* Start the microcode PSM */\n" - "+\tmacctl =3D b43legacy_read32(dev, B43legacy_MMIO_MACCTL);\n" - "+\tmacctl &=3D ~B43legacy_MACCTL_PSM_JMP0;\n" - "+\tmacctl |=3D B43legacy_MACCTL_PSM_RUN;\n" + "+\tmacctl = b43legacy_read32(dev, B43legacy_MMIO_MACCTL);\n" + "+\tmacctl &= ~B43legacy_MACCTL_PSM_JMP0;\n" + "+\tmacctl |= B43legacy_MACCTL_PSM_RUN;\n" "+\tb43legacy_write32(dev, B43legacy_MMIO_MACCTL, macctl);\n" - "=20\n" + " \n" " \t/* Wait for the microcode to load and respond */\n" - " \ti =3D 0;\n" - "@@ -1594,9 +1610,13 @@ static int b43legacy_upload_microcode(struct b43=\n" - "legacy_wldev *dev)\n" + " \ti = 0;\n" + "@@ -1594,9 +1610,13 @@ static int b43legacy_upload_microcode(struct b43legacy_wldev *dev)\n" " \t\t\tb43legacyerr(dev->wl, \"Microcode not responding\\n\");\n" " \t\t\tb43legacy_print_fw_helptext(dev->wl);\n" - " \t\t\terr =3D -ENODEV;\n" + " \t\t\terr = -ENODEV;\n" "-\t\t\tgoto out;\n" "+\t\t\tgoto error;\n" "+\t\t}\n" "+\t\tmsleep_interruptible(50);\n" "+\t\tif (signal_pending(current)) {\n" - "+\t\t\terr =3D -EINTR;\n" + "+\t\t\terr = -EINTR;\n" "+\t\t\tgoto error;\n" " \t\t}\n" "-\t\tudelay(10);\n" " \t}\n" " \t/* dummy read follows */\n" " \tb43legacy_read32(dev, B43legacy_MMIO_GEN_IRQ_REASON);\n" - "@@ -1617,9 +1637,8 @@ static int b43legacy_upload_microcode(struct b43l=\n" - "egacy_wldev *dev)\n" + "@@ -1617,9 +1637,8 @@ static int b43legacy_upload_microcode(struct b43legacy_wldev *dev)\n" " \t\t\t \" is supported. You must change your firmware\"\n" " \t\t\t \" files.\\n\");\n" " \t\tb43legacy_print_fw_helptext(dev->wl);\n" "-\t\tb43legacy_write32(dev, B43legacy_MMIO_STATUS_BITFIELD, 0);\n" - " \t\terr =3D -EOPNOTSUPP;\n" + " \t\terr = -EOPNOTSUPP;\n" "-\t\tgoto out;\n" "+\t\tgoto error;\n" " \t}\n" - " \tb43legacydbg(dev->wl, \"Loading firmware version 0x%X, patch level %u =\n" - "\"\n" + " \tb43legacydbg(dev->wl, \"Loading firmware version 0x%X, patch level %u \"\n" " \t \"(20%.2i-%.2i-%.2i %.2i:%.2i:%.2i)\\n\", fwrev, fwpatch,\n" - "@@ -1629,7 +1648,14 @@ static int b43legacy_upload_microcode(struct b43=\n" - "legacy_wldev *dev)\n" - " \tdev->fw.rev =3D fwrev;\n" - " \tdev->fw.patch =3D fwpatch;\n" - "=20\n" + "@@ -1629,7 +1648,14 @@ static int b43legacy_upload_microcode(struct b43legacy_wldev *dev)\n" + " \tdev->fw.rev = fwrev;\n" + " \tdev->fw.patch = fwpatch;\n" + " \n" "-out:\n" "+\treturn 0;\n" "+\n" "+error:\n" - "+\tmacctl =3D b43legacy_read32(dev, B43legacy_MMIO_MACCTL);\n" - "+\tmacctl &=3D ~B43legacy_MACCTL_PSM_RUN;\n" - "+\tmacctl |=3D B43legacy_MACCTL_PSM_JMP0;\n" + "+\tmacctl = b43legacy_read32(dev, B43legacy_MMIO_MACCTL);\n" + "+\tmacctl &= ~B43legacy_MACCTL_PSM_RUN;\n" + "+\tmacctl |= B43legacy_MACCTL_PSM_JMP0;\n" "+\tb43legacy_write32(dev, B43legacy_MMIO_MACCTL, macctl);\n" "+\n" " \treturn err;\n" " }\n" - "=20\n" - "@@ -1736,9 +1762,9 @@ static int b43legacy_gpio_init(struct b43legacy_w=\n" - "ldev *dev)\n" + " \n" + "@@ -1736,9 +1762,9 @@ static int b43legacy_gpio_init(struct b43legacy_wldev *dev)\n" " \tu32 mask;\n" " \tu32 set;\n" - "=20\n" + " \n" "-\tb43legacy_write32(dev, B43legacy_MMIO_STATUS_BITFIELD,\n" "+\tb43legacy_write32(dev, B43legacy_MMIO_MACCTL,\n" " \t\t\t b43legacy_read32(dev,\n" "-\t\t\t B43legacy_MMIO_STATUS_BITFIELD)\n" "+\t\t\t B43legacy_MMIO_MACCTL)\n" " \t\t\t & 0xFFFF3FFF);\n" - "=20\n" + " \n" " \tb43legacy_write16(dev, B43legacy_MMIO_GPIO_MASK,\n" - "@@ -1798,14 +1824,14 @@ void b43legacy_mac_enable(struct b43legacy_wlde=\n" - "v *dev)\n" + "@@ -1798,14 +1824,14 @@ void b43legacy_mac_enable(struct b43legacy_wldev *dev)\n" " \tB43legacy_WARN_ON(dev->mac_suspended < 0);\n" " \tB43legacy_WARN_ON(irqs_disabled());\n" - " \tif (dev->mac_suspended =3D=3D 0) {\n" + " \tif (dev->mac_suspended == 0) {\n" "-\t\tb43legacy_write32(dev, B43legacy_MMIO_STATUS_BITFIELD,\n" "+\t\tb43legacy_write32(dev, B43legacy_MMIO_MACCTL,\n" " \t\t\t\t b43legacy_read32(dev,\n" @@ -967,11 +909,10 @@ "+\t\tb43legacy_read32(dev, B43legacy_MMIO_MACCTL);\n" " \t\tb43legacy_read32(dev, B43legacy_MMIO_GEN_IRQ_REASON);\n" " \t\tb43legacy_power_saving_ctl_bits(dev, -1, -1);\n" - "=20\n" - "@@ -1836,10 +1862,10 @@ void b43legacy_mac_suspend(struct b43legacy_wld=\n" - "ev *dev)\n" - " \t\tdev->irq_savedstate =3D tmp;\n" - "=20\n" + " \n" + "@@ -1836,10 +1862,10 @@ void b43legacy_mac_suspend(struct b43legacy_wldev *dev)\n" + " \t\tdev->irq_savedstate = tmp;\n" + " \n" " \t\tb43legacy_power_saving_ctl_bits(dev, -1, 1);\n" "-\t\tb43legacy_write32(dev, B43legacy_MMIO_STATUS_BITFIELD,\n" "+\t\tb43legacy_write32(dev, B43legacy_MMIO_MACCTL,\n" @@ -981,218 +922,200 @@ "+\t\t\t\t B43legacy_MMIO_MACCTL)\n" "+\t\t\t\t & ~B43legacy_MACCTL_ENABLED);\n" " \t\tb43legacy_read32(dev, B43legacy_MMIO_GEN_IRQ_REASON);\n" - " \t\tfor (i =3D 40; i; i--) {\n" - " \t\t\ttmp =3D b43legacy_read32(dev,\n" - "@@ -2007,12 +2033,15 @@ static int b43legacy_chip_init(struct b43legacy=\n" - "_wldev *dev)\n" - " \tstruct b43legacy_phy *phy =3D &dev->phy;\n" + " \t\tfor (i = 40; i; i--) {\n" + " \t\t\ttmp = b43legacy_read32(dev,\n" + "@@ -2007,12 +2033,15 @@ static int b43legacy_chip_init(struct b43legacy_wldev *dev)\n" + " \tstruct b43legacy_phy *phy = &dev->phy;\n" " \tint err;\n" " \tint tmp;\n" "-\tu32 value32;\n" "+\tu32 value32, macctl;\n" " \tu16 value16;\n" - "=20\n" + " \n" "-\tb43legacy_write32(dev, B43legacy_MMIO_STATUS_BITFIELD,\n" "-\t\t\t B43legacy_SBF_CORE_READY\n" "-\t\t\t | B43legacy_SBF_400);\n" "+\t/* Initialize the MAC control */\n" - "+\tmacctl =3D B43legacy_MACCTL_IHR_ENABLED | B43legacy_MACCTL_SHM_ENABLE=\n" - "D;\n" + "+\tmacctl = B43legacy_MACCTL_IHR_ENABLED | B43legacy_MACCTL_SHM_ENABLED;\n" "+\tif (dev->phy.gmode)\n" - "+\t\tmacctl |=3D B43legacy_MACCTL_GMODE;\n" - "+\tmacctl |=3D B43legacy_MACCTL_INFRA;\n" + "+\t\tmacctl |= B43legacy_MACCTL_GMODE;\n" + "+\tmacctl |= B43legacy_MACCTL_INFRA;\n" "+\tb43legacy_write32(dev, B43legacy_MMIO_MACCTL, macctl);\n" - "=20\n" - " \terr =3D b43legacy_request_firmware(dev);\n" + " \n" + " \terr = b43legacy_request_firmware(dev);\n" " \tif (err)\n" - "@@ -2052,12 +2081,12 @@ static int b43legacy_chip_init(struct b43legacy=\n" - "_wldev *dev)\n" + "@@ -2052,12 +2081,12 @@ static int b43legacy_chip_init(struct b43legacy_wldev *dev)\n" " \tif (dev->dev->id.revision < 5)\n" " \t\tb43legacy_write32(dev, 0x010C, 0x01000000);\n" - "=20\n" - "-\tvalue32 =3D b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD);\n" - "-\tvalue32 &=3D ~B43legacy_SBF_MODE_NOTADHOC;\n" + " \n" + "-\tvalue32 = b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD);\n" + "-\tvalue32 &= ~B43legacy_SBF_MODE_NOTADHOC;\n" "-\tb43legacy_write32(dev, B43legacy_MMIO_STATUS_BITFIELD, value32);\n" - "-\tvalue32 =3D b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD);\n" - "-\tvalue32 |=3D B43legacy_SBF_MODE_NOTADHOC;\n" + "-\tvalue32 = b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD);\n" + "-\tvalue32 |= B43legacy_SBF_MODE_NOTADHOC;\n" "-\tb43legacy_write32(dev, B43legacy_MMIO_STATUS_BITFIELD, value32);\n" - "+\tvalue32 =3D b43legacy_read32(dev, B43legacy_MMIO_MACCTL);\n" - "+\tvalue32 &=3D ~B43legacy_MACCTL_INFRA;\n" + "+\tvalue32 = b43legacy_read32(dev, B43legacy_MMIO_MACCTL);\n" + "+\tvalue32 &= ~B43legacy_MACCTL_INFRA;\n" "+\tb43legacy_write32(dev, B43legacy_MMIO_MACCTL, value32);\n" - "+\tvalue32 =3D b43legacy_read32(dev, B43legacy_MMIO_MACCTL);\n" - "+\tvalue32 |=3D B43legacy_MACCTL_INFRA;\n" + "+\tvalue32 = b43legacy_read32(dev, B43legacy_MMIO_MACCTL);\n" + "+\tvalue32 |= B43legacy_MACCTL_INFRA;\n" "+\tb43legacy_write32(dev, B43legacy_MMIO_MACCTL, value32);\n" - "=20\n" + " \n" " \tif (b43legacy_using_pio(dev)) {\n" " \t\tb43legacy_write32(dev, 0x0210, 0x00000100);\n" - "@@ -2951,12 +2980,19 @@ static void b43legacy_wireless_core_exit(struct=\n" - " b43legacy_wldev *dev)\n" + "@@ -2951,12 +2980,19 @@ static void b43legacy_wireless_core_exit(struct b43legacy_wldev *dev)\n" " {\n" - " \tstruct b43legacy_wl *wl =3D dev->wl;\n" - " \tstruct b43legacy_phy *phy =3D &dev->phy;\n" + " \tstruct b43legacy_wl *wl = dev->wl;\n" + " \tstruct b43legacy_phy *phy = &dev->phy;\n" "+\tu32 macctl;\n" - "=20\n" - " \tB43legacy_WARN_ON(b43legacy_status(dev) > B43legacy_STAT_INITIALIZED)=\n" - ";\n" - " \tif (b43legacy_status(dev) !=3D B43legacy_STAT_INITIALIZED)\n" + " \n" + " \tB43legacy_WARN_ON(b43legacy_status(dev) > B43legacy_STAT_INITIALIZED);\n" + " \tif (b43legacy_status(dev) != B43legacy_STAT_INITIALIZED)\n" " \t\treturn;\n" " \tb43legacy_set_status(dev, B43legacy_STAT_UNINIT);\n" - "=20\n" + " \n" "+\t/* Stop the microcode PSM. */\n" - "+\tmacctl =3D b43legacy_read32(dev, B43legacy_MMIO_MACCTL);\n" - "+\tmacctl &=3D ~B43legacy_MACCTL_PSM_RUN;\n" - "+\tmacctl |=3D B43legacy_MACCTL_PSM_JMP0;\n" + "+\tmacctl = b43legacy_read32(dev, B43legacy_MMIO_MACCTL);\n" + "+\tmacctl &= ~B43legacy_MACCTL_PSM_RUN;\n" + "+\tmacctl |= B43legacy_MACCTL_PSM_JMP0;\n" "+\tb43legacy_write32(dev, B43legacy_MMIO_MACCTL, macctl);\n" "+\n" " \tmutex_unlock(&wl->mutex);\n" " \t/* Must unlock as it would otherwise deadlock. No races here.\n" " \t * Cancel possibly pending workqueues. */\n" - "@@ -3221,6 +3257,7 @@ static int b43legacy_op_start(struct ieee80211_hw=\n" - " *hw)\n" - " \tstruct b43legacy_wldev *dev =3D wl->current_dev;\n" - " \tint did_init =3D 0;\n" - " \tint err =3D 0;\n" - "+\tbool do_rfkill_exit =3D 0;\n" - "=20\n" + "@@ -3221,6 +3257,7 @@ static int b43legacy_op_start(struct ieee80211_hw *hw)\n" + " \tstruct b43legacy_wldev *dev = wl->current_dev;\n" + " \tint did_init = 0;\n" + " \tint err = 0;\n" + "+\tbool do_rfkill_exit = 0;\n" + " \n" " \t/* First register RFkill.\n" " \t * LEDs that are registered later depend on it. */\n" - "@@ -3230,8 +3267,10 @@ static int b43legacy_op_start(struct ieee80211_h=\n" - "w *hw)\n" - "=20\n" + "@@ -3230,8 +3267,10 @@ static int b43legacy_op_start(struct ieee80211_hw *hw)\n" + " \n" " \tif (b43legacy_status(dev) < B43legacy_STAT_INITIALIZED) {\n" - " \t\terr =3D b43legacy_wireless_core_init(dev);\n" + " \t\terr = b43legacy_wireless_core_init(dev);\n" "-\t\tif (err)\n" "+\t\tif (err) {\n" - "+\t\t\tdo_rfkill_exit =3D 1;\n" + "+\t\t\tdo_rfkill_exit = 1;\n" " \t\t\tgoto out_mutex_unlock;\n" "+\t\t}\n" - " \t\tdid_init =3D 1;\n" + " \t\tdid_init = 1;\n" " \t}\n" - "=20\n" - "@@ -3240,6 +3279,7 @@ static int b43legacy_op_start(struct ieee80211_hw=\n" - " *hw)\n" + " \n" + "@@ -3240,6 +3279,7 @@ static int b43legacy_op_start(struct ieee80211_hw *hw)\n" " \t\tif (err) {\n" " \t\t\tif (did_init)\n" " \t\t\t\tb43legacy_wireless_core_exit(dev);\n" - "+\t\t\tdo_rfkill_exit =3D 1;\n" + "+\t\t\tdo_rfkill_exit = 1;\n" " \t\t\tgoto out_mutex_unlock;\n" " \t\t}\n" " \t}\n" - "@@ -3247,6 +3287,9 @@ static int b43legacy_op_start(struct ieee80211_hw=\n" - " *hw)\n" + "@@ -3247,6 +3287,9 @@ static int b43legacy_op_start(struct ieee80211_hw *hw)\n" " out_mutex_unlock:\n" " \tmutex_unlock(&wl->mutex);\n" - "=20\n" + " \n" "+\tif (do_rfkill_exit)\n" "+\t\tb43legacy_rfkill_exit(dev);\n" "+\n" " \treturn err;\n" " }\n" - "=20\n" - "diff --git a/drivers/net/wireless/b43legacy/phy.c b/drivers/net/wireles=\n" - "s/b43legacy/phy.c\n" + " \n" + "diff --git a/drivers/net/wireless/b43legacy/phy.c b/drivers/net/wireless/b43legacy/phy.c\n" "index c16febb..8e5c09b 100644\n" "--- a/drivers/net/wireless/b43legacy/phy.c\n" "+++ b/drivers/net/wireless/b43legacy/phy.c\n" - "@@ -140,7 +140,7 @@ void b43legacy_phy_calibrate(struct b43legacy_wldev=\n" - " *dev)\n" + "@@ -140,7 +140,7 @@ void b43legacy_phy_calibrate(struct b43legacy_wldev *dev)\n" " {\n" - " \tstruct b43legacy_phy *phy =3D &dev->phy;\n" - "=20\n" - "-\tb43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD); /* Dummy read.=\n" - " */\n" + " \tstruct b43legacy_phy *phy = &dev->phy;\n" + " \n" + "-\tb43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD); /* Dummy read. */\n" "+\tb43legacy_read32(dev, B43legacy_MMIO_MACCTL); /* Dummy read. */\n" " \tif (phy->calibrated)\n" " \t\treturn;\n" - " \tif (phy->type =3D=3D B43legacy_PHYTYPE_G && phy->rev =3D=3D 1) {\n" - "@@ -2231,16 +2231,16 @@ bit26 =3D 1;\n" + " \tif (phy->type == B43legacy_PHYTYPE_G && phy->rev == 1) {\n" + "@@ -2231,16 +2231,16 @@ bit26 = 1;\n" " \t\t *\tor the latest PS-Poll packet sent was successful,\n" " \t\t *\tset bit26 */\n" " \t}\n" - "-\tstatus =3D b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD);\n" - "+\tstatus =3D b43legacy_read32(dev, B43legacy_MMIO_MACCTL);\n" + "-\tstatus = b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD);\n" + "+\tstatus = b43legacy_read32(dev, B43legacy_MMIO_MACCTL);\n" " \tif (bit25)\n" - "-\t\tstatus |=3D B43legacy_SBF_PS1;\n" - "+\t\tstatus |=3D B43legacy_MACCTL_HWPS;\n" + "-\t\tstatus |= B43legacy_SBF_PS1;\n" + "+\t\tstatus |= B43legacy_MACCTL_HWPS;\n" " \telse\n" - "-\t\tstatus &=3D ~B43legacy_SBF_PS1;\n" - "+\t\tstatus &=3D ~B43legacy_MACCTL_HWPS;\n" + "-\t\tstatus &= ~B43legacy_SBF_PS1;\n" + "+\t\tstatus &= ~B43legacy_MACCTL_HWPS;\n" " \tif (bit26)\n" - "-\t\tstatus |=3D B43legacy_SBF_PS2;\n" - "+\t\tstatus |=3D B43legacy_MACCTL_AWAKE;\n" + "-\t\tstatus |= B43legacy_SBF_PS2;\n" + "+\t\tstatus |= B43legacy_MACCTL_AWAKE;\n" " \telse\n" - "-\t\tstatus &=3D ~B43legacy_SBF_PS2;\n" + "-\t\tstatus &= ~B43legacy_SBF_PS2;\n" "-\tb43legacy_write32(dev, B43legacy_MMIO_STATUS_BITFIELD, status);\n" - "+\t\tstatus &=3D ~B43legacy_MACCTL_AWAKE;\n" + "+\t\tstatus &= ~B43legacy_MACCTL_AWAKE;\n" "+\tb43legacy_write32(dev, B43legacy_MMIO_MACCTL, status);\n" - " \tif (bit26 && dev->dev->id.revision >=3D 5) {\n" - " \t\tfor (i =3D 0; i < 100; i++) {\n" + " \tif (bit26 && dev->dev->id.revision >= 5) {\n" + " \t\tfor (i = 0; i < 100; i++) {\n" " \t\t\tif (b43legacy_shm_read32(dev, B43legacy_SHM_SHARED,\n" - "diff --git a/drivers/net/wireless/b43legacy/pio.c b/drivers/net/wireles=\n" - "s/b43legacy/pio.c\n" + "diff --git a/drivers/net/wireless/b43legacy/pio.c b/drivers/net/wireless/b43legacy/pio.c\n" "index de843ac..e4f4c5c 100644\n" "--- a/drivers/net/wireless/b43legacy/pio.c\n" "+++ b/drivers/net/wireless/b43legacy/pio.c\n" - "@@ -334,9 +334,9 @@ struct b43legacy_pioqueue *b43legacy_setup_pioqueue=\n" - "(struct b43legacy_wldev *dev,\n" + "@@ -334,9 +334,9 @@ struct b43legacy_pioqueue *b43legacy_setup_pioqueue(struct b43legacy_wldev *dev,\n" " \ttasklet_init(&queue->txtask, tx_tasklet,\n" " \t\t (unsigned long)queue);\n" - "=20\n" - "-\tvalue =3D b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD);\n" - "-\tvalue &=3D ~B43legacy_SBF_XFER_REG_BYTESWAP;\n" + " \n" + "-\tvalue = b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD);\n" + "-\tvalue &= ~B43legacy_SBF_XFER_REG_BYTESWAP;\n" "-\tb43legacy_write32(dev, B43legacy_MMIO_STATUS_BITFIELD, value);\n" - "+\tvalue =3D b43legacy_read32(dev, B43legacy_MMIO_MACCTL);\n" - "+\tvalue &=3D ~B43legacy_MACCTL_BE;\n" + "+\tvalue = b43legacy_read32(dev, B43legacy_MMIO_MACCTL);\n" + "+\tvalue &= ~B43legacy_MACCTL_BE;\n" "+\tb43legacy_write32(dev, B43legacy_MMIO_MACCTL, value);\n" - "=20\n" - " \tqsize =3D b43legacy_read16(dev, queue->mmio_base\n" + " \n" + " \tqsize = b43legacy_read16(dev, queue->mmio_base\n" " \t\t\t\t + B43legacy_PIO_TXQBUFSIZE);\n" - "diff --git a/drivers/net/wireless/b43legacy/radio.c b/drivers/net/wirel=\n" - "ess/b43legacy/radio.c\n" + "diff --git a/drivers/net/wireless/b43legacy/radio.c b/drivers/net/wireless/b43legacy/radio.c\n" "index 318a270..955832e 100644\n" "--- a/drivers/net/wireless/b43legacy/radio.c\n" "+++ b/drivers/net/wireless/b43legacy/radio.c\n" - "@@ -91,10 +91,10 @@ void b43legacy_radio_lock(struct b43legacy_wldev *d=\n" - "ev)\n" + "@@ -91,10 +91,10 @@ void b43legacy_radio_lock(struct b43legacy_wldev *dev)\n" " {\n" " \tu32 status;\n" - "=20\n" - "-\tstatus =3D b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD);\n" + " \n" + "-\tstatus = b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD);\n" "-\tB43legacy_WARN_ON(status & B43legacy_SBF_RADIOREG_LOCK);\n" - "-\tstatus |=3D B43legacy_SBF_RADIOREG_LOCK;\n" + "-\tstatus |= B43legacy_SBF_RADIOREG_LOCK;\n" "-\tb43legacy_write32(dev, B43legacy_MMIO_STATUS_BITFIELD, status);\n" - "+\tstatus =3D b43legacy_read32(dev, B43legacy_MMIO_MACCTL);\n" + "+\tstatus = b43legacy_read32(dev, B43legacy_MMIO_MACCTL);\n" "+\tB43legacy_WARN_ON(status & B43legacy_MACCTL_RADIOLOCK);\n" - "+\tstatus |=3D B43legacy_MACCTL_RADIOLOCK;\n" + "+\tstatus |= B43legacy_MACCTL_RADIOLOCK;\n" "+\tb43legacy_write32(dev, B43legacy_MMIO_MACCTL, status);\n" " \tmmiowb();\n" " \tudelay(10);\n" " }\n" - "@@ -104,10 +104,10 @@ void b43legacy_radio_unlock(struct b43legacy_wlde=\n" - "v *dev)\n" + "@@ -104,10 +104,10 @@ void b43legacy_radio_unlock(struct b43legacy_wldev *dev)\n" " \tu32 status;\n" - "=20\n" + " \n" " \tb43legacy_read16(dev, B43legacy_MMIO_PHY_VER); /* dummy read */\n" - "-\tstatus =3D b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD);\n" + "-\tstatus = b43legacy_read32(dev, B43legacy_MMIO_STATUS_BITFIELD);\n" "-\tB43legacy_WARN_ON(!(status & B43legacy_SBF_RADIOREG_LOCK));\n" - "-\tstatus &=3D ~B43legacy_SBF_RADIOREG_LOCK;\n" + "-\tstatus &= ~B43legacy_SBF_RADIOREG_LOCK;\n" "-\tb43legacy_write32(dev, B43legacy_MMIO_STATUS_BITFIELD, status);\n" - "+\tstatus =3D b43legacy_read32(dev, B43legacy_MMIO_MACCTL);\n" + "+\tstatus = b43legacy_read32(dev, B43legacy_MMIO_MACCTL);\n" "+\tB43legacy_WARN_ON(!(status & B43legacy_MACCTL_RADIOLOCK));\n" - "+\tstatus &=3D ~B43legacy_MACCTL_RADIOLOCK;\n" + "+\tstatus &= ~B43legacy_MACCTL_RADIOLOCK;\n" "+\tb43legacy_write32(dev, B43legacy_MMIO_MACCTL, status);\n" " \tmmiowb();\n" " }\n" - "=20\n" - "diff --git a/drivers/net/wireless/hostap/hostap_80211.h b/drivers/net/w=\n" - "ireless/hostap/hostap_80211.h\n" + " \n" + "diff --git a/drivers/net/wireless/hostap/hostap_80211.h b/drivers/net/wireless/hostap/hostap_80211.h\n" "index d6b9362..3694b1e 100644\n" "--- a/drivers/net/wireless/hostap/hostap_80211.h\n" "+++ b/drivers/net/wireless/hostap/hostap_80211.h\n" "@@ -71,11 +71,6 @@ struct hostap_80211_rx_status {\n" " \tu16 rate; /* in 100 kbps */\n" " };\n" - "=20\n" + " \n" "-\n" "-void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,\n" "-\t\t struct hostap_80211_rx_status *rx_stats);\n" @@ -1201,13 +1124,11 @@ " /* prism2_rx_80211 'type' argument */\n" " enum {\n" " \tPRISM2_RX_MONITOR, PRISM2_RX_MGMT, PRISM2_RX_NON_ASSOC,\n" - "diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wire=\n" - "less/hostap/hostap_cs.c\n" + "diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c\n" "index 0759380..437a9bc 100644\n" "--- a/drivers/net/wireless/hostap/hostap_cs.c\n" "+++ b/drivers/net/wireless/hostap/hostap_cs.c\n" - "@@ -891,6 +891,9 @@ static struct pcmcia_device_id hostap_cs_ids[] =3D =\n" - "{\n" + "@@ -891,6 +891,9 @@ static struct pcmcia_device_id hostap_cs_ids[] = {\n" " \tPCMCIA_DEVICE_PROD_ID123(\n" " \t\t\"The Linksys Group, Inc.\", \"Wireless Network CF Card\", \"ISL37300P\",\n" " \t\t0xa5f472c2, 0x9c05598d, 0xc9049a39),\n" @@ -1217,44 +1138,33 @@ " \tPCMCIA_DEVICE_NULL\n" " };\n" " MODULE_DEVICE_TABLE(pcmcia, hostap_cs_ids);\n" - "diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-hw.h b/drivers/net/w=\n" - "ireless/iwlwifi/iwl-3945-hw.h\n" + "diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-hw.h b/drivers/net/wireless/iwlwifi/iwl-3945-hw.h\n" "index 6e01873..571815d 100644\n" "--- a/drivers/net/wireless/iwlwifi/iwl-3945-hw.h\n" "+++ b/drivers/net/wireless/iwlwifi/iwl-3945-hw.h\n" "@@ -373,7 +373,7 @@ struct iwl3945_eeprom {\n" - " #define CSR_INT_BIT_HW_ERR (1 << 29) /* DMA hardware error FH_IN=\n" - "T[31] */\n" + " #define CSR_INT_BIT_HW_ERR (1 << 29) /* DMA hardware error FH_INT[31] */\n" " #define CSR_INT_BIT_DNLD (1 << 28) /* uCode Download */\n" " #define CSR_INT_BIT_FH_TX (1 << 27) /* Tx DMA FH_INT[1:0] */\n" - "-#define CSR_INT_BIT_MAC_CLK_ACTV (1 << 26) /* NIC controller's clock t=\n" - "oggled on/off */\n" + "-#define CSR_INT_BIT_MAC_CLK_ACTV (1 << 26) /* NIC controller's clock toggled on/off */\n" "+#define CSR_INT_BIT_SCD (1 << 26) /* TXQ pointer advanced */\n" " #define CSR_INT_BIT_SW_ERR (1 << 25) /* uCode error */\n" - " #define CSR_INT_BIT_RF_KILL (1 << 7) /* HW RFKILL switch GP_CNTR=\n" - "L[27] toggled */\n" - " #define CSR_INT_BIT_CT_KILL (1 << 6) /* Critical temp (chip too =\n" - "hot) rfkill */\n" - "diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wire=\n" - "less/iwlwifi/iwl-3945.c\n" + " #define CSR_INT_BIT_RF_KILL (1 << 7) /* HW RFKILL switch GP_CNTRL[27] toggled */\n" + " #define CSR_INT_BIT_CT_KILL (1 << 6) /* Critical temp (chip too hot) rfkill */\n" + "diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c\n" "index 76c4ed1..4fdeb53 100644\n" "--- a/drivers/net/wireless/iwlwifi/iwl-3945.c\n" "+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c\n" - "@@ -2369,18 +2369,4 @@ struct pci_device_id iwl3945_hw_card_ids[] =3D {\n" + "@@ -2369,18 +2369,4 @@ struct pci_device_id iwl3945_hw_card_ids[] = {\n" " \t{0}\n" " };\n" - "=20\n" + " \n" "-/*\n" - "- * Clear the OWNER_MSK, to establish driver (instead of uCode running =\n" - "on\n" - "- * embedded controller) as EEPROM reader; each read is a series of pul=\n" - "ses\n" - "- * to/from the EEPROM chip, not a single event, so even reads could co=\n" - "nflict\n" - "- * if they weren't arbitrated by some ownership mechanism. Here, the =\n" - "driver\n" - "- * simply claims ownership, which should be safe when this function is=\n" - " called\n" + "- * Clear the OWNER_MSK, to establish driver (instead of uCode running on\n" + "- * embedded controller) as EEPROM reader; each read is a series of pulses\n" + "- * to/from the EEPROM chip, not a single event, so even reads could conflict\n" + "- * if they weren't arbitrated by some ownership mechanism. Here, the driver\n" + "- * simply claims ownership, which should be safe when this function is called\n" "- * (i.e. before loading uCode!).\n" "- */\n" "-inline int iwl3945_eeprom_acquire_semaphore(struct iwl3945_priv *priv)\n" @@ -1264,60 +1174,48 @@ "-}\n" "-\n" " MODULE_DEVICE_TABLE(pci, iwl3945_hw_card_ids);\n" - "diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h b/drivers/net/wire=\n" - "less/iwlwifi/iwl-3945.h\n" + "diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h b/drivers/net/wireless/iwlwifi/iwl-3945.h\n" "index 20b925f..1da14f9 100644\n" "--- a/drivers/net/wireless/iwlwifi/iwl-3945.h\n" "+++ b/drivers/net/wireless/iwlwifi/iwl-3945.h\n" - "@@ -671,7 +671,6 @@ extern int iwl3945_hw_channel_switch(struct iwl3945=\n" - "_priv *priv, u16 channel);\n" + "@@ -671,7 +671,6 @@ extern int iwl3945_hw_channel_switch(struct iwl3945_priv *priv, u16 channel);\n" " /*\n" " * Forward declare iwl-3945.c functions for iwl-base.c\n" " */\n" - "-extern int iwl3945_eeprom_acquire_semaphore(struct iwl3945_priv *priv)=\n" - ";\n" - " extern __le32 iwl3945_get_antenna_flags(const struct iwl3945_priv *pri=\n" - "v);\n" + "-extern int iwl3945_eeprom_acquire_semaphore(struct iwl3945_priv *priv);\n" + " extern __le32 iwl3945_get_antenna_flags(const struct iwl3945_priv *priv);\n" " extern int iwl3945_init_hw_rate_table(struct iwl3945_priv *priv);\n" " extern void iwl3945_reg_txpower_periodic(struct iwl3945_priv *priv);\n" "@@ -791,7 +790,6 @@ struct iwl3945_priv {\n" " \tu16 active_rate_basic;\n" - "=20\n" + " \n" " \tu8 call_post_assoc_from_beacon;\n" "-\tu8 assoc_station_added;\n" " \t/* Rate scaling data */\n" " \ts8 data_retry_limit;\n" " \tu8 retry_rate;\n" - "diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-hw.h b/drivers/net/w=\n" - "ireless/iwlwifi/iwl-4965-hw.h\n" + "diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-hw.h b/drivers/net/wireless/iwlwifi/iwl-4965-hw.h\n" "index ff71c09..ffe1e9d 100644\n" "--- a/drivers/net/wireless/iwlwifi/iwl-4965-hw.h\n" "+++ b/drivers/net/wireless/iwlwifi/iwl-4965-hw.h\n" "@@ -465,7 +465,7 @@ struct iwl4965_eeprom {\n" - " #define CSR_INT_BIT_HW_ERR (1 << 29) /* DMA hardware error FH_IN=\n" - "T[31] */\n" + " #define CSR_INT_BIT_HW_ERR (1 << 29) /* DMA hardware error FH_INT[31] */\n" " #define CSR_INT_BIT_DNLD (1 << 28) /* uCode Download */\n" " #define CSR_INT_BIT_FH_TX (1 << 27) /* Tx DMA FH_INT[1:0] */\n" - "-#define CSR_INT_BIT_MAC_CLK_ACTV (1 << 26) /* NIC controller's clock t=\n" - "oggled on/off */\n" + "-#define CSR_INT_BIT_MAC_CLK_ACTV (1 << 26) /* NIC controller's clock toggled on/off */\n" "+#define CSR_INT_BIT_SCD (1 << 26) /* TXQ pointer advanced */\n" " #define CSR_INT_BIT_SW_ERR (1 << 25) /* uCode error */\n" - " #define CSR_INT_BIT_RF_KILL (1 << 7) /* HW RFKILL switch GP_CNTR=\n" - "L[27] toggled */\n" - " #define CSR_INT_BIT_CT_KILL (1 << 6) /* Critical temp (chip too =\n" - "hot) rfkill */\n" - "diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wire=\n" - "less/iwlwifi/iwl-4965.c\n" + " #define CSR_INT_BIT_RF_KILL (1 << 7) /* HW RFKILL switch GP_CNTRL[27] toggled */\n" + " #define CSR_INT_BIT_CT_KILL (1 << 6) /* Critical temp (chip too hot) rfkill */\n" + "diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c\n" "index 04db34b..569347f 100644\n" "--- a/drivers/net/wireless/iwlwifi/iwl-4965.c\n" "+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c\n" - "@@ -4961,11 +4961,4 @@ int iwl4965_eeprom_acquire_semaphore(struct iwl4=\n" - "965_priv *priv)\n" + "@@ -4961,11 +4961,4 @@ int iwl4965_eeprom_acquire_semaphore(struct iwl4965_priv *priv)\n" " \treturn rc;\n" " }\n" - "=20\n" - "-inline void iwl4965_eeprom_release_semaphore(struct iwl4965_priv *priv=\n" - ")\n" + " \n" + "-inline void iwl4965_eeprom_release_semaphore(struct iwl4965_priv *priv)\n" "-{\n" "-\tiwl4965_clear_bit(priv, CSR_HW_IF_CONFIG_REG,\n" "-\t\tCSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM);\n" @@ -1325,65 +1223,52 @@ "-\n" "-\n" " MODULE_DEVICE_TABLE(pci, iwl4965_hw_card_ids);\n" - "diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.h b/drivers/net/wire=\n" - "less/iwlwifi/iwl-4965.h\n" + "diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.h b/drivers/net/wireless/iwlwifi/iwl-4965.h\n" "index 78bc148..9cb82be 100644\n" "--- a/drivers/net/wireless/iwlwifi/iwl-4965.h\n" "+++ b/drivers/net/wireless/iwlwifi/iwl-4965.h\n" "@@ -750,7 +750,6 @@ struct iwl4965_priv;\n" " * Forward declare iwl-4965.c functions for iwl-base.c\n" " */\n" - " extern int iwl4965_eeprom_acquire_semaphore(struct iwl4965_priv *priv)=\n" - ";\n" - "-extern void iwl4965_eeprom_release_semaphore(struct iwl4965_priv *priv=\n" - ");\n" - "=20\n" + " extern int iwl4965_eeprom_acquire_semaphore(struct iwl4965_priv *priv);\n" + "-extern void iwl4965_eeprom_release_semaphore(struct iwl4965_priv *priv);\n" + " \n" " extern int iwl4965_tx_queue_update_wr_ptr(struct iwl4965_priv *priv,\n" " \t\t\t\t\t struct iwl4965_tx_queue *txq,\n" - "diff --git a/drivers/net/wireless/iwlwifi/iwl-helpers.h b/drivers/net/w=\n" - "ireless/iwlwifi/iwl-helpers.h\n" + "diff --git a/drivers/net/wireless/iwlwifi/iwl-helpers.h b/drivers/net/wireless/iwlwifi/iwl-helpers.h\n" "index cd2eb18..cb009f4 100644\n" "--- a/drivers/net/wireless/iwlwifi/iwl-helpers.h\n" "+++ b/drivers/net/wireless/iwlwifi/iwl-helpers.h\n" - "@@ -246,10 +246,10 @@ static inline int iwl_check_bits(unsigned long fi=\n" - "eld, unsigned long mask)\n" + "@@ -246,10 +246,10 @@ static inline int iwl_check_bits(unsigned long field, unsigned long mask)\n" " static inline unsigned long elapsed_jiffies(unsigned long start,\n" " \t\t\t\t\t unsigned long end)\n" " {\n" "-\tif (end > start)\n" - "+\tif (end >=3D start)\n" + "+\tif (end >= start)\n" " \t\treturn end - start;\n" - "=20\n" + " \n" "-\treturn end + (MAX_JIFFY_OFFSET - start);\n" "+\treturn end + (MAX_JIFFY_OFFSET - start) + 1;\n" " }\n" - "=20\n" + " \n" " static inline u8 iwl_get_dma_hi_address(dma_addr_t addr)\n" - "diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/=\n" - "wireless/iwlwifi/iwl3945-base.c\n" + "diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c\n" "index 748ac12..33239f1 100644\n" "--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c\n" "+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c\n" - "@@ -1557,6 +1557,20 @@ static void get_eeprom_mac(struct iwl3945_priv *=\n" - "priv, u8 *mac)\n" + "@@ -1557,6 +1557,20 @@ static void get_eeprom_mac(struct iwl3945_priv *priv, u8 *mac)\n" " \tmemcpy(mac, priv->eeprom.mac_address, 6);\n" " }\n" - "=20\n" + " \n" "+/*\n" - "+ * Clear the OWNER_MSK, to establish driver (instead of uCode running =\n" - "on\n" - "+ * embedded controller) as EEPROM reader; each read is a series of pul=\n" - "ses\n" - "+ * to/from the EEPROM chip, not a single event, so even reads could co=\n" - "nflict\n" - "+ * if they weren't arbitrated by some ownership mechanism. Here, the =\n" - "driver\n" - "+ * simply claims ownership, which should be safe when this function is=\n" - " called\n" + "+ * Clear the OWNER_MSK, to establish driver (instead of uCode running on\n" + "+ * embedded controller) as EEPROM reader; each read is a series of pulses\n" + "+ * to/from the EEPROM chip, not a single event, so even reads could conflict\n" + "+ * if they weren't arbitrated by some ownership mechanism. Here, the driver\n" + "+ * simply claims ownership, which should be safe when this function is called\n" "+ * (i.e. before loading uCode!).\n" "+ */\n" - "+static inline int iwl3945_eeprom_acquire_semaphore(struct iwl3945_priv=\n" - " *priv)\n" + "+static inline int iwl3945_eeprom_acquire_semaphore(struct iwl3945_priv *priv)\n" "+{\n" "+\t_iwl3945_clear_bit(priv, CSR_EEPROM_GP, CSR_EEPROM_GP_IF_OWNER_MSK);\n" "+\treturn 0;\n" @@ -1392,18 +1277,16 @@ " /**\n" " * iwl3945_eeprom_init - read EEPROM contents\n" " *\n" - "@@ -2792,7 +2806,7 @@ static int iwl3945_tx_skb(struct iwl3945_priv *pr=\n" - "iv,\n" + "@@ -2792,7 +2806,7 @@ static int iwl3945_tx_skb(struct iwl3945_priv *priv,\n" " #endif\n" - "=20\n" + " \n" " \t/* drop all data frame if we are not associated */\n" "-\tif (!iwl3945_is_associated(priv) && !priv->assoc_id &&\n" "+\tif ((!iwl3945_is_associated(priv) || !priv->assoc_id) &&\n" - " \t ((fc & IEEE80211_FCTL_FTYPE) =3D=3D IEEE80211_FTYPE_DATA)) {\n" + " \t ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA)) {\n" " \t\tIWL_DEBUG_DROP(\"Dropping - !iwl3945_is_associated\\n\");\n" " \t\tgoto drop_unlock;\n" - "@@ -4745,8 +4759,9 @@ static void iwl3945_irq_tasklet(struct iwl3945_pr=\n" - "iv *priv)\n" + "@@ -4745,8 +4759,9 @@ static void iwl3945_irq_tasklet(struct iwl3945_priv *priv)\n" " #ifdef CONFIG_IWL3945_DEBUG\n" " \tif (iwl3945_debug_level & (IWL_DL_ISR)) {\n" " \t\t/* NIC fires this, but we don't use it, redundant with WAKEUP */\n" @@ -1412,59 +1295,51 @@ "+\t\tif (inta & CSR_INT_BIT_SCD)\n" "+\t\t\tIWL_DEBUG_ISR(\"Scheduler finished to transmit \"\n" "+\t\t\t\t \"the frame/frames.\\n\");\n" - "=20\n" + " \n" " \t\t/* Alive notification via Rx interrupt will do the real work */\n" " \t\tif (inta & CSR_INT_BIT_ALIVE)\n" - "@@ -4754,7 +4769,7 @@ static void iwl3945_irq_tasklet(struct iwl3945_pr=\n" - "iv *priv)\n" + "@@ -4754,7 +4769,7 @@ static void iwl3945_irq_tasklet(struct iwl3945_priv *priv)\n" " \t}\n" " #endif\n" " \t/* Safely ignore these bits for debug checks below */\n" - "-\tinta &=3D ~(CSR_INT_BIT_MAC_CLK_ACTV | CSR_INT_BIT_ALIVE);\n" - "+\tinta &=3D ~(CSR_INT_BIT_SCD | CSR_INT_BIT_ALIVE);\n" - "=20\n" + "-\tinta &= ~(CSR_INT_BIT_MAC_CLK_ACTV | CSR_INT_BIT_ALIVE);\n" + "+\tinta &= ~(CSR_INT_BIT_SCD | CSR_INT_BIT_ALIVE);\n" + " \n" " \t/* HW RF KILL switch toggled (4965 only) */\n" " \tif (inta & CSR_INT_BIT_RF_KILL) {\n" - "@@ -4890,8 +4905,11 @@ static irqreturn_t iwl3945_isr(int irq, void *da=\n" - "ta)\n" + "@@ -4890,8 +4905,11 @@ static irqreturn_t iwl3945_isr(int irq, void *data)\n" " \tIWL_DEBUG_ISR(\"ISR inta 0x%08x, enabled 0x%08x, fh 0x%08x\\n\",\n" " \t\t inta, inta_mask, inta_fh);\n" - "=20\n" - "+\tinta &=3D ~CSR_INT_BIT_SCD;\n" + " \n" + "+\tinta &= ~CSR_INT_BIT_SCD;\n" "+\n" - " \t/* iwl3945_irq_tasklet() will service interrupts and re-enable them *=\n" - "/\n" + " \t/* iwl3945_irq_tasklet() will service interrupts and re-enable them */\n" "-\ttasklet_schedule(&priv->irq_tasklet);\n" "+\tif (likely(inta || inta_fh))\n" "+\t\ttasklet_schedule(&priv->irq_tasklet);\n" " unplugged:\n" " \tspin_unlock(&priv->lock);\n" - "=20\n" - "@@ -5146,6 +5164,15 @@ static int iwl3945_init_channel_map(struct iwl39=\n" - "45_priv *priv)\n" + " \n" + "@@ -5146,6 +5164,15 @@ static int iwl3945_init_channel_map(struct iwl3945_priv *priv)\n" " \treturn 0;\n" " }\n" - "=20\n" + " \n" "+/*\n" - "+ * iwl3945_free_channel_map - undo allocations in iwl3945_init_channel=\n" - "_map\n" + "+ * iwl3945_free_channel_map - undo allocations in iwl3945_init_channel_map\n" "+ */\n" "+static void iwl3945_free_channel_map(struct iwl3945_priv *priv)\n" "+{\n" "+\tkfree(priv->channel_info);\n" - "+\tpriv->channel_count =3D 0;\n" + "+\tpriv->channel_count = 0;\n" "+}\n" "+\n" - " /* For active scan, listen ACTIVE_DWELL_TIME (msec) on each channel af=\n" - "ter\n" - " * sending probe req. This should be set long enough to hear probe re=\n" - "sponses\n" + " /* For active scan, listen ACTIVE_DWELL_TIME (msec) on each channel after\n" + " * sending probe req. This should be set long enough to hear probe responses\n" " * from more than one AP. */\n" - "@@ -5471,6 +5498,17 @@ static int iwl3945_init_geos(struct iwl3945_priv=\n" - " *priv)\n" + "@@ -5471,6 +5498,17 @@ static int iwl3945_init_geos(struct iwl3945_priv *priv)\n" " \treturn 0;\n" " }\n" - "=20\n" + " \n" "+/*\n" "+ * iwl3945_free_geos - undo allocations in iwl3945_init_geos\n" "+ */\n" @@ -1476,16 +1351,14 @@ "+\tclear_bit(STATUS_GEO_CONFIGURED, &priv->status);\n" "+}\n" "+\n" - " /*********************************************************************=\n" - "*********\n" + " /******************************************************************************\n" " *\n" " * uCode download functions\n" - "@@ -6130,15 +6168,6 @@ static void iwl3945_alive_start(struct iwl3945_p=\n" - "riv *priv)\n" + "@@ -6130,15 +6168,6 @@ static void iwl3945_alive_start(struct iwl3945_priv *priv)\n" " \t/* Clear out the uCode error bit if it is set */\n" " \tclear_bit(STATUS_FW_ERROR, &priv->status);\n" - "=20\n" - "-\trc =3D iwl3945_init_channel_map(priv);\n" + " \n" + "-\trc = iwl3945_init_channel_map(priv);\n" "-\tif (rc) {\n" "-\t\tIWL_ERROR(\"initializing regulatory failed: %d\\n\", rc);\n" "-\t\treturn;\n" @@ -1496,39 +1369,36 @@ "-\n" " \tif (iwl3945_is_rfkill(priv))\n" " \t\treturn;\n" - "=20\n" - "@@ -6599,7 +6628,7 @@ static void iwl3945_bg_request_scan(struct work_s=\n" - "truct *data)\n" + " \n" + "@@ -6599,7 +6628,7 @@ static void iwl3945_bg_request_scan(struct work_struct *data)\n" " \t * that based on the direct_mask added to each channel entry */\n" - " \tscan->tx_cmd.len =3D cpu_to_le16(\n" + " \tscan->tx_cmd.len = cpu_to_le16(\n" " \t\tiwl3945_fill_probe_req(priv, (struct ieee80211_mgmt *)scan->data,\n" "-\t\t\tIWL_MAX_SCAN_SIZE - sizeof(scan), 0));\n" "+\t\t\tIWL_MAX_SCAN_SIZE - sizeof(*scan), 0));\n" - " \tscan->tx_cmd.tx_flags =3D TX_CMD_FLG_SEQ_CTL_MSK;\n" - " \tscan->tx_cmd.sta_id =3D priv->hw_setting.bcast_sta_id;\n" - " \tscan->tx_cmd.stop_time.life_time =3D TX_CMD_LIFE_TIME_INFINITE;\n" - "@@ -7120,7 +7149,7 @@ static void iwl3945_config_ap(struct iwl3945_priv=\n" - " *priv)\n" + " \tscan->tx_cmd.tx_flags = TX_CMD_FLG_SEQ_CTL_MSK;\n" + " \tscan->tx_cmd.sta_id = priv->hw_setting.bcast_sta_id;\n" + " \tscan->tx_cmd.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE;\n" + "@@ -7120,7 +7149,7 @@ static void iwl3945_config_ap(struct iwl3945_priv *priv)\n" " {\n" - " \tint rc =3D 0;\n" - "=20\n" + " \tint rc = 0;\n" + " \n" "-\tif (priv->status & STATUS_EXIT_PENDING)\n" "+\tif (test_bit(STATUS_EXIT_PENDING, &priv->status))\n" " \t\treturn;\n" - "=20\n" + " \n" " \t/* The following should be done only at AP bring up */\n" - "@@ -8614,11 +8643,24 @@ static int iwl3945_pci_probe(struct pci_dev *pd=\n" - "ev, const struct pci_device_id *e\n" + "@@ -8614,11 +8643,24 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e\n" " \tIWL_DEBUG_INFO(\"MAC address: %s\\n\", print_mac(mac, priv->mac_addr));\n" " \tSET_IEEE80211_PERM_ADDR(priv->hw, priv->mac_addr);\n" - "=20\n" - "+\terr =3D iwl3945_init_channel_map(priv);\n" + " \n" + "+\terr = iwl3945_init_channel_map(priv);\n" "+\tif (err) {\n" "+\t\tIWL_ERROR(\"initializing regulatory failed: %d\\n\", err);\n" "+\t\tgoto out_remove_sysfs;\n" "+\t}\n" "+\n" - "+\terr =3D iwl3945_init_geos(priv);\n" + "+\terr = iwl3945_init_geos(priv);\n" "+\tif (err) {\n" "+\t\tIWL_ERROR(\"initializing geos failed: %d\\n\", err);\n" "+\t\tgoto out_free_channel_map;\n" @@ -1536,52 +1406,47 @@ "+\tiwl3945_reset_channel_flag(priv);\n" "+\n" " \tiwl3945_rate_control_register(priv->hw);\n" - " \terr =3D ieee80211_register_hw(priv->hw);\n" + " \terr = ieee80211_register_hw(priv->hw);\n" " \tif (err) {\n" " \t\tIWL_ERROR(\"Failed to register network device (error %d)\\n\", err);\n" "-\t\tgoto out_remove_sysfs;\n" "+\t\tgoto out_free_geos;\n" " \t}\n" - "=20\n" - " \tpriv->hw->conf.beacon_int =3D 100;\n" - "@@ -8628,6 +8670,10 @@ static int iwl3945_pci_probe(struct pci_dev *pde=\n" - "v, const struct pci_device_id *e\n" - "=20\n" + " \n" + " \tpriv->hw->conf.beacon_int = 100;\n" + "@@ -8628,6 +8670,10 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e\n" + " \n" " \treturn 0;\n" - "=20\n" + " \n" "+ out_free_geos:\n" "+\tiwl3945_free_geos(priv);\n" "+ out_free_channel_map:\n" "+\tiwl3945_free_channel_map(priv);\n" " out_remove_sysfs:\n" " \tsysfs_remove_group(&pdev->dev.kobj, &iwl3945_attribute_group);\n" - "=20\n" - "@@ -8702,10 +8748,8 @@ static void iwl3945_pci_remove(struct pci_dev *p=\n" - "dev)\n" + " \n" + "@@ -8702,10 +8748,8 @@ static void iwl3945_pci_remove(struct pci_dev *pdev)\n" " \tpci_disable_device(pdev);\n" " \tpci_set_drvdata(pdev, NULL);\n" - "=20\n" + " \n" "-\tkfree(priv->channel_info);\n" "-\n" "-\tkfree(priv->ieee_channels);\n" "-\tkfree(priv->ieee_rates);\n" "+\tiwl3945_free_channel_map(priv);\n" "+\tiwl3945_free_geos(priv);\n" - "=20\n" + " \n" " \tif (priv->ibss_beacon)\n" " \t\tdev_kfree_skb(priv->ibss_beacon);\n" - "diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/=\n" - "wireless/iwlwifi/iwl4965-base.c\n" + "diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c\n" "index c86da5c..bf3a60c 100644\n" "--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c\n" "+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c\n" - "@@ -1639,6 +1639,12 @@ static void get_eeprom_mac(struct iwl4965_priv *=\n" - "priv, u8 *mac)\n" + "@@ -1639,6 +1639,12 @@ static void get_eeprom_mac(struct iwl4965_priv *priv, u8 *mac)\n" " \tmemcpy(mac, priv->eeprom.mac_address, 6);\n" " }\n" - "=20\n" - "+static inline void iwl4965_eeprom_release_semaphore(struct iwl4965_pri=\n" - "v *priv)\n" + " \n" + "+static inline void iwl4965_eeprom_release_semaphore(struct iwl4965_priv *priv)\n" "+{\n" "+\tiwl4965_clear_bit(priv, CSR_HW_IF_CONFIG_REG,\n" "+\t\tCSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM);\n" @@ -1590,22 +1455,20 @@ " /**\n" " * iwl4965_eeprom_init - read EEPROM contents\n" " *\n" - "@@ -2927,8 +2933,10 @@ static int iwl4965_tx_skb(struct iwl4965_priv *p=\n" - "riv,\n" + "@@ -2927,8 +2933,10 @@ static int iwl4965_tx_skb(struct iwl4965_priv *priv,\n" " #endif\n" - "=20\n" + " \n" " \t/* drop all data frame if we are not associated */\n" "-\tif (!iwl4965_is_associated(priv) && !priv->assoc_id &&\n" - "-\t ((fc & IEEE80211_FCTL_FTYPE) =3D=3D IEEE80211_FTYPE_DATA)) {\n" - "+\tif (((fc & IEEE80211_FCTL_FTYPE) =3D=3D IEEE80211_FTYPE_DATA) &&\n" + "-\t ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA)) {\n" + "+\tif (((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA) &&\n" "+\t (!iwl4965_is_associated(priv) ||\n" "+\t !priv->assoc_id ||\n" "+\t !priv->assoc_station_added)) {\n" " \t\tIWL_DEBUG_DROP(\"Dropping - !iwl4965_is_associated\\n\");\n" " \t\tgoto drop_unlock;\n" " \t}\n" - "@@ -5131,8 +5139,9 @@ static void iwl4965_irq_tasklet(struct iwl4965_pr=\n" - "iv *priv)\n" + "@@ -5131,8 +5139,9 @@ static void iwl4965_irq_tasklet(struct iwl4965_priv *priv)\n" " #ifdef CONFIG_IWL4965_DEBUG\n" " \tif (iwl4965_debug_level & (IWL_DL_ISR)) {\n" " \t\t/* NIC fires this, but we don't use it, redundant with WAKEUP */\n" @@ -1614,59 +1477,51 @@ "+\t\tif (inta & CSR_INT_BIT_SCD)\n" "+\t\t\tIWL_DEBUG_ISR(\"Scheduler finished to transmit \"\n" "+\t\t\t\t \"the frame/frames.\\n\");\n" - "=20\n" + " \n" " \t\t/* Alive notification via Rx interrupt will do the real work */\n" " \t\tif (inta & CSR_INT_BIT_ALIVE)\n" - "@@ -5140,7 +5149,7 @@ static void iwl4965_irq_tasklet(struct iwl4965_pr=\n" - "iv *priv)\n" + "@@ -5140,7 +5149,7 @@ static void iwl4965_irq_tasklet(struct iwl4965_priv *priv)\n" " \t}\n" " #endif\n" " \t/* Safely ignore these bits for debug checks below */\n" - "-\tinta &=3D ~(CSR_INT_BIT_MAC_CLK_ACTV | CSR_INT_BIT_ALIVE);\n" - "+\tinta &=3D ~(CSR_INT_BIT_SCD | CSR_INT_BIT_ALIVE);\n" - "=20\n" + "-\tinta &= ~(CSR_INT_BIT_MAC_CLK_ACTV | CSR_INT_BIT_ALIVE);\n" + "+\tinta &= ~(CSR_INT_BIT_SCD | CSR_INT_BIT_ALIVE);\n" + " \n" " \t/* HW RF KILL switch toggled */\n" " \tif (inta & CSR_INT_BIT_RF_KILL) {\n" - "@@ -5269,8 +5278,11 @@ static irqreturn_t iwl4965_isr(int irq, void *da=\n" - "ta)\n" + "@@ -5269,8 +5278,11 @@ static irqreturn_t iwl4965_isr(int irq, void *data)\n" " \tIWL_DEBUG_ISR(\"ISR inta 0x%08x, enabled 0x%08x, fh 0x%08x\\n\",\n" " \t\t inta, inta_mask, inta_fh);\n" - "=20\n" - "+\tinta &=3D ~CSR_INT_BIT_SCD;\n" + " \n" + "+\tinta &= ~CSR_INT_BIT_SCD;\n" "+\n" - " \t/* iwl4965_irq_tasklet() will service interrupts and re-enable them *=\n" - "/\n" + " \t/* iwl4965_irq_tasklet() will service interrupts and re-enable them */\n" "-\ttasklet_schedule(&priv->irq_tasklet);\n" "+\tif (likely(inta || inta_fh))\n" "+\t\ttasklet_schedule(&priv->irq_tasklet);\n" - "=20\n" + " \n" " unplugged:\n" " \tspin_unlock(&priv->lock);\n" - "@@ -5576,6 +5588,15 @@ static int iwl4965_init_channel_map(struct iwl49=\n" - "65_priv *priv)\n" + "@@ -5576,6 +5588,15 @@ static int iwl4965_init_channel_map(struct iwl4965_priv *priv)\n" " \treturn 0;\n" " }\n" - "=20\n" + " \n" "+/*\n" - "+ * iwl4965_free_channel_map - undo allocations in iwl4965_init_channel=\n" - "_map\n" + "+ * iwl4965_free_channel_map - undo allocations in iwl4965_init_channel_map\n" "+ */\n" "+static void iwl4965_free_channel_map(struct iwl4965_priv *priv)\n" "+{\n" "+\tkfree(priv->channel_info);\n" - "+\tpriv->channel_count =3D 0;\n" + "+\tpriv->channel_count = 0;\n" "+}\n" "+\n" - " /* For active scan, listen ACTIVE_DWELL_TIME (msec) on each channel af=\n" - "ter\n" - " * sending probe req. This should be set long enough to hear probe re=\n" - "sponses\n" + " /* For active scan, listen ACTIVE_DWELL_TIME (msec) on each channel after\n" + " * sending probe req. This should be set long enough to hear probe responses\n" " * from more than one AP. */\n" - "@@ -5909,6 +5930,17 @@ static int iwl4965_init_geos(struct iwl4965_priv=\n" - " *priv)\n" + "@@ -5909,6 +5930,17 @@ static int iwl4965_init_geos(struct iwl4965_priv *priv)\n" " \treturn 0;\n" " }\n" - "=20\n" + " \n" "+/*\n" "+ * iwl4965_free_geos - undo allocations in iwl4965_init_geos\n" "+ */\n" @@ -1678,16 +1533,14 @@ "+\tclear_bit(STATUS_GEO_CONFIGURED, &priv->status);\n" "+}\n" "+\n" - " /*********************************************************************=\n" - "*********\n" + " /******************************************************************************\n" " *\n" " * uCode download functions\n" - "@@ -6560,15 +6592,6 @@ static void iwl4965_alive_start(struct iwl4965_p=\n" - "riv *priv)\n" + "@@ -6560,15 +6592,6 @@ static void iwl4965_alive_start(struct iwl4965_priv *priv)\n" " \t/* Clear out the uCode error bit if it is set */\n" " \tclear_bit(STATUS_FW_ERROR, &priv->status);\n" - "=20\n" - "-\trc =3D iwl4965_init_channel_map(priv);\n" + " \n" + "-\trc = iwl4965_init_channel_map(priv);\n" "-\tif (rc) {\n" "-\t\tIWL_ERROR(\"initializing regulatory failed: %d\\n\", rc);\n" "-\t\treturn;\n" @@ -1698,49 +1551,45 @@ "-\n" " \tif (iwl4965_is_rfkill(priv))\n" " \t\treturn;\n" - "=20\n" - "@@ -7023,7 +7046,7 @@ static void iwl4965_bg_request_scan(struct work_s=\n" - "truct *data)\n" + " \n" + "@@ -7023,7 +7046,7 @@ static void iwl4965_bg_request_scan(struct work_struct *data)\n" " \t * that based on the direct_mask added to each channel entry */\n" - " \tscan->tx_cmd.len =3D cpu_to_le16(\n" + " \tscan->tx_cmd.len = cpu_to_le16(\n" " \t\tiwl4965_fill_probe_req(priv, (struct ieee80211_mgmt *)scan->data,\n" "-\t\t\tIWL_MAX_SCAN_SIZE - sizeof(scan), 0));\n" "+\t\t\tIWL_MAX_SCAN_SIZE - sizeof(*scan), 0));\n" - " \tscan->tx_cmd.tx_flags =3D TX_CMD_FLG_SEQ_CTL_MSK;\n" - " \tscan->tx_cmd.sta_id =3D priv->hw_setting.bcast_sta_id;\n" - " \tscan->tx_cmd.stop_time.life_time =3D TX_CMD_LIFE_TIME_INFINITE;\n" - "@@ -7448,7 +7471,7 @@ static int iwl4965_mac_add_interface(struct ieee8=\n" - "0211_hw *hw,\n" - "=20\n" + " \tscan->tx_cmd.tx_flags = TX_CMD_FLG_SEQ_CTL_MSK;\n" + " \tscan->tx_cmd.sta_id = priv->hw_setting.bcast_sta_id;\n" + " \tscan->tx_cmd.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE;\n" + "@@ -7448,7 +7471,7 @@ static int iwl4965_mac_add_interface(struct ieee80211_hw *hw,\n" + " \n" " \tif (priv->vif) {\n" - " \t\tIWL_DEBUG_MAC80211(\"leave - vif !=3D NULL\\n\");\n" + " \t\tIWL_DEBUG_MAC80211(\"leave - vif != NULL\\n\");\n" "-\t\treturn 0;\n" "+\t\treturn -EOPNOTSUPP;\n" " \t}\n" - "=20\n" + " \n" " \tspin_lock_irqsave(&priv->lock, flags);\n" - "@@ -7580,7 +7603,7 @@ static void iwl4965_config_ap(struct iwl4965_priv=\n" - " *priv)\n" + "@@ -7580,7 +7603,7 @@ static void iwl4965_config_ap(struct iwl4965_priv *priv)\n" " {\n" - " \tint rc =3D 0;\n" - "=20\n" + " \tint rc = 0;\n" + " \n" "-\tif (priv->status & STATUS_EXIT_PENDING)\n" "+\tif (test_bit(STATUS_EXIT_PENDING, &priv->status))\n" " \t\treturn;\n" - "=20\n" + " \n" " \t/* The following should be done only at AP bring up */\n" - "@@ -9198,11 +9221,24 @@ static int iwl4965_pci_probe(struct pci_dev *pd=\n" - "ev, const struct pci_device_id *e\n" + "@@ -9198,11 +9221,24 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e\n" " \tIWL_DEBUG_INFO(\"MAC address: %s\\n\", print_mac(mac, priv->mac_addr));\n" " \tSET_IEEE80211_PERM_ADDR(priv->hw, priv->mac_addr);\n" - "=20\n" - "+\terr =3D iwl4965_init_channel_map(priv);\n" + " \n" + "+\terr = iwl4965_init_channel_map(priv);\n" "+\tif (err) {\n" "+\t\tIWL_ERROR(\"initializing regulatory failed: %d\\n\", err);\n" "+\t\tgoto out_remove_sysfs;\n" "+\t}\n" "+\n" - "+\terr =3D iwl4965_init_geos(priv);\n" + "+\terr = iwl4965_init_geos(priv);\n" "+\tif (err) {\n" "+\t\tIWL_ERROR(\"initializing geos failed: %d\\n\", err);\n" "+\t\tgoto out_free_channel_map;\n" @@ -1748,62 +1597,56 @@ "+\tiwl4965_reset_channel_flag(priv);\n" "+\n" " \tiwl4965_rate_control_register(priv->hw);\n" - " \terr =3D ieee80211_register_hw(priv->hw);\n" + " \terr = ieee80211_register_hw(priv->hw);\n" " \tif (err) {\n" " \t\tIWL_ERROR(\"Failed to register network device (error %d)\\n\", err);\n" "-\t\tgoto out_remove_sysfs;\n" "+\t\tgoto out_free_geos;\n" " \t}\n" - "=20\n" - " \tpriv->hw->conf.beacon_int =3D 100;\n" - "@@ -9212,6 +9248,10 @@ static int iwl4965_pci_probe(struct pci_dev *pde=\n" - "v, const struct pci_device_id *e\n" - "=20\n" + " \n" + " \tpriv->hw->conf.beacon_int = 100;\n" + "@@ -9212,6 +9248,10 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e\n" + " \n" " \treturn 0;\n" - "=20\n" + " \n" "+ out_free_geos:\n" "+\tiwl4965_free_geos(priv);\n" "+ out_free_channel_map:\n" "+\tiwl4965_free_channel_map(priv);\n" " out_remove_sysfs:\n" " \tsysfs_remove_group(&pdev->dev.kobj, &iwl4965_attribute_group);\n" - "=20\n" - "@@ -9286,10 +9326,8 @@ static void iwl4965_pci_remove(struct pci_dev *p=\n" - "dev)\n" + " \n" + "@@ -9286,10 +9326,8 @@ static void iwl4965_pci_remove(struct pci_dev *pdev)\n" " \tpci_disable_device(pdev);\n" " \tpci_set_drvdata(pdev, NULL);\n" - "=20\n" + " \n" "-\tkfree(priv->channel_info);\n" "-\n" "-\tkfree(priv->ieee_channels);\n" "-\tkfree(priv->ieee_rates);\n" "+\tiwl4965_free_channel_map(priv);\n" "+\tiwl4965_free_geos(priv);\n" - "=20\n" + " \n" " \tif (priv->ibss_beacon)\n" " \t\tdev_kfree_skb(priv->ibss_beacon);\n" - "diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wirele=\n" - "ss/libertas/assoc.c\n" + "diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wireless/libertas/assoc.c\n" "index c622e9b..87e145f 100644\n" "--- a/drivers/net/wireless/libertas/assoc.c\n" "+++ b/drivers/net/wireless/libertas/assoc.c\n" "@@ -12,8 +12,10 @@\n" " #include \"cmd.h\"\n" - "=20\n" - "=20\n" - "-static const u8 bssid_any[ETH_ALEN] =3D { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF=\n" - ", 0xFF };\n" - "-static const u8 bssid_off[ETH_ALEN] =3D { 0x00, 0x00, 0x00, 0x00, 0x00=\n" - ", 0x00 };\n" - "+static const u8 bssid_any[ETH_ALEN] __attribute__ ((aligned (2))) =3D\n" + " \n" + " \n" + "-static const u8 bssid_any[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };\n" + "-static const u8 bssid_off[ETH_ALEN] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };\n" + "+static const u8 bssid_any[ETH_ALEN] __attribute__ ((aligned (2))) =\n" "+\t{ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };\n" - "+static const u8 bssid_off[ETH_ALEN] __attribute__ ((aligned (2))) =3D\n" + "+static const u8 bssid_off[ETH_ALEN] __attribute__ ((aligned (2))) =\n" "+\t{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };\n" - "=20\n" - "=20\n" + " \n" + " \n" " static int assoc_helper_essid(struct lbs_private *priv,\n" - "diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless=\n" - "/libertas/dev.h\n" + "diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless/libertas/dev.h\n" "index 58d7ef6..5a69f2b 100644\n" "--- a/drivers/net/wireless/libertas/dev.h\n" "+++ b/drivers/net/wireless/libertas/dev.h\n" @@ -1813,71 +1656,65 @@ " \tu8 mode;\n" "-\tu8 bssid[ETH_ALEN];\n" "+\tu8 bssid[ETH_ALEN] __attribute__ ((aligned (2)));\n" - "=20\n" + " \n" " \t/** WEP keys */\n" " \tstruct enc_key wep_keys[4];\n" - "diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wirele=\n" - "ss/libertas/if_cs.c\n" + "diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c\n" "index 4b5ab9a..5a9cadb 100644\n" "--- a/drivers/net/wireless/libertas/if_cs.c\n" "+++ b/drivers/net/wireless/libertas/if_cs.c\n" - "@@ -249,14 +249,14 @@ static irqreturn_t if_cs_interrupt(int irq, void =\n" - "*data)\n" + "@@ -249,14 +249,14 @@ static irqreturn_t if_cs_interrupt(int irq, void *data)\n" " \tlbs_deb_enter(LBS_DEB_CS);\n" - "=20\n" - " \tint_cause =3D if_cs_read16(card, IF_CS_C_INT_CAUSE);\n" - "-\tif(int_cause =3D=3D 0x0) {\n" - "+\tif (int_cause =3D=3D 0x0) {\n" + " \n" + " \tint_cause = if_cs_read16(card, IF_CS_C_INT_CAUSE);\n" + "-\tif(int_cause == 0x0) {\n" + "+\tif (int_cause == 0x0) {\n" " \t\t/* Not for us */\n" " \t\treturn IRQ_NONE;\n" - "=20\n" - " \t} else if (int_cause =3D=3D 0xffff) {\n" + " \n" + " \t} else if (int_cause == 0xffff) {\n" " \t\t/* Read in junk, the card has probably been removed */\n" - " \t\tcard->priv->surpriseremoved =3D 1;\n" + " \t\tcard->priv->surpriseremoved = 1;\n" "-\n" "+\t\treturn IRQ_HANDLED;\n" " \t} else {\n" " \t\tif (int_cause & IF_CS_H_IC_TX_OVER)\n" " \t\t\tlbs_host_to_card_done(card->priv);\n" - "@@ -717,8 +717,8 @@ static void if_cs_release(struct pcmcia_device *p_d=\n" - "ev)\n" - "=20\n" + "@@ -717,8 +717,8 @@ static void if_cs_release(struct pcmcia_device *p_dev)\n" + " \n" " \tlbs_deb_enter(LBS_DEB_CS);\n" - "=20\n" + " \n" "-\tpcmcia_disable_device(p_dev);\n" " \tfree_irq(p_dev->irq.AssignedIRQ, card);\n" "+\tpcmcia_disable_device(p_dev);\n" " \tif (card->iobase)\n" " \t\tioport_unmap(card->iobase);\n" - "=20\n" - "diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wirele=\n" - "ss/rt2x00/rt61pci.c\n" + " \n" + "diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c\n" "index ab52f22..b31f0c2 100644\n" "--- a/drivers/net/wireless/rt2x00/rt61pci.c\n" "+++ b/drivers/net/wireless/rt2x00/rt61pci.c\n" - "@@ -1736,7 +1736,8 @@ static void rt61pci_txdone(struct rt2x00_dev *rt2=\n" - "x00dev)\n" + "@@ -1736,7 +1736,8 @@ static void rt61pci_txdone(struct rt2x00_dev *rt2x00dev)\n" " \t\t\tWARNING(rt2x00dev,\n" " \t\t\t\t\"TX status report missed for entry %p\\n\",\n" " \t\t\t\tentry_done);\n" "-\t\t\trt2x00lib_txdone(entry_done, TX_FAIL_OTHER, 0);\n" "+\t\t\trt2x00pci_txdone(rt2x00dev, entry_done, TX_FAIL_OTHER,\n" "+\t\t\t\t\t 0);\n" - " \t\t\tentry_done =3D rt2x00_get_data_entry_done(ring);\n" + " \t\t\tentry_done = rt2x00_get_data_entry_done(ring);\n" " \t\t}\n" - "=20\n" - "diff --git a/drivers/net/wireless/rtl8180_dev.c b/drivers/net/wireless/=\n" - "rtl8180_dev.c\n" + " \n" + "diff --git a/drivers/net/wireless/rtl8180_dev.c b/drivers/net/wireless/rtl8180_dev.c\n" "index 07f37b0..27ebd68 100644\n" "--- a/drivers/net/wireless/rtl8180_dev.c\n" "+++ b/drivers/net/wireless/rtl8180_dev.c\n" "@@ -36,6 +36,7 @@ MODULE_LICENSE(\"GPL\");\n" - " static struct pci_device_id rtl8180_table[] __devinitdata =3D {\n" + " static struct pci_device_id rtl8180_table[] __devinitdata = {\n" " \t/* rtl8185 */\n" " \t{ PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8185) },\n" "+\t{ PCI_DEVICE(PCI_VENDOR_ID_BELKIN, 0x700f) },\n" " \t{ PCI_DEVICE(PCI_VENDOR_ID_BELKIN, 0x701f) },\n" - "=20\n" + " \n" " \t/* rtl8180 */\n" "diff --git a/include/linux/input.h b/include/linux/input.h\n" "index 2075d6d..056a17a 100644\n" @@ -1886,7 +1723,7 @@ "@@ -371,6 +371,8 @@ struct input_absinfo {\n" " #define KEY_BRIGHTNESS_ZERO\t244\t/* brightness off, use ambient */\n" " #define KEY_DISPLAY_OFF\t\t245\t/* display device to off state */\n" - "=20\n" + " \n" "+#define KEY_WIMAX\t\t246\n" "+\n" " #define BTN_MISC\t\t0x100\n" @@ -1909,16 +1746,15 @@ "+\tRFKILL_TYPE_WIMAX,\n" " \tRFKILL_TYPE_MAX,\n" " };\n" - "=20\n" + " \n" "diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c\n" "index 89e1e30..d44c872 100644\n" "--- a/net/mac80211/rx.c\n" "+++ b/net/mac80211/rx.c\n" - "@@ -340,9 +340,42 @@ static u32 ieee80211_rx_load_stats(struct ieee8021=\n" - "1_local *local,\n" + "@@ -340,9 +340,42 @@ static u32 ieee80211_rx_load_stats(struct ieee80211_local *local,\n" " \treturn load;\n" " }\n" - "=20\n" + " \n" "+static ieee80211_txrx_result\n" "+ieee80211_rx_h_verify_ip_alignment(struct ieee80211_txrx_data *rx)\n" "+{\n" @@ -1943,35 +1779,33 @@ "+\t * header and the payload is not supported, the driver is required\n" "+\t * to move the 802.11 header further back in that case.\n" "+\t */\n" - "+\thdrlen =3D ieee80211_get_hdrlen(rx->fc);\n" + "+\thdrlen = ieee80211_get_hdrlen(rx->fc);\n" "+\tif (rx->flags & IEEE80211_TXRXD_RX_AMSDU)\n" - "+\t\thdrlen +=3D ETH_HLEN;\n" + "+\t\thdrlen += ETH_HLEN;\n" "+\tWARN_ON_ONCE(((unsigned long)(rx->skb->data + hdrlen)) & 3);\n" "+\n" "+\treturn TXRX_CONTINUE;\n" "+}\n" "+\n" - " ieee80211_rx_handler ieee80211_rx_pre_handlers[] =3D\n" + " ieee80211_rx_handler ieee80211_rx_pre_handlers[] =\n" " {\n" " \tieee80211_rx_h_parse_qos,\n" "+\tieee80211_rx_h_verify_ip_alignment,\n" " \tNULL\n" " };\n" - "=20\n" - "@@ -1679,7 +1712,6 @@ static void __ieee80211_rx_handle_packet(struct i=\n" - "eee80211_hw *hw,\n" - " \tstruct ieee80211_sub_if_data *prev =3D NULL;\n" + " \n" + "@@ -1679,7 +1712,6 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,\n" + " \tstruct ieee80211_sub_if_data *prev = NULL;\n" " \tstruct sk_buff *skb_new;\n" " \tu8 *bssid;\n" "-\tint hdrlen;\n" - "=20\n" - " \thdr =3D (struct ieee80211_hdr *) skb->data;\n" + " \n" + " \thdr = (struct ieee80211_hdr *) skb->data;\n" " \tmemset(&rx, 0, sizeof(rx));\n" - "@@ -1691,18 +1723,6 @@ static void __ieee80211_rx_handle_packet(struct =\n" - "ieee80211_hw *hw,\n" - " \trx.fc =3D le16_to_cpu(hdr->frame_control);\n" - " \ttype =3D rx.fc & IEEE80211_FCTL_FTYPE;\n" - "=20\n" + "@@ -1691,18 +1723,6 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,\n" + " \trx.fc = le16_to_cpu(hdr->frame_control);\n" + " \ttype = rx.fc & IEEE80211_FCTL_FTYPE;\n" + " \n" "-\t/*\n" "-\t * Drivers are required to align the payload data to a four-byte\n" "-\t * boundary, so the last two bits of the address where it starts\n" @@ -1981,39 +1815,34 @@ "-\t * the driver is required to move the 802.11 header further back\n" "-\t * in that case.\n" "-\t */\n" - "-\thdrlen =3D ieee80211_get_hdrlen(rx.fc);\n" + "-\thdrlen = ieee80211_get_hdrlen(rx.fc);\n" "-\tWARN_ON_ONCE(((unsigned long)(skb->data + hdrlen)) & 3);\n" "-\n" - " \tif (type =3D=3D IEEE80211_FTYPE_DATA || type =3D=3D IEEE80211_FTYPE_M=\n" - "GMT)\n" + " \tif (type == IEEE80211_FTYPE_DATA || type == IEEE80211_FTYPE_MGMT)\n" " \t\tlocal->dot11ReceivedFragmentCount++;\n" - "=20\n" - "@@ -1952,7 +1972,7 @@ static u8 ieee80211_rx_reorder_ampdu(struct ieee8=\n" - "0211_local *local,\n" + " \n" + "@@ -1952,7 +1972,7 @@ static u8 ieee80211_rx_reorder_ampdu(struct ieee80211_local *local,\n" " \t\tgoto end_reorder;\n" - "=20\n" + " \n" " \t/* null data frames are excluded */\n" "-\tif (unlikely(fc & IEEE80211_STYPE_QOS_NULLFUNC))\n" "+\tif (unlikely(fc & IEEE80211_STYPE_NULLFUNC))\n" " \t\tgoto end_reorder;\n" - "=20\n" + " \n" " \t/* new un-ordered ampdu frame - process it */\n" "diff --git a/net/rfkill/rfkill-input.c b/net/rfkill/rfkill-input.c\n" "index d1e9d68..e4b051d 100644\n" "--- a/net/rfkill/rfkill-input.c\n" "+++ b/net/rfkill/rfkill-input.c\n" - "@@ -84,6 +84,7 @@ static void rfkill_schedule_toggle(struct rfkill_task=\n" - " *task)\n" + "@@ -84,6 +84,7 @@ static void rfkill_schedule_toggle(struct rfkill_task *task)\n" " static DEFINE_RFKILL_TASK(rfkill_wlan, RFKILL_TYPE_WLAN);\n" " static DEFINE_RFKILL_TASK(rfkill_bt, RFKILL_TYPE_BLUETOOTH);\n" " static DEFINE_RFKILL_TASK(rfkill_uwb, RFKILL_TYPE_UWB);\n" "+static DEFINE_RFKILL_TASK(rfkill_wimax, RFKILL_TYPE_WIMAX);\n" - "=20\n" - " static void rfkill_event(struct input_handle *handle, unsigned int typ=\n" - "e,\n" + " \n" + " static void rfkill_event(struct input_handle *handle, unsigned int type,\n" " \t\t\tunsigned int code, int down)\n" - "@@ -99,6 +100,9 @@ static void rfkill_event(struct input_handle *handle=\n" - ", unsigned int type,\n" + "@@ -99,6 +100,9 @@ static void rfkill_event(struct input_handle *handle, unsigned int type,\n" " \t\tcase KEY_UWB:\n" " \t\t\trfkill_schedule_toggle(&rfkill_uwb);\n" " \t\t\tbreak;\n" @@ -2023,41 +1852,34 @@ " \t\tdefault:\n" " \t\t\tbreak;\n" " \t\t}\n" - "@@ -159,6 +163,11 @@ static const struct input_device_id rfkill_ids[] =3D=\n" - " {\n" - " \t\t.evbit =3D { BIT_MASK(EV_KEY) },\n" - " \t\t.keybit =3D { [BIT_WORD(KEY_UWB)] =3D BIT_MASK(KEY_UWB) },\n" + "@@ -159,6 +163,11 @@ static const struct input_device_id rfkill_ids[] = {\n" + " \t\t.evbit = { BIT_MASK(EV_KEY) },\n" + " \t\t.keybit = { [BIT_WORD(KEY_UWB)] = BIT_MASK(KEY_UWB) },\n" " \t},\n" "+\t{\n" - "+\t\t.flags =3D INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_KEYBI=\n" - "T,\n" - "+\t\t.evbit =3D { BIT_MASK(EV_KEY) },\n" - "+\t\t.keybit =3D { [BIT_WORD(KEY_WIMAX)] =3D BIT_MASK(KEY_WIMAX) },\n" + "+\t\t.flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_KEYBIT,\n" + "+\t\t.evbit = { BIT_MASK(EV_KEY) },\n" + "+\t\t.keybit = { [BIT_WORD(KEY_WIMAX)] = BIT_MASK(KEY_WIMAX) },\n" "+\t},\n" " \t{ }\n" " };\n" - "=20\n" + " \n" "diff --git a/net/rfkill/rfkill.c b/net/rfkill/rfkill.c\n" "index d06d338..6562f86 100644\n" "--- a/net/rfkill/rfkill.c\n" "+++ b/net/rfkill/rfkill.c\n" "@@ -126,6 +126,9 @@ static ssize_t rfkill_type_show(struct device *dev,\n" " \tcase RFKILL_TYPE_UWB:\n" - " \t\ttype =3D \"ultrawideband\";\n" + " \t\ttype = \"ultrawideband\";\n" " \t\tbreak;\n" "+\tcase RFKILL_TYPE_WIMAX:\n" - "+\t\ttype =3D \"wimax\";\n" + "+\t\ttype = \"wimax\";\n" "+\t\tbreak;\n" " \tdefault:\n" " \t\tBUG();\n" " \t}\n" - "--=20\n" + "-- \n" "John W. Linville\n" - "linville@tuxdriver.com\n" - "-\n" - "To unsubscribe from this list: send the line \"unsubscribe linux-wireles=\n" - "s\" in\n" - "the body of a message to majordomo@vger.kernel.org\n" - More majordomo info at http://vger.kernel.org/majordomo-info.html + linville@tuxdriver.com -ed4c83eece96eb4f9e5eb49a6b16eeca49651111077fbd3ebdebc8f8af23df4e +46920f78135d4f8b04dcfed5f4c3c2909ce4d73ea7927aa525bab9525b7ae0fc
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.