Wey-Yi Guy [Sat, 31 Jul 2010 15:34:05 +0000 (08:34 -0700)]
iwlwifi: make iwl_hw_detect static to _agn
iwl_hw_detect() only used by _agn, make it static
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Thomas Klute [Sat, 31 Jul 2010 10:01:45 +0000 (12:01 +0200)]
libertas_tf: if_usb.c: Some more formatting fixes
Split some long lines to make checkpatch.pl happy. ;-)
Signed-off-by: Thomas Klute <thomas2.klute@uni-dortmund.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Thomas Klute [Sat, 31 Jul 2010 10:01:44 +0000 (12:01 +0200)]
libertas_tf: if_usb.c: Whitespace cleanup
Signed-off-by: Thomas Klute <thomas2.klute@uni-dortmund.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 30 Jul 2010 14:46:07 +0000 (16:46 +0200)]
mac80211: unify scan and work mutexes
Having both scan and work mutexes is not just
a bit too fine grained, it also creates issues
when there's code that needs both since they
then need to be acquired in the right order,
which can be hard to do.
Therefore, use just a single mutex for both.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Fri, 30 Jul 2010 14:41:08 +0000 (16:41 +0200)]
iwlwifi: make scan workqueue functions static
We do not need export iwl_bg.*scan.*() functions just for initialize
workqueue in other module. Making that functions static helps with
iwl-scan.c code review a bit.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 30 Jul 2010 11:23:12 +0000 (13:23 +0200)]
mac80211: don't check rates on PLCP error frames
Frames that failed PLCP error checks are most likely
microwave transmissions (well, maybe not ...) and
don't have a proper rate detected, so ignore it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Williams [Fri, 30 Jul 2010 06:14:33 +0000 (23:14 -0700)]
libertas: better association request debugging
Bring back the comment about FW v5 status codes from the pre-cfg80211
driver, and let through status codes that aren't remapped by the
firmware.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Williams [Fri, 30 Jul 2010 06:12:53 +0000 (23:12 -0700)]
libertas: better scan response debugging
Make it a bit easier to debug scan results in the future.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Fri, 30 Jul 2010 02:56:22 +0000 (22:56 -0400)]
ath9k: add fastcc to debug print for channel change
This helps us debug channel changes better.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Thu, 29 Jul 2010 15:36:43 +0000 (17:36 +0200)]
mac80211: fix driver offchannel notification when the channel does not change
When running in client mode and associating to an AP, the channel
change is usually performed with the offchannel flag still set.
However after the assoc is complete, the following channel change event
is suppressed because the run time channel is already set to the operating channel.
Fix this by sending channel change notifications to the driver even if
only the offchannel flag changes.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Wed, 26 May 2010 17:33:31 +0000 (13:33 -0400)]
rt2x00: do not shortcut rt2x00lib_config_antenna
This function was exiting early if the existing diversity settings
were unchanged. Unfortunately, in some cases the antenna configuration
is not initialized at all.
https://bugzilla.kernel.org/show_bug.cgi?id=14751
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Cc: Gertjan van Wingerde <gwingerde@gmail.com>
John W. Linville [Mon, 16 Aug 2010 18:40:44 +0000 (14:40 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6
John W. Linville [Fri, 6 Aug 2010 19:31:45 +0000 (15:31 -0400)]
b43: move hwrng registration driver to wireless core initialization
...and unregistration to core shutdown. Previously, the driver
remained registered even when the hardware was shutdown. That
causes the driver to return -ENODEV if the b43 device is IFF_DOWN.
This change causes the driver to disappear in that case, allowing
/dev/hwrng to still function if another hwrng device is available.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Tue, 10 Aug 2010 17:22:24 +0000 (13:22 -0400)]
iwm3200wifi: remove comparison to WIFI_IF_NTFY_MAX in iwm_ntf_wifi_if_wrapper
drivers/net/wireless/iwmc3200wifi/rx.c: In function 'iwm_ntf_wifi_if_wrapper':
drivers/net/wireless/iwmc3200wifi/rx.c:1198: warning: comparison is always true due to limited range of data type
This is, of course, because the value of WIFI_IF_NTFY_MAX is 0xff and
hdr->oid is a u8. This is obviously an attempt to verify the range on
an input value, but since it has no effect it can simply be removed.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
John W. Linville [Tue, 10 Aug 2010 17:08:11 +0000 (13:08 -0400)]
ipw2100: avoid warning from pointer cast in call to IPW_DEBUG_TX
drivers/net/wireless/ipw2x00/ipw2100.c: In function 'ipw2100_tx_send_commands':
drivers/net/wireless/ipw2x00/ipw2100.c:3063: warning: cast to pointer from integer of different size
This changes the cast and the conversion to match other usage of the
same value in calls to IPW_DEBUG_TX.
Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Thu, 5 Aug 2010 18:39:31 +0000 (14:39 -0400)]
iwlwifi: disable aspm by default
Some iwlwifi devices inexplicably disconnect themselves from the PCI-E
bus causing the predictable failures. This seems to disappear if ASPM
is disabled.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Thu, 5 Aug 2010 18:26:24 +0000 (14:26 -0400)]
wireless: upcase alpha2 values in queue_regulatory_request
This provides a little more flexibility for human users, and it allows
us to use isalpha rather than the custom is_alpha_upper.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Fri, 30 Jul 2010 01:52:59 +0000 (21:52 -0400)]
rtl8187: consolidate MSR writes in rtl8187_bss_info_changed
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Fri, 30 Jul 2010 01:50:29 +0000 (21:50 -0400)]
rtl8180: use RTL818X_MSR_ADHOC for IBSS connection
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Thu, 29 Jul 2010 20:14:14 +0000 (16:14 -0400)]
rtl8180: use NAPI for bottom-half processing
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Thu, 29 Jul 2010 20:14:13 +0000 (16:14 -0400)]
mac80211: support use of NAPI for bottom-half processing
This patch implement basic infrastructure to support use of NAPI by
mac80211-based hardware drivers.
Because mac80211 devices can support multiple netdevs, a dummy netdev
is used for interfacing with the NAPI code in the core of the network
stack. That structure is hidden from the hardware drivers, but the
actual napi_struct is exposed in the ieee80211_hw structure so that the
poll routines in drivers can retrieve that structure. Hardware drivers
can also specify their own weight value for NAPI polling.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Thu, 29 Jul 2010 17:58:48 +0000 (13:58 -0400)]
zd1211rw: update fw version info in wiphy struct
This makes the information available through ethtool...
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Thu, 29 Jul 2010 17:50:39 +0000 (13:50 -0400)]
rt2x00: update fw version info in wiphy struct
This makes the information available through ethtool...
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
John W. Linville [Thu, 29 Jul 2010 17:44:44 +0000 (13:44 -0400)]
p54: update fw version info in wiphy struct
This makes the information available through ethtool...
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Thu, 29 Jul 2010 17:30:15 +0000 (13:30 -0400)]
b43legacy: update hw/fw version info in wiphy struct
This makes the information available through ethtool...
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Thu, 29 Jul 2010 17:27:28 +0000 (13:27 -0400)]
b43: update hw/fw version info in wiphy struct
This makes the information available through ethtool...
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Maxim Levitsky [Fri, 13 Aug 2010 15:27:28 +0000 (11:27 -0400)]
ath5k: disable ASPM L0s for all cards
Atheros PCIe wireless cards handled by ath5k do require L0s disabled.
For distributions shipping with CONFIG_PCIEASPM (this will be enabled
by default in the future in 2.6.36) this will also mean both L1 and L0s
will be disabled when a pre 1.1 PCIe device is detected. We do know L1
works correctly even for all ath5k pre 1.1 PCIe devices though but cannot
currently undue the effect of a blacklist, for details you can read
pcie_aspm_sanity_check() and see how it adjusts the device link
capability.
It may be possible in the future to implement some PCI API to allow
drivers to override blacklists for pre 1.1 PCIe but for now it is
best to accept that both L0s and L1 will be disabled completely for
distributions shipping with CONFIG_PCIEASPM rather than having this
issue present. Motivation for adding this new API will be to help
with power consumption for some of these devices.
Example of issues you'd see:
- On the Acer Aspire One (AOA150, Atheros Communications Inc. AR5001
Wireless Network Adapter [168c:001c] (rev 01)) doesn't work well
with ASPM enabled, the card will eventually stall on heavy traffic
with often 'unsupported jumbo' warnings appearing. Disabling
ASPM L0s in ath5k fixes these problems.
- On the same card you would see a storm of RXORN interrupts
even though medium is idle.
Credit for root causing and fixing the bug goes to Jussi Kivilinna.
Cc: David Quan <David.Quan@atheros.com>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Tim Gardner <tim.gardner@canonical.com>
Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Cc: stable@kernel.org
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Fri, 13 Aug 2010 13:06:40 +0000 (18:36 +0530)]
ath9k_htc: load proper firmware for device ID 7015
This patch handles the firmware loading properly
for device ID 7015.
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Yuri Kululin [Fri, 13 Aug 2010 09:46:12 +0000 (13:46 +0400)]
wl1251: fix trigger scan timeout usage
Use appropriate command (CMD_TRIGGER_SCAN_TO) instead of scan command
(CMD_SCAN) to configure trigger scan timeout.
This was broken in commit
3a98c30f3e8bb1f32b5bcb74a39647b3670de275.
This fix address the bug reported here:
https://bugzilla.kernel.org/show_bug.cgi?id=16554
Cc: stable@kernel.org
Signed-off-by: Yuri Ershov <ext-yuri.ershov@nokia.com>
Signed-off-by: Yuri Kululin <ext-yuri.kululin@nokia.com>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vivek Natarajan [Thu, 12 Aug 2010 08:53:28 +0000 (14:23 +0530)]
ath9k_htc: Fix disconnect issue in HT40 mode.
Some APs advertise that they may be HT40 capable in the capabilites
but the current operating channel configuration may be only HT20.
This causes disconnection as ath9k_htc sets WLAN_RC_40_FLAG despite
the AP operating in HT20 mode.
Hence set this flag only if the current channel configuration
is HT40 enabled.
Cc: stable@kernel.org
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Wed, 11 Aug 2010 14:57:43 +0000 (20:27 +0530)]
ath9k_htc: fix panic on packet injection using airbase-ng tool.
This should fix the oops which occurs during the packet injection
on monitor interface.
EIP is at ath9k_htc_tx_start+0x69/0x220 [ath9k_htc]
[<
f84dc8ea>] ? invoke_tx_handlers+0xa5a/0xee0 [mac80211]
[<
f82c84f4>] ? ath9k_htc_tx+0x44/0xe0 [ath9k_htc]
[<
f84db7b8>] ? __ieee80211_tx+0xf8/0x190 [mac80211]
[<
f84dce0d>] ? ieee80211_tx+0x9d/0x1a0 [mac80211]
[<
f84dcfac>] ? ieee80211_xmit+0x9c/0x1c0 [mac80211]
[<
f84dd1b5>] ? ieee80211_monitor_start_xmit+0x85/0xb0 [mac80211]
[<
c04c30cd>] ? dev_hard_start_xmit+0x1ad/0x210
[<
c04b97c2>] ? __alloc_skb+0x52/0x130
[<
c04d7cd5>] ? sch_direct_xmit+0x105/0x170
[<
c04c5e9f>] ? dev_queue_xmit+0x37f/0x4b0
[<
c0567e1e>] ? packet_snd+0x21e/0x250
[<
c05684a2>] ? packet_sendmsg+0x32/0x40
[<
c04b4c63>] ? sock_aio_write+0x113/0x130
[<
c0207934>] ? do_sync_write+0xc4/0x100
[<
c0167740>] ? autoremove_wake_function+0x0/0x50
[<
c02f4414>] ? security_file_permission+0x14/0x20
[<
c0207ad4>] ? rw_verify_area+0x64/0xe0
[<
c01e6458>] ? handle_mm_fault+0x338/0x390
[<
c0207cd5>] ? vfs_write+0x185/0x1a0
[<
c058db20>] ? do_page_fault+0x160/0x3a0
[<
c0208512>] ? sys_write+0x42/0x70
[<
c01033ec>] ? syscall_call+0x7/0xb
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Wed, 11 Aug 2010 20:11:00 +0000 (16:11 -0400)]
ipw2100: register pm_qos request before registering pci driver
It is necessary to call pm_qos_add_request prior to calling
pm_qos_update_request. It was revealed that ipw2100 has been
doing this wrong since "pm_qos: Get rid of the allocation in
pm_qos_add_request()" (commit
82f682514a5df89ffb3890627eebf0897b7a84ec)
added a WARN that results in the following backtrace:
WARNING: at kernel/pm_qos_params.c:264 pm_qos_update_request+0x5e/0x70()
pm_qos_update_request() called for unknown object
Call Trace:
[<
c1024088>] ? warn_slowpath_common+0x78/0xb0
[<
c1041c9e>] ? pm_qos_update_request+0x5e/0x70
[<
c1041c9e>] ? pm_qos_update_request+0x5e/0x70
[<
c1024153>] ? warn_slowpath_fmt+0x33/0x40
[<
c1041c9e>] ? pm_qos_update_request+0x5e/0x70
[<
f89fe15f>] ? ipw2100_up+0x3f/0xf10 [ipw2100]
[<
c11961c9>] ? vsnprintf+0xc9/0x530
[<
f89ff36c>] ? ipw2100_net_init+0x2c/0x1c0 [ipw2100]
[<
c12f542d>] ? register_netdevice+0x7d/0x3c0
[<
f89f9b00>] ? ipw2100_irq_tasklet+0x910/0x9a0 [ipw2100]
[<
c12f579f>] ? register_netdev+0x2f/0x40
[<
f89fd471>] ? ipw2100_pci_init_one+0xd21/0x1060 [ipw2100]
[<
c11a5ebb>] ? local_pci_probe+0xb/0x10
[<
c11a6d49>] ? pci_device_probe+0x69/0x90
[<
c1224704>] ? driver_probe_device+0x74/0x180
[<
c10dd15a>] ? sysfs_create_dir+0x6a/0xb0
[<
c1224889>] ? __driver_attach+0x79/0x80
[<
c1224810>] ? __driver_attach+0x0/0x80
[<
c1223fa2>] ? bus_for_each_dev+0x52/0x80
[<
c1224586>] ? driver_attach+0x16/0x20
[<
c1224810>] ? __driver_attach+0x0/0x80
[<
c122395f>] ? bus_add_driver+0x17f/0x250
[<
c11a5ec0>] ? pci_device_shutdown+0x0/0x20
[<
c11a6c80>] ? pci_device_remove+0x0/0x40
[<
c1224b13>] ? driver_register+0x63/0x120
[<
c11a6f96>] ? __pci_register_driver+0x36/0xa0
[<
f84f9048>] ? ipw2100_init+0x48/0x67 [ipw2100]
[<
c1001122>] ? do_one_initcall+0x32/0x170
[<
c1087078>] ? __vunmap+0xb8/0xf0
[<
f84f9000>] ? ipw2100_init+0x0/0x67 [ipw2100]
[<
c10510c1>] ? sys_init_module+0x161/0x1000
[<
c108f847>] ? sys_close+0x67/0xe0
[<
c13647c1>] ? syscall_call+0x7/0xb
This patch moves pm_qos_add_request prior to pci_register_driver in
ipw2100 in order to avoid this problem.
Reported-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Tue, 10 Aug 2010 18:55:10 +0000 (14:55 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/holtmann/bluetooth-2.6
Mat Martineau [Thu, 5 Aug 2010 22:54:27 +0000 (15:54 -0700)]
Bluetooth: Use 3-DH5 payload size for default ERTM max PDU size
The previous value of 672 for L2CAP_DEFAULT_MAX_PDU_SIZE is based on
the default L2CAP MTU. That default MTU is calculated from the size
of two DH5 packets, minus ACL and L2CAP b-frame header overhead.
ERTM is used with newer basebands that typically support larger 3-DH5
packets, and i-frames and s-frames have more header overhead. With
clean RF conditions, basebands will typically attempt to use 1021-byte
3-DH5 packets for maximum throughput. Adjusting for 2 bytes of ACL
headers plus 10 bytes of worst-case L2CAP headers yields 1009 bytes
of payload.
This PDU size imposes less overhead for header bytes and gives the
baseband the option to choose 3-DH5 packets, but is small enough for
ERTM traffic to interleave well with other L2CAP or SCO data.
672-byte payloads do not allow the most efficient over-the-air
packet choice, and cannot achieve maximum throughput over BR/EDR.
Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Mat Martineau [Thu, 5 Aug 2010 22:54:23 +0000 (15:54 -0700)]
Bluetooth: Fix incorrect setting of remote_tx_win for L2CAP ERTM
remote_tx_win is intended to be set on receipt of an L2CAP
configuration request. The value is used to determine the size of the
transmit window on the remote side of an ERTM connection, so L2CAP
can stop sending frames when that remote window is full.
An incorrect remote_tx_win value will cause the stack to not fully
utilize the tx window (performance impact), or to overfill the remote
tx window (causing dropped frames or a disconnect).
This patch removes an extra setting of remote_tx_win when a
configuration response is received. The transmit window has a
different meaning in a response - it is an informational value
less than or equal to the local tx_win.
Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Mat Martineau [Thu, 5 Aug 2010 22:54:20 +0000 (15:54 -0700)]
Bluetooth: Change default L2CAP ERTM retransmit timeout
The L2CAP specification requires that the ERTM retransmit timeout be at
least 2 seconds for BR/EDR connections.
Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Mat Martineau [Thu, 5 Aug 2010 22:54:22 +0000 (15:54 -0700)]
Bluetooth: Fix endianness issue with L2CAP MPS configuration
Incoming configuration values must be converted to native CPU order
before use. This fixes a bug where a little-endian MPS value is
compared to a native CPU value. On big-endian processors, this
can cause ERTM and streaming mode segmentation to produce PDUs
that are larger than the remote stack is expecting, or that would
produce fragmented skbs that the current FCS code cannot handle.
Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Johannes Berg [Mon, 9 Aug 2010 17:57:02 +0000 (10:57 -0700)]
iwlagn: fix rts cts protection
Currently the driver will try to protect all frames,
which leads to a lot of odd things like sending an
RTS with a zeroed RA before multicast frames, which
is clearly bogus.
In order to fix all of this, we need to take a step
back and see what we need to achieve:
* we need RTS/CTS protection if requested by
the AP for the BSS, mac80211 tells us this
* in that case, CTS-to-self should only be
enabled when mac80211 tells us
* additionally, as a hardware workaround, on
some devices we have to protect aggregated
frames with RTS
To achieve the first two items, set up the RXON
accordingly and set the protection required flag
in the transmit command when mac80211 requests
protection for the frame.
To achieve the last item, set the rate-control
RTS-requested flag for all stations that we have
aggregation sessions with, and set the protection
required flag when sending aggregated frames (on
those devices where this is required).
Since otherwise bugs can occur, do not allow the
user to override the RTS-for-aggregation setting
from sysfs any more.
Finally, also clean up the way all these flags get
set in the driver and move everything into the
device-specific functions.
Cc: stable@kernel.org [2.6.35]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Mon, 9 Aug 2010 13:52:03 +0000 (15:52 +0200)]
cfg80211: fix locking in action frame TX
Accesses to "wdev->current_bss" must be
locked with the wdev lock, which action
frame transmission is missing.
Cc: stable@kernel.org [2.6.33+]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Mon, 9 Aug 2010 19:14:21 +0000 (15:14 -0400)]
libertas: fix build break by including linux/sched.h
CC [M] drivers/net/wireless/libertas/cfg.o
/home/greearb/git/wireless-testing/drivers/net/wireless/libertas/cfg.c: In function ‘lbs_scan_worker’:
/home/greearb/git/wireless-testing/drivers/net/wireless/libertas/cfg.c:722: error: ‘TASK_NORMAL’ undeclared (first use in this function)
/home/greearb/git/wireless-testing/drivers/net/wireless/libertas/cfg.c:722: error: (Each undeclared identifier is reported only once
/home/greearb/git/wireless-testing/drivers/net/wireless/libertas/cfg.c:722: error: for each function it appears in.)
/home/greearb/git/wireless-testing/drivers/net/wireless/libertas/cfg.c: In function ‘lbs_cfg_connect’:
/home/greearb/git/wireless-testing/drivers/net/wireless/libertas/cfg.c:1267: error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
/home/greearb/git/wireless-testing/drivers/net/wireless/libertas/cfg.c:1267: error: implicit declaration of function ‘signal_pending’
/home/greearb/git/wireless-testing/drivers/net/wireless/libertas/cfg.c:1267: error: implicit declaration of function ‘schedule_timeout’
Reported-by: Ben Greear <greearb@candelatech.com>
Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Mon, 9 Aug 2010 16:04:56 +0000 (12:04 -0400)]
Revert "p54pci: Add PCI ID for SMC2802W"
This reverts commit
5f7aebd845a9d2ed42f36b7333579ec3534b4713.
Apparently, that PCI ID data was incorrectly taken from the subsystem
information. The actual ID matches another already known ID.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jeff Kirsher [Sun, 8 Aug 2010 15:54:31 +0000 (15:54 +0000)]
igbvf.txt: Add igbvf Documentation
Adds documentation for the igbvf (igb virtual function driver).
v2:
- Removed trailing white space
- Removed Ethtool version info
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jeff Kirsher [Sun, 8 Aug 2010 15:54:11 +0000 (15:54 +0000)]
igb.txt: Add igb documentation
Add documentation for the igb networking driver.
v2:
- Removed trailing white space
- Removed Ethtool version info
- Removed LRO kernel version info
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jeff Kirsher [Sun, 8 Aug 2010 16:02:31 +0000 (16:02 +0000)]
e100/e1000*/igb*/ixgb*: Add missing read memory barrier
Based on patches from Sonny Rao and Milton Miller...
Combined the patches to fix up clean_tx_irq and clean_rx_irq.
The PowerPC architecture does not require loads to independent bytes
to be ordered without adding an explicit barrier.
In ixgbe_clean_rx_irq we load the status bit then load the packet data.
With packet split disabled if these loads go out of order we get a
stale packet, but we will notice the bad sequence numbers and drop it.
The problem occurs with packet split enabled where the TCP/IP header
and data are in different descriptors. If the reads go out of order
we may have data that doesn't match the TCP/IP header. Since we use
hardware checksumming this bad data is never verified and it makes it
all the way to the application.
This bug was found during stress testing and adding this barrier has
been shown to fix it. The bug can manifest as a data integrity issue
(bad payload data) or as a BUG in skb_pull().
This was a nasty bug to hunt down, if people agree with the fix I think
it's a candidate for stable.
Previously Submitted to e1000-devel only for ixgbe
http://marc.info/?l=e1000-devel&m=
126593062701537&w=3
We've now seen this problem hit with other device drivers (e1000e mostly)
So I'm resubmitting with fixes for other Intel Device Drivers with
similar issues.
CC: Milton Miller <miltonm@bga.com>
CC: Anton Blanchard <anton@samba.org>
CC: Sonny Rao <sonnyrao@us.ibm.com>
CC: stable <stable@kernel.org>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
John Fastabend [Sun, 8 Aug 2010 15:46:15 +0000 (15:46 +0000)]
ixgbe: fix build error with FCOE_CONFIG without DCB_CONFIG
Building ixgbe without DCB_CONFIG and FCOE_CONFIG will cause
a build error. This resolves the build error by wrapping
the fcoe.up in CONFIG_IXGBE_DCB ifdefs.
Also frames were being priority VLAN tagged even without DCB
enabled. This fixes this so that 8021Q priority tags are
only added with DCB actually enabled.
Reported-by: divya <dipraksh@linux.vnet.ibm.com>
Reported-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Amit Kumar Salecha [Sun, 8 Aug 2010 06:05:23 +0000 (23:05 -0700)]
netxen: protect tx timeout recovery by rtnl lock
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dan Carpenter [Thu, 5 Aug 2010 22:21:26 +0000 (22:21 +0000)]
isdn: gigaset: use after free
I moved the kfree(cb) below the dereferences.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dan Carpenter [Thu, 5 Aug 2010 22:23:23 +0000 (22:23 +0000)]
isdn: gigaset: add missing unlock
We should unlock here. This is the only place where we return from the
function with the lock held. The caller isn't expecting it.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David Woodhouse [Sun, 8 Aug 2010 06:02:59 +0000 (23:02 -0700)]
solos-pci: Fix race condition in tasklet RX handling
We were seeing faults in the solos-pci receive tasklet when packets
arrived for a VCC which was currently being closed:
[18842.727906] EIP: [<
e082f490>] br2684_push+0x19/0x234 [br2684] SS:ESP 0068:
dfb89d14
[18845.090712] [<
c13ecff3>] ? do_page_fault+0x0/0x2e1
[18845.120042] [<
e082f490>] ? br2684_push+0x19/0x234 [br2684]
[18845.153530] [<
e084fa13>] solos_bh+0x28b/0x7c8 [solos_pci]
[18845.186488] [<
e084f711>] ? solos_irq+0x2d/0x51 [solos_pci]
[18845.219960] [<
c100387b>] ? handle_irq+0x3b/0x48
[18845.247732] [<
c10265cb>] ? irq_exit+0x34/0x57
[18845.274437] [<
c1025720>] tasklet_action+0x42/0x69
[18845.303247] [<
c102643f>] __do_softirq+0x8e/0x129
[18845.331540] [<
c10264ff>] do_softirq+0x25/0x2a
[18845.358274] [<
c102664c>] _local_bh_enable_ip+0x5e/0x6a
[18845.389677] [<
c102666d>] local_bh_enable+0xb/0xe
[18845.417944] [<
e08490a8>] ppp_unregister_channel+0x32/0xbb [ppp_generic]
[18845.458193] [<
e08731ad>] pppox_unbind_sock+0x18/0x1f [pppox]
This patch uses an RCU-inspired approach to fix it. In the RX tasklet's
find_vcc() function we first refuse to use a VCC which already has the
ATM_VF_READY bit cleared. And in the VCC close function, we synchronise
with the tasklet to ensure that it can't still be using the VCC before
we continue and allow the VCC to be destroyed.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Tested-by: Nathan Williams <nathan@traverse.com.au>
Cc: stable@kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Jarek Poplawski [Fri, 6 Aug 2010 00:22:35 +0000 (00:22 +0000)]
pkt_sched: Fix sch_sfq vs tcf_bind_filter oops
Since there was added ->tcf_chain() method without ->bind_tcf() to
sch_sfq class options, there is oops when a filter is added with
the classid parameter.
Fixes commit
7d2681a6ff4f9ab5e48d02550b4c6338f1638998
netdev thread: null pointer at cls_api.c
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Reported-by: Franchoze Eric <franchoze@yandex.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
Changli Gao [Sun, 8 Aug 2010 03:35:43 +0000 (20:35 -0700)]
net: disable preemption before call smp_processor_id()
Although netif_rx() isn't expected to be called in process context with
preemption enabled, it'd better handle this case. And this is why get_cpu()
is used in the non-RPS #ifdef branch. If tree RCU is selected,
rcu_read_lock() won't disable preemption, so preempt_disable() should be
called explictly.
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dmitry Popov [Sun, 8 Aug 2010 03:24:28 +0000 (20:24 -0700)]
tcp: no md5sig option size check bug
tcp_parse_md5sig_option doesn't check md5sig option (TCPOPT_MD5SIG)
length, but tcp_v[46]_inbound_md5_hash assume that it's at least 16
bytes long.
Signed-off-by: Dmitry Popov <dp@highloadlab.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 6 Aug 2010 20:30:43 +0000 (13:30 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6
Johannes Berg [Fri, 6 Aug 2010 14:17:53 +0000 (16:17 +0200)]
iwlwifi: fix locking assertions
spin_is_locked() can return zero on some (UP?)
configurations because locks don't exist, and
that causes an endless amount of warnings. Use
lockdep_assert_held() instead, which has two
advantages:
1) it verifies the current task is holding
the lock or mutex
2) it compiles away completely when lockdep
is not enabled
Cc: stable@kernel.org [2.6.34+, maybe only parts of patch]
Reported-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 6 Aug 2010 14:00:48 +0000 (16:00 +0200)]
iwlwifi: fix TX tracer
The TX tracing code copies with the wrong length,
which will typically copy too little data. Fix
this by using the correct length variable.
Cc: stable@kernel.org [2.6.32+]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Carpenter [Wed, 4 Aug 2010 23:38:06 +0000 (23:38 +0000)]
isdn: fix information leak
The main motivation of this patch changing strcpy() to strlcpy().
We strcpy() to copy a 48 byte buffers into a 49 byte buffers. So at
best the last byte has leaked information, or maybe there is an
overflow? Anyway, this patch closes the information leaks by zeroing
the memory and the calls to strlcpy() prevent overflows.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jarek Poplawski [Thu, 5 Aug 2010 01:19:11 +0000 (01:19 +0000)]
net: Fix napi_gro_frags vs netpoll path
The netpoll_rx_on() check in __napi_gro_receive() skips part of the
"common" GRO_NORMAL path, especially "pull:" in dev_gro_receive(),
where at least eth header should be copied for entirely paged skbs.
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Christian Samsel [Wed, 4 Aug 2010 22:14:36 +0000 (22:14 +0000)]
usbnet: remove noisy and hardly useful printk
With turned on hspa modem (Dell 5530 internal card) and activated usb auto
suspend, my system gets up 100 "usbnet_resume has delayed data" per
minute. I didnt noticed any pathological behaviour, so just drop
this message. if any objections, please at least change it to _DEBUG.
Signed-off-by: Christian Samsel <christian.samsel@rwth-aachen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
John W. Linville [Thu, 5 Aug 2010 17:46:27 +0000 (13:46 -0400)]
rtl8180: avoid potential NULL deref in rtl8180_beacon_work
ieee80211_beacon_get can return NULL...
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Cc: stable@kernel.org
Sujith [Fri, 30 Jul 2010 06:31:17 +0000 (12:01 +0530)]
ath9k: Remove myself from the MAINTAINERS list
So long.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Williams [Wed, 4 Aug 2010 05:43:47 +0000 (00:43 -0500)]
libertas: scan before assocation if no BSSID was given
Fix this leftover TODO from the cfg80211 conversion by doing a scan
if cfg80211 didn't pass in the BSSID for us. Since the scan code
uses so much of the cfg80211_scan_request structure to build up the
firmware command, we just fake one when the scan request is triggered
internally. But we need to make sure that internal 'fake' cfg82011
scan request does not get back to cfg82011 via cfg80211_scan_done().
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Williams [Fri, 30 Jul 2010 06:16:01 +0000 (23:16 -0700)]
libertas: fix association with some APs by using extended rates
Some APs get pissy if you don't send the firmware the extended rates
in the association request's rates TLV. Found this on a Linksys
WRT54G v2; it denies association with status code 18 unless you
add the extended rates too. The old driver did this, but it got
lost in the cfg80211 conversion.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Williams [Fri, 30 Jul 2010 06:11:30 +0000 (23:11 -0700)]
libertas: get the right # of scanned BSSes
Let's actually check the right field in the command response; and
if there aren't any reported BSSes, exit early with success.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Thu, 5 Aug 2010 19:54:28 +0000 (15:54 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/holtmann/bluetooth-next-2.6
Rusty Russell [Wed, 4 Aug 2010 17:32:05 +0000 (17:32 +0000)]
virtio_net: implements ethtool_ops.get_drvinfo
I often use "ethtool -i" command to check what driver controls the
ehternet device. But because current virtio_net driver doesn't
support "ethtool -i", it becomes the following:
# ethtool -i eth3
Cannot get driver information: Operation not supported
This patch simply adds the "ethtool -i" support. The following is the
result when using the virtio_net driver with my patch applied to.
# ethtool -i eth3
driver: virtio_net
version: N/A
firmware-version: N/A
bus-info: virtio0
Personally, "-i" is one of the most frequently-used option, and most
network drivers support "ethtool -i", so I think virtio_net also
should do.
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (use ARRAY_SIZE)
Signed-off-by: David S. Miller <davem@davemloft.net>
stephen hemminger [Wed, 4 Aug 2010 07:34:36 +0000 (07:34 +0000)]
ppp: make channel_ops const
The PPP channel ops structure should be const.
Cleanup the declarations to use standard C99 format.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David Howells [Wed, 4 Aug 2010 02:34:17 +0000 (02:34 +0000)]
RxRPC: Fix a potential deadlock between the call resend_timer and state_lock
RxRPC can potentially deadlock as rxrpc_resend_time_expired() wants to get
call->state_lock so that it can alter the state of an RxRPC call. However, its
caller (call_timer_fn()) has an apparent lock on the timer struct.
The problem is that rxrpc_resend_time_expired() isn't permitted to lock
call->state_lock as this could cause a deadlock against rxrpc_send_abort() as
that takes state_lock and then attempts to delete the resend timer by calling
del_timer_sync().
The deadlock can occur because del_timer_sync() will sit there forever waiting
for rxrpc_resend_time_expired() to return, but the latter may then wait for
call->state_lock, which rxrpc_send_abort() holds around del_timer_sync()...
This leads to a warning appearing in the kernel log that looks something like
the attached.
It should be sufficient to simply dispense with the locks. It doesn't matter
if we set the resend timer expired event bit and queue the event processor
whilst we're changing state to one where the resend timer is irrelevant as the
event can just be ignored by the processor thereafter.
=======================================================
[ INFO: possible circular locking dependency detected ]
2.6.35-rc3-cachefs+ #115
-------------------------------------------------------
swapper/0 is trying to acquire lock:
(&call->state_lock){++--..}, at: [<
ffffffffa00200d4>] rxrpc_resend_time_expired+0x56/0x96 [af_rxrpc]
but task is already holding lock:
(&call->resend_timer){+.-...}, at: [<
ffffffff8103b675>] run_timer_softirq+0x182/0x2a5
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #1 (&call->resend_timer){+.-...}:
[<
ffffffff810560bc>] __lock_acquire+0x889/0x8fa
[<
ffffffff81056184>] lock_acquire+0x57/0x6d
[<
ffffffff8103bb9c>] del_timer_sync+0x3c/0x86
[<
ffffffffa002bb7a>] rxrpc_send_abort+0x50/0x97 [af_rxrpc]
[<
ffffffffa002bdd9>] rxrpc_kernel_abort_call+0xa1/0xdd [af_rxrpc]
[<
ffffffffa0061588>] afs_deliver_to_call+0x129/0x368 [kafs]
[<
ffffffffa006181b>] afs_process_async_call+0x54/0xff [kafs]
[<
ffffffff8104261d>] worker_thread+0x1ef/0x2e2
[<
ffffffff81045f47>] kthread+0x7a/0x82
[<
ffffffff81002cd4>] kernel_thread_helper+0x4/0x10
-> #0 (&call->state_lock){++--..}:
[<
ffffffff81055237>] validate_chain+0x727/0xd23
[<
ffffffff810560bc>] __lock_acquire+0x889/0x8fa
[<
ffffffff81056184>] lock_acquire+0x57/0x6d
[<
ffffffff813e6b69>] _raw_read_lock_bh+0x34/0x43
[<
ffffffffa00200d4>] rxrpc_resend_time_expired+0x56/0x96 [af_rxrpc]
[<
ffffffff8103b6e6>] run_timer_softirq+0x1f3/0x2a5
[<
ffffffff81036828>] __do_softirq+0xa2/0x13e
[<
ffffffff81002dcc>] call_softirq+0x1c/0x28
[<
ffffffff810049f0>] do_softirq+0x38/0x80
[<
ffffffff810361a2>] irq_exit+0x45/0x47
[<
ffffffff81018fb3>] smp_apic_timer_interrupt+0x88/0x96
[<
ffffffff81002893>] apic_timer_interrupt+0x13/0x20
[<
ffffffff810011ac>] cpu_idle+0x4d/0x83
[<
ffffffff813e06f3>] start_secondary+0x1bd/0x1c1
other info that might help us debug this:
1 lock held by swapper/0:
#0: (&call->resend_timer){+.-...}, at: [<
ffffffff8103b675>] run_timer_softirq+0x182/0x2a5
stack backtrace:
Pid: 0, comm: swapper Not tainted 2.6.35-rc3-cachefs+ #115
Call Trace:
<IRQ> [<
ffffffff81054414>] print_circular_bug+0xae/0xbd
[<
ffffffff81055237>] validate_chain+0x727/0xd23
[<
ffffffff810560bc>] __lock_acquire+0x889/0x8fa
[<
ffffffff810539a7>] ? mark_lock+0x42f/0x51f
[<
ffffffff81056184>] lock_acquire+0x57/0x6d
[<
ffffffffa00200d4>] ? rxrpc_resend_time_expired+0x56/0x96 [af_rxrpc]
[<
ffffffff813e6b69>] _raw_read_lock_bh+0x34/0x43
[<
ffffffffa00200d4>] ? rxrpc_resend_time_expired+0x56/0x96 [af_rxrpc]
[<
ffffffffa00200d4>] rxrpc_resend_time_expired+0x56/0x96 [af_rxrpc]
[<
ffffffff8103b6e6>] run_timer_softirq+0x1f3/0x2a5
[<
ffffffff8103b675>] ? run_timer_softirq+0x182/0x2a5
[<
ffffffffa002007e>] ? rxrpc_resend_time_expired+0x0/0x96 [af_rxrpc]
[<
ffffffff810367ef>] ? __do_softirq+0x69/0x13e
[<
ffffffff81036828>] __do_softirq+0xa2/0x13e
[<
ffffffff81002dcc>] call_softirq+0x1c/0x28
[<
ffffffff810049f0>] do_softirq+0x38/0x80
[<
ffffffff810361a2>] irq_exit+0x45/0x47
[<
ffffffff81018fb3>] smp_apic_timer_interrupt+0x88/0x96
[<
ffffffff81002893>] apic_timer_interrupt+0x13/0x20
<EOI> [<
ffffffff81049de1>] ? __atomic_notifier_call_chain+0x0/0x86
[<
ffffffff8100955b>] ? mwait_idle+0x6e/0x78
[<
ffffffff81009552>] ? mwait_idle+0x65/0x78
[<
ffffffff810011ac>] cpu_idle+0x4d/0x83
[<
ffffffff813e06f3>] start_secondary+0x1bd/0x1c1
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Changli Gao [Wed, 4 Aug 2010 04:58:59 +0000 (04:58 +0000)]
sch_sfq: add sanity check for the packet length
The packet length should be checked before the packet data is dereferenced.
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Changli Gao [Wed, 4 Aug 2010 04:55:40 +0000 (04:55 +0000)]
cls_rsvp: add sanity check for the packet length
The packet length should be checked before the packet data is dereferenced.
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Changli Gao [Wed, 4 Aug 2010 04:48:12 +0000 (04:48 +0000)]
cls_flow: add sanity check for the packet length
The packet length should be checked before the packet data is dereferenced.
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Changli Gao [Wed, 4 Aug 2010 04:43:44 +0000 (04:43 +0000)]
sk_buff: introduce pskb_network_may_pull()
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Changli Gao [Tue, 3 Aug 2010 17:39:18 +0000 (17:39 +0000)]
act_nat: fix on the TX path
On the TX path, skb->data points to the ethernet header, not the network
header. So when validating the packet length for accessing we should
take the ethernet header into account.
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Tue, 3 Aug 2010 09:32:24 +0000 (09:32 +0000)]
drivers/net/enic: Use %pUB to format a UUID
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stefan Weil [Tue, 3 Aug 2010 08:53:45 +0000 (08:53 +0000)]
davinci_emac: Fix use after free in davinci_emac_remove
free_netdev finally calls kfree which makes the contents
of ndev and priv (private data contained in ndev) invalid.
So iounmap should be called before free_netdev.
Cc: David S. Miller <davem@davemloft.net>
Cc: Chaithrika U S <chaithrika@ti.com>
Cc: Sriramakrishnan <srk@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Kulikov Vasiliy [Tue, 3 Aug 2010 05:43:18 +0000 (05:43 +0000)]
via-velocity: do not use PCI resources before pci_enable_device()
IRQ and resource[] may not have correct values until
after PCI hotplug setup occurs at pci_enable_device() time.
The semantic match that finds this problem is as follows:
// <smpl>
@@
identifier x;
identifier request ~= "pci_request.*|pci_resource.*";
@@
(
* x->irq
|
* x->resource
|
* request(x, ...)
)
...
*pci_enable_device(x)
// </smpl>
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Kulikov Vasiliy [Tue, 3 Aug 2010 05:43:15 +0000 (05:43 +0000)]
cxgb4vf: do not use PCI resources before pci_enable_device()
IRQ and resource[] may not have correct values until
after PCI hotplug setup occurs at pci_enable_device() time.
The semantic match that finds this problem is as follows:
// <smpl>
@@
identifier x;
identifier request ~= "pci_request.*|pci_resource.*";
@@
(
* x->irq
|
* x->resource
|
* request(x, ...)
)
...
*pci_enable_device(x)
// </smpl>
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Kulikov Vasiliy [Tue, 3 Aug 2010 05:43:11 +0000 (05:43 +0000)]
cxgb3: do not use PCI resources before pci_enable_device()
IRQ and resource[] may not have correct values until
after PCI hotplug setup occurs at pci_enable_device() time.
The semantic match that finds this problem is as follows:
// <smpl>
@@
identifier x;
identifier request ~= "pci_request.*|pci_resource.*";
@@
(
* x->irq
|
* x->resource
|
* request(x, ...)
)
...
*pci_enable_device(x)
// </smpl>
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Linus Torvalds [Wed, 4 Aug 2010 22:31:02 +0000 (15:31 -0700)]
Merge branch 'for-next' of git://git./linux/kernel/git/jikos/trivial
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (48 commits)
Documentation: update broken web addresses.
fix comment typo "choosed" -> "chosen"
hostap:hostap_hw.c Fix typo in comment
Fix spelling contorller -> controller in comments
Kconfig.debug: FAIL_IO_TIMEOUT: typo Faul -> Fault
fs/Kconfig: Fix typo Userpace -> Userspace
Removing dead MACH_U300_BS26
drivers/infiniband: Remove unnecessary casts of private_data
fs/ocfs2: Remove unnecessary casts of private_data
libfc: use ARRAY_SIZE
scsi: bfa: use ARRAY_SIZE
drm: i915: use ARRAY_SIZE
drm: drm_edid: use ARRAY_SIZE
synclink: use ARRAY_SIZE
block: cciss: use ARRAY_SIZE
comment typo fixes: charater => character
fix comment typos concerning "challenge"
arm: plat-spear: fix typo in kerneldoc
reiserfs: typo comment fix
update email address
...
Linus Torvalds [Wed, 4 Aug 2010 22:23:49 +0000 (15:23 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jikos/hid
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (30 commits)
Revert "HID: add support for the Wacom Intuos 4 wireless"
HID: fix up Kconfig entry for ACRUX driver
HID: add ACRUX game controller force feedback support
HID: Force input registration for "VEC footpedal"
HID: add HID_QUIRK_HIDINPUT_FORCE
HID: hid-input.c: indentation fixes
HID: hiddev: use usb_find_interface, get rid of BKL
HID: ignore digitizer usage Undefined (0x00)
HID: Add support for Conceptronic CLLRCMCE
HID: hid-ids.h: Whitespace fixup, align using TABs
HID: picolcd: implement refcounting of framebuffer
HID: picolcd: do not reallocate memory on depth change
HID: picolcd: Add minimal palette required by fbcon on 8bpp
HID: magicmouse: Correct parsing of large X and Y motions.
HID: magicmouse: report last touch up
HID: picolcd: fix deferred_io init/cleanup to fb ordering
HID: hid-ids.h: keep vendor ids in alphabetical order
HID: add proper support for Elecom BM084 bluetooth mouse
HID: magicmouse: enable horizontal scrolling
HID: magicmouse: add param for scroll speed
...
Linus Torvalds [Wed, 4 Aug 2010 22:23:14 +0000 (15:23 -0700)]
Merge git://git./linux/kernel/git/herbert/crypto-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (39 commits)
random: Reorder struct entropy_store to remove padding on 64bits
padata: update API documentation
padata: Remove padata_get_cpumask
crypto: pcrypt - Update pcrypt cpumask according to the padata cpumask notifier
crypto: pcrypt - Rename pcrypt_instance
padata: Pass the padata cpumasks to the cpumask_change_notifier chain
padata: Rearrange set_cpumask functions
padata: Rename padata_alloc functions
crypto: pcrypt - Dont calulate a callback cpu on empty callback cpumask
padata: Check for valid cpumasks
padata: Allocate cpumask dependend recources in any case
padata: Fix cpu index counting
crypto: geode_aes - Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)
pcrypt: Added sysfs interface to pcrypt
padata: Added sysfs primitives to padata subsystem
padata: Make two separate cpumasks
padata: update documentation
padata: simplify serialization mechanism
padata: make padata_do_parallel to return zero on success
padata: Handle empty padata cpumasks
...
Linus Torvalds [Wed, 4 Aug 2010 22:17:52 +0000 (15:17 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tj/percpu
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
percpu: allow limited allocation before slab is online
percpu: make @dyn_size always mean min dyn_size in first chunk init functions
Linus Torvalds [Wed, 4 Aug 2010 22:15:15 +0000 (15:15 -0700)]
Merge git://git./linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (276 commits)
[SCSI] zfcp: Trigger logging in the FCP channel on qdio error conditions
[SCSI] zfcp: Introduce experimental support for DIF/DIX
[SCSI] zfcp: Enable data division support for FCP devices
[SCSI] zfcp: Prevent access on uninitialized memory.
[SCSI] zfcp: Post events through FC transport class
[SCSI] zfcp: Cleanup QDIO attachment and improve processing.
[SCSI] zfcp: Cleanup function parameters for sbal value.
[SCSI] zfcp: Use correct width for timer_interval field
[SCSI] zfcp: Remove SCSI device when removing unit
[SCSI] zfcp: Use memdup_user and kstrdup
[SCSI] zfcp: Fix retry after failed "open port" erp action
[SCSI] zfcp: Fail erp after timeout
[SCSI] zfcp: Use forced_reopen in terminate_rport_io callback
[SCSI] zfcp: Register SCSI devices after successful fc_remote_port_add
[SCSI] zfcp: Do not try "forced close" when port is already closed
[SCSI] zfcp: Do not unblock rport from REOPEN_PORT_FORCED
[SCSI] sd: add support for runtime PM
[SCSI] implement runtime Power Management
[SCSI] convert to the new PM framework
[SCSI] Unify SAM_ and SAM_STAT_ macros
...
Andy Lutomirski [Sun, 25 Jul 2010 17:14:29 +0000 (13:14 -0400)]
iwlagn: Improve aggregation failure error messages
82ca9341763107615a15da6e59b9535d49eb91c3 added scary looking
but harmless error messages. Make them clearer and make the
actual failure message show up with the same severity as the
harmless one.
Signed-off-by: Andy Lutomirski <luto@mit.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kulikov Vasiliy [Tue, 3 Aug 2010 15:43:22 +0000 (19:43 +0400)]
rt2x00: do not use PCI resources before pci_enable_device()
IRQ and resource[] may not have correct values until
after PCI hotplug setup occurs at pci_enable_device() time.
The semantic match that finds this problem is as follows:
// <smpl>
@@
identifier x;
identifier request ~= "pci_request.*|pci_resource.*";
@@
(
* x->irq
|
* x->resource
|
* request(x, ...)
)
...
*pci_enable_device(x)
// </smpl>
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Juuso Oikarinen [Tue, 3 Aug 2010 05:22:25 +0000 (08:22 +0300)]
mac80211: Fix compilation warning when CONFIG_INET is not set
The warning is:
net/mac80211/main.c:688: warning: label ‘fail_ifa’ defined but not used
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Christoph Fritz [Tue, 3 Aug 2010 10:54:20 +0000 (12:54 +0200)]
wireless: ipw2100: check result of kzalloc()
If kzalloc() fails return with -ENOMEM from ipw2100_net_init() which is
called by register_netdev.
CC: Dan Carpenter <error27@gmail.com>
Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jan Friedrich [Mon, 2 Aug 2010 21:55:50 +0000 (23:55 +0200)]
ath9k: fix erased ieee80211_rx_status.mactime
ath9k_rx_skb_preprocess nulls rxs and the mactime is never set again -
mactime is always 0. This causes problems in IBSS mode.
ieee80211_rx_bss_info uses mactime to decide if an IBSS merge is needed.
Without this patch the merge is triggered by each beacon received.
This can be recognized by the "beacon TSF higher than local TSF - IBSS
merge with BSSID" log message accompanying each beacon.
This problem was not completely fixed in commit
a6d2055b02dde1067075795274672720baadd3ca and is not a stable kernel fix.
It is solely intended for wireless-testing.
Signed-off-by: Jan Friedrich <jft@dev2day.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Sun, 1 Aug 2010 20:40:04 +0000 (15:40 -0500)]
p54pci: Add PCI ID for SMC2802W
The SMC2802W appears to work with p54pci.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: David Cozatt <olbrannon@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Lorenzo Bianconi [Sun, 1 Aug 2010 13:47:32 +0000 (15:47 +0200)]
ath9k: fix an issue in ath_atx_tid paused flag management
I noticed a possible issue in the paused flag management of the
ath_atx_tid data structure. In particular, in a noisy environment and
under heavy load, I observed that the AGGR session establishment could
fail several times consecutively causing values of the paused flag
greater than one for this TID (ath_tx_pause_tid is called more than
once from ath_tx_aggr_start).
Considering that the session for this TID can not be established also
after the mac80211 stack calls the ieee80211_agg_tx_operational() since
the ath_tx_aggr_resume() lowers the paused flag only by one.
This patch also replaces some BUG_ON calls with WARN_ON, as even if
these unlikely conditions happen, it's not fatal enough to justify a
BUG_ON.
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Sun, 1 Aug 2010 06:25:16 +0000 (02:25 -0400)]
ath9k_hw: Fix regulatory CTL index usage for AR9003
AR9003 was not relying on the CTL indexes from the EEPROM for capping the
max output power. The CTL indexes from the EEPROM provide calibrated
limits for output power for each tested and supported frequency. Without
this the device operates at a power level which only conforms to the
transmit spectrum mask as specified by IEEE Annex I.2.3.
The regulatory limit by CRDA is always used but does not provide
calibrated values for optimal performance, specially on band edges.
Using the calibrated data from the EEPROM ensures the device
operates at optimal output power while still ensuring proper
regulatory compliance. The device uses the minimum of these tree
values, the value from CRDA, the calibrated value from CTL indexex,
and the value to conform to the IEEE transmit spectrum mask.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kulikov Vasiliy [Sat, 31 Jul 2010 16:33:59 +0000 (20:33 +0400)]
net: wl12xx: do not use kfree'd memory
wl1271_dump() uses cmd after kfree(cmd). Move kfree() just after
wl1271_dump().
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Acked-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Sat, 31 Jul 2010 15:34:12 +0000 (08:34 -0700)]
iwlagn: fix typo in ucode_bt_stats_read debugfs
small typo fix in ucode_bt_stats_read debugfs file
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Sat, 31 Jul 2010 15:34:11 +0000 (08:34 -0700)]
iwlwifi: BA scd_flow not match condition detected
It is a uCode bug which cause the tx queue id not match scd_flow
in compressed block ack frame, and it need to be addressed in uCode.
Currently, driver will log the information when it happen.
Since it is possible happen very often and we do not want to fill the syslog,
so don't enable the logging by default.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Sat, 31 Jul 2010 15:34:09 +0000 (08:34 -0700)]
iwlwifi: fix compile warning
When iwlwifi is compiled w/o debug, we get
this warning:
iwl-agn.c: In function ‘iwlagn_load_firmware’:
iwl-agn.c:2014: warning: passing argument 3 of ‘iwl_print_hex_dump’ discards qualifiers from pointer target type
iwl-debug.h:73: note: expected ‘void *’ but argument is of type ‘const u8 *’
because the const qualifier is missing in the
inline stub. Fix this.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Fri, 30 Jul 2010 22:12:01 +0000 (00:12 +0200)]
ath9k_hw: fix a noise floor calibration related race condition
On AR5008-AR9002, other forms of calibration must not be started while
the noise floor calibration is running, as this can create invalid
readings which were sometimes not even recoverable by any further
calibration attempts.
This patch also ensures that the result of noise floor measurements
are processed faster and also allows the result of the initial
calibration on reset to make it into the NF history buffer
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Fri, 30 Jul 2010 22:12:00 +0000 (00:12 +0200)]
ath9k_hw: clean up per-channel calibration data
The noise floor history buffer is currently not kept per channel, which
can lead to problems when changing channels from a clean channel to a
noisy one. Also when switching from HT20 to HT40, the noise floor
history buffer is full of measurements, but none of them contain data
for the extension channel, which it needs quite a bit of time to recover
from.
This patch puts all the per-channel calibration data into a single data
structure, and gives the the driver control over whether that is used
per-channel or even not used for some channels.
For ath9k_htc, I decided to keep this per-channel in order to avoid
creating regressions.
For ath9k, the data is kept only for the operating channel, which saves
some space. ath9k_hw takes care of wiping old data when the operating
channel or its channel flags change.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Fri, 30 Jul 2010 22:11:59 +0000 (00:11 +0200)]
ath9k: prevent calibration during off-channel activity
Previously the software scan callback was used to indicate to the hardware,
when it was safe to calibrate. This didn't really work properly, because it
depends on a specific order of software scan callbacks vs. channel changes.
Also, software scans are not the only thing that triggers off-channel
activity, so it's better to use the newly added indication from mac80211 for
this and not use the software scan callback for anything calibration related.
This fixes at least some of the invalid noise floor readings that I've seen
in AP mode on AR9160
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Fri, 30 Jul 2010 19:02:12 +0000 (21:02 +0200)]
ath9k_hw: fix analog shift register writes on AR9003
Writes to the analog shift registers, which are issues by the initval
programming function, require a 100 usec delay (similar to AR9002,
but in a different register range).
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Fri, 30 Jul 2010 19:02:11 +0000 (21:02 +0200)]
ath9k: fix a crash in the PA predistortion apply function
When updating the PAPRD table in hardware, PAPRD itself needs to be
disabled first, otherwise the hardware can throw a data bus error,
which upsets at least some platforms.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Fri, 30 Jul 2010 19:02:10 +0000 (21:02 +0200)]
ath9k_hw: fix periodic noise floor calibration on AR9003
The periodic noise floor calibration is broken on this chip family, because
it keeps triggering a software-filtered noise floor calibration, but never
reads the result before uploading the history buffer value to the hardware.
Fix this with a call to ath9k_hw_getnf(), just like on AR9002.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>