1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-09-20 05:00:36 +00:00

Adoptations for using the driver on android/nethunter

This commit is contained in:
kimocoder 2019-04-06 01:16:13 +02:00
parent c3ccff59af
commit ee01e58834
4 changed files with 3 additions and 27 deletions

View File

@ -5270,15 +5270,7 @@ exit:
return ret;
}
static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev,
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0))
u8 *mac
#elif (LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0))
const u8 *mac
#else
struct station_del_parameters *params
#endif
)
static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev, struct station_del_parameters *params)
{
int ret = 0;
_irqL irqL;
@ -5290,11 +5282,7 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
struct sta_priv *pstapriv = &padapter->stapriv;
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0))
target_mac = mac;
#else
target_mac = params->mac;
#endif
RTW_INFO("+"FUNC_NDEV_FMT" mac=%pM\n", FUNC_NDEV_ARG(ndev), target_mac);

View File

@ -354,12 +354,7 @@ void rtw_cfg80211_deinit_rfkill(struct wiphy *wiphy);
#endif
#define rtw_cfg80211_connect_result(wdev, bssid, req_ie, req_ie_len, resp_ie, resp_ie_len, status, gfp) cfg80211_connect_result(wdev_to_ndev(wdev), bssid, req_ie, req_ie_len, resp_ie, resp_ie_len, status, gfp)
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0))
#define rtw_cfg80211_disconnected(wdev, reason, ie, ie_len, locally_generated, gfp) cfg80211_disconnected(wdev_to_ndev(wdev), reason, ie, ie_len, gfp)
#else
#define rtw_cfg80211_disconnected(wdev, reason, ie, ie_len, locally_generated, gfp) cfg80211_disconnected(wdev_to_ndev(wdev), reason, ie, ie_len, locally_generated, gfp)
#endif
#ifdef CONFIG_RTW_80211R
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0))

View File

@ -1069,7 +1069,7 @@ void *wifi_get_country_code(char *ccode)
if (!ccode)
return NULL;
if (wifi_control_data && wifi_control_data->get_country_code)
return wifi_control_data->get_country_code(ccode);
return wifi_control_data->get_country_code(ccode, 0);
return NULL;
}
#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)) */

View File

@ -45,11 +45,7 @@ struct sk_buff *dbg_rtw_cfg80211_vendor_event_alloc(struct wiphy *wiphy, struct
struct sk_buff *skb;
unsigned int truesize = 0;
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0))
skb = cfg80211_vendor_event_alloc(wiphy, len, event_id, gfp);
#else
skb = cfg80211_vendor_event_alloc(wiphy, wdev, len, event_id, gfp);
#endif
if (skb)
truesize = skb->truesize;
@ -144,11 +140,8 @@ struct sk_buff *rtw_cfg80211_vendor_event_alloc(
{
struct sk_buff *skb;
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0))
skb = cfg80211_vendor_event_alloc(wiphy, len, event_id, gfp);
#else
skb = cfg80211_vendor_event_alloc(wiphy, wdev, len, event_id, gfp);
#endif
return skb;
}