diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index a1ffca0..7aae542 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -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); diff --git a/os_dep/linux/ioctl_cfg80211.h b/os_dep/linux/ioctl_cfg80211.h index 54a319f..f57586d 100644 --- a/os_dep/linux/ioctl_cfg80211.h +++ b/os_dep/linux/ioctl_cfg80211.h @@ -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)) diff --git a/os_dep/linux/rtw_android.c b/os_dep/linux/rtw_android.c index 8cde93c..8690883 100644 --- a/os_dep/linux/rtw_android.c +++ b/os_dep/linux/rtw_android.c @@ -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)) */ diff --git a/os_dep/linux/rtw_cfgvendor.c b/os_dep/linux/rtw_cfgvendor.c index 0f0f24f..7517491 100644 --- a/os_dep/linux/rtw_cfgvendor.c +++ b/os_dep/linux/rtw_cfgvendor.c @@ -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; }