Skip to contentSkip to conversation

Please pull 'libertas' branch of wireless-2.6

PATCH John W. Linville 1 participant 1 message Mar 17, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

I'm not sure why I still have libertas as a separate branch, but I do. I don't think this should cause any trouble for you, but I figured I'd say something in case you were wondering. :-)

Anyway, this is intended for the 'upstream' branch of netdev-2.6. You already had pulled libertas there when last I checked.

BTW, Pavel's patch is here instead of in another branch because it depends on changes from the original libertas driver patch.

Thanks,

John

---

The following changes since commit 971a89608a33ab591c85aa00777acd9ad05f9e82:
John W. Linville (1):
Merge branch 'from-linus' into libertas

are found in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git libertas

Pavel Roskin (1):
sparse-annotate radiotap header

Tony Breeds (1):
libertas: use standard kernel macros

 drivers/net/wireless/libertas/debugfs.c |   41 ++--------------------
 include/net/ieee80211_radiotap.h        |   57 ++++++++++++++++---------------
 2 files changed, 33 insertions(+), 65 deletions(-)
drivers/net/wireless/libertas/debugfs.c +4 -37
index 3ad1e03..51dfd20 100644
@@ -1772,8 +1772,8 @@ void libertas_debugfs_remove_one(wlan_private *priv)
 
 /* debug entry */
 
-#define item_size(n) (sizeof ((wlan_adapter *)0)->n)
-#define item_addr(n) ((u32) &((wlan_adapter *)0)->n)
+#define item_size(n)	(FIELD_SIZEOF(wlan_adapter, n))
+#define item_addr(n)	(offsetof(wlan_adapter, n))
 
 struct debug_data {
 	char name[32];
@@ -1789,40 +1789,7 @@ static struct debug_data items[] = {
 	{"psstate", item_size(psstate), item_addr(psstate)},
 };
 
-static int num_of_items = sizeof(items) / sizeof(items[0]);
-
-/**
- *  @brief convert string to number
- *
- *  @param s   	   pointer to numbered string
- *  @return 	   converted number from string s
- */
-static int string_to_number(char *s)
-{
-	int r = 0;
-	int base = 0;
-
-	if ((strncmp(s, "0x", 2) == 0) || (strncmp(s, "0X", 2) == 0))
-		base = 16;
-	else
-		base = 10;
-
-	if (base == 16)
-		s += 2;
-
-	for (s = s; *s != 0; s++) {
-		if ((*s >= 48) && (*s <= 57))
-			r = (r * base) + (*s - 48);
-		else if ((*s >= 65) && (*s <= 70))
-			r = (r * base) + (*s - 55);
-		else if ((*s >= 97) && (*s <= 102))
-			r = (r * base) + (*s - 87);
-		else
-			break;
-	}
-
-	return r;
-}
+static int num_of_items = ARRAY_SIZE(items);
 
 /**
  *  @brief proc read function
@@ -1912,7 +1879,7 @@ static int wlan_debugfs_write(struct file *f, const char __user *buf,
 			if (!p2)
 				break;
 			p2++;
-			r = string_to_number(p2);
+			r = simple_strtoul(p2, NULL, 0);
 			if (d[i].size == 1)
 				*((u8 *) d[i].addr) = (u8) r;
 			else if (d[i].size == 2)
include/net/ieee80211_radiotap.h +29 -28

152 lines not on this page · raw message

Signature · 2 lines
John W. Linville
[email protected]