carl9170fw.git
7 years agocarl9170 toolchain: update to gcc 6.2.0 and binutils 2.27 radar
Christian Lamparter [Mon, 22 Aug 2016 21:41:21 +0000 (23:41 +0200)]
carl9170 toolchain: update to gcc 6.2.0 and binutils 2.27

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 years agocarl9170 firmware tools: remove unused otus_magic
Christian Lamparter [Mon, 22 Aug 2016 21:39:55 +0000 (23:39 +0200)]
carl9170 firmware tools: remove unused otus_magic

gcc 6.2.0 is warning about the following unused const:
src/fwinfo.c:265:22: warning: ‘otus_magic’ defined but not used.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 years agoMerge remote-tracking branch 'refs/remotes/origin/radar' into radar
Christian Lamparter [Sun, 5 Jun 2016 22:06:21 +0000 (00:06 +0200)]
Merge remote-tracking branch 'refs/remotes/origin/radar' into radar

7 years agocarl9170 firmware: add radar pattern generator
Christian Lamparter [Fri, 4 May 2012 20:07:52 +0000 (22:07 +0200)]
carl9170 firmware: add radar pattern generator

This - rather large - patch includes parts of a
future radar pattern generator which hopefully
can be used for testing DFS without having to
resort to expensive hardware.

The basic concept has been successfully tested with
p54 [firmware detector - easy to fool] . But, that
does not mean it works with other devices just as
well (or at all!).

Note: This feature is WIP and it will not work
out-of-the-box. Part of the patterns have been
tested by Ben Greear and shown to work. YMMV!

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agoMerge branch 'master' into radar
Christian Lamparter [Wed, 27 Apr 2016 14:18:53 +0000 (16:18 +0200)]
Merge branch 'master' into radar

8 years agounbreak allmodconfig KCONFIG_ALLCONFIG=...
Al Viro [Thu, 14 Jan 2016 18:13:49 +0000 (18:13 +0000)]
unbreak allmodconfig KCONFIG_ALLCONFIG=...

Prior to 3.13 make allmodconfig KCONFIG_ALLCONFIG=/dev/null used
to be equivalent to make allmodconfig; these days it hardwires MODULES to n.
In fact, any KCONFIG_ALLCONFIG that doesn't set MODULES explicitly is
treated as if it set it to n.

Regression had been introduced by commit cfa98f ("kconfig: do not
override symbols already set"); what happens is that conf_read_simple()
does sym_calc_value(modules_sym) on exit, which leaves SYMBOL_VALID set and
has conf_set_all_new_symbols() skip modules_sym.

It's pretty easy to fix - simply move that call of sym_calc_value()
into the callers, except for the ones in KCONFIG_ALLCONFIG handling.
Objections?

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Fixes: cfa98f2e0ae9 ("kconfig: do not override symbols already set")
Signed-off-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agokconfig: return 'false' instead of 'no' in bool function
Vegard Nossum [Fri, 1 Jan 2016 16:34:05 +0000 (17:34 +0100)]
kconfig: return 'false' instead of 'no' in bool function

menu_is_visible() is a bool function and should use boolean return
values. "no" is a tristate value which happens to also have a value
of 0, but we should nevertheless use the right symbol for it.

This is a very minor cleanup with no semantic change.

Fixes: 86e187ff9 ("kconfig: add an option to determine a menu's visibility")
Cc: Arnaud Lacombe <lacombar@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agokconfig: allow kconfig to handle longer path names
Markus Mayer [Wed, 9 Dec 2015 22:56:12 +0000 (14:56 -0800)]
kconfig: allow kconfig to handle longer path names

The current (arbitrary) limit of 128 characters for path names has
proven too short for Android builds, as longer path names are used
there.

Change conf.c, so it can handle path lengths up to PATH_MAX characters.

Signed-off-by: Markus Mayer <mmayer@broadcom.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agokconfig: Fix copy&paste error
Michal Sojka [Mon, 19 Oct 2015 14:51:02 +0000 (16:51 +0200)]
kconfig: Fix copy&paste error

Fixes: 31847b67bec0 ("kconfig: allow use of relations other than (in)equality")
Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agokbuild: document recursive dependency limitation / resolution
Luis R. Rodriguez [Wed, 7 Oct 2015 23:16:33 +0000 (16:16 -0700)]
kbuild: document recursive dependency limitation / resolution

Recursive dependency issues with kconfig are unavoidable due to
some limitations with kconfig, since these issues are recurring
provide a hint to the user how they can resolve these dependency
issues and also document why such limitation exists.

While at it also document a bit of future prospects of ways to
enhance Kconfig, including providing formal semantics and evaluation
of use of a SAT solver. If you're interested in this work or prospects
of it check out the kconfig-sat project wiki [0] and mailing list [1].

[0] http://kernelnewbies.org/KernelProjects/kconfig-sat
[1] https://groups.google.com/d/forum/kconfig-sat

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: James Bottomley <jbottomley@odin.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Paul Bolle <pebolle@tiscali.nl>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Mate Soos <soos.mate@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agokconfig: warn of unhandled characters in Kconfig commands
Andreas Ruprecht [Sun, 12 Jul 2015 07:41:50 +0000 (09:41 +0200)]
kconfig: warn of unhandled characters in Kconfig commands

In Kconfig, definitions of options take the following form:
"<COMMAND> <PARAM> <PARAM> ...". COMMANDs and PARAMs are treated
slightly different by the underlying parser.

While commit 2e0d737fc76f ("kconfig: don't silently ignore unhandled
characters") introduced a warning for unsupported characters around
PARAMs, it does not cover situations where a COMMAND has additional
characters before it.

This change makes Kconfig emit a warning if superfluous characters
are found before COMMANDs. As the 'help' statement sometimes is
written as '---help---', the '-' character would now also be regarded
as unhandled and generate a warning. To avoid that, '-' is added to
the list of allowed characters, and the token '---help---' is included
in the zconf.gperf file.

Reported-by: Valentin Rothberg <valentinrothberg@gmail.com>
Signed-off-by: Andreas Ruprecht <andreas.ruprecht@fau.de>
Reviewed-by: Ulf Magnusson <ulfalizer@gmail.com>
Tested-by: Ulf Magnusson <ulfalizer@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agokconfig: Delete unnecessary checks before the function call "sym_calc_value"
Markus Elfring [Tue, 7 Jul 2015 19:48:23 +0000 (21:48 +0200)]
kconfig: Delete unnecessary checks before the function call "sym_calc_value"

The sym_calc_value() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agokconfig: allow use of relations other than (in)equality
Jan Beulich [Mon, 15 Jun 2015 12:00:21 +0000 (13:00 +0100)]
kconfig: allow use of relations other than (in)equality

Over the years I found it desirable to be able to use all sorts of
relations, not just (in)equality. And apparently I'm not the only one,
as there's at least one example in the tree where the programmer
assumed this would work (see DEBUG_UART_8250_WORD in
arch/arm/Kconfig.debug). Another possible use would e.g. be to fold the
two SMP/NR_CPUS prompts into one: SMP could be promptless, simply
depending on NR_CPUS > 1.

A (desirable) side effect of this change - resulting from numeric
values now necessarily being compared as numbers rather than as
strings - is that comparing hex values now works as expected: Other
than int ones (which aren't allowed to have leading zeroes), zeroes
following the 0x prefix made them compare unequal even if their values
were equal.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agokconfig: don't silently ignore unhandled characters
Jan Beulich [Tue, 20 Jan 2015 12:52:48 +0000 (12:52 +0000)]
kconfig: don't silently ignore unhandled characters

At the very least we should tell people that what they wrote is not
what the utility understands.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agoKconfig: Remove bad inference rules expr_eliminate_dups2()
Martin Walch [Fri, 22 May 2015 11:41:52 +0000 (13:41 +0200)]
Kconfig: Remove bad inference rules expr_eliminate_dups2()

expr_eliminate_dups2() in config/expr.c applies two invalid
inference rules:

(FOO || BAR) && (!FOO && !BAR) -> n
(FOO && BAR) || (!FOO || !BAR) -> y

They would be correct in propositional logic, but this is a three-valued
logic, and here it is wrong in that it changes semantics. It becomes
immediately visible when assigning the value 1 to both, FOO and BAR:

(FOO || BAR) && (!FOO && !BAR)
-> min(max(1, 1), min(2-1, 2-1)) = min(1, 1) = 1

while n evaluates to 0 and

(FOO && BAR) || (!FOO || !BAR)
-> max(min(1, 1), max(2-1, 2-1)) = max(1, 1) = 1

with y evaluating to 2.

Fix it by removing expr_eliminate_dups2() and the functions that have no
use anywhere else: expr_extract_eq_and(), expr_extract_eq_or(),
and expr_extract_eq() from config/expr.c

Currently the bug is not triggered in mainline, so this patch does not
modify the configuration space there. To observe the bug consider this
example:

config MODULES
        def_bool y
        option modules

config FOO
        def_tristate m

config BAR
        def_tristate m

config TEST1
        def_tristate y
        depends on (FOO || BAR) && (!FOO && !BAR)

if TEST1 = n
comment "TEST1 broken"
endif

config TEST2
        def_tristate y
        depends on (FOO && BAR) || (!FOO || !BAR)

if TEST2 = y
comment "TEST2 broken"
endif

config TEST3
        def_tristate y
        depends on m && !m

if TEST3 = n
comment "TEST3 broken"
endif

TEST1, TEST2 and TEST3 should all evaluate to m, but without the patch,
none of them does. It is probably not obvious that TEST3 is the same bug,
but it becomes clear when considering what happens internally to the
expression
m && !m":
First it expands to
(m && MODULES) && !(m && MODULES),
then it is transformed into
(m && MODULES) && (!m || !MODULES),
and finally due to the bug it is replaced with n.

As a side effect, this patch reduces code size in expr.c by roughly 10%
and slightly improves startup time for all configuration frontends.

Signed-off-by: Martin Walch <walch.martin@web.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agounbreak allmodconfig KCONFIG_ALLCONFIG=...
Al Viro [Thu, 14 Jan 2016 18:13:49 +0000 (18:13 +0000)]
unbreak allmodconfig KCONFIG_ALLCONFIG=...

Prior to 3.13 make allmodconfig KCONFIG_ALLCONFIG=/dev/null used
to be equivalent to make allmodconfig; these days it hardwires MODULES to n.
In fact, any KCONFIG_ALLCONFIG that doesn't set MODULES explicitly is
treated as if it set it to n.

Regression had been introduced by commit cfa98f ("kconfig: do not
override symbols already set"); what happens is that conf_read_simple()
does sym_calc_value(modules_sym) on exit, which leaves SYMBOL_VALID set and
has conf_set_all_new_symbols() skip modules_sym.

It's pretty easy to fix - simply move that call of sym_calc_value()
into the callers, except for the ones in KCONFIG_ALLCONFIG handling.
Objections?

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Fixes: cfa98f2e0ae9 ("kconfig: do not override symbols already set")
Signed-off-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agokconfig: return 'false' instead of 'no' in bool function
Vegard Nossum [Fri, 1 Jan 2016 16:34:05 +0000 (17:34 +0100)]
kconfig: return 'false' instead of 'no' in bool function

menu_is_visible() is a bool function and should use boolean return
values. "no" is a tristate value which happens to also have a value
of 0, but we should nevertheless use the right symbol for it.

This is a very minor cleanup with no semantic change.

Fixes: 86e187ff9 ("kconfig: add an option to determine a menu's visibility")
Cc: Arnaud Lacombe <lacombar@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agokconfig: allow kconfig to handle longer path names
Markus Mayer [Wed, 9 Dec 2015 22:56:12 +0000 (14:56 -0800)]
kconfig: allow kconfig to handle longer path names

The current (arbitrary) limit of 128 characters for path names has
proven too short for Android builds, as longer path names are used
there.

Change conf.c, so it can handle path lengths up to PATH_MAX characters.

Signed-off-by: Markus Mayer <mmayer@broadcom.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agokconfig: Fix copy&paste error
Michal Sojka [Mon, 19 Oct 2015 14:51:02 +0000 (16:51 +0200)]
kconfig: Fix copy&paste error

Fixes: 31847b67bec0 ("kconfig: allow use of relations other than (in)equality")
Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agokbuild: document recursive dependency limitation / resolution
Luis R. Rodriguez [Wed, 7 Oct 2015 23:16:33 +0000 (16:16 -0700)]
kbuild: document recursive dependency limitation / resolution

Recursive dependency issues with kconfig are unavoidable due to
some limitations with kconfig, since these issues are recurring
provide a hint to the user how they can resolve these dependency
issues and also document why such limitation exists.

While at it also document a bit of future prospects of ways to
enhance Kconfig, including providing formal semantics and evaluation
of use of a SAT solver. If you're interested in this work or prospects
of it check out the kconfig-sat project wiki [0] and mailing list [1].

[0] http://kernelnewbies.org/KernelProjects/kconfig-sat
[1] https://groups.google.com/d/forum/kconfig-sat

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: James Bottomley <jbottomley@odin.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Paul Bolle <pebolle@tiscali.nl>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Mate Soos <soos.mate@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agokconfig: warn of unhandled characters in Kconfig commands
Andreas Ruprecht [Sun, 12 Jul 2015 07:41:50 +0000 (09:41 +0200)]
kconfig: warn of unhandled characters in Kconfig commands

In Kconfig, definitions of options take the following form:
"<COMMAND> <PARAM> <PARAM> ...". COMMANDs and PARAMs are treated
slightly different by the underlying parser.

While commit 2e0d737fc76f ("kconfig: don't silently ignore unhandled
characters") introduced a warning for unsupported characters around
PARAMs, it does not cover situations where a COMMAND has additional
characters before it.

This change makes Kconfig emit a warning if superfluous characters
are found before COMMANDs. As the 'help' statement sometimes is
written as '---help---', the '-' character would now also be regarded
as unhandled and generate a warning. To avoid that, '-' is added to
the list of allowed characters, and the token '---help---' is included
in the zconf.gperf file.

Reported-by: Valentin Rothberg <valentinrothberg@gmail.com>
Signed-off-by: Andreas Ruprecht <andreas.ruprecht@fau.de>
Reviewed-by: Ulf Magnusson <ulfalizer@gmail.com>
Tested-by: Ulf Magnusson <ulfalizer@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agokconfig: Delete unnecessary checks before the function call "sym_calc_value"
Markus Elfring [Tue, 7 Jul 2015 19:48:23 +0000 (21:48 +0200)]
kconfig: Delete unnecessary checks before the function call "sym_calc_value"

The sym_calc_value() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agokconfig: allow use of relations other than (in)equality
Jan Beulich [Mon, 15 Jun 2015 12:00:21 +0000 (13:00 +0100)]
kconfig: allow use of relations other than (in)equality

Over the years I found it desirable to be able to use all sorts of
relations, not just (in)equality. And apparently I'm not the only one,
as there's at least one example in the tree where the programmer
assumed this would work (see DEBUG_UART_8250_WORD in
arch/arm/Kconfig.debug). Another possible use would e.g. be to fold the
two SMP/NR_CPUS prompts into one: SMP could be promptless, simply
depending on NR_CPUS > 1.

A (desirable) side effect of this change - resulting from numeric
values now necessarily being compared as numbers rather than as
strings - is that comparing hex values now works as expected: Other
than int ones (which aren't allowed to have leading zeroes), zeroes
following the 0x prefix made them compare unequal even if their values
were equal.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agokconfig: don't silently ignore unhandled characters
Jan Beulich [Tue, 20 Jan 2015 12:52:48 +0000 (12:52 +0000)]
kconfig: don't silently ignore unhandled characters

At the very least we should tell people that what they wrote is not
what the utility understands.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agoKconfig: Remove bad inference rules expr_eliminate_dups2()
Martin Walch [Fri, 22 May 2015 11:41:52 +0000 (13:41 +0200)]
Kconfig: Remove bad inference rules expr_eliminate_dups2()

expr_eliminate_dups2() in config/expr.c applies two invalid
inference rules:

(FOO || BAR) && (!FOO && !BAR) -> n
(FOO && BAR) || (!FOO || !BAR) -> y

They would be correct in propositional logic, but this is a three-valued
logic, and here it is wrong in that it changes semantics. It becomes
immediately visible when assigning the value 1 to both, FOO and BAR:

(FOO || BAR) && (!FOO && !BAR)
-> min(max(1, 1), min(2-1, 2-1)) = min(1, 1) = 1

while n evaluates to 0 and

(FOO && BAR) || (!FOO || !BAR)
-> max(min(1, 1), max(2-1, 2-1)) = max(1, 1) = 1

with y evaluating to 2.

Fix it by removing expr_eliminate_dups2() and the functions that have no
use anywhere else: expr_extract_eq_and(), expr_extract_eq_or(),
and expr_extract_eq() from config/expr.c

Currently the bug is not triggered in mainline, so this patch does not
modify the configuration space there. To observe the bug consider this
example:

config MODULES
        def_bool y
        option modules

config FOO
        def_tristate m

config BAR
        def_tristate m

config TEST1
        def_tristate y
        depends on (FOO || BAR) && (!FOO && !BAR)

if TEST1 = n
comment "TEST1 broken"
endif

config TEST2
        def_tristate y
        depends on (FOO && BAR) || (!FOO || !BAR)

if TEST2 = y
comment "TEST2 broken"
endif

config TEST3
        def_tristate y
        depends on m && !m

if TEST3 = n
comment "TEST3 broken"
endif

TEST1, TEST2 and TEST3 should all evaluate to m, but without the patch,
none of them does. It is probably not obvious that TEST3 is the same bug,
but it becomes clear when considering what happens internally to the
expression
m && !m":
First it expands to
(m && MODULES) && !(m && MODULES),
then it is transformed into
(m && MODULES) && (!m || !MODULES),
and finally due to the bug it is replaced with n.

As a side effect, this patch reduces code size in expr.c by roughly 10%
and slightly improves startup time for all configuration frontends.

Signed-off-by: Martin Walch <walch.martin@web.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agoMerge branch 'master' into radar
Christian Lamparter [Wed, 27 Apr 2016 13:43:32 +0000 (15:43 +0200)]
Merge branch 'master' into radar

8 years agomac80211: add A-MSDU tx support
Felix Fietkau [Thu, 3 Mar 2016 21:59:00 +0000 (22:59 +0100)]
mac80211: add A-MSDU tx support

Requires software tx queueing and fast-xmit support. For good
performance, drivers need frag_list support as well. This avoids the
need for copying data of aggregated frames. Running without it is only
supported for debugging purposes.

To avoid performance and packet size issues, the rate control module or
driver needs to limit the maximum A-MSDU size by setting
max_rc_amsdu_len in struct ieee80211_sta.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
[fix locking issue]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agomac80211: add fast-rx path
Johannes Berg [Thu, 31 Mar 2016 17:02:10 +0000 (20:02 +0300)]
mac80211: add fast-rx path

The regular RX path has a lot of code, but with a few
assumptions on the hardware it's possible to reduce the
amount of code significantly. Currently the assumptions
on the driver are the following:
 * hardware/driver reordering buffer (if supporting aggregation)
 * hardware/driver decryption & PN checking (if using encryption)
 * hardware/driver did de-duplication
 * hardware/driver did A-MSDU deaggregation
 * AP_LINK_PS is used (in AP mode)
 * no client powersave handling in mac80211 (in client mode)

of which some are actually checked per packet:
 * de-duplication
 * PN checking
 * decryption
and additionally packets must
 * not be A-MSDU (have been deaggregated by driver/device)
 * be data packets
 * not be fragmented
 * be unicast
 * have RFC 1042 header

Additionally dynamically we assume:
 * no encryption or CCMP/GCMP, TKIP/WEP/other not allowed
 * station must be authorized
 * 4-addr format not enabled

Some data needed for the RX path is cached in a new per-station
"fast_rx" structure, so that we only need to look at this and
the packet, no other memory when processing packets on the fast
RX path.

After doing the above per-packet checks, the data path collapses
down to a pretty simple conversion function taking advantage of
the data cached in the small fast_rx struct.

This should speed up the RX processing, and will make it easier
to reason about parallelizing RX (for which statistics will need
to be per-CPU still.)

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agoieee80211: support parsing Fine Timing Measurement action frame
Avraham Stern [Thu, 17 Mar 2016 13:02:53 +0000 (15:02 +0200)]
ieee80211: support parsing Fine Timing Measurement action frame

Add definition for Fine Timing Measurement (FTM) frame format
as defined in IEEE802.11-REVmcD5.0 section 9.6.8.33

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agomac80211: limit the A-MSDU Tx based on peer's capabilities
Emmanuel Grumbach [Sun, 13 Dec 2015 13:41:05 +0000 (15:41 +0200)]
mac80211: limit the A-MSDU Tx based on peer's capabilities

In VHT, the specification allows to limit the number of
MSDUs in an A-MSDU in the Extended Capabilities IE. There
is also a limitation on the byte size in the VHT IE.
In HT, the only limitation is on the byte size.
Parse the capabilities from the peer and make them
available to the driver.

In HT, there is another limitation when a BA agreement
is active: the byte size can't be greater than 4095.
This is not enforced here.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agomac80211: process and save VHT MU-MIMO group frame
Sara Sharon [Tue, 8 Dec 2015 14:04:31 +0000 (16:04 +0200)]
mac80211: process and save VHT MU-MIMO group frame

The Group ID Management frame is an Action frame of
category VHT. It is transmitted by the AP to assign
or change the user position of a STA for one or more
group IDs.
Process and save the group membership data. Notify
underlying driver of changes.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agowireless: add WNM action frame categories
Johannes Berg [Wed, 7 Oct 2015 13:48:26 +0000 (15:48 +0200)]
wireless: add WNM action frame categories

Add the WNM and unprotected WNM categories and mark the latter
as not robust.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agowireless: update robust action frame list
Johannes Berg [Wed, 7 Oct 2015 13:48:25 +0000 (15:48 +0200)]
wireless: update robust action frame list

Unprotected DMG and VHT action frames are not protected, reflect
that in the list.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agonet/ieee80211: ieee80211_is_* can be boolean
Yaowei Bai [Thu, 8 Oct 2015 13:28:55 +0000 (21:28 +0800)]
net/ieee80211: ieee80211_is_* can be boolean

This patch makes ieee80211_is_* return bool to improve
readability due to these particular functions only using either
one or zero as their return value.

No functional change.

Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agowireless: mark element IDs 8 and 9 reserved
Johannes Berg [Fri, 28 Aug 2015 12:31:48 +0000 (14:31 +0200)]
wireless: mark element IDs 8 and 9 reserved

These were never used in the tree, and are marked as reserved
in the IEEE 802.11 documentation (ANA).

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agomac80211: allow to transmit A-MSDU within A-MPDU
Emmanuel Grumbach [Sun, 16 Aug 2015 08:13:22 +0000 (11:13 +0300)]
mac80211: allow to transmit A-MSDU within A-MPDU

Advertise the capability to send A-MSDU within A-MPDU
in the AddBA request sent by mac80211. Let the driver
know about the peer's capabilities.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agomac80211: fix BIT position for TDLS WIDE extended cap
Emmanuel Grumbach [Sun, 19 Jul 2015 13:09:12 +0000 (16:09 +0300)]
mac80211: fix BIT position for TDLS WIDE extended cap

The bit was not according to ieee80211 specification.
Fix that.

Reviewed-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agocarl9170 toolchain: update to gcc 6.1.0, newlib 2.4.0 and binutils 2.26
Christian Lamparter [Wed, 27 Apr 2016 13:25:30 +0000 (15:25 +0200)]
carl9170 toolchain: update to gcc 6.1.0, newlib 2.4.0 and binutils 2.26

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agocarl9170 toolchain: update to gcc 6.1.0, newlib 2.4.0 and binutils 2.26
Christian Lamparter [Wed, 27 Apr 2016 13:25:30 +0000 (15:25 +0200)]
carl9170 toolchain: update to gcc 6.1.0, newlib 2.4.0 and binutils 2.26

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agoMerge branch 'master' into radar
Christian Lamparter [Mon, 15 Feb 2016 17:28:51 +0000 (18:28 +0100)]
Merge branch 'master' into radar

8 years agocarl9170 firmware: fix off-by-one error when CARL9170FW_USB_MODESWITCH is set
Christian Lamparter [Mon, 15 Feb 2016 16:32:14 +0000 (17:32 +0100)]
carl9170 firmware: fix off-by-one error when CARL9170FW_USB_MODESWITCH is set

usb/usb.c: In function ‘usb_set_configuration’:
usb/usb.c:544:1: error: control reaches end of non-void function [-Werror=return-type]

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agocarl9170 firmware: reserve feature flag for PATTERN_GENERATOR
Christian Lamparter [Mon, 15 Feb 2016 00:15:02 +0000 (01:15 +0100)]
carl9170 firmware: reserve feature flag for PATTERN_GENERATOR

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agocarl9170 firmware: add get_random_u16 helper
Christian Lamparter [Sun, 14 Feb 2016 23:33:56 +0000 (00:33 +0100)]
carl9170 firmware: add get_random_u16 helper

The HW has a built-in random number generator. This
patch adds a convenient helper to get random 16-bit
values in the firmware.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agoMerge branch 'master' into radar
Christian Lamparter [Sun, 14 Feb 2016 03:04:03 +0000 (04:04 +0100)]
Merge branch 'master' into radar

8 years agocarl9170 toolchain: update to gcc-5.3.0
Christian Lamparter [Fri, 4 Dec 2015 23:02:24 +0000 (00:02 +0100)]
carl9170 toolchain: update to gcc-5.3.0

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agoMerge branch 'master' into radar
Christian Lamparter [Tue, 25 Aug 2015 21:21:21 +0000 (23:21 +0200)]
Merge branch 'master' into radar

8 years agocarl9170 toolchain: update to gcc-5.2.0
Christian Lamparter [Fri, 21 Aug 2015 11:54:27 +0000 (13:54 +0200)]
carl9170 toolchain: update to gcc-5.2.0

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agocarl9170 firmware tools: fix compile errors in wol.c
Christian Lamparter [Fri, 21 Aug 2015 11:44:36 +0000 (13:44 +0200)]
carl9170 firmware tools: fix compile errors in wol.c

wol.c: In function ‘monitor_init’:
wol.c:40:19: warning: implicit declaration of function ‘if_nametoindex’
  ll.sll_ifindex = if_nametoindex(ifname);
                   ^
wol.c:46:45: warning: implicit declaration of function ‘htons’
  monitor_sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
                                             ^

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agocarl9170 firmware: fix CMake developer Warning about CMP0050
Christian Lamparter [Wed, 20 May 2015 12:22:58 +0000 (14:22 +0200)]
carl9170 firmware: fix CMake developer Warning about CMP0050

This patch fixes the numerous warnings about the unsupported use
of the SOURCE signature for the add_custom_command:

"CMake Warning (dev) at carlfw/CMakeLists.txt (add_custom_command):
  Policy CMP0050 is not set: Disallow add_custom_command SOURCE signatures.
  Run "cmake --help-policy CMP0050" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The SOURCE signatures of add_custom_command are no longer supported.
This warning is for project developers.  Use -Wno-dev to suppress it."

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agokconfig: Do not print status messages in make -s mode
Michal Marek [Wed, 8 Apr 2015 11:30:42 +0000 (13:30 +0200)]
kconfig: Do not print status messages in make -s mode

Add an -s option to the various frontends and pass it when make -s is
used. Also, use $(kecho) instead of @echo in the Makefile.

Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agokconfig: Remove unnecessary prototypes from headers
Michal Marek [Tue, 24 Feb 2015 15:37:13 +0000 (16:37 +0100)]
kconfig: Remove unnecessary prototypes from headers

Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agokconfig: Remove dead code
Michal Marek [Tue, 24 Feb 2015 15:32:09 +0000 (16:32 +0100)]
kconfig: Remove dead code

Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agokconfig: Get rid of the P() macro in headers
Michal Marek [Tue, 27 Jan 2015 16:11:42 +0000 (17:11 +0100)]
kconfig: Get rid of the P() macro in headers

This was originally meant for dlopen()ing a potential kconfig shared
library. The unused dlopen code has already been removed in commit
5a6f8d2b (kconfig: nuke LKC_DIRECT_LINK cruft), so let's remove the
rest. The lkc_proto.h change was made with the following sed script:

  sed -r 's/^P\(([^,]*), *([^,]*), *(.*)\);/\2 \1\3;/'

Plus some manual adjustments.

Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agokconfig: use va_end to match corresponding va_start
Colin Ian King [Mon, 12 Jan 2015 13:18:26 +0000 (13:18 +0000)]
kconfig: use va_end to match corresponding va_start

Although on some systems va_end is a no-op, it is good practice
to use va_end, especially since the manual states:

"Each invocation of va_start() must be matched by a corresponding
invocation of va_end() in the same function."

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agomac80111: Add BIP-CMAC-256 cipher
Jouni Malinen [Sat, 24 Jan 2015 17:52:08 +0000 (19:52 +0200)]
mac80111: Add BIP-CMAC-256 cipher

This allows mac80211 to configure BIP-CMAC-256 to the driver and also
use software-implementation within mac80211 when the driver does not
support this with hardware accelaration.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agocfg80211: Add new GCMP, CCMP-256, BIP-GMAC, BIP-CMAC-256 ciphers
Jouni Malinen [Sat, 24 Jan 2015 17:52:05 +0000 (19:52 +0200)]
cfg80211: Add new GCMP, CCMP-256, BIP-GMAC, BIP-CMAC-256 ciphers

This makes cfg80211 aware of the GCMP, GCMP-256, CCMP-256, BIP-GMAC-128,
BIP-GMAC-256, and BIP-CMAC-256 cipher suites. These new cipher suites
were defined in IEEE Std 802.11ac-2013.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
8 years agocarl9170 toolchain: update to gcc-5.1.0
Christian Lamparter [Tue, 19 May 2015 13:07:23 +0000 (15:07 +0200)]
carl9170 toolchain: update to gcc-5.1.0

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
9 years agocarl9170 firmware: support write one byte at a time command
Christian Lamparter [Wed, 21 Jan 2015 15:56:40 +0000 (16:56 +0100)]
carl9170 firmware: support write one byte at a time command

This command is necessary to write into the serial eeprom.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
9 years agocarl9170: add register definitions for EEPROM and SPI controller
Christian Lamparter [Wed, 21 Jan 2015 15:39:26 +0000 (16:39 +0100)]
carl9170: add register definitions for EEPROM and SPI controller

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
9 years agocarl9170: fix spelling in config file
Christian Lamparter [Sat, 10 Jan 2015 18:46:07 +0000 (19:46 +0100)]
carl9170: fix spelling in config file

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
9 years agocarl9170 toolchain: add SHA256 for binutils-2.25
Christian Lamparter [Sat, 10 Jan 2015 17:20:41 +0000 (18:20 +0100)]
carl9170 toolchain: add SHA256 for binutils-2.25

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
9 years agokconfig: Fix warning "‘jump’ may be used uninitialized"
Peter Kümmel [Tue, 4 Nov 2014 11:01:59 +0000 (12:01 +0100)]
kconfig: Fix warning "‘jump’ may be used uninitialized"

Warning:
In file included from scripts/kconfig/zconf.tab.c:2537:0:
scripts/kconfig/menu.c: In function ‘get_symbol_str’:
scripts/kconfig/menu.c:590:18: warning: ‘jump’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     jump->offset = strlen(r->s);

Simplifies the test logic because (head && local) means (jump != 0)
and makes GCC happy when checking if the jump pointer was initialized.

Signed-off-by: Peter Kümmel <syntheticpp@gmx.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
9 years agoReplace mentions of "list_struct" to "list_head"
Andrey Utkin [Fri, 14 Nov 2014 01:09:55 +0000 (05:09 +0400)]
Replace mentions of "list_struct" to "list_head"

There's no such thing as "list_struct".

Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
9 years agokbuild: trivial - use tabs for code indent where possible
Masahiro Yamada [Tue, 10 Jun 2014 10:08:13 +0000 (19:08 +0900)]
kbuild: trivial - use tabs for code indent where possible

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
9 years agokbuild: trivial - remove trailing empty lines
Masahiro Yamada [Thu, 29 May 2014 05:12:29 +0000 (14:12 +0900)]
kbuild: trivial - remove trailing empty lines

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
9 years agokconfig: make allnoconfig disable options behind EMBEDDED and EXPERT
Josh Triplett [Mon, 7 Apr 2014 22:39:09 +0000 (15:39 -0700)]
kconfig: make allnoconfig disable options behind EMBEDDED and EXPERT

"make allnoconfig" exists to ease testing of minimal configurations.
Documentation/SubmitChecklist includes a note to test with allnoconfig.
This helps catch missing dependencies on common-but-not-required
functionality, which might otherwise go unnoticed.

However, allnoconfig still leaves many symbols enabled, because they're
hidden behind CONFIG_EMBEDDED or CONFIG_EXPERT.  For instance, allnoconfig
still has CONFIG_PRINTK and CONFIG_BLOCK enabled, so drivers don't
typically get build-tested with those disabled.

To address this, introduce a new Kconfig option "allnoconfig_y", used on
symbols which only exist to hide other symbols.  Set it on CONFIG_EMBEDDED
(which then selects CONFIG_EXPERT).  allnoconfig will then disable all the
symbols hidden behind those.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Tested-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
9 years agocarl9170 tools: add attribute macros to host library file
Christian Lamparter [Thu, 1 Jan 2015 16:34:17 +0000 (17:34 +0100)]
carl9170 tools: add attribute macros to host library file

The macros [__packed, __aligned(x), ...] are already defined
as part of newlib's sys/cdefs.h. However they are not part of
standard libc which is used to compile the host tools.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
9 years agomac80211: add parsing of TDLS specific IEs
Arik Nemtsov [Sun, 9 Nov 2014 16:50:18 +0000 (18:50 +0200)]
mac80211: add parsing of TDLS specific IEs

These are used in TDLS channel switching code.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
9 years agocfg/mac80211: define TDLS channel switch feature bit
Arik Nemtsov [Sun, 9 Nov 2014 16:50:14 +0000 (18:50 +0200)]
cfg/mac80211: define TDLS channel switch feature bit

Define some related TDLS protocol constants and advertise channel switch
support in the extended-capabilities IE when the feature bit is defined.

Actually supporting TDLS channel-switching also requires support for
some new nl80211 commands, to be introduced by future patches.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
9 years agomac80211: add BSS coex IE to TDLS setup frames
Arik Nemtsov [Sun, 9 Nov 2014 16:50:13 +0000 (18:50 +0200)]
mac80211: add BSS coex IE to TDLS setup frames

Add the BSS coex IE in case we support HT40 channels, as mandated by
section 8.5.13 in IEEE802.11 2012.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
9 years agoieee80211: add "max length of AMPDU" enum for VHT
Eran Harary [Mon, 3 Nov 2014 18:06:47 +0000 (20:06 +0200)]
ieee80211: add "max length of AMPDU" enum for VHT

Maximum length of AMPDU that an STA can receive in VHT.
length = 2 ^ (13 + max_ampdu_length_exp) - 1.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
9 years agomac80211: add extended channel switching capability if the driver supports CSA
Luciano Coelho [Wed, 8 Oct 2014 06:48:36 +0000 (09:48 +0300)]
mac80211: add extended channel switching capability if the driver supports CSA

The Extended Channel Switching capability bit in the extended
capabilities element must be set if the driver supports CSA on
non-beaconing interfaces.

Since this capability needs to be set during driver registration, the
extended_capabiliities global variable needs to be moved to the local
structure so that it can be modified.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
9 years agocfg80211: add WMM traffic stream API
Johannes Berg [Tue, 9 Sep 2014 19:55:35 +0000 (22:55 +0300)]
cfg80211: add WMM traffic stream API

Add nl80211 and driver API to validate, add and delete traffic
streams with appropriate settings.

The API calls for userspace doing the action frame handshake
with the peer, and then allows only to set up the parameters
in the driver. To avoid setting up a session only to tear it
down again, the validate API is provided, but the real usage
later can still fail so userspace must be prepared for that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
9 years agomac80211: support DTPC IE (from Cisco Client eXtensions)
Steinar H. Gunderson [Wed, 3 Sep 2014 13:48:37 +0000 (06:48 -0700)]
mac80211: support DTPC IE (from Cisco Client eXtensions)

Linux already supports 802.11h, where the access point can tell the
client to reduce its transmission power. However, 802.11h is only
defined for 5 GHz, where the need for this is much smaller than on
2.4 GHz.

Cisco has their own solution, called DTPC (Dynamic Transmit Power
Control). Cisco APs on a controller sometimes but not always send
802.11h; they always send DTPC, even on 2.4 GHz. This patch adds support
for parsing and honoring the DTPC IE in addition to the 802.11h
element (they do not always contain the same limits, so both must
be honored); the format is not documented, but very simple.

Tested (on top of wireless.git and on 3.16.1) against a Cisco Aironet
1142 joined to a Cisco 2504 WLC, by setting various transmit power
levels for the given access points and observing the results.
The Wireshark 802.11 dissector agrees with the interpretation of the
element, except for negative numbers, which seem to never happen
anyway.

Signed-off-by: Steinar H. Gunderson <sgunderson@bigfoot.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
9 years agocfg80211: add Intel Mobile Communications copyright
Johannes Berg [Wed, 3 Sep 2014 12:24:58 +0000 (15:24 +0300)]
cfg80211: add Intel Mobile Communications copyright

Our legal structure changed at some point (see wikipedia), but
we forgot to immediately switch over to the new copyright
notice.

For files that we have modified in the time since the change,
add the proper copyright notice now.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
9 years agoieee80211: Support parsing TPC report element in action frames
Andrei Otcheretianski [Wed, 30 Jul 2014 11:36:18 +0000 (14:36 +0300)]
ieee80211: Support parsing TPC report element in action frames

TPC report element is contained in spectrum management's tpc report
action frames and in radio measurement's link measurement report
action frames. Add a function which checks whether an action frame
contains this element. This may be needed by the drivers in order
to set the correct tx power value in these frames.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
9 years agomac80211: add TDLS QoS param IE on setup-confirm
Arik Nemtsov [Thu, 17 Jul 2014 14:14:24 +0000 (17:14 +0300)]
mac80211: add TDLS QoS param IE on setup-confirm

When TDLS QoS is supported by the the peer and the local card, add
the WMM parameter IE to the setup-confirm frame. Take the QoS settings
from the current AP, or if unsupported, use the default values from
the specification. This behavior is mandated by IEEE802.11-2012 section
10.22.4.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Liad Kaufman <liad.kaufman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
9 years agomac80211: add API to request TDLS operation from userspace
Arik Nemtsov [Wed, 11 Jun 2014 14:18:25 +0000 (17:18 +0300)]
mac80211: add API to request TDLS operation from userspace

Write a mac80211 to the cfg80211 API for requesting a userspace TDLS
operation. Define TDLS specific reason codes that can be used here.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
9 years agowireless: add missing WLAN_EID_BSS_INTOLERANT_CHL_REPORT
Jes Sorensen [Mon, 26 May 2014 16:06:34 +0000 (18:06 +0200)]
wireless: add missing WLAN_EID_BSS_INTOLERANT_CHL_REPORT

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
9 years agocarl9170: update COPYRIGHT boilerplate text
Christian Lamparter [Thu, 1 Jan 2015 13:42:58 +0000 (14:42 +0100)]
carl9170: update COPYRIGHT boilerplate text

The boilderplate text had an obsolete address in it.
Link to the GNU Project's licence website instead.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
9 years agocarl9170 toolchain: update to gcc 4.9.2, newlib 2.2.0 and binutils 2.25
Christian Lamparter [Thu, 1 Jan 2015 13:18:02 +0000 (14:18 +0100)]
carl9170 toolchain: update to gcc 4.9.2, newlib 2.2.0 and binutils 2.25

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
9 years agocarl9170 toolchain: update to gcc-4.9.1
Christian Lamparter [Wed, 17 Sep 2014 17:57:56 +0000 (19:57 +0200)]
carl9170 toolchain: update to gcc-4.9.1

For users with issues due to a gcc-4.9 host compiler:
<https://bugzilla.redhat.com/show_bug.cgi?id=1087374>

Note: The README.md has been updated as well. For
requests about the firmware (or driver) please
include "carl9170" in the subject line.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
9 years agocarl9170 firmware: investigate 80/88MHz clock freezes
Christian Lamparter [Tue, 16 Sep 2014 17:38:32 +0000 (19:38 +0200)]
carl9170 firmware: investigate 80/88MHz clock freezes

The SoC can run up to 80/88MHz in HT40 mode. This improves
throughput and timing accuracy over the 40/44MHz clock.
However some devices seem to become unstable under load.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
9 years agocarl9170 firmware: update README.md
Christian Lamparter [Thu, 7 Aug 2014 18:00:14 +0000 (20:00 +0200)]
carl9170 firmware: update README.md

New version of the README in markdown. Includes additional
information about contact and firmware configuration.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
9 years agocarl9170 firmware: command endpoint is bulk in full-speed mode
Christian Lamparter [Thu, 7 Aug 2014 09:56:25 +0000 (11:56 +0200)]
carl9170 firmware: command endpoint is bulk in full-speed mode

Roland Wahl discovered that endpoint 4 needs to be an bulk
endpoint in the full-speed configuration.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
10 years agowireless: max MSDU size for DMG networks
Vladimir Kondratiev [Wed, 19 Mar 2014 11:14:40 +0000 (13:14 +0200)]
wireless: max MSDU size for DMG networks

In the 802.11ad, aka DMG (Dynamic Multi-Gigabit), aka 60Ghz
spec, maximum MSDU size extended to 7920 bytes.
add #define for this.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
10 years agoieee80211: remove function ieee80211_{dsss_chan_to_freq, freq_to_dsss_chan}
Zhao, Gang [Tue, 18 Feb 2014 13:36:03 +0000 (21:36 +0800)]
ieee80211: remove function ieee80211_{dsss_chan_to_freq, freq_to_dsss_chan}

Function ieee80211_{dsss_chan_to_freq, freq_to_dsss_chan} have been
replaced with ieee80211_{channel_to_frequency, frequency_to_channel}.

There should be no users of the two functions now. So remove them.

Cc: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Zhao, Gang <gamerh2o@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
10 years agowireless: sort and extend element ID list
Johannes Berg [Tue, 4 Feb 2014 08:41:04 +0000 (09:41 +0100)]
wireless: sort and extend element ID list

The element ID list is currently almost sorted by amendment
or similar topic, but the order is difficult to maintain and
not very transparent. Sort the list by ID instead, and add
a lot of missing IDs.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
10 years agomac80211: fix bufferable MMPDU RX handling
Johannes Berg [Fri, 24 Jan 2014 13:41:44 +0000 (14:41 +0100)]
mac80211: fix bufferable MMPDU RX handling

Action, disassoc and deauth frames are bufferable, and as such don't
have the PM bit in the frame control field reserved which means we
need to react to the bit when receiving in such a frame.

Fix this by introducing a new helper ieee80211_is_bufferable_mmpdu()
and using it for the RX path that currently ignores the PM bit in
any non-data frames for doze->wake transitions, but listens to it in
all frames for wake->doze transitions, both of which are wrong.

Also use the new helper in the TX path to clean up the code.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
10 years agoieee80211: add definition for SMS4 key len
Avinash Patil [Fri, 10 Jan 2014 19:08:55 +0000 (11:08 -0800)]
ieee80211: add definition for SMS4 key len

Add SMS4 key length definition to ieee80211_key_len enum.
It's used by WAPI.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
10 years agoieee80211: add definition for TDLS wide band extended capability
Avinash Patil [Thu, 9 Jan 2014 23:22:57 +0000 (15:22 -0800)]
ieee80211: add definition for TDLS wide band extended capability

Seventh bit of 8th byte of extended capabilities specifies wide
bandwidth support for TDLS links. Add this definition to ieee80211.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
10 years agocarl9170 toolchain: update to gcc 4.9.0 and newlib 2.1.0
Christian Lamparter [Thu, 1 May 2014 19:39:49 +0000 (21:39 +0200)]
carl9170 toolchain: update to gcc 4.9.0 and newlib 2.1.0

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
10 years agocarl9170 firmware: replace already defined __section with __in_section
Christian Lamparter [Thu, 1 May 2014 19:38:35 +0000 (21:38 +0200)]
carl9170 firmware: replace already defined __section with __in_section

newlib already provides __section... and unfortunately it differs
from our own. This commit introduces a new define __in_section for
now.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
10 years agomac80211: enable easier manipulation of VHT beamforming caps
Eyal Shapira [Mon, 11 Nov 2013 18:14:00 +0000 (20:14 +0200)]
mac80211: enable easier manipulation of VHT beamforming caps

Introduce shift and mask defines for beamformee STS cap and number
of sounding dimensions cap as these can take any 3 bit value.
While at it also cleanup an unrequired parenthesis.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
10 years agoMerge branch 'master' of git://github.com/chunkeey/carl9170fw
Christian Lamparter [Sun, 22 Dec 2013 04:14:09 +0000 (05:14 +0100)]
Merge branch 'master' of git://github.com/chunkeey/carl9170fw

10 years agocarl9170 toolchain: update to binutils-2.24
Christian Lamparter [Mon, 2 Dec 2013 19:39:35 +0000 (20:39 +0100)]
carl9170 toolchain: update to binutils-2.24

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
10 years agocarl9170: rename radar pattern generator into pattern generator
Christian Lamparter [Sat, 23 Nov 2013 13:52:14 +0000 (14:52 +0100)]
carl9170: rename radar pattern generator into pattern generator

Radar has become sort of a "buzzword" for DFS. This patch
will hopefully help to avoid any confusion about the topic.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
10 years agocarl9170 firmware tools: fix off-by-one segmentation fault in fwprepare
Christian Lamparter [Sat, 23 Nov 2013 13:22:55 +0000 (14:22 +0100)]
carl9170 firmware tools: fix off-by-one segmentation fault in fwprepare

This patch fixes a segmentation fault which would occur if the
firmware had the PATTERN_GENERATOR feature bit set, but didn't
have the pattern descriptor.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
10 years agocarl9170 firmware: reorganize pattern generator
Christian Lamparter [Sat, 23 Nov 2013 13:21:48 +0000 (14:21 +0100)]
carl9170 firmware: reorganize pattern generator

Prepare this feature so it can be merged into the main branch.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
10 years agoMerge branch 'master' into radar
Christian Lamparter [Sat, 23 Nov 2013 12:41:52 +0000 (13:41 +0100)]
Merge branch 'master' into radar