ath9k-devel.lists.ath9k.org archive mirror
 help / color / mirror / Atom feed
* [ath9k-devel] [PATCH 0/5] ath9k: EEPROM swapping improvements
@ 2016-08-21 14:49 Martin Blumenstingl
  2016-08-21 14:49 ` [ath9k-devel] [PATCH 1/5] ath9k: Add a #define for the EEPROM "eepmisc" endianness bit Martin Blumenstingl
                   ` (5 more replies)
  0 siblings, 6 replies; 34+ messages in thread
From: Martin Blumenstingl @ 2016-08-21 14:49 UTC (permalink / raw)
  To: ath9k-devel

There are two types of swapping the EEPROM data in the ath9k driver.
Before this series one type of swapping could not be used without the
other.

The first type of swapping looks at the "magic bytes" at the start of
the EEPROM data and performs swab16 on the EEPROM contents if needed.
The second type of swapping is EEPROM format specific and swaps
specific fields within the EEPROM itself (swab16, swab32 - depends on
the EEPROM format).

With this series the second part now looks at the EEPMISC register
inside the EEPROM, which uses a bit to indicate if the EEPROM data
is Big Endian (this is also done by the FreeBSD kernel).
This has a nice advantage: currently there are some out-of-tree hacks
(in OpenWrt and LEDE) where the EEPROM has a Big Endian header on a
Big Endian system (= no swab16 is performed) but the EEPROM itself
indicates that it's data is Little Endian. Until now the out-of-tree
code simply did a swab16 before passing the data to ath9k, so ath9k
first did the swab16 - this also enabled the format specific swapping.
These out-of-tree hacks are still working with the new logic, but it
is recommended to remove them.

The last patch in this series allows enabling the EEPROM endianness
swapping via devicetree. This should be fine now since it addresses
the concerns raised by Arnd Bergmann in in the original OF support
patches: [0].

This series depends on my other series (V5):
"add devicetree support to ath9k" - see [1]


[0] http://www.spinics.net/lists/linux-wireless/msg152634.html
[1] https://marc.info/?l=linux-wireless&m=147178988827847&w=2


Martin Blumenstingl (5):
  ath9k: Add a #define for the EEPROM "eepmisc" endianness bit
  ath9k: Set the "big endian" bit of the AR9003 EEPROM templates
  ath9k: Add an eeprom_ops callback for retrieving the eepmisc value
  ath9k: Make the EEPROM swapping check use the eepmisc register
  ath9k: Make EEPROM endianness swapping configurable via devicetree

 .../devicetree/bindings/net/wireless/qca,ath9k.txt | 16 ++++++
 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c     | 21 +++++---
 drivers/net/wireless/ath/ath9k/ar9003_eeprom.h     |  7 ++-
 drivers/net/wireless/ath/ath9k/eeprom.c            | 57 ++++++++++++++++------
 drivers/net/wireless/ath/ath9k/eeprom.h            |  5 +-
 drivers/net/wireless/ath/ath9k/eeprom_4k.c         | 10 +++-
 drivers/net/wireless/ath/ath9k/eeprom_9287.c       | 10 +++-
 drivers/net/wireless/ath/ath9k/eeprom_def.c        | 10 +++-
 drivers/net/wireless/ath/ath9k/init.c              |  6 ++-
 9 files changed, 110 insertions(+), 32 deletions(-)

-- 
2.9.3

^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2016-12-17 14:40 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-21 14:49 [ath9k-devel] [PATCH 0/5] ath9k: EEPROM swapping improvements Martin Blumenstingl
2016-08-21 14:49 ` [ath9k-devel] [PATCH 1/5] ath9k: Add a #define for the EEPROM "eepmisc" endianness bit Martin Blumenstingl
2016-08-22 11:42   ` Arnd Bergmann
2016-08-21 14:49 ` [ath9k-devel] [PATCH 2/5] ath9k: Set the "big endian" bit of the AR9003 EEPROM templates Martin Blumenstingl
2016-08-22 11:47   ` Arnd Bergmann
2016-08-22 11:56     ` Martin Blumenstingl
2016-08-22 15:31       ` Arnd Bergmann
2016-08-22 20:31         ` Martin Blumenstingl
2016-08-21 14:49 ` [ath9k-devel] [PATCH 3/5] ath9k: Add an eeprom_ops callback for retrieving the eepmisc value Martin Blumenstingl
2016-08-21 14:49 ` [ath9k-devel] [PATCH 4/5] ath9k: Make the EEPROM swapping check use the eepmisc register Martin Blumenstingl
2016-08-21 14:49 ` [ath9k-devel] [PATCH 5/5] ath9k: Make EEPROM endianness swapping configurable via devicetree Martin Blumenstingl
2016-08-22 11:52   ` Arnd Bergmann
2016-08-28 21:10     ` Martin Blumenstingl
2016-08-29 12:10       ` Arnd Bergmann
2016-08-29 19:45         ` Martin Blumenstingl
2016-08-29 21:25           ` Arnd Bergmann
2016-08-29 22:07             ` Martin Blumenstingl
2016-08-30  7:57               ` Arnd Bergmann
2016-10-02 22:29 ` [ath9k-devel] [PATCH v2 0/7] ath9k: EEPROM swapping improvements Martin Blumenstingl
2016-10-02 22:29   ` [ath9k-devel] [PATCH v2 1/7] ath9k: Add a #define for the EEPROM "eepmisc" endianness bit Martin Blumenstingl
2016-10-02 22:29   ` [ath9k-devel] [PATCH v2 2/7] ath9k: indicate that the AR9003 EEPROM template values are little endian Martin Blumenstingl
2016-10-02 22:29   ` [ath9k-devel] [PATCH v2 3/7] ath9k: Add an eeprom_ops callback for retrieving the eepmisc value Martin Blumenstingl
2016-10-02 22:29   ` [ath9k-devel] [PATCH v2 4/7] ath9k: replace eeprom_param EEP_MINOR_REV with get_eeprom_rev Martin Blumenstingl
2016-10-02 22:29   ` [ath9k-devel] [PATCH v2 5/7] ath9k: consistently use get_eeprom_rev(ah) Martin Blumenstingl
2016-10-02 22:29   ` [ath9k-devel] [PATCH v2 6/7] ath9k: Make the EEPROM swapping check use the eepmisc register Martin Blumenstingl
2016-10-02 22:29   ` [ath9k-devel] [PATCH v2 7/7] ath9k: define all EEPROM fields in Little Endian format Martin Blumenstingl
2016-10-12 13:18   ` [ath9k-devel] [PATCH v2 0/7] ath9k: EEPROM swapping improvements Kalle Valo
2016-11-25 15:06     ` Valo, Kalle
2016-11-25 23:49       ` Martin Blumenstingl
2016-12-12 20:05       ` Martin Blumenstingl
2016-12-13 12:03         ` Valo, Kalle
2016-12-14  6:45         ` Adrian Chadd
2016-12-17 14:40           ` Martin Blumenstingl
2016-12-15  8:34   ` Valo, Kalle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).