mirror of
https://github.com/aircrack-ng/rtl8812au.git
synced 2024-11-23 05:44:40 +00:00
Fix API change in kernel v4.15
In this kernel, the timer setup and handlers changed quite a bit.
This commit is contained in:
parent
998339a855
commit
7f9dcff9bc
@ -68,7 +68,6 @@
|
|||||||
#define PHY_RSSI_SLID_WIN_MAX 100
|
#define PHY_RSSI_SLID_WIN_MAX 100
|
||||||
#define PHY_LINKQUALITY_SLID_WIN_MAX 20
|
#define PHY_LINKQUALITY_SLID_WIN_MAX 20
|
||||||
|
|
||||||
|
|
||||||
#define SNAP_SIZE sizeof(struct ieee80211_snap_hdr)
|
#define SNAP_SIZE sizeof(struct ieee80211_snap_hdr)
|
||||||
|
|
||||||
#define RX_MPDU_QUEUE 0
|
#define RX_MPDU_QUEUE 0
|
||||||
@ -125,7 +124,6 @@ struct stainfo_rxcache {
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct smooth_rssi_data {
|
struct smooth_rssi_data {
|
||||||
u32 elements[100]; /* array to store values */
|
u32 elements[100]; /* array to store values */
|
||||||
u32 index; /* index to current array to store */
|
u32 index; /* index to current array to store */
|
||||||
@ -218,7 +216,6 @@ struct rx_raw_rssi {
|
|||||||
u8 ofdm_snr[4];
|
u8 ofdm_snr[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct rx_pkt_attrib {
|
struct rx_pkt_attrib {
|
||||||
u16 pkt_len;
|
u16 pkt_len;
|
||||||
u8 physt;
|
u8 physt;
|
||||||
@ -283,7 +280,6 @@ struct rx_pkt_attrib {
|
|||||||
struct phy_info phy_info;
|
struct phy_info phy_info;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* These definition is used for Rx packet reordering. */
|
/* These definition is used for Rx packet reordering. */
|
||||||
#define SN_LESS(a, b) (((a-b) & 0x800) != 0)
|
#define SN_LESS(a, b) (((a-b) & 0x800) != 0)
|
||||||
#define SN_EQUAL(a, b) (a == b)
|
#define SN_EQUAL(a, b) (a == b)
|
||||||
@ -359,8 +355,6 @@ struct rtw_rx_ring {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
accesser of recv_priv: rtw_recv_entry(dispatch / passive level); recv_thread(passive) ; returnpkt(dispatch)
|
accesser of recv_priv: rtw_recv_entry(dispatch / passive level); recv_thread(passive) ; returnpkt(dispatch)
|
||||||
; halt(passive) ;
|
; halt(passive) ;
|
||||||
@ -488,7 +482,9 @@ struct recv_priv {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||||
#define rtw_set_signal_stat_timer(recvpriv) _set_timer(&(recvpriv)->signal_stat_timer, (recvpriv)->signal_stat_sampling_interval)
|
#define rtw_set_signal_stat_timer(recvpriv) _set_timer(&(recvpriv)->signal_stat_timer, (recvpriv)->signal_stat_sampling_interval)
|
||||||
|
#endif
|
||||||
#endif /* CONFIG_NEW_SIGNAL_STAT_PROCESS */
|
#endif /* CONFIG_NEW_SIGNAL_STAT_PROCESS */
|
||||||
|
|
||||||
struct sta_recv_priv {
|
struct sta_recv_priv {
|
||||||
@ -507,7 +503,6 @@ struct sta_recv_priv {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct recv_buf {
|
struct recv_buf {
|
||||||
_list list;
|
_list list;
|
||||||
|
|
||||||
@ -565,7 +560,6 @@ struct recv_buf {
|
|||||||
|
|
||||||
tail ----->
|
tail ----->
|
||||||
|
|
||||||
|
|
||||||
end ----->
|
end ----->
|
||||||
|
|
||||||
len = (unsigned int )(tail - data);
|
len = (unsigned int )(tail - data);
|
||||||
@ -597,7 +591,6 @@ struct recv_frame_hdr {
|
|||||||
|
|
||||||
void *precvbuf;
|
void *precvbuf;
|
||||||
|
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
struct sta_info *psta;
|
struct sta_info *psta;
|
||||||
|
|
||||||
@ -614,7 +607,6 @@ struct recv_frame_hdr {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
union recv_frame {
|
union recv_frame {
|
||||||
|
|
||||||
union {
|
union {
|
||||||
@ -699,7 +691,6 @@ __inline static u8 *recvframe_push(union recv_frame *precvframe, sint sz)
|
|||||||
if (precvframe == NULL)
|
if (precvframe == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
|
||||||
precvframe->u.hdr.rx_data -= sz ;
|
precvframe->u.hdr.rx_data -= sz ;
|
||||||
if (precvframe->u.hdr.rx_data < precvframe->u.hdr.rx_head) {
|
if (precvframe->u.hdr.rx_data < precvframe->u.hdr.rx_head) {
|
||||||
precvframe->u.hdr.rx_data += sz ;
|
precvframe->u.hdr.rx_data += sz ;
|
||||||
@ -712,18 +703,15 @@ __inline static u8 *recvframe_push(union recv_frame *precvframe, sint sz)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
__inline static u8 *recvframe_pull(union recv_frame *precvframe, sint sz)
|
__inline static u8 *recvframe_pull(union recv_frame *precvframe, sint sz)
|
||||||
{
|
{
|
||||||
/* rx_data += sz; move rx_data sz bytes hereafter */
|
/* rx_data += sz; move rx_data sz bytes hereafter */
|
||||||
|
|
||||||
/* used for extract sz bytes from rx_data, update rx_data and return the updated rx_data to the caller */
|
/* used for extract sz bytes from rx_data, update rx_data and return the updated rx_data to the caller */
|
||||||
|
|
||||||
|
|
||||||
if (precvframe == NULL)
|
if (precvframe == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
|
||||||
precvframe->u.hdr.rx_data += sz;
|
precvframe->u.hdr.rx_data += sz;
|
||||||
|
|
||||||
if (precvframe->u.hdr.rx_data > precvframe->u.hdr.rx_tail) {
|
if (precvframe->u.hdr.rx_data > precvframe->u.hdr.rx_tail) {
|
||||||
@ -765,8 +753,6 @@ __inline static u8 *recvframe_put(union recv_frame *precvframe, sint sz)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
__inline static u8 *recvframe_pull_tail(union recv_frame *precvframe, sint sz)
|
__inline static u8 *recvframe_pull_tail(union recv_frame *precvframe, sint sz)
|
||||||
{
|
{
|
||||||
/* rmv data from rx_tail (by yitsen) */
|
/* rmv data from rx_tail (by yitsen) */
|
||||||
@ -790,8 +776,6 @@ __inline static u8 *recvframe_pull_tail(union recv_frame *precvframe, sint sz)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
__inline static _buffer *get_rxbuf_desc(union recv_frame *precvframe)
|
__inline static _buffer *get_rxbuf_desc(union recv_frame *precvframe)
|
||||||
{
|
{
|
||||||
_buffer *buf_desc;
|
_buffer *buf_desc;
|
||||||
@ -805,7 +789,6 @@ __inline static _buffer *get_rxbuf_desc(union recv_frame *precvframe)
|
|||||||
return buf_desc;
|
return buf_desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
__inline static union recv_frame *rxmem_to_recvframe(u8 *rxmem)
|
__inline static union recv_frame *rxmem_to_recvframe(u8 *rxmem)
|
||||||
{
|
{
|
||||||
/* due to the design of 2048 bytes alignment of recv_frame, we can reference the union recv_frame */
|
/* due to the design of 2048 bytes alignment of recv_frame, we can reference the union recv_frame */
|
||||||
@ -876,7 +859,6 @@ __inline static s32 translate_percentage_to_dbm(u32 SignalStrengthIndex)
|
|||||||
return SignalPower;
|
return SignalPower;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
struct sta_info;
|
struct sta_info;
|
||||||
|
|
||||||
extern void _rtw_init_sta_recv_priv(struct sta_recv_priv *psta_recvpriv);
|
extern void _rtw_init_sta_recv_priv(struct sta_recv_priv *psta_recvpriv);
|
||||||
|
Loading…
Reference in New Issue
Block a user