[PATCH 15/30] backports: Add microchip wilc1000 driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This driver was newly added to mainline, also add it to backports.

The driver needs minimal changes to compile against older kernel
versions.

Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx>
---
 copy-list                                     |  1 +
 .../0013-fix-makefile-includes/wilc1000.patch | 34 ++++++++++++++
 patches/0095-spi-delay/wilc1000.patch         | 47 +++++++++++++++++++
 3 files changed, 82 insertions(+)
 create mode 100644 patches/0013-fix-makefile-includes/wilc1000.patch
 create mode 100644 patches/0095-spi-delay/wilc1000.patch

diff --git a/copy-list b/copy-list
index 6aeb9cc6..8c787e06 100644
--- a/copy-list
+++ b/copy-list
@@ -104,6 +104,7 @@ drivers/net/wireless/intel/
 drivers/net/wireless/ralink/
 drivers/net/wireless/zydas/
 drivers/net/wireless/marvell/
+drivers/net/wireless/microchip/
 drivers/net/wireless/intersil/
 drivers/net/wireless/quantenna/
 drivers/net/wireless/realtek/
diff --git a/patches/0013-fix-makefile-includes/wilc1000.patch b/patches/0013-fix-makefile-includes/wilc1000.patch
new file mode 100644
index 00000000..819a1593
--- /dev/null
+++ b/patches/0013-fix-makefile-includes/wilc1000.patch
@@ -0,0 +1,34 @@
+linux/interrupt.h include needed for kernel 4.14
+linux/module.h include needed for kernel 3.18
+
+--- a/drivers/net/wireless/microchip/wilc1000/netdev.c
++++ b/drivers/net/wireless/microchip/wilc1000/netdev.c
+@@ -9,6 +9,8 @@
+ #include <linux/firmware.h>
+ #include <linux/netdevice.h>
+ #include <linux/inetdevice.h>
++#include <linux/interrupt.h>
++#include <linux/module.h>
+ 
+ #include "cfg80211.h"
+ #include "wlan_cfg.h"
+--- a/drivers/net/wireless/microchip/wilc1000/sdio.c
++++ b/drivers/net/wireless/microchip/wilc1000/sdio.c
+@@ -10,6 +10,7 @@
+ #include <linux/mmc/host.h>
+ #include <linux/mmc/sdio.h>
+ #include <linux/of_irq.h>
++#include <linux/module.h>
+ 
+ #include "netdev.h"
+ #include "cfg80211.h"
+--- a/drivers/net/wireless/microchip/wilc1000/spi.c
++++ b/drivers/net/wireless/microchip/wilc1000/spi.c
+@@ -7,6 +7,7 @@
+ #include <linux/clk.h>
+ #include <linux/spi/spi.h>
+ #include <linux/crc7.h>
++#include <linux/module.h>
+ 
+ #include "netdev.h"
+ #include "cfg80211.h"
diff --git a/patches/0095-spi-delay/wilc1000.patch b/patches/0095-spi-delay/wilc1000.patch
new file mode 100644
index 00000000..6565c432
--- /dev/null
+++ b/patches/0095-spi-delay/wilc1000.patch
@@ -0,0 +1,47 @@
+--- a/drivers/net/wireless/microchip/wilc1000/spi.c
++++ b/drivers/net/wireless/microchip/wilc1000/spi.c
+@@ -160,10 +160,14 @@ static int wilc_spi_tx(struct wilc *wilc
+ 		struct spi_transfer tr = {
+ 			.tx_buf = b,
+ 			.len = len,
++#if LINUX_VERSION_IS_GEQ(5,5,0)
+ 			.delay = {
+ 				.value = 0,
+ 				.unit = SPI_DELAY_UNIT_USECS
+ 			},
++#else
++			.delay_usecs = 0,
++#endif /* >= 5.5 */
+ 		};
+ 		char *r_buffer = kzalloc(len, GFP_KERNEL);
+ 
+@@ -204,10 +208,14 @@ static int wilc_spi_rx(struct wilc *wilc
+ 		struct spi_transfer tr = {
+ 			.rx_buf = rb,
+ 			.len = rlen,
++#if LINUX_VERSION_IS_GEQ(5,5,0)
+ 			.delay = {
+ 				.value = 0,
+ 				.unit = SPI_DELAY_UNIT_USECS
+ 			},
++#else
++			.delay_usecs = 0,
++#endif /* >= 5.5 */
+ 
+ 		};
+ 		char *t_buffer = kzalloc(rlen, GFP_KERNEL);
+@@ -249,10 +257,14 @@ static int wilc_spi_tx_rx(struct wilc *w
+ 			.tx_buf = wb,
+ 			.len = rlen,
+ 			.bits_per_word = 8,
++#if LINUX_VERSION_IS_GEQ(5,5,0)
+ 			.delay = {
+ 				.value = 0,
+ 				.unit = SPI_DELAY_UNIT_USECS
+ 			},
++#else
++			.delay_usecs = 0,
++#endif /* >= 5.5 */
+ 
+ 		};
+ 
-- 
2.20.1

--
To unsubscribe from this list: send the line "unsubscribe backports" in



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux