]> pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
17 years agoSSB: hide empty sub menu
Mike Frysinger [Thu, 6 Nov 2008 01:37:00 +0000 (01:37 +0000)]
SSB: hide empty sub menu

If the target system cannot support SSB, then don't show the menu option as
it'll simply be an empty submenu.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonohz: disable tick_nohz_kick_tick() for now
Thomas Gleixner [Mon, 10 Nov 2008 12:20:23 +0000 (13:20 +0100)]
nohz: disable tick_nohz_kick_tick() for now

Impact: nohz powersavings and wakeup regression

commit fb02fbc14d17837b4b7b02dbb36142c16a7bf208 (NOHZ: restart tick
device from irq_enter()) causes a serious wakeup regression.

While the patch is correct it does not take into account that spurious
wakeups happen on x86. A fix for this issue is available, but we just
revert to the .27 behaviour and let long running softirqs screw
themself.

Disable it for now.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agovlan: Fix typos in proc output string
Ferenc Wagner [Mon, 10 Nov 2008 21:37:40 +0000 (13:37 -0800)]
vlan: Fix typos in proc output string

Signed-off-by: Ferenc Wagner <wferi@niif.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoirq: call __irq_enter() before calling the tick_idle_check
Thomas Gleixner [Fri, 7 Nov 2008 10:06:00 +0000 (11:06 +0100)]
irq: call __irq_enter() before calling the tick_idle_check

Impact: avoid spurious ksoftirqd wakeups

The tick idle check which is called from irq_enter() was run before
the call to __irq_enter() which did not set the in_interrupt() bits in
preempt_count. That way the raise of a softirq woke up softirqd for
nothing as the softirq was handled on return from interrupt.

Call __irq_enter() before calling into the tick idle check code.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Mon, 10 Nov 2008 21:24:44 +0000 (13:24 -0800)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6

17 years agox86: Make NUMA on 32-bit depend on BROKEN
Rafael J. Wysocki [Mon, 10 Nov 2008 20:52:47 +0000 (21:52 +0100)]
x86: Make NUMA on 32-bit depend on BROKEN

While investigating the failure of hibernation on 32-bit x86 with
CONFIG_NUMA set, as described in this message
http://marc.info/?l=linux-kernel&m=122634118116226&w=4
I asked some people for help and I was told that it wasn't really
worth the effort, because CONFIG_NUMA was generally broken on 32-bit
x86 systems and it shouldn't be used in such configs.  For this
reason, make CONFIG_NUMA depend on BROKEN instead of EXPERIMENTAL on
x86-32.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Pavel Machek <pavel@suse.cz>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoKEYS: Make request key instantiate the per-user keyrings
David Howells [Mon, 10 Nov 2008 19:00:05 +0000 (19:00 +0000)]
KEYS: Make request key instantiate the per-user keyrings

Make request_key() instantiate the per-user keyrings so that it doesn't oops
if it needs to get hold of the user session keyring because there isn't a
session keyring in place.

Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: Steve French <smfrench@gmail.com>
Tested-by: Rutger Nijlunsing <rutger.nijlunsing@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agopowerpc: Repair device bindings documentation
Trent Piepho [Mon, 10 Nov 2008 21:09:21 +0000 (13:09 -0800)]
powerpc: Repair device bindings documentation

Commit d0fc2eaaf4c56a95f5ed29b6bfb609e19714fc16 "powerpc/fsl: Refactor
device bindings" split out a number of device bindings from
booting-without-of.txt into separate files.  Having them all in one file
was a frequent source of merge conflicts.

However, in the next merge, 49997d75152b3d23c53b0fa730599f2f74c92c65, there
was another conflict.  Some of the bindings removed from
booting-without-of.txt were mistakenly added back in and the copies in
dts-bindings were kept as well.

This patch re-removes "Freescale Display Interface" and "Freescale on board
FPGA" and fixes the table of contents.

Signed-off-by: Trent Piepho <tpiepho@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years agoBtrfs: empty_size allocation fixes again
Chris Mason [Mon, 10 Nov 2008 21:13:54 +0000 (16:13 -0500)]
Btrfs: empty_size allocation fixes again

The allocator wasn't catching all of the cases where it needed to do
extra loops because the check to enforce them wasn't happening early
enough.

When the allocator decided to increase the size of the allocation
for metadata clustering, it wasn't always setting the empty_size to
include the extra (optional) bytes.  This also fixes the empty_size field
to be correct.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
17 years agosparc64: Update defconfig.
David S. Miller [Mon, 10 Nov 2008 20:35:29 +0000 (12:35 -0800)]
sparc64: Update defconfig.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoRevert "sparc: correct section of current_pc()"
David S. Miller [Sat, 8 Nov 2008 06:57:16 +0000 (22:57 -0800)]
Revert "sparc: correct section of current_pc()"

This reverts commit 8dd9453737822469837d48d5da3785ce70fb2118.

This fixes a boot failure reported by Robert Reif.

The code above the section change expects to fallthrough, so
we can't make such a section change here.

17 years agortl8187: Change TX power settings
Larry Finger [Fri, 31 Oct 2008 16:40:44 +0000 (09:40 -0700)]
rtl8187: Change TX power settings

The latest vendor driver (rtl8187B_linux_26.1036.0708.2008) has a different
CCK power setting code as compared with the Linux driver.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Piter Punk <piterpk@terra.com.br>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoorinoco: Move sources to a subdirectory
David Kilroy [Fri, 31 Oct 2008 13:35:21 +0000 (13:35 +0000)]
orinoco: Move sources to a subdirectory

Keeping all the orinoco drivers in a common directory will make
maintenance easier.

Signed-off by: David Kilroy <kilroyd@googlemail.com>

Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agocfg80211: Add kdoc for struct regulatory_request
Luis R. Rodriguez [Thu, 30 Oct 2008 20:33:56 +0000 (13:33 -0700)]
cfg80211: Add kdoc for struct regulatory_request

As regulatory_request gets bigger there will be more questions
of what things means, so clarify documenation for it and
keep track of the special alpha2 codes we use internally
and on the userspace regulatory agents.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agocfg80211: make use of reg macros on REG_RULE
Luis R. Rodriguez [Thu, 30 Oct 2008 20:33:55 +0000 (13:33 -0700)]
cfg80211: make use of reg macros on REG_RULE

Ensure regulatory converstion macros safely accept
multiple arguments and make REG_RULE() use them.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agocfg80211: Add regulatory domain intersection capability
Luis R. Rodriguez [Thu, 30 Oct 2008 20:33:53 +0000 (13:33 -0700)]
cfg80211: Add regulatory domain intersection capability

There are certain scenerios where we require intersecting
two regulatory domains. This adds intersection support.
When we enable 802.11d support we will use this to intersect
the regulatory domain from the AP's country IE and what our
regulatory agent believes is correct for a country.

This patch enables intersection for now in the case where
the last regdomain was set by a country IE which was parsed
and the user then wants to set the regulatory domain. Since
we don't support country IE parsing yet this code path will not
be hit, however this allows us to pave the way for 11d support.

Intersection code has been tested in userspace with CRDA.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agocfg80211: a reg rule is invalid if freq diff is 0
Luis R. Rodriguez [Thu, 30 Oct 2008 20:33:52 +0000 (13:33 -0700)]
cfg80211: a reg rule is invalid if freq diff is 0

A regulatory rule is invalid when the frequency difference
between the end of the frequency range and the start is 0.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agomac80211_hwsim: Add support for client PS mode
Jouni Malinen [Thu, 30 Oct 2008 17:59:05 +0000 (19:59 +0200)]
mac80211_hwsim: Add support for client PS mode

This introduces a debugfs file (ieee80211/phy#/hwsim/ps) that can be
used to force a simulated radio into power save mode. Following values
can be written into this file to change PS mode:
0 = power save disabled (constantly awake)
1 = power save enabled (drop all frames; do not send PS-Poll)
2 = power save enabled (send PS-Poll frames automatically to receive
    buffered unicast frames); not yet fully implemented
3 = manual PS-Poll trigger (send a single PS-Poll frame)

Two different behavior for power save mode processing can be tested:
- move between modes 1 and 0 (i.e., receive all buffered frames at a
  time)
- move to mode 1 and use manual PS-Poll frames (write 3 to the 'ps'
  debugfs file) to fetch power save buffered frames one at a time

Mode 2 (automatic PS-Poll) does not yet parse Beacon frames, but
eventually, it should take a look at TIM IE and send PS-Poll if a
traffic bit is set for our AID.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agomac80211: Allow AP mode to be enabled
Jouni Malinen [Thu, 30 Oct 2008 17:50:30 +0000 (19:50 +0200)]
mac80211: Allow AP mode to be enabled

With the addition of basic rate set and TX queue parameter
configuration and confirmation that power save buffering is
working again, mac80211 is now in state that allows AP mode to be
used without major problems. Consequently, it is time to allow this
mode to be enabled without having to patch the kernel.

AP mode requires hostapd for management frame processing and as such,
configuring this mode is only allowed through cfg80211 (not with
iwconfig and WEXT).

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agomac80211: fix basic rates setting from association response
Tomas Winkler [Thu, 30 Oct 2008 15:08:08 +0000 (17:08 +0200)]
mac80211: fix basic rates setting from association response

In previous code all the rates were marked as basic.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agomac80211_hwsim: Make sure beacon_timer gets deleted
Jouni Malinen [Thu, 30 Oct 2008 14:59:25 +0000 (16:59 +0200)]
mac80211_hwsim: Make sure beacon_timer gets deleted

It was possible to trigger a kernel panic because beacon_timer may not
have been deleted in all cases when the kernel module was removed while
hostapd was still running.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agonl80211: Add TX queue parameter configuration
Jouni Malinen [Thu, 30 Oct 2008 14:59:24 +0000 (16:59 +0200)]
nl80211: Add TX queue parameter configuration

Add a new attribute, NL80211_ATTR_WIPHY_TXQ_PARAMS, that can be used with
NL80211_CMD_SET_WIPHY for userspace (e.g., hostapd) to set TX queue
parameters (txop, cwmin, cwmax, aifs).

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agomac80211_hwsim: Debug info for TX queue parameters
Jouni Malinen [Thu, 30 Oct 2008 14:59:23 +0000 (16:59 +0200)]
mac80211_hwsim: Debug info for TX queue parameters

Provide detailed information on TX queue parameter changes to make it
easier to debug mac80211 functionality.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agonl80211: Add basic rate configuration for AP mode
Jouni Malinen [Thu, 30 Oct 2008 14:59:22 +0000 (16:59 +0200)]
nl80211: Add basic rate configuration for AP mode

Add a new attribute, NL80211_ATTR_BSS_BASIC_RATES, that can be used with
NL80211_CMD_SET_BSS for userspace (e.g., hostapd) to set which rates are
in the basic rate set.

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>
17 years agomac80211_hwsim: Debug info for BSS config changes
Jouni Malinen [Thu, 30 Oct 2008 14:59:21 +0000 (16:59 +0200)]
mac80211_hwsim: Debug info for BSS config changes

Provide detailed information on BSS configuration changes to make it
easier to debug mac80211 functionality.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agob43legacy: reindent misleading statement
Ilpo Järvinen [Thu, 30 Oct 2008 11:43:41 +0000 (13:43 +0200)]
b43legacy: reindent misleading statement

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agolibertas_tf: fix skb tail pointer
Johannes Berg [Wed, 29 Oct 2008 22:24:14 +0000 (23:24 +0100)]
libertas_tf: fix skb tail pointer

skb->tail can't be meant here because it's not the same across 32/64 bit
compilations. This means there's no way the current driver can work on
64-bit architectures.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: stable@kernel.org [2.6.27]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agop54: initialize all deprecated fields
Chr [Wed, 29 Oct 2008 21:39:50 +0000 (22:39 +0100)]
p54: initialize all deprecated fields

The new mechanism for allocing space for control frames,
didn't "zero" out the payload data... However I haven't
heard of any hiccups so far...

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agop54: don't report known but unhandled EEPROM codes as unknown
Pavel Roskin [Wed, 29 Oct 2008 21:31:43 +0000 (17:31 -0400)]
p54: don't report known but unhandled EEPROM codes as unknown

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwlwifi: do not call statistics from rfkill
Mohamed Abbas [Wed, 29 Oct 2008 21:05:49 +0000 (14:05 -0700)]
iwlwifi: do not call statistics from rfkill

Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwlwifi: iwl-agn-rs: initialize rs with valid antenna
Winkler, Tomas [Wed, 29 Oct 2008 21:05:48 +0000 (14:05 -0700)]
iwlwifi: iwl-agn-rs: initialize rs with valid antenna

This patch fix rate scaling initialization. Rate scaling
was initialized always with B antenna.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwlwifi: rename double inclusion protection name in iwl-commands.h
Emmanuel Grumbach [Wed, 29 Oct 2008 21:05:47 +0000 (14:05 -0700)]
iwlwifi: rename double inclusion protection name in iwl-commands.h

This patch change the name of the double inclusion protection in
iwl-commands.h

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwlwifi: rename generic iwlagn functions that had a HW specific name
Emmanuel Grumbach [Wed, 29 Oct 2008 21:05:46 +0000 (14:05 -0700)]
iwlwifi: rename generic iwlagn functions that had a HW specific name

This patch renames functions that are generic in iwl-agn and had a iwl4965
prefix.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwlwifi: fix priv->iw_mode setting when multiple vif are configured
Zhu, Yi [Wed, 29 Oct 2008 21:05:45 +0000 (14:05 -0700)]
iwlwifi: fix priv->iw_mode setting when multiple vif are configured

mac80211 supports multiple virtual interfaces for a single device. For
example, a managed interface (wlan0) and a monitor interface (mon0) can
exist at the same time. Thus priv->iw_mode is not sufficient to track
the wireless mode any more. The patch redefines priv->iw_mode as the
first interface mode (the same as priv->vif->type if priv->vif != NULL).
If another monitor type interface is created later, we don't change
priv->iw_mode into monitor. This way, the original interface still
works. The patch also requests mac80211 to do reassociation after we
change the Rx filter flags.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwlwifi: trivial removal of some 4965 remaining from iwl-agn-rs.h
Winkler, Tomas [Wed, 29 Oct 2008 21:05:44 +0000 (14:05 -0700)]
iwlwifi: trivial removal of some 4965 remaining from iwl-agn-rs.h

This patch removes 4965 prefix from comments and one function
in iwl-agn-rs.h

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwlwifi: reorganize flow handler bitology
Winkler, Tomas [Wed, 29 Oct 2008 21:05:43 +0000 (14:05 -0700)]
iwlwifi: reorganize flow handler bitology

This patch cleans up FH bits and adds missing register values
that will be used later in TX initialization rewrite

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agob43: implement short slot and basic rate handling
Johannes Berg [Wed, 29 Oct 2008 19:02:12 +0000 (20:02 +0100)]
b43: implement short slot and basic rate handling

This implements proper short slot handling and adds code to
program the hardware for the correct response rates derived
from the basic rate set for the current BSS.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agowireless: implement basic rate helper function
Johannes Berg [Wed, 29 Oct 2008 19:00:45 +0000 (20:00 +0100)]
wireless: implement basic rate helper function

This adds a helper function that, given a bitmap of basic
rates and a bitrate returns the response rate for this rate.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agort2x00: Remove debugfs CSR access wrappers
Ivo van Doorn [Wed, 29 Oct 2008 18:41:03 +0000 (19:41 +0100)]
rt2x00: Remove debugfs CSR access wrappers

Move calculation of CSR register offset into rt2x00debug.c
and remove the wrapper functions from each individual driver.
(Except rt2500usb, which still needs to wrap for the
different value type argument).

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoath9k: correct warning about unintialized variable 'tid'
John W. Linville [Fri, 31 Oct 2008 20:45:15 +0000 (16:45 -0400)]
ath9k: correct warning about unintialized variable 'tid'

drivers/net/wireless/ath9k/xmit.c: In function ‘ath_tx_start’:
drivers/net/wireless/ath9k/xmit.c:1858: warning: ‘tid’ may be used uninitialized in this function

Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agortl8187: Reduce channel switch delay
Larry Finger [Fri, 31 Oct 2008 16:54:49 +0000 (09:54 -0700)]
rtl8187: Reduce channel switch delay

The latest vendor driver (rtl8187B_linux_26.1036.0708.2008) has a 10 msec
delay after the call to set a new channel, but not before.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Tested-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agortl8187: Remove primitive write delays
Larry Finger [Fri, 31 Oct 2008 16:54:30 +0000 (09:54 -0700)]
rtl8187: Remove primitive write delays

Each of the primary write routines, rtl8187_write_phy(),
rtl8225_write_bitbang(), and rtl8225_write_8051() all conclude with an
msleep() command. Testing shows that these are not needed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Tested-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agortl8187: Remove msleep calls after calls to rtl8225_write
Larry Finger [Fri, 31 Oct 2008 16:54:13 +0000 (09:54 -0700)]
rtl8187: Remove msleep calls after calls to rtl8225_write

Routine rtl8225_write() calls either rtl8225_write_bitbang() or
rtl8225_write_8051(), both of which end with an msleep() command. As a
result, a rtl8225_write() immediately followed by an msleep() is not needed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Tested-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agortl8187: Remove CCK delays
Larry Finger [Fri, 31 Oct 2008 16:52:58 +0000 (09:52 -0700)]
rtl8187: Remove CCK delays

Routine rtl8225_write_phy_cck() calls rtl8225_write_phy(), which concludes
with a sleep of 1 msec; therefore a call to rtl8225_write_phy_cck()
immediately followed by an msleep(1) is not needed.

Signed-off-by: Larry Finger <Larry.Finger@larry.finger>
Tested-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Tested-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agortl8187: Remove OFDM delays
Larry Finger [Fri, 31 Oct 2008 16:52:39 +0000 (09:52 -0700)]
rtl8187: Remove OFDM delays

Routine rtl8225_write_phy_ofdm() calls rtl8225_write_phy(), which concludes
with a sleep of 1 msec; therefore a call to rtl8225_write_phy_ofdm()
immediately followed by an msleep(1) is not needed.

Signed-off-by: Larry Finger <Larry.Finger@larry.finger>
Tested-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Tested-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agortl8187: Remove large delays
Larry Finger [Fri, 31 Oct 2008 16:52:07 +0000 (09:52 -0700)]
rtl8187: Remove large delays

The rtl8187 driver contains 3 sleep statements that are longer than
a second. Testing has shown no bad effects when they are removed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Tested-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agort2x00: Release rt2x00 2.2.2
Ivo van Doorn [Wed, 29 Oct 2008 16:19:29 +0000 (17:19 +0100)]
rt2x00: Release rt2x00 2.2.2

Version bump.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agort2x00: Improve interface_modes initialization
Ivo van Doorn [Wed, 29 Oct 2008 16:18:46 +0000 (17:18 +0100)]
rt2x00: Improve interface_modes initialization

All operating modes which require beaconing should
depend on the availability of beacon entries from
the hardware.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agort2x00: Remove ieee80211_bss_conf from rt2x00_intf
Ivo van Doorn [Wed, 29 Oct 2008 16:18:22 +0000 (17:18 +0100)]
rt2x00: Remove ieee80211_bss_conf from rt2x00_intf

We can safely remove ieee80211_bss_conf from rt2x00_intf,
it is provided by mac80211 in ieee80211_vif as well.
(rt2x00_intf is the drv_priv field of ieee80211_vif).

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agort2x00: Optimize configuration handling
Ivo van Doorn [Wed, 29 Oct 2008 16:17:57 +0000 (17:17 +0100)]
rt2x00: Optimize configuration handling

Implement latest changed from mac80211 configuration
handling to optmize configuration handling in rt2x00.

 * Remove set_retry_limit callback function, handled
   through config()
 * Move config_antenna to its own callback function,
   it isn't handled by mac80211 anymore
 * Use IEEE80211_CONF_CHANGED_* flags and remove manual
   checks
 * Removed deprecated short slot setting through config()
   and put it in config_erp() through which mac80211 now
   configures it
 * Remove config_phymode() and move contents to config_erp()
   since it only managed the basic rates which is now
   determined by mac80211 through config_erp().

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoath5k: update keycache to support TKIP handling
Bob Copeland [Thu, 30 Oct 2008 03:19:14 +0000 (23:19 -0400)]
ath5k: update keycache to support TKIP handling

Newer parts have slots at entry+64 for michael mic and can do WPA-TKIP
in hardware.  The open-sourced Atheros HAL has code for accessing this
portion so now we know how where to put the key material.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoath5k: enable hardware encryption for WEP
Bob Copeland [Wed, 29 Oct 2008 12:30:54 +0000 (08:30 -0400)]
ath5k: enable hardware encryption for WEP

This change re-enables hardware encryption for ath5k after setting up
mac80211 to handle the initialization vectors which happens to make it
work.  Add a module param (nohwcrypt) to optionally turn it off.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agowireless: fix two bad print_ssid conversions
Holger Schurig [Wed, 29 Oct 2008 08:43:50 +0000 (09:43 +0100)]
wireless: fix two bad print_ssid conversions

This patch fixes two current compilation problems. They showed up
with CONFIG_IEEE80211_DEBUG defined.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agomac80211: Add a new event in ieee80211_ampdu_mlme_action
Sujith [Wed, 29 Oct 2008 04:49:28 +0000 (10:19 +0530)]
mac80211: Add a new event in ieee80211_ampdu_mlme_action

Send a notification to the driver on succesful
reception of an ADDBA response, add IEEE80211_AMPDU_TX_RESUME
for this purpose.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoath9k: Remove internal RX A-MPDU processing
Sujith [Wed, 29 Oct 2008 04:49:01 +0000 (10:19 +0530)]
ath9k: Remove internal RX A-MPDU processing

mac80211 has RX A-MPDU reordering support.
Use that and remove redundant RX processing within the driver.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoath9k: Clear HT info on starting the driver
Sujith [Wed, 29 Oct 2008 04:48:39 +0000 (10:18 +0530)]
ath9k: Clear HT info on starting the driver

Doing an interface down/up leaves the old HT assoc
information, clear it.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoath9k: Remove ath_tx_aggr_resp()
Sujith [Wed, 29 Oct 2008 04:48:14 +0000 (10:18 +0530)]
ath9k: Remove ath_tx_aggr_resp()

Accessing mac80211's internal state machine is wrong.
Will add resumption of a TID in a later patch.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoath9k: Enable interrupts at the proper place
Sujith [Wed, 29 Oct 2008 04:47:54 +0000 (10:17 +0530)]
ath9k: Enable interrupts at the proper place

config_interface() was the wrong place to enable interrupts
when bringing up an interface, move it to ath_open().

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoath9k: Remove unnecessary TSF reset
Sujith [Wed, 29 Oct 2008 04:47:34 +0000 (10:17 +0530)]
ath9k: Remove unnecessary TSF reset

The TSF is already reset properly via mac80211's callback.
Resetting it in config_interface() is not needed.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoath9k: Streamline attach/detach
Sujith [Wed, 29 Oct 2008 04:47:13 +0000 (10:17 +0530)]
ath9k: Streamline attach/detach

Simplify attach and detach routines by consolidating
the stop and suspend functions.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoath9k: Remove unused function ath_get_currentCountry()
Sujith [Wed, 29 Oct 2008 04:46:52 +0000 (10:16 +0530)]
ath9k: Remove unused function ath_get_currentCountry()

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoath9k: Refactor hw.c
Sujith [Wed, 29 Oct 2008 04:46:30 +0000 (10:16 +0530)]
ath9k: Refactor hw.c

Split hw.c into more manageable files:
   ani.c
   calib.c
   eeprom.c
   mac.c

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoath9k: Revamp VAP management
Sujith [Wed, 29 Oct 2008 04:46:06 +0000 (10:16 +0530)]
ath9k: Revamp VAP management

Remove the internal VAP management routines
and embed ath_vap in mac80211's driver private area
provided in ieee80211_vif.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoath9k: Use bitfields to store tid's state in a single variable
Sujith [Wed, 29 Oct 2008 04:45:40 +0000 (10:15 +0530)]
ath9k: Use bitfields to store tid's state in a single variable

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoath9k: Ensure ath_node is not NULL when updating tx chainmask
Sujith [Wed, 29 Oct 2008 04:45:16 +0000 (10:15 +0530)]
ath9k: Ensure ath_node is not NULL when updating tx chainmask

Also, random indentation and whitespace cleanup.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoath9k: Remove SM Power Save as it is not supported now
Sujith [Wed, 29 Oct 2008 04:44:52 +0000 (10:14 +0530)]
ath9k: Remove SM Power Save as it is not supported now

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoath9k: Revamp transmit control block
Sujith [Wed, 29 Oct 2008 04:44:26 +0000 (10:14 +0530)]
ath9k: Revamp transmit control block

Use the ath_buf instance associated with each tx frame
directly and remove all redundant information in ath_tx_control.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoath9k: Simplify node attach/detach routines
Sujith [Wed, 29 Oct 2008 04:43:59 +0000 (10:13 +0530)]
ath9k: Simplify node attach/detach routines

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoath9k: Node cleanup
Sujith [Wed, 29 Oct 2008 04:43:31 +0000 (10:13 +0530)]
ath9k: Node cleanup

Start removing the internal node list in ath9k, in preparation
for using mac80211's STA list.
Remove lists, locks, routines, flags, functions managing nodes in ath9k.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoath5k: fix keytable type buglet in ath5k_hw_reset_key
Bob Copeland [Thu, 30 Oct 2008 03:24:26 +0000 (23:24 -0400)]
ath5k: fix keytable type buglet in ath5k_hw_reset_key

Be sure we clear out both the mic (if applicable) and
the encryption key type.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoath5k: Update PCU code
Nick Kossifidis [Wed, 29 Oct 2008 02:28:28 +0000 (04:28 +0200)]
ath5k: Update PCU code

* In set_opmode don't handle antenna settings and preserve other STA_ID1 settings
(shouldn't matter because we call it during reset but it makes things cleaner)
Also set properly AP/ADHOC indicator flag on CFG while setting AP/ADHOC modes
and always enable key search mode.

* Properly set BSSID Mask during reset (cache it and reuse it durring set_associd)

* Update beacon_init to flush pending BMISS interrupts and handle setting of adhoc
beacon ATIM policy flag for ad-hoc mode. Also set TSF to 0 to start TSF increment
on AP mode. We need to handle sleep timers for AR5212 there + add support for PCF.

* Properly clean MIC key from keytable when TKIP is used (Bob is working on set_key
function etc so i leave it for now).

Tested on AR5212 (Hainan) and AR5413 and works fine

v2 Set PISR on AR5211+ and ISR on AR5210, got to sleep more ;-)

Changes-Licensed-under: ISC
Signed-Off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agodon't use net/ieee80211.h
Johannes Berg [Thu, 30 Oct 2008 21:09:54 +0000 (22:09 +0100)]
don't use net/ieee80211.h

Convert all the drivers using net/ieee80211.h to use linux/ieee80211.h.
Contains a bugfix in libertas where the SSID parsing could overrun the
buffer when the AP sends invalid information.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Dan Williams <dcbw@redhat.com> [airo, libertas]
Acked-by: Pavel Roskin <proski@gnu.org> [orinoco]
Acked-by: David Kilroy <kilroyd@googlemail.com> [orinoco]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwl3945: remove bogus comment
Johannes Berg [Wed, 29 Oct 2008 00:02:27 +0000 (01:02 +0100)]
iwl3945: remove bogus comment

I added this comment myself, but it's clearly wrong. I had meant
to place it in iwl_mac_add_interface, which at the time didn't
honour the MAC address setting, but it does now.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agomac80211: remove SSID driver code
Johannes Berg [Wed, 29 Oct 2008 00:09:37 +0000 (01:09 +0100)]
mac80211: remove SSID driver code

Remove the SSID from the driver API since now there is no
driver that requires knowing the SSID and I think it's
unlikely that any hardware design that does require the
SSID will play well with mac80211.

This also removes support for setting the SSID in master
mode which will require a patch to hostapd to not try.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoadm8211: remove SSID code
Johannes Berg [Tue, 28 Oct 2008 17:50:12 +0000 (18:50 +0100)]
adm8211: remove SSID code

Since adm8211 currently doesn't implement IBSS mode anyway,
it can't be using the SSID. And if/when it does implement
IBSS mode, we'll have to see how to make it beacon anyway.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agob43/legacy: remove SSID code
Johannes Berg [Tue, 28 Oct 2008 17:29:48 +0000 (18:29 +0100)]
b43/legacy: remove SSID code

The SSID programmed into the device is used by the ucode only
to reply to probe requests, a functionality we disable anyway
because it doesn't fit with the mac80211/hostapd programming
model. Therefore, it isn't useful to program the SSID into
device.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwlwifi: remove unused essid variable
Johannes Berg [Tue, 28 Oct 2008 17:25:43 +0000 (18:25 +0100)]
iwlwifi: remove unused essid variable

Now the essid stuff is unused, so remove it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwlwifi: remove implicit direct scan
Johannes Berg [Tue, 28 Oct 2008 17:21:05 +0000 (18:21 +0100)]
iwlwifi: remove implicit direct scan

When an undirected scan is requested and iwlwifi is not associated but
the user has set an SSID (and maybe was associated with that network at
some point) then iwlwifi will assume the user wanted to scan for this
SSID which seems wrong. Remove this code.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwl3945: remove dead code
Johannes Berg [Tue, 28 Oct 2008 17:06:02 +0000 (18:06 +0100)]
iwl3945: remove dead code

Was wondering about this code since supposedly the firmware will
add the SSID element. Turns out it's dead, so remove it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoath9k: remove useless NULL initialisers
Johannes Berg [Tue, 28 Oct 2008 15:59:57 +0000 (16:59 +0100)]
ath9k: remove useless NULL initialisers

When I added .set_frag_threshold I didn't realise it was already
there which now generated a sparse warning. Therefore, remove
the .set_frag_threshold NULL initialiser, and while at it all the
other useless ones.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agowireless: fix a few sparse warnings
Johannes Berg [Tue, 28 Oct 2008 15:49:41 +0000 (16:49 +0100)]
wireless: fix a few sparse warnings

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agowireless: move mesh config length constant
Johannes Berg [Tue, 28 Oct 2008 10:12:57 +0000 (11:12 +0100)]
wireless: move mesh config length constant

This is a constant from the 802.11 specification.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agomac80211: print reason code for deauth/dissoc frames
Zhu Yi [Tue, 28 Oct 2008 07:58:31 +0000 (15:58 +0800)]
mac80211: print reason code for deauth/dissoc frames

The patch prints reason code for deauth/dissoc frames to give users
more ideas what's happened for the disconnection.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agop54: eliminate warning for uninitialized variable 'tim_len'
John W. Linville [Fri, 31 Oct 2008 19:53:12 +0000 (15:53 -0400)]
p54: eliminate warning for uninitialized variable 'tim_len'

drivers/net/wireless/p54/p54common.c: In function ‘p54_tx’:
drivers/net/wireless/p54/p54common.c:1058: warning: ‘tim_len’ may be used uninitialized in this function

Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agop54: AP & Ad-hoc testing
Christian Lamparter [Sat, 18 Oct 2008 21:19:00 +0000 (23:19 +0200)]
p54: AP & Ad-hoc testing

This patch finally adds all necessary code to test Ad-hoc & AP mode with p54.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agop54: put broadcast frames into the right queues
Christian Lamparter [Sat, 18 Oct 2008 21:18:44 +0000 (23:18 +0200)]
p54: put broadcast frames into the right queues

stlc45xx's specs finally brought some light what all the 4 extra queues for.
now CAB data and managment frames have their own queue.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agop54: more definitions form lmac_longbow.h and pda.h
Christian Lamparter [Sat, 18 Oct 2008 21:18:01 +0000 (23:18 +0200)]
p54: more definitions form lmac_longbow.h and pda.h

This patch ports more useful features to p54
  - PDR definitions for the synth chips & regulatory domain.
  - honour IEEE80211_TX_CTL_ASSIGN_SEQ flag, if it's set.
  - adds some lost mutex_lock & mutex_unlock.
  - replace two more "magic values" that sneaked past.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agop54: introduce new names for device firmwares
Christian Lamparter [Sat, 18 Oct 2008 21:04:15 +0000 (23:04 +0200)]
p54: introduce new names for device firmwares

Johannes thought it would have been a good idea to change the firmware names.

Note: we still have fallbacks in case our users don't want to "break their running system",
but we won't advertise them with MODULE_FIRMWARE.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agonetdevice libertas: Fix directly reference of netdev->priv
Wang Chen [Fri, 5 Sep 2008 03:28:47 +0000 (11:28 +0800)]
netdevice libertas: Fix directly reference of netdev->priv

We have some reasons to kill netdev->priv:
1. netdev->priv is equal to netdev_priv().
2. netdev_priv() wraps the calculation of netdev->priv's offset, obviously
   netdev_priv() is more flexible than netdev->priv.
But we cann't kill netdev->priv, because so many drivers reference to it
directly.

OK, becasue Dave S. Miller said, "every direct netdev->priv usage is a bug",
and I want to kill netdev->priv later, I decided to convert all the direct
reference of netdev->priv first.

Different to readonly reference of netdev->priv, in this driver, netdev->priv
was changed. I use netdev->ml_priv to replace netdev->priv.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoBtrfs: tune btrfs unplug functions for a small number of devices
Chris Mason [Mon, 10 Nov 2008 18:08:31 +0000 (13:08 -0500)]
Btrfs: tune btrfs unplug functions for a small number of devices

When btrfs unplugs, it tries to find the correct device to unplug
via search through the extent_map tree.  This avoids unplugging
a device that doesn't need it, but is a waste of time for filesystems
with a small number of devices.

This patch checks the total number of devices before doing the
search.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
17 years agoocfs2: Check search result in ocfs2_xattr_block_get()
Tiger Yang [Sun, 2 Nov 2008 11:04:21 +0000 (19:04 +0800)]
ocfs2: Check search result in ocfs2_xattr_block_get()

ocfs2_xattr_block_get() calls ocfs2_xattr_search() to find an external
xattr, but doesn't check the search result that is passed back via struct
ocfs2_xattr_search. Add a check for search result, and pass back -ENODATA if
the xattr search failed. This avoids a later NULL pointer error.

Signed-off-by: Tiger Yang <tiger.yang@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
17 years agoocfs2: fix printk related build warnings in xattr.c
Mark Fasheh [Wed, 29 Oct 2008 21:45:30 +0000 (14:45 -0700)]
ocfs2: fix printk related build warnings in xattr.c

Signed-off-by: Mark Fasheh <mfasheh@suse.com>
17 years agoocfs2: truncate outstanding block after direct io failure
Dmitri Monakhov [Mon, 27 Oct 2008 20:01:49 +0000 (13:01 -0700)]
ocfs2: truncate outstanding block after direct io failure

Signed-off-by: Dmitri Monakhov <dmonakhov@openvz.org>
Cc: Jeff Moyer <jmoyer@redhat.com>
Cc: Mark Fasheh <mark.fasheh@oracle.com>
Cc: Joel Becker <Joel.Becker@oracle.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
17 years agoocfs2/xattr: Proper hash collision handle in bucket division
Tao Ma [Sun, 26 Oct 2008 22:06:24 +0000 (06:06 +0800)]
ocfs2/xattr: Proper hash collision handle in bucket division

In ocfs2/xattr, we must make sure the xattrs which have the same hash value
exist in the same bucket so that the search schema can work. But in the old
implementation, when we want to extend a bucket, we just move half number of
xattrs to the new bucket. This works in most cases, but if we are lucky
enough we will move 2 xattrs into 2 different buckets. This means that an
xattr from the previous bucket cannot be found anymore. This patch fix this
problem by finding the right position during extending the bucket and extend
an empty bucket if needed.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Cc: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
17 years agoocfs2: return 0 in page_mkwrite to let VFS retry.
Tao Ma [Mon, 6 Oct 2008 08:59:55 +0000 (16:59 +0800)]
ocfs2: return 0 in page_mkwrite to let VFS retry.

In ocfs2_page_mkwrite, we return -EINVAL when we found the page mapping
isn't updated, and it will cause the user space program get SIGBUS and
exit. The reason is that during race writeable mmap, we will do
unmap_mapping_range in ocfs2_data_downconvert_worker. The good thing is
that if we reuturn 0 in page_mkwrite, VFS will retry fault and then
call page_mkwrite again, so it is safe to return 0 here.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
17 years agoocfs2: Set journal descriptor to NULL after journal shutdown
Sunil Mushran [Wed, 22 Oct 2008 20:24:29 +0000 (13:24 -0700)]
ocfs2: Set journal descriptor to NULL after journal shutdown

Patch sets journal descriptor to NULL after the journal is shutdown.
This ensures that jbd2_journal_release_jbd_inode(), which removes the
jbd2 inode from txn lists, can be called safely from ocfs2_clear_inode()
even after the journal has been shutdown.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
17 years agoocfs2: Fix check of return value of ocfs2_start_trans() in xattr.c.
Tao Ma [Thu, 23 Oct 2008 23:57:28 +0000 (07:57 +0800)]
ocfs2: Fix check of return value of ocfs2_start_trans() in xattr.c.

On failure, ocfs2_start_trans() returns values like ERR_PTR(-ENOMEM),
so we should check whether handle is NULL. Fix them to use IS_ERR().
Jan has made the patch for other part in ocfs2(thank Jan for it), so
this is just the fix for fs/ocfs2/xattr.c.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
17 years agoocfs2: Let inode be really deleted when ocfs2_mknod_locked() fails
Jan Kara [Mon, 20 Oct 2008 17:23:54 +0000 (19:23 +0200)]
ocfs2: Let inode be really deleted when ocfs2_mknod_locked() fails

We forgot to set i_nlink to 0 when returning due to error from ocfs2_mknod_locked()
and thus inode was not properly released via ocfs2_delete_inode() (e.g. claimed
space was not released). Fix it.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
17 years agoocfs2: Fix checking of return value of new_inode()
Jan Kara [Mon, 20 Oct 2008 17:23:53 +0000 (19:23 +0200)]
ocfs2: Fix checking of return value of new_inode()

new_inode() does not return ERR_PTR() but NULL in case of failure. Correct
checking of the return value.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
17 years agoocfs2: Fix check of return value of ocfs2_start_trans()
Jan Kara [Mon, 20 Oct 2008 17:23:51 +0000 (19:23 +0200)]
ocfs2: Fix check of return value of ocfs2_start_trans()

On failure, ocfs2_start_trans() returns values like ERR_PTR(-ENOMEM).
Thus checks for !handle are wrong. Fix them to use IS_ERR().

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>