aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/support/debug.c (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2011-02-04mac80211: do not restart ps timer during scan or offchannelRajkumar Manoharan1-1/+4
While leaving oper channel, STA informs sleep state to AP to stop sending data. Till sending ack for the nullfunc, AP continues to send the data to STA which restarts ps_timer that is causing unnecessary nullfunc exchange on timer expiry when the STA was already moved to offchannel. So don't restart ps_timer on data reception during scan. This issue was identified by the following warning. WARNING: at net/mac80211/tx.c:661 invoke_tx_handlers+0xf07/0x1330 [mac80211] wlan0: Dropped data frame as no usable bitrate found while scanning and associated. Target station: 00:03:7f:0b:a6:1b on 5 GHz band Call Trace: [<ffffffffa0413ba7>] invoke_tx_handlers+0xf07/0x1330 [mac80211] [<ffffffffa0414056>] ieee80211_tx+0x86/0x2c0 [mac80211] [<ffffffffa0414345>] ieee80211_xmit+0xb5/0x1d0 [mac80211] [<ffffffffa04037e0>] ieee80211_dynamic_ps_enable_work+0x0/0xb0 [mac80211] [<ffffffffa04158cf>] ieee80211_tx_skb+0x4f/0x60 [mac80211] [<ffffffffa04026e6>] ieee80211_send_nullfunc+0x46/0x60 [mac80211] [<ffffffffa0403885>] ieee80211_dynamic_ps_enable_work+0xa5/0xb0 [mac80211] Reviewed-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-04zd1211rw: add useful debug outputJussi Kivilinna1-1/+8
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-04zd1211rw: enable NL80211_IFTYPE_APJussi Kivilinna1-2/+5
It should be safe to enable AP-mode now. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-04zd1211rw: reset rx urbs after idle period of 30 secondsJussi Kivilinna2-3/+83
RX appears to freeze while idle. Resetting rx-urbs appears to be enough to fix this. Do reset 30 seconds after last rx. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-04zd1211rw: reset device when CR_BCN_FIFO_SEMAPHORE freezes in beacon setupJussi Kivilinna1-1/+12
When driver fails to acquire device semaphore lock, device usually freezes soon afterwards. So failing to acquire lock indicates us that not everything is going right in device/fw. So reset device when this happens. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-04zd1211rw: add TX watchdog and device resettingJussi Kivilinna5-4/+181
When doing transfers at high speed for long time, tx queue can freeze. So add tx watchdog. TX-watchdog checks for locked tx-urbs and reset hardware when such is detected. Merely unlinking urb was not enough, device have to be reseted. Hw settings are restored so that any open link will stay on after reset. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-04zd1211rw: collect driver settings and add function to restore theimJussi Kivilinna2-0/+72
We need HW hard reset later in patchset to reset device after TX-stall. Collect all settings that we have set to driver for later reset and add restore function. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-04zd1211rw: lower hw command timeoutsJussi Kivilinna1-4/+4
Device command timeouts are set up very high (1 sec) and this causes AP beacon to lock up for long for example. Checking timeouts on device it's easy to see that 1 sec timeout is not needed, when device fails to response longer timeout doesn't help: [ 473.074419] zd1211rw 1-1:1.0: print_times() Read times: [ 473.175163] zd1211rw 1-1:1.0: print_time() 0 - 10 msec: 1506 [ 473.176429] zd1211rw 1-1:1.0: print_time() 11 - 50 msec: 0 [ 473.177955] zd1211rw 1-1:1.0: print_time() 51 - 100 msec: 0 [ 473.180703] zd1211rw 1-1:1.0: print_time() 101 - 250 msec: 0 [ 473.182101] zd1211rw 1-1:1.0: print_time() 251 - 500 msec: 0 [ 473.183221] zd1211rw 1-1:1.0: print_time() 500 - 1000 msec: 20 [ 473.184381] zd1211rw 1-1:1.0: print_time() 1000 - ... msec: 18 Also vendor driver doesn't use this long timeout. Therefore change timeout to 50msec. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-04zd1211rw: change interrupt URB buffer to DMA bufferJussi Kivilinna2-13/+25
As might lower beacon update CPU usage. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-04zd1211rw: use stack and preallocated memory for small cmd-buffersJussi Kivilinna3-44/+41
Use stack for allocing small < 64 byte arrays in zd_chip.c and preallocated buffer in zd_usb.c. This might lower CPU usage for beacon setup. v2: - Do not use stack buffers in zd_usb.c as they would be used for urb transfer_buffer. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-04zd1211rw: batch beacon config commands togetherJussi Kivilinna1-15/+25
Beacon config function writes beacon to hw one write per byte. This is very slow (usually taking more than 100ms to finish) and causes high CPU usage when in AP-mode (kworker at ~50% on Intel Atom N270). By batching commands together zd_mac_config_beacon() runtime can be lowered to 1/5th and lower CPU usage to saner levels (<10% on Atom). Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-04zd1211rw: add beacon watchdog and setting HW beacon more failsafeJussi Kivilinna2-31/+170
When doing tx/rx at high packet rate (for example simply using ping -f), device starts to fail to respond to control messages. On non-AP modes this only causes problems for LED updating code but when we are running in AP-mode we are writing new beacon to HW usually every 100ms. Now if control message fails in HW beacon setup, device lock is kept locked and beacon data partially written. This can and usually does cause: 1. HW beacon setup fail now on, as driver cannot acquire device lock. 2. Beacon-done interrupt stop working as device has incomplete beacon. Therefore make zd_mac_config_beacon() always try to release device lock and add beacon watchdog to restart beaconing when stall is detected. Also fix zd_mac_config_beacon() try acquiring device lock for max 500ms, as what old code appeared to be trying to do using loop and msleep(1). Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-04mac80211: fix race between next beacon dtim and ieee80211_get_buffered_bcChristian Lamparter2-1/+4
On review of 'zd1211rw: implement beacon fetching and handling ieee80211_get_buffered_bc()', Christian Lamparter noted that [1]: Since zd_beacon_done also uploads the next beacon so long in advance, there could be an equally long race between the outdated state of the next beacon's DTIM broadcast traffic indicator (802.11-2007 7.3.2.6) which -in your case- was uploaded almost a beacon interval ago and the xmit of ieee80211_get_buffered_bc *now*. The dtim bc/mc bit might be not set, when a mc/bc arrived after the beacon was uploaded, but before the "beacon done event" from the hardware. So, dozing stations don't expect the broadcast traffic and of course, they might miss it completely. It's probably better to fix this in mac80211 (see the attached hack). [1] http://marc.info/?l=linux-wireless&m=129435041117256&w=2 CC: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-04zd1211rw: implement beacon fetching and handling ieee80211_get_buffered_bc()Jussi Kivilinna1-4/+35
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-04zd1211rw: let zd_set_beacon_interval() set dtim_period and add AP-beacon flagJussi Kivilinna3-14/+40
Add support for AP-mode beacon. Also disable beacon when interface is set down as otherwise hw will keep flooding NEXT_BCN interrupts. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-04zd1211rw: fix ack_pending in filter_ack causing tx-packet ordering problem on monitorJussi Kivilinna1-0/+7
For reasons not very clear yet to me, filter_ack leaves matching tx-packet pending with 'ack_pending'. This causes tx-packet to be passed back to upper layer after next packet has been transfered and tx-packets might end up coming come out of monitor interface in wrong order vs. rx. Because of this when enable AP-mode, hostapd monitor interface would get packets in wrong order causing problems in WPA association. So don't use mac->ack_pending when in AP-mode. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-04zd1211rw: support setting BSSID for AP modeJussi Kivilinna4-11/+55
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-04zd1211rw: move set_rts_cts_work to bss_info_changedJussi Kivilinna2-25/+5
As bss_info_changed may sleep, we can as well set RTS_CTS register right away. Keep mac->short_preamble for later use (hw reset). Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-04zd1211rw: move set_multicast_hash and set_rx_filter from workers to configure_filterJussi Kivilinna2-33/+7
Workers not needed anymore since configure_filter may sleep. Keep mac->multicast_hash for later use (hw reset). Signed-off-by: Jussi Kivilinna <jussi.kivilina@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-04zd1211rw: fix beacon interval setupJussi Kivilinna1-6/+10
Vendor driver uses CR_BNC_INTERVAL at various places, one is HW_EnableBeacon() that combinies beacon interval with BSS-type flag and DTIM value in upper 16bit of u32. The other one is HW_UpdateBcnInterval() that set_aw_pt_bi() appears to be based on. HW_UpdateBcnInterval() takes interval argument as u16 and uses that for calculations, set_aw_pt_bi() uses u32 value that has flags and dtim in upper part. This clearly seems wrong. Also HW_UpdateBcnInterval() updates only lower 16bit part of CR_BNC_INTERVAL. So make set_aw_pt_bi() do calculations on only lower u16 part of s->beacon_interval. Also set 32bit beacon interval register before reading values from device, as HW_EnableBeacon() on vendor driver does. This is required to make beacon work on AP-mode, simply reading and then writing updated values is not enough at least with zd1211b. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-04zd1211rw: add locking for mac->process_intrJussi Kivilinna2-1/+7
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-04zd1211rw: cancel process_intr work on zd_chip_disable_int()Jussi Kivilinna1-0/+3
OOPS if worker is running and disconnect() is called (triggered by unpluging device). Much harder to trigger at this stage but later when we have AP beacon work in process_intr it happens very easy. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-04zd1211rw: use urb anchors for tx and fix tx-queue disablingJussi Kivilinna2-75/+41
When stress testing AP-mode I hit OOPS when unpluging or rmmodding driver. It appears that when tx-queue is disabled, tx-urbs might be left pending. These can cause ehci to call non-existing tx_urb_complete() (after rmmod) or uninitialized/reseted private structure (after disconnect()). Add skb queue for submitted packets and unlink pending urbs on zd_usb_disable_tx(). Part of the problem seems to be usb->free_urb_list that isn't always working as it should, causing machine freeze when trying to free the list in zd_usb_disable_tx(). Caching free urbs isn't what other drivers seem to be doing (usbnet for example) so strip free_usb_list. Patch makes tx-urb handling saner with use of urb anchors. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-04ath9k: Fix possible double free of PAPRD skb'sMohammed Shafi Shajakhan3-4/+7
This patch reverts the following commit ath9k: remove bfs_paprd_timestamp from struct ath_buf_state Under high interference/noisy environment conditions where PAPRD frames fails heavily introduces a possibility of double freeing skb's and causes kernel panic after some time.This patch reverts back to the original approach of using paprd_timestamp before freeing the PAPRD frame skb's [ 194.193705] Pid: 0, comm: swapper Tainted: G D WC 2.6.35-22-generic #33-Ubuntu [ 194.193712] Call Trace: [ 194.193722] [<c05c6468>] ? printk+0x2d/0x35 [ 194.193732] [<c05c63c3>] panic+0x5a/0xd2 [ 194.193741] [<c05ca3ed>] oops_end+0xcd/0xd0 [ 194.193750] [<c0105f74>] die+0x54/0x80 [ 194.193758] [<c05c9a16>] do_trap+0x96/0xc0 [ 194.193837] [<c0103fb0>] ? do_invalid_op+0x0/0xa0 [ 194.193846] [<c010403b>] do_invalid_op+0x8b/0xa0 [ 194.193856] [<c020bd4c>] ? kfree+0xec/0xf0 [ 194.193866] [<c012ce18>] ? default_spin_lock_flags+0x8/0x10 [ 194.193877] [<c01de47a>] ? free_one_page+0x12a/0x2d0 [ 194.193888] [<c01e04dc>] ? __free_pages+0x1c/0x40 [ 194.193897] [<c05c97a7>] error_code+0x73/0x78 [ 194.193906] [<c020bd4c>] ? kfree+0xec/0xf0 [ 194.193915] [<c04ecdd0>] ? skb_release_data+0x70/0xa0 [ 194.193924] [<c04ecdd0>] skb_release_data+0x70/0xa0 [ 194.193933] [<c04ec997>] __kfree_skb+0x17/0x90 [ 194.193941] [<c04eca31>] consume_skb+0x21/0x40 [ 194.193964] [<f85e0b70>] ieee80211_tx_status+0x760/0x860 [mac80211] [ 194.193979] [<f85caddf>] ath_tx_complete_buf+0x1bf/0x2c0 [ath9k] [ 194.193988] [<c05c8b9f>] ? _raw_spin_lock_irqsave+0x2f/0x50 [ 194.193997] [<c04ec40e>] ? skb_queue_tail+0x3e/0x50 [ 194.194010] [<f85cc803>] ath_tx_complete_aggr+0x823/0x940 [ath9k] [ 194.194021] [<c0108a28>] ? sched_clock+0x8/0x10 [ 194.194030] [<c016bf14>] ? sched_clock_local+0xa4/0x180 [ 194.194040] [<c0139f57>] ? enqueue_sleeper+0x1e7/0x2b0 [ 194.194051] [<c013a194>] ? enqueue_entity+0x174/0x200 [ 194.194064] [<f85ce83d>] ath_tx_edma_tasklet+0x2bd/0x3b0 [ath9k] [ 194.194074] [<c05c8b9f>] ? _raw_spin_lock_irqsave+0x2f/0x50 [ 194.194088] [<f85c7b9f>] ath9k_tasklet+0x9f/0x190 [ath9k] [ 194.194097] [<c01505d7>] tasklet_action+0xa7/0xb0 [ 194.194107] [<c015127c>] __do_softirq+0x9c/0x1b0 [ 194.194117] [<c01a7f64>] ? irq_to_desc+0x14/0x20 [ 194.194126] [<c0124fc4>] ? ack_apic_level+0x64/0x1f0 [ 194.194136] [<c01513d5>] do_softirq+0x45/0x50 [ 194.194145] [<c0151545>] irq_exit+0x65/0x70 [ 194.194153] [<c05cf665>] do_IRQ+0x55/0xc0 [ 194.194162] [<c016a6c7>] ? hrtimer_start+0x27/0x30 [ 194.194171] [<c0103630>] common_interrupt+0x30/0x38 [ 194.194181] [<c012c21a>] ? native_safe_halt+0xa/0x10 [ 194.194268] [<c010a2f9>] default_idle+0x49/0xb0 [ 194.194277] [<c0101fcc>] cpu_idle+0x8c/0xd0 [ 194.194286] [<c05b2431>] rest_init+0x71/0x80 [ 194.194295] [<c081981a>] start_kernel+0x36e/0x374 [ 194.194305] [<c08199dd>] ? pass_all_bootoptions+0x0/0xa [ 194.194314] [<c08190d7>] i386_start_kernel+0xd7/0xdf [ 194.194364] panic occurred, switching back to text console Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-04carl9170: fix typo in PS codeChristian Lamparter1-1/+1
This patch fixes a off-by-one bug which bugged the driver's PS-POLL capability. Cc: <stable@kernel.org> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-04net: can: janz-ican3: world-writable sysfs termination fileVasiliy Kulikov1-1/+1
Don't allow everybody to set terminator via sysfs. Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-04net: can: at91_can: world-writable sysfs filesVasiliy Kulikov1-1/+1
Don't allow everybody to write to mb0_id file. Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Acked-by: Kurt Van Dijck <kurt.van.dijck@eia.be> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-04MAINTAINERS: update email ids of the be2net driver maintainers.Ajit Khaparde1-5/+4
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-04bridge: Don't put partly initialized fdb into hashPavel Emelyanov1-2/+2
The fdb_create() puts a new fdb into hash with only addr set. This is not good, since there are callers, that search the hash w/o the lock and access all the other its fields. Applies to current netdev tree. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-04r8169: prevent RxFIFO induced loops in the irq handler.Francois Romieu1-0/+9
While the RxFIFO interruption is masked for most 8168, nothing prevents it to appear in the irq status word. This is no excuse to crash. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Cc: Ivan Vecera <ivecera@redhat.com> Cc: Hayes <hayeswang@realtek.com>
2011-02-04r8169: RxFIFO overflow oddities with 8168 chipsets.Francois Romieu1-9/+21
Some experiment-based action to prevent my 8168 chipsets locking-up hard in the irq handler under load (pktgen ~1Mpps). Apparently a reset is not always mandatory (is it at all ?). - RTL_GIGA_MAC_VER_12 - RTL_GIGA_MAC_VER_25 Missed ~55% packets. Note: - this is an old SiS 965L motherboard - the 8168 chipset emits (lots of) control frames towards the sender - RTL_GIGA_MAC_VER_26 The chipset does not go into a frenzy of mac control pause when it crashes yet but it can still be crashed. It needs more work. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Cc: Ivan Vecera <ivecera@redhat.com> Cc: Hayes <hayeswang@realtek.com>
2011-02-04r8169: use RxFIFO overflow workaround for 8168c chipset.Ivan Vecera1-2/+4
I found that one of the 8168c chipsets (concretely XID 1c4000c0) starts generating RxFIFO overflow errors. The result is an infinite loop in interrupt handler as the RxFIFOOver is handled only for ...MAC_VER_11. With the workaround everything goes fine. Signed-off-by: Ivan Vecera <ivecera@redhat.com> Acked-by: Francois Romieu <romieu@fr.zoreil.com> Cc: Hayes <hayeswang@realtek.com>
2011-02-03be2net: use device model DMA APIIvan Vecera2-59/+64
Use DMA API as PCI equivalents will be deprecated. Signed-off-by: Ivan Vecera <ivecera@redhat.com> Acked-by: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-03include/net/genetlink.h: Allow genlmsg_cancel to accept a NULL argumentJulia Lawall1-1/+2
nlmsg_cancel can accept NULL as its second argument, so for similarity, this patch extends genlmsg_cancel to be able to accept a NULL second argument as well. Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-03net: Provide compat support for SIOCGETMIFCNT_IN6 and SIOCGETSGCNT_IN6.David S. Miller3-0/+95
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-03net: Support compat SIOCGETVIFCNT ioctl in ipv4.David S. Miller1-0/+30
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-03net: Fix bug in compat SIOCGETSGCNT handling.David S. Miller1-1/+1
Commit 709b46e8d90badda1898caea50483c12af178e96 ("net: Add compat ioctl support for the ipv4 multicast ioctl SIOCGETSGCNT") added the correct plumbing to handle SIOCGETSGCNT properly. However, whilst definiting a proper "struct compat_sioc_sg_req" it isn't actually used in ipmr_compat_ioctl(). Correct this oversight. Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-03niu: Fix races between up/down and get_stats.David S. Miller1-16/+45
As reported by Flavio Leitner, there is no synchronization to protect NIU's get_stats method from seeing a NULL pointer in either np->rx_rings or np->tx_rings. In fact, as far as ->ndo_get_stats is concerned, these values are set completely asynchronously. Flavio attempted to fix this using a RW semaphore, which in fact works most of the time. However, dev_get_stats() can be invoked from non-sleepable contexts in some cases, so this fix doesn't work in all cases. So instead, control the visibility of the np->{rx,tx}_ring pointers when the device is being brough up, and use properties of the device down sequence to our advantage. In niu_get_stats(), return immediately if netif_running() is false. The device shutdown sequence first marks the device as not running (by clearing the __LINK_STATE_START bit), then it performans a synchronize_rcu() (in dev_deactive_many()), and then finally it invokes the driver ->ndo_stop() method. This guarentees that all invocations of niu_get_stats() either see netif_running() as false, or they see the channel pointers before ->ndo_stop() clears them out. If netif_running() is true, protect against startup races by loading the np->{rx,tx}_rings pointer into a local variable, and punting if it is NULL. Use ACCESS_ONCE to prevent the compiler from reloading the pointer on us. Also, during open, control the order in which the pointers and the ring counts become visible globally using SMP write memory barriers. We make sure the np->num_{rx,tx}_rings value is stable and visible before np->{rx,tx}_rings is. Such visibility control is not necessary on the niu_free_channels() side because of the RCU sequencing that happens during device down as described above. We are always guarenteed that all niu_get_stats calls are finished, or will see netif_running() false, by the time ->ndo_stop is invoked. Reported-by: Flavio Leitner <fleitner@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-03mac80211: Add testing functionality for TKIPJouni Malinen3-1/+112
TKIP countermeasures depend on devices being able to detect Michael MIC failures on received frames and for stations to report errors to the AP. In order to test that behavior, it is useful to be able to send out TKIP frames with incorrect Michael MIC. This testing behavior has minimal effect on the TX path, so it can be added to mac80211 for convenient use. The interface for using this functionality is a file in mac80211 netdev debugfs (tkip_mic_test). Writing a MAC address to the file makes mac80211 generate a dummy data frame that will be sent out using invalid Michael MIC value. In AP mode, the address needs to be for one of the associated stations or ff:ff:ff:ff:ff:ff to use a broadcast frame. In station mode, the address can be anything, e.g., the current BSSID. It should be noted that this functionality works correctly only when associated and using TKIP. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-03mac80211: Remove obsolete TKIP flexibilityJouni Malinen1-25/+7
The TKIP implementation was originally prepared to be a bit more flexible in the way Michael MIC TX/RX keys are configured. However, we are now taking care of the TX/RX MIC key swapping in user space, so this code will not be needed. Similarly, there were some remaining WPA testing code that won't be used in their current form. Remove the unneeded extra complexity. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Reviewed-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-03drivers:net:ipw2100.c change a typo comamnd to commandJustin P. Mattock1-1/+1
The below patch fixes a typo comamnd to command. Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-03ath9k: reserve a beacon slot on beaconing vif additionRajkumar Manoharan1-3/+1
The beaconing vif addition is based on max beacon slot available. So it is better to reserve a beacon slot on interface addition and let it be configured properly on bss_info change. Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-03mac80211: allow GO to scan like APJohannes Berg1-2/+5
There's no point in disallowing scanning for a GO interface when it's not beaconing yet. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-03mac80211: pass up beacons from external BSS when operating as APArik Nemtsov1-1/+2
Beacons from external BSSes are required for updating overlapping BSS info (i.e. ERP protection). Pass them up unconditionally. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-03mac80211: add HW flag for disabling auto link-PS in AP modeArik Nemtsov4-4/+84
When operating in AP mode the wl1271 hardware filters out null-data packets as well as management packets. This makes it impossible for mac80211 to monitor the PS mode by using the PM bit of incoming frames. Implement a HW flag to indicate that mac80211 should ignore the PM bit. In addition, expose ieee80211_sta_ps_transition() to make low-level drivers capable of controlling PS-mode. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-03mac80211: do not calc frame duration when using HW rate-controlArik Nemtsov1-1/+2
When rate-control is performed in HW, we cannot calculate frame duration as we do not have the skb transmission rate in SW. ieee80211_tx_h_calculate_duration() should only be called when ieee80211_tx_h_rate_ctrl() has been called before to initialize data in skb->cb. This doesn't happen for drivers with HW rate-control. Fixes the following warning when operating in AP-mode in a driver with HW rate-control. WARNING: at net/mac80211/tx.c:57 ieee80211_duration+0x54/0x1d8 [mac80211]() Modules linked in: wl1271_sdio wl1271 firmware_class crc7 mac80211 cfg80211 [<c0046090>] (unwind_backtrace+0x0/0x124) from [<c0064c10>] (warn_slowpath_common+0x4c/0x64) [<c0064c10>] (warn_slowpath_common+0x4c/0x64) from [<c0064c40>] (warn_slowpath_null+0x18/0x1c) [<c0064c40>] (warn_slowpath_null+0x18/0x1c) from [<bf040e34>] (ieee80211_duration+0x54/0x1d8 [mac80211]) [<bf040e34>] (ieee80211_duration+0x54/0x1d8 [mac80211]) from [<bf04200c>] (invoke_tx_handlers+0xfa0/0x1088 [mac80211]) [<bf04200c>] (invoke_tx_handlers+0xfa0/0x1088 [mac80211]) from [<bf042178>] (ieee80211_tx+0x84/0x248 [mac80211]) [<bf042178>] (ieee80211_tx+0x84/0x248 [mac80211]) from [<bf042f44>] (ieee80211_tx_pending+0x12c/0x278 [mac80211]) [<bf042f44>] (ieee80211_tx_pending+0x12c/0x278 [mac80211]) from [<c0069a9c>] (tasklet_action+0x68/0xbc) [<c0069a9c>] (tasklet_action+0x68/0xbc) from [<c006a044>] (__do_softirq+0x84/0x114) [<c006a044>] (__do_softirq+0x84/0x114) from [<c006a1b8>] (do_softirq+0x48/0x54) [<c006a1b8>] (do_softirq+0x48/0x54) from [<c006a4f8>] (local_bh_enable+0x98/0xcc) [<c006a4f8>] (local_bh_enable+0x98/0xcc) from [<bf074e60>] (wl1271_rx+0x2e8/0x3a4 [wl1271]) [<bf074e60>] (wl1271_rx+0x2e8/0x3a4 [wl1271]) from [<bf071ae4>] (wl1271_irq_work+0x230/0x310 [wl1271]) [<bf071ae4>] (wl1271_irq_work+0x230/0x310 [wl1271]) from [<c0076864>] (process_one_work+0x208/0x350) [<c0076864>] (process_one_work+0x208/0x350) from [<c0076e14>] (worker_thread+0x1cc/0x300) [<c0076e14>] (worker_thread+0x1cc/0x300) from [<c007bb88>] (kthread+0x84/0x8c) [<c007bb88>] (kthread+0x84/0x8c) from [<c0041494>] (kernel_thread_exit+0x0/0x8) Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-03mac80211: Recalculate channel-type on iface removal.Ben Greear1-1/+8
When a vif goes away, it could cause the super-chan to be recalculated differently, so do that calculation on iface removal. Signed-off-by: Ben Greear <greearb@candelatech.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-03ath9k: Show channel type and frequency in debugfs.Ben Greear1-2/+21
Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-03ath9k: do not access hw registers in FULL SLEEPRajkumar Manoharan1-0/+2
The opmode recalculation is accessing hw registers. When it is called from remove interface callback and if there are no vifs present then hw is moved to FULL SLEEP by radio disable. So use power save wrappers before accessing hw registers in calculating opmode state. Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-03ath9k_htc: make use common of function to update txpowerRajkumar Manoharan3-17/+10
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>