Skip to content

Commit f20ede8

Browse files
committedApr 14, 2018
rtl8192du: Fix some failures for COMPAT_KERNEL_RELEASE
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
1 parent 83d9f5a commit f20ede8

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed
 

‎core/rtw_ap.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2584,7 +2584,7 @@ u8 ap_free_sta(_adapter *padapter, struct sta_info *psta, bool active, u16 reaso
25842584

25852585
#ifdef CONFIG_IOCTL_CFG80211
25862586
if (1) {
2587-
#ifdef COMPAT_KERNEL_RELEASE
2587+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) //def COMPAT_KERNEL_RELEASE
25882588
rtw_cfg80211_indicate_sta_disassoc(padapter, psta->hwaddr, reason);
25892589
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) && !defined(CONFIG_CFG80211_FORCE_COMPATIBLE_2_6_37_UNDER)
25902590
rtw_cfg80211_indicate_sta_disassoc(padapter, psta->hwaddr, reason);

‎core/rtw_mlme_ext.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2255,7 +2255,7 @@ unsigned int OnAssocReq(_adapter *padapter, union recv_frame *precv_frame)
22552255
DBG_871X("indicate_sta_join_event to upper layer - hostapd\n");
22562256

22572257
#ifdef CONFIG_IOCTL_CFG80211
2258-
#ifdef COMPAT_KERNEL_RELEASE
2258+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
22592259
rtw_cfg80211_indicate_sta_assoc(padapter, pframe, pkt_len);
22602260
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) && !defined(CONFIG_CFG80211_FORCE_COMPATIBLE_2_6_37_UNDER)
22612261
rtw_cfg80211_indicate_sta_assoc(padapter, pframe, pkt_len);

‎os_dep/ioctl_cfg80211.c

+3-4
Original file line numberDiff line numberDiff line change
@@ -3353,14 +3353,13 @@ void rtw_cfg80211_indicate_sta_disassoc(_adapter *padapter, unsigned char *da, u
33533353
reason = cpu_to_le16(reason);
33543354
pmgmt_frame = rtw_set_fixed_ie(pmgmt_frame, _RSON_CODE_ , (unsigned char *)&reason, &frame_len);
33553355

3356-
#ifdef COMPAT_KERNEL_RELEASE
3356+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
33573357
rtw_cfg80211_rx_mgmt(padapter, freq, 0, mgmt_buf, frame_len, GFP_ATOMIC);
33583358
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) && !defined(CONFIG_CFG80211_FORCE_COMPATIBLE_2_6_37_UNDER)
33593359
rtw_cfg80211_rx_mgmt(padapter, freq, 0, mgmt_buf, frame_len, GFP_ATOMIC);
3360-
#else //COMPAT_KERNEL_RELEASE
3360+
#else
33613361
cfg80211_send_disassoc(padapter->pnetdev, mgmt_buf, frame_len);
3362-
//cfg80211_rx_action(padapter->pnetdev, freq, mgmt_buf, frame_len, GFP_ATOMIC);
3363-
#endif //COMPAT_KERNEL_RELEASE
3362+
#endif
33643363
#endif /* defined(RTW_USE_CFG80211_STA_EVENT) */
33653364
}
33663365

0 commit comments

Comments
 (0)
Please sign in to comment.