mirror of
https://github.com/LibreELEC/LibreELEC.tv
synced 2025-09-24 19:46:01 +07:00
40 lines
1.3 KiB
Diff
40 lines
1.3 KiB
Diff
From a97b0a39f016589e38706d7d32f902847dcbbf27 Mon Sep 17 00:00:00 2001
|
|
From: Simon Eisenmann <simon@longsleep.org>
|
|
Date: Sat, 14 Mar 2015 15:10:48 +0100
|
|
Subject: [PATCH] Add support for Linux 4.0
|
|
|
|
---
|
|
src/wl/sys/wl_cfg80211_hybrid.c | 8 ++++++++
|
|
1 file changed, 8 insertions(+)
|
|
|
|
diff --git a/x86-64/src/wl/sys/wl_cfg80211_hybrid.c b/x86-64/src/wl/sys/wl_cfg80211_hybrid.c
|
|
index b265e25..425c7c5 100644
|
|
--- a/x86-64/src/wl/sys/wl_cfg80211_hybrid.c
|
|
+++ b/x86-64/src/wl/sys/wl_cfg80211_hybrid.c
|
|
@@ -1452,7 +1452,11 @@ wl_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev,
|
|
WL_DBG(("Could not get rate (%d)\n", err));
|
|
} else {
|
|
rate = dtoh32(rate);
|
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)
|
|
sinfo->filled |= STATION_INFO_TX_BITRATE;
|
|
+#else
|
|
+ sinfo->filled |= BIT(NL80211_STA_INFO_TX_BITRATE);
|
|
+#endif
|
|
sinfo->txrate.legacy = rate * 5;
|
|
WL_DBG(("Rate %d Mbps\n", (rate / 2)));
|
|
}
|
|
@@ -1465,7 +1469,11 @@ wl_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev,
|
|
return err;
|
|
}
|
|
rssi = dtoh32(scb_val.val);
|
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)
|
|
sinfo->filled |= STATION_INFO_SIGNAL;
|
|
+#else
|
|
+ sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL);
|
|
+#endif
|
|
sinfo->signal = rssi;
|
|
WL_DBG(("RSSI %d dBm\n", rssi));
|
|
}
|
|
--
|
|
2.1.0
|