-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Credit for the patch goes to Krzysztof Kolasa. - Fixed make warnings Credit for the patch goes to Krzysztof Kolasa.
- Loading branch information
Showing
4 changed files
with
111 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
From 92fc12028553831a87cfa87ffa8d676ab0f60522 Mon Sep 17 00:00:00 2001 | ||
From: Simon Eisenmann <simon@longsleep.org> | ||
Date: Sat, 14 Mar 2015 15:02:08 +0100 | ||
Subject: [PATCH] Repair make warnings | ||
|
||
Orginal author: Krzysztof Kolasa | ||
Source: https://raw.githubusercontent.com/kolasa/bcmwl-6.30.223.248/9fafc1faa6dc410bf8aba340a7929f404c73d30e/patches/0016-repair-make-warnings.patch | ||
--- | ||
src/wl/sys/wl_cfg80211_hybrid.c | 13 ++++++++++++- | ||
1 file changed, 12 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c | ||
index ea0726f..b265e25 100644 | ||
--- a/src/wl/sys/wl_cfg80211_hybrid.c | ||
+++ b/src/wl/sys/wl_cfg80211_hybrid.c | ||
@@ -63,8 +63,13 @@ static s32 wl_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed); | ||
static s32 wl_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev, | ||
struct cfg80211_ibss_params *params); | ||
static s32 wl_cfg80211_leave_ibss(struct wiphy *wiphy, struct net_device *dev); | ||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0) | ||
static s32 wl_cfg80211_get_station(struct wiphy *wiphy, | ||
struct net_device *dev, u8 *mac, struct station_info *sinfo); | ||
+#else | ||
+static s32 wl_cfg80211_get_station(struct wiphy *wiphy, | ||
+ struct net_device *dev, const u8 *mac, struct station_info *sinfo); | ||
+#endif | ||
static s32 wl_cfg80211_set_power_mgmt(struct wiphy *wiphy, | ||
struct net_device *dev, bool enabled, s32 timeout); | ||
static int wl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, | ||
@@ -1387,7 +1392,7 @@ wl_cfg80211_get_key(struct wiphy *wiphy, struct net_device *dev, | ||
key_endian_to_host(&key); | ||
|
||
params.key_len = (u8) min_t(u8, DOT11_MAX_KEY_SIZE, key.len); | ||
- memcpy(params.key, key.data, params.key_len); | ||
+ memcpy((char *)params.key, key.data, params.key_len); | ||
|
||
if ((err = wl_dev_ioctl(dev, WLC_GET_WSEC, &wsec, sizeof(wsec)))) { | ||
return err; | ||
@@ -1421,9 +1426,15 @@ wl_cfg80211_get_key(struct wiphy *wiphy, struct net_device *dev, | ||
return err; | ||
} | ||
|
||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0) | ||
static s32 | ||
wl_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev, | ||
u8 *mac, struct station_info *sinfo) | ||
+#else | ||
+static s32 | ||
+wl_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev, | ||
+ const u8 *mac, struct station_info *sinfo) | ||
+#endif | ||
{ | ||
struct wl_cfg80211_priv *wl = wiphy_to_wl(wiphy); | ||
scb_val_t scb_val; | ||
-- | ||
2.1.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
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/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c | ||
index b265e25..425c7c5 100644 | ||
--- a/src/wl/sys/wl_cfg80211_hybrid.c | ||
+++ b/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 | ||
|