]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/log
mirror_ubuntu-zesty-kernel.git
13 years agoqeth: l3 add vlan hdr in passthru frames
Frank Blaschka [Wed, 8 Dec 2010 02:58:00 +0000 (02:58 +0000)]
qeth: l3 add vlan hdr in passthru frames

OSA l3 mode is hw accelerated VLAN only for IPv4. Take care we
add the vlan hdr to a passthru frame in the device driver.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqeth: support VIPA add/del in offline mode
Einar Lueck [Wed, 8 Dec 2010 02:57:59 +0000 (02:57 +0000)]
qeth: support VIPA add/del in offline mode

Only work through the IP adddress to do list if the card is UP or
SOFTSETUP. Enables to configure VIPA add/del in offline mode.

Signed-off-by: Einar Lueck <elelueck@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqeth: support ipv6 query arp cache for HiperSockets
Einar Lueck [Wed, 8 Dec 2010 02:57:58 +0000 (02:57 +0000)]
qeth: support ipv6 query arp cache for HiperSockets

Function qeth_l3_arp_query now queries for IPv6 addresses, too, if
QETH_QARP_WITH_IPV6 is passed as parameter to the ioctl. HiperSockets
and GuestLAN in HiperSockets mode provide corresponding entries.

Signed-off-by: Einar Lueck <elelueck@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet/ipv6/udp.c: fix typo in flush_stack()
Jiri Pirko [Thu, 9 Dec 2010 03:40:30 +0000 (03:40 +0000)]
net/ipv6/udp.c: fix typo in flush_stack()

skb1 should be passed as parameter to sk_rcvqueues_full() here.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv6: Fix 'release_it' logic in tcp_v6_get_peer()
David S. Miller [Fri, 10 Dec 2010 21:16:09 +0000 (13:16 -0800)]
ipv6: Fix 'release_it' logic in tcp_v6_get_peer()

We accidently set it to "true" for the case where we
are using a route bound peer.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: Fix return values of br_multicast_add_group/br_multicast_new_group
Tobias Klauser [Fri, 10 Dec 2010 03:18:04 +0000 (03:18 +0000)]
bridge: Fix return values of br_multicast_add_group/br_multicast_new_group

If br_multicast_new_group returns NULL, we would return 0 (no error) to
the caller of br_multicast_add_group, which is not what we want. Instead
br_multicast_new_group should return ERR_PTR(-ENOMEM) in this case.
Also propagate the error number returned by br_mdb_rehash properly.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'dccp' of git://eden-feed.erg.abdn.ac.uk/net-next-2.6
David S. Miller [Fri, 10 Dec 2010 19:22:57 +0000 (11:22 -0800)]
Merge branch 'dccp' of git://eden-feed.erg.abdn.ac.uk/net-next-2.6

13 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc...
David S. Miller [Fri, 10 Dec 2010 18:20:43 +0000 (10:20 -0800)]
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-next-2.6

13 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
David S. Miller [Fri, 10 Dec 2010 17:50:47 +0000 (09:50 -0800)]
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6

Conflicts:
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c

13 years agodccp: remove unused macros
Shan Wei [Fri, 10 Dec 2010 11:49:23 +0000 (12:49 +0100)]
dccp: remove unused macros

Remove macros which have been unused since the initial implementation
(commit 7c657876b63cb1d8a2ec06f8fc6c37bb8412e66c, [DCCP]: Initial
 implementation from Tue Aug 9 20:14:34 2005 -0700).

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Acked-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
13 years agobnx2x: Update version number and a date.
Vladislav Zolotarov [Wed, 8 Dec 2010 01:43:37 +0000 (01:43 +0000)]
bnx2x: Update version number and a date.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: Fixed a compilation warning
Vladislav Zolotarov [Wed, 8 Dec 2010 01:43:29 +0000 (01:43 +0000)]
bnx2x: Fixed a compilation warning

bnx2x_src_init_t2() is used only when BCM_CNIC is defined.
So, to avoid a compilation warning, we won't define it unless
BCM_CNIC is defined.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: Use dma_alloc_coherent() semantics for ILT memory allocation
Vladislav Zolotarov [Wed, 8 Dec 2010 01:43:17 +0000 (01:43 +0000)]
bnx2x: Use dma_alloc_coherent() semantics for ILT memory allocation

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: LSO code was broken on BE platforms
Vladislav Zolotarov [Wed, 8 Dec 2010 01:43:09 +0000 (01:43 +0000)]
bnx2x: LSO code was broken on BE platforms

Make the LSO code work on BE platforms: parsing_data field of
a parsing BD (PBD) for 57712 was improperly composed which made FW read wrong
values for TCP header's length and offset and, as a result, the corresponding
PCI device was performing bad DMA reads triggering EEH.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agofilter: use size of fetched data in __load_pointer()
Eric Dumazet [Tue, 7 Dec 2010 22:26:15 +0000 (22:26 +0000)]
filter: use size of fetched data in __load_pointer()

__load_pointer() checks data we fetch from skb is included in head
portion, but assumes we fetch one byte, instead of up to four.

This wont crash because we have extra bytes (struct skb_shared_info)
after head, but this can read uninitialized bytes.

Fix this using size of the data (1, 2, 4 bytes) in the test.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoThe new jhash implementation
Jozsef Kadlecsik [Fri, 3 Dec 2010 02:39:01 +0000 (02:39 +0000)]
The new jhash implementation

The current jhash.h implements the lookup2() hash function by Bob Jenkins.
However, lookup2() is outdated as Bob wrote a new hash function called
lookup3(). The patch replaces the lookup2() implementation of the 'jhash*'
functions with that of lookup3().

You can read a longer comparison of the two and other hash functions at
http://burtleburtle.net/bob/hash/doobs.html.

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: optimize INET input path further
Eric Dumazet [Tue, 30 Nov 2010 19:04:07 +0000 (19:04 +0000)]
net: optimize INET input path further

Followup of commit b178bb3dfc30 (net: reorder struct sock fields)

Optimize INET input path a bit further, by :

1) moving sk_refcnt close to sk_lock.

This reduces number of dirtied cache lines by one on 64bit arches (and
64 bytes cache line size).

2) moving inet_daddr & inet_rcv_saddr at the beginning of sk

(same cache line than hash / family / bound_dev_if / nulls_node)

This reduces number of accessed cache lines in lookups by one, and dont
increase size of inet and timewait socks.
inet and tw sockets now share same place-holder for these fields.

Before patch :

offsetof(struct sock, sk_refcnt) = 0x10
offsetof(struct sock, sk_lock) = 0x40
offsetof(struct sock, sk_receive_queue) = 0x60
offsetof(struct inet_sock, inet_daddr) = 0x270
offsetof(struct inet_sock, inet_rcv_saddr) = 0x274

After patch :

offsetof(struct sock, sk_refcnt) = 0x44
offsetof(struct sock, sk_lock) = 0x48
offsetof(struct sock, sk_receive_queue) = 0x68
offsetof(struct inet_sock, inet_daddr) = 0x0
offsetof(struct inet_sock, inet_rcv_saddr) = 0x4

compute_score() (udp or tcp) now use a single cache line per ignored
item, instead of two.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Abstract away all dst_entry metrics accesses.
David S. Miller [Thu, 9 Dec 2010 05:16:57 +0000 (21:16 -0800)]
net: Abstract away all dst_entry metrics accesses.

Use helper functions to hide all direct accesses, especially writes,
to dst_entry metrics values.

This will allow us to:

1) More easily change how the metrics are stored.

2) Implement COW for metrics.

In particular this will help us put metrics into the inetpeer
cache if that is what we end up doing.  We can make the _metrics
member a pointer instead of an array, initially have it point
at the read-only metrics in the FIB, and then on the first set
grab an inetpeer entry and point the _metrics member there.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
13 years agoath: fix build break with ATH_DBG_WARN_ON_ONCE
John W. Linville [Thu, 9 Dec 2010 14:08:47 +0000 (09:08 -0500)]
ath: fix build break with ATH_DBG_WARN_ON_ONCE

Description by Hauke:

"If CONFIG_ATH_DEBUG=y is set ATH_DBG_WARN_ON_ONCE uses WARN_ON_ONCE and
returns something, but if CONFIG_ATH_DEBUG is not set it does not return
anything. Now ATH_DBG_WARN_ON_ONCE is used in the boolean expression in
an if case and is not returning anything and causes a compile error.

  CC [M]  /drivers/net/wireless/ath/ath9k/main.o
/drivers/net/wireless/ath/ath9k/main.c: In function ‘ath_isr’:
/drivers/net/wireless/ath/ath9k/main.c:769: error: expected expression
before ‘do’
make[5]: *** [/drivers/net/wireless/ath/ath9k/main.o] Error 1
make[4]: *** [/drivers/net/wireless/ath/ath9k] Error 2"

Reported-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Fix modinfo does not list alias -> pci-id lines
Sedat Dilek [Tue, 7 Dec 2010 21:35:50 +0000 (22:35 +0100)]
ath5k: Fix modinfo does not list alias -> pci-id lines

The AHB bus support patchset moved the table "Known PCI ids" from base.c
to pci.c - unfortunately, MODULE_DEVICE_TABLE() was not transferred.
With this fix 'modinfo ath5k' lists the alias -> pci-id lines, again.

The issue was introduced by:
   commit e5b046d86fac609f636d127a38de94a175c7e83b
   "ath5k: Move PCI bus functions to separate file."

Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocan: slcan: Add missing linux/sched.h include.
David S. Miller [Thu, 9 Dec 2010 02:41:03 +0000 (18:41 -0800)]
can: slcan: Add missing linux/sched.h include.

drivers/net/can/slcan.c: In function 'slcan_open':
drivers/net/can/slcan.c:568: error: dereferencing pointer to incomplete type

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Wed, 8 Dec 2010 21:15:38 +0000 (13:15 -0800)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

Conflicts:
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
net/llc/af_llc.c

13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Wed, 8 Dec 2010 21:23:31 +0000 (16:23 -0500)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

Conflicts:
drivers/net/wireless/ath/ath9k/ath9k.h
drivers/net/wireless/ath/ath9k/main.c
drivers/net/wireless/ath/ath9k/xmit.c

13 years agoath9k_hw: warn if we cannot change the power to the chip
Luis R. Rodriguez [Tue, 7 Dec 2010 23:13:23 +0000 (15:13 -0800)]
ath9k_hw: warn if we cannot change the power to the chip

Suspend requires the device to be in fullsleep otherwise upon
resume the device becomes unresponsive. We need to ensure
that when we want the device to go to sleep it yields to
the request, otherwise we'll have a useless devices upon
resume. Warn when changing the power fails as we need
to look into these issues.

Cc: Paul Stewart <pstew@google.com>
Cc: Amod Bodas <amod.bodas@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: skip ATH9K_INT_TIM_TIMER when we are idle
Luis R. Rodriguez [Tue, 7 Dec 2010 23:13:22 +0000 (15:13 -0800)]
ath9k: skip ATH9K_INT_TIM_TIMER when we are idle

We should not be idle when we get the ATH9K_INT_TIM_TIMER,
otherwise its a sign of something broken in our design with
our idle state machine and mac80211. Skip these and WARN once
just in case this is triggerable.

Cc: Paul Stewart <pstew@google.com>
Cc: Amod Bodas <amod.bodas@atheros.com>
signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>

Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: add some element IDs in enum ieee80211_eid
Amitkumar Karwar [Tue, 7 Dec 2010 21:43:03 +0000 (13:43 -0800)]
cfg80211: add some element IDs in enum ieee80211_eid

1)WLAN_EID_BSS_COEX_2040
2)WLAN_EID_OVERLAP_BSS_SCAN_PARAM
3)WLAN_EID_EXT_CAPABILITY

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: rename config option for N-PHY, drop BROKEN
Rafał Miłecki [Tue, 7 Dec 2010 20:56:00 +0000 (21:56 +0100)]
b43: rename config option for N-PHY, drop BROKEN

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: fix split of N-PHY devices into supported and not (based on PHY rev)
Rafał Miłecki [Tue, 7 Dec 2010 20:55:59 +0000 (21:55 +0100)]
b43: fix split of N-PHY devices into supported and not (based on PHY rev)

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: set TMS to work with current band width for N-PHY
Rafał Miłecki [Tue, 7 Dec 2010 20:55:58 +0000 (21:55 +0100)]
b43: set TMS to work with current band width for N-PHY

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: silence warnings
Rafał Miłecki [Tue, 7 Dec 2010 20:55:57 +0000 (21:55 +0100)]
b43: N-PHY: silence warnings

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Show max number of probe tries in debug message.
Ben Greear [Tue, 7 Dec 2010 19:27:01 +0000 (11:27 -0800)]
mac80211: Show max number of probe tries in debug message.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: flush PHY writes when needed
Rafał Miłecki [Tue, 7 Dec 2010 08:42:07 +0000 (09:42 +0100)]
b43: flush PHY writes when needed

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: implement own maskset
Rafał Miłecki [Tue, 7 Dec 2010 08:42:06 +0000 (09:42 +0100)]
b43: N-PHY: implement own maskset

This let us avoid double addressing while still having reg check.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: reorder and optimize tables initialization
Rafał Miłecki [Tue, 7 Dec 2010 08:42:05 +0000 (09:42 +0100)]
b43: N-PHY: reorder and optimize tables initialization

Order was changed in specs. For writing arrays we have designed bulk function
which makes use of auto increment and do not write table address over and over.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: update init tables
Rafał Miłecki [Tue, 7 Dec 2010 08:42:04 +0000 (09:42 +0100)]
b43: N-PHY: update init tables

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Check for NULL sta in ath_tx_start
Ben Greear [Tue, 7 Dec 2010 05:13:49 +0000 (21:13 -0800)]
ath9k: Check for NULL sta in ath_tx_start

It can be NULL according to docs, and logging showed it
to be NULL in practice.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Apply ht_opmode changes in ieee80211_change_bss
Helmut Schaa [Fri, 19 Nov 2010 11:40:26 +0000 (12:40 +0100)]
mac80211: Apply ht_opmode changes in ieee80211_change_bss

Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: Add new BSS attribute ht_opmode
Helmut Schaa [Fri, 19 Nov 2010 11:40:25 +0000 (12:40 +0100)]
cfg80211: Add new BSS attribute ht_opmode

Add a new BSS attribute to allow hostapd to set the current HT opmode.
Otherwise drivers won't be able to set up protection for HT rates in
AP mode.

Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agotcp: protect sysctl_tcp_cookie_size reads
Eric Dumazet [Tue, 7 Dec 2010 12:20:47 +0000 (12:20 +0000)]
tcp: protect sysctl_tcp_cookie_size reads

Make sure sysctl_tcp_cookie_size is read once in
tcp_cookie_size_check(), or we might return an illegal value to caller
if sysctl_tcp_cookie_size is changed by another cpu.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Ben Hutchings <bhutchings@solarflare.com>
Cc: William Allen Simpson <william.allen.simpson@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotcp: avoid a possible divide by zero
Eric Dumazet [Tue, 7 Dec 2010 12:03:55 +0000 (12:03 +0000)]
tcp: avoid a possible divide by zero

sysctl_tcp_tso_win_divisor might be set to zero while one cpu runs in
tcp_tso_should_defer(). Make sure we dont allow a divide by zero by
reading sysctl_tcp_tso_win_divisor exactly once.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoorinoco: fix TKIP countermeasure behaviour
David Kilroy [Sun, 5 Dec 2010 15:43:55 +0000 (15:43 +0000)]
orinoco: fix TKIP countermeasure behaviour

Enable the port when disabling countermeasures, and disable it on
enabling countermeasures.

This bug causes the response of the system to certain attacks to be
ineffective.

It also prevents wpa_supplicant from getting scan results, as
wpa_supplicant disables countermeasures on startup - preventing the
hardware from scanning.

wpa_supplicant works with ap_mode=2 despite this bug because the commit
handler re-enables the port.

The log tends to look like:

State: DISCONNECTED -> SCANNING
Starting AP scan for wildcard SSID
Scan requested (ret=0) - scan timeout 5 seconds
EAPOL: disable timer tick
EAPOL: Supplicant port status: Unauthorized
Scan timeout - try to get results
Failed to get scan results
Failed to get scan results - try scanning again
Setting scan request: 1 sec 0 usec
Starting AP scan for wildcard SSID
Scan requested (ret=-1) - scan timeout 5 seconds
Failed to initiate AP scan.

Reported by: Giacomo Comes <comes@naic.edu>
Signed-off by: David Kilroy <kilroyd@googlemail.com>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoorinoco: clear countermeasure setting on commit
David Kilroy [Sun, 5 Dec 2010 15:45:58 +0000 (15:45 +0000)]
orinoco: clear countermeasure setting on commit

... and interface up.

In these situations, you are usually trying to connect to a new AP, so
keeping TKIP countermeasures active is confusing. This is already how
the driver behaves (inadvertently). However, querying SIOCGIWAUTH may
tell userspace that countermeasures are active when they aren't.

Clear the setting so that the reporting matches what the driver has
done..

Signed-off by: David Kilroy <kilroyd@googlemail.com>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Fix BUG in pskb_expand_head when transmitting shared skbs
Helmut Schaa [Thu, 2 Dec 2010 17:44:09 +0000 (18:44 +0100)]
mac80211: Fix BUG in pskb_expand_head when transmitting shared skbs

mac80211 doesn't handle shared skbs correctly at the moment. As a result
a possible resize can trigger a BUG in pskb_expand_head.

[  676.030000] Kernel bug detected[#1]:
[  676.030000] Cpu 0
[  676.030000] $ 0   : 00000000 00000000 819662ff 00000002
[  676.030000] $ 4   : 81966200 00000020 00000000 00000020
[  676.030000] $ 8   : 819662e0 800043c0 00000002 00020000
[  676.030000] $12   : 3b9aca00 00000000 00000000 00470000
[  676.030000] $16   : 80ea2000 00000000 00000000 00000000
[  676.030000] $20   : 818aa200 80ea2018 80ea2000 00000008
[  676.030000] $24   : 00000002 800ace5c
[  676.030000] $28   : 8199a000 8199bd20 81938f88 80f180d4
[  676.030000] Hi    : 0000026e
[  676.030000] Lo    : 0000757e
[  676.030000] epc   : 801245e4 pskb_expand_head+0x44/0x1d8
[  676.030000]     Not tainted
[  676.030000] ra    : 80f180d4 ieee80211_skb_resize+0xb0/0x114 [mac80211]
[  676.030000] Status: 1000a403    KERNEL EXL IE
[  676.030000] Cause : 10800024
[  676.030000] PrId  : 0001964c (MIPS 24Kc)
[  676.030000] Modules linked in: mac80211_hwsim rt2800lib rt2x00soc rt2x00pci rt2x00lib mac80211 crc_itu_t crc_ccitt cfg80211 compat arc4 aes_generic deflate ecb cbc [last unloaded: rt2800pci]
[  676.030000] Process kpktgend_0 (pid: 97, threadinfo=8199a000, task=81879f48, tls=00000000)
[  676.030000] Stack : ffffffff 00000000 00000000 00000014 00000004 80ea2000 00000000 00000000
[  676.030000]         818aa200 80f180d4 ffffffff 0000000a 81879f78 81879f48 81879f48 00000018
[  676.030000]         81966246 80ea2000 818432e0 80f1a420 80203050 81814d98 00000001 81879f48
[  676.030000]         81879f48 00000018 81966246 818432e0 0000001a 8199bdd4 0000001c 80f1b72c
[  676.030000]         80203020 8001292c 80ef4aa2 7f10b55d 801ab5b8 81879f48 00000188 80005c90
[  676.030000]         ...
[  676.030000] Call Trace:
[  676.030000] [<801245e4>] pskb_expand_head+0x44/0x1d8
[  676.030000] [<80f180d4>] ieee80211_skb_resize+0xb0/0x114 [mac80211]
[  676.030000] [<80f1a420>] ieee80211_xmit+0x150/0x22c [mac80211]
[  676.030000] [<80f1b72c>] ieee80211_subif_start_xmit+0x6f4/0x73c [mac80211]
[  676.030000] [<8014361c>] pktgen_thread_worker+0xfac/0x16f8
[  676.030000] [<8002ebe8>] kthread+0x7c/0x88
[  676.030000] [<80008e0c>] kernel_thread_helper+0x10/0x18
[  676.030000]
[  676.030000]
[  676.030000] Code: 24020001  10620005  2502001f <0200000d0804917a  00000000  2502001f  00441023  00531021

Fix this by making a local copy of shared skbs prior to mangeling them.
To avoid copying the skb unnecessarily move the skb_copy call below the
checks that don't need write access to the skb.

Also, move the assignment of nh_pos and h_pos below the skb_copy to point
to the correct skb.

It would be possible to avoid another resize of the copied skb by using
skb_copy_expand instead of skb_copy but that would make the patch more
complex. Also, shared skbs are a corner case right now, so the resize
shouldn't matter much.

Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Fix suspend/resume
Sujith Manoharan [Wed, 1 Dec 2010 07:00:27 +0000 (12:30 +0530)]
ath9k_htc: Fix suspend/resume

The HW has to be set to FULLSLEEP mode during suspend,
when no interface has been brought up. Not doing this would
break resume, as the chip won't be powered up at all.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Put the right tsf value in mesh beacons
Javier Cardona [Tue, 7 Dec 2010 21:37:56 +0000 (13:37 -0800)]
ath5k: Put the right tsf value in mesh beacons

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Prevent mesh interfaces from being counted as ad-hoc
Javier Cardona [Tue, 7 Dec 2010 21:36:55 +0000 (13:36 -0800)]
ath5k: Prevent mesh interfaces from being counted as ad-hoc

This results in an erroneus num_adhoc_vifs count, as the this counter
was incremented but not decremented for mesh interfaces.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Fix beaconing in mesh mode
Javier Cardona [Tue, 7 Dec 2010 21:35:55 +0000 (13:35 -0800)]
ath5k: Fix beaconing in mesh mode

This patch fixes the oops below when attempting to bring up a mesh
interface on ath5k hardware.

[  128.933099] kernel BUG at drivers/net/wireless/ath/ath5k/base.c:197!
[  128.933099] invalid opcode: 0000 [#1]
(...)
[  128.933099] Call Trace:
[  128.933099]  [<c83b77fa>] ? ath5k_beacon_update+0x57/0x1f8 [ath5k]
[  128.933099]  [<c02d9a40>] ? __sysfs_add_one+0x28/0x76
[  128.933099]  [<c83b830e>] ? ath5k_bss_info_changed+0x13f/0x173
[ath5k]
[  128.933099]  [<c82ff629>] ? ieee80211_config_beacon+0xc0/0x17e
[mac80211]
[  128.933099]  [<c82f073e>] ?
ieee80211_bss_info_change_notify+0x182/0x18b [mac80211]
[  128.933099]  [<c83b81cf>] ? ath5k_bss_info_changed+0x0/0x173 [ath5k]
[  128.933099]  [<c82ff6d6>] ? ieee80211_config_beacon+0x16d/0x17e
[mac80211]
[  128.933099]  [<c82ff753>] ? ieee80211_add_beacon+0x34/0x39 [mac80211]
[  128.933099]  [<c830a4ed>] ? ieee80211s_init+0xf8/0x10f [mac80211]
[  128.933099]  [<c830a5df>] ? ieee80211_mesh_init_sdata+0xdb/0x154 [mac80211]

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoorinoco: initialise priv->hw before assigning the interrupt
David Kilroy [Tue, 7 Dec 2010 18:50:42 +0000 (18:50 +0000)]
orinoco: initialise priv->hw before assigning the interrupt

The interrupt handler takes a lock - but since commit bcad6e80f3f this
lock goes through an indirection specified in the hermes_t structure.
We must therefore initialise the structure before setting up the
interrupt handler.

Fix orinoco_cs and spectrum_cs

<https://bugzilla.kernel.org/show_bug.cgi?id=23932>

Bisected by: Matt Domsch <Matt_Domsch@dell.com>
Signed-off by: David Kilroy <kilroyd@googlemail.com>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoehea: Fixing LRO configuration
Breno Leitao [Wed, 8 Dec 2010 20:19:14 +0000 (12:19 -0800)]
ehea: Fixing LRO configuration

In order to set LRO on ehea, the user must set a module parameter, which
is not the standard way to do so. This patch adds a way to set LRO using
the ethtool tool.

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotcp: Replace time wait bucket msg by counter
Tom Herbert [Wed, 8 Dec 2010 20:16:33 +0000 (12:16 -0800)]
tcp: Replace time wait bucket msg by counter

Rather than printing the message to the log, use a mib counter to keep
track of the count of occurences of time wait bucket overflow.  Reduces
spam in logs.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agox25: decrement netdev reference counts on unload
Apollon Oikonomopoulos [Tue, 7 Dec 2010 09:43:30 +0000 (09:43 +0000)]
x25: decrement netdev reference counts on unload

x25 does not decrement the network device reference counts on module unload.
Thus unregistering any pre-existing interface after unloading the x25 module
hangs and results in

 unregister_netdevice: waiting for tap0 to become free. Usage count = 1

This patch decrements the reference counts of all interfaces in x25_link_free,
the way it is already done in x25_link_device_down for NETDEV_DOWN events.

Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodriver/net/benet: fix be_cmd_multicast_set() memcpy bug
Joe Jin [Mon, 6 Dec 2010 03:00:59 +0000 (03:00 +0000)]
driver/net/benet: fix be_cmd_multicast_set() memcpy bug

Regarding  benet be_cmd_multicast_set() function, now using
netdev_for_each_mc_addr() helper for mac address copy, but
when copying to req->mac[] did not increase of the index.

Cc: Sathya Perla <sathyap@serverengines.com>
Cc: Subbu Seetharaman <subbus@serverengines.com>
Cc: Sarveshwar Bandi <sarveshwarb@serverengines.com>
Cc: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agol2tp: Fix modalias of l2tp_ip
Michal Marek [Mon, 6 Dec 2010 02:39:12 +0000 (02:39 +0000)]
l2tp: Fix modalias of l2tp_ip

Using the SOCK_DGRAM enum results in
"net-pf-2-proto-SOCK_DGRAM-type-115", so use the numeric value like it
is done in net/dccp.

Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoeconet: Do the correct cleanup after an unprivileged SIOCSIFADDR.
Nelson Elhage [Wed, 8 Dec 2010 18:13:55 +0000 (10:13 -0800)]
econet: Do the correct cleanup after an unprivileged SIOCSIFADDR.

We need to drop the mutex and do a dev_put, so set an error code and break like
the other paths, instead of returning directly.

Signed-off-by: Nelson Elhage <nelhage@ksplice.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'sfc-2.6.37' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-2.6
David S. Miller [Wed, 8 Dec 2010 20:13:23 +0000 (12:13 -0800)]
Merge branch 'sfc-2.6.37' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-2.6

13 years agoisdn/hisax: fix compiler warning on hisax_pci_tbl
Namhyung Kim [Tue, 7 Dec 2010 04:49:06 +0000 (04:49 +0000)]
isdn/hisax: fix compiler warning on hisax_pci_tbl

Annotate hisax_pci_tbl as '__used' to fix following warning:

  CC      drivers/isdn/hisax/config.o
drivers/isdn/hisax/config.c:1920: warning: ‘hisax_pci_tbl’ defined but not used

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoaf_packet: fix freeing pg_vec twice on error path
Changli Gao [Tue, 7 Dec 2010 05:05:18 +0000 (05:05 +0000)]
af_packet: fix freeing pg_vec twice on error path

It is introduced in:
        commit 0e3125c755445664f00ad036e4fc2cd32fd52877
        Author: Neil Horman <nhorman@tuxdriver.com>
        Date:   Tue Nov 16 10:26:47 2010 -0800

        packet: Enhance AF_PACKET implementation to not require high order contiguous memory allocation (v4)

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoaf_packet: eliminate pgv_to_page on some arches
Changli Gao [Tue, 7 Dec 2010 04:26:16 +0000 (04:26 +0000)]
af_packet: eliminate pgv_to_page on some arches

Some arches don't need flush_dcache_page(), and don't implement it, so
we can eliminate pgv_to_page() calls on those arches.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: call dev_queue_xmit_nit() after skb_dst_drop()
Eric Dumazet [Tue, 7 Dec 2010 00:30:37 +0000 (00:30 +0000)]
net: call dev_queue_xmit_nit() after skb_dst_drop()

Avoid some atomic ops on dst refcount, calling dev_queue_xmit_nit()
after skb_dst_drop() in dev_hard_start_xmit().

When queueing a packet into af_packet socket, we drop dst anyway.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agofilter: constify sk_run_filter()
Eric Dumazet [Mon, 6 Dec 2010 20:50:09 +0000 (20:50 +0000)]
filter: constify sk_run_filter()

sk_run_filter() doesnt write on skb, change its prototype to reflect
this.

Fix two af_packet comments.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovia-rhine: hardware VLAN support
Roger Luethi [Mon, 6 Dec 2010 00:59:40 +0000 (00:59 +0000)]
via-rhine: hardware VLAN support

This patch adds VLAN hardware support for Rhine chips.

The driver uses up to 3 additional bytes of buffer space when extracting
802.1Q headers; PKT_BUF_SZ should still be sufficient.

The initial code was provided by David Lv. I reworked it to use standard
kernel facilities. Coding style clean up mostly follows via-velocity.

Adapted to new interface for VLAN acceleration (per request of Jesse Gross).

Signed-off-by: David Lv <DavidLv@viatech.com.cn>
Signed-off-by: Roger Luethi <rl@hellgate.ch>
 drivers/net/via-rhine.c |  326 +++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 312 insertions(+), 14 deletions(-)
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: RCU conversion of dev_getbyhwaddr() and arp_ioctl()
Eric Dumazet [Sun, 5 Dec 2010 01:23:53 +0000 (01:23 +0000)]
net: RCU conversion of dev_getbyhwaddr() and arp_ioctl()

Le dimanche 05 décembre 2010 à 09:19 +0100, Eric Dumazet a écrit :

> Hmm..
>
> If somebody can explain why RTNL is held in arp_ioctl() (and therefore
> in arp_req_delete()), we might first remove RTNL use in arp_ioctl() so
> that your patch can be applied.
>
> Right now it is not good, because RTNL wont be necessarly held when you
> are going to call arp_invalidate() ?

While doing this analysis, I found a refcount bug in llc, I'll send a
patch for net-2.6

Meanwhile, here is the patch for net-next-2.6

Your patch then can be applied after mine.

Thanks

[PATCH] net: RCU conversion of dev_getbyhwaddr() and arp_ioctl()

dev_getbyhwaddr() was called under RTNL.

Rename it to dev_getbyhwaddr_rcu() and change all its caller to now use
RCU locking instead of RTNL.

Change arp_ioctl() to use RCU instead of RTNL locking.

Note: this fix a dev refcount bug in llc

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'dccp' of git://eden-feed.erg.abdn.ac.uk/net-next-2.6
David S. Miller [Wed, 8 Dec 2010 18:01:00 +0000 (10:01 -0800)]
Merge branch 'dccp' of git://eden-feed.erg.abdn.ac.uk/net-next-2.6

13 years agollc: fix a device refcount imbalance
Eric Dumazet [Sun, 5 Dec 2010 02:03:26 +0000 (02:03 +0000)]
llc: fix a device refcount imbalance

Le dimanche 05 décembre 2010 à 12:23 +0100, Eric Dumazet a écrit :
> Le dimanche 05 décembre 2010 à 09:19 +0100, Eric Dumazet a écrit :
>
> > Hmm..
> >
> > If somebody can explain why RTNL is held in arp_ioctl() (and therefore
> > in arp_req_delete()), we might first remove RTNL use in arp_ioctl() so
> > that your patch can be applied.
> >
> > Right now it is not good, because RTNL wont be necessarly held when you
> > are going to call arp_invalidate() ?
>
> While doing this analysis, I found a refcount bug in llc, I'll send a
> patch for net-2.6

Oh well, of course I must first fix the bug in net-2.6, and wait David
pull the fix in net-next-2.6 before sending this rcu conversion.

Note: this patch should be sent to stable teams (2.6.34 and up)

[PATCH net-2.6] llc: fix a device refcount imbalance

commit abf9d537fea225 (llc: add support for SO_BINDTODEVICE) added one
refcount imbalance in llc_ui_bind(), because dev_getbyhwaddr() doesnt
take a reference on device, while dev_get_by_index() does.

Fix this using RCU locking. And since an RCU conversion will be done for
2.6.38 for dev_getbyhwaddr(), put the rcu_read_lock/unlock exactly at
their final place.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: stable@kernel.org
Cc: Octavian Purdila <opurdila@ixiacom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet/9p/protocol.c: Remove duplicated macros.
Thiago Farina [Sat, 4 Dec 2010 15:22:46 +0000 (15:22 +0000)]
net/9p/protocol.c: Remove duplicated macros.

Use the macros already provided by kernel.h file.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoifb: goto resched directly if error happens and dp->tq isn't empty
Changli Gao [Sat, 4 Dec 2010 14:09:08 +0000 (14:09 +0000)]
ifb: goto resched directly if error happens and dp->tq isn't empty

If we break the loop when there are still skbs in tq and no skb in
rq, the skbs will be left in txq until new skbs are enqueued into rq.
In rare cases, no new skb is queued, then these skbs will stay in rq
forever.

After this patch, if tq isn't empty when we break the loop, we goto
resched directly.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: init ingress queue
Changli Gao [Sat, 4 Dec 2010 02:31:41 +0000 (02:31 +0000)]
net: init ingress queue

The dev field of ingress queue is forgot to initialized, then NULL
pointer dereference happens in qdisc_alloc().

Move inits of tx queues to netif_alloc_netdev_queues().

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotcp: Bug fix in initialization of receive window.
Nandita Dukkipati [Fri, 3 Dec 2010 13:33:44 +0000 (13:33 +0000)]
tcp: Bug fix in initialization of receive window.

The bug has to do with boundary checks on the initial receive window.
If the initial receive window falls between init_cwnd and the
receive window specified by the user, the initial window is incorrectly
brought down to init_cwnd. The correct behavior is to allow it to
remain unchanged.

Signed-off-by: Nandita Dukkipati <nanditad@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocxgb4: fix MAC address hash filter
Dimitris Michailidis [Fri, 3 Dec 2010 10:39:04 +0000 (10:39 +0000)]
cxgb4: fix MAC address hash filter

Fix the calculation of the inexact hash-based MAC address filter.
It's 64 bits but current code is missing a ULL.  Results in filtering out
some legitimate packets.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocan: add slcan driver for serial/USB-serial CAN adapters
Oliver Hartkopp [Thu, 2 Dec 2010 10:57:59 +0000 (10:57 +0000)]
can: add slcan driver for serial/USB-serial CAN adapters

This patch adds support for serial/USB-serial CAN adapters implementing the
LAWICEL ASCII protocol for CAN frame transport over serial lines.

The driver implements the SLCAN line discipline and is heavily based on the
slip.c driver. Therefore the code style remains similar to slip.c to be able
to apply changes of the SLIP driver to the SLCAN driver easily.

For more details see the slcan Kconfig entry.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoatm: lanai: use kernel's '%pM' format option to print MAC
Andy Shevchenko [Thu, 2 Dec 2010 02:45:08 +0000 (02:45 +0000)]
atm: lanai: use kernel's '%pM' format option to print MAC

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Chas Williams <chas@cmf.nrl.navy.mil>
Cc: linux-atm-general@lists.sourceforge.net
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoCAIF: Fix U5500 compile error for shared memory driver
Kim Lilliestierna XX [Tue, 30 Nov 2010 09:11:22 +0000 (09:11 +0000)]
CAIF: Fix U5500 compile error for shared memory driver

Rearrange pr_fmt so it compiles.

Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Wed, 8 Dec 2010 16:13:01 +0000 (08:13 -0800)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

13 years agomac80211: Fix compilation error when mesh is disabled
Javier Cardona [Tue, 7 Dec 2010 18:41:47 +0000 (10:41 -0800)]
mac80211: Fix compilation error when mesh is disabled

Wrap mesh sections inside CONFIG_MAC80211_MESH to fix compilation
problems reported by Stephen Rothwell, Larry Finger and Bruno Randolf.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Remove dead code in recv.c
Mohammed Shafi Shajakhan [Tue, 7 Dec 2010 15:53:16 +0000 (21:23 +0530)]
ath9k: Remove dead code in recv.c

The structure struct ieee80211_rx_status *rxs is no longer needed to be
passed to ath_rx_send_to_mac80211 function

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Parse DTIM period from mac80211
Mohammed Shafi Shajakhan [Tue, 7 Dec 2010 15:44:15 +0000 (21:14 +0530)]
ath9k: Parse DTIM period from mac80211

With the current save power save implementation we assume a dtim period
of 1.This value is assigned based on a sanity check in the driver
eventhough we had not parsed it from mac80211.This patch obtains the actual
DTIM period from AP by parsing it from mac80211.Yet for handling
multicast traffic we may still have it as fixed rather than parsing it
from mac80211 .This does not breaks power save or anything as the sleep
duration is currently fixed in the driver.This patch may serve to improve
power save in the future by using dtim period for sleep duration and using
correct dtim period adhoc mode.

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Properly use unlikely check macro
Mohammed Shafi Shajakhan [Tue, 7 Dec 2010 15:10:58 +0000 (20:40 +0530)]
ath9k: Properly use unlikely check macro

AUTOSLEEP feature is enabled only for AR9271 and AR9003 version
chipsets.So unlikely macro should be used only to check whether
auto-sleep feature is enabled

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Fix panic on FW download failure
Sujith Manoharan [Tue, 7 Dec 2010 11:02:02 +0000 (16:32 +0530)]
ath9k_htc: Fix panic on FW download failure

Use the correct error condition exit in case firmware download
fails for some reason. Not doing so results in a panic:

usb 1-3: ath9k_htc: Transferred FW: ar9271.fw, size: 51280
usb 1-3: ath9k_htc: Firmware - ar9271.fw download failed
usb 1-3: ath9k_htc: Target is unresponsive
Failed to initialize the device
INFO: trying to register non-static key.
the code is fine but needs lockdep annotation.
turning off the locking correctness validator.
Pid: 2823, comm: insmod Tainted: G        W   2.6.37-rc4-wl #11
Call Trace:
[<ffffffff81090d7e>] __lock_acquire+0xe3e/0x1d00
[<ffffffff813a9f14>] ? restore_args+0x0/0x30
[<ffffffff81058af1>] ? vprintk+0x321/0x500
[<ffffffff81092290>] lock_acquire+0xa0/0x190
[<ffffffffa02a0eac>] ? usb_kill_anchored_urbs+0x1c/0x80 [usbcore]
[<ffffffff813a8ea8>] _raw_spin_lock_irq+0x48/0x60
[<ffffffffa02a0eac>] ? usb_kill_anchored_urbs+0x1c/0x80 [usbcore]
[<ffffffff813a53fd>] ? printk+0x3c/0x3f
[<ffffffffa02a0eac>] usb_kill_anchored_urbs+0x1c/0x80 [usbcore]
[<ffffffffa0055388>] ath9k_hif_usb_dealloc_urbs+0x18/0x40 [ath9k_htc]
[<ffffffffa00557d7>] ath9k_hif_usb_probe+0x227/0x3d0 [ath9k_htc]
[<ffffffffa02a56ac>] usb_probe_interface+0x10c/0x210 [usbcore]
[<ffffffff812ae826>] driver_probe_device+0x96/0x1c0
[<ffffffff812ae9f3>] __driver_attach+0xa3/0xb0
[<ffffffff812ae950>] ? __driver_attach+0x0/0xb0
[<ffffffff812ad6ae>] bus_for_each_dev+0x5e/0x90
[<ffffffff812ae4c9>] driver_attach+0x19/0x20
[<ffffffff812ae038>] bus_add_driver+0x168/0x320
[<ffffffff812aec71>] driver_register+0x71/0x140
[<ffffffff811fc338>] ? __raw_spin_lock_init+0x38/0x70
[<ffffffffa02a438c>] usb_register_driver+0xdc/0x190 [usbcore]
[<ffffffffa0063000>] ? ath9k_htc_init+0x0/0x4f [ath9k_htc]
[<ffffffffa005599e>] ath9k_hif_usb_init+0x1e/0x20 [ath9k_htc]
[<ffffffffa006302b>] ath9k_htc_init+0x2b/0x4f [ath9k_htc]
[<ffffffff8100212f>] do_one_initcall+0x3f/0x180
[<ffffffff8109ef9b>] sys_init_module+0xbb/0x200
[<ffffffff8100bf52>] system_call_fastpath+0x16/0x1b

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Add support for handling TX power configuration
Sujith Manoharan [Tue, 7 Dec 2010 11:01:54 +0000 (16:31 +0530)]
ath9k_htc: Add support for handling TX power configuration

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Cleanup device identification
Sujith Manoharan [Tue, 7 Dec 2010 11:01:38 +0000 (16:31 +0530)]
ath9k_htc: Cleanup device identification

ath.ko is a common module shared between ath5k, ar9170usb, ath9k and ath9k_htc.
Adding driver specific data to the shared structure would impact all the
drivers. Handling USB device recognition for devices specific to ath9k_htc
can be handled within the driver itself.

Also, AR7010 refers to the processor used in both AR9280/AR9287 based
devices. Rename the device enumerations accordingly.

While at it, check properly for the bus type when choosing the EEPROM
base address for UB95.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: fix a compiler warning
Felix Fietkau [Tue, 7 Dec 2010 03:40:18 +0000 (04:40 +0100)]
mac80211: fix a compiler warning

net/mac80211/mlme.c: In function 'ieee80211_sta_work':
net/mac80211/mlme.c:1981: warning: too many arguments for format

Introduced by commit 04ac3c0ee2c773c321ec472d892635a20556f34d
("mac80211: speed up AP probing using nullfunc frames").

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Use capabilities information for the number of TX queues
Bruno Randolf [Tue, 7 Dec 2010 02:08:12 +0000 (11:08 +0900)]
ath5k: Use capabilities information for the number of TX queues

One thing I missed in my WME series: Older hardware does not have enough
hardware queues to support WME. In this case we just set up one data queue. Use
the capability information to decide how many queues to set up.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Make DMA warning in ath_stoprecv WARN_ON_ONCE.
Ben Greear [Mon, 6 Dec 2010 21:13:07 +0000 (13:13 -0800)]
ath9k: Make DMA warning in ath_stoprecv WARN_ON_ONCE.

This decreases spammage in the log.  A single line message
will still be printed, so users can be aware that problem
exists.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Add device id of AR9485 to pci table
Vasanthakumar Thiagarajan [Mon, 6 Dec 2010 12:28:00 +0000 (04:28 -0800)]
ath9k: Add device id of AR9485 to pci table

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Disable MRC CCK for AR9485
Vasanthakumar Thiagarajan [Mon, 6 Dec 2010 12:27:59 +0000 (04:27 -0800)]
ath9k_hw: Disable MRC CCK for AR9485

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Setup paprd only for supported chains
Vasanthakumar Thiagarajan [Mon, 6 Dec 2010 12:27:58 +0000 (04:27 -0800)]
ath9k_hw: Setup paprd only for supported chains

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Program appropriate register for temperature compensation cal for AR9485
Vasanthakumar Thiagarajan [Mon, 6 Dec 2010 12:27:57 +0000 (04:27 -0800)]
ath9k_hw: Program appropriate register for temperature compensation cal for AR9485

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Add IQ cal changes for AR9485
Vasanthakumar Thiagarajan [Mon, 6 Dec 2010 12:27:56 +0000 (04:27 -0800)]
ath9k_hw: Add IQ cal changes for AR9485

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Define IQcal correction coefficient registers using index
Vasanthakumar Thiagarajan [Mon, 6 Dec 2010 12:27:55 +0000 (04:27 -0800)]
ath9k_hw: Define IQcal correction coefficient registers using index

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Program appropriate chianmask for AR9485 before starting AGC/IQ cal
Vasanthakumar Thiagarajan [Mon, 6 Dec 2010 12:27:54 +0000 (04:27 -0800)]
ath9k_hw: Program appropriate chianmask for AR9485 before starting AGC/IQ cal

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Configure power control only for the supported chains
Vasanthakumar Thiagarajan [Mon, 6 Dec 2010 12:27:53 +0000 (04:27 -0800)]
ath9k_hw: Configure power control only for the supported chains

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Read and configure turnning caps to regulate freq accuracy
Vasanthakumar Thiagarajan [Mon, 6 Dec 2010 12:27:52 +0000 (04:27 -0800)]
ath9k_hw: Read and configure turnning caps to regulate freq accuracy

Right now it is done for only AR9485, will be done for ar9003 also
after proper testing.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Configure internal regulator for AR9485
Vasanthakumar Thiagarajan [Tue, 7 Dec 2010 10:20:39 +0000 (02:20 -0800)]
ath9k_hw: Configure internal regulator for AR9485

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Read and configure antenna diversity control for AR9485
Vasanthakumar Thiagarajan [Mon, 6 Dec 2010 12:27:49 +0000 (04:27 -0800)]
ath9k_hw: Read and configure antenna diversity control for AR9485

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Configure xpa bias level for AR9485
Vasanthakumar Thiagarajan [Mon, 6 Dec 2010 12:27:48 +0000 (04:27 -0800)]
ath9k_hw: Configure xpa bias level for AR9485

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Read spur channel information from eeprom for AR9485
Vasanthakumar Thiagarajan [Mon, 6 Dec 2010 12:27:47 +0000 (04:27 -0800)]
ath9k: Read spur channel information from eeprom for AR9485

Also spur channel count and range is different for AR9485.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Add a helper function to get spur channel pointer from cal data for AR9003...
Vasanthakumar Thiagarajan [Mon, 6 Dec 2010 12:27:46 +0000 (04:27 -0800)]
ath9k_hw: Add a helper function to get spur channel pointer from cal data for AR9003 family

This helper function would be used for AR9485.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Find chansel of AR_PHY_65NM_CH0_SYNTH7 for AR9485
Vasanthakumar Thiagarajan [Mon, 6 Dec 2010 12:27:45 +0000 (04:27 -0800)]
ath9k_hw: Find chansel of AR_PHY_65NM_CH0_SYNTH7 for AR9485

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Configure pll control for AR9485
Vasanthakumar Thiagarajan [Mon, 6 Dec 2010 12:27:44 +0000 (04:27 -0800)]
ath9k: Configure pll control for AR9485

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Find the maximum number of chains that hw supports
Vasanthakumar Thiagarajan [Mon, 6 Dec 2010 12:27:43 +0000 (04:27 -0800)]
ath9k_hw: Find the maximum number of chains that hw supports

Have it in ah->caps. This will be used during various
calibrations.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>