From 4a660c6a676539af84829985280e2ab0fbbb3be0 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Sat, 27 Dec 2014 18:06:03 -0600 Subject: [PATCH] rtl8188eu: Fix remaining warnings in build Signed-off-by: Larry Finger --- include/osdep_intf.h | 8 ++++++-- os_dep/ioctl_cfg80211.c | 15 ++++++++++++--- os_dep/os_intfs.c | 12 ++++++++++++ os_dep/recv_linux.c | 5 +++++ 4 files changed, 35 insertions(+), 5 deletions(-) diff --git a/include/osdep_intf.h b/include/osdep_intf.h index 76e59bf..9fbe476 100755 --- a/include/osdep_intf.h +++ b/include/osdep_intf.h @@ -85,9 +85,13 @@ int rtw_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); int rtw_init_netdev_name(struct net_device *pnetdev, const char *ifname); struct net_device *rtw_init_netdev(struct adapter *padapter); -#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,35)) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0)) u16 rtw_recv_select_queue(struct sk_buff *skb); -#endif //LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,35) +#else +u16 rtw_recv_select_queue(struct sk_buff *skb, + void *accel_priv, + select_queue_fallback_t fallback); +#endif #ifdef CONFIG_PROC_DEBUG void rtw_proc_init_one(struct net_device *dev); diff --git a/os_dep/ioctl_cfg80211.c b/os_dep/ioctl_cfg80211.c index d1a148c..9a361e8 100755 --- a/os_dep/ioctl_cfg80211.c +++ b/os_dep/ioctl_cfg80211.c @@ -4929,6 +4929,12 @@ exit: } +#if (LINUX_VERSION_CODE > KERNEL_VERSION(3, 13, 0)) +static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, + struct wireless_dev *wdev, + struct cfg80211_mgmt_tx_params *params, + u64 *cookie) +#else static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)) struct wireless_dev *wdev, @@ -4936,9 +4942,6 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, struct net_device *ndev, #endif struct ieee80211_channel *chan, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)) - struct cfg80211_mgmt_tx_params *params, -#endif #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)) || defined(COMPAT_KERNEL_RELEASE) bool offchan, #endif @@ -4959,6 +4962,7 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, bool dont_wait_for_ack, #endif u64 *cookie) +#endif { struct adapter *padapter = (struct adapter *)wiphy_to_adapter(wiphy); struct rtw_wdev_priv *pwdev_priv = wdev_to_priv(padapter->rtw_wdev); @@ -4967,6 +4971,11 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, u32 dump_limit = RTW_MAX_MGMT_TX_CNT; u32 dump_cnt = 0; bool ack = _TRUE; +#if (LINUX_VERSION_CODE > KERNEL_VERSION(3, 13, 0)) + struct ieee80211_channel *chan = params->chan; + const u8 *buf = params->buf; + size_t len = params->len; +#endif u8 tx_ch = (u8)ieee80211_frequency_to_channel(chan->center_freq); u8 category, action; int type = (-1); diff --git a/os_dep/os_intfs.c b/os_dep/os_intfs.c index 6a17a42..c4768f8 100755 --- a/os_dep/os_intfs.c +++ b/os_dep/os_intfs.c @@ -528,7 +528,13 @@ static unsigned int rtw_classify8021d(struct sk_buff *skb) return dscp >> 5; } +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0)) static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb) +#else +static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb, + void *accel_priv, + select_queue_fallback_t fallback) +#endif { struct adapter *padapter = rtw_netdev_priv(dev); struct mlme_priv *pmlmepriv = &padapter->mlmepriv; @@ -543,7 +549,13 @@ static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb) return rtw_1d_to_queue[skb->priority]; } +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0)) u16 rtw_recv_select_queue(struct sk_buff *skb) +#else +u16 rtw_recv_select_queue(struct sk_buff *skb, + void *accel_priv, + select_queue_fallback_t fallback) +#endif { struct iphdr *piphdr; unsigned int dscp; diff --git a/os_dep/recv_linux.c b/os_dep/recv_linux.c index a9f3cef..847ee7f 100755 --- a/os_dep/recv_linux.c +++ b/os_dep/recv_linux.c @@ -337,7 +337,12 @@ _func_enter_; //skb->ip_summed = CHECKSUM_NONE; skb->dev = pnetdev; #if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,35)) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0)) skb_set_queue_mapping(skb, rtw_recv_select_queue(skb)); +#else + skb_set_queue_mapping(skb, rtw_recv_select_queue(skb, + NULL, NULL)); +#endif #endif //LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,35) _rtw_xmit_entry(skb, pnetdev);