OpenELEC Testbuilds for RaspberryPi (Kodi 15.0) Part 1
#19
(2014-12-17, 13:05)Milhouse Wrote: As for a fix I'm sure it will come eventually, problem is the driver isn't mainline so it depends on someone releasing a 3.18 update (the current source doesn't seem particularly active in terms of maintenance so I may try and find an alternative).

I've worked out a patch for the RTL8812AU driver which will be in the next build, it's pretty straight forward and hopefully it will work.

Between kernel 3.12.x and 3.17.x, the cfg80211_rx_mgmt function is defined as:
Code:
/**
* cfg80211_rx_mgmt - notification of received, unprocessed management frame
* @wdev: wireless device receiving the frame
* @freq: Frequency on which the frame was received in MHz
* @sig_dbm: signal strength in mBm, or 0 if unknown
* @buf: Management frame (header + body)
* @len: length of the frame data
* @flags: flags, as defined in enum nl80211_rxmgmt_flags
* @gfp: context flags
*
* This function is called whenever an Action frame is received for a station
* mode interface, but is not processed in kernel.
*
* Return: %true if a user space application has registered for this frame.
* For action frames, that makes it responsible for rejecting unrecognized
* action frames; %false otherwise, in which case for action frames the
* driver is responsible for rejecting the frame.
*/
bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_dbm,
                      const u8 *buf, size_t len, u32 flags, gfp_t gfp);

but with kernel 3.18, the @gfp argument has been dropped:
Code:
/**
* cfg80211_rx_mgmt - notification of received, unprocessed management frame
* @wdev: wireless device receiving the frame
* @freq: Frequency on which the frame was received in MHz
* @sig_dbm: signal strength in mBm, or 0 if unknown
* @buf: Management frame (header + body)
* @len: length of the frame data
* @flags: flags, as defined in enum nl80211_rxmgmt_flags
*
* This function is called whenever an Action frame is received for a station
* mode interface, but is not processed in kernel.
*
* Return: %true if a user space application has registered for this frame.
* For action frames, that makes it responsible for rejecting unrecognized
* action frames; %false otherwise, in which case for action frames the
* driver is responsible for rejecting the frame.
*/
bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_dbm,
                      const u8 *buf, size_t len, u32 flags);

The following patch fixes the RTL8812AU driver:
Code:
diff --git a/include/ioctl_cfg80211.h b/include/ioctl_cfg80211.h
index 08357ac..8e85dc9 100644
--- a/include/ioctl_cfg80211.h
+++ b/include/ioctl_cfg80211.h
@@ -109,9 +109,12 @@ bool rtw_cfg80211_pwr_mgmt(_adapter *adapter);
   #define rtw_cfg80211_rx_mgmt(adapter, freq, sig_dbm, buf, len, gfp) cfg80211_rx_mgmt((adapter)->pnetdev, freq, sig_dbm, buf, len, gfp)
#elif (LINUX_VERSION_CODE < KERNEL_VERSION(3,12,0))
   #define rtw_cfg80211_rx_mgmt(adapter, freq, sig_dbm, buf, len, gfp) cfg80211_rx_mgmt((adapter)->rtw_wdev, freq, sig_dbm, buf, len, gfp)
-#else
+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0))
   // 3.12 added a flags argument which is just set to zero
   #define rtw_cfg80211_rx_mgmt(adapter, freq, sig_dbm, buf, len, gfp) cfg80211_rx_mgmt((adapter)->rtw_wdev, freq, sig_dbm, buf, len, 0, gfp)
+#else
+  // 3.18 dropped the gfp argument
+  #define rtw_cfg80211_rx_mgmt(adapter, freq, sig_dbm, buf, len, gfp) cfg80211_rx_mgmt((adapter)->rtw_wdev, freq, sig_dbm, buf, len, 0)
#endif

#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0))  && !defined(COMPAT_KERNEL_RELEASE)
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.


Messages In This Thread
RE: OpenELEC Testbuilds for RaspberryPi (Kodi 15.0) - by Milhouse - 2014-12-17, 18:29
Missing splash video - by Dinos52 - 2015-02-09, 21:02
MVC Support - by woronczak - 2015-03-12, 05:28
Logout Mark Read Team Forum Stats Members Help
OpenELEC Testbuilds for RaspberryPi (Kodi 15.0) Part 112