OSDN Git Service

Add support for Broadcom wl sta driver
[android-x86/external-kernel-drivers.git] / wl / linux-recent.patch
diff --git a/wl/linux-recent.patch b/wl/linux-recent.patch
new file mode 100644 (file)
index 0000000..3ff9f18
--- /dev/null
@@ -0,0 +1,38 @@
+--- a/src/shared/linux_osl.c
++++ b/src/shared/linux_osl.c
+@@ -932,7 +932,11 @@
+       uint cycles;
+ #if defined(__i386__)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)
++      cycles = (u32)rdtsc();
++#else
+       rdtscl(cycles);
++#endif
+ #else
+       cycles = 0;
+ #endif 
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
+@@ -235,6 +235,13 @@
+ };
+ #endif                                
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0))
++#define ieee80211_band nl80211_band
++#define IEEE80211_BAND_2GHZ NL80211_BAND_2GHZ
++#define IEEE80211_BAND_5GHZ NL80211_BAND_5GHZ
++#define IEEE80211_NUM_BANDS NUM_NL80211_BANDS
++#endif
++
+ #define CHAN2G(_channel, _freq, _flags) {                     \
+       .band                   = IEEE80211_BAND_2GHZ,          \
+       .center_freq            = (_freq),                      \
+@@ -1872,6 +1879,7 @@
+       }
+       set_wiphy_dev(wdev->wiphy, dev);
+       wdev->wiphy->max_scan_ssids = WL_NUM_SCAN_MAX;
++      wdev->wiphy->max_scan_ie_len = IEEE80211_MAX_DATA_LEN;
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33)
+       wdev->wiphy->max_num_pmkids = WL_NUM_PMKIDS_MAX;
+ #endif