mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-27 17:21:34 +00:00
fix xradio for 4.11
This commit is contained in:
parent
5d6889f103
commit
cb48540d4a
1 changed files with 41 additions and 4 deletions
|
@ -1,3 +1,35 @@
|
|||
diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
|
||||
index e94f196..209d742 100644
|
||||
--- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
|
||||
+++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
|
||||
@@ -114,6 +123,14 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&pio {
|
||||
+ wifi_wake_xr819: wifi_wake_xr819@0 {
|
||||
+ allwinner,pins = "PG10";
|
||||
+ allwinner,function = "irq";
|
||||
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&mmc1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc1_pins_a>;
|
||||
@@ -129,6 +146,12 @@
|
||||
*/
|
||||
xr819: sdio_wifi@1 {
|
||||
reg = <1>;
|
||||
+ compatible = "xradio,xr819";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&wifi_wake_xr819>;
|
||||
+ interrupt-parent = <&pio>;
|
||||
+ interrupts = <6 10 IRQ_TYPE_EDGE_RISING>;
|
||||
+ interrupt-names = "host-wake";
|
||||
};
|
||||
};
|
||||
|
||||
diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig
|
||||
index 8c8edaf1..122b980b 100644
|
||||
--- a/drivers/net/wireless/Kconfig
|
||||
|
@ -1899,7 +1931,7 @@ new file mode 100644
|
|||
index 00000000..220f85a2
|
||||
--- /dev/null
|
||||
+++ b/drivers/net/wireless/xradio/bh.c
|
||||
@@ -0,0 +1,880 @@
|
||||
@@ -0,0 +1,884 @@
|
||||
+/*
|
||||
+ * Data Transmission thread implementation for XRadio drivers
|
||||
+ *
|
||||
|
@ -1920,6 +1952,10 @@ index 00000000..220f85a2
|
|||
+#include "wsm.h"
|
||||
+#include "sdio.h"
|
||||
+
|
||||
+struct sched_param {
|
||||
+ int sched_priority;
|
||||
+};
|
||||
+
|
||||
+/* TODO: Verify these numbers with WSM specification. */
|
||||
+#define DOWNLOAD_BLOCK_SIZE_WR (0x1000 - 4)
|
||||
+/* an SPI message cannot be bigger than (2"12-1)*2 bytes
|
||||
|
@ -1945,7 +1981,6 @@ index 00000000..220f85a2
|
|||
+int xradio_register_bh(struct xradio_common *hw_priv)
|
||||
+{
|
||||
+ int err = 0;
|
||||
+ struct sched_param param = { .sched_priority = 1 };
|
||||
+
|
||||
+ SYS_BUG(hw_priv->bh_thread);
|
||||
+ atomic_set(&hw_priv->bh_tx, 0);
|
||||
|
@ -1961,6 +1996,7 @@ index 00000000..220f85a2
|
|||
+ err = PTR_ERR(hw_priv->bh_thread);
|
||||
+ hw_priv->bh_thread = NULL;
|
||||
+ } else {
|
||||
+ struct sched_param param = { .sched_priority = 1 };
|
||||
+ SYS_WARN(sched_setscheduler(hw_priv->bh_thread, SCHED_FIFO, ¶m));
|
||||
+#ifdef HAS_PUT_TASK_STRUCT
|
||||
+ get_task_struct(hw_priv->bh_thread);
|
||||
|
@ -12073,7 +12109,7 @@ new file mode 100644
|
|||
index 00000000..70218423
|
||||
--- /dev/null
|
||||
+++ b/drivers/net/wireless/xradio/sdio.c
|
||||
@@ -0,0 +1,266 @@
|
||||
@@ -0,0 +1,267 @@
|
||||
+/*
|
||||
+ * SDIO driver for XRadio drivers
|
||||
+ *
|
||||
|
@ -12090,6 +12126,7 @@ index 00000000..70218423
|
|||
+#include <linux/mmc/card.h>
|
||||
+#include <linux/mmc/sdio.h>
|
||||
+#include <asm/mach-types.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/of.h>
|
||||
+#include <linux/of_irq.h>
|
||||
+
|
||||
|
@ -13598,7 +13635,7 @@ index 00000000..e9820b8a
|
|||
+ NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW :
|
||||
+ NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH;
|
||||
+ sta_printk(XRADIO_DBG_NIY, "[CQM] RSSI event: %d", rcpiRssi);
|
||||
+ ieee80211_cqm_rssi_notify(priv->vif, cqm_evt,
|
||||
+ ieee80211_cqm_rssi_notify(priv->vif, cqm_evt, rcpiRssi,
|
||||
+ GFP_KERNEL);
|
||||
+ break;
|
||||
+ }
|
||||
|
|
Loading…
Add table
Reference in a new issue