mirror of
https://github.com/aircrack-ng/rtl8812au.git
synced 2024-11-09 23:57:00 +00:00
fix build with kernel 4.12
* Fixed compilation/building on kernel v4.12 (4.12.3 also tested ok)
This commit is contained in:
parent
dd20cc42a6
commit
195314b135
@ -753,6 +753,19 @@ check_bss:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
RTW_INFO(FUNC_ADPT_FMT" call cfg80211_roamed\n", FUNC_ADPT_ARG(padapter));
|
RTW_INFO(FUNC_ADPT_FMT" call cfg80211_roamed\n", FUNC_ADPT_ARG(padapter));
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
||||||
|
{
|
||||||
|
struct cfg80211_roam_info roam_info = {
|
||||||
|
.channel = notify_channel,
|
||||||
|
.bssid = cur_network->network.MacAddress,
|
||||||
|
.req_ie = pmlmepriv->assoc_req+sizeof(struct rtw_ieee80211_hdr_3addr)+2,
|
||||||
|
.req_ie_len = pmlmepriv->assoc_req_len-sizeof(struct rtw_ieee80211_hdr_3addr)-2,
|
||||||
|
.resp_ie = pmlmepriv->assoc_rsp+sizeof(struct rtw_ieee80211_hdr_3addr)+6,
|
||||||
|
.resp_ie_len = pmlmepriv->assoc_rsp_len-sizeof(struct rtw_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
|
||||||
@ -763,6 +776,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 {
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) || defined(COMPAT_KERNEL_RELEASE)
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) || defined(COMPAT_KERNEL_RELEASE)
|
||||||
RTW_INFO("pwdev->sme_state(b)=%d\n", pwdev->sme_state);
|
RTW_INFO("pwdev->sme_state(b)=%d\n", pwdev->sme_state);
|
||||||
@ -1730,10 +1744,17 @@ enum nl80211_iftype {
|
|||||||
NL80211_IFTYPE_MAX = NUM_NL80211_IFTYPES - 1
|
NL80211_IFTYPE_MAX = NUM_NL80211_IFTYPES - 1
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
||||||
|
static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
|
||||||
|
struct net_device *ndev,
|
||||||
|
enum nl80211_iftype type,
|
||||||
|
struct vif_params *params)
|
||||||
|
#else
|
||||||
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, u32 *flags,
|
||||||
struct vif_params *params)
|
struct vif_params *params)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
enum nl80211_iftype old_type;
|
enum nl80211_iftype old_type;
|
||||||
NDIS_802_11_NETWORK_INFRASTRUCTURE networkType;
|
NDIS_802_11_NETWORK_INFRASTRUCTURE networkType;
|
||||||
@ -3702,7 +3723,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
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0))
|
||||||
|
enum nl80211_iftype type, struct vif_params *params)
|
||||||
|
#else
|
||||||
enum nl80211_iftype type, u32 *flags, struct vif_params *params)
|
enum nl80211_iftype type, u32 *flags, struct vif_params *params)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
struct net_device *ndev = NULL;
|
struct net_device *ndev = NULL;
|
||||||
@ -6330,7 +6355,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->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
|
wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
|
||||||
|
#else // kernel >= 4.12
|
||||||
|
wiphy->max_sched_scan_reqs = 1;
|
||||||
|
#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