Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile with linux-4.9 #14

Merged
merged 1 commit into from
May 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions esp_mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,13 @@ void hw_scan_done(struct esp_pub *epub, bool aborted)

ESSERT(epub->wl.scan_req != NULL);

#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0))
struct cfg80211_scan_info info = {
.scan_start_tsf = 0,
.aborted = aborted,
};
ieee80211_scan_completed(epub->hw, &info);
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30))
ieee80211_scan_completed(epub->hw, aborted);
#else
ieee80211_scan_completed(epub->hw);
Expand Down Expand Up @@ -924,7 +930,13 @@ static void hw_scan_timeout_report(struct work_struct *work)
epub->wl.scan_req = NULL;
}

#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0))
struct cfg80211_scan_info info = {
.scan_start_tsf = 0,
.aborted = aborted,
};
ieee80211_scan_completed(epub->hw, &info);
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30))
ieee80211_scan_completed(epub->hw, aborted);
#else
ieee80211_scan_completed(epub->hw);
Expand Down
12 changes: 12 additions & 0 deletions esp_pub.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <linux/sched.h>
#include <net/mac80211.h>
#include <net/cfg80211.h>
#include <linux/nl80211.h>
#include <linux/version.h>
#include "sip2_common.h"

Expand All @@ -21,6 +22,17 @@
#include <net/wireless.h>
#endif

#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0))
enum ieee80211_band {
IEEE80211_BAND_2GHZ = NL80211_BAND_2GHZ,
IEEE80211_BAND_5GHZ = NL80211_BAND_5GHZ,
IEEE80211_BAND_60GHZ = NL80211_BAND_60GHZ,

/* keep last */
IEEE80211_NUM_BANDS
};
#endif

enum esp_sdio_state{
ESP_SDIO_STATE_FIRST_INIT,
ESP_SDIO_STATE_FIRST_NORMAL_EXIT,
Expand Down