History log of /linux-master/drivers/net/wireless/ath/carl9170/hw.h
Revision Date Author Comments
# 103dc3da 07-May-2020 Gustavo A. R. Silva <gustavoars@kernel.org>

carl9170: Replace zero-length array with flexible-array

The current codebase makes use of the zero-length array language
extension to the C90 standard, but the preferred mechanism to declare
variable-length types such as these ones is a flexible array member[1][2],
introduced in C99:

struct foo {
int stuff;
struct boo array[];
};

By making use of the mechanism above, we will get a compiler warning
in case the flexible array does not occur last in the structure, which
will help us prevent some kind of undefined behavior bugs from being
inadvertently introduced[3] to the codebase from now on.

Also, notice that, dynamic memory allocations won't be affected by
this change:

"Flexible array members have incomplete type, and so the sizeof operator
may not be applied. As a quirk of the original implementation of
zero-length arrays, sizeof evaluates to zero."[1]

sizeof(flexible-array-member) triggers a warning because flexible array
members have incomplete type[1]. There are some instances of code in
which the sizeof operator is being incorrectly/erroneously applied to
zero-length arrays and the result is zero. Such instances may be hiding
some bugs. So, this work (flexible-array member conversions) will also
help to get completely rid of those sorts of issues.

This issue was found with the help of Coccinelle.

[1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
[2] https://github.com/KSPP/linux/issues/21
[3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour")

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200507151921.GA5083@embeddedor


# 2f10e50e 15-Feb-2016 Christian Lamparter <chunkeey@googlemail.com>

carl9170: import 1.9.9 firmware headers

Import new headers from my firmware branch:
<https://github.com/chunkeey/carl9170fw>

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# 5ae994d0 15-Dec-2012 Christian Lamparter <chunkeey@googlemail.com>

carl9170: import 1.9.7 firmware headers

Import new headers from my firmware branch:
<https://github.com/chunkeey/carl9170fw>

visit our wiki at:
<http://wireless.kernel.org/en/users/Drivers/carl9170.fw>

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 43b52a5a 16-Jul-2011 Christian Lamparter <chunkeey@googlemail.com>

carl9170 firmware: update firmware headers

* reserves feature bit for CCA counters

* extends hardware register file definitions

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 85ee5122 30-Jun-2011 Christian Lamparter <chunkeey@googlemail.com>

carl9170: import 1.9.4 firmware headers

This patch imports all shared header changes
from carl9170fw.git.

* update copyright boilerplate

* add some more strategic __aligned(4).

* WoWLAN

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 9e09b5c9 22-Jan-2011 Christian Lamparter <chunkeey@googlemail.com>

carl9170: update fw/hw headers

This patch syncs up the header files with
the project's main firmware carl9170fw.git.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 3f1240e4 29-Oct-2010 Christian Lamparter <chunkeey@googlemail.com>

carl9170: import hw/fw header updates

This patch imports all shared header changes
from carl9170fw.git.

* add some strategic __aligned(4).
This allows the compiler generate optimized code for
architectures which can't access (unaligned/packed)
data efficiently.
("ath9k_hw: optimize all descriptor access functions")

* add a forgotten __CARL9170FW__ ifdef around
a private firmware-internal struct.

* GET_VAL macro helper
Very useful for extracting data out of the
bit-packed PHY registers.

* cosmetic changes
e.g.: _CCA_MINCCA_ to just _CCA_MIN_.

* version bump 1.8.8.3 -> 1.9.0.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 5c895691 28-Sep-2010 Christian Lamparter <chunkeey@googlemail.com>

carl9170: support firmware-based rx filter

The hardware rx-filter was essentially disabled, because
of a serve, yet unidentifiable problem with iwlagn.
Due to these circumstances the driver and mac80211 were
left with the job of filtering.

This is very unfortunate and has proven to be expensive
in terms of latency, memory and load.

Therefore the new 1.8.8.3 firmware introduces a flexible
filtering infrastructure which allows the driver to
offload some of the checks (FCS & PLCP crc check,
RA match, control frame filter, etc...) whenever possible.

Note:
This patch also includes all changes to the
shared headers files since the inclusion.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# aae9af60 05-Sep-2010 Christian Lamparter <chunkeey@googlemail.com>

carl9170: Register maps, tx/rx descriptor formats and eeprom layout

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>