Chih-Wei Huang | 2fa6455 | 2020-01-21 12:18:40 +0800 | [diff] [blame] | 1 | From d3f93542326a06d920c6eb89b703384290d37b8b Mon Sep 17 00:00:00 2001 |
| 2 | From: Alberto Milone <alberto.milone@canonical.com> |
| 3 | Date: Fri, 2 Sep 2016 17:35:34 +0200 |
| 4 | Subject: [PATCH 1/1] Add support for Linux 4.8 |
| 5 | |
| 6 | Orginal author: Krzysztof Kolasa |
| 7 | --- |
| 8 | src/wl/sys/wl_cfg80211_hybrid.c | 22 ++++++++++++++++++++++ |
| 9 | 1 file changed, 22 insertions(+) |
| 10 | |
| 11 | diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c |
| 12 | index 2fc71fe..ec5e472 100644 |
| 13 | --- a/src/wl/sys/wl_cfg80211_hybrid.c |
| 14 | +++ b/src/wl/sys/wl_cfg80211_hybrid.c |
| 15 | @@ -2388,8 +2388,16 @@ wl_bss_connect_done(struct wl_cfg80211_priv *wl, struct net_device *ndev, |
| 16 | s32 err = 0; |
| 17 | |
| 18 | if (wl->scan_request) { |
| 19 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0) |
| 20 | + struct cfg80211_scan_info info = { |
| 21 | + .aborted = true, |
| 22 | + }; |
| 23 | + WL_DBG(("%s: Aborting scan\n", __FUNCTION__)); |
| 24 | + cfg80211_scan_done(wl->scan_request, &info); |
| 25 | +#else |
| 26 | WL_DBG(("%s: Aborting scan\n", __FUNCTION__)); |
| 27 | cfg80211_scan_done(wl->scan_request, true); |
| 28 | +#endif |
| 29 | wl->scan_request = NULL; |
| 30 | } |
| 31 | |
| 32 | @@ -2490,7 +2498,14 @@ wl_notify_scan_status(struct wl_cfg80211_priv *wl, struct net_device *ndev, |
| 33 | |
| 34 | scan_done_out: |
| 35 | if (wl->scan_request) { |
| 36 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0) |
| 37 | + struct cfg80211_scan_info info = { |
| 38 | + .aborted = false, |
| 39 | + }; |
| 40 | + cfg80211_scan_done(wl->scan_request, &info); |
| 41 | +#else |
| 42 | cfg80211_scan_done(wl->scan_request, false); |
| 43 | +#endif |
| 44 | wl->scan_request = NULL; |
| 45 | } |
| 46 | rtnl_unlock(); |
| 47 | @@ -2909,7 +2924,14 @@ s32 wl_cfg80211_down(struct net_device *ndev) |
| 48 | s32 err = 0; |
| 49 | |
| 50 | if (wl->scan_request) { |
| 51 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0) |
| 52 | + struct cfg80211_scan_info info = { |
| 53 | + .aborted = true, |
| 54 | + }; |
| 55 | + cfg80211_scan_done(wl->scan_request, &info); |
| 56 | +#else |
| 57 | cfg80211_scan_done(wl->scan_request, true); |
| 58 | +#endif |
| 59 | wl->scan_request = NULL; |
| 60 | } |
| 61 | |
| 62 | -- |
| 63 | 2.7.4 |
| 64 | |