safe/jmp/linux-2.6
14 years agoe1000e: cosmetic - group local variables of the same type
Bruce Allan [Fri, 20 Nov 2009 23:28:37 +0000 (23:28 +0000)]
e1000e: cosmetic - group local variables of the same type

Signed-off-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>
14 years agoe1000e: remove redundant might_sleep()
Bruce Allan [Fri, 20 Nov 2009 23:28:17 +0000 (23:28 +0000)]
e1000e: remove redundant might_sleep()

Now that mutex_lock() calls might_sleep() the driver doesn't have to here.

Signed-off-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>
14 years agoe1000e: do not error out on identification LED init failure
Bruce Allan [Fri, 20 Nov 2009 23:27:59 +0000 (23:27 +0000)]
e1000e: do not error out on identification LED init failure

A failure to initialize the identification LED is not a fatal condition and
should allow the init path to continue.

Signed-off-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>
14 years agoe1000e: set pm_qos DMA latency requirement per interface when needed
Bruce Allan [Fri, 20 Nov 2009 23:27:40 +0000 (23:27 +0000)]
e1000e: set pm_qos DMA latency requirement per interface when needed

It was pointed out a pm_qos DMA latency requirement set when the driver is
loaded when parts that support early receive of jumbo frames are probed
could have that requirement overidden if another part supported by the
driver (one that does not support early receive of jumbo frames) is probed
later.  Change the DMA latency requirement to be per-interface if needed
instead of per driver.

Signed-off-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>
14 years agoe1000e: cleanup functions that clear hardware statistics
Bruce Allan [Fri, 20 Nov 2009 23:27:21 +0000 (23:27 +0000)]
e1000e: cleanup functions that clear hardware statistics

The e1000_clear_hw_cntrs_*() functions read the registers to clear them.
There is no reason to save the register contents so the temp variable can
be removed.

Signed-off-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>
14 years agoe1000e: cleanup - shift indentation left by exiting early in e1000_tso
Bruce Allan [Fri, 20 Nov 2009 23:27:03 +0000 (23:27 +0000)]
e1000e: cleanup - shift indentation left by exiting early in e1000_tso

Signed-off-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>
14 years agoe1000e: set bools to true/false instead of 1/0
Bruce Allan [Fri, 20 Nov 2009 23:26:44 +0000 (23:26 +0000)]
e1000e: set bools to true/false instead of 1/0

Set booleans to 'true' or 'false' to make it clear it is a boolean.  Also
change instances of TRUE/FALSE in comments to lowercase true/false.

Signed-off-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>
14 years agoe1000e: provide comment for 82571 workaround
Bruce Allan [Fri, 20 Nov 2009 23:26:24 +0000 (23:26 +0000)]
e1000e: provide comment for 82571 workaround

Signed-off-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>
14 years agoe1000e: remove comments regarding a non-existent api module
Bruce Allan [Fri, 20 Nov 2009 23:26:05 +0000 (23:26 +0000)]
e1000e: remove comments regarding a non-existent api module

Signed-off-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>
14 years agoe1000e: update copyright information
Bruce Allan [Fri, 20 Nov 2009 23:25:45 +0000 (23:25 +0000)]
e1000e: update copyright information

Signed-off-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>
14 years agoe1000e: cleanup ops function pointers
Bruce Allan [Fri, 20 Nov 2009 23:25:26 +0000 (23:25 +0000)]
e1000e: cleanup ops function pointers

The phy and nvm operations structures have function pointers that contain
"phy" and "nvm" in the pointer names which are redundant since the
structures are already obviously in phy and nvm structures.

Signed-off-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>
14 years agoe1000e: consolidate two dbug macros into one simpler one
Bruce Allan [Fri, 20 Nov 2009 23:25:07 +0000 (23:25 +0000)]
e1000e: consolidate two dbug macros into one simpler one

This patch depends on a previous one that cleans up redundant #includes.

Signed-off-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>
14 years agoe1000e: cleanup redundant #include's
Bruce Allan [Fri, 20 Nov 2009 23:24:48 +0000 (23:24 +0000)]
e1000e: cleanup redundant #include's

Signed-off-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>
14 years agoe1000e: Incorrect MII Link beat reporting.
Bruce Allan [Fri, 20 Nov 2009 23:24:30 +0000 (23:24 +0000)]
e1000e: Incorrect MII Link beat reporting.

The driver was only updating MII stats when an LSC up was detected and
the interface had not already been reported up to netdev. This meant
MII stats returned in response to an SIOCGMIIREG ioctl would always
show a link up if it had ever been up. This was misleading the networking
daemon guessnet, which uses this ioctl, into making improper network port
selections.
This fix adds a call to e1000_phy_read_status() to actively read the
mii stats before responding to the SIOCGMIIREG ioctl.

Signed-off-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>
14 years agoe1000e: disable K1 on PCH LOM when in PHY loopback mode
Bruce Allan [Fri, 20 Nov 2009 23:24:11 +0000 (23:24 +0000)]
e1000e: disable K1 on PCH LOM when in PHY loopback mode

When performing the ethtool PHY loopback test on PCH-based LOMs (82577 and
82578), disable K1 (a MAC-PHY interconnect low power mode) otherwise
packets might get corrupted.

Signed-off-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>
14 years agoe1000e: improper return code signage
Bruce Allan [Fri, 20 Nov 2009 23:23:53 +0000 (23:23 +0000)]
e1000e: improper return code signage

The e1000_get_cable_length_82577() should return a negative value upon
error.

Signed-off-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>
14 years agoe1000e: link reporting problems
Bruce Allan [Fri, 20 Nov 2009 23:23:34 +0000 (23:23 +0000)]
e1000e: link reporting problems

Copper links with WoL or management enabled (any condition which prevents
the phy from being powered down when the interface is taken down) were
always reporting link-up when the interface had been taken down. This
is because when the interface is taken down (ifconfig ethx down),
interrupts are disabled. With no interrupts, there is no LSC interrupt,
which is normally required to set "get_link_status", which instructs the
driver to query the device for link state. The fix is to force
get_link_status to true if the interface is not up.

Signed-off-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>
14 years agoe1000e: don't clean Rx ring while resetting
Bruce Allan [Fri, 20 Nov 2009 23:23:16 +0000 (23:23 +0000)]
e1000e: don't clean Rx ring while resetting

When using legacy interrupts, do not clean the Rx ring while resetting
otherwise traffic will not pass.

Signed-off-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>
14 years agoe1000e: function pointers for ethtool set/get offloads
Bruce Allan [Fri, 20 Nov 2009 23:22:57 +0000 (23:22 +0000)]
e1000e: function pointers for ethtool set/get offloads

Provide missing function pointers for ethtool set/get offloads.

Signed-off-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>
14 years agoe1000e: clearing interrupt timers causes descriptors to get flushed
Bruce Allan [Fri, 20 Nov 2009 23:22:39 +0000 (23:22 +0000)]
e1000e: clearing interrupt timers causes descriptors to get flushed

Clearing the interrupt timers following an IMS clear has the unwanted
side-effect of flushing all descriptors immediately following a partial
write when interrupts are disabled.

Signed-off-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>
14 years agoe1000e: add missing tests for 82583 in ethtool functions
Bruce Allan [Fri, 20 Nov 2009 23:22:20 +0000 (23:22 +0000)]
e1000e: add missing tests for 82583 in ethtool functions

Add tests for 82583 in a couple ethtool functions that were missed from the
initial hardware enablement submission.

Signed-off-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>
14 years agoe1000e: check WoL mode is among set of supported modes
Bruce Allan [Fri, 20 Nov 2009 23:22:01 +0000 (23:22 +0000)]
e1000e: check WoL mode is among set of supported modes

When setting WoL feature, check the supplied modes are all supported rather
than checking for no support.  This way, if any new modes are added the
driver does not default to not complaining about it if we don't really
support it.

Signed-off-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>
14 years agotcp: Don't make syn cookies initial setting depend on CONFIG_SYSCTL
David S. Miller [Sat, 21 Nov 2009 19:22:25 +0000 (11:22 -0800)]
tcp: Don't make syn cookies initial setting depend on CONFIG_SYSCTL

That's extremely non-intuitive, noticed by William Allen Simpson.

And let's make the default be on, it's been suggested by a lot of
people so we'll give it a try.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: rename skb->iif to skb->skb_iif
Eric Dumazet [Fri, 20 Nov 2009 23:35:04 +0000 (15:35 -0800)]
net: rename skb->iif to skb->skb_iif

To help grep games, rename iif to skb_iif

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: Patch to flash redboot section while firmware update.
Sarveshwar Bandi [Fri, 20 Nov 2009 22:23:47 +0000 (14:23 -0800)]
be2net: Patch to flash redboot section while firmware update.

Please apply patch to update redboot section while firmware update. Code
checks if section needs to be updated before actually doing it.

Signed-off-by: Sarveshwar Bandi <sarveshwarb@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: remove PCI IDs of CNA device
Amit Kumar Salecha [Thu, 19 Nov 2009 15:08:12 +0000 (15:08 +0000)]
netxen: remove PCI IDs of CNA device

Remove PCI vendor and device IDs for QLE8240 and QLE8242
CNA devices. CNA devices will have separate driver.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: Add full support for 82580 devices
Alexander Duyck [Thu, 19 Nov 2009 12:42:21 +0000 (12:42 +0000)]
igb: Add full support for 82580 devices

This patch makes use of the 82580 PHY and MAC support added and adds a set
of supported device IDs for said hardware.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: add support for 82580 MAC
Alexander Duyck [Thu, 19 Nov 2009 12:42:01 +0000 (12:42 +0000)]
igb: add support for 82580 MAC

This patch adds support for the 82580 MAC.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: add support for the 82580 phy
Alexander Duyck [Thu, 19 Nov 2009 12:41:42 +0000 (12:41 +0000)]
igb: add support for the 82580 phy

This patch adds support for the phy included in the 82580 silicon family.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net: tasklet_init - Remove unnecessary leading & from second arg
Joe Perches [Thu, 19 Nov 2009 09:30:10 +0000 (09:30 +0000)]
drivers/net: tasklet_init - Remove unnecessary leading & from second arg

Changed function pointer use from non-majority address-of style
to majority short form without & via: (was: 8 with &, 36 without)

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

Compile tested allyesconfig x86

Signed-off-by: Joe Perches <joe@perches.com>
 drivers/net/cnic.c |    4 ++--
 drivers/net/jme.c  |   10 +++++-----
 drivers/net/skge.c |    2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/isdn/gigaset: tasklet_init - Remove unnecessary leading & from second arg
Joe Perches [Thu, 19 Nov 2009 09:55:53 +0000 (09:55 +0000)]
drivers/isdn/gigaset: tasklet_init - Remove unnecessary leading & from second arg

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

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

Compile tested allyesconfig x86

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Normally used to indicate status upon closing connections.

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

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

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

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

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

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

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

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

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

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

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

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

Doing the strcmp return value as

signed char __res = *cs - *ct;

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

The same problem is fixed in strncmp.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Enforce all device constraints on the descriptor memory region.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

kvalo: use platform data instead Kconfig and use kernel style

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

Fixes warnings:

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

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

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

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

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

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

Filter out unwanted events to reduce wakeups.

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

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

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

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

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

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

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

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

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

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

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

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

Thanks to Eero Tamminen for the idea.

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

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

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

Enable beacon filtering when PSM is enabled

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

Enable beacon filtering with the mac80211 stack.

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

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

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

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

Summary:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Also, gbeacon_rate is unused.

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

axq_linkbuf, axq_aggr_depth, axq_lastdsWithCTS and
axq_gatingds are unused.

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

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

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

* Handle enabling/disabling beacon transmission properly.

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

* Remove unneeded code dealing with key/privacy.

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

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

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

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

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

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

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

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

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

Also regroup CSR_EEPROM and CSR_OTP bit field definitions.

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

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

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

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

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

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

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

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

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>