Skip to contentSkip to conversation

Atheros IEEE 802.11n ath9k driver

PATCH New Luis R. Rodriguez 3 participants 7 messages Aug 4, 2008 1 message not in the archive Networking drivers (wireless)

lore
Share & tools
lore
#1 lore raw

PATCH 1/4 list.h: Add list_splice_tail() and list_splice_tail_init()

If you are using linked lists for queues list_splice() will not do what you would expect even if you use the elements passed reversed. We need to handle these differently. We add list_splice_tail() and list_splice_tail_init()

---
 include/linux/list.h |   45 ++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 44 insertions(+), 1 deletions(-)
include/linux/list.h +44 -1
index 453916b..594f67c 100644
@@ -229,7 +229,7 @@ static inline void __list_splice(const struct list_head *list,
 }
 
 /**
- * list_splice - join two lists
+ * list_splice - join two lists, this is designed for stacks
  * @list: the new list to add.
  * @head: the place to add it in the first list.
  */
@@ -256,6 +256,49 @@ static inline void list_splice_init(struct list_head *list,
 	}
 }
 
+static inline void __list_splice_tail(const struct list_head *list,
+				 struct list_head *head)
+{
+	struct list_head *first = list->next;
+	struct list_head *last = list->prev;
+	struct list_head *current_tail = head->prev;
+
+	current_tail->next = first;
+	last->next = head;
+	head->prev = last;
+	first->prev = current_tail;
+}
+
+/**
+ * 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(const struct list_head *list,
+				struct list_head *head)
+{
+	if (!list_empty(list))
+		__list_splice_tail(list, head);
+}
+
+/**
+ * list_splice_tail_init - join two lists, each list being a queue, and
+ * 	reinitialise the emptied list.
+ * @list: the new list to add.
+ * @head: the place to add it in the first list.
+ *
+ * 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)) {
+		__list_splice_tail(list, head);
+		INIT_LIST_HEAD(list);
+	}
+}
+
+
 /**
  * list_entry - get the struct for this entry
  * @ptr:	the &struct list_head pointer.
Signature · 1 line
1.5.6.rc2.15.g457bb.dirty
#2 lore raw

PATCH 2/4 list.h: add list_cut_position()

This adds list_cut_position() which lets you cut a list into two lists given a pivot in the list.

---
 include/linux/list.h |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)
include/linux/list.h +32 -0
index 594f67c..2999b0f 100644
@@ -214,6 +214,38 @@ static inline int list_is_singular(const struct list_head *head)
 	return !list_empty(head) && (head->next == head->prev);
 }
 
+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 != head) ? entry->next : head;
+	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 won't cut the list
+ */
+static inline void list_cut_position(struct list_head *list,
+		struct list_head *head, struct list_head *entry)
+{
+	BUG_ON(list_empty(head));
+	if (list_is_singular(head))
+		BUG_ON(head->next != entry && head != entry);
+	if (entry == head)
+		INIT_LIST_HEAD(list);
+	else
+		__list_cut_position(list, head, entry);
+}
+
 static inline void __list_splice(const struct list_head *list,
 				 struct list_head *head)
 {
Signature · 1 line
1.5.6.rc2.15.g457bb.dirty
#3 lore raw

PATCH 3/4 ath5k: remove Atheros 11n devices from supported list

Remove Atheros 11n devices from being claimed by ath5k as its now handled by ath9k.

---
 drivers/net/wireless/ath5k/base.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/net/wireless/ath5k/base.c +0 -2
index 0c948ca..b362c48 100644
@@ -95,8 +95,6 @@ static struct pci_device_id ath5k_pci_id_table[] __devinitdata = {
 	{ PCI_VDEVICE(ATHEROS, 0x001a), .driver_data = AR5K_AR5212 }, /* 2413 Griffin-lite */
 	{ PCI_VDEVICE(ATHEROS, 0x001b), .driver_data = AR5K_AR5212 }, /* 5413 Eagle */
 	{ PCI_VDEVICE(ATHEROS, 0x001c), .driver_data = AR5K_AR5212 }, /* 5424 Condor (PCI-E)*/
-	{ PCI_VDEVICE(ATHEROS, 0x0023), .driver_data = AR5K_AR5212 }, /* 5416 */
-	{ PCI_VDEVICE(ATHEROS, 0x0024), .driver_data = AR5K_AR5212 }, /* 5418 */
 	{ 0 }
 };
 MODULE_DEVICE_TABLE(pci, ath5k_pci_id_table);
Signature · 1 line
1.5.6.rc2.15.g457bb.dirty

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw

PATCH 4/4 ath9k: Add new Atheros IEEE 802.11n driver

Quoted 6 lines · Luis R. Rodriguez

This adds the new mac80211 11n ath9k Atheros driver. Only STA support is currently enabled and tested.

No signed off yet, I haven't even read in detail through the whole driver. Same is probably true for most other people on this list.

That beeing said I'm not really in a position to sign off either as I'm not the mainter nor a major contributor to the patch.

#7 lore raw

PATCH 4/4 ath9k: Add new Atheros IEEE 802.11n driver

Quoted 8 lines · Christoph Hellwig
Quoted 6 lines · Luis R. Rodriguez

This adds the new mac80211 11n ath9k Atheros driver. Only STA support is currently enabled and tested.

Quoted 6 lines

No signed off yet, I haven't even read in detail through the whole driver. Same is probably true for most other people on this list.

That beeing said I'm not really in a position to sign off either as I'm not the mainter nor a major contributor to the patch.

Sorry I had meant you had patches in with your name. Just wanted to provide credit for that, that's all.

Luis