pandora-kernel.git
15 years agostaging-p80211: Kill directly reference of netdev->priv
Wang Chen [Sun, 7 Dec 2008 07:58:37 +0000 (23:58 -0800)]
staging-p80211: Kill directly reference of netdev->priv

In this driver, netdev's private data is wlandevice_t.  And the
wlandev(type of wlandevice_t) is exist before netdev be allocated.  So
use netdev->ml_priv to point to the private data.

I am not sure whether I should consider the kernel version older than
2.3.38.  Because in those kernels, netdevice_t is "structure dev"
instead of "structure net_device" and of course "dev->ml_priv" will
cause compile error.  But before my patch, in function wlan_setup(),
there is a ether_setup(net_device) which already broke kernels which
older than 2.3.38.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agos390_net: Kill directly reference of netdev->priv
Wang Chen [Sun, 7 Dec 2008 07:57:49 +0000 (23:57 -0800)]
s390_net: Kill directly reference of netdev->priv

The private data comes from ccwgroup_device.
So just don't allocate private data memory when do alloc_netdev()
and use netdev->ml_priv to reference private data.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: Fix incorrect use of loose in spider_net.c
Nick Andrew [Sun, 7 Dec 2008 07:57:14 +0000 (23:57 -0800)]
net: Fix incorrect use of loose in spider_net.c

Fix incorrect use of loose in spider_net.c

It should be 'lose', not 'loose'.

Signed-off-by: Nick Andrew <nick@nick-andrew.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agowireless: Fix incorrect use of loose in wext.c
Nick Andrew [Sun, 7 Dec 2008 07:55:32 +0000 (23:55 -0800)]
wireless: Fix incorrect use of loose in wext.c

Fix incorrect use of loose in wext.c

It should be 'lose', not 'loose'.

Signed-off-by: Nick Andrew <nick@nick-andrew.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcp: fix tso_should_defer in 64bit
Ilpo Järvinen [Sat, 6 Dec 2008 06:49:37 +0000 (22:49 -0800)]
tcp: fix tso_should_defer in 64bit

Since jiffies is unsigned long, the types get expanded into
that and after long enough time the difference will therefore
always be > 1 (and that probably happens near boot as well as
iirc the first jiffies wrap is scheduler close after boot to
find out problems related to that early).

This was originally noted by Bill Fink in Dec'07 but nobody
never ended fixing it.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcp: use tcp_write_xmit also in tcp_push_one
Ilpo Järvinen [Sat, 6 Dec 2008 06:48:55 +0000 (22:48 -0800)]
tcp: use tcp_write_xmit also in tcp_push_one

tcp_minshall_update is not significant difference since it only
checks for not full-sized skb which is BUG'ed on the push_one
path anyway.

tcp_snd_test is tcp_nagle_test+tcp_cwnd_test+tcp_snd_wnd_test,
just the order changed slightly.

net/ipv4/tcp_output.c:
  tcp_snd_test              |  -89
  tcp_mss_split_point       |  -91
  tcp_may_send_now          |  +53
  tcp_cwnd_validate         |  -98
  tso_fragment              | -239
  __tcp_push_pending_frames | -1340
  tcp_push_one              | -146
 7 functions changed, 53 bytes added, 2003 bytes removed, diff: -1950

net/ipv4/tcp_output.c:
  tcp_write_xmit | +1772
 1 function changed, 1772 bytes added, diff: +1772

tcp_output.o.new:
 8 functions changed, 1825 bytes added, 2003 bytes removed, diff: -178

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Sat, 6 Dec 2008 06:54:40 +0000 (22:54 -0800)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

Conflicts:

drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-sta.c

15 years agotcp: move some parts from tcp_write_xmit
Ilpo Järvinen [Sat, 6 Dec 2008 06:43:56 +0000 (22:43 -0800)]
tcp: move some parts from tcp_write_xmit

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcp: share code through function, not through copy-paste. :-)
Ilpo Järvinen [Sat, 6 Dec 2008 06:43:26 +0000 (22:43 -0800)]
tcp: share code through function, not through copy-paste. :-)

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcp: drop tcp_bound_rto, merge content of it tcp_set_rto
Ilpo Järvinen [Sat, 6 Dec 2008 06:43:08 +0000 (22:43 -0800)]
tcp: drop tcp_bound_rto, merge content of it tcp_set_rto

Both are called by the same sites.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcp: no need to pass prev skb around, reduces arg pressure
Ilpo Järvinen [Sat, 6 Dec 2008 06:42:41 +0000 (22:42 -0800)]
tcp: no need to pass prev skb around, reduces arg pressure

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcp: introduce struct tcp_sacktag_state to reduce arg pressure
Ilpo Järvinen [Sat, 6 Dec 2008 06:42:22 +0000 (22:42 -0800)]
tcp: introduce struct tcp_sacktag_state to reduce arg pressure

There are just too many args to some sacktag functions. This
idea was first proposed by David S. Miller around a year ago,
and the current situation is much worse that what it was back
then.

tcp_sacktag_one can be made a bit simpler by returning the
new sacked (it can be achieved with a single variable though
the previous code "caching" sacked into a local variable and
therefore it is not exactly equal but the results will be the
same).

codiff on x86_64
  tcp_sacktag_one         |  -15
  tcp_shifted_skb         |  -50
  tcp_match_skb_to_sack   |   -1
  tcp_sacktag_walk        |  -64
  tcp_sacktag_write_queue |  -59
  tcp_urg                 |   +1
  tcp_event_data_recv     |   -1
 7 functions changed, 1 bytes added, 190 bytes removed, diff: -189

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcp: make mtu probe failure to not break gso'ed skbs unnecessarily
Ilpo Järvinen [Sat, 6 Dec 2008 06:41:26 +0000 (22:41 -0800)]
tcp: make mtu probe failure to not break gso'ed skbs unnecessarily

I noticed that since skb->len has nothing to do with actual segment
length with gso, we need to figure it out separately, reuse
a function from the recent shifting stuff (generalize it).

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcp: Fix thinko making the not-shiftable to cover S|R as well
Ilpo Järvinen [Sat, 6 Dec 2008 06:41:06 +0000 (22:41 -0800)]
tcp: Fix thinko making the not-shiftable to cover S|R as well

S|R won't result in S if just SACK is received. DSACK is
another story (but it is covered correctly already).

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcp: force mss equality with the next skb too.
Ilpo Järvinen [Sat, 6 Dec 2008 06:40:47 +0000 (22:40 -0800)]
tcp: force mss equality with the next skb too.

Also make if-goto forest nicer looking.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodccp: use roundup instead of opencoding
Ilpo Järvinen [Sat, 6 Dec 2008 06:39:49 +0000 (22:39 -0800)]
dccp: use roundup instead of opencoding

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotty: driverdata and discdata are void *
Alan Cox [Sat, 6 Dec 2008 06:32:22 +0000 (22:32 -0800)]
tty: driverdata and discdata are void *

Remove all the extra casting while we are cleaning up

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotty: Flags should be accessed via the foo_bit interfaces
Alan Cox [Sat, 6 Dec 2008 06:31:52 +0000 (22:31 -0800)]
tty: Flags should be accessed via the foo_bit interfaces

We have various drivers that poke around directly and we need to clean this
up before it causes problems.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Sat, 6 Dec 2008 06:23:34 +0000 (22:23 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next-2.6

15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Sat, 6 Dec 2008 06:09:56 +0000 (22:09 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

15 years agoigb/e1000e: Naming interrupt vectors
Alexander Duyck [Fri, 5 Dec 2008 23:08:03 +0000 (15:08 -0800)]
igb/e1000e: Naming interrupt vectors

Change interrupt vector naming to match recent changes from Robert Olsson.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoath9k: Use GFP_ATOMIC when allocating TX private area
Luis R. Rodriguez [Wed, 3 Dec 2008 11:35:30 +0000 (03:35 -0800)]
ath9k: Use GFP_ATOMIC when allocating TX private area

Using GFP_KERNEL was wrong and produces a 'scheduling while atomic'
bug as we're in a tasklet. Also, check for proper return values
now, in case allocation fails and be sure to stop the TX queue
in case of memory issues but gaurantee the TX queue will
eventually be woken up.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Check for pci_map_single() errors
Luis R. Rodriguez [Wed, 3 Dec 2008 11:35:29 +0000 (03:35 -0800)]
ath9k: Check for pci_map_single() errors

pci_map_single() can fail so detect those errors with
pci_dma_mapping_error() and deal with them accordingly.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Correctly initialize AID during set_key()
Ivo van Doorn [Wed, 3 Dec 2008 16:30:22 +0000 (17:30 +0100)]
rt2x00: Correctly initialize AID during set_key()

Request the AID from hardware and provide this id
to the driver (in case they need it).

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Move crypto TX descriptor handling to rt2x00crypto.c
Ivo van Doorn [Wed, 3 Dec 2008 16:29:48 +0000 (17:29 +0100)]
rt2x00: Move crypto TX descriptor handling to rt2x00crypto.c

Move all code which determines the right TX descriptor
fields specific to crypto support into rt2x00crypto.c.
This makes the code in rt2x00queue more simpler and
better concentrates all crypto code into a single location.

With this we can also remove some ifdefs in rt2x00queue.c
since the code inside the ifdef is either very small, or
only calling empty functions (see empty function definitions
in rt2x00lib.h).

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Fix check for BSS info changes
Ivo van Doorn [Wed, 3 Dec 2008 16:29:21 +0000 (17:29 +0100)]
rt2x00: Fix check for BSS info changes

Fix ERP configuration, due to a too strict changes
flags checking we never updated the short slot time
or basic rate mask when no other changes were made
at the same time.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agogeneric swap(): ath9k: rename swap() to swap_array()
Wu Fengguang [Wed, 3 Dec 2008 08:19:04 +0000 (00:19 -0800)]
generic swap(): ath9k: rename swap() to swap_array()

In preparation for the introduction of a generic swap() macro.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Cc: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Cc: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Cc: Senthil Balasubramanian <senthilkumar@atheros.com>
Cc: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Add RXDONE_CRYPTO_IV/ICV flags
Ivo van Doorn [Tue, 2 Dec 2008 21:50:33 +0000 (22:50 +0100)]
rt2x00: Add RXDONE_CRYPTO_IV/ICV flags

Drivers should notify rt2x00lib when they provide
the IV/ICV data. This adds some flexibility to drivers
which can't provide all information.
* rt2500usb provides ICV inside the frame
* rt2800pci doesn't provide IV/ICV
* rt2800usb doesn't provide IV/ICV

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945 : Fix a-band association for passive channels
Abhijeet Kolekar [Tue, 2 Dec 2008 20:14:07 +0000 (12:14 -0800)]
iwl3945 : Fix a-band association for passive channels

Patch does following things
    1) This patch fixes the a-band association for passive channels with new
    uCode feature that it allows direct scan on passive channels after
    auto-switch from passive to active. This enables sending of direct probes
    on passive channels, as long as some traffic is detected on that channel.
    This improves the scanning for hidden SSIDs in A-band,which is all
    passive channels.

    This patch fixes the bug no 1748.

        http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1748

    2) This fix will only work with uCode version 15.28.2.8 and above.
    Prior versions of uCode would work only if we heard the traffic within
     active dwell time, which is much shorter than passive dwell time and
    is shorter than typical beacon periods. This patch also provids full
    active dwell time even if we hear traffic late in passive dwell.

    3) uCode API version is incremented to 2.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Acked-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>
15 years agoiwlwifi: rely on API version read from firmware
Reinette Chatre [Tue, 2 Dec 2008 20:14:06 +0000 (12:14 -0800)]
iwlwifi: rely on API version read from firmware

This adds the infrastructure to support older firmware APIs.
The API version number is stored as part of the filename, we first try to
load the most recent firmware and progressively try lower versions.
The API version is also read from the firmware self and stored as part
of the iwl_priv structure. Only firmware that is supported by driver will
be loaded. The version number read from firmware is compared
to supported versions in the driver not the API version used as part of
filename.

An example using this new infrastrucure:
   if (IWL_UCODE_API(priv->ucode_ver) >= 2) {
        Driver interacts with Firmware API version >= 2.
   } else {
        Driver interacts with Firmware API version 1.
   }

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: store ucode version number
Chatre, Reinette [Tue, 2 Dec 2008 20:14:05 +0000 (12:14 -0800)]
iwlwifi: store ucode version number

We store the ucode version number as part of
iwl_priv/iwl3945_priv. This enables us to determine
if particular ucode has support for features in order
to have driver support more than one ucode API.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: fix DMA channel number in iwl_txq_ctx_stop
Zhu Yi [Tue, 2 Dec 2008 20:14:04 +0000 (12:14 -0800)]
iwlwifi: fix DMA channel number in iwl_txq_ctx_stop

The patch fixes the misuse of DMA channel number by Tx queue number in
iwl_tx_ctx_stop().

The problem was originally reported by Wu Fengguang who complains
iwlagn driver takes too long time when issuing `ifconfig wlan0 down`.
The patch now decreases the interface bring down time from 2 seconds
to 0.8 second.

This fixes bugs:
http://bugzilla.kernel.org/show_bug.cgi?id=11956
http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1790

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Tested-by: Fengguang Wu <fengguang.wu@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 iwl3945 rate scaling.
Abbas, Mohamed [Tue, 2 Dec 2008 20:14:03 +0000 (12:14 -0800)]
iwl3945: Fix iwl3945 rate scaling.

3945 rate scaling was broken in recent tree. This patch fix the following:
1- Get TX response info and update rates window.
2- Rate scaling selection.
3- Flush window timer.

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 agoiwl3945: add debugfs support
Abbas, Mohamed [Tue, 2 Dec 2008 20:14:02 +0000 (12:14 -0800)]
iwl3945: add debugfs support

Add debugfs support to 3945 driver to display rs info.

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: move channels sysfs to debugfs
Winkler, Tomas [Tue, 2 Dec 2008 20:14:01 +0000 (12:14 -0800)]
iwlwifi: move channels sysfs to debugfs

This patch moves channels info display from sysfs to debugfs.
This shows channel information as stored in NIC EEPROM. This
is useful in debugging CRDA or iwl goes setting so it belongs
rather to debugfs then to sysfs.

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: move disable/enable interrupts to iwl-core.c
Winkler, Tomas [Tue, 2 Dec 2008 20:14:00 +0000 (12:14 -0800)]
iwlwifi: move disable/enable interrupts to iwl-core.c

This patch moves iwl_enable_interrupts and iwl_disable_interrupts
functions to iwl-core.c

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 agoiwl3945: Select correct sta ID from find_station()
Samuel Ortiz [Tue, 2 Dec 2008 20:13:59 +0000 (12:13 -0800)]
iwl3945: Select correct sta ID from find_station()

The find_station routine needs to look at the IWL_AP_ID entry if we're a STA.
Currently, it only looks for STA entries which causes HW crypto to fail.

Signed-off-by: Samuel Ortiz <samuel.ortiz@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 printk size format error
Zhu Yi [Tue, 2 Dec 2008 20:13:58 +0000 (12:13 -0800)]
iwlwifi: fix printk size format error

The patch fixes a printk size format error.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: move host command check function into separate file
Winkler, Tomas [Tue, 2 Dec 2008 20:13:57 +0000 (12:13 -0800)]
iwlwifi: move host command check function into separate file

This patch moves iwl_check_rxon_cmd into iwl-agn-hcmd-check.c
This function compiled out in none debugging or non development
mode and more. We haven't decided which one yet hence preserving the
current 'always compile' state.
More functions will be added to the file namely for checking TX and LQ
commands.

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 agort2x00: Release rt2x00 2.2.3
Ivo van Doorn [Tue, 2 Dec 2008 17:20:59 +0000 (18:20 +0100)]
rt2x00: Release rt2x00 2.2.3

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Implement HW encryption (rt2500usb)
Ivo van Doorn [Tue, 2 Dec 2008 17:20:42 +0000 (18:20 +0100)]
rt2x00: Implement HW encryption (rt2500usb)

rt2500usb supports hardware encryption.
rt2500usb supports up to 4 shared and pairwise keys.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Remove duplicate code
Ivo van Doorn [Tue, 2 Dec 2008 17:20:22 +0000 (18:20 +0100)]
rt2x00: Remove duplicate code

Simplify rt2x00lib_config_antenna() by moving
duplicate code into a seperate static inlined
function.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Store retry limit values
Ivo van Doorn [Tue, 2 Dec 2008 17:20:04 +0000 (18:20 +0100)]
rt2x00: Store retry limit values

Store retry limit values in the rt2x00dev structure.
This allows the removal of the FIXME where we assumed
the long retry is only used when working with RTS frames.

Instead we should check the current retry limit values
and decide if the required retry count for this frame
is a long or short retry.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Optimize IV/EIV handling
Ivo van Doorn [Tue, 2 Dec 2008 17:19:48 +0000 (18:19 +0100)]
rt2x00: Optimize IV/EIV handling

IV and EIV belong to eachother and don't require
2 seperate fields. Instead they can logically be
merged into a single array with size 2.

With this approach we can simplify the code in
rt2x00crypto.c by using a single memcpy() when
copying the iv/eiv data. Additionally we can
move some code out of if-statements because the
if-statement would always be true.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Choose correct ANI calibration period
Sujith [Tue, 2 Dec 2008 13:07:54 +0000 (18:37 +0530)]
ath9k: Choose correct ANI calibration period

ANI can't be turned on/off dynamically yet, but the calculation
of the calibration period is wrong anyway. This patch fixes it.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: 5150 enable LO, TXIQ and BB calibrations
Winkler, Tomas [Tue, 2 Dec 2008 00:32:22 +0000 (16:32 -0800)]
iwlwifi: 5150 enable LO, TXIQ and BB calibrations

This patch enables LO, TXIQ, and BB calibrations for 5150

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: 5150 parametrize eeprom versions
Tomas Winkler [Tue, 2 Dec 2008 00:32:21 +0000 (16:32 -0800)]
iwlwifi: 5150 parametrize eeprom versions

Add support for 5150 eeprom versions

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: 5150 compute ct kill threshold
Tomas Winkler [Tue, 2 Dec 2008 00:32:20 +0000 (16:32 -0800)]
iwlwifi: 5150 compute ct kill threshold

This patch adds computation of ct kill threshold
for 5150. Threshold is computed from calibration
data in the EEPROM.

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: 5150 enable DC calibration
Tomas Winkler [Tue, 2 Dec 2008 00:32:19 +0000 (16:32 -0800)]
iwlwifi: 5150 enable DC calibration

This patch enables DC calibration for 5150

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: 5150 add support for 5150
Tomas Winkler [Tue, 2 Dec 2008 00:32:18 +0000 (16:32 -0800)]
iwlwifi: 5150 add support for 5150

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 agoath9k: Replace ath9k_opmode with nl80211_iftype
Colin McCabe [Mon, 1 Dec 2008 21:38:55 +0000 (13:38 -0800)]
ath9k: Replace ath9k_opmode with nl80211_iftype

This patch kills ath9k's ath9k_opmode enum by replacing it with nl80211_iftype.

Signed-off-by: Colin McCabe <colin@cozybit.com>
Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: disable AP mode
Johannes Berg [Mon, 1 Dec 2008 17:50:27 +0000 (18:50 +0100)]
iwlwifi: disable AP mode

iwlwifi does not support AP mode in any way. For one, it doesn't even
buffer multicast/broadcast frames properly. We didn't allow zd1211rw AP
mode to be enabled without this, so iwlwifi shouldn't be allowed to
advertise AP mode either.

It also doesn't work at all, it doesn't even answer to probe requests,
I'm guessing the packet injection code was disabled again.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: fix lm87 checksum endianness
Johannes Berg [Mon, 1 Dec 2008 17:19:36 +0000 (18:19 +0100)]
p54: fix lm87 checksum endianness

This fixes the checksum calculation for lm87 firmwares
on big endian platforms, the device treats the data as
an array of 32-bit little endian values so the driver
needs to do that as well.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: "fix" 11d oops
Johannes Berg [Mon, 1 Dec 2008 17:13:05 +0000 (18:13 +0100)]
cfg80211: "fix" 11d oops

This "fixes" the 11d oops I was seeing. This needs some more work but I
cannot work on it now.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945: remove obsolete irq handling
Helmut Schaa [Mon, 1 Dec 2008 15:53:28 +0000 (16:53 +0100)]
iwl3945: remove obsolete irq handling

3945 hardware does not emit the interrupts CSR_INT_BIT_RF_KILL (rfkill
toggled) and CSR_INT_BIT_CT_KILL (adapter too hot). Hence this part of code
can be removed since iwl3945_irq_tasklet does not handle 4965 hw at all.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: tx module cleanup.
Rami Rosen [Mon, 1 Dec 2008 11:56:55 +0000 (13:56 +0200)]
mac80211: tx module cleanup.

This patch removes unnecessary parameter in ieee80211_beacon_add_tim() and
removes unneeded definition and assignment for bdev (instance of net_device) in
ieee80211_beacon_get() and in ieee80211_get_buffered_bc()
(all in tx.c).

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: fix wiphy remove if no regulatory request
Johannes Berg [Mon, 1 Dec 2008 11:07:56 +0000 (12:07 +0100)]
cfg80211: fix wiphy remove if no regulatory request

Fixes the segfault I just pointed out.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: document ieee80211_tx_info.pad
Kalle Valo [Sun, 30 Nov 2008 18:56:28 +0000 (20:56 +0200)]
mac80211: document ieee80211_tx_info.pad

Fixes htmldocs warning:

Warning(mac80211.h:379): No description found for parameter 'pad[2]'

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: per-device names
Christian Lamparter [Sat, 29 Nov 2008 21:39:08 +0000 (22:39 +0100)]
p54: per-device names

This patch replaces the static "p54:" strings in front of most printk's
with their corresponding per-device names.

It was always a bit of a hassle to check which device was
generating all the messages.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: refactoring
Christian Lamparter [Sat, 29 Nov 2008 21:37:31 +0000 (22:37 +0100)]
p54: refactoring

Thanks to the introduction of "changed" flags, we no longer
have to do the bookkeeping of p54's firmware state for everything.
Thus we can cut down redundancy code.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: include support for 2.13.24.0 USB LM87 Firmwares
Christian Lamparter [Sat, 29 Nov 2008 21:35:43 +0000 (22:35 +0100)]
p54: include support for 2.13.24.0 USB LM87 Firmwares

Those firmwares are probably capable of reprogramming the device's eeprom.
We better support them officially, before all the accidents happen.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: utilize cryptographic accelerator
Christian Lamparter [Sat, 29 Nov 2008 21:34:37 +0000 (22:34 +0100)]
p54: utilize cryptographic accelerator

This patch allows p54 to utilize its WEP, TKIP and CCMP accelerator.

Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: revamp station power save management in access point mode
Christian Lamparter [Sat, 29 Nov 2008 21:33:57 +0000 (22:33 +0100)]
p54: revamp station power save management in access point mode

This patch addresses the problem in:
http://marc.info/?l=linux-wireless&m=122727674810057&w=2

Thanks to Stefan Steuerwald <salsasepp@googlemail.com>
extensive iPod touch tests. We could finally squash some bugs in
p54's master mode / access point implementation.

Let's hope we got everything right this time and all stations
from now on will wake up on TIM and receive their queued frames
and go to sleep again without any hiccups.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: add sta_notify_ps callback
Christian Lamparter [Sat, 29 Nov 2008 23:48:41 +0000 (00:48 +0100)]
mac80211: add sta_notify_ps callback

This patch is necessary in order to provide a proper Access point support for p54.
Unfortunately for us, there is no documented way to disable the interfering
power save buffering mechanism in firmware completely.

Therefore we give in and notify the driver through our new sta_notify_ps callback,
so that we can update the filter state.

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 agoath9k: Add a debugfs file for dumping DMA status
Sujith [Fri, 28 Nov 2008 16:51:08 +0000 (22:21 +0530)]
ath9k: Add a debugfs file for dumping DMA status

Debugfs file location: ath9k/<wiphy>/dma
Contains values in DMA debug registers.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Add initial layout for an ath9k specific debugfs mechanism
Sujith [Fri, 28 Nov 2008 16:50:23 +0000 (22:20 +0530)]
ath9k: Add initial layout for an ath9k specific debugfs mechanism

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Remove includes that are not needed
Sujith [Fri, 28 Nov 2008 16:49:42 +0000 (22:19 +0530)]
ath9k: Remove includes that are not needed

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Add ATH9K_DEBUG configuration option
Sujith [Fri, 28 Nov 2008 16:49:02 +0000 (22:19 +0530)]
ath9k: Add ATH9K_DEBUG configuration option

Make debugging configurable, and add a module parameter
to give the debug mask.
Add debug.c to hold all debug specific code.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Use cleaner debug masks
Sujith [Fri, 28 Nov 2008 16:48:05 +0000 (22:18 +0530)]
ath9k: Use cleaner debug masks

Remove all the useless __func__ prefixes in debug messages,
and replace the DPRINTF macro with a function.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agortl8187: fix retry count passed in rtl8187_tx
herton [Fri, 28 Nov 2008 00:53:24 +0000 (22:53 -0200)]
rtl8187: fix retry count passed in rtl8187_tx

I mistakenly changed retry count passed in rtl8187_tx in previous change
"rtl8187: feedback transmitted packets using tx close descriptor for
8187B". For 8187 it should represent the number of retries (retry count
limit). As explained by Johannes Berg, .count represents the number of
tries (not retries), and retries = tries - 1.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Tested-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowireless: clean up radiotap a bit
Johannes Berg [Thu, 27 Nov 2008 22:13:38 +0000 (23:13 +0100)]
wireless: clean up radiotap a bit

No need to pad the header so no constant needed for that,
no need to carry any version number from netbsd nor CVS
IDs from them.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Handle channel initialization for AP mode
Sujith [Thu, 27 Nov 2008 04:16:27 +0000 (09:46 +0530)]
ath9k: Handle channel initialization for AP mode

Hostapd now passes the HT parameters through the config()
callback, use these to set the appropriate channel in AP mode.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: accept empty strings for hidden SSIDs
Fabio Rossi [Wed, 26 Nov 2008 21:44:23 +0000 (22:44 +0100)]
mac80211: accept empty strings for hidden SSIDs

Some access points (e.g. Sitecom WL-174) use an empty string as hidden SSID.

Signed-off-by: Fabio Rossi <rossi.f@inwind.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: handle SIOCGIWMODE/SIOCSIWMODE
Johannes Berg [Wed, 26 Nov 2008 22:31:40 +0000 (23:31 +0100)]
cfg80211: handle SIOCGIWMODE/SIOCSIWMODE

further reducing wext code in mac80211.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: handle SIOCGIWNAME
Johannes Berg [Wed, 26 Nov 2008 21:36:31 +0000 (22:36 +0100)]
cfg80211: handle SIOCGIWNAME

This patch moves the SIOCGIWNAME handling from mac80211 to cfg80211.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: enable combined michael mic in key cache
Bob Copeland [Wed, 26 Nov 2008 21:17:25 +0000 (16:17 -0500)]
ath5k: enable combined michael mic in key cache

For mac revisions >= "Griffin," the hardware allows the mic tx and rx
authenticator keys to share the same cache line, whereas earlier
hardware can only store the rx.  Enable the combined mic on hardware
that supports it.

Changes to ath5k.h
Changes-licensed-under: 3-Clause-BSD

Changes to attach.c, pcu.c, reg.h
Changes-licensed-under: ISC

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: clean up ath5k_hw_set_key
Bob Copeland [Wed, 26 Nov 2008 01:55:21 +0000 (20:55 -0500)]
ath5k: clean up ath5k_hw_set_key

Status: O

With the addition of TKIP (and soon CCMP), key->alg is a more useful
guide to key type than the key length.

This patch cleans up key type assignment in ath5k_hw_set_key by
extracting it into its own function.  It also replaces the separate
memcpy() calls for extracting key material into the hardware format
with a loop that works regardless of key size.

Finally, the patch removes support for WEP-128 since it is a
non-standard key length that mac80211 also doesn't use.

Changes-licensed-under: ISC
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: preserve higher order bits when setting mac address
Bob Copeland [Wed, 26 Nov 2008 21:17:11 +0000 (16:17 -0500)]
ath5k: preserve higher order bits when setting mac address

In some cases we would like to set the mac address without changing
the operating mode.  However, Atheros cards store PCU data in the high
16 bits of the mac address register.  Change ath5k_hw_set_lladdr() to
not clobber the PCU settings.

Changes-licensed-under: ISC
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: remove uses of __constant_{endian} helpers
Harvey Harrison [Wed, 26 Nov 2008 21:12:52 +0000 (13:12 -0800)]
iwlwifi: remove uses of __constant_{endian} helpers

The base versions handle constant folding just fine.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agonl80211: relicense nl80211.h under the ISC
Luis R. Rodriguez [Wed, 26 Nov 2008 21:03:08 +0000 (13:03 -0800)]
nl80211: relicense nl80211.h under the ISC

We have a few BSD/ISC licensed userspace applications which
include nl80211.h from the kernel. To avoid legal ambiguity
for usage of the header file in these projects we rather simply
relicense the header file under the ISC. We've received consent
from all contributors to it.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Michael Wu <flamingice@sourmilk.net>
Acked-by: Luis Carlos Cobo <luisca@cozybit.com>
Acked-by: Michael Buesch <mb@bu3sch.de>
Acked-by: Jouni Malinen <jouni.malinen@atheros.com>
Acked-by: Colin McCabe <colin@cozybit.com>
Acked-by: Javier Cardona <javier@cozybit.com>
Cc: johannes@sipsolutions.net
Cc: altape@eden.rutgers.edu
Cc: luisca@cozybit.com
Cc: mb@bu3sch.de
Cc: jouni.malinen@atheros.com
Cc: colin@cozybit.com
Cc: javier@cozybit.com
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agonl80211: Add frequency configuration (including HT40)
Jouni Malinen [Wed, 26 Nov 2008 14:15:24 +0000 (16:15 +0200)]
nl80211: Add frequency configuration (including HT40)

This patch adds new NL80211_CMD_SET_WIPHY attributes
NL80211_ATTR_WIPHY_FREQ and NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET to allow
userspace to set the operating channel (e.g., hostapd for AP mode).

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 agomac80211: only transition STAs ps->wake on data frames
Johannes Berg [Wed, 26 Nov 2008 14:02:58 +0000 (15:02 +0100)]
mac80211: only transition STAs ps->wake on data frames

When a station goes to PS mode to scan, it will then send
probe requests without the PS bit set. mac80211 will take
that as indication that the station woke up, but it didn't.
This patch changes mac80211 to only consider doze->wake
transitions on data frames to to fix that issue.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: properly initialize calibration command header
Tomas Winkler [Tue, 25 Nov 2008 21:36:01 +0000 (13:36 -0800)]
iwlwifi: properly initialize calibration command header

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 agomac80211: disassociate prior to unlinking AP/station
Tomas Winkler [Tue, 25 Nov 2008 11:05:44 +0000 (13:05 +0200)]
mac80211: disassociate prior to unlinking AP/station

This patch reorders calls during disassociation in
ieee80211_set_disassoc function.
Since sta_info_unlink calls sta_notify(REMOVE) it will
remove the station representing AP from the driver before
it has disassociated from it using bss_info_changed callback.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: deauth when interface is marked down
John W. Linville [Mon, 1 Dec 2008 19:56:41 +0000 (14:56 -0500)]
mac80211: deauth when interface is marked down

It seems like proper etiquette to let other stations know when we are
going down in either STA or IBSS mode.  This also notifies userland, so
wpa_supplicant doesn't get confused.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agohostap: select required crypto bits in Kconfig
John W. Linville [Wed, 3 Dec 2008 18:55:38 +0000 (13:55 -0500)]
hostap: select required crypto bits in Kconfig

This is fallout from moving the crypto stuff to the new lib80211
component.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agozd1211rw: use unaligned safe memcmp() in-place of compare_ether_addr()
Shaddy Baddah [Fri, 28 Nov 2008 06:10:45 +0000 (17:10 +1100)]
zd1211rw: use unaligned safe memcmp() in-place of compare_ether_addr()

Under my 2.6.28-rc6 sparc64, when associating to an AP through my
zd1211rw device, I was seeing kernel log messages like (not exact output):

  Kernel unaligned access at TPC[10129b68] zd_mac_rx+0x144/0x32c [zd1211rw]

For the zd1211rw module, on RX, the 80211 packet will be located after
the PLCP header in the skb data buffer. The PLCP header being 5 bytes
long, the 80211 header will start unaligned from an aligned skb
buffer.

As per Documentation/unaligned-memory-access.txt, we must replace the
not unaligned() safe compare_ether_addr() with memcmp() to protect
architectures that require alignment.

Signed-off-by: Shaddy Baddah <shaddy_baddah@hotmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: use unaligned safe memcmp() in-place of compare_ether_addr()
Shaddy Baddah [Fri, 28 Nov 2008 06:08:10 +0000 (17:08 +1100)]
mac80211: use unaligned safe memcmp() in-place of compare_ether_addr()

After fixing zd1211rw: use unaligned safe memcmp() in-place of
compare_ether_addr(), I started to see kernel log messages detailing
unaligned access:

  Kernel unaligned access at TPC[100f7f44] sta_info_get+0x24/0x68 [mac80211]

As with the aforementioned patch, the unaligned access was eminating
from a compare_ether_addr() call. Concerned that whilst it was safe to
assume that unalignment was the norm for the zd1211rw, and take
preventative measures, it may not be the case or acceptable to use the
easy fix of changing the call to memcmp().

My research however indicated that it was OK to do this, as there are
a few instances where memcmp() is the preferred mechanism for doing
mac address comparisons throughout the module.

Signed-off-by: Shaddy Baddah <shaddy_baddah@hotmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoipw2200: fix netif_*_queue() removal regression
Zhu Yi [Thu, 27 Nov 2008 05:42:20 +0000 (13:42 +0800)]
ipw2200: fix netif_*_queue() removal regression

In "ipw2200: Call netif_*_queue() interfaces properly", netif_stop_queue()
and netif_wake_queue() were removed with the reason
"netif_carrier_{on,off}() handles starting and stopping packet flow into
the driver". The patch also removes a valid condition check that
ipw_tx_skb() cannot be called if device is not in STATUS_ASSOCIATED state.
But netif_carrier_off() doesn't guarantee netdev->hard_start_xmit won't
be called because linkwatch event is handled in a delayed workqueue. This
caused a kernel oops reported by Frank Seidel:
https://bugzilla.novell.com/show_bug.cgi?id=397390

This patch fixes the problem by moving the STATUS_ASSOCIATED check back
to ipw_tx_skb(). It also adds a missing netif_carrier_off() call to
ipw_disassociate().

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Chatre, Reinette <reinette.chatre@intel.com>
Tested-by: Frank Seidel <fseidel@suse.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: clean key table in iwl_clear_stations_table function
Tomas Winkler [Tue, 25 Nov 2008 21:29:03 +0000 (23:29 +0200)]
iwlwifi: clean key table in iwl_clear_stations_table function

This patch cleans uCode key table bit map iwl_clear_stations_table
since all stations are cleared also the key table must be.

Since the keys are not removed properly on suspend by mac80211
this may result in exhausting key table on resume leading
to memory corruption during removal

This patch also fixes a memory corruption problem reported in
http://marc.info/?l=linux-wireless&m=122641417231586&w=2 and tracked in
http://bugzilla.kernel.org/show_bug.cgi?id=12040.

When the key is removed a second time the offset is set to 255 - this
index is not valid for the ucode_key_table and corrupts the eeprom pointer
(which is 255 bits from ucode_key_table).

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Reported-by: Carlos R. Mafra <crmafra2@gmail.com>
Reported-by: Lukas Hejtmanek <xhejtman@ics.muni.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agotcp: tcp_vegas ssthresh bug fix
Doug Leith [Fri, 5 Dec 2008 01:17:18 +0000 (17:17 -0800)]
tcp: tcp_vegas ssthresh bug fix

This patch fixes a bug in tcp_vegas.c.  At the moment this code leaves
ssthresh untouched.  However, this means that the vegas congestion
control algorithm is effectively unable to reduce cwnd below the
ssthresh value (if the vegas update lowers the cwnd below ssthresh,
then slow start is activated to raise it back up).  One example where
this matters is when during slow start cwnd overshoots the link
capacity and a flow then exits slow start with ssthresh set to a value
above where congestion avoidance would like to adjust it.

Signed-off-by: Doug Leith <doug.leith@nuim.ie>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoxfrm: Accept ESP packets regardless of UDP encapsulation mode
Martin Willi [Thu, 4 Dec 2008 23:40:17 +0000 (15:40 -0800)]
xfrm: Accept ESP packets regardless of UDP encapsulation mode

From: Martin Willi <martin@strongswan.org>

An IPsec node speaking IKEv2 MUST accept incoming UDP encapsulated
ESP packets, even if no NAT situation is detected. This is important
if MOBIKE is in use. Some implementation keep the encapsulation
mode if they move out of a NAT situation.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosgi-xp: Kill directly reference of netdev->priv
Wang Chen [Thu, 4 Dec 2008 23:12:20 +0000 (15:12 -0800)]
sgi-xp: Kill directly reference of netdev->priv

Simply replace netdev->priv with netdev_priv().

[ Kill unnecessary casts, noticed by Ilpo -DaveM ]

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoum: Kill directly reference of netdev->priv
Wang Chen [Thu, 4 Dec 2008 23:07:33 +0000 (15:07 -0800)]
um: Kill directly reference of netdev->priv

Simply replace netdev->priv with netdev_priv().

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoxtensa: Kill directly reference of netdev->priv
Wang Chen [Thu, 4 Dec 2008 23:06:56 +0000 (15:06 -0800)]
xtensa: Kill directly reference of netdev->priv

Simply replace netdev->priv with netdev_priv().

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosimeth: Kill directly reference of netdev->priv
Wang Chen [Thu, 4 Dec 2008 23:06:27 +0000 (15:06 -0800)]
simeth: Kill directly reference of netdev->priv

Simply replace netdev->priv with netdev_priv().

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocan: omit received RTR frames for single ID filter lists
Oliver Hartkopp [Thu, 4 Dec 2008 23:01:08 +0000 (15:01 -0800)]
can: omit received RTR frames for single ID filter lists

Since commit d253eee20195b25e298bf162a6e72f14bf4803e5 the single CAN
identifier filter lists handle only non-RTR CAN frames.

So we need to omit the check of these filter lists when receiving RTR
CAN frames.

Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoATM: CVE-2008-5079: duplicate listen() on socket corrupts the vcc table
Chas Williams [Thu, 4 Dec 2008 22:58:13 +0000 (14:58 -0800)]
ATM: CVE-2008-5079: duplicate listen() on socket corrupts the vcc table

As reported by Hugo Dias that it is possible to cause a local denial
of service attack by calling the svc_listen function twice on the same
socket and reading /proc/net/atm/*vc

Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet/ipv6/ip6mr.c: Use kmem_cache_zalloc, remove memset
Joe Perches [Thu, 4 Dec 2008 06:27:25 +0000 (22:27 -0800)]
net/ipv6/ip6mr.c: Use kmem_cache_zalloc, remove memset

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoif_usb: Kill directly reference of netdev->priv
Wang Chen [Thu, 4 Dec 2008 06:24:05 +0000 (22:24 -0800)]
if_usb: Kill directly reference of netdev->priv

Simply replace netdev->priv with netdev_priv().

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>