]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
15 years agosfc: Restore phy_flash_cfg module parameter
Ben Hutchings [Sat, 13 Dec 2008 05:34:54 +0000 (21:34 -0800)]
sfc: Restore phy_flash_cfg module parameter

This is needed for recovery in case a PHY firmware upgrade is aborted.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosfc: Work around unreliable strap pins
Ben Hutchings [Sat, 13 Dec 2008 05:34:25 +0000 (21:34 -0800)]
sfc: Work around unreliable strap pins

The SFC4000 has strap pins indicating the presence of SPI flash and/or
EEPROM.  These pins are also used for GPIO, and in some cases they may
be read wrongly at reset.  However, on production boards it must boot
from one or the other device, so we can assume the boot device is
present and read the board config from there.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosfc: Clean up waits for flash/EEPROM operations
Ben Hutchings [Sat, 13 Dec 2008 05:33:50 +0000 (21:33 -0800)]
sfc: Clean up waits for flash/EEPROM operations

Make falcon_spi_wait() ignore the write timer - it is only relevant to
write commands, it only works for the device that contains VPD, and it
might not be initialised properly at all.

Rename falcon_spi_fast_wait() to falcon_spi_wait_write(), reflecting
its use, and make it wait up to 10 ms (not 1 ms) since buffered writes
to EEPROM may take this long to complete.

Make both wait functions sleep instead of busy-waiting.

Replace wait for command completion at top of falcon_spi_cmd() with a
single poll; no command should be running when the function starts.

Correct some comments.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosfc: Make reset_workqueue driver-global rather than per-NIC
Steve Hodgson [Sat, 13 Dec 2008 05:33:02 +0000 (21:33 -0800)]
sfc: Make reset_workqueue driver-global rather than per-NIC

Each reset is serialised by the rtnl_lock anyway, so there's no win
per-NIC.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosfc: Correct interpretation of second param to ethtool phys_id()
Ben Hutchings [Sat, 13 Dec 2008 05:32:10 +0000 (21:32 -0800)]
sfc: Correct interpretation of second param to ethtool phys_id()

A value of 0 means indefinite repetition (until interrupted).

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosfc: Remove unneeded register write
Ben Hutchings [Sat, 13 Dec 2008 05:31:36 +0000 (21:31 -0800)]
sfc: Remove unneeded register write

This was only ever needed for an FPGA version of Falcon.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosfc: Change SPI lengths to type size_t
Ben Hutchings [Sat, 13 Dec 2008 05:56:11 +0000 (21:56 -0800)]
sfc: Change SPI lengths to type size_t

Based on a patch by Andrew Morton.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosfc: Board support fixes
Ben Hutchings [Sat, 13 Dec 2008 05:28:20 +0000 (21:28 -0800)]
sfc: Board support fixes

Set dummy monitor method for unrecognised boards.

Clean up board resources if efx_pci_probe_main() fails after board has
been initialised.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomisdn: Fix lockdep warning
Karsten Keil [Sat, 13 Dec 2008 05:21:57 +0000 (21:21 -0800)]
misdn: Fix lockdep warning

use correct dynamic spinlock init function.

Signed-off-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomISDN: hfcmulti: use __iomem address space modifier
Hannes Eder [Sat, 13 Dec 2008 05:20:03 +0000 (21:20 -0800)]
mISDN: hfcmulti: use __iomem address space modifier

Impact: make use of the __iomem address space modifier, and change u_char *,
u_short * and u_int * to void *

Fix more than 30 sparse warnings of this or similar type:

  drivers/isdn/hardware/mISDN/hfcmulti.c:261:31: warning: incorrect type in argument 2 (different address spaces)
  drivers/isdn/hardware/mISDN/hfcmulti.c:261:31:    got unsigned char [usertype] *
  drivers/isdn/hardware/mISDN/hfcmulti.c:261:31:    expected void volatile [noderef] <asn:2>*addr

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomISDN: timerdev: use __user for mISDN_read's buffer argument
Hannes Eder [Sat, 13 Dec 2008 05:19:18 +0000 (21:19 -0800)]
mISDN: timerdev: use __user for mISDN_read's buffer argument

Fix this warning:

  drivers/isdn/mISDN/timerdev.c:264:11: warning: incorrect type in initializer (incompatible argument 2 (different address spaces))
  drivers/isdn/mISDN/timerdev.c:264:11:    expected int ( *read )( ... )
  drivers/isdn/mISDN/timerdev.c:264:11:    got int ( static [toplevel] *<noident> )( ... )

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomISDN: comment out unused symbols
Hannes Eder [Sat, 13 Dec 2008 05:18:32 +0000 (21:18 -0800)]
mISDN: comment out unused symbols

Fix this sparse warnings:

  drivers/isdn/hardware/mISDN/hfcmulti.c:794: warning: 'vpm_check' defined but not used
  drivers/isdn/mISDN/dsp_cmx.c:1546: warning: 'dsp_start_jiffies' defined but not used

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomISDN: fix sparse warning: symbol 'id' shadows an earlier one
Hannes Eder [Sat, 13 Dec 2008 05:17:38 +0000 (21:17 -0800)]
mISDN: fix sparse warning: symbol 'id' shadows an earlier one

Impact: rename function scope variable

Fix this warning:

  drivers/isdn/mISDN/l1oip_core.c:472:8: warning: symbol 'id' shadows an earlier one
  drivers/isdn/mISDN/l1oip_core.c:254:14: originally declared here

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomISDN: fix sparse warning: symbol 'nskb' shadows an earlier one
Hannes Eder [Sat, 13 Dec 2008 05:16:58 +0000 (21:16 -0800)]
mISDN: fix sparse warning: symbol 'nskb' shadows an earlier one

Impact: define first occurence of variable 'nskb' in inner most possible scope

Fix this sparse warning:

  drivers/isdn/mISDN/dsp_core.c:746:20: warning: symbol 'nskb' shadows an earlier one
  drivers/isdn/mISDN/dsp_core.c:634:19: originally declared here

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomISDN: un-export symbol 'plx_lock'
Hannes Eder [Sat, 13 Dec 2008 05:16:06 +0000 (21:16 -0800)]
mISDN: un-export symbol 'plx_lock'

'plx_lock' is only used within hfcmulti.c.

Fix this warning:

  drivers/isdn/hardware/mISDN/hfcmulti.c:176:1: warning: symbol 'plx_lock' shadows an earlier one
  drivers/isdn/hardware/mISDN/hfcmulti.c:175:19: originally declared here

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomISDN: make global symbols static or include header files
Hannes Eder [Sat, 13 Dec 2008 05:15:17 +0000 (21:15 -0800)]
mISDN: make global symbols static or include header files

The warnings fixed by including an header file for the appropriate
prototype are marked with "*", for all others the corresonponding
symbol has been made static.  This patch fixes all such issues in
mISDN.

Fix this sparse warnings:

  drivers/isdn/hardware/mISDN/hfcmulti.c:174:5: warning: symbol 'plxsd_master' was not declared. Should it be static?
  drivers/isdn/hardware/mISDN/hfcmulti.c:426:1: warning: symbol 'write_fifo_regio' was not declared. Should it be static?
  drivers/isdn/hardware/mISDN/hfcmulti.c:447:1: warning: symbol 'write_fifo_pcimem' was not declared. Should it be static?
  drivers/isdn/hardware/mISDN/hfcmulti.c:469:1: warning: symbol 'read_fifo_regio' was not declared. Should it be static?
  drivers/isdn/hardware/mISDN/hfcmulti.c:491:1: warning: symbol 'read_fifo_pcimem' was not declared. Should it be static?
  drivers/isdn/hardware/mISDN/hfcmulti.c:710:1: warning: symbol 'vpm_init' was not declared. Should it be static?
  drivers/isdn/hardware/mISDN/hfcmulti.c:793:1: warning: symbol 'vpm_check' was not declared. Should it be static?
  drivers/isdn/hardware/mISDN/hfcmulti.c:816:1: warning: symbol 'vpm_echocan_on' was not declared. Should it be static?
  drivers/isdn/hardware/mISDN/hfcmulti.c:848:1: warning: symbol 'vpm_echocan_off' was not declared. Should it be static?
* drivers/isdn/mISDN/l1oip_codec.c:224:1: warning: symbol 'l1oip_law_to_4bit' was not declared. Should it be static?
* drivers/isdn/mISDN/l1oip_codec.c:261:1: warning: symbol 'l1oip_4bit_to_law' was not declared. Should it be static?
* drivers/isdn/mISDN/l1oip_codec.c:281:1: warning: symbol 'l1oip_alaw_to_ulaw' was not declared. Should it be static?
* drivers/isdn/mISDN/l1oip_codec.c:294:1: warning: symbol 'l1oip_ulaw_to_alaw' was not declared. Should it be static?
* drivers/isdn/mISDN/l1oip_codec.c:311:1: warning: symbol 'l1oip_4bit_free' was not declared. Should it be static?
* drivers/isdn/mISDN/l1oip_codec.c:322:1: warning: symbol 'l1oip_4bit_alloc' was not declared. Should it be static?
  drivers/isdn/mISDN/core.c:29:1: warning: symbol 'device_lock' was not declared. Should it be static?
  drivers/isdn/mISDN/core.c:34:1: warning: symbol 'bp_lock' was not declared. Should it be static?
  drivers/isdn/mISDN/core.c:196:1: warning: symbol 'mISDNInit' was not declared. Should it be static?
  drivers/isdn/mISDN/core.c:227:6: warning: symbol 'mISDN_cleanup' was not declared. Should it be static?
  drivers/isdn/mISDN/stack.c:40:1: warning: symbol 'mISDN_queue_message' was not declared. Should it be static?
* drivers/isdn/mISDN/layer1.c:388:1: warning: symbol 'l1_init' was not declared. Should it be static?
* drivers/isdn/mISDN/layer1.c:400:1: warning: symbol 'l1_cleanup' was not declared. Should it be static?
  drivers/isdn/mISDN/layer2.c:469:1: warning: symbol 'iframe_error' was not declared. Should it be static?
  drivers/isdn/mISDN/layer2.c:487:1: warning: symbol 'super_error' was not declared. Should it be static?
  drivers/isdn/mISDN/layer2.c:496:1: warning: symbol 'unnum_error' was not declared. Should it be static?
  drivers/isdn/mISDN/layer2.c:509:1: warning: symbol 'UI_error' was not declared. Should it be static?
  drivers/isdn/mISDN/layer2.c:522:1: warning: symbol 'FRMR_error' was not declared. Should it be static?
  drivers/isdn/mISDN/layer2.c:1069:1: warning: symbol 'enquiry_cr' was not declared. Should it be static?
* drivers/isdn/mISDN/layer2.c:2196:1: warning: symbol 'Isdnl2_Init' was not declared. Should it be static?
* drivers/isdn/mISDN/layer2.c:2210:1: warning: symbol 'Isdnl2_cleanup' was not declared. Should it be static?
  drivers/isdn/mISDN/tei.c:397:1: warning: symbol 'random_ri' was not declared. Should it be static?
* drivers/isdn/mISDN/timerdev.c:277:1: warning: symbol 'mISDN_inittimer' was not declared. Should it be static?
* drivers/isdn/mISDN/timerdev.c:288:6: warning: symbol 'mISDN_timer_cleanup' was not declared. Should it be static?
  drivers/isdn/mISDN/dsp_core.c:164:12: warning: symbol 'mISDN_dsp_revision' was not declared. Should it be static?
  drivers/isdn/mISDN/dsp_cmx.c:1543:5: warning: symbol 'samplecount' was not declared. Should it be static?
  drivers/isdn/mISDN/dsp_cmx.c:1546:5: warning: symbol 'dsp_start_jiffies' was not declared. Should it be static?
  drivers/isdn/mISDN/dsp_cmx.c:1547:16: warning: symbol 'dsp_start_tv' was not declared. Should it be static?
  drivers/isdn/mISDN/dsp_tones.c:239:3: warning: symbol 'pattern' was not declared. Should it be static?
  drivers/isdn/mISDN/dsp_audio.c:33:4: warning: symbol 'dsp_audio_ulaw_to_alaw' was not declared. Should it be static?

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomISDN: consistently define 'debug' as '*u_int'
Hannes Eder [Sat, 13 Dec 2008 05:13:45 +0000 (21:13 -0800)]
mISDN: consistently define 'debug' as '*u_int'

Impact: change data type for variable 'debug' from *int to *u_int,
same for the argument type of mISDN_inittimer

In "core.h" mISDN_inittimer is declared with the argument type "*u_int", make
the definition in "timerdev.c" match this.

This fixes also this warnings:

  drivers/isdn/mISDN/layer1.c:391:8: warning: incorrect type in assignment (different signedness)
  drivers/isdn/mISDN/layer1.c:391:8:    expected int *static [toplevel] debug
  drivers/isdn/mISDN/layer1.c:391:8:    got unsigned int [usertype] *deb
  drivers/isdn/mISDN/layer2.c:2200:8: warning: incorrect type in assignment (different signedness)
  drivers/isdn/mISDN/layer2.c:2200:8:    expected int *static [toplevel] debug
  drivers/isdn/mISDN/layer2.c:2200:8:    got unsigned int [usertype] *deb
  drivers/isdn/mISDN/socket.c:769:8: warning: incorrect type in assignment (different signedness)
  drivers/isdn/mISDN/socket.c:769:8:    expected int *static [toplevel] debug
  drivers/isdn/mISDN/socket.c:769:8:    got unsigned int [usertype] *deb

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomISDN: use NULL pointer instead of plain integer
Hannes Eder [Sat, 13 Dec 2008 05:11:28 +0000 (21:11 -0800)]
mISDN: use NULL pointer instead of plain integer

Fix more than 100 (all remaining in mISDN) sparse warnings:

  drivers/isdn/hardware/mISDN/hfcmulti.c:***:**: warning: Using plain integer as NULL pointer
  drivers/isdn/mISDN/dsp_tones.c:***:**: warning: Using plain integer as NULL pointer
  drivers/isdn/mISDN/dsp_pipeline.c:***:**: warning: Using plain integer as NULL pointer

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoiwlwifi: add contact email to MODULE_AUTHOR
Tomas Winkler [Thu, 11 Dec 2008 18:33:41 +0000 (10:33 -0800)]
iwlwifi: add contact email to MODULE_AUTHOR

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>
15 years agoiwlwifi: remove 4965 from common uCode API structures
Tomas Winkler [Thu, 11 Dec 2008 18:33:40 +0000 (10:33 -0800)]
iwlwifi: remove 4965 from common uCode API structures

This patch removes 4965 from common uCode API structures. Also updates
iwlagn commands with 3945 specific RX command in preparation for 3945 port.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: remove includes of iwl-helpers.h where not needed
Tomas Winkler [Thu, 11 Dec 2008 18:33:39 +0000 (10:33 -0800)]
iwlwifi: remove includes of iwl-helpers.h where not needed

This patch removes includes of iwl-helpers.h where not needed

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: remove unused clip_groups priv member
Tomas Winkler [Thu, 11 Dec 2008 18:33:38 +0000 (10:33 -0800)]
iwlwifi: remove unused clip_groups priv member

Remove clip_groups from priv and related structure.
This code is for 3945 only and was renamed to 4965 in
when code was split.
Also remove unused RATE definitions

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: fix resume while txpower off
Mohamed Abbas [Thu, 11 Dec 2008 18:33:37 +0000 (10:33 -0800)]
iwlwifi: fix resume while txpower off

This patch take care of coming out rfkill when the driver is up while
rfkill is on by restarting interface.

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>
15 years agoiwlwifi: use iwl_poll_direct_bit in EEPROM reading
Zhu, Yi [Thu, 11 Dec 2008 18:33:36 +0000 (10:33 -0800)]
iwlwifi: use iwl_poll_direct_bit in EEPROM reading

The patch replaces the current reading EEPROM loop iterations with
iwl_poll_direct_bit(). It also fixes some comment error.

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>
15 years agoath9k: Do not remove header padding on RX from short frames
Jouni Malinen [Thu, 11 Dec 2008 16:22:13 +0000 (18:22 +0200)]
ath9k: Do not remove header padding on RX from short frames

The 802.11 header is only padded to 32-bit boundary when the frame has
a non-zero length payload. In other words, control frames (e.g., ACK)
do not have a padding and we should not try to remove it. This fixes
monitor mode for short control frames. In addition, the hdrlen&3 use
is described in more detail to make it easier to understand how the
padding length is calculated.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: fix build warning (iwl-rx.c)
Rami Rosen [Thu, 11 Dec 2008 12:29:06 +0000 (14:29 +0200)]
iwlwifi: fix build warning (iwl-rx.c)

This patch fixes the following build warning when CONFIG_IWLWIFI_DEBUG
is not set.

/work/src/wireless-testing/drivers/net/wireless/iwlwifi/iwl-rx.c:758:
warning: 'iwl_dbg_report_frame' defined but not used

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: misc cleanups
Rami Rosen [Thu, 11 Dec 2008 12:00:25 +0000 (14:00 +0200)]
mac80211: misc cleanups

This patch removes unneeded member (skbuff) from
ieee80211_ibss_add_sta() method in its declaration (in ieee80211_i.h)
and its callers (in rx.c and mlme.c)

This patch removes unneeded member from struct ieee80211_rx_data
in ieee80211_i.h.

(Originally posted as two patches. -- JWL)

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agorfkill: strip pointless notifier chain
Johannes Berg [Wed, 10 Dec 2008 16:48:48 +0000 (17:48 +0100)]
rfkill: strip pointless notifier chain

No users, so no reason to have it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agolibertas: Create sysfs entry for changing the mesh probe response limit
Anna Neal [Tue, 9 Dec 2008 21:23:45 +0000 (13:23 -0800)]
libertas: Create sysfs entry for changing the mesh probe response limit

This patch adds the ability to change the number of probe response retries sent
by the mesh interface.

In dense networks it is recommended to change this value to zero to reduce
traffic congestion.

Signed-off-by: Anna Neal <anna@cozybit.com>
Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Refactor struct ath_softc
Sujith [Sun, 7 Dec 2008 16:14:03 +0000 (21:44 +0530)]
ath9k: Refactor struct ath_softc

Split ath_softc into smaller structures for rx, tx and beacon
handling.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: fix oops on faulty devices
Christian Lamparter [Tue, 9 Dec 2008 20:07:50 +0000 (21:07 +0100)]
p54: fix oops on faulty devices

This patch fixes an oops when the devices suddenly starts
to receive martian data frames.

bug reference:
http://marc.info/?l=linux-wireless&m=122872280317635&w=2

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: Disable requests for new scans in AP mode
Jouni Malinen [Wed, 10 Dec 2008 12:51:47 +0000 (14:51 +0200)]
mac80211: Disable requests for new scans in AP mode

AP mode operations are seriously affected if mac80211 runs through a
multi-second scan while the AP is trying to send Beacon frames on the
operation channel. While this could be implemented in a way that does
not cause too many problems, it is not very simple and will require
synchronization with Beacon frame scheduling in the drivers (scan one
channel at a time between Beacon frames). Furthermore, such scanning
takes quite a bit longer time and existing userspace applications
would be likely to timeout while waiting for the results.

For now, just refuse requests for new scans (SIOCSIWSCAN) when in AP
mode. In practice, this moves the rejection from iwl* drivers into
mac80211 to make it apply to every mac80211-based driver.

This issue shows up in associated stations getting disconnected when
something (e.g., Network Manager) requests a scan while the interface
is in AP mode. When doing this continuously (e.g., NM does it every 120
seconds), the network gets close to useless.

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>
15 years agoipw2200: fix scanning while associated
Helmut Schaa [Wed, 10 Dec 2008 12:17:26 +0000 (13:17 +0100)]
ipw2200: fix scanning while associated

This patch fixes sporadic firmware restarts when scanning while associated.

The firmware will quietly cancel a scan (while associated) if the dwell time
for a channel to be scanned is larger than the time it may stay away from the
operating channel (because of DTIM catching). Unfortunately the driver is not
notified about the canceled scan and therefore the scan watchdog timeout will
be hit and the driver causes a firmware restart which results in
disassociation. This mainly happens on passive channels which use a dwell time
of 120 whereas a typical beacon interval is around 100.

The patch changes the dwell time for passive channels to be slightly smaller
than the actual beacon interval to work around the firmware issue. Furthermore
the number of allowed beacon misses is increased from one to three as otherwise
most scans (while associated) won't complete successfully.

However scanning while associated will still fail in corner cases such as a
beacon intervals below 30.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agob43legacy: Fix sparse warnings
Larry Finger [Wed, 10 Dec 2008 05:35:41 +0000 (23:35 -0600)]
b43legacy: Fix sparse warnings

Sparse yields the following warnings for b43legacy:

  CHECK   drivers/net/wireless/b43legacy/phy.c
drivers/net/wireless/b43legacy/phy.c:1304:31: warning: potentially expensive pointer subtraction
drivers/net/wireless/b43legacy/phy.c:1304:31: warning: potentially expensive pointer subtraction
drivers/net/wireless/b43legacy/phy.c:1304:31: warning: potentially expensive pointer subtraction
  CHECK   drivers/net/wireless/b43legacy/debugfs.c
drivers/net/wireless/b43legacy/debugfs.c:243:9: warning: memset with byte count of 131072

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agortl8187: Use usb anchor facilities to manage urbs
Larry Finger [Wed, 10 Dec 2008 05:34:27 +0000 (23:34 -0600)]
rtl8187: Use usb anchor facilities to manage urbs

When SLUB debugging is enabled in the kernel, and the boot command includes
the option "slub_debug=P", rtl8187 encounters a GPF due to a read-after-free
of a urb.

Following the example of changes in p54usb to fix the same problem, the code
has been modified to use the usb_anchor_urb() method. With this change, the
USB core handles the freeing of urb's.

This patch fixes the problem reported in Kernel Bugzilla #12185
(http://bugzilla.kernel.org/show_bug.cgi?id=12185).

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: fix endianness of bitwise ops when installing mic
Bob Copeland [Wed, 10 Dec 2008 04:05:38 +0000 (23:05 -0500)]
ath5k: fix endianness of bitwise ops when installing mic

Fix these bugs found by sparse:

    ath5k/pcu.c:1102:21: warning: restricted __le32 degrades to integer
    ath5k/pcu.c:1102:13: warning: incorrect type in assignment (different base types)
    ath5k/pcu.c:1102:13:    expected restricted __le32 <noident>
    ath5k/pcu.c:1102:13:    got unsigned int
    ath5k/pcu.c:1104:20: warning: restricted __le32 degrades to integer
    ath5k/pcu.c:1104:13: warning: incorrect type in assignment (different base types)
    ath5k/pcu.c:1104:13:    expected restricted __le32 <noident>
    ath5k/pcu.c:1104:13:    got unsigned int

Changes-licensed-under: ISC

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agospectrum_cs: Fix function names used in debug strings
David Kilroy [Tue, 9 Dec 2008 23:05:38 +0000 (23:05 +0000)]
spectrum_cs: Fix function names used in debug strings

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoorinoco: Fix inappropriate use of IRQ_BAP
David Kilroy [Tue, 9 Dec 2008 21:46:29 +0000 (21:46 +0000)]
orinoco: Fix inappropriate use of IRQ_BAP

This hardware buffer should only be used from an interrupt. The
wireless event generation functions are called from a workqueue, so use
USER_BAP instead.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoorinoco: Fix function names used in debug strings
David Kilroy [Tue, 9 Dec 2008 21:46:28 +0000 (21:46 +0000)]
orinoco: Fix function names used in debug strings

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: enforce strict tx_queue limits
Christian Lamparter [Tue, 9 Dec 2008 20:09:00 +0000 (21:09 +0100)]
p54: enforce strict tx_queue limits

The patch fixes an old FIXME in p54pci.c by moving the "queue full"
check into the common library, where we can deal with it properly.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: remove qos module parameter
Winkler, Tomas [Tue, 9 Dec 2008 19:29:01 +0000 (11:29 -0800)]
iwlwifi: remove qos module parameter

The ability of disabling qos from module params is not required anymore.

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>
15 years agoiwlwifi: 3945 remove qos module parameter
Winkler, Tomas [Tue, 9 Dec 2008 19:29:00 +0000 (11:29 -0800)]
iwlwifi: 3945 remove qos module parameter

The ability of disabling qos from module params is not required
anymore.

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>
15 years agoiwlifi: remove twice defined SINGLE_FRAME RX FH MASK
Winkler, Tomas [Tue, 9 Dec 2008 19:28:59 +0000 (11:28 -0800)]
iwlifi: remove twice defined SINGLE_FRAME RX FH MASK

This patch removes second definition of FH_RCSR_CHNL0_RX_CONFIG_SINGLE_FRAME
in iwl-fh.h

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Reported-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Acked-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>
15 years agoiwlwifi: change email contact information
Winkler, Tomas [Tue, 9 Dec 2008 19:28:58 +0000 (11:28 -0800)]
iwlwifi: change email contact information

This patch replaces personal emails with hopefully
always valid Intel Linux Wireless, which will be routed
to a current maintainer

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>
15 years agoairport: remove useless return in a function returning void
Pavel Roskin [Tue, 9 Dec 2008 17:32:15 +0000 (12:32 -0500)]
airport: remove useless return in a function returning void

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: integrate sta_notify_ps cmds into sta_notify
Christian Lamparter [Tue, 9 Dec 2008 15:28:06 +0000 (16:28 +0100)]
mac80211: integrate sta_notify_ps cmds into sta_notify

This patch replaces the newly introduced sta_notify_ps function,
which can be used to notify the driver about every power state
transition for all associated stations, by integrating its functionality
back into the original sta_notify callback.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54usb: rewriting rx/tx routines to make use of usb_anchor's facilities
Christian Lamparter [Tue, 9 Dec 2008 14:14:37 +0000 (15:14 +0100)]
p54usb: rewriting rx/tx routines to make use of usb_anchor's facilities

Alan Stern found several flaws in p54usb's implementation and annotated:
"usb_kill_urb() and similar routines do not expect an URB's completion
routine to deallocate it. Â This is almost obvious -- if the URB is deallocated
before the completion routine returns then there's no way for usb_kill_urb
to detect when the URB actually is complete."

This patch addresses all known limitations in the old implementation and fixes
khub's "use-after-freed" hang, when SLUB debug's poisoning option is enabled.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Cc: stable@kernel.org
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: BH shouldn't be enabled when hardirqs are disabled.
Senthil Balasubramanian [Tue, 9 Dec 2008 11:53:33 +0000 (17:23 +0530)]
ath9k: BH shouldn't be enabled when hardirqs are disabled.

ath_tx_complete_buf uses a BH version of spinlock and so releasing
the lock enables BH which is incorrect when called from sta_notify
callback as MAC80211 disables hardirqs before the driver callback
is called.

As ath_tx_complete_buf is shared between user and softirq context
using normal spinlock may not be appropriate. Though the proper
fix would be to cleanup the context properly in the driver code,
this would be an interim fix to avoid kernel warning.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211/cfg80211: check endianness in sparse runs
Johannes Berg [Tue, 9 Dec 2008 11:39:52 +0000 (12:39 +0100)]
mac80211/cfg80211: check endianness in sparse runs

Make sure sparse checks endianness when run on mac80211/cfg80211.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: remove fragmentation offload functionality
Johannes Berg [Tue, 9 Dec 2008 11:30:03 +0000 (12:30 +0100)]
mac80211: remove fragmentation offload functionality

There's no driver that actually does fragmentation on the
device, and the callback is buggy (when it returns an error,
mac80211's fragmentation status is changed so reading the
frag threshold from userspace reads the new value despite
the error). Let's just remove it, if we really find some
hardware supporting it we can add it back later.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: remove fragmentation workaround again
Johannes Berg [Tue, 9 Dec 2008 11:26:14 +0000 (12:26 +0100)]
ath9k: remove fragmentation workaround again

Looking at the RC algorithm this is no longer necessary.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: fix build error (iwl-rx.c).
Rami Rosen [Tue, 9 Dec 2008 06:37:28 +0000 (08:37 +0200)]
iwlwifi: fix build error (iwl-rx.c).

This patch adds #ifdef CONFIG_IWLWIFI_DEBUG in iwl_rx_reply_rx()
method in iwlwifi/iwl-rx.c) to avoid build error  caused by "iwlwifi:
implement iwl_debug_report_frame for iwlagn".

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: only create default STA interface if supported
Johannes Berg [Mon, 8 Dec 2008 23:10:30 +0000 (00:10 +0100)]
mac80211: only create default STA interface if supported

Drivers will support this, obviously, but this forces them to
set it up properly.

(This includes the fix posted as "mac80211: fix ifmodes check" and
tested in wireless-testing by Hin-Tak and others. -- JWL)

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reported-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoieee80211_security: correct warning about width of auth_mode
John W. Linville [Mon, 8 Dec 2008 19:51:41 +0000 (14:51 -0500)]
ieee80211_security: correct warning about width of auth_mode

Also remove auth_algo which is unused.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: avoid rx frames with corrupted descriptor.
Senthil Balasubramanian [Mon, 8 Dec 2008 14:13:50 +0000 (19:43 +0530)]
ath9k: avoid rx frames with corrupted descriptor.

Setting RX_ABORT/RX_DIS after MAC reset and clearing RX_ABORT/RX_DIS
after enbling RXE/RXDP to avoid rx frames with corrupted descriptor
status.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Incorrect band enum causes invalid antenna configuration.
Senthil Balasubramanian [Mon, 8 Dec 2008 14:13:49 +0000 (19:43 +0530)]
ath9k: Incorrect band enum causes invalid antenna configuration.

It's a regression from the patch titled "ath9k: Use mac80211's band
macros and remove enum hal_freq_band". MAC80211 band macros can't be
mapped directly with our hal band enum.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Adding support for Atheros AR9285 chipset.
Senthil Balasubramanian [Mon, 8 Dec 2008 14:13:48 +0000 (19:43 +0530)]
ath9k: Adding support for Atheros AR9285 chipset.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Adding initvalues for Atheros AR9285 chipset.
Senthil Balasubramanian [Mon, 8 Dec 2008 14:13:47 +0000 (19:43 +0530)]
ath9k: Adding initvalues for Atheros AR9285 chipset.

This patch adds the initvalues required for AR9285 chipset.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Adding AR9285 chipset register information.
Senthil Balasubramanian [Mon, 8 Dec 2008 14:13:46 +0000 (19:43 +0530)]
ath9k: Adding AR9285 chipset register information.

Adding AR9285 register information.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: fix nl80211 frequency handling
Johannes Berg [Mon, 8 Dec 2008 11:39:04 +0000 (12:39 +0100)]
cfg80211: fix nl80211 frequency handling

Fix two small bugs with HT frequency setting:
 * HT is accepted even when the driver is incapable
 * HT40 is accepted when the driver cannot do 40 MHz
 (both on the selected band)

Also simplify the code a little.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: improve sta_notify documentation
Johannes Berg [Mon, 8 Dec 2008 10:18:32 +0000 (11:18 +0100)]
mac80211: improve sta_notify documentation

Mention more possible STA entries and document the atomic requirement.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Merge structures ath_atx, ath_node_aggr with ath_node
Sujith [Sun, 7 Dec 2008 16:13:36 +0000 (21:43 +0530)]
ath9k: Merge structures ath_atx, ath_node_aggr with ath_node

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Remove remaining occurrences of CONFIG_SLOW_ANT_DIV
Sujith [Sun, 7 Dec 2008 16:13:10 +0000 (21:43 +0530)]
ath9k: Remove remaining occurrences of CONFIG_SLOW_ANT_DIV

Slow Antenna Diversity has been removed, these are remnants
of the old code.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Add a debugfs file to show interrupt statistics
Sujith [Sun, 7 Dec 2008 16:12:44 +0000 (21:42 +0530)]
ath9k: Add a debugfs file to show interrupt statistics

Location: ath9k/<phy>/interrupt

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Maintain rate table choice after association
Sujith [Sun, 7 Dec 2008 16:12:10 +0000 (21:42 +0530)]
ath9k: Maintain rate table choice after association

A scan run after association would change sc_curmode which is
used to get the current rate table. This patch fixes it
by removing sc_curmode and setting the rate table in usage in cur_rate_table
on association.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Fix bug in rate table management
Sujith [Sun, 7 Dec 2008 16:11:37 +0000 (21:41 +0530)]
ath9k: Fix bug in rate table management

The proper rate table wouldn't be used if a disassoc
happens and a new attempt is made to associate using
wpa_supplicant. This patch fixes it by storing the rate
table to be used on association.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Disable staggered Beacon frame scheduling
Jouni Malinen [Fri, 5 Dec 2008 18:43:27 +0000 (20:43 +0200)]
ath9k: Disable staggered Beacon frame scheduling

It looks like there are some issues in the current ath9k version as
far as staggered Beacon frame scheduling is concerned. This results in
Beacon frame timestamp being off by 25 milliseconds or so which can
cause issues with multicast power save buffering in AP mode. Some
client stations fail to receive multicast frames when there is this
large an offset between TBTT and actual Beacon transmission time.

Since ath9k does not yet support multiple BSSes anyway, the staggered
Beacon frame scheduling is just increasing the number of interrupts at
this point. The easiest fix for the timestamp offset is to disable
staggered Beacon frames for now. We need to redesign beacon.c anyway
when adding multi-BSS support with mac80211 since the existing code
depends on different mechanism for Beacon frame transmission.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Free Beacon skbs in AP mode
Jouni Malinen [Fri, 5 Dec 2008 18:42:45 +0000 (20:42 +0200)]
ath9k: Free Beacon skbs in AP mode

Fix a memory leak where AP mode did not free transmitted Beacon frame
skbs.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Acked-by: Pat Erley <pat-lkml@erley.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: cleanup (remove pm_state)
Rami Rosen [Fri, 5 Dec 2008 16:16:21 +0000 (18:16 +0200)]
iwlwifi: cleanup (remove pm_state)

This patches removes unused variable (pm_state) from iwl-dev.h and
from iwl-3945.h. (wireless-testing tree)

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: use rmb/wmb to protect indirect mmio operation
Zhu, Yi [Fri, 5 Dec 2008 15:58:41 +0000 (07:58 -0800)]
iwlwifi: use rmb/wmb to protect indirect mmio operation

This patch protects iwlwifi indirect mmio operations with rmb() and
wmb(). It makes sure CPU reordering won't affect our indirect mmio
access.

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>
15 years agoiwlwifi: iwl_poll_{direct_}bit cleanup
Zhu, Yi [Fri, 5 Dec 2008 15:58:40 +0000 (07:58 -0800)]
iwlwifi: iwl_poll_{direct_}bit cleanup

The patch merges implementation of iwl_poll_bit() and
iwl_poll_direct_bit() by letting the latter be a special case of
the former.

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>
15 years agoiwlwifi: fix "MAC in deep sleep" error
Zhu, Yi [Fri, 5 Dec 2008 15:58:39 +0000 (07:58 -0800)]
iwlwifi: fix "MAC in deep sleep" error

This patch fixes the misue of CSR_GP_CNTRL with CSR_RESET address
in polling the CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY bit in
iwl4965_apm_reset(). This causes "MAC in deep sleep" error sometimes.
The patch also fixes the timeout value and the iwl_poll_bit() return
value check.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Acked-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>
15 years agoiwlwifi: fix time interval misuse in iwl_poll_{direct_}bit
Zhu, Yi [Fri, 5 Dec 2008 15:58:38 +0000 (07:58 -0800)]
iwlwifi: fix time interval misuse in iwl_poll_{direct_}bit

The patch fixes the misuse of microsecond with millisecond in the
polling mechanism of the iwlwifi driver. The impact of this problem
is the unacceptable latency for the whole system (especially during
bringing down the wlan interface).

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Acked-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>
15 years agoiwl3945: Fix rate scale for B-mode connection
Abbas, Mohamed [Fri, 5 Dec 2008 15:58:37 +0000 (07:58 -0800)]
iwl3945: Fix rate scale for B-mode connection

This patch make sure we use only CCK rate for B only network.
For 3945 driver, it sets REPLY_RATE_SCALE command every time
we connect to a new network. In this command we set for every
rate the number of try and next rate. The problem mac80211 reports
same mode for both B and G mode as IEEE80211_BAND_2GHZ which will cause
using invalid rate other than CCK in B only network. THis patch
on association will examine sta valid rate on association, if no
OFDM rate in valid available rates it considers it as B only mode so
we can set REPLY_RATE_SCALE command with valid B only network and only
choose CCK rate in rate scaling.

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>
15 years agoiwlwifi: implement iwl_debug_report_frame for iwlagn
Halperin, Daniel C [Fri, 5 Dec 2008 15:58:36 +0000 (07:58 -0800)]
iwlwifi: implement iwl_debug_report_frame for iwlagn

The old version of this code was copied from 3945 and never updated. This patch
cleans up structs that do not apply and accounts for other changes from
3945->iwlagn (e.g., PHY info can come in a separate cmd response from the
ucode.)

Signed-off-by: Daniel Halperin <daniel.c.halperin@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: remove WARN_ON() from ieee80211_hw_config
Reinette Chatre [Thu, 4 Dec 2008 22:49:08 +0000 (14:49 -0800)]
mac80211: remove WARN_ON() from ieee80211_hw_config

ieee80211_hw_config can return an error when the hardware
has rfkill enabled. A WARN_ON() is too harsh for this
failure as it is a valid scenario. Only comment this warning
as we would like to have it back when rfkill is integrated into
mac80211.

Also reintroduce propagation of error if ieee80211_hw_config fails
in ieee80211_config_beacon.

This patch partially reverts patch:
5f0387fc3337ca26f0745f945f550f0c3734960f
"mac80211: clean up ieee80211_hw_config errors"

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowireless: Incorrect LEAP authentication algorithm identifier.
Senthil Balasubramanian [Thu, 4 Dec 2008 15:08:13 +0000 (20:38 +0530)]
wireless: Incorrect LEAP authentication algorithm identifier.

This patch fixes a regression introduced by
"wireless: avoid some net/ieee80211.h vs. linux/ieee80211.h conflicts"
LEAP authentication algorithm identifier should be 128.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agortl8187: Improve wireless statistics for RTL8187
Larry Finger [Thu, 4 Dec 2008 04:21:20 +0000 (22:21 -0600)]
rtl8187: Improve wireless statistics for RTL8187

The current wireless statistics for the RTL8187 poorly indicate the signal
strength and quality. With testing, I found that the AGC value is inversely
correlated with the strength as in the RTL8187B. By implementing a similar
calculation, much more code becomes common to the two devices.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested by: Martín Ernesto Barreyro <barreyromartin@gmail.com>
Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoMIPS: IP32: Update defconfig
David Daney [Wed, 10 Dec 2008 23:27:13 +0000 (15:27 -0800)]
MIPS: IP32: Update defconfig

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Add missing calls to plat_unmap_dma_mem.
David Daney [Thu, 11 Dec 2008 02:14:45 +0000 (18:14 -0800)]
MIPS: Add missing calls to plat_unmap_dma_mem.

dma_free_noncoherent() and dma_free_coherent() are missing calls to
plat_unmap_dma_mem().  This patch adds them.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Kconfig: Fix the arch-specific header path
Dmitri Vorobiev [Wed, 10 Dec 2008 20:38:36 +0000 (22:38 +0200)]
MIPS: Kconfig: Fix the arch-specific header path

The header path in the help text for the RUNTIME_DEBUG config option is
obsolete and needs to be updated to match the new location of
architecture-specific header files. While at it, fix the spelling mistake.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Use EI/DI for MIPS R2.
David Daney [Wed, 10 Dec 2008 16:37:25 +0000 (08:37 -0800)]
MIPS: Use EI/DI for MIPS R2.

For MIPS R2, use the EI and DI instructions to enable and disable
interrupts.

Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoCommands needing to be retried require a complete re-initialization.
Alan D. Brunelle [Tue, 9 Dec 2008 14:52:15 +0000 (15:52 +0100)]
Commands needing to be retried require a complete re-initialization.

The test-unit-ready portion of this patch was causing boots to fail on
my test machine (as in http://lkml.org/lkml/2008/12/5/161). With this
patch in place, the system is booting reliably.

Mike Anderson found the same problem in the hp_hw_start_stop code,
and I applied the same solution in cdrom_read_cdda_bpc.

Signed-off-by: Alan D. Brunelle <alan.brunelle@hp.com>
Cc: Mike Anderson <andmike@linux.vnet.ibm.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agonetlabel: Compiler warning and NULL pointer dereference fix
Paul Moore [Fri, 12 Dec 2008 05:31:50 +0000 (21:31 -0800)]
netlabel: Compiler warning and NULL pointer dereference fix

Fix the two compiler warnings show below.  Thanks to Geert Uytterhoeven for
finding and reporting the problem.

 net/netlabel/netlabel_unlabeled.c:567: warning: 'entry' may be used
   uninitialized in this function
 net/netlabel/netlabel_unlabeled.c:629: warning: 'entry' may be used
   uninitialized in this function

Signed-off-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000e: fix double release of mutex
Jeff Kirsher [Fri, 12 Dec 2008 05:28:11 +0000 (21:28 -0800)]
e1000e: fix double release of mutex

During a reset, releasing the swflag after it failed to be acquired would
cause a double unlock of the mutex.  Instead, test whether acquisition of
the swflag was successful and if not, do not release the swflag.  The reset
must still be done to bring the device to a quiescent state.

This resolves [BUG 12200] BUG: bad unlock balance detected! e1000e
http://bugzilla.kernel.org/show_bug.cgi?id=12200

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: Add support for the KS8695 ethernet devices.
Daniel Silverstone [Fri, 12 Dec 2008 05:00:29 +0000 (21:00 -0800)]
net: Add support for the KS8695 ethernet devices.

Implements the KS8695 ethernet device (ks8695net).

This driver is only of use on the KS8695 which is an ARM9 based SoC. The
documentation on this SoC is sparse and poor, with barely a register
description and a rough outline of how the ethernet works, this driver was
therefore written with strong reference to the Micrel supplied Linux 2.6.9
port, and to Andrew Victor's ks8695eth driver.

Signed-off-by: Daniel Silverstone <dsilvers@simtec.co.uk>
Signed-off-by: Vincent Sanders <vince@simtec.co.uk>
Acked-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotc35815: Enable StripCRC feature
Atsushi Nemoto [Fri, 12 Dec 2008 04:58:04 +0000 (20:58 -0800)]
tc35815: Enable StripCRC feature

The chip can strip CRC automatically on receiving.  Enable it.

Also fix potential RX_BUF_SIZE calculation bug which was obscured by
alignment.  And use proper symbols (NET_IP_ALIGN, ETH_FCS_LEN, etc.)
instead of magic numbers.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosmsc9420: SMSC LAN9420 10/100 PCI ethernet adapter
Steve Glendinning [Fri, 12 Dec 2008 04:54:30 +0000 (20:54 -0800)]
smsc9420: SMSC LAN9420 10/100 PCI ethernet adapter

This patch adds a driver for the LAN9240 PCI ethernet adapter.

Changes since initial submission:
 - debug msg_level has been changed to use standard definitions
 - convert to use net_device_ops

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoigb: fixup AER with proper error handling
Jeff Kirsher [Fri, 12 Dec 2008 04:34:19 +0000 (20:34 -0800)]
igb: fixup AER with proper error handling

Based on Peter Waskiewicz patch for ixgbe.  Add error handling based on
Hemminger's recommendation.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agopowerpc/40x: Add proper BOOTCFLAGS for cuboot-acadia
Josh Boyer [Tue, 25 Nov 2008 06:33:35 +0000 (06:33 +0000)]
powerpc/40x: Add proper BOOTCFLAGS for cuboot-acadia

The cuboot-acadia.c wrapper can cause assembler errors on some
toolchains due to the lack of the proper BOOTCFLAGS.  This adds
the proper flags for the file.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
15 years agoi2c-highlander: Trivial endian casting fixes
Harvey Harrison [Thu, 11 Dec 2008 11:11:21 +0000 (12:11 +0100)]
i2c-highlander: Trivial endian casting fixes

Fixes sparse warnings:
drivers/i2c/busses/i2c-highlander.c:95:26: warning: incorrect type in argument 1 (different base types)
drivers/i2c/busses/i2c-highlander.c:95:26:    expected restricted __be16 const [usertype] *p
drivers/i2c/busses/i2c-highlander.c:95:26:    got unsigned short [usertype] *<noident>
drivers/i2c/busses/i2c-highlander.c:106:15: warning: incorrect type in assignment (different base types)
drivers/i2c/busses/i2c-highlander.c:106:15:    expected unsigned short [unsigned] [short] [usertype] <noident>
drivers/i2c/busses/i2c-highlander.c:106:15:    got restricted __be16

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Ben Dooks <ben-linux@fluff.org>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years agoi2c-pmcmsp: Fix endianness misannotation
Harvey Harrison [Thu, 11 Dec 2008 11:11:20 +0000 (12:11 +0100)]
i2c-pmcmsp: Fix endianness misannotation

tmp is used as host-endian and is loaded from a be64, fix the cast and the
endian accessor used.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years ago[ARM] 5341/2: there is no copy_page on nommu ARM
Nicolas Pitre [Tue, 9 Dec 2008 02:13:39 +0000 (03:13 +0100)]
[ARM] 5341/2: there is no copy_page on nommu ARM

... as it is defined with memcpy, therefore no copy_page symbol to
export.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agonetfilter: xt_NFLOG is dependant of nfnetlink_log
Eric Leblond [Thu, 11 Dec 2008 01:24:33 +0000 (17:24 -0800)]
netfilter: xt_NFLOG is dependant of nfnetlink_log

The patch "don't call nf_log_packet in NFLOG module" make xt_NFLOG
dependant of nfnetlink_log. This patch forces the dependencies to fix
compilation in case only xt_NFLOG compilation was asked and modifies the
help message accordingly to the change.

Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoRevert "radeonfb: accelerate imageblit and other improvements"
Linus Torvalds [Wed, 10 Dec 2008 17:26:17 +0000 (09:26 -0800)]
Revert "radeonfb: accelerate imageblit and other improvements"

This reverts commit b1ee26bab14886350ba12a5c10cbc0696ac679bf, along with
the "fixes" for it that all just caused problems:

 - c4c6fa9891f3d1bcaae4f39fb751d5302965b566 "radeonfb: fix problem with
   color expansion & alignment"

 - f3179748a157c21d44d929fd3779421ebfbeaa93 "radeonfb: Disable new color
   expand acceleration unless explicitely enabled"

because even when disabled, it breaks for people. See

http://bugzilla.kernel.org/show_bug.cgi?id=12191

for the latest example.

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: Krzysztof Halasa <khc@pm.waw.pl>
Cc: James Cloos <cloos@jhcloos.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: Jean-Luc Coulon <jean.luc.coulon@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agonetns: ip6mr: enable namespace support in ipv6 multicast forwarding code
Benjamin Thery [Thu, 11 Dec 2008 00:30:15 +0000 (16:30 -0800)]
netns: ip6mr: enable namespace support in ipv6 multicast forwarding code

This last patch makes the appropriate changes to use and propagate the
network namespace where needed in IPv6 multicast forwarding code.

This consists mainly in replacing all the remaining init_net occurences
with current netns pointer retrieved from sockets, net devices or
mfc6_caches depending on the routines' contexts.

Some routines receive a new 'struct net' parameter to propagate the current
netns:
* ip6mr_get_route
* ip6mr_cache_report
* ip6mr_cache_find
* ip6mr_cache_unresolved
* mif6_add/mif6_delete
* ip6mr_mfc_add/ip6mr_mfc_delete
* ip6mr_reg_vif

All the IPv6 multicast forwarding variables moved to struct netns_ipv6 by
the previous patches are now referenced in the correct namespace.

Changelog:
==========
* Take into account the net associated to mfc6_cache when matching entries in
  mfc_unres_queue list.
* Call mroute_clean_tables() in ip6mr_net_exit() to free memory allocated
  per-namespace.
* Call dev_net_set() in ip6mr_reg_vif() to initialize dev->nd_net
  correctly.

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetns: ip6mr: declare ip6mr /proc/net entries per-namespace
Benjamin Thery [Thu, 11 Dec 2008 00:29:48 +0000 (16:29 -0800)]
netns: ip6mr: declare ip6mr /proc/net entries per-namespace

Declare IPv6 multicast forwarding /proc/net entries per-namespace:
/proc/net/ip6_mr_vif
/proc/net/ip6_mr_cache

Changelog
=========
V2:
* In routine ipmr_mfc_seq_idx(), only match entries belonging to current
  netns in mfc_unres_queue list.

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetns: ip6mr: declare reg_vif_num per-namespace
Benjamin Thery [Thu, 11 Dec 2008 00:29:24 +0000 (16:29 -0800)]
netns: ip6mr: declare reg_vif_num per-namespace

Preliminary work to make IPv6 multicast forwarding netns-aware.

Declare variable 'reg_vif_num' per-namespace, moves into struct netns_ipv6.

At the moment, this variable is only referenced in init_net.

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetns: ip6mr: declare mroute_do_assert and mroute_do_pim per-namespace
Benjamin Thery [Thu, 11 Dec 2008 00:28:44 +0000 (16:28 -0800)]
netns: ip6mr: declare mroute_do_assert and mroute_do_pim per-namespace

Preliminary work to make IPv6 multicast forwarding netns-aware.

Declare IPv6 multicast forwarding variables 'mroute_do_assert' and
'mroute_do_pim' per-namespace in struct netns_ipv6.

At the moment, these variables are only referenced in init_net.

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetns: ip6mr: declare counter cache_resolve_queue_len per-namespace
Benjamin Thery [Thu, 11 Dec 2008 00:27:21 +0000 (16:27 -0800)]
netns: ip6mr: declare counter cache_resolve_queue_len per-namespace

Preliminary work to make IPv6 multicast forwarding netns-aware.

Declare variable cache_resolve_queue_len per-namespace: moves it into
struct netns_ipv6.

This variable counts the number of unresolved cache entries queued in the
list mfc_unres_queue. This list is kept global to all netns as the number
of entries per namespace is limited to 10 (hardcoded in routine
ip6mr_cache_unresolved).
Entries belonging to different namespaces in mfc_unres_queue will be
identified by matching the mfc_net member introduced previously in
struct mfc6_cache.

Keeping this list global to all netns, also allows us to keep a single
timer (ipmr_expire_timer) to handle their expiration.
In some places cache_resolve_queue_len value was tested for arming
or deleting the timer. These tests were equivalent to testing
mfc_unres_queue value instead and are replaced in this patch.

At the moment, cache_resolve_queue_len is only referenced in init_net.

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>