linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath9k: introduce endian_check module parameter
@ 2018-02-26  9:09 Bas Vermeulen
  2018-02-26  9:54 ` Kalle Valo
  0 siblings, 1 reply; 21+ messages in thread
From: Bas Vermeulen @ 2018-02-26  9:09 UTC (permalink / raw)
  To: linux-wireless; +Cc: ath9k-devel

A random (little endian eeprom'd) ar9278 card didn't work on my
PowerMac G5 without allowing the driver to byte-swap the eeprom.

Introduce a module parameter endian_check to allow this to happen,
and the PCIe card to function correctly on BE powerpc.

Signed-off-by: Bas Vermeulen <bvermeul@blackstar.nl>
---
 drivers/net/wireless/ath/ath9k/init.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index fa58a32227f5..421039dc060a 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -67,6 +67,9 @@ static int ath9k_ps_enable;
 module_param_named(ps_enable, ath9k_ps_enable, int, 0444);
 MODULE_PARM_DESC(ps_enable, "Enable WLAN PowerSave");
 
+static int ath9k_endian_check;
+module_param_named(endian_check, ath9k_endian_check, int, 0444);
+MODULE_PARM_DESC(endian_check, "Check EEPROM for endianness compatibility");
 #ifdef CONFIG_ATH9K_CHANNEL_CONTEXT
 
 int ath9k_use_chanctx;
@@ -587,7 +590,8 @@ static int ath9k_of_init(struct ath_softc *sc)
 		ether_addr_copy(common->macaddr, mac);
 
 	ah->ah_flags &= ~AH_USE_EEPROM;
-	ah->ah_flags |= AH_NO_EEP_SWAP;
+	if (!ath9k_endian_check)
+		ah->ah_flags |= AH_NO_EEP_SWAP;
 
 	return 0;
 }
-- 
2.16.2


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

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

end of thread, other threads:[~2018-04-12 18:53 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-26  9:09 [PATCH] ath9k: introduce endian_check module parameter Bas Vermeulen
2018-02-26  9:54 ` Kalle Valo
2018-02-26 10:07   ` Bas Vermeulen
2018-02-26 11:30     ` Sebastian Gottschall
2018-02-26 12:26       ` Bas Vermeulen
2018-02-26 14:52     ` Kalle Valo
2018-03-14 12:42       ` Bas Vermeulen
2018-03-14 14:34         ` Kalle Valo
2018-03-14 21:34           ` Arend van Spriel
2018-03-19  8:11             ` Martin Blumenstingl
2018-03-20 21:07               ` Rafał Miłecki
2018-03-20 21:14                 ` Martin Blumenstingl
2018-03-24  8:05               ` Mathias Kresin
2018-04-10  9:05           ` Bas Vermeulen
2018-04-12 18:53             ` Martin Blumenstingl
2018-02-26 16:32     ` Larry Finger
2018-02-26 16:44       ` Bas Vermeulen
2018-02-26 17:42         ` Dan Williams
2018-02-26 21:42           ` Bas Vermeulen
2018-02-26 11:28   ` Sebastian Gottschall
2018-02-26 12:21     ` Bas Vermeulen

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).