safe/jmp/linux-2.6
14 years agodrivers/isdn/gigaset: tasklet_init - Remove unnecessary leading & from second arg
Joe Perches [Thu, 19 Nov 2009 09:55:53 +0000 (09:55 +0000)]
drivers/isdn/gigaset: tasklet_init - Remove unnecessary leading & from second arg

Changed function pointer use from non-majority address-of style
to majority short form without & via:

grep -rPl "\btasklet_init\s*\([^,\)]+,\s*\&" drivers/isdn | while read file ; do \
        perl -i -e 'local $/; while (<>) { s@(\btasklet_init\s*\([^,\)]+,\s*)\&@\1@g ; print ; }' $file ;\
done

Compile tested allyesconfig x86

Signed-off-by: Joe Perches <joe@perches.com>
 drivers/isdn/gigaset/bas-gigaset.c |    4 ++--
 drivers/isdn/gigaset/common.c      |    2 +-
 drivers/isdn/gigaset/interface.c   |    2 +-
 drivers/isdn/gigaset/ser-gigaset.c |    2 +-
 drivers/isdn/gigaset/usb-gigaset.c |    2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomac80211: fix endianess on mesh_path_error_tx() calls
Rui Paulo [Thu, 19 Nov 2009 15:49:10 +0000 (15:49 +0000)]
mac80211: fix endianess on mesh_path_error_tx() calls

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: add per-station HT capability file
Johannes Berg [Thu, 19 Nov 2009 13:26:11 +0000 (14:26 +0100)]
mac80211: add per-station HT capability file

This is sometimes useful to debug HT issues
as it shows what exactly the stack thinks
the peer supports.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: avoid spurious deauth frames/messages
Johannes Berg [Thu, 19 Nov 2009 11:45:42 +0000 (12:45 +0100)]
mac80211: avoid spurious deauth frames/messages

With WEXT, it happens frequently that the SME
requests an authentication but then deauthenticates
right away because some new parameters came along.
Every time this happens we print a deauth message
and send a deauth frame, but both of that is rather
confusing. Avoid it by aborting the authentication
process silently, and telling cfg80211 about that.

The patch looks larger than it really is:
__cfg80211_auth_remove() is split out from
cfg80211_send_auth_timeout(), there's no new code
except __cfg80211_auth_canceled() (a one-liner) and
the mac80211 bits (7 new lines of code).

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: request TX status where needed
Johannes Berg [Thu, 19 Nov 2009 00:08:30 +0000 (01:08 +0100)]
mac80211: request TX status where needed

Right now all frames mac80211 hands to the driver
have the IEEE80211_TX_CTL_REQ_TX_STATUS flag set to
request TX status. This isn't really necessary, only
the injected frames need TX status (the latter for
hostapd) so move setting this flag.

The rate control algorithms also need TX status, but
they don't require it.

Also, rt2x00 uses that bit for its own purposes and
seems to require it being set for all frames, but
that can be fixed in rt2x00.

This doesn't really change anything for any drivers
but in the future drivers using hw-rate control may
opt to not report TX status for frames that don't
have the IEEE80211_TX_CTL_REQ_TX_STATUS flag set.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com> [rt2x00 bits]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: disallow bridging managed/adhoc interfaces
Johannes Berg [Wed, 18 Nov 2009 23:56:30 +0000 (00:56 +0100)]
cfg80211: disallow bridging managed/adhoc interfaces

A number of people have tried to add a wireless interface
(in managed mode) to a bridge and then complained that it
doesn't work. It cannot work, however, because in 802.11
networks all packets need to be acknowledged and as such
need to be sent to the right address. Promiscuous doesn't
help here. The wireless address format used for these
links has only space for three addresses, the
 * transmitter, which must be equal to the sender (origin)
 * receiver (on the wireless medium), which is the AP in
   the case of managed mode
 * the recipient (destination), which is on the APs local
   network segment

In an IBSS, it is similar, but the receiver and recipient
must match and the third address is used as the BSSID.

To avoid such mistakes in the future, disallow adding a
wireless interface to a bridge.

Felix has recently added a four-address mode to the AP
and client side that can be used (after negotiating that
it is possible, which must happen out-of-band by setting
up both sides) for bridging, so allow that case.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: introduce capability for 4addr mode
Johannes Berg [Thu, 19 Nov 2009 10:55:19 +0000 (11:55 +0100)]
cfg80211: introduce capability for 4addr mode

It's very likely that not many devices will support
four-address mode in station or AP mode so introduce
capability bits for both modes, set them in mac80211
and check them when userspace tries to use the mode.
Also, keep track of 4addr in cfg80211 (wireless_dev)
and not in mac80211 any more. mac80211 can also be
improved for the VLAN case by not looking at the
4addr flag but maintaining the station pointer for
it correctly. However, keep track of use_4addr for
station mode in mac80211 to avoid all the derefs.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: convert bools into flags
Johannes Berg [Wed, 18 Nov 2009 23:56:28 +0000 (00:56 +0100)]
cfg80211: convert bools into flags

We've accumulated a number of options for wiphys
which make more sense as flags as we keep adding
more. Convert the existing ones.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoX25: Enable setting of cause and diagnostic fields
Andrew Hendry [Thu, 19 Nov 2009 07:30:41 +0000 (23:30 -0800)]
X25: Enable setting of cause and diagnostic fields

Adds SIOCX25SCAUSEDIAG, allowing X.25 programs to set the cause and
diagnostic fields.

Normally used to indicate status upon closing connections.

Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoiwmc3200top: revamp fw name handling
Tomas Winkler [Thu, 19 Nov 2009 07:29:57 +0000 (23:29 -0800)]
iwmc3200top: revamp fw name handling

1. define macro for handling firmware api version
2. add MODULE_FIRMWARE
3. cleanup iwmct_fw_load style

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net: request_irq - Remove unnecessary leading & from second arg
Joe Perches [Thu, 19 Nov 2009 07:29:17 +0000 (23:29 -0800)]
drivers/net: request_irq - Remove unnecessary leading & from second arg

Not as fancy as coccinelle.  Checkpatch errors ignored.
Compile tested allyesconfig x86, not all files compiled.

grep -rPl --include=*.[ch] "\brequest_irq\s*\([^,\)]+,\s*\&" drivers/net | while read file ; do \
perl -i -e 'local $/; while (<>) { s@(\brequest_irq\s*\([^,\)]+,\s*)\&@\1@g ; print ; }' $file ;\
done

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetsched: Allow var_sk_bound_if meta to work on all namespaces
Eric Dumazet [Thu, 19 Nov 2009 07:24:41 +0000 (23:24 -0800)]
netsched: Allow var_sk_bound_if meta to work on all namespaces

This fix can probably wait 2.6.33, or should use another patch
if needed in 2.6.32 (no get_dev_by_index_rcu() before 2.6.33)

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Thu, 19 Nov 2009 06:19:03 +0000 (22:19 -0800)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

Conflicts:
drivers/net/sfc/sfe4001.c
drivers/net/wireless/libertas/cmd.c
drivers/staging/Kconfig
drivers/staging/Makefile
drivers/staging/rtl8187se/Kconfig
drivers/staging/rtl8192e/Kconfig

14 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
Linus Torvalds [Thu, 19 Nov 2009 02:49:49 +0000 (18:49 -0800)]
Merge branch 'fixes' of git://git./linux/kernel/git/davej/cpufreq

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
  [CPUFREQ] Fix stale cpufreq_cpu_governor pointer
  [CPUFREQ] Resolve time unit thinko in ondemand/conservative govs
  [CPUFREQ] speedstep-ich: fix error caused by 394122ab144dae4b276d74644a2f11c44a60ac5c
  [CPUFREQ] Fix use after free on governor restore
  [CPUFREQ] acpi-cpufreq: blacklist Intel 0f68: Fix HT detection and put in notification message
  [CPUFREQ] powernow-k8: Fix test in get_transition_latency()
  [CPUFREQ] longhaul: select Longhaul version 2 for capable CPUs

14 years agostrcmp: fix overflow and possibly signedness error
Linus Torvalds [Wed, 18 Nov 2009 21:31:52 +0000 (22:31 +0100)]
strcmp: fix overflow and possibly signedness error

Doing the strcmp return value as

signed char __res = *cs - *ct;

is wrong for two reasons.  The subtraction can overflow because __res
doesn't use a type big enough.  Moreover the compared bytes should be
interpreted as unsigned char as specified by POSIX.

The same problem is fixed in strncmp.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Michael Buesch <mb@bu3sch.de>
Cc: Andreas Schwab <schwab@linux-m68k.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'agp-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Thu, 19 Nov 2009 01:08:16 +0000 (17:08 -0800)]
Merge branch 'agp-fixes' of git://git./linux/kernel/git/airlied/agp-2.6

* 'agp-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/agp-2.6:
  agp/intel-agp: Set dma_mask for capable chipsets before agp_add_bridge()

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Thu, 19 Nov 2009 00:58:34 +0000 (16:58 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/security-testing-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
  ima: replace GFP_KERNEL with GFP_NOFS

14 years agoagp/intel-agp: Set dma_mask for capable chipsets before agp_add_bridge()
David Woodhouse [Wed, 18 Nov 2009 10:22:46 +0000 (10:22 +0000)]
agp/intel-agp: Set dma_mask for capable chipsets before agp_add_bridge()

We should set this before calling agp_add_bridge() so that it's done
before we map the scratch page too.

This should probably fix the regression reported as k.o. bug #14627.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agoMerge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 18 Nov 2009 23:00:21 +0000 (15:00 -0800)]
Merge branch 'omap-fixes-for-linus' of git://git./linux/kernel/git/tmlind/linux-omap-2.6

* 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6:
  OMAP: cs should be positive in gpmc_cs_free()
  omap: fix unlikely(x) < y
  omap3: clock: Fixed dpll3_m2x2 rate calculation
  omap3: clock: Fix the DPLL freqsel computations
  omap: Fix keymap for zoom2 according to matrix keypad framwork

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Wed, 18 Nov 2009 22:59:49 +0000 (14:59 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ASoC: tlv320aic23 fix rate selection
  ASoC: OMAP3 Pandora: update for TWL4030 codec changes
  ASoC: Modifying the license string GPLv2 for OMAP3 EVM
  ALSA: hda - Fix quirk for VAIO type G
  ALSA: usb - Quirk to disable master volume control in PCM2702

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Wed, 18 Nov 2009 22:54:45 +0000 (14:54 -0800)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (42 commits)
  cxgb3: fix premature page unmap
  ibm_newemac: Fix EMACx_TRTR[TRT] bit shifts
  vlan: Fix register_vlan_dev() error path
  gro: Fix illegal merging of trailer trash
  sungem: Fix Serdes detection.
  net: fix mdio section mismatch warning
  ppp: fix BUG on non-linear SKB (multilink receive)
  ixgbe: Fixing EEH handler to handle more than one error
  net: Fix the rollback test in dev_change_name()
  Revert "isdn: isdn_ppp: Use SKB list facilities instead of home-grown implementation."
  TI Davinci EMAC : Fix Console Hang when bringing the interface down
  smsc911x: Fix Console Hang when bringing the interface down.
  mISDN: fix error return in HFCmulti_init()
  forcedeth: mac address fix
  r6040: fix version printing
  Bluetooth: Fix regression with L2CAP configuration in Basic Mode
  Bluetooth: Select Basic Mode as default for SOCK_SEQPACKET
  Bluetooth: Set general bonding security for ACL by default
  r8169: Fix receive buffer length when MTU is between 1515 and 1536
  can: add the missing netlink get_xstats_size callback
  ...

14 years agob43: Enforce DMA descriptor memory constraints
Michael Buesch [Wed, 18 Nov 2009 19:53:05 +0000 (20:53 +0100)]
b43: Enforce DMA descriptor memory constraints

Enforce all device constraints on the descriptor memory region.

There are several constraints on the descriptor memory, as documented
in the specification. The current code does not enforce them and/or
incorrectly enforces them.

Those constraints are:
- The address limitations on 30/32bit engines, that also apply to
  the skbs.
- The 4k alignment requirement on 30/32bit engines.
- The 8k alignment requirement on 64bit engines.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: update cfg80211 scan result code for the updated mesh conf IE
Rui Paulo [Wed, 18 Nov 2009 18:22:59 +0000 (18:22 +0000)]
mac80211: update cfg80211 scan result code for the updated mesh conf IE

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: use a structure to hold the mesh config information element
Rui Paulo [Wed, 18 Nov 2009 18:40:00 +0000 (18:40 +0000)]
mac80211: use a structure to hold the mesh config information element

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: move TX status handling
Johannes Berg [Wed, 18 Nov 2009 17:42:47 +0000 (18:42 +0100)]
mac80211: move TX status handling

It's enough code to have its own file, I think.
Especially since I'm going to add to it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: remove encrypt parameter from ieee80211_tx_skb
Johannes Berg [Wed, 18 Nov 2009 17:42:05 +0000 (18:42 +0100)]
mac80211: remove encrypt parameter from ieee80211_tx_skb

Since the flags moved into skb->cb, there's no
longer a need to have the encrypt bool passed
into the function, anyone who requires it set
to 0 (false) can just set the flag directly.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agorfkill: Add constant for RFKILL_TYPE_FM radio devices
Marcel Holtmann [Wed, 18 Nov 2009 15:48:01 +0000 (16:48 +0100)]
rfkill: Add constant for RFKILL_TYPE_FM radio devices

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Janakiram Sistla <janakiram.sistla@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agorfkill: Add missing description for RFKILL_TYPE_GPS
Marcel Holtmann [Wed, 18 Nov 2009 15:48:00 +0000 (16:48 +0100)]
rfkill: Add missing description for RFKILL_TYPE_GPS

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Janakiram Sistla <janakiram.sistla@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl3501_cs: remove pedantic build warning
John W. Linville [Wed, 18 Nov 2009 21:37:22 +0000 (16:37 -0500)]
wl3501_cs: remove pedantic build warning

drivers/net/wireless/wl3501_cs.c: In function ‘wl3501_esbq_exec’:
drivers/net/wireless/wl3501_cs.c:387: warning: ‘tmp’ is used uninitialized in this function
drivers/net/wireless/wl3501_cs.c:384: note: ‘tmp’ was declared here

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: re-join IBSS when privacy changes
Johannes Berg [Wed, 18 Nov 2009 12:03:43 +0000 (13:03 +0100)]
cfg80211: re-join IBSS when privacy changes

When going from/to a WEP protected IBSS, we need to
leave this one and join a new one to take care of
the changed capability.

Cc: Hong Zhang <henryzhang62@yahoo.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Fix panic in aggregation handling
Sujith [Wed, 18 Nov 2009 06:12:14 +0000 (11:42 +0530)]
mac80211: Fix panic in aggregation handling

Not assigning the vif pointer causes an oops.
This patch fixes it.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: Allow reassociation in associated state
Jouni Malinen [Tue, 17 Nov 2009 19:35:38 +0000 (21:35 +0200)]
cfg80211: Allow reassociation in associated state

cfg80211 rejects all association requests when in associated state. This
prevents clean roaming within an ESS since one would first need to
disassociate before being able to request reassociation.

Accept the reassociation request and let the old association to be
dropped when the new one is completed. This fixes nl80211-based
roaming with the current snapshot version of wpa_supplicant (that has
code for requesting reassociation explicitly withthe previous BSSID
attribute).

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: make software rate control optional
Johannes Berg [Tue, 17 Nov 2009 17:18:36 +0000 (18:18 +0100)]
mac80211: make software rate control optional

Some devices implement the entire rate control in
firmware in some way, like wl1271 or like iwlwifi
which does some things in software but not a lot.
Therefore generic software rate control is rather
useless for them and just adds avoidable overhead
to the transmit path.

It's fairly simple to let drivers indicate that
they do not need rate control, but they need to
fulfil a number of conditions that we encode in
WARN_ONs.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: add NVS in EEPROM support
David-John Willis [Tue, 17 Nov 2009 16:50:09 +0000 (18:50 +0200)]
wl1251: add NVS in EEPROM support

wl1251 supports also that NVS is stored in a separate EEPROM, add support
for that.

kvalo: use platform data instead Kconfig and use kernel style

Signed-off-by: David-John Willis <John.Willis@Distant-earth.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: remove depcreated qual usage
Kalle Valo [Tue, 17 Nov 2009 16:50:01 +0000 (18:50 +0200)]
wl1251: remove depcreated qual usage

Fixes warnings:

drivers/net/wireless/wl12xx/wl1251_rx.c: In function 'wl1251_rx_status':
drivers/net/wireless/wl12xx/wl1251_rx.c:75:
  warning: 'qual' is deprecated (declared at include/net/mac80211.h:555)
drivers/net/wireless/wl12xx/wl1251_rx.c:77:
  warning: 'qual' is deprecated (declared at include/net/mac80211.h:555)
drivers/net/wireless/wl12xx/wl1251_rx.c:77:
  warning: 'qual' is deprecated (declared at include/net/mac80211.h:555)
drivers/net/wireless/wl12xx/wl1251_rx.c:77:
  warning: 'qual' is deprecated (declared at include/net/mac80211.h:555)
drivers/net/wireless/wl12xx/wl1251_rx.c:78:
  warning: 'qual' is deprecated (declared at include/net/mac80211.h:555)
drivers/net/wireless/wl12xx/wl1251_rx.c:78:
  warning: 'qual' is deprecated (declared at include/net/mac80211.h:555)
drivers/net/wireless/wl12xx/wl1251_rx.c:78:
  warning: 'qual' is deprecated (declared at include/net/mac80211.h:555)

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: Send null data packet with "TODS" bit set
Vidhya Govindan [Tue, 17 Nov 2009 16:49:54 +0000 (18:49 +0200)]
wl1251: Send null data packet with "TODS" bit set

According to IEEE80211 standard all the data packets have to be sent with
TODS bit set. This patch fixes the null data packet format which was sent
without TODS bit set. This should fix many problems associated with
power save. Janne Ylalehto also found this fix in the same time as mine,
for a different bug he was working on.

Signed-off-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Reviewed-by: Janne Ylalehto <janne.ylalehto@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: Fix regression in IRQ loop handling
Juuso Oikarinen [Tue, 17 Nov 2009 16:49:46 +0000 (18:49 +0200)]
wl1251: Fix regression in IRQ loop handling

In some cases, the IRQ loop handler could acknowledge an interrupt to
the chipset, but not service it.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Janne Ylalehto <janne.ylalehto@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: Filter out unwanted events
Janne Ylalehto [Tue, 17 Nov 2009 16:49:38 +0000 (18:49 +0200)]
wl1251: Filter out unwanted events

Filter out unwanted events to reduce wakeups.

Signed-off-by: Janne Ylalehto <janne.ylalehto@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: Add IRQ looping support
Janne Ylalehto [Tue, 17 Nov 2009 16:49:31 +0000 (18:49 +0200)]
wl1251: Add IRQ looping support

Add support for IRQ looping. Helps in the case that we have e.g. multiple
packets coming from the network when we wake up from the ELP.

Signed-off-by: Janne Ylalehto <janne.ylalehto@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: Increase the beacon loss timeout value and handle regain event
Vidhya Govindan [Tue, 17 Nov 2009 16:49:23 +0000 (18:49 +0200)]
wl1251: Increase the beacon loss timeout value and handle regain event

This patch increases the number of beacons to be missed before generating
SYNC TIMEOUT event. It increases the beacon timeout period to 500
microseconds, which gives enough time for the firmware to receive probe
response or beacon. Also handled the regain event from firmware once it
receives a probe response or beacon.

Signed-off-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Reviewed-by: Janne Ylalehto <janne.ylalehto@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: Set the correct dtim period to the firmware
Vidhya Govindan [Tue, 17 Nov 2009 16:49:16 +0000 (18:49 +0200)]
wl1251: Set the correct dtim period to the firmware

This patch sets the dtim period obtained from the mac80211 to firmware.

Signed-off-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Reviewed-by: Janne Ylalehto <janne.ylalehto@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: Add acx command to set tbtt and dtim period
Vidhya Govindan [Tue, 17 Nov 2009 16:49:08 +0000 (18:49 +0200)]
wl1251: Add acx command to set tbtt and dtim period

The dtim period obtained from the mac80211 is not set to the firmware.
This patch implements the acx command to set correct tbtt and dtim value
to the firmware.

Signed-off-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Janne Ylalehto <janne.ylalehto@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: mask aid bits 14 and 15 in ps-poll template
Kalle Valo [Tue, 17 Nov 2009 16:49:00 +0000 (18:49 +0200)]
wl1251: mask aid bits 14 and 15 in ps-poll template

In ps-poll template aid bits 14 and 15 were not masked as required by the
standard. Mask them so that aid is sent in correct format.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: allocate space for firmware with vmalloc()
Kalle Valo [Tue, 17 Nov 2009 16:48:45 +0000 (18:48 +0200)]
wl1251: allocate space for firmware with vmalloc()

Earlier firmware was stored to a memory area allocated with kmalloc()
but finding a a contiguous area of memory long enough for the firmware is
very difficult in certain cases. better to allocate the memory for firmware
with vmalloc() instead and use a small buffer for DMA transfers.

Thanks to Eero Tamminen for the idea.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: Implement delayed entry into ELP mode
Juuso Oikarinen [Tue, 17 Nov 2009 16:48:37 +0000 (18:48 +0200)]
wl1251: Implement delayed entry into ELP mode

Implement (slightly) delayed entry into ELP. This will cure several
problems:
  - It works around a firmware race condition if ELP is entered too fast
    after commands (resulting in ELP timeout -traces)
  - It will reduce the number of sleep-wake cycles between already
    scheduled events such as interrupts and tx, hence improving
    performance (less delay in switching between RX and TX)

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: Configure beacon filtering on if PSM used
Juuso Oikarinen [Tue, 17 Nov 2009 16:48:30 +0000 (18:48 +0200)]
wl1251: Configure beacon filtering on if PSM used

Enable beacon filtering when PSM is enabled

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: Enable beacon filtering with the stack
Juuso Oikarinen [Tue, 17 Nov 2009 16:48:23 +0000 (18:48 +0200)]
wl1251: Enable beacon filtering with the stack

Enable beacon filtering with the mac80211 stack.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: Add connection monitoring configuration
Juuso Oikarinen [Tue, 17 Nov 2009 16:48:14 +0000 (18:48 +0200)]
wl1251: Add connection monitoring configuration

Add configuration for connection monitor (number of allowed beacons, and
timeout after last received beacon.)

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoar9170: Add support for D-Link DWA 160 A2
Thomas Klute [Tue, 17 Nov 2009 10:58:18 +0000 (11:58 +0100)]
ar9170: Add support for D-Link DWA 160 A2

At least two revisions of the D-Link DWA 160 exist, called A1 and A2. A1
(USB-ID 07d1:3c10) is already listed in usb.c as D-Link DWA 160A. A2
(USB-ID 07d1:3a09) works if added to ar9170_usb_ids. I didn't do much
testing until now, but I was able to connect to APs using WPA or WEP and
transmit data.

Summary:

* Add model revision number to the comment for D-Link DWA 160 A1 (07d1:3c10)
* Add support for D-Link DWA 160 A2 (07d1:3a09)

Signed-off-by: Thomas Klute <thomas2.klute@uni-dortmund.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: more ids to rt2800usb.c
Xose Vazquez Perez [Tue, 17 Nov 2009 12:43:16 +0000 (13:43 +0100)]
rt2x00: more ids to rt2800usb.c

taken from windows inf file (09/15/2009, 1.04.07.0000)

Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: use fixed broadcast address
Johannes Berg [Tue, 17 Nov 2009 12:34:04 +0000 (13:34 +0100)]
mac80211: use fixed broadcast address

The netdev broadcast address cannot change from
all-ones so there's no need to use it; we can
instead hard-code it. Since we already have an
instance in tkip.c, which will be shared if it
is marked static const, doing this reduces text
size at no data/bss cost.

The real motivation for this is, of course, the
desire to get rid of almost all uses of netdevs
in mac80211 so that auditing their use becomes
easier.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: remove dev_hold/put calls
Johannes Berg [Mon, 16 Nov 2009 22:20:41 +0000 (23:20 +0100)]
mac80211: remove dev_hold/put calls

If we move the rcu sections a little, there's
no need to touch the device refcount.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: improve rate handling
Johannes Berg [Mon, 16 Nov 2009 12:58:21 +0000 (13:58 +0100)]
mac80211: improve rate handling

Some code currently assumes that there's a valid
rate pointer even in the HT case, but there can't
be. To reduce reliance on that, remove the rate
pointer from the RX data struct and pass it where
it's needed.

Also, for now, in radiotap announce HT frames as
having a DYN channel type, and remove their rate
from cooked monitor radiotap completely (it isn't
present in the regular monitor radiotap either.)

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: trim RX data
Johannes Berg [Mon, 16 Nov 2009 12:58:20 +0000 (13:58 +0100)]
mac80211: trim RX data

The RX data contains the netdev, which is
duplicated since we have the sdata, and the
RX status pointer, which is duplicate since
we have the skb. Remove those two fields to
have fewer fields that depend on each other
and simply load them as necessary.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: cleanup reorder buffer handling
Johannes Berg [Mon, 16 Nov 2009 11:00:40 +0000 (12:00 +0100)]
mac80211: cleanup reorder buffer handling

The reorder buffer handling is written in a quite
peculiar style (especially comments) and also has
a quirk where it invokes the entire reorder code
in ieee80211_sta_manage_reorder_buf() for just a
handful of lines in it with a special argument.

Split out ieee80211_release_reorder_frames which
can then be invoked from BAR handling and other
reordering code, clean up code and comments and
remove function arguments that are now unused from
ieee80211_sta_manage_reorder_buf().

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: push michael MIC report after DA check
Johannes Berg [Mon, 16 Nov 2009 11:00:39 +0000 (12:00 +0100)]
mac80211: push michael MIC report after DA check

When we receive a michael MIC failure report from the
hardware we currently do not check whether it is actually
reported on a frame that is destined to us. It shouldn't
be possible to get a michael MIC failure report on other
frames, but it also doesn't hurt to verify.

Also, since we then don't need the station struct that
early, move looking it up a bit later in the RX path.

Finally, while at it, a few code cleanups in the area.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: convert aggregation to operate on vifs/stas
Johannes Berg [Mon, 16 Nov 2009 11:00:38 +0000 (12:00 +0100)]
mac80211: convert aggregation to operate on vifs/stas

The entire aggregation code currently operates on the
hw pointer and station addresses, but that needs to
change to make stations purely per-vif; As one step
preparing for that make the aggregation code callable
with the station, or by the combination of virtual
interface and station address.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: let sta_info_get_by_idx get sta by sdata
Johannes Berg [Mon, 16 Nov 2009 11:00:37 +0000 (12:00 +0100)]
mac80211: let sta_info_get_by_idx get sta by sdata

Instead of filtering by device, directly look up by sdata.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Fix bug in initializing chain masks
Sujith [Mon, 16 Nov 2009 06:10:57 +0000 (11:40 +0530)]
ath9k: Fix bug in initializing chain masks

Check for AR5416 ver 1.0 before calibrating 3 chains
for multi-chain. This is a WAR for calibration
failure.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Remove a few unused functions
Sujith [Mon, 16 Nov 2009 06:10:53 +0000 (11:40 +0530)]
ath9k: Remove a few unused functions

ATH9K_ANT_VARIABLE is the default diversity control used.
Consequently ath9k_hw_decrease_chain_power() does nothing.
ath9k_hw_setantennaswitch() is unused too.

Also, gbeacon_rate is unused.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Remove a few unused variables
Sujith [Mon, 16 Nov 2009 06:10:51 +0000 (11:40 +0530)]
ath9k: Remove a few unused variables

axq_linkbuf, axq_aggr_depth, axq_lastdsWithCTS and
axq_gatingds are unused.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Cleanup bss_info_changed callback
Sujith [Mon, 16 Nov 2009 06:10:48 +0000 (11:40 +0530)]
ath9k: Cleanup bss_info_changed callback

* Remove a code chunk dealing with operating mode changes.
  As noted, all such policy changes are to be done in
  add_interface.

* Remove pointless check for empty BSSID.
  Also, remove mode checks - mac80211 does all the needed checks.

* Handle enabling/disabling beacon transmission properly.

* Handle beacon interval changes for AP mode.
  The original code depended on config_interface() to update
  the HW TSF. Since that callback has been removed, handle
  it properly.

* Remove unneeded code dealing with key/privacy.

* Set the chainmasks to 1x1 for IBSS when the BSSID is set.
  This was happening uncondionally before.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: get rid of tx_info_priv
Felix Fietkau [Sun, 15 Nov 2009 22:09:25 +0000 (23:09 +0100)]
ath9k: get rid of tx_info_priv

This patch removes the need for separately allocated private tx info
data in ath9k and brings the driver one small step closer to using the
mac80211 rate control API properly.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: add the total ampdu length to tx info
Felix Fietkau [Sun, 15 Nov 2009 22:07:30 +0000 (23:07 +0100)]
mac80211: add the total ampdu length to tx info

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: reduce the amount of unnecessary traffic on cooked monitor interfaces
Felix Fietkau [Sat, 14 Nov 2009 02:29:38 +0000 (03:29 +0100)]
mac80211: reduce the amount of unnecessary traffic on cooked monitor interfaces

In order to handle association and authentication in AP mode,
hostapd needs access to the tx status info of its own frames
through a cooked monitor interface. Without this patch the
cooked monitor interfaces also passed on tx status information
for packets from other virtual interfaces. This creates a
significant performance issue on embedded system. Hostapd
tries to work around this by installing a Linux Socket Filter
that only captures the frames it's interested in, however
data duplication and socket filter matching still uses up
enough CPU cycles to be very noticeable on small systems.
This patch ensures that tx status information of non-injected
frames does not make it to cooked monitor interfaces.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoar9170: do not discard valuable DUPOFDM frames
Christian Lamparter [Fri, 13 Nov 2009 23:57:58 +0000 (00:57 +0100)]
ar9170: do not discard valuable DUPOFDM frames

This patch enables the driver to process all incoming
dupofdm-modulated frames when operating in HT40 mode.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: Add comments about CSR registers
Ben Cahill [Fri, 13 Nov 2009 19:56:38 +0000 (11:56 -0800)]
iwlwifi: Add comments about CSR registers

Also regroup CSR_EEPROM and CSR_OTP bit field definitions.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: handle unicast PS buffering
Johannes Berg [Fri, 13 Nov 2009 19:56:37 +0000 (11:56 -0800)]
iwlwifi: handle unicast PS buffering

Using the new mac80211 functionality, this makes
iwlwifi handle unicast PS buffering correctly.
The device works like this:

 * when a station goes to sleep, the microcode notices
   this and marks the station as asleep
 * when the station is marked asleep, the microcode
   refuses to transmit to the station and rejects all
   frames queued to it with the failure status code
   TX_STATUS_FAIL_DEST_PS (a previous patch handled
   this correctly)
 * when we need to send frames to the station _although_
   it is asleep, we need to tell the ucode how many,
   and this is asynchronous with sending so we cannot
   just send the frames, we need to wait for all other
   frames to be flushed, and then update the counter
   before sending out the poll response frames. This
   is handled partially in the driver and partially in
   mac80211.

In order to do all this correctly, we need to
 * keep track of how many frames are pending for each
   associated client station (avoid doing it for other
   stations to avoid the atomic ops)
 * tell mac80211 that we driver-block the PS status
   while there are still frames pending on the queues,
   and once they are all rejected (due to the dest sta
   being in PS) unblock mac80211

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: add sleep_tx_count ucode station API
Johannes Berg [Fri, 13 Nov 2009 19:56:36 +0000 (11:56 -0800)]
iwlwifi: add sleep_tx_count ucode station API

This field was marked as reserved before since we didn't
use it, but is present in all released firmwares afaict.
We're going to need it soon, so add it now.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: report PS filtered status
Johannes Berg [Fri, 13 Nov 2009 19:56:35 +0000 (11:56 -0800)]
iwlwifi: report PS filtered status

When a frame is sent to a sleeping station, the
microcode reports TX_STATUS_FAIL_DEST_PS as its
status -- we need to translate that to the flag
that mac80211 expects.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: make iwlwifi send beacons
Daniel C Halperin [Fri, 13 Nov 2009 19:56:34 +0000 (11:56 -0800)]
iwlwifi: make iwlwifi send beacons

Handle BSS_CHANGED_BEACON_ENABLED to enable the sending
of beacons. Also set the correct HT RXON and QoS config.

Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: fix bugs in beacon configuration
Daniel C Halperin [Fri, 13 Nov 2009 19:56:33 +0000 (11:56 -0800)]
iwlwifi: fix bugs in beacon configuration

When sending beacon commands to the uCode, we must
inform it of the offset in the beacon frame of the
TIM Element so it can transmit packets from the
correct queue. This functionality is implemented
in iwl_set_beacon_tim().

Fix a bug setting the rate_n_flags for the beacon
packet. First, it should not use the station table's
rate (it's a management frame), and second it needs
to properly configure the TX antennas.

Finally, also, clean up and comment relevant functions.

Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlagn: power up device before initializing EEPROM
Reinette Chatre [Fri, 13 Nov 2009 19:56:32 +0000 (11:56 -0800)]
iwlagn: power up device before initializing EEPROM

A recent change optimized the power usage by the device by only powering it
up during EEPROM load if it is required (for OTP devices). This change causes
an error on the 1000 series devices during module load.

The error looks as follows:
[ 1624.024524] iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, 1.3.27kds
[ 1624.024527] iwlagn: Copyright(c) 2003-2009 Intel Corporation
[ 1624.024711] iwlagn 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 1624.024749] iwlagn 0000:01:00.0: setting latency timer to 64
[ 1624.024909] iwlagn 0000:01:00.0: Detected Intel Wireless WiFi Link 1000 Series BGN REV=0x6C
[ 1624.081263] iwlagn 0000:01:00.0: MAC is in deep sleep!.  CSR_GP_CNTRL = 0x080003D8
[ 1624.092967] iwlagn 0000:01:00.0: OTP is empty
[ 1624.092988] iwlagn 0000:01:00.0: Unable to init EEPROM
[ 1624.093033] iwlagn 0000:01:00.0: PCI INT A disabled
[ 1624.093065] iwlagn: probe of 0000:01:00.0 failed with error -2

Adding a dump_stack() to where that error is printed shows the following:

[ 1624.024524] iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, 1.3.27kds
[ 1624.024527] iwlagn: Copyright(c) 2003-2009 Intel Corporation
[ 1624.024711] iwlagn 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 1624.024749] iwlagn 0000:01:00.0: setting latency timer to 64
[ 1624.024909] iwlagn 0000:01:00.0: Detected Intel Wireless WiFi Link 1000 Series BGN REV=0x6C
[ 1624.081263] iwlagn 0000:01:00.0: MAC is in deep sleep!.  CSR_GP_CNTRL = 0x080003D8
[ 1624.081263] Pid: 3073, comm: work_for_cpu Tainted: G        W 2.6.31.5 #4
[ 1624.081263] Call Trace:
[ 1624.081263]  [<ffffffffa02395db>] T.726+0x22b/0x420 [iwlcore]
[ 1624.081263]  [<ffffffffa023985a>] iwlcore_eeprom_acquire_semaphore+0x8a/0x190 [iwlcore]
[ 1624.081263]  [<ffffffff81110c94>] ? __kmalloc+0x194/0x1c0
[ 1624.081263]  [<ffffffffa02391f5>] ?  iwlcore_eeprom_verify_signature+0x25/0xf0 [iwlcore]
[ 1624.081263]  [<ffffffffa0239c67>] iwl_eeprom_init+0x107/0xf40 [iwlcore]
[ 1624.081263]  [<ffffffffa026ab9c>] ?  iwl_prepare_card_hw+0x11c/0x470 [iwlagn]
[ 1624.081263]  [<ffffffff8127e2a4>] ?  pci_bus_write_config_byte+0x64/0x80
[ 1624.081263]  [<ffffffffa026b1f8>] iwl_pci_probe+0x308/0xac0 [iwlagn]
[ 1624.081263]  [<ffffffff810710a0>] ? do_work_for_cpu+0x0/0x30
[ 1624.081263]  [<ffffffff81284912>] local_pci_probe+0x12/0x20
[ 1624.081263]  [<ffffffff810710b3>] do_work_for_cpu+0x13/0x30
[ 1624.081263]  [<ffffffff81075826>] kthread+0xa6/0xb0
[ 1624.081263]  [<ffffffff81012fea>] child_rip+0xa/0x20
[ 1624.081263]  [<ffffffff81075780>] ? kthread+0x0/0xb0
[ 1624.081263]  [<ffffffff81012fe0>] ? child_rip+0x0/0x20
[ 1624.092967] iwlagn 0000:01:00.0: OTP is empty
[ 1624.092988] iwlagn 0000:01:00.0: Unable to init EEPROM
[ 1624.093033] iwlagn 0000:01:00.0: PCI INT A disabled
[ 1624.093065] iwlagn: probe of 0000:01:00.0 failed with error -2

We know that the routines in this trace, iwlcore_eeprom_acquire_semaphore
and iwlcore_eeprom_verify_signature, only access CSR registers and thus do
not need the device to be awake if it is EEPROM. But for OTP it is required
for the device to be awake to read these registers. Ensure device is awake
before accessing these registers.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Acked-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: align tx/rx statistics debugfs format
Wey-Yi Guy [Fri, 13 Nov 2009 19:56:31 +0000 (11:56 -0800)]
iwlwifi: align tx/rx statistics debugfs format

Align the format for tx_statistics and rx_statistics debugfs output for
better readability

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: eliminate the possible 1/2 dBm tx power loss in 6x00 & 6x50 series
Wey-Yi Guy [Fri, 13 Nov 2009 19:56:30 +0000 (11:56 -0800)]
iwlwifi: eliminate the possible 1/2 dBm tx power loss in 6x00 & 6x50 series

In both 6x00 and 6x50 series, the enhanced/extended tx power table in
EEPROM is used to set the max. tx power limit.
This new tx power table is in 1/2 dBm format, which creates an issue of
possibility of 1/2 dBm loss when driver set the tx power limit; because
of driver keep track and report the tx power in dBm format.

In order to prevent the 1/2 dBm loss, keep track of the true max tx
power in 1/2 dBm format in driver; do the comparison and adjust the tx
power if needed when send tx power command to uCode.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwl3945: Reset saved POWER_TABLE_CMD in "up"
Ben Cahill [Fri, 13 Nov 2009 19:56:29 +0000 (11:56 -0800)]
iwl3945: Reset saved POWER_TABLE_CMD in "up"

Power-saving logic will not re-issue a POWER_TABLE_CMD if a new command
matches the prior one.  This can be bad if we re-start the device due to
e.g. uCode error; the new POWER_TABLE_CMD (required to invoke power-saving)
may match the prior POWER_TABLE_CMD issued before the uCode error.

Ensure the POWER_TABLE_CMD is sent to device when uCode is up.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: update reply_statistics_cmd with 'clear' parameter
Wey-Yi Guy [Fri, 13 Nov 2009 19:56:28 +0000 (11:56 -0800)]
iwlwifi: update reply_statistics_cmd with 'clear' parameter

When issue REPLY_STATISTICS_CMD to uCode, two possible flag
can be set in the configuration flags

bit 0: Clear statistics
       0: Do not clear Statistics counters
       1: Clear to zero Statistics counters

Allow "clear" parameter to be set from the caller.

Add debugfs file to clear the statistics counters to help monitor and
debug the uCode behavior.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: remove external reference for non-exist data structure
Wey-Yi Guy [Fri, 13 Nov 2009 19:56:27 +0000 (11:56 -0800)]
iwlwifi: remove external reference for non-exist data structure

Number of data structure for 6000 series no longer in production, the
data structure already being removed; also need to remove the external
reference define in iwl-dev.h

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: drop non-production PCI-IDs for 6x50 series
Wey-Yi Guy [Fri, 13 Nov 2009 19:56:26 +0000 (11:56 -0800)]
iwlwifi: drop non-production PCI-IDs for 6x50 series

drop the non-production PCI-IDs for 6x50 series

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: remove unused parameter from iwl_channel_info
Wey-Yi Guy [Fri, 13 Nov 2009 19:56:25 +0000 (11:56 -0800)]
iwlwifi: remove unused parameter from iwl_channel_info

Number of HT40 power parameters are not used; remove those from
iwl_channel_info data structure

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: disable coex until implementation ready for 6x50
Wey-Yi Guy [Fri, 13 Nov 2009 19:56:24 +0000 (11:56 -0800)]
iwlwifi: disable coex until implementation ready for 6x50

Temporary disable the coex function for wifi/wimax for 6x50
series until the full implementation ready.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: validate enhanced tx power entry
Wey-Yi Guy [Fri, 13 Nov 2009 19:56:23 +0000 (11:56 -0800)]
iwlwifi: validate enhanced tx power entry

Validate enhanced tx power entry read from EEPROM before applying the
tx power value. Different versions of EEPROM might contain different size
of table; always a good idea to make sure the entry is valid before
applying to the targeted channel.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoima: replace GFP_KERNEL with GFP_NOFS
Mimi Zohar [Wed, 18 Nov 2009 21:16:06 +0000 (16:16 -0500)]
ima: replace GFP_KERNEL with GFP_NOFS

While running fsstress tests on the NFSv4 mounted ext3 and ext4
filesystem, the following call trace was generated on the nfs
server machine.

Replace GFP_KERNEL with GFP_NOFS in ima_iint_insert() to avoid a
potential deadlock.

     =================================
    [ INFO: inconsistent lock state ]
    2.6.31-31.el6.x86_64 #1
    ---------------------------------
    inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-W} usage.
    kswapd2/75 [HC0[0]:SC0[0]:HE1:SE1] takes:
     (jbd2_handle){+.+.?.}, at: [<ffffffff811edd5e>] jbd2_journal_start+0xfe/0x13f
    {RECLAIM_FS-ON-W} state was registered at:
      [<ffffffff81091e40>] mark_held_locks+0x65/0x99
      [<ffffffff81091f31>] lockdep_trace_alloc+0xbd/0xf5
      [<ffffffff81126fdd>] kmem_cache_alloc+0x40/0x185
      [<ffffffff812344d7>] ima_iint_insert+0x3d/0xf1
      [<ffffffff812345b0>] ima_inode_alloc+0x25/0x44
      [<ffffffff811484ac>] inode_init_always+0xec/0x271
      [<ffffffff81148682>] alloc_inode+0x51/0xa1
      [<ffffffff81148700>] new_inode+0x2e/0x94
      [<ffffffff811b2f08>] ext4_new_inode+0xb8/0xdc9
      [<ffffffff811be611>] ext4_create+0xcf/0x175
      [<ffffffff8113e2cd>] vfs_create+0x82/0xb8
      [<ffffffff8113f337>] do_filp_open+0x32c/0x9ee
      [<ffffffff811309b9>] do_sys_open+0x6c/0x12c
      [<ffffffff81130adc>] sys_open+0x2e/0x44
      [<ffffffff81011e42>] system_call_fastpath+0x16/0x1b
      [<ffffffffffffffff>] 0xffffffffffffffff
    irq event stamp: 90371
    hardirqs last  enabled at (90371): [<ffffffff8112708d>]
    kmem_cache_alloc+0xf0/0x185
    hardirqs last disabled at (90370): [<ffffffff81127026>]
    kmem_cache_alloc+0x89/0x185
    softirqs last  enabled at (89492): [<ffffffff81068ecf>]
    __do_softirq+0x1bf/0x1eb
    softirqs last disabled at (89477): [<ffffffff8101312c>] call_softirq+0x1c/0x30

    other info that might help us debug this:
    2 locks held by kswapd2/75:
     #0:  (shrinker_rwsem){++++..}, at: [<ffffffff810f98ba>] shrink_slab+0x44/0x177
     #1:  (&type->s_umount_key#25){++++..}, at: [<ffffffff811450ba>]

Reported-by: Muni P. Beerakam <mbeeraka@in.ibm.com>
Reported-by: Amit K. Arora <amitarora@in.ibm.com>
Cc: stable@kernel.org
Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Wed, 18 Nov 2009 18:55:32 +0000 (10:55 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next-2.6

14 years agodrivers/net/wireless/rtl818x: remove exceptional & on function name
Julia Lawall [Wed, 18 Nov 2009 08:26:02 +0000 (08:26 +0000)]
drivers/net/wireless/rtl818x: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/wireless/p54: remove exceptional & on function name
Julia Lawall [Wed, 18 Nov 2009 08:25:43 +0000 (08:25 +0000)]
drivers/net/wireless/p54: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/wireless/iwlwifi: remove exceptional & on function name
Julia Lawall [Wed, 18 Nov 2009 08:25:25 +0000 (08:25 +0000)]
drivers/net/wireless/iwlwifi: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/adm8211.c: remove exceptional & on function name
Julia Lawall [Wed, 18 Nov 2009 08:24:50 +0000 (08:24 +0000)]
drivers/net/adm8211.c: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/wan: remove exceptional & on function name
Julia Lawall [Wed, 18 Nov 2009 08:24:30 +0000 (08:24 +0000)]
drivers/net/wan: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/via-velocity.c: remove exceptional & on function name
Julia Lawall [Wed, 18 Nov 2009 08:24:13 +0000 (08:24 +0000)]
drivers/net/via-velocity.c: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/via-rhine.c: remove exceptional & on function name
Julia Lawall [Wed, 18 Nov 2009 08:23:53 +0000 (08:23 +0000)]
drivers/net/via-rhine.c: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/typhoon.c: remove exceptional & on function name
Julia Lawall [Wed, 18 Nov 2009 08:23:34 +0000 (08:23 +0000)]
drivers/net/typhoon.c: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/smsc9420.c: remove exceptional & on function name
Julia Lawall [Wed, 18 Nov 2009 08:23:17 +0000 (08:23 +0000)]
drivers/net/smsc9420.c: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/r6040.c: remove exceptional & on function name
Julia Lawall [Wed, 18 Nov 2009 08:23:00 +0000 (08:23 +0000)]
drivers/net/r6040.c: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/pppol2tp.c: remove exceptional & on function name
Julia Lawall [Wed, 18 Nov 2009 08:22:44 +0000 (08:22 +0000)]
drivers/net/pppol2tp.c: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/irda: remove exceptional & on function name
Julia Lawall [Wed, 18 Nov 2009 08:22:05 +0000 (08:22 +0000)]
drivers/net/irda: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/ipg.c: remove exceptional & on function name
Julia Lawall [Wed, 18 Nov 2009 08:21:45 +0000 (08:21 +0000)]
drivers/net/ipg.c: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net: remove exceptional & on function name
Julia Lawall [Wed, 18 Nov 2009 08:21:04 +0000 (08:21 +0000)]
drivers/net: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/can: remove exceptional & on function name
Julia Lawall [Wed, 18 Nov 2009 08:20:44 +0000 (08:20 +0000)]
drivers/net/can: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/atl1c: remove exceptional & on function name
Julia Lawall [Wed, 18 Nov 2009 18:47:03 +0000 (10:47 -0800)]
drivers/net/atl1c: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>