1 #ifndef __RTL_COMPAT_H__
2 #define __RTL_COMPAT_H__
4 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29))
6 * Use this if you want to use the same suspend and resume callbacks for suspend
7 * to RAM and hibernation.
9 #define SIMPLE_DEV_PM_OPS(name, suspend_fn, resume_fn) \
10 struct dev_pm_ops name = { \
11 .suspend = suspend_fn, \
12 .resume = resume_fn, \
13 .freeze = suspend_fn, \
15 .poweroff = suspend_fn, \
16 .restore = resume_fn, \
19 #define compat_pci_suspend(fn) \
20 int fn##_compat(struct pci_dev *pdev, pm_message_t state) \
28 pci_save_state(pdev); \
29 pci_disable_device(pdev); \
30 pci_set_power_state(pdev, PCI_D3hot); \
35 #define compat_pci_resume(fn) \
36 int fn##_compat(struct pci_dev *pdev) \
40 pci_set_power_state(pdev, PCI_D0); \
41 r = pci_enable_device(pdev); \
44 pci_restore_state(pdev); \
46 return fn(&pdev->dev); \
50 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39))
51 #define RX_FLAG_MACTIME_MPDU RX_FLAG_TSFT
53 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
54 #define RX_FLAG_MACTIME_MPDU RX_FLAG_MACTIME_START
57 //#define NETDEV_TX_OK
60 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
61 #define IEEE80211_KEY_FLAG_SW_MGMT IEEE80211_KEY_FLAG_SW_MGMT_TX
64 struct ieee80211_mgmt_compat
{
80 } __attribute__ ((packed
)) wme_action
;
87 } __attribute__((packed
)) addba_req
;
94 } __attribute__((packed
)) addba_resp
;
99 } __attribute__((packed
)) delba
;
102 /* capab_info for open and confirm,
106 /* Followed in plink_confirm by status
107 * code, AID and supported rates,
108 * and directly by supported rates in
109 * plink_open and plink_close
112 } __attribute__((packed
)) plink_action
;
116 } __attribute__((packed
)) mesh_action
;
120 } __attribute__ ((packed
)) ht_smps
;
122 } __attribute__ ((packed
)) action
;
124 } __attribute__ ((packed
));