mirror of
https://github.com/proski/madwifi
synced 2024-11-22 06:21:47 +03:00
Use __skb_queue_after() instead of __skb_append()
Follow the rule of coding for the latest API. Use __skb_queue_after() in the code rather than __skb_append(), which is due to be removed in Linux 2.6.26. Provide compatibility definitions for __skb_queue_after() in include/compat.h. git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3605 0192ed92-7a03-0410-a25b-9323aeb14dbd
This commit is contained in:
parent
1941f3990b
commit
a49a973027
@ -197,6 +197,13 @@ typedef unsigned long resource_size_t;
|
||||
#define DEV_ATH CTL_UNNUMBERED
|
||||
#endif
|
||||
|
||||
/* __skb_append got a third parameter in 2.6.14 */
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
|
||||
#define __skb_queue_after(_list, _old, _new) __skb_append(_old, _new)
|
||||
#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)
|
||||
#define __skb_queue_after(_list, _old, _new) __skb_append(_old, _new, _list)
|
||||
#endif
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _ATH_COMPAT_H_ */
|
||||
|
@ -315,13 +315,6 @@ typedef spinlock_t acl_lock_t;
|
||||
#define ACL_LOCK_CHECK(_as)
|
||||
#endif
|
||||
|
||||
/* __skb_append got a third parameter in 2.6.14 */
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
|
||||
#define __skb_append(a,b,c) __skb_append(a, b)
|
||||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)
|
||||
#define __skb_append(a,b,c) __skb_queue_after(c, a, b)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Per-node power-save queue definitions. Beware of control
|
||||
* flow with IEEE80211_NODE_SAVEQ_LOCK/IEEE80211_NODE_SAVEQ_UNLOCK.
|
||||
@ -377,7 +370,7 @@ typedef spinlock_t acl_lock_t;
|
||||
struct sk_buff *tail = skb_peek_tail(&(_ni)->ni_savedq); \
|
||||
if (tail != NULL) { \
|
||||
_age -= M_AGE_GET(tail); \
|
||||
__skb_append(tail, _skb, &(_ni)->ni_savedq); \
|
||||
__skb_queue_after(&(_ni)->ni_savedq, tail, _skb); \
|
||||
} else { \
|
||||
__skb_queue_head(&(_ni)->ni_savedq, _skb); \
|
||||
} \
|
||||
|
@ -244,7 +244,7 @@ ieee80211_pwrsave(struct sk_buff *skb)
|
||||
tail = skb_peek_tail(&ni->ni_savedq);
|
||||
if (tail != NULL) {
|
||||
age -= M_AGE_GET(tail);
|
||||
__skb_append(tail, skb, &ni->ni_savedq);
|
||||
__skb_queue_after(&ni->ni_savedq, tail, skb);
|
||||
} else
|
||||
__skb_queue_head(&ni->ni_savedq, skb);
|
||||
M_AGE_SET(skb, age);
|
||||
|
Loading…
Reference in New Issue
Block a user