1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-11-25 14:44:09 +00:00

Adoptations for using the driver on android/nethunter

This commit is contained in:
kimocoder 2019-03-29 00:39:08 +01:00
parent 2c782c73b7
commit 71b58823dd
4 changed files with 3 additions and 27 deletions

View File

@ -4662,15 +4662,7 @@ exit:
return ret;
}
static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev,
#if (CFG80211_API_LEVEL < KERNEL_VERSION(3, 16, 0))
u8 *mac
#elif (CFG80211_API_LEVEL < 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;
@ -4684,12 +4676,7 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev
RTW_INFO("+"FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
#if (CFG80211_API_LEVEL < KERNEL_VERSION(3, 19, 0))
target_mac = mac;
#else
target_mac = params->mac;
#endif
if (check_fwstate(pmlmepriv, (_FW_LINKED | WIFI_AP_STATE | WIFI_MESH_STATE)) != _TRUE) {
RTW_INFO("%s, fw_state != FW_LINKED|WIFI_AP_STATE|WIFI_MESH_STATE\n", __func__);

View File

@ -336,11 +336,7 @@ void rtw_cfg80211_deinit_rfkill(struct wiphy *wiphy);
#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

@ -1029,7 +1029,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

@ -46,11 +46,7 @@ struct sk_buff *dbg_rtw_cfg80211_vendor_event_alloc(struct wiphy *wiphy, struct
struct sk_buff *skb;
unsigned int truesize = 0;
#if (CFG80211_API_LEVEL < 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;
@ -145,11 +141,8 @@ struct sk_buff *rtw_cfg80211_vendor_event_alloc(
{
struct sk_buff *skb;
#if (CFG80211_API_LEVEL < 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;
}