platform/adaptation/renesas_rcar/renesas_kernel.git
12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Thu, 26 Apr 2012 19:03:48 +0000 (15:03 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next into for-davem

Conflicts:
drivers/net/wireless/iwlwifi/iwl-testmode.c

12 years agomac80211: Adds clean sdata helper
Andrei Emeltchenko [Tue, 24 Apr 2012 11:18:28 +0000 (14:18 +0300)]
mac80211: Adds clean sdata helper

Adds hepler to clean sdata ieee80211_clean_sdata similar way as
ieee80211_setup_sdata is implemented. The function will be used by other
interfaces later.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Fix IDLE Powersave
Sujith Manoharan [Tue, 24 Apr 2012 04:53:20 +0000 (10:23 +0530)]
ath9k: Fix IDLE Powersave

* PS_WAIT_FOR_TX_ACK is used in network-sleep mode and checking
  it for handling IDLE transitions is incorrect. Fix this.

* RX PCU/DMA engines have to be stopped before setting the chip into
  full-sleep mode - otherwise the chip becomes mute.

* Make things a bit clear by checking explicitly for network-sleep
  mode in the tx() routine and add a couple of debug statements
  to aid PS debugging.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: fix num_mcast_sta counting issues
Felix Fietkau [Mon, 23 Apr 2012 17:49:03 +0000 (19:49 +0200)]
mac80211: fix num_mcast_sta counting issues

Moving a STA to an AP VLAN prevents num_mcast_sta from being decremented
once the STA leaves, because sta->sdata changes. Fix this by checking
for AP VLANs as well.

Also exclude 4-addr VLAN stations from num_mcast_sta - remote 4-addr
stations ignore 3-address multicast frames anyway. In a typical bridge
configuration they receive the same packets as 4-address unicast.

This patch also fixes clearing the sdata->u.vlan.sta pointer when the
STA is removed from a 4-addr VLAN.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: rename AP variable num_sta_authorized to num_mcast_sta
Felix Fietkau [Mon, 23 Apr 2012 17:49:02 +0000 (19:49 +0200)]
mac80211: rename AP variable num_sta_authorized to num_mcast_sta

It is only used to test for BSS multicast receivers.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: check for non-managed interface
Wey-Yi Guy [Mon, 23 Apr 2012 16:30:32 +0000 (09:30 -0700)]
mac80211: check for non-managed interface

Average beacon signal only keep tracked by managed interface,
give warning and return 0 for the others.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agotipc: remove inline instances from C source files.
Paul Gortmaker [Mon, 23 Apr 2012 04:49:13 +0000 (04:49 +0000)]
tipc: remove inline instances from C source files.

Untie gcc's hands and let it do what it wants within the
individual source files.  There are two files, node.c and
port.c -- only the latter effectively changes (gcc-4.5.2).
Objdump shows gcc deciding to not inline port_peernode().

Suggested-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoaf_netlink: drop_monitor/dropwatch friendly
Eric Dumazet [Sun, 22 Apr 2012 21:30:29 +0000 (21:30 +0000)]
af_netlink: drop_monitor/dropwatch friendly

Need to consume_skb() instead of kfree_skb() in netlink_dump() and
netlink_unicast_kernel() to avoid false dropwatch positives.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoaf_netlink: cleanups
Eric Dumazet [Sun, 22 Apr 2012 21:30:21 +0000 (21:30 +0000)]
af_netlink: cleanups

netlink_destroy_callback() move to avoid forward reference

CodingStyle cleanups

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: skb_can_coalesce returns a boolean
Eric Dumazet [Mon, 23 Apr 2012 17:48:27 +0000 (17:48 +0000)]
net: skb_can_coalesce returns a boolean

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotcp: tcp_try_coalesce returns a boolean
Eric Dumazet [Mon, 23 Apr 2012 17:34:36 +0000 (17:34 +0000)]
tcp: tcp_try_coalesce returns a boolean

This clarifies code intention, as suggested by David.

Suggested-by: David Miller <davem@davemloft.net>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: make spd_fill_page() linear argument a bool
Eric Dumazet [Tue, 24 Apr 2012 03:35:04 +0000 (23:35 -0400)]
net: make spd_fill_page() linear argument a bool

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
David S. Miller [Tue, 24 Apr 2012 03:14:36 +0000 (23:14 -0400)]
Merge git://git./linux/kernel/git/davem/net

Fix merge between commit 3adadc08cc1e ("net ax25: Reorder ax25_exit to
remove races") and commit 0ca7a4c87d27 ("net ax25: Simplify and
cleanup the ax25 sysctl handling")

The former moved around the sysctl register/unregister calls, the
later simply removed them.

With help from Stephen Rothwell.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: Use bool and remove inline in skb_splice_bits() code.
David S. Miller [Tue, 24 Apr 2012 03:06:11 +0000 (23:06 -0400)]
net: Use bool and remove inline in skb_splice_bits() code.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: speedup skb_splice_bits()
Eric Dumazet [Sun, 22 Apr 2012 12:26:16 +0000 (12:26 +0000)]
net: speedup skb_splice_bits()

Commit 35f3d14db (pipe: add support for shrinking and growing pipes)
added a slowdown for splice(socket -> pipe), as we might grow the spd
used in skb_splice_bits() for each skb we process in splice() syscall.

Its not needed since skb lengths are capped. The default on-stack arrays
are more than enough.

Use MAX_SKB_FRAGS instead of PIPE_DEF_BUFFERS to describe the reasonable
limit per skb.

Add coalescing support to help splicing of GRO skbs built from linear
skbs (linked into frag_list)

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Linus Torvalds [Tue, 24 Apr 2012 02:45:19 +0000 (19:45 -0700)]
Merge branch 'rc-fixes' of git://git./linux/kernel/git/mmarek/kbuild

Pull build system failure fix from Michal Marek:
 "This fixes build failure with newer gcc that adds some internal
  symbols that end in "__mod_*_device_table", but are not actually the
  tables themselves."

* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  Fix modpost failures in fedora 17

12 years agotcp: introduce tcp_try_coalesce
Eric Dumazet [Mon, 23 Apr 2012 07:11:42 +0000 (07:11 +0000)]
tcp: introduce tcp_try_coalesce

commit c8628155ece3 (tcp: reduce out_of_order memory use) took care of
coalescing tcp segments provided by legacy devices (linear skbs)

We extend this idea to fragged skbs, as their truesize can be heavy.

ixgbe for example uses 256+1024+PAGE_SIZE/2 = 3328 bytes per segment.

Use this coalescing strategy for receive queue too.

This contributes to reduce number of tcp collapses, at minimal cost, and
reduces memory overhead and packets drops.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Cc: Tom Herbert <therbert@google.com>
Cc: Maciej Żenczykowski <maze@google.com>
Cc: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Update driver version to 1.72.50-0
Barak Witkowski [Mon, 23 Apr 2012 03:05:16 +0000 (03:05 +0000)]
bnx2x: Update driver version to 1.72.50-0

Signed-off-by: Barak Witkowski <barak@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: remove gro workaround
Dmitry Kravkov [Mon, 23 Apr 2012 03:05:11 +0000 (03:05 +0000)]
bnx2x: remove gro workaround

Removes GRO workaround, as issue is fixed in FW 7.2.51.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Barak Witkowski <barak@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: add afex support
Barak Witkowski [Mon, 23 Apr 2012 03:04:46 +0000 (03:04 +0000)]
bnx2x: add afex support

Following patch adds afex multifunction support to the driver (afex
multifunction is based on vntag header) and updates FW version used to 7.2.51.

Support includes the following:

1. Configure vif parameters in firmware (default vlan, vif id, default
   priority, allowed priorities) according to values received from NIC.
2. Configure FW to strip/add default vlan according to afex vlan mode.
3. Notify link up to OS only after vif is fully initialized.
4. Support vif list set/get requests and configure FW accordingly.
5. Supply afex statistics upon request from NIC.
6. Special handling to L2 interface in case of FCoE vif.

Signed-off-by: Barak Witkowski <barak@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomlx4_en: Byte Queue Limit support
Yevgeny Petrilin [Mon, 23 Apr 2012 02:18:50 +0000 (02:18 +0000)]
mlx4_en: Byte Queue Limit support

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomlx4_en: Moving to Interrupts for TX completions
Yevgeny Petrilin [Mon, 23 Apr 2012 02:18:39 +0000 (02:18 +0000)]
mlx4_en: Moving to Interrupts for TX completions

Moving to interrupts instead of polling fpr TX completions
Avoiding situations where skb can be held in by the driver for
a long time (till timer expires).
The change is also necessary for supporting BQL.

Removing comp_lock that was required because we could handle TX
completions from several contexts: Interrupts, timer, polling.
Now there is only interrupts

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomlx4_en: Added Ethtool support for TX Interrupt coalescing
Yevgeny Petrilin [Mon, 23 Apr 2012 02:18:33 +0000 (02:18 +0000)]
mlx4_en: Added Ethtool support for TX Interrupt coalescing

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotcp: sk_add_backlog() is too agressive for TCP
Eric Dumazet [Sun, 22 Apr 2012 23:38:54 +0000 (23:38 +0000)]
tcp: sk_add_backlog() is too agressive for TCP

While investigating TCP performance problems on 10Gb+ links, we found a
tcp sender was dropping lot of incoming ACKS because of sk_rcvbuf limit
in sk_add_backlog(), especially if receiver doesnt use GRO/LRO and sends
one ACK every two MSS segments.

A sender usually tweaks sk_sndbuf, but sk_rcvbuf stays at its default
value (87380), allowing a too small backlog.

A TCP ACK, even being small, can consume nearly same truesize space than
outgoing packets. Using sk_rcvbuf + sk_sndbuf as a limit makes sense and
is fast to compute.

Performance results on netperf, single flow, receiver with disabled
GRO/LRO : 7500 Mbits instead of 6050 Mbits, no more TCPBacklogDrop
increments at sender.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Cc: Tom Herbert <therbert@google.com>
Cc: Maciej Żenczykowski <maze@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Cc: Rick Jones <rick.jones2@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: add a limit parameter to sk_add_backlog()
Eric Dumazet [Sun, 22 Apr 2012 23:34:26 +0000 (23:34 +0000)]
net: add a limit parameter to sk_add_backlog()

sk_add_backlog() & sk_rcvqueues_full() hard coded sk_rcvbuf as the
memory limit. We need to make this limit a parameter for TCP use.

No functional change expected in this patch, all callers still using the
old sk_rcvbuf limit.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Cc: Tom Herbert <therbert@google.com>
Cc: Maciej Żenczykowski <maze@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Cc: Rick Jones <rick.jones2@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet ax25: Fix the build when sysctl support is disabled.
Eric W. Biederman [Mon, 23 Apr 2012 14:25:49 +0000 (14:25 +0000)]
net ax25: Fix the build when sysctl support is disabled.

Randy Dunlap <rdunlap@xenotime.net> reported:

> On 04/23/2012 12:07 AM, Stephen Rothwell wrote:
>
>> Hi all,
>>
>> Changes since 20120420:
>
>
> include/net/ax25.h:447:75: error: expected ';' before '}' token
>
> static inline int ax25_register_dev_sysctl(ax25_dev *ax25_dev) { return 0 };
> static inline void ax25_unregister_dev_sysctl(ax25_dev *ax25_dev) {};
>
> First function:  move ';' inside braces.
> Second function:  drop the ';'.

Put the semicolons where it makes sense.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge tag 'md-3.4-fixes' of git://neil.brown.name/md
Linus Torvalds [Tue, 24 Apr 2012 01:25:01 +0000 (18:25 -0700)]
Merge tag 'md-3.4-fixes' of git://neil.brown.name/md

Pull a few more md bug fixes from NeilBrown:
 "2 are tagged for -stable, one being for a fairly serious bug that can
  corrupt metadata and make it hard to recovery an array.  The other is
  for a more recent regression since 3.3"

* tag 'md-3.4-fixes' of git://neil.brown.name/md:
  md: fix possible corruption of array metadata on shutdown.
  md: don't call ->add_disk unless there is good reason.
  DM RAID: Use safe version of rdev_for_each

12 years agoMerge tag 'dlm-fixes-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland...
Linus Torvalds [Tue, 24 Apr 2012 01:22:42 +0000 (18:22 -0700)]
Merge tag 'dlm-fixes-3.4' of git://git./linux/kernel/git/teigland/linux-dlm

Pull dlm fixes from David Teigland:
 "This includes one short patch fixing the behavior of the QUECVT flag,
  which the gfs2 folks are waiting on."

* tag 'dlm-fixes-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm:
  dlm: fix QUECVT when convert queue is empty

12 years agomm: fix s390 BUG by __set_page_dirty_no_writeback on swap
Hugh Dickins [Mon, 23 Apr 2012 18:14:50 +0000 (11:14 -0700)]
mm: fix s390 BUG by __set_page_dirty_no_writeback on swap

Mel reports a BUG_ON(slot == NULL) in radix_tree_tag_set() on s390
3.0.13: called from __set_page_dirty_nobuffers() when page_remove_rmap()
tries to transfer dirty flag from s390 storage key to struct page and
radix_tree.

That would be because of reclaim's shrink_page_list() calling
add_to_swap() on this page at the same time: first PageSwapCache is set
(causing page_mapping(page) to appear as &swapper_space), then
page->private set, then tree_lock taken, then page inserted into
radix_tree - so there's an interval before taking the lock when the
radix_tree slot is empty.

We could fix this by moving __add_to_swap_cache()'s spin_lock_irq up
before the SetPageSwapCache.  But a better fix is simply to do what's
five years overdue: Ken Chen introduced __set_page_dirty_no_writeback()
(if !PageDirty TestSetPageDirty) for tmpfs to skip all the radix_tree
overhead, and swap is just the same - it ignores the radix_tree tag, and
does not participate in dirty page accounting, so should be using
__set_page_dirty_no_writeback() too.

s390 testing now confirms that this does indeed fix the problem.

Reported-by: Mel Gorman <mgorman@suse.de>
Signed-off-by: Hugh Dickins <hughd@google.com>
Acked-by: Mel Gorman <mgorman@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Ken Chen <kenchen@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agomd: fix possible corruption of array metadata on shutdown.
NeilBrown [Tue, 24 Apr 2012 00:23:16 +0000 (10:23 +1000)]
md: fix possible corruption of array metadata on shutdown.

commit c744a65c1e2d59acc54333ce8
  md: don't set md arrays to readonly on shutdown.

removed the possibility of a 'BUG' when data is written to an array
that has just been switched to read-only, but also introduced the
possibility that the array metadata could be corrupted.

If, when md_notify_reboot gets the mddev lock, the array is
in a state where it is assembled but hasn't been started (as can
happen if the personality module is not available, or in other unusual
situations), then incorrect metadata will be written out making it
impossible to re-assemble the array.

So only call __md_stop_writes() if the array has actually been
activated.

This patch is needed for any stable kernel which has had the above
commit applied.

Cc: stable@vger.kernel.org
Reported-by: Christoph Nelles <evilazrael@evilazrael.de>
Signed-off-by: NeilBrown <neilb@suse.de>
12 years agomd: don't call ->add_disk unless there is good reason.
NeilBrown [Tue, 24 Apr 2012 00:23:14 +0000 (10:23 +1000)]
md: don't call ->add_disk unless there is good reason.

Commit 7bfec5f35c68121e7b18

   md/raid5: If there is a spare and a want_replacement device, start replacement.

cause md_check_recovery to call ->add_disk much more often.
Instead of only when the array is degraded, it is now called whenever
md_check_recovery finds anything useful to do, which includes
updating the metadata for clean<->dirty transition.
This causes unnecessary work, and causes info messages from ->add_disk
to be reported much too often.

So refine md_check_recovery to only do any actual recovery checking
(including ->add_disk) if MD_RECOVERY_NEEDED is set.

This fix is suitable for 3.3.y:

Cc: stable@vger.kernel.org
Reported-by: Jan Ceuleers <jan.ceuleers@computer.org>
Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoDM RAID: Use safe version of rdev_for_each
Jonathan Brassow [Tue, 24 Apr 2012 00:23:13 +0000 (10:23 +1000)]
DM RAID: Use safe version of rdev_for_each

Fix segfault caused by using rdev_for_each instead of rdev_for_each_safe

Commit dafb20fa34320a472deb7442f25a0c086e0feb33 mistakenly replaced a safe
iterator with an unsafe one when making some macro changes.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
12 years agonet sysctl: Add place holder functions for when sysctl support is compiled out of...
Eric W. Biederman [Mon, 23 Apr 2012 12:13:02 +0000 (12:13 +0000)]
net sysctl: Add place holder functions for when sysctl support is compiled out of the kernel.

Randy Dunlap <rdunlap@xenotime.net> reported:
> On 04/23/2012 12:07 AM, Stephen Rothwell wrote:
>
>> Hi all,
>>
>> Changes since 20120420:
>
>
>
> ERROR: "unregister_net_sysctl_table" [net/phonet/phonet.ko] undefined!
> ERROR: "register_net_sysctl" [net/phonet/phonet.ko] undefined!
>
> when CONFIG_SYSCTL is not enabled.

Add static inline stub functions to gracefully handle the case when sysctl
support is not present.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoiwlwifi: use new mac80211 queue scheme
Johannes Berg [Tue, 17 Apr 2012 14:39:03 +0000 (07:39 -0700)]
iwlwifi: use new mac80211 queue scheme

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: clean up module parameters
Johannes Berg [Tue, 17 Apr 2012 14:36:30 +0000 (07:36 -0700)]
iwlwifi: clean up module parameters

For now at least, all module parameters should be
with the core functionality, so move them there,
while at it rename to iwlwifi_mod_params. Also
rename iwl-shared.h to iwl-modparams.h to reflect
the real contents.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: revert workaround to restore 1000 rx throughput
Don Fry [Fri, 23 Mar 2012 22:41:07 +0000 (15:41 -0700)]
iwlwifi: revert workaround to restore 1000 rx throughput

A workaround in commit c0486b7ccc5 resulted in a 40% drop in receive
throughput in order to fix a transmit problem.  The transmit problem
no longer occurs, so restore the receive throughput.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: use direct calls for transport free
Johannes Berg [Thu, 12 Apr 2012 13:24:30 +0000 (06:24 -0700)]
iwlwifi: use direct calls for transport free

Since the transport allocates and frees itself in
the transport specific code, there's no need for
virtual functions for it. Remove the free method
and call the correct functions directly.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: clean up some hw file includes
Johannes Berg [Tue, 3 Apr 2012 18:57:59 +0000 (20:57 +0200)]
iwlwifi: clean up some hw file includes

We can't get rid of everything yet due to
the BT definitions that I'm not quite sure
yet how to handle, but we can get rid of
most unneeded includes.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move OTP defines
Johannes Berg [Tue, 3 Apr 2012 18:49:20 +0000 (20:49 +0200)]
iwlwifi: move OTP defines

Since the PCI core shouldn't include the
iwl-eeprom.h header file, move the OTP
definitions into iwl-agn-hw.h which can
be included.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move antenna definitions to config
Johannes Berg [Tue, 3 Apr 2012 18:38:44 +0000 (20:38 +0200)]
iwlwifi: move antenna definitions to config

Since they're used in the config, they
should be declared in iwl-config.h.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move eeprom versions to HW files
Johannes Berg [Tue, 3 Apr 2012 18:41:07 +0000 (20:41 +0200)]
iwlwifi: move eeprom versions to HW files

The hardware files belong to the core PCI
functionality, but the eeprom header file
mixes higher-level functionality and the
defines, so move out the specific defines
and put them into the appropriate HW files
instead.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move watchdog definitions to config
Johannes Berg [Tue, 3 Apr 2012 18:38:44 +0000 (20:38 +0200)]
iwlwifi: move watchdog definitions to config

Since they're used in the config, they
should be declared in iwl-config.h.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move PLCP defines to config
Johannes Berg [Tue, 3 Apr 2012 18:34:46 +0000 (20:34 +0200)]
iwlwifi: move PLCP defines to config

Since they're used in the config, they
should be declared in iwl-config.h.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move driver defines to iwl-drv.h
Johannes Berg [Tue, 3 Apr 2012 23:44:37 +0000 (16:44 -0700)]
iwlwifi: move driver defines to iwl-drv.h

These defines will have to be shared
between modules, but they seem better
placed in iwl-drv.h than iwl-shared.h.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: remove duplicate iwlagn_mod_params declaration
Johannes Berg [Tue, 3 Apr 2012 23:42:03 +0000 (16:42 -0700)]
iwlwifi: remove duplicate iwlagn_mod_params declaration

We only need one declaration, not multiple.
Keep the one in iwl-shared.h, which will
probably be renamed to iwl-modparams.h at
some point in the future.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: remove TX/RX frame statistics
Johannes Berg [Mon, 23 Apr 2012 21:25:51 +0000 (14:25 -0700)]
iwlwifi: remove TX/RX frame statistics

Keeping statistics per frame type really isn't
very useful, and needs a huge amount of code
so remove it. Since that is the only thing in
iwl-core.{c,h} now, those files can be killed.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agobe2net: fix ethtool get settings
Ajit Khaparde [Sat, 21 Apr 2012 18:53:22 +0000 (18:53 +0000)]
be2net: fix ethtool get settings

ethtool get settings was not displaying all the settings correctly.
use the get_phy_info to get more information about the PHY to fix this.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoiwlwifi: remove traffic log
Johannes Berg [Tue, 3 Apr 2012 23:35:41 +0000 (16:35 -0700)]
iwlwifi: remove traffic log

This is superseded by tracing and no longer needed.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move iwl_cmd_echo_test
Johannes Berg [Mon, 2 Apr 2012 13:15:58 +0000 (15:15 +0200)]
iwlwifi: move iwl_cmd_echo_test

The function can be static with the only user.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move TIME_UNIT
Johannes Berg [Mon, 2 Apr 2012 13:14:48 +0000 (15:14 +0200)]
iwlwifi: move TIME_UNIT

We're getting rid of iwl-core.h, move TIME_UNIT out.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: remove bt_siso_mode declaration
Johannes Berg [Mon, 2 Apr 2012 13:09:26 +0000 (15:09 +0200)]
iwlwifi: remove bt_siso_mode declaration

That variable doesn't exist anywhere.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: include net/mac80211.h to avoid compiler error
Wey-Yi Guy [Tue, 3 Apr 2012 23:23:37 +0000 (16:23 -0700)]
iwlwifi: include net/mac80211.h to avoid compiler error

without the include, kernel compiling will fail, but not compat.
this patch need to be merge with iwlwifi-clean-up-iwl-shared.h-includes.patch

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: clean up iwl-shared.h includes
Johannes Berg [Mon, 2 Apr 2012 13:04:33 +0000 (15:04 +0200)]
iwlwifi: clean up iwl-shared.h includes

That file is now holding just a few defines and
the module parameters, so it shouldn't include
anything. Make sure the right users include the
right files instead.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move iwl_have_debug_level
Johannes Berg [Mon, 2 Apr 2012 12:54:16 +0000 (14:54 +0200)]
iwlwifi: move iwl_have_debug_level

This function belongs into the debugging framework.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move debugfs registration function declarations
Johannes Berg [Mon, 2 Apr 2012 12:53:08 +0000 (14:53 +0200)]
iwlwifi: move debugfs registration function declarations

They clearly belong into iwl-agn.h as they have no
relation to the (generic) debug logging framework.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: remove debugfs logspam
Johannes Berg [Fri, 30 Mar 2012 07:37:39 +0000 (09:37 +0200)]
iwlwifi: remove debugfs logspam

There really is no point in printing very verbose
error messages when somebody tries to access a
debugfs file before it is ready. Or even worse,
printing verbose messages when memory allocation
fails which *already* prints a huge warning.

Remove all IWL_ERR messages from debugfs.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: properly set basic rates
Johannes Berg [Thu, 8 Mar 2012 08:37:53 +0000 (09:37 +0100)]
iwlwifi: properly set basic rates

This fixes a long-standing bug: iwlwifi always assumes
that the CCK ACK rates are 1 and 2 MBps and the OFDM
ACK rates are 6, 12 and 24 MBps. Fix this problem by
using the basic rates the AP (or in AP case hostapd)
told us to use and add the necessary mandatory rates
to the mix.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: Added debugfs calib disabled write
David Spinadel [Sat, 31 Mar 2012 15:31:05 +0000 (08:31 -0700)]
iwlwifi: Added debugfs calib disabled write

Added the option to disable calibration via debugfs.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: provide proper API to disable all interrupts
Emmanuel Grumbach [Sat, 31 Mar 2012 15:28:38 +0000 (08:28 -0700)]
iwlwifi: provide proper API to disable all interrupts

Since the op_mode may go away, the transport needs to be able to
be told not to update the op_mode at all (even for RF kill).
Provide this API and use it in the proper places.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: check RF kill register when interrupts have been disabled
Emmanuel Grumbach [Wed, 28 Mar 2012 08:34:02 +0000 (10:34 +0200)]
iwlwifi: check RF kill register when interrupts have been disabled

Since the interrupts have been disabled, we may have missed an RF
kill interrupt. Check the register to be sure the op_mode is in
sync.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: enable RF kill interrupt in start_hw
Emmanuel Grumbach [Wed, 28 Mar 2012 08:33:09 +0000 (10:33 +0200)]
iwlwifi: enable RF kill interrupt in start_hw

The op_mode wants to know about changes in HW RF kill state.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: first enable RF kill interrupt, then check register
Emmanuel Grumbach [Wed, 28 Mar 2012 07:57:46 +0000 (09:57 +0200)]
iwlwifi: first enable RF kill interrupt, then check register

This can solve a race (very unlikely to happen though).

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: make a static inline to read the RF kill register
Emmanuel Grumbach [Wed, 28 Mar 2012 09:00:58 +0000 (11:00 +0200)]
iwlwifi: make a static inline to read the RF kill register

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agort2800: add chipset revision RT5390R support
Anisse Astier [Mon, 23 Apr 2012 10:33:11 +0000 (12:33 +0200)]
rt2800: add chipset revision RT5390R support

About 70% of the chips with revision RT5390R initialize incorrectly, using
the auxiliary antenna instead of the main one. The net result is that
signal reception is very poor (no AP further than 1M).

This chipset differs from RT5390 and RT5390F by its support of hardware
antenna diversity. Therefore antenna selection should be done
differently, by disabling software features and previously selected
antenna.

This changeset does just that, and makes all RT5390R work properly.

This is based on Ralink's 2012_03_22_RT5572_Linux_STA_v2.6.0.0_DPO
driver.

Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: Validate legacy rateset.
Bala Shanmugam [Fri, 20 Apr 2012 13:42:58 +0000 (19:12 +0530)]
cfg80211: Validate legacy rateset.

Legacy rates are not validated while configuring
tx rateset using iw. So below cmd is accepted by nl80211.
sudo iw wlan2 set bitrates legacy-2.4 1 2 3

Validate legacy rates and return
error if any rate in the rateset is not valid.

Signed-off-by: Bala Shanmugam <bkamatch@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: declare ieee80211_ave_rssi as EXPORT
Wey-Yi Guy [Fri, 20 Apr 2012 18:57:00 +0000 (11:57 -0700)]
mac80211: declare ieee80211_ave_rssi as EXPORT

ieee80211_ave_rssi need to be declare as export for driver to use it.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: fixup for mesh TSF adjustment latency in Toffset setpoint
Javier Cardona [Fri, 20 Apr 2012 16:52:56 +0000 (09:52 -0700)]
mac80211: fixup for mesh TSF adjustment latency in Toffset setpoint

The original patch defined the correction margin but did not apply it.

Signed-off-by: Shinichi Hotori <hotorinn@gmail.com>
Signed-off-by: Yu Niiro <yu.niiro@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: extend DFS detector stats in dfs_debugfs
Zefir Kurtisi [Fri, 20 Apr 2012 15:20:34 +0000 (17:20 +0200)]
ath9k: extend DFS detector stats in dfs_debugfs

Extend debugfs entry for dfs_stats with DFS detection events
and shared pool statistics.

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: don't strip mic on non-encrypted frames in tkip
Michael Liang [Fri, 20 Apr 2012 09:11:57 +0000 (17:11 +0800)]
ath9k: don't strip mic on non-encrypted frames in tkip

Fix the following bug: in tkip mode, qos-null ps on/off packets
are dropped due to incorrect packet length so that ath9k softap
can't handle powersave state transition of peer STA correctly.

Signed-off-by: Michael Liang <mliang@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agortlwifi: rtl8192se: Convert driver to use private dm struct
Larry Finger [Thu, 19 Apr 2012 21:32:44 +0000 (16:32 -0500)]
rtlwifi: rtl8192se: Convert driver to use private dm struct

Convert driver to use private version of dig_t instead of global version.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agortlwifi: rtl8192de: Convert driver to use private dm structs
Larry Finger [Thu, 19 Apr 2012 21:32:43 +0000 (16:32 -0500)]
rtlwifi: rtl8192de: Convert driver to use private dm structs

Convert driver to use the private dig_t instead of a global version.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agortlwifi: rtl8192c: Convert driver to use private ps_t struct
Larry Finger [Thu, 19 Apr 2012 21:32:42 +0000 (16:32 -0500)]
rtlwifi: rtl8192c: Convert driver to use private ps_t struct

Convert driver to use the private instead of global version.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agortlwifi: rtl8192c: Convert driver to use private dm structs
Larry Finger [Thu, 19 Apr 2012 21:32:41 +0000 (16:32 -0500)]
rtlwifi: rtl8192c: Convert driver to use private dm structs

Convert rtl8192c to use the dm_digtable struct in the common header file
instead of the global variable. Without this change, every instance of
rtl8192ce and rtl8192cu will be using the same global arrays.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agortlwifi: Add dm structs to private structure
Larry Finger [Thu, 19 Apr 2012 21:32:40 +0000 (16:32 -0500)]
rtlwifi: Add dm structs to private structure

Add the dig_t and ps_t structures to the private variables.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agortlwifi: Move dig_t and ps_t structs
Larry Finger [Thu, 19 Apr 2012 21:32:39 +0000 (16:32 -0500)]
rtlwifi: Move dig_t and ps_t structs

Move struct definitions for dig_t and ps_t to the common header file.

This move is needed to convert these structures from a "per-driver" to a
"per-interface" basis.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: increase tx abort timeout for half/quarter channels
Felix Fietkau [Thu, 19 Apr 2012 19:18:29 +0000 (21:18 +0200)]
ath9k_hw: increase tx abort timeout for half/quarter channels

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: disable fast channel change when changing from/to half/quarter mode
Felix Fietkau [Thu, 19 Apr 2012 19:18:28 +0000 (21:18 +0200)]
ath9k_hw: disable fast channel change when changing from/to half/quarter mode

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: disable Tx IQ calibration on half/quarter channels
Felix Fietkau [Thu, 19 Apr 2012 19:18:27 +0000 (21:18 +0200)]
ath9k_hw: disable Tx IQ calibration on half/quarter channels

It does not work properly and reduces throughput.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: fix and clean up PHY activation delay
Felix Fietkau [Thu, 19 Apr 2012 19:18:26 +0000 (21:18 +0200)]
ath9k_hw: fix and clean up PHY activation delay

The delay calculation is the same for all chips, however some parts of the
code missed the extra delay factor for half/quarter.
Clean up the code and move the delay calculation to a common place.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: increase symbol overlap window for half/quarter channels
Felix Fietkau [Thu, 19 Apr 2012 19:18:25 +0000 (21:18 +0200)]
ath9k_hw: increase symbol overlap window for half/quarter channels

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: set the PHY mode for half/quarter channels on AR9003
Felix Fietkau [Thu, 19 Apr 2012 19:18:24 +0000 (21:18 +0200)]
ath9k_hw: set the PHY mode for half/quarter channels on AR9003

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: increase ACK timeout for half/quarter channels
Felix Fietkau [Thu, 19 Apr 2012 19:18:23 +0000 (21:18 +0200)]
ath9k_hw: increase ACK timeout for half/quarter channels

For some reason the MAC timing is a bit off when waiting for ACKs, so add
some extra delay to the ACK timeout values. Significantly reduces the
number of retransmissions in my tests.
Also disable the 2.4 GHz ACK timeout workaround in half/quarter mode, it
is not required there.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: use standard SIFS time as reference for half/quarter channels
Felix Fietkau [Thu, 19 Apr 2012 19:18:22 +0000 (21:18 +0200)]
ath9k_hw: use standard SIFS time as reference for half/quarter channels

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: remove ATH_BTCOEX_CFG_MCI
Rajkumar Manoharan [Thu, 19 Apr 2012 13:43:52 +0000 (19:13 +0530)]
ath9k_hw: remove ATH_BTCOEX_CFG_MCI

AR9462 uses modified version of 3-Wire hw scheme for btcoex.
MCI itself is not a separate hw scheme but it aids to manage
multiple bt profiles. In ar9462, bt priority traffic is identified
by the number of bt profile types instead of gpio. So that this
patch removes MCI hw scheme.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: simplify beacon configuration for beaconing vifs
Rajkumar Manoharan [Thu, 19 Apr 2012 13:43:51 +0000 (19:13 +0530)]
ath9k: simplify beacon configuration for beaconing vifs

As of now beacon configuration is being called multiple times
in bss info change notification. This patch avoids multiple
configuration and make it simpler.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: make DFS detector pools SMP safe
Zefir Kurtisi [Thu, 19 Apr 2012 12:03:04 +0000 (14:03 +0200)]
ath9k: make DFS detector pools SMP safe

This adds locking of the detector's shared pulse and PRI sequence
pools to enable multi-wiphy operation on SMP systems.

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agolibertas: add missing include
Felix Fietkau [Thu, 19 Apr 2012 11:54:12 +0000 (13:54 +0200)]
libertas: add missing include

Without it, I get compile errors due to missing TASK_NORMAL,
TASK_UNINTERRUPTIBLE and schedule.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: Use GFP_KERNEL for rx buffer allocation on USB devices
Helmut Schaa [Thu, 19 Apr 2012 11:24:10 +0000 (13:24 +0200)]
rt2x00: Use GFP_KERNEL for rx buffer allocation on USB devices

Since the RX path on USB devices is handled in process context we can
use GFP_KERNEL for RX buffer allocation. This should reduce the
likelihood of allocation failures.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Tested-By: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2800: debugfs register access: BBP is 256 bytes big
Anisse Astier [Thu, 19 Apr 2012 09:20:32 +0000 (11:20 +0200)]
rt2800: debugfs register access: BBP is 256 bytes big

We're already using BBP for values > 128. Make that explicit and allow
debugfs access.

Signed-off-by: Anisse Astier <anisse@astier.eu>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: add support for Marvell USB8797 chipset
Amitkumar Karwar [Thu, 19 Apr 2012 03:08:28 +0000 (20:08 -0700)]
mwifiex: add support for Marvell USB8797 chipset

This patch supports Avastar 88W8797 chipset with USB interface.

The corresponding firmware image file is located at:
"mrvl/usb8797_uapsta.bin"

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Frank Huang <frankh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: fix STA channel width field
Thomas Pedersen [Thu, 19 Apr 2012 02:24:14 +0000 (19:24 -0700)]
mac80211: fix STA channel width field

According to IEEE 802.11 8.4.2.59, set the "STA channel width" bit to 0
if transmitting STA is using a 20mhz channel.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: don't set mesh peer ht caps if ht disabled
Thomas Pedersen [Thu, 19 Apr 2012 02:24:13 +0000 (19:24 -0700)]
mac80211: don't set mesh peer ht caps if ht disabled

Blindly setting ht caps on a mesh peer's station entry would result in
MCS rates being used by the rate control algorithm even if no ht had
been configured. Fix this by checking the channel type before assigning
ht capabilites.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: refactor mesh peer rate handling
Thomas Pedersen [Thu, 19 Apr 2012 02:23:43 +0000 (19:23 -0700)]
mac80211: refactor mesh peer rate handling

To avoid passing supp_rates and basic_rates around all the time, just
derive these when needed in mesh_matches_local() and mesh_peer_init().

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: refactor mesh peer initialization
Thomas Pedersen [Thu, 19 Apr 2012 02:23:42 +0000 (19:23 -0700)]
mac80211: refactor mesh peer initialization

This patch unifies the previous two paths toward mesh peer creation a
bit. It also fixes a bug where a peer's changing rates or HT mode
wouldn't register on leaving and then returning to the mesh with a sta
entry still present.

Also clean up locking and clear possibly stale ht cap.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: fix TX power reporting on AR9003 chips
Gabor Juhos [Wed, 18 Apr 2012 20:23:38 +0000 (22:23 +0200)]
ath9k: fix TX power reporting on AR9003 chips

The current code unconditionally reads the target
power values for all modes from the EEPROM. However
In 'ar9003_hw_set_power_per_rate_table' the regulatory
caps are applied only on a mode specific subset of the
power values.

The reported TX power level is calculated from the
maximum of the power values. Because some of these
values are uncapped in certain cases, the reported
TX power will be wrong.

On the older chipset, we don't have such problems
because only the mode specific subset of the power
levels are retrieved from the EEPROM on those. Do
the same for the AR9003 chips to fix the issue.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agolibertas CS: convert to asynchronous firmware loading
Daniel Drake [Wed, 18 Apr 2012 19:09:44 +0000 (20:09 +0100)]
libertas CS: convert to asynchronous firmware loading

Signed-off-by: Daniel Drake <dsd@laptop.org>
Tested-by: Dan Williams <dcbw@redhat.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Fix compile warnings when DEBUGFS is disabled.
Ben Greear [Tue, 17 Apr 2012 22:19:03 +0000 (15:19 -0700)]
ath9k: Fix compile warnings when DEBUGFS is disabled.

This fixes two compile warnings, and removes a useless
cast when assigning the 'sc' variable.

Reported-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Support on-channel scan option.
Ben Greear [Tue, 17 Apr 2012 17:54:16 +0000 (10:54 -0700)]
mac80211: Support on-channel scan option.

This based on an idea posted by Stanislaw Gruszka,
though I accept full blame for the implementation!

This has been tested with ath9k.

The idea is to let users scan on the current operating
channel without interrupting normal traffic more than
absolutely necessary (changing power level might reset
some hardware, for instance).

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agowireless: rt2x00: rt2800usb more devices were identified
Xose Vazquez Perez [Tue, 17 Apr 2012 14:28:05 +0000 (16:28 +0200)]
wireless: rt2x00: rt2800usb more devices were identified

found in 2012_03_22_RT5572_Linux_STA_v2.6.0.0_DPO

RT3070:
(0x2019,0x5201)  Planex Communications, Inc. RT8070
(0x7392,0x4085)  2L Central Europe BV 8070
7392 is Edimax

RT35xx:
(0x1690,0x0761) Askey
was Fujitsu Stylistic 550, but 1690 is Askey

Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: add possible wiphy interface combinations
Felix Fietkau [Tue, 17 Apr 2012 00:40:07 +0000 (02:40 +0200)]
ath9k: add possible wiphy interface combinations

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>