mirror of
https://github.com/aircrack-ng/rtl8812au.git
synced 2024-11-25 14:44:09 +00:00
Support for Kernel v4.12 added
* Tested working with Kernel v4.12.12
This commit is contained in:
parent
4ff1eaf558
commit
2f22d0efdf
@ -796,12 +796,28 @@ check_bss:
|
|||||||
struct ieee80211_channel *notify_channel;
|
struct ieee80211_channel *notify_channel;
|
||||||
u32 freq;
|
u32 freq;
|
||||||
u16 channel = cur_network->network.Configuration.DSConfig;
|
u16 channel = cur_network->network.Configuration.DSConfig;
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0))
|
||||||
|
struct cfg80211_roam_info roam_info = {};
|
||||||
|
#endif
|
||||||
|
|
||||||
freq = rtw_ch2freq(channel);
|
freq = rtw_ch2freq(channel);
|
||||||
notify_channel = ieee80211_get_channel(wiphy, freq);
|
notify_channel = ieee80211_get_channel(wiphy, freq);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DBG_871X(FUNC_ADPT_FMT" call cfg80211_roamed\n", FUNC_ADPT_ARG(padapter));
|
DBG_871X(FUNC_ADPT_FMT" call cfg80211_roamed\n", FUNC_ADPT_ARG(padapter));
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0))
|
||||||
|
roam_info.channel = notify_channel;
|
||||||
|
roam_info.bssid = cur_network->network.MacAddress;
|
||||||
|
roam_info.req_ie =
|
||||||
|
pmlmepriv->assoc_req+sizeof(struct ieee80211_hdr_3addr)+2;
|
||||||
|
roam_info.req_ie_len =
|
||||||
|
pmlmepriv->assoc_req_len-sizeof(struct ieee80211_hdr_3addr)-2;
|
||||||
|
roam_info.resp_ie =
|
||||||
|
pmlmepriv->assoc_rsp+sizeof(struct ieee80211_hdr_3addr)+6;
|
||||||
|
roam_info.resp_ie_len =
|
||||||
|
pmlmepriv->assoc_rsp_len-sizeof(struct ieee80211_hdr_3addr)-6;
|
||||||
|
cfg80211_roamed(padapter->pnetdev, &roam_info, GFP_ATOMIC);
|
||||||
|
#else
|
||||||
cfg80211_roamed(padapter->pnetdev
|
cfg80211_roamed(padapter->pnetdev
|
||||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39) || defined(COMPAT_KERNEL_RELEASE)
|
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39) || defined(COMPAT_KERNEL_RELEASE)
|
||||||
, notify_channel
|
, notify_channel
|
||||||
@ -812,6 +828,7 @@ check_bss:
|
|||||||
, pmlmepriv->assoc_rsp+sizeof(struct rtw_ieee80211_hdr_3addr)+6
|
, pmlmepriv->assoc_rsp+sizeof(struct rtw_ieee80211_hdr_3addr)+6
|
||||||
, pmlmepriv->assoc_rsp_len-sizeof(struct rtw_ieee80211_hdr_3addr)-6
|
, pmlmepriv->assoc_rsp_len-sizeof(struct rtw_ieee80211_hdr_3addr)-6
|
||||||
, GFP_ATOMIC);
|
, GFP_ATOMIC);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1881,7 +1898,10 @@ enum nl80211_iftype {
|
|||||||
*/
|
*/
|
||||||
static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
|
static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
|
||||||
struct net_device *ndev,
|
struct net_device *ndev,
|
||||||
enum nl80211_iftype type, u32 *flags,
|
enum nl80211_iftype type,
|
||||||
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0))
|
||||||
|
u32 *flags,
|
||||||
|
#endif
|
||||||
struct vif_params *params)
|
struct vif_params *params)
|
||||||
{
|
{
|
||||||
enum nl80211_iftype old_type;
|
enum nl80211_iftype old_type;
|
||||||
@ -3959,7 +3979,11 @@ static int rtw_cfg80211_add_monitor_if(_adapter *padapter, char *name, struct ne
|
|||||||
mon_ndev->type = ARPHRD_IEEE80211_RADIOTAP;
|
mon_ndev->type = ARPHRD_IEEE80211_RADIOTAP;
|
||||||
strncpy(mon_ndev->name, name, IFNAMSIZ);
|
strncpy(mon_ndev->name, name, IFNAMSIZ);
|
||||||
mon_ndev->name[IFNAMSIZ - 1] = 0;
|
mon_ndev->name[IFNAMSIZ - 1] = 0;
|
||||||
|
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(4,11,9))
|
||||||
|
mon_ndev->priv_destructor = rtw_ndev_destructor;
|
||||||
|
#else
|
||||||
mon_ndev->destructor = rtw_ndev_destructor;
|
mon_ndev->destructor = rtw_ndev_destructor;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,29))
|
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,29))
|
||||||
mon_ndev->netdev_ops = &rtw_cfg80211_monitor_if_ops;
|
mon_ndev->netdev_ops = &rtw_cfg80211_monitor_if_ops;
|
||||||
@ -4026,7 +4050,11 @@ static int
|
|||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
|
||||||
unsigned char name_assign_type,
|
unsigned char name_assign_type,
|
||||||
#endif
|
#endif
|
||||||
enum nl80211_iftype type, u32 *flags, struct vif_params *params)
|
enum nl80211_iftype type,
|
||||||
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0))
|
||||||
|
u32 *flags,
|
||||||
|
#endif
|
||||||
|
struct vif_params *params)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
struct net_device* ndev = NULL;
|
struct net_device* ndev = NULL;
|
||||||
@ -6615,7 +6643,11 @@ static void rtw_cfg80211_preinit_wiphy(_adapter *adapter, struct wiphy *wiphy)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_PM) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0))
|
#if defined(CONFIG_PM) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0))
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0))
|
||||||
|
wiphy->max_sched_scan_reqs = 1;
|
||||||
|
#else
|
||||||
wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
|
wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
|
||||||
|
#endif
|
||||||
#ifdef CONFIG_PNO_SUPPORT
|
#ifdef CONFIG_PNO_SUPPORT
|
||||||
wiphy->max_sched_scan_ssids = MAX_PNO_LIST_COUNT;
|
wiphy->max_sched_scan_ssids = MAX_PNO_LIST_COUNT;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user