Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compatibility for 4.13 kernel #21

Merged
merged 1 commit into from
Nov 2, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,20 @@ void rtw_cfg80211_indicate_connect(_adapter *padapter)
#endif

DBG_871X(FUNC_ADPT_FMT" call cfg80211_roamed\n", FUNC_ADPT_ARG(padapter));
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0)
struct cfg80211_roam_info roaminfo = {
.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,
.authorized = 1,
};
cfg80211_roamed(padapter->pnetdev
, &roaminfo
, GFP_ATOMIC);
#else
cfg80211_roamed(padapter->pnetdev
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39) || defined(COMPAT_KERNEL_RELEASE)
, notify_channel
Expand All @@ -877,6 +891,7 @@ void rtw_cfg80211_indicate_connect(_adapter *padapter)
, pmlmepriv->assoc_rsp+sizeof(struct rtw_ieee80211_hdr_3addr)+6
, pmlmepriv->assoc_rsp_len-sizeof(struct rtw_ieee80211_hdr_3addr)-6
, GFP_ATOMIC);
#endif
}
else
{
Expand Down Expand Up @@ -1856,7 +1871,10 @@ enum nl80211_iftype {
*/
static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
struct net_device *ndev,
enum nl80211_iftype type, u32 *flags,
enum nl80211_iftype type,
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0)
u32 *flags,
#endif
struct vif_params *params)
{
enum nl80211_iftype old_type;
Expand Down Expand Up @@ -3936,7 +3954,11 @@ static int
char *name,
#endif
unsigned char name_assign_type,
enum nl80211_iftype type, u32 *flags, struct vif_params *params)
enum nl80211_iftype type,
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0)
u32 *flags,
#endif
struct vif_params *params)
{
int ret = 0;
struct net_device* ndev = NULL;
Expand Down