diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2008-09-02 17:42:53 -0700 |
---|---|---|
committer | Luis R. Rodriguez <lrodriguez@atheros.com> | 2008-09-02 17:42:53 -0700 |
commit | ec6e0e2ab61d1102add7939a7629f0db2260e63c (patch) | |
tree | 49e5ef2617854bc7679f21092e02944405d0faaf | |
parent | 5dd577c44d688fef9274fa2052f4654ee14951a5 (diff) | |
download | compat-wireless-2.6-old-ec6e0e2ab61d1102add7939a7629f0db2260e63c.tar.gz |
Backport changes on ath9k, tested on 2.6.26 using WPA
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | include/net/compat.h | 90 |
2 files changed, 92 insertions, 0 deletions
@@ -87,6 +87,7 @@ install: uninstall modules @$(MODPROBE) -l adm8211 @$(MODPROBE) -l at76_usb @$(MODPROBE) -l ath5k + @$(MODPROBE) -l ath9k @$(MODPROBE) -l b43 @$(MODPROBE) -l b43legacy @$(MODPROBE) -l ssb @@ -146,6 +147,7 @@ uninstall: @# rc80211_simple is a module on 2.6.22 and 2.6.23 though @$(MODPROBE) -l adm8211 @$(MODPROBE) -l ath5k + @$(MODPROBE) -l ath9k @$(MODPROBE) -l at76_usb @$(MODPROBE) -l b43 @$(MODPROBE) -l b43legacy diff --git a/include/net/compat.h b/include/net/compat.h index 75a498e..0e2e515 100644 --- a/include/net/compat.h +++ b/include/net/compat.h @@ -784,6 +784,96 @@ int rfkill_force_state(struct rfkill *rfkill, enum rfkill_state state); int register_rfkill_notifier(struct notifier_block *nb); int unregister_rfkill_notifier(struct notifier_block *nb); +/* This is from include/linux/ieee80211.h */ +#define IEEE80211_HT_CAP_DSSSCCK40 0x1000 + +/* New link list changes added as of 2.6.27, needed for ath9k */ + +static inline void __list_cut_position(struct list_head *list, + struct list_head *head, struct list_head *entry) +{ + struct list_head *new_first = entry->next; + list->next = head->next; + list->next->prev = list; + list->prev = entry; + entry->next = list; + head->next = new_first; + new_first->prev = head; +} + +/** + * list_cut_position - cut a list into two + * @list: a new list to add all removed entries + * @head: a list with entries + * @entry: an entry within head, could be the head itself + * and if so we won't cut the list + * + * This helper moves the initial part of @head, up to and + * including @entry, from @head to @list. You should + * pass on @entry an element you know is on @head. @list + * should be an empty list or a list you do not care about + * losing its data. + * + */ +static inline void list_cut_position(struct list_head *list, + struct list_head *head, struct list_head *entry) +{ + if (list_empty(head)) + return; + if (list_is_singular(head) && + (head->next != entry && head != entry)) + return; + if (entry == head) + INIT_LIST_HEAD(list); + else + __list_cut_position(list, head, entry); +} + + +/* __list_splice as re-implemented on 2.6.27, we backport it */ +static inline void __compat_list_splice_new_27(const struct list_head *list, + struct list_head *prev, + struct list_head *next) +{ + struct list_head *first = list->next; + struct list_head *last = list->prev; + + first->prev = prev; + prev->next = first; + + last->next = next; + next->prev = last; +} + +/** + * list_splice_tail - join two lists, each list being a queue + * @list: the new list to add. + * @head: the place to add it in the first list. + */ +static inline void list_splice_tail(struct list_head *list, + struct list_head *head) +{ + if (!list_empty(list)) + __compat_list_splice_new_27(list, head->prev, head); +} + +/** + * list_splice_tail_init - join two lists and reinitialise the emptied list + * @list: the new list to add. + * @head: the place to add it in the first list. + * + * Each of the lists is a queue. + * The list at @list is reinitialised + */ +static inline void list_splice_tail_init(struct list_head *list, + struct list_head *head) +{ + if (!list_empty(list)) { + __compat_list_splice_new_27(list, head->prev, head); + INIT_LIST_HEAD(list); + } +} + #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)) */ #endif /* LINUX_26_COMPAT_H */ |